{
+ L[2] = a[2] / a[0];
+ U[0] = a[0];
+ U[1] = a[1];
+ U[3] = a[3] - L[2] * U[1];
+ return [L, D, U];
+}
+
+/**
+ * Adds two mat2's
+ *
+ * @param {mat2} out the receiving matrix
+ * @param {ReadonlyMat2} a the first operand
+ * @param {ReadonlyMat2} b the second operand
+ * @returns {mat2} out
+ */
+export function add(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2): mat2 {
+ out[0] = a[0] + b[0];
+ out[1] = a[1] + b[1];
+ out[2] = a[2] + b[2];
+ out[3] = a[3] + b[3];
+ return out;
+}
+
+/**
+ * Subtracts matrix b from matrix a
+ *
+ * @param {mat2} out the receiving matrix
+ * @param {ReadonlyMat2} a the first operand
+ * @param {ReadonlyMat2} b the second operand
+ * @returns {mat2} out
+ */
+export function subtract(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2): mat2 {
+ out[0] = a[0] - b[0];
+ out[1] = a[1] - b[1];
+ out[2] = a[2] - b[2];
+ out[3] = a[3] - b[3];
+ return out;
+}
+
+/**
+ * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
+ *
+ * @param {ReadonlyMat2} a The first matrix.
+ * @param {ReadonlyMat2} b The second matrix.
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
+ */
+export function exactEquals(a: ReadonlyMat2, b: ReadonlyMat2): bool {
+ return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];
+}
+
+/**
+ * Returns whether or not the matrices have approximately the same elements in the same position.
+ *
+ * @param {ReadonlyMat2} a The first matrix.
+ * @param {ReadonlyMat2} b The second matrix.
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
+ */
+export function equals(a: ReadonlyMat2, b: ReadonlyMat2): bool {
+ let a0 = a[0],
+ a1 = a[1],
+ a2 = a[2],
+ a3 = a[3];
+ let b0 = b[0],
+ b1 = b[1],
+ b2 = b[2],
+ b3 = b[3];
+ return (
+ Math.abs(a0 - b0) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) &&
+ Math.abs(a1 - b1) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) &&
+ Math.abs(a2 - b2) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) &&
+ Math.abs(a3 - b3) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3))
+ );
+}
+
+/**
+ * Multiply each element of the matrix by a scalar.
+ *
+ * @param {mat2} out the receiving matrix
+ * @param {ReadonlyMat2} a the matrix to scale
+ * @param {Number} b amount to scale the matrix's elements by
+ * @returns {mat2} out
+ */
+export function multiplyScalar(out: mat2, a: ReadonlyMat2, b: f64): mat2 {
+ out[0] = a[0] * b;
+ out[1] = a[1] * b;
+ out[2] = a[2] * b;
+ out[3] = a[3] * b;
+ return out;
+}
+
+/**
+ * Adds two mat2's after multiplying each element of the second operand by a scalar value.
+ *
+ * @param {mat2} out the receiving vector
+ * @param {ReadonlyMat2} a the first operand
+ * @param {ReadonlyMat2} b the second operand
+ * @param {Number} scale the amount to scale b's elements by before adding
+ * @returns {mat2} out
+ */
+export function multiplyScalarAndAdd(out: mat2, a: ReadonlyMat2, b: ReadonlyMat2, scale: f64): mat2 {
+ out[0] = a[0] + b[0] * scale;
+ out[1] = a[1] + b[1] * scale;
+ out[2] = a[2] + b[2] * scale;
+ out[3] = a[3] + b[3] * scale;
+ return out;
+}
+
+/**
+ * Alias for {@link mat2.multiply}
+ * @function
+ */
+export const mul = multiply;
+
+/**
+ * Alias for {@link mat2.subtract}
+ * @function
+ */
+export const sub = subtract;
diff --git a/assembly/mat2d.ts b/assembly/mat2d.ts
new file mode 100644
index 00000000..b9f22ea0
--- /dev/null
+++ b/assembly/mat2d.ts
@@ -0,0 +1,525 @@
+import * as glMatrix from "./common";
+import { IndexedCollection } from "./imports"
+import { Maths } from "./maths";
+import { ReadonlyVec2 } from "./vec2";
+
+export type mat2d = IndexedCollection;
+
+export type ReadonlyMat2d = IndexedCollection;
+
+/**
+ * 2x3 Matrix
+ * @module mat2d
+ * @description
+ * A mat2d contains six elements defined as:
+ *
+ * [a, b,
+ * c, d,
+ * tx, ty]
+ *
+ * This is a short form for the 3x3 matrix:
+ *
+ * [a, b, 0,
+ * c, d, 0,
+ * tx, ty, 1]
+ *
+ * The last column is ignored so the array is shorter and operations are faster.
+ */
+
+/**
+ * Creates a new identity mat2d
+ *
+ * @returns {mat2d} a new 2x3 matrix
+ */
+export function create(): mat2d {
+ let out = new Float64Array(6);
+ if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) {
+ out[1] = 0;
+ out[2] = 0;
+ out[4] = 0;
+ out[5] = 0;
+ }
+ out[0] = 1;
+ out[3] = 1;
+ return out;
+}
+
+/**
+ * Creates a new mat2d initialized with values from an existing matrix
+ *
+ * @param {ReadonlyMat2d} a matrix to clone
+ * @returns {mat2d} a new 2x3 matrix
+ */
+export function clone(a: ReadonlyMat2d): mat2d {
+ let out = new Float64Array(6);
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ out[3] = a[3];
+ out[4] = a[4];
+ out[5] = a[5];
+ return out;
+}
+
+/**
+ * Copy the values from one mat2d to another
+ *
+ * @param {mat2d} out the receiving matrix
+ * @param {ReadonlyMat2d} a the source matrix
+ * @returns {mat2d} out
+ */
+export function copy(out: mat2d, a: ReadonlyMat2d): mat2d {
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ out[3] = a[3];
+ out[4] = a[4];
+ out[5] = a[5];
+ return out;
+}
+
+/**
+ * Set a mat2d to the identity matrix
+ *
+ * @param {mat2d} out the receiving matrix
+ * @returns {mat2d} out
+ */
+export function identity(out: mat2d): mat2d {
+ out[0] = 1;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 1;
+ out[4] = 0;
+ out[5] = 0;
+ return out;
+}
+
+/**
+ * Create a new mat2d with the given values
+ *
+ * @param {Number} a Component A (index 0)
+ * @param {Number} b Component B (index 1)
+ * @param {Number} c Component C (index 2)
+ * @param {Number} d Component D (index 3)
+ * @param {Number} tx Component TX (index 4)
+ * @param {Number} ty Component TY (index 5)
+ * @returns {mat2d} A new mat2d
+ */
+export function fromValues(a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): mat2d {
+ let out = new Float64Array(6);
+ out[0] = a;
+ out[1] = b;
+ out[2] = c;
+ out[3] = d;
+ out[4] = tx;
+ out[5] = ty;
+ return out;
+}
+
+/**
+ * Set the components of a mat2d to the given values
+ *
+ * @param {mat2d} out the receiving matrix
+ * @param {Number} a Component A (index 0)
+ * @param {Number} b Component B (index 1)
+ * @param {Number} c Component C (index 2)
+ * @param {Number} d Component D (index 3)
+ * @param {Number} tx Component TX (index 4)
+ * @param {Number} ty Component TY (index 5)
+ * @returns {mat2d} out
+ */
+export function set(out: mat2d, a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): mat2d {
+ out[0] = a;
+ out[1] = b;
+ out[2] = c;
+ out[3] = d;
+ out[4] = tx;
+ out[5] = ty;
+ return out;
+}
+
+/**
+ * Inverts a mat2d
+ *
+ * @param {mat2d} out the receiving matrix
+ * @param {ReadonlyMat2d} a the source matrix
+ * @returns {mat2d} out
+ */
+export function invert(out: mat2d, a: ReadonlyMat2d): mat2d | null {
+ let aa = a[0],
+ ab = a[1],
+ ac = a[2],
+ ad = a[3];
+ let atx = a[4],
+ aty = a[5];
+
+ let det = aa * ad - ab * ac;
+ if (!det) {
+ return null;
+ }
+ det = 1.0 / det;
+
+ out[0] = ad * det;
+ out[1] = -ab * det;
+ out[2] = -ac * det;
+ out[3] = aa * det;
+ out[4] = (ac * aty - ad * atx) * det;
+ out[5] = (ab * atx - aa * aty) * det;
+ return out;
+}
+
+/**
+ * Calculates the determinant of a mat2d
+ *
+ * @param {ReadonlyMat2d} a the source matrix
+ * @returns {Number} determinant of a
+ */
+export function determinant(a: ReadonlyMat2d): f64 {
+ return a[0] * a[3] - a[1] * a[2];
+}
+
+/**
+ * Multiplies two mat2d's
+ *
+ * @param {mat2d} out the receiving matrix
+ * @param {ReadonlyMat2d} a the first operand
+ * @param {ReadonlyMat2d} b the second operand
+ * @returns {mat2d} out
+ */
+export function multiply(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d): mat2d {
+ let a0 = a[0],
+ a1 = a[1],
+ a2 = a[2],
+ a3 = a[3],
+ a4 = a[4],
+ a5 = a[5];
+ let b0 = b[0],
+ b1 = b[1],
+ b2 = b[2],
+ b3 = b[3],
+ b4 = b[4],
+ b5 = b[5];
+ out[0] = a0 * b0 + a2 * b1;
+ out[1] = a1 * b0 + a3 * b1;
+ out[2] = a0 * b2 + a2 * b3;
+ out[3] = a1 * b2 + a3 * b3;
+ out[4] = a0 * b4 + a2 * b5 + a4;
+ out[5] = a1 * b4 + a3 * b5 + a5;
+ return out;
+}
+
+/**
+ * Rotates a mat2d by the given angle
+ *
+ * @param {mat2d} out the receiving matrix
+ * @param {ReadonlyMat2d} a the matrix to rotate
+ * @param {Number} rad the angle to rotate the matrix by
+ * @returns {mat2d} out
+ */
+export function rotate(out: mat2d, a: ReadonlyMat2d, rad: f64): mat2d {
+ let a0 = a[0],
+ a1 = a[1],
+ a2 = a[2],
+ a3 = a[3],
+ a4 = a[4],
+ a5 = a[5];
+ let s = Math.sin(rad);
+ let c = Math.cos(rad);
+ out[0] = a0 * c + a2 * s;
+ out[1] = a1 * c + a3 * s;
+ out[2] = a0 * -s + a2 * c;
+ out[3] = a1 * -s + a3 * c;
+ out[4] = a4;
+ out[5] = a5;
+ return out;
+}
+
+/**
+ * Scales the mat2d by the dimensions in the given vec2
+ *
+ * @param {mat2d} out the receiving matrix
+ * @param {ReadonlyMat2d} a the matrix to translate
+ * @param {ReadonlyVec2} v the vec2 to scale the matrix by
+ * @returns {mat2d} out
+ **/
+export function scale(out: mat2d, a: ReadonlyMat2d, v: ReadonlyVec2): mat2d {
+ let a0 = a[0],
+ a1 = a[1],
+ a2 = a[2],
+ a3 = a[3],
+ a4 = a[4],
+ a5 = a[5];
+ let v0 = v[0],
+ v1 = v[1];
+ out[0] = a0 * v0;
+ out[1] = a1 * v0;
+ out[2] = a2 * v1;
+ out[3] = a3 * v1;
+ out[4] = a4;
+ out[5] = a5;
+ return out;
+}
+
+/**
+ * Translates the mat2d by the dimensions in the given vec2
+ *
+ * @param {mat2d} out the receiving matrix
+ * @param {ReadonlyMat2d} a the matrix to translate
+ * @param {ReadonlyVec2} v the vec2 to translate the matrix by
+ * @returns {mat2d} out
+ **/
+export function translate(out: mat2d, a: ReadonlyMat2d, v: ReadonlyVec2): mat2d {
+ let a0 = a[0],
+ a1 = a[1],
+ a2 = a[2],
+ a3 = a[3],
+ a4 = a[4],
+ a5 = a[5];
+ let v0 = v[0],
+ v1 = v[1];
+ out[0] = a0;
+ out[1] = a1;
+ out[2] = a2;
+ out[3] = a3;
+ out[4] = a0 * v0 + a2 * v1 + a4;
+ out[5] = a1 * v0 + a3 * v1 + a5;
+ return out;
+}
+
+/**
+ * Creates a matrix from a given angle
+ * This is equivalent to (but much faster than):
+ *
+ * mat2d.identity(dest);
+ * mat2d.rotate(dest, dest, rad);
+ *
+ * @param {mat2d} out mat2d receiving operation result
+ * @param {Number} rad the angle to rotate the matrix by
+ * @returns {mat2d} out
+ */
+export function fromRotation(out: mat2d, rad: f64): mat2d {
+ let s = Math.sin(rad),
+ c = Math.cos(rad);
+ out[0] = c;
+ out[1] = s;
+ out[2] = -s;
+ out[3] = c;
+ out[4] = 0;
+ out[5] = 0;
+ return out;
+}
+
+/**
+ * Creates a matrix from a vector scaling
+ * This is equivalent to (but much faster than):
+ *
+ * mat2d.identity(dest);
+ * mat2d.scale(dest, dest, vec);
+ *
+ * @param {mat2d} out mat2d receiving operation result
+ * @param {ReadonlyVec2} v Scaling vector
+ * @returns {mat2d} out
+ */
+export function fromScaling(out: mat2d, v: ReadonlyVec2): mat2d {
+ out[0] = v[0];
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = v[1];
+ out[4] = 0;
+ out[5] = 0;
+ return out;
+}
+
+/**
+ * Creates a matrix from a vector translation
+ * This is equivalent to (but much faster than):
+ *
+ * mat2d.identity(dest);
+ * mat2d.translate(dest, dest, vec);
+ *
+ * @param {mat2d} out mat2d receiving operation result
+ * @param {ReadonlyVec2} v Translation vector
+ * @returns {mat2d} out
+ */
+export function fromTranslation(out: mat2d, v: ReadonlyVec2): mat2d {
+ out[0] = 1;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 1;
+ out[4] = v[0];
+ out[5] = v[1];
+ return out;
+}
+
+/**
+ * Returns a string representation of a mat2d
+ *
+ * @param {ReadonlyMat2d} a matrix to represent as a string
+ * @returns {String} string representation of the matrix
+ */
+export function str(a: ReadonlyMat2d): string {
+ return (
+ "mat2d(" +
+ a[0].toString() +
+ ", " +
+ a[1].toString() +
+ ", " +
+ a[2].toString() +
+ ", " +
+ a[3].toString() +
+ ", " +
+ a[4].toString() +
+ ", " +
+ a[5].toString() +
+ ")"
+ );
+}
+
+/**
+ * Returns Frobenius norm of a mat2d
+ *
+ * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of
+ * @returns {Number} Frobenius norm
+ */
+export function frob(a: ReadonlyMat2d): f64 {
+ return Maths.hypot7(a[0], a[1], a[2], a[3], a[4], a[5], 1);
+}
+
+/**
+ * Adds two mat2d's
+ *
+ * @param {mat2d} out the receiving matrix
+ * @param {ReadonlyMat2d} a the first operand
+ * @param {ReadonlyMat2d} b the second operand
+ * @returns {mat2d} out
+ */
+export function add(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d): mat2d {
+ out[0] = a[0] + b[0];
+ out[1] = a[1] + b[1];
+ out[2] = a[2] + b[2];
+ out[3] = a[3] + b[3];
+ out[4] = a[4] + b[4];
+ out[5] = a[5] + b[5];
+ return out;
+}
+
+/**
+ * Subtracts matrix b from matrix a
+ *
+ * @param {mat2d} out the receiving matrix
+ * @param {ReadonlyMat2d} a the first operand
+ * @param {ReadonlyMat2d} b the second operand
+ * @returns {mat2d} out
+ */
+export function subtract(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d): mat2d {
+ out[0] = a[0] - b[0];
+ out[1] = a[1] - b[1];
+ out[2] = a[2] - b[2];
+ out[3] = a[3] - b[3];
+ out[4] = a[4] - b[4];
+ out[5] = a[5] - b[5];
+ return out;
+}
+
+/**
+ * Multiply each element of the matrix by a scalar.
+ *
+ * @param {mat2d} out the receiving matrix
+ * @param {ReadonlyMat2d} a the matrix to scale
+ * @param {Number} b amount to scale the matrix's elements by
+ * @returns {mat2d} out
+ */
+export function multiplyScalar(out: mat2d, a: ReadonlyMat2d, b: f64): mat2d {
+ out[0] = a[0] * b;
+ out[1] = a[1] * b;
+ out[2] = a[2] * b;
+ out[3] = a[3] * b;
+ out[4] = a[4] * b;
+ out[5] = a[5] * b;
+ return out;
+}
+
+/**
+ * Adds two mat2d's after multiplying each element of the second operand by a scalar value.
+ *
+ * @param {mat2d} out the receiving vector
+ * @param {ReadonlyMat2d} a the first operand
+ * @param {ReadonlyMat2d} b the second operand
+ * @param {Number} scale the amount to scale b's elements by before adding
+ * @returns {mat2d} out
+ */
+export function multiplyScalarAndAdd(out: mat2d, a: ReadonlyMat2d, b: ReadonlyMat2d, scale: f64): mat2d {
+ out[0] = a[0] + b[0] * scale;
+ out[1] = a[1] + b[1] * scale;
+ out[2] = a[2] + b[2] * scale;
+ out[3] = a[3] + b[3] * scale;
+ out[4] = a[4] + b[4] * scale;
+ out[5] = a[5] + b[5] * scale;
+ return out;
+}
+
+/**
+ * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
+ *
+ * @param {ReadonlyMat2d} a The first matrix.
+ * @param {ReadonlyMat2d} b The second matrix.
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
+ */
+export function exactEquals(a: ReadonlyMat2d, b: ReadonlyMat2d): bool {
+ return (
+ a[0] === b[0] &&
+ a[1] === b[1] &&
+ a[2] === b[2] &&
+ a[3] === b[3] &&
+ a[4] === b[4] &&
+ a[5] === b[5]
+ );
+}
+
+/**
+ * Returns whether or not the matrices have approximately the same elements in the same position.
+ *
+ * @param {ReadonlyMat2d} a The first matrix.
+ * @param {ReadonlyMat2d} b The second matrix.
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
+ */
+export function equals(a: ReadonlyMat2d, b: ReadonlyMat2d): bool {
+ let a0 = a[0],
+ a1 = a[1],
+ a2 = a[2],
+ a3 = a[3],
+ a4 = a[4],
+ a5 = a[5];
+ let b0 = b[0],
+ b1 = b[1],
+ b2 = b[2],
+ b3 = b[3],
+ b4 = b[4],
+ b5 = b[5];
+ return (
+ Math.abs(a0 - b0) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) &&
+ Math.abs(a1 - b1) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) &&
+ Math.abs(a2 - b2) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) &&
+ Math.abs(a3 - b3) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) &&
+ Math.abs(a4 - b4) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) &&
+ Math.abs(a5 - b5) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5))
+ );
+}
+
+/**
+ * Alias for {@link mat2d.multiply}
+ * @function
+ */
+export const mul = multiply;
+
+/**
+ * Alias for {@link mat2d.subtract}
+ * @function
+ */
+export const sub = subtract;
diff --git a/assembly/mat3.ts b/assembly/mat3.ts
new file mode 100644
index 00000000..f737b43b
--- /dev/null
+++ b/assembly/mat3.ts
@@ -0,0 +1,875 @@
+import * as glMatrix from "./common";
+import { IndexedCollection } from "./imports";
+import { Maths } from "./maths";
+import { ReadonlyMat2 } from "./mat2";
+import { ReadonlyMat4 } from "./mat4";
+import { ReadonlyVec2 } from "./vec2";
+
+export type ReadonlyQuat = IndexedCollection;
+
+export type mat3 = IndexedCollection;
+
+export type ReadonlyMat3 = IndexedCollection;
+
+/**
+ * 3x3 Matrix
+ * @module mat3
+ */
+
+/**
+ * Creates a new identity mat3
+ *
+ * @returns {mat3} a new 3x3 matrix
+ */
+export function create(): mat3 {
+ let out = new Float64Array(9);
+ if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) {
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[5] = 0;
+ out[6] = 0;
+ out[7] = 0;
+ }
+ out[0] = 1;
+ out[4] = 1;
+ out[8] = 1;
+ return out;
+}
+
+/**
+ * Copies the upper-left 3x3 values into the given mat3.
+ *
+ * @param {mat3} out the receiving 3x3 matrix
+ * @param {ReadonlyMat4} a the source 4x4 matrix
+ * @returns {mat3} out
+ */
+export function fromMat4(out: mat3, a: ReadonlyMat4): mat3 {
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ out[3] = a[4];
+ out[4] = a[5];
+ out[5] = a[6];
+ out[6] = a[8];
+ out[7] = a[9];
+ out[8] = a[10];
+ return out;
+}
+
+/**
+ * Creates a new mat3 initialized with values from an existing matrix
+ *
+ * @param {ReadonlyMat3} a matrix to clone
+ * @returns {mat3} a new 3x3 matrix
+ */
+export function clone(a: ReadonlyMat3): mat3 {
+ let out = new Float64Array(9);
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ out[3] = a[3];
+ out[4] = a[4];
+ out[5] = a[5];
+ out[6] = a[6];
+ out[7] = a[7];
+ out[8] = a[8];
+ return out;
+}
+
+/**
+ * Copy the values from one mat3 to another
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {ReadonlyMat3} a the source matrix
+ * @returns {mat3} out
+ */
+export function copy(out: mat3, a: ReadonlyMat3): mat3 {
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ out[3] = a[3];
+ out[4] = a[4];
+ out[5] = a[5];
+ out[6] = a[6];
+ out[7] = a[7];
+ out[8] = a[8];
+ return out;
+}
+
+/**
+ * Create a new mat3 with the given values
+ *
+ * @param {Number} m00 Component in column 0, row 0 position (index 0)
+ * @param {Number} m01 Component in column 0, row 1 position (index 1)
+ * @param {Number} m02 Component in column 0, row 2 position (index 2)
+ * @param {Number} m10 Component in column 1, row 0 position (index 3)
+ * @param {Number} m11 Component in column 1, row 1 position (index 4)
+ * @param {Number} m12 Component in column 1, row 2 position (index 5)
+ * @param {Number} m20 Component in column 2, row 0 position (index 6)
+ * @param {Number} m21 Component in column 2, row 1 position (index 7)
+ * @param {Number} m22 Component in column 2, row 2 position (index 8)
+ * @returns {mat3} A new mat3
+ */
+export function fromValues(m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): mat3 {
+ let out = new Float64Array(9);
+ out[0] = m00;
+ out[1] = m01;
+ out[2] = m02;
+ out[3] = m10;
+ out[4] = m11;
+ out[5] = m12;
+ out[6] = m20;
+ out[7] = m21;
+ out[8] = m22;
+ return out;
+}
+
+/**
+ * Set the components of a mat3 to the given values
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {Number} m00 Component in column 0, row 0 position (index 0)
+ * @param {Number} m01 Component in column 0, row 1 position (index 1)
+ * @param {Number} m02 Component in column 0, row 2 position (index 2)
+ * @param {Number} m10 Component in column 1, row 0 position (index 3)
+ * @param {Number} m11 Component in column 1, row 1 position (index 4)
+ * @param {Number} m12 Component in column 1, row 2 position (index 5)
+ * @param {Number} m20 Component in column 2, row 0 position (index 6)
+ * @param {Number} m21 Component in column 2, row 1 position (index 7)
+ * @param {Number} m22 Component in column 2, row 2 position (index 8)
+ * @returns {mat3} out
+ */
+export function set(out: mat3, m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): mat3 {
+ out[0] = m00;
+ out[1] = m01;
+ out[2] = m02;
+ out[3] = m10;
+ out[4] = m11;
+ out[5] = m12;
+ out[6] = m20;
+ out[7] = m21;
+ out[8] = m22;
+ return out;
+}
+
+/**
+ * Set a mat3 to the identity matrix
+ *
+ * @param {mat3} out the receiving matrix
+ * @returns {mat3} out
+ */
+export function identity(out: mat3): mat3 {
+ out[0] = 1;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = 1;
+ out[5] = 0;
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = 1;
+ return out;
+}
+
+/**
+ * Transpose the values of a mat3
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {ReadonlyMat3} a the source matrix
+ * @returns {mat3} out
+ */
+export function transpose(out: mat3, a: ReadonlyMat3): mat3 {
+ // If we are transposing ourselves we can skip a few steps but have to cache some values
+ if (out === a) {
+ let a01 = a[1],
+ a02 = a[2],
+ a12 = a[5];
+ out[1] = a[3];
+ out[2] = a[6];
+ out[3] = a01;
+ out[5] = a[7];
+ out[6] = a02;
+ out[7] = a12;
+ } else {
+ out[0] = a[0];
+ out[1] = a[3];
+ out[2] = a[6];
+ out[3] = a[1];
+ out[4] = a[4];
+ out[5] = a[7];
+ out[6] = a[2];
+ out[7] = a[5];
+ out[8] = a[8];
+ }
+
+ return out;
+}
+
+/**
+ * Inverts a mat3
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {ReadonlyMat3} a the source matrix
+ * @returns {mat3} out
+ */
+export function invert(out: mat3, a: ReadonlyMat3): mat3 | null {
+ let a00 = a[0],
+ a01 = a[1],
+ a02 = a[2];
+ let a10 = a[3],
+ a11 = a[4],
+ a12 = a[5];
+ let a20 = a[6],
+ a21 = a[7],
+ a22 = a[8];
+
+ let b01 = a22 * a11 - a12 * a21;
+ let b11 = -a22 * a10 + a12 * a20;
+ let b21 = a21 * a10 - a11 * a20;
+
+ // Calculate the determinant
+ let det = a00 * b01 + a01 * b11 + a02 * b21;
+
+ if (!det) {
+ return null;
+ }
+ det = 1.0 / det;
+
+ out[0] = b01 * det;
+ out[1] = (-a22 * a01 + a02 * a21) * det;
+ out[2] = (a12 * a01 - a02 * a11) * det;
+ out[3] = b11 * det;
+ out[4] = (a22 * a00 - a02 * a20) * det;
+ out[5] = (-a12 * a00 + a02 * a10) * det;
+ out[6] = b21 * det;
+ out[7] = (-a21 * a00 + a01 * a20) * det;
+ out[8] = (a11 * a00 - a01 * a10) * det;
+ return out;
+}
+
+/**
+ * Calculates the adjugate of a mat3
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {ReadonlyMat3} a the source matrix
+ * @returns {mat3} out
+ */
+export function adjoint(out: mat3, a: ReadonlyMat3): mat3 {
+ let a00 = a[0],
+ a01 = a[1],
+ a02 = a[2];
+ let a10 = a[3],
+ a11 = a[4],
+ a12 = a[5];
+ let a20 = a[6],
+ a21 = a[7],
+ a22 = a[8];
+
+ out[0] = a11 * a22 - a12 * a21;
+ out[1] = a02 * a21 - a01 * a22;
+ out[2] = a01 * a12 - a02 * a11;
+ out[3] = a12 * a20 - a10 * a22;
+ out[4] = a00 * a22 - a02 * a20;
+ out[5] = a02 * a10 - a00 * a12;
+ out[6] = a10 * a21 - a11 * a20;
+ out[7] = a01 * a20 - a00 * a21;
+ out[8] = a00 * a11 - a01 * a10;
+ return out;
+}
+
+/**
+ * Calculates the determinant of a mat3
+ *
+ * @param {ReadonlyMat3} a the source matrix
+ * @returns {Number} determinant of a
+ */
+export function determinant(a: ReadonlyMat3): f64 {
+ let a00 = a[0],
+ a01 = a[1],
+ a02 = a[2];
+ let a10 = a[3],
+ a11 = a[4],
+ a12 = a[5];
+ let a20 = a[6],
+ a21 = a[7],
+ a22 = a[8];
+
+ return (
+ a00 * (a22 * a11 - a12 * a21) +
+ a01 * (-a22 * a10 + a12 * a20) +
+ a02 * (a21 * a10 - a11 * a20)
+ );
+}
+
+/**
+ * Multiplies two mat3's
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {ReadonlyMat3} a the first operand
+ * @param {ReadonlyMat3} b the second operand
+ * @returns {mat3} out
+ */
+export function multiply(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3 {
+ let a00 = a[0],
+ a01 = a[1],
+ a02 = a[2];
+ let a10 = a[3],
+ a11 = a[4],
+ a12 = a[5];
+ let a20 = a[6],
+ a21 = a[7],
+ a22 = a[8];
+
+ let b00 = b[0],
+ b01 = b[1],
+ b02 = b[2];
+ let b10 = b[3],
+ b11 = b[4],
+ b12 = b[5];
+ let b20 = b[6],
+ b21 = b[7],
+ b22 = b[8];
+
+ out[0] = b00 * a00 + b01 * a10 + b02 * a20;
+ out[1] = b00 * a01 + b01 * a11 + b02 * a21;
+ out[2] = b00 * a02 + b01 * a12 + b02 * a22;
+
+ out[3] = b10 * a00 + b11 * a10 + b12 * a20;
+ out[4] = b10 * a01 + b11 * a11 + b12 * a21;
+ out[5] = b10 * a02 + b11 * a12 + b12 * a22;
+
+ out[6] = b20 * a00 + b21 * a10 + b22 * a20;
+ out[7] = b20 * a01 + b21 * a11 + b22 * a21;
+ out[8] = b20 * a02 + b21 * a12 + b22 * a22;
+ return out;
+}
+
+/**
+ * Translate a mat3 by the given vector
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {ReadonlyMat3} a the matrix to translate
+ * @param {ReadonlyVec2} v vector to translate by
+ * @returns {mat3} out
+ */
+export function translate(out: mat3, a: ReadonlyMat3, v: ReadonlyVec2): mat3 {
+ let a00 = a[0],
+ a01 = a[1],
+ a02 = a[2],
+ a10 = a[3],
+ a11 = a[4],
+ a12 = a[5],
+ a20 = a[6],
+ a21 = a[7],
+ a22 = a[8],
+ x = v[0],
+ y = v[1];
+
+ out[0] = a00;
+ out[1] = a01;
+ out[2] = a02;
+
+ out[3] = a10;
+ out[4] = a11;
+ out[5] = a12;
+
+ out[6] = x * a00 + y * a10 + a20;
+ out[7] = x * a01 + y * a11 + a21;
+ out[8] = x * a02 + y * a12 + a22;
+ return out;
+}
+
+/**
+ * Rotates a mat3 by the given angle
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {ReadonlyMat3} a the matrix to rotate
+ * @param {Number} rad the angle to rotate the matrix by
+ * @returns {mat3} out
+ */
+export function rotate(out: mat3, a: ReadonlyMat3, rad: f64): mat3 {
+ let a00 = a[0],
+ a01 = a[1],
+ a02 = a[2],
+ a10 = a[3],
+ a11 = a[4],
+ a12 = a[5],
+ a20 = a[6],
+ a21 = a[7],
+ a22 = a[8],
+ s = Math.sin(rad),
+ c = Math.cos(rad);
+
+ out[0] = c * a00 + s * a10;
+ out[1] = c * a01 + s * a11;
+ out[2] = c * a02 + s * a12;
+
+ out[3] = c * a10 - s * a00;
+ out[4] = c * a11 - s * a01;
+ out[5] = c * a12 - s * a02;
+
+ out[6] = a20;
+ out[7] = a21;
+ out[8] = a22;
+ return out;
+}
+
+/**
+ * Scales the mat3 by the dimensions in the given vec2
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {ReadonlyMat3} a the matrix to rotate
+ * @param {ReadonlyVec2} v the vec2 to scale the matrix by
+ * @returns {mat3} out
+ **/
+export function scale(out: mat3, a: ReadonlyMat3, v: ReadonlyVec2): mat3 {
+ let x = v[0],
+ y = v[1];
+
+ out[0] = x * a[0];
+ out[1] = x * a[1];
+ out[2] = x * a[2];
+
+ out[3] = y * a[3];
+ out[4] = y * a[4];
+ out[5] = y * a[5];
+
+ out[6] = a[6];
+ out[7] = a[7];
+ out[8] = a[8];
+ return out;
+}
+
+/**
+ * Creates a matrix from a vector translation
+ * This is equivalent to (but much faster than):
+ *
+ * mat3.identity(dest);
+ * mat3.translate(dest, dest, vec);
+ *
+ * @param {mat3} out mat3 receiving operation result
+ * @param {ReadonlyVec2} v Translation vector
+ * @returns {mat3} out
+ */
+export function fromTranslation(out: mat3, v: ReadonlyVec2): mat3 {
+ out[0] = 1;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = 1;
+ out[5] = 0;
+ out[6] = v[0];
+ out[7] = v[1];
+ out[8] = 1;
+ return out;
+}
+
+/**
+ * Creates a matrix from a given angle
+ * This is equivalent to (but much faster than):
+ *
+ * mat3.identity(dest);
+ * mat3.rotate(dest, dest, rad);
+ *
+ * @param {mat3} out mat3 receiving operation result
+ * @param {Number} rad the angle to rotate the matrix by
+ * @returns {mat3} out
+ */
+export function fromRotation(out: mat3, rad: f64): mat3 {
+ let s = Math.sin(rad),
+ c = Math.cos(rad);
+
+ out[0] = c;
+ out[1] = s;
+ out[2] = 0;
+
+ out[3] = -s;
+ out[4] = c;
+ out[5] = 0;
+
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = 1;
+ return out;
+}
+
+/**
+ * Creates a matrix from a vector scaling
+ * This is equivalent to (but much faster than):
+ *
+ * mat3.identity(dest);
+ * mat3.scale(dest, dest, vec);
+ *
+ * @param {mat3} out mat3 receiving operation result
+ * @param {ReadonlyVec2} v Scaling vector
+ * @returns {mat3} out
+ */
+export function fromScaling(out: mat3, v: ReadonlyMat3): mat3 {
+ out[0] = v[0];
+ out[1] = 0;
+ out[2] = 0;
+
+ out[3] = 0;
+ out[4] = v[1];
+ out[5] = 0;
+
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = 1;
+ return out;
+}
+
+/**
+ * Copies the values from a mat2d into a mat3
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {ReadonlyMat2d} a the matrix to copy
+ * @returns {mat3} out
+ **/
+export function fromMat2d(out: mat3, a: ReadonlyMat2): mat3 {
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = 0;
+
+ out[3] = a[2];
+ out[4] = a[3];
+ out[5] = 0;
+
+ out[6] = a[4];
+ out[7] = a[5];
+ out[8] = 1;
+ return out;
+}
+
+/**
+ * Calculates a 3x3 matrix from the given quaternion
+ *
+ * @param {mat3} out mat3 receiving operation result
+ * @param {ReadonlyQuat} q Quaternion to create matrix from
+ *
+ * @returns {mat3} out
+ */
+export function fromQuat(out: mat3, q: ReadonlyQuat): mat3 {
+ let x = q[0],
+ y = q[1],
+ z = q[2],
+ w = q[3];
+ let x2 = x + x;
+ let y2 = y + y;
+ let z2 = z + z;
+
+ let xx = x * x2;
+ let yx = y * x2;
+ let yy = y * y2;
+ let zx = z * x2;
+ let zy = z * y2;
+ let zz = z * z2;
+ let wx = w * x2;
+ let wy = w * y2;
+ let wz = w * z2;
+
+ out[0] = 1 - yy - zz;
+ out[3] = yx - wz;
+ out[6] = zx + wy;
+
+ out[1] = yx + wz;
+ out[4] = 1 - xx - zz;
+ out[7] = zy - wx;
+
+ out[2] = zx - wy;
+ out[5] = zy + wx;
+ out[8] = 1 - xx - yy;
+
+ return out;
+}
+
+/**
+ * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix
+ *
+ * @param {mat3} out mat3 receiving operation result
+ * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from
+ *
+ * @returns {mat3} out
+ */
+export function normalFromMat4(out: mat3, a: ReadonlyMat4): mat3 | null {
+ let a00 = a[0],
+ a01 = a[1],
+ a02 = a[2],
+ a03 = a[3];
+ let a10 = a[4],
+ a11 = a[5],
+ a12 = a[6],
+ a13 = a[7];
+ let a20 = a[8],
+ a21 = a[9],
+ a22 = a[10],
+ a23 = a[11];
+ let a30 = a[12],
+ a31 = a[13],
+ a32 = a[14],
+ a33 = a[15];
+
+ let b00 = a00 * a11 - a01 * a10;
+ let b01 = a00 * a12 - a02 * a10;
+ let b02 = a00 * a13 - a03 * a10;
+ let b03 = a01 * a12 - a02 * a11;
+ let b04 = a01 * a13 - a03 * a11;
+ let b05 = a02 * a13 - a03 * a12;
+ let b06 = a20 * a31 - a21 * a30;
+ let b07 = a20 * a32 - a22 * a30;
+ let b08 = a20 * a33 - a23 * a30;
+ let b09 = a21 * a32 - a22 * a31;
+ let b10 = a21 * a33 - a23 * a31;
+ let b11 = a22 * a33 - a23 * a32;
+
+ // Calculate the determinant
+ let det =
+ b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
+
+ if (!det) {
+ return null;
+ }
+ det = 1.0 / det;
+
+ out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
+ out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
+ out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
+
+ out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
+ out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
+ out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
+
+ out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
+ out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
+ out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
+
+ return out;
+}
+
+/**
+ * Generates a 2D projection matrix with the given bounds
+ *
+ * @param {mat3} out mat3 frustum matrix will be written into
+ * @param {number} width Width of your gl context
+ * @param {number} height Height of gl context
+ * @returns {mat3} out
+ */
+export function projection(out: mat3, width: f64, height: f64): mat3 {
+ out[0] = 2 / width;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = -2 / height;
+ out[5] = 0;
+ out[6] = -1;
+ out[7] = 1;
+ out[8] = 1;
+ return out;
+}
+
+/**
+ * Returns a string representation of a mat3
+ *
+ * @param {ReadonlyMat3} a matrix to represent as a string
+ * @returns {String} string representation of the matrix
+ */
+export function str(a: ReadonlyMat3): string {
+ return (
+ "mat3(" +
+ a[0].toString() +
+ ", " +
+ a[1].toString() +
+ ", " +
+ a[2].toString() +
+ ", " +
+ a[3].toString() +
+ ", " +
+ a[4].toString() +
+ ", " +
+ a[5].toString() +
+ ", " +
+ a[6].toString() +
+ ", " +
+ a[7].toString() +
+ ", " +
+ a[8].toString() +
+ ")"
+ );
+}
+
+/**
+ * Returns Frobenius norm of a mat3
+ *
+ * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of
+ * @returns {Number} Frobenius norm
+ */
+export function frob(a: ReadonlyMat3): f64 {
+ return Maths.hypot9(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);
+}
+
+/**
+ * Adds two mat3's
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {ReadonlyMat3} a the first operand
+ * @param {ReadonlyMat3} b the second operand
+ * @returns {mat3} out
+ */
+export function add(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3 {
+ out[0] = a[0] + b[0];
+ out[1] = a[1] + b[1];
+ out[2] = a[2] + b[2];
+ out[3] = a[3] + b[3];
+ out[4] = a[4] + b[4];
+ out[5] = a[5] + b[5];
+ out[6] = a[6] + b[6];
+ out[7] = a[7] + b[7];
+ out[8] = a[8] + b[8];
+ return out;
+}
+
+/**
+ * Subtracts matrix b from matrix a
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {ReadonlyMat3} a the first operand
+ * @param {ReadonlyMat3} b the second operand
+ * @returns {mat3} out
+ */
+export function subtract(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3 {
+ out[0] = a[0] - b[0];
+ out[1] = a[1] - b[1];
+ out[2] = a[2] - b[2];
+ out[3] = a[3] - b[3];
+ out[4] = a[4] - b[4];
+ out[5] = a[5] - b[5];
+ out[6] = a[6] - b[6];
+ out[7] = a[7] - b[7];
+ out[8] = a[8] - b[8];
+ return out;
+}
+
+/**
+ * Multiply each element of the matrix by a scalar.
+ *
+ * @param {mat3} out the receiving matrix
+ * @param {ReadonlyMat3} a the matrix to scale
+ * @param {Number} b amount to scale the matrix's elements by
+ * @returns {mat3} out
+ */
+export function multiplyScalar(out: mat3, a: ReadonlyMat3, b: f64): mat3 {
+ out[0] = a[0] * b;
+ out[1] = a[1] * b;
+ out[2] = a[2] * b;
+ out[3] = a[3] * b;
+ out[4] = a[4] * b;
+ out[5] = a[5] * b;
+ out[6] = a[6] * b;
+ out[7] = a[7] * b;
+ out[8] = a[8] * b;
+ return out;
+}
+
+/**
+ * Adds two mat3's after multiplying each element of the second operand by a scalar value.
+ *
+ * @param {mat3} out the receiving vector
+ * @param {ReadonlyMat3} a the first operand
+ * @param {ReadonlyMat3} b the second operand
+ * @param {Number} scale the amount to scale b's elements by before adding
+ * @returns {mat3} out
+ */
+export function multiplyScalarAndAdd(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3, scale: f64): mat3 {
+ out[0] = a[0] + b[0] * scale;
+ out[1] = a[1] + b[1] * scale;
+ out[2] = a[2] + b[2] * scale;
+ out[3] = a[3] + b[3] * scale;
+ out[4] = a[4] + b[4] * scale;
+ out[5] = a[5] + b[5] * scale;
+ out[6] = a[6] + b[6] * scale;
+ out[7] = a[7] + b[7] * scale;
+ out[8] = a[8] + b[8] * scale;
+ return out;
+}
+
+/**
+ * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
+ *
+ * @param {ReadonlyMat3} a The first matrix.
+ * @param {ReadonlyMat3} b The second matrix.
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
+ */
+export function exactEquals(a: ReadonlyMat3, b: ReadonlyMat3): bool {
+ return (
+ a[0] === b[0] &&
+ a[1] === b[1] &&
+ a[2] === b[2] &&
+ a[3] === b[3] &&
+ a[4] === b[4] &&
+ a[5] === b[5] &&
+ a[6] === b[6] &&
+ a[7] === b[7] &&
+ a[8] === b[8]
+ );
+}
+
+/**
+ * Returns whether or not the matrices have approximately the same elements in the same position.
+ *
+ * @param {ReadonlyMat3} a The first matrix.
+ * @param {ReadonlyMat3} b The second matrix.
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
+ */
+export function equals(a: ReadonlyMat3, b: ReadonlyMat3): bool {
+ let a0 = a[0],
+ a1 = a[1],
+ a2 = a[2],
+ a3 = a[3],
+ a4 = a[4],
+ a5 = a[5],
+ a6 = a[6],
+ a7 = a[7],
+ a8 = a[8];
+ let b0 = b[0],
+ b1 = b[1],
+ b2 = b[2],
+ b3 = b[3],
+ b4 = b[4],
+ b5 = b[5],
+ b6 = b[6],
+ b7 = b[7],
+ b8 = b[8];
+ return (
+ Math.abs(a0 - b0) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) &&
+ Math.abs(a1 - b1) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) &&
+ Math.abs(a2 - b2) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) &&
+ Math.abs(a3 - b3) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) &&
+ Math.abs(a4 - b4) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) &&
+ Math.abs(a5 - b5) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) &&
+ Math.abs(a6 - b6) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) &&
+ Math.abs(a7 - b7) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) &&
+ Math.abs(a8 - b8) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a8), Math.abs(b8))
+ );
+}
+
+/**
+ * Alias for {@link mat3.multiply}
+ * @function
+ */
+export const mul = multiply;
+
+/**
+ * Alias for {@link mat3.subtract}
+ * @function
+ */
+export const sub = subtract;
diff --git a/assembly/mat4.ts b/assembly/mat4.ts
new file mode 100644
index 00000000..1661d78a
--- /dev/null
+++ b/assembly/mat4.ts
@@ -0,0 +1,2206 @@
+import * as glMatrix from "./common";
+import { IndexedCollection } from "./imports";
+import { Maths } from "./maths";
+import * as quat from "./quat";
+import { ReadonlyQuat2 } from "./quat2";
+import * as vec3 from "./vec3";
+
+export type quat4 = IndexedCollection;
+
+export type mat4 = IndexedCollection;
+
+export type ReadonlyMat4 = IndexedCollection;
+
+/**
+ * Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees
+ */
+export class Fov {
+ upDegrees: f64;
+ downDegrees: f64;
+ leftDegrees: f64;
+ rightDegrees: f64;
+ [key: string]: f64;
+}
+
+/**
+ * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied.
+ * @module mat4
+ */
+
+/**
+ * Creates a new identity mat4
+ *
+ * @returns {mat4} a new 4x4 matrix
+ */
+export function create(): mat4 {
+ let out = new Float64Array(16);
+ if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) {
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = 0;
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = 0;
+ out[9] = 0;
+ out[11] = 0;
+ out[12] = 0;
+ out[13] = 0;
+ out[14] = 0;
+ }
+ out[0] = 1;
+ out[5] = 1;
+ out[10] = 1;
+ out[15] = 1;
+ return out;
+}
+
+/**
+ * Creates a new mat4 initialized with values from an existing matrix
+ *
+ * @param {ReadonlyMat4} a matrix to clone
+ * @returns {mat4} a new 4x4 matrix
+ */
+export function clone(a: ReadonlyMat4): mat4 {
+ let out = new Float64Array(16);
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ out[3] = a[3];
+ out[4] = a[4];
+ out[5] = a[5];
+ out[6] = a[6];
+ out[7] = a[7];
+ out[8] = a[8];
+ out[9] = a[9];
+ out[10] = a[10];
+ out[11] = a[11];
+ out[12] = a[12];
+ out[13] = a[13];
+ out[14] = a[14];
+ out[15] = a[15];
+ return out;
+}
+
+/**
+ * Copy the values from one mat4 to another
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the source matrix
+ * @returns {mat4} out
+ */
+export function copy(out: mat4, a: ReadonlyMat4): mat4 {
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ out[3] = a[3];
+ out[4] = a[4];
+ out[5] = a[5];
+ out[6] = a[6];
+ out[7] = a[7];
+ out[8] = a[8];
+ out[9] = a[9];
+ out[10] = a[10];
+ out[11] = a[11];
+ out[12] = a[12];
+ out[13] = a[13];
+ out[14] = a[14];
+ out[15] = a[15];
+ return out;
+}
+
+/**
+ * Create a new mat4 with the given values
+ *
+ * @param {Number} m00 Component in column 0, row 0 position (index 0)
+ * @param {Number} m01 Component in column 0, row 1 position (index 1)
+ * @param {Number} m02 Component in column 0, row 2 position (index 2)
+ * @param {Number} m03 Component in column 0, row 3 position (index 3)
+ * @param {Number} m10 Component in column 1, row 0 position (index 4)
+ * @param {Number} m11 Component in column 1, row 1 position (index 5)
+ * @param {Number} m12 Component in column 1, row 2 position (index 6)
+ * @param {Number} m13 Component in column 1, row 3 position (index 7)
+ * @param {Number} m20 Component in column 2, row 0 position (index 8)
+ * @param {Number} m21 Component in column 2, row 1 position (index 9)
+ * @param {Number} m22 Component in column 2, row 2 position (index 10)
+ * @param {Number} m23 Component in column 2, row 3 position (index 11)
+ * @param {Number} m30 Component in column 3, row 0 position (index 12)
+ * @param {Number} m31 Component in column 3, row 1 position (index 13)
+ * @param {Number} m32 Component in column 3, row 2 position (index 14)
+ * @param {Number} m33 Component in column 3, row 3 position (index 15)
+ * @returns {mat4} A new mat4
+ */
+export function fromValues(
+ m00: f64,
+ m01: f64,
+ m02: f64,
+ m03: f64,
+ m10: f64,
+ m11: f64,
+ m12: f64,
+ m13: f64,
+ m20: f64,
+ m21: f64,
+ m22: f64,
+ m23: f64,
+ m30: f64,
+ m31: f64,
+ m32: f64,
+ m33: f64
+): mat4 {
+ let out = new Float64Array(16);
+ out[0] = m00;
+ out[1] = m01;
+ out[2] = m02;
+ out[3] = m03;
+ out[4] = m10;
+ out[5] = m11;
+ out[6] = m12;
+ out[7] = m13;
+ out[8] = m20;
+ out[9] = m21;
+ out[10] = m22;
+ out[11] = m23;
+ out[12] = m30;
+ out[13] = m31;
+ out[14] = m32;
+ out[15] = m33;
+ return out;
+}
+
+/**
+ * Set the components of a mat4 to the given values
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {Number} m00 Component in column 0, row 0 position (index 0)
+ * @param {Number} m01 Component in column 0, row 1 position (index 1)
+ * @param {Number} m02 Component in column 0, row 2 position (index 2)
+ * @param {Number} m03 Component in column 0, row 3 position (index 3)
+ * @param {Number} m10 Component in column 1, row 0 position (index 4)
+ * @param {Number} m11 Component in column 1, row 1 position (index 5)
+ * @param {Number} m12 Component in column 1, row 2 position (index 6)
+ * @param {Number} m13 Component in column 1, row 3 position (index 7)
+ * @param {Number} m20 Component in column 2, row 0 position (index 8)
+ * @param {Number} m21 Component in column 2, row 1 position (index 9)
+ * @param {Number} m22 Component in column 2, row 2 position (index 10)
+ * @param {Number} m23 Component in column 2, row 3 position (index 11)
+ * @param {Number} m30 Component in column 3, row 0 position (index 12)
+ * @param {Number} m31 Component in column 3, row 1 position (index 13)
+ * @param {Number} m32 Component in column 3, row 2 position (index 14)
+ * @param {Number} m33 Component in column 3, row 3 position (index 15)
+ * @returns {mat4} out
+ */
+export function set(
+ out: mat4,
+ m00: f64,
+ m01: f64,
+ m02: f64,
+ m03: f64,
+ m10: f64,
+ m11: f64,
+ m12: f64,
+ m13: f64,
+ m20: f64,
+ m21: f64,
+ m22: f64,
+ m23: f64,
+ m30: f64,
+ m31: f64,
+ m32: f64,
+ m33: f64
+): mat4 {
+ out[0] = m00;
+ out[1] = m01;
+ out[2] = m02;
+ out[3] = m03;
+ out[4] = m10;
+ out[5] = m11;
+ out[6] = m12;
+ out[7] = m13;
+ out[8] = m20;
+ out[9] = m21;
+ out[10] = m22;
+ out[11] = m23;
+ out[12] = m30;
+ out[13] = m31;
+ out[14] = m32;
+ out[15] = m33;
+ return out;
+}
+
+/**
+ * Set a mat4 to the identity matrix
+ *
+ * @param {mat4} out the receiving matrix
+ * @returns {mat4} out
+ */
+export function identity(out: mat4): mat4 {
+ out[0] = 1;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = 0;
+ out[5] = 1;
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = 0;
+ out[9] = 0;
+ out[10] = 1;
+ out[11] = 0;
+ out[12] = 0;
+ out[13] = 0;
+ out[14] = 0;
+ out[15] = 1;
+ return out;
+}
+
+/**
+ * Transpose the values of a mat4
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the source matrix
+ * @returns {mat4} out
+ */
+export function transpose(out: mat4, a: ReadonlyMat4): mat4 {
+ // If we are transposing ourselves we can skip a few steps but have to cache some values
+ if (out === a) {
+ let a01 = a[1],
+ a02 = a[2],
+ a03 = a[3];
+ let a12 = a[6],
+ a13 = a[7];
+ let a23 = a[11];
+
+ out[1] = a[4];
+ out[2] = a[8];
+ out[3] = a[12];
+ out[4] = a01;
+ out[6] = a[9];
+ out[7] = a[13];
+ out[8] = a02;
+ out[9] = a12;
+ out[11] = a[14];
+ out[12] = a03;
+ out[13] = a13;
+ out[14] = a23;
+ } else {
+ out[0] = a[0];
+ out[1] = a[4];
+ out[2] = a[8];
+ out[3] = a[12];
+ out[4] = a[1];
+ out[5] = a[5];
+ out[6] = a[9];
+ out[7] = a[13];
+ out[8] = a[2];
+ out[9] = a[6];
+ out[10] = a[10];
+ out[11] = a[14];
+ out[12] = a[3];
+ out[13] = a[7];
+ out[14] = a[11];
+ out[15] = a[15];
+ }
+
+ return out;
+}
+
+/**
+ * Inverts a mat4
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the source matrix
+ * @returns {mat4} out
+ */
+export function invert(out: mat4, a: ReadonlyMat4): mat4 | null {
+ let a00 = a[0],
+ a01 = a[1],
+ a02 = a[2],
+ a03 = a[3];
+ let a10 = a[4],
+ a11 = a[5],
+ a12 = a[6],
+ a13 = a[7];
+ let a20 = a[8],
+ a21 = a[9],
+ a22 = a[10],
+ a23 = a[11];
+ let a30 = a[12],
+ a31 = a[13],
+ a32 = a[14],
+ a33 = a[15];
+
+ let b00 = a00 * a11 - a01 * a10;
+ let b01 = a00 * a12 - a02 * a10;
+ let b02 = a00 * a13 - a03 * a10;
+ let b03 = a01 * a12 - a02 * a11;
+ let b04 = a01 * a13 - a03 * a11;
+ let b05 = a02 * a13 - a03 * a12;
+ let b06 = a20 * a31 - a21 * a30;
+ let b07 = a20 * a32 - a22 * a30;
+ let b08 = a20 * a33 - a23 * a30;
+ let b09 = a21 * a32 - a22 * a31;
+ let b10 = a21 * a33 - a23 * a31;
+ let b11 = a22 * a33 - a23 * a32;
+
+ // Calculate the determinant
+ let det =
+ b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
+
+ if (!det) {
+ return null;
+ }
+ det = 1.0 / det;
+
+ out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
+ out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
+ out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
+ out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;
+ out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
+ out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
+ out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
+ out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;
+ out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
+ out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
+ out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
+ out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;
+ out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;
+ out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;
+ out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;
+ out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;
+
+ return out;
+}
+
+/**
+ * Calculates the adjugate of a mat4
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the source matrix
+ * @returns {mat4} out
+ */
+export function adjoint(out: mat4, a: ReadonlyMat4): mat4 {
+ let a00 = a[0],
+ a01 = a[1],
+ a02 = a[2],
+ a03 = a[3];
+ let a10 = a[4],
+ a11 = a[5],
+ a12 = a[6],
+ a13 = a[7];
+ let a20 = a[8],
+ a21 = a[9],
+ a22 = a[10],
+ a23 = a[11];
+ let a30 = a[12],
+ a31 = a[13],
+ a32 = a[14],
+ a33 = a[15];
+
+ let b00 = a00 * a11 - a01 * a10;
+ let b01 = a00 * a12 - a02 * a10;
+ let b02 = a00 * a13 - a03 * a10;
+ let b03 = a01 * a12 - a02 * a11;
+ let b04 = a01 * a13 - a03 * a11;
+ let b05 = a02 * a13 - a03 * a12;
+ let b06 = a20 * a31 - a21 * a30;
+ let b07 = a20 * a32 - a22 * a30;
+ let b08 = a20 * a33 - a23 * a30;
+ let b09 = a21 * a32 - a22 * a31;
+ let b10 = a21 * a33 - a23 * a31;
+ let b11 = a22 * a33 - a23 * a32;
+
+ out[0] = a11 * b11 - a12 * b10 + a13 * b09;
+ out[1] = a02 * b10 - a01 * b11 - a03 * b09;
+ out[2] = a31 * b05 - a32 * b04 + a33 * b03;
+ out[3] = a22 * b04 - a21 * b05 - a23 * b03;
+ out[4] = a12 * b08 - a10 * b11 - a13 * b07;
+ out[5] = a00 * b11 - a02 * b08 + a03 * b07;
+ out[6] = a32 * b02 - a30 * b05 - a33 * b01;
+ out[7] = a20 * b05 - a22 * b02 + a23 * b01;
+ out[8] = a10 * b10 - a11 * b08 + a13 * b06;
+ out[9] = a01 * b08 - a00 * b10 - a03 * b06;
+ out[10] = a30 * b04 - a31 * b02 + a33 * b00;
+ out[11] = a21 * b02 - a20 * b04 - a23 * b00;
+ out[12] = a11 * b07 - a10 * b09 - a12 * b06;
+ out[13] = a00 * b09 - a01 * b07 + a02 * b06;
+ out[14] = a31 * b01 - a30 * b03 - a32 * b00;
+ out[15] = a20 * b03 - a21 * b01 + a22 * b00;
+ return out;
+}
+
+/**
+ * Calculates the determinant of a mat4
+ *
+ * @param {ReadonlyMat4} a the source matrix
+ * @returns {Number} determinant of a
+ */
+export function determinant(a: ReadonlyMat4): f64 {
+ let a00 = a[0],
+ a01 = a[1],
+ a02 = a[2],
+ a03 = a[3];
+ let a10 = a[4],
+ a11 = a[5],
+ a12 = a[6],
+ a13 = a[7];
+ let a20 = a[8],
+ a21 = a[9],
+ a22 = a[10],
+ a23 = a[11];
+ let a30 = a[12],
+ a31 = a[13],
+ a32 = a[14],
+ a33 = a[15];
+
+ let b0 = a00 * a11 - a01 * a10;
+ let b1 = a00 * a12 - a02 * a10;
+ let b2 = a01 * a12 - a02 * a11;
+ let b3 = a20 * a31 - a21 * a30;
+ let b4 = a20 * a32 - a22 * a30;
+ let b5 = a21 * a32 - a22 * a31;
+ let b6 = a00 * b5 - a01 * b4 + a02 * b3;
+ let b7 = a10 * b5 - a11 * b4 + a12 * b3;
+ let b8 = a20 * b2 - a21 * b1 + a22 * b0;
+ let b9 = a30 * b2 - a31 * b1 + a32 * b0;
+
+ // Calculate the determinant
+ return a13 * b6 - a03 * b7 + a33 * b8 - a23 * b9;
+}
+
+/**
+ * Multiplies two mat4s
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the first operand
+ * @param {ReadonlyMat4} b the second operand
+ * @returns {mat4} out
+ */
+export function multiply(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4 {
+ let a00 = a[0],
+ a01 = a[1],
+ a02 = a[2],
+ a03 = a[3];
+ let a10 = a[4],
+ a11 = a[5],
+ a12 = a[6],
+ a13 = a[7];
+ let a20 = a[8],
+ a21 = a[9],
+ a22 = a[10],
+ a23 = a[11];
+ let a30 = a[12],
+ a31 = a[13],
+ a32 = a[14],
+ a33 = a[15];
+
+ // Cache only the current line of the second matrix
+ let b0 = b[0],
+ b1 = b[1],
+ b2 = b[2],
+ b3 = b[3];
+ out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
+ out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
+ out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
+ out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
+
+ b0 = b[4];
+ b1 = b[5];
+ b2 = b[6];
+ b3 = b[7];
+ out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
+ out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
+ out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
+ out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
+
+ b0 = b[8];
+ b1 = b[9];
+ b2 = b[10];
+ b3 = b[11];
+ out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
+ out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
+ out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
+ out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
+
+ b0 = b[12];
+ b1 = b[13];
+ b2 = b[14];
+ b3 = b[15];
+ out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
+ out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
+ out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
+ out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
+ return out;
+}
+
+/**
+ * Translate a mat4 by the given vector
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the matrix to translate
+ * @param {ReadonlyVec3} v vector to translate by
+ * @returns {mat4} out
+ */
+export function translate(out: mat4, a: ReadonlyMat4, v: vec3.ReadonlyVec3): mat4 {
+ let x = v[0],
+ y = v[1],
+ z = v[2];
+ let a00: f64, a01: f64, a02: f64, a03: f64;
+ let a10: f64, a11: f64, a12: f64, a13: f64;
+ let a20: f64, a21: f64, a22: f64, a23: f64;
+
+ if (a === out) {
+ out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];
+ out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];
+ out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];
+ out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];
+ } else {
+ a00 = a[0];
+ a01 = a[1];
+ a02 = a[2];
+ a03 = a[3];
+ a10 = a[4];
+ a11 = a[5];
+ a12 = a[6];
+ a13 = a[7];
+ a20 = a[8];
+ a21 = a[9];
+ a22 = a[10];
+ a23 = a[11];
+
+ out[0] = a00;
+ out[1] = a01;
+ out[2] = a02;
+ out[3] = a03;
+ out[4] = a10;
+ out[5] = a11;
+ out[6] = a12;
+ out[7] = a13;
+ out[8] = a20;
+ out[9] = a21;
+ out[10] = a22;
+ out[11] = a23;
+
+ out[12] = a00 * x + a10 * y + a20 * z + a[12];
+ out[13] = a01 * x + a11 * y + a21 * z + a[13];
+ out[14] = a02 * x + a12 * y + a22 * z + a[14];
+ out[15] = a03 * x + a13 * y + a23 * z + a[15];
+ }
+
+ return out;
+}
+
+/**
+ * Scales the mat4 by the dimensions in the given vec3 not using vectorization
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the matrix to scale
+ * @param {ReadonlyVec3} v the vec3 to scale the matrix by
+ * @returns {mat4} out
+ **/
+export function scale(out: mat4, a: ReadonlyMat4, v: vec3.ReadonlyVec3): mat4 {
+ let x = v[0],
+ y = v[1],
+ z = v[2];
+
+ out[0] = a[0] * x;
+ out[1] = a[1] * x;
+ out[2] = a[2] * x;
+ out[3] = a[3] * x;
+ out[4] = a[4] * y;
+ out[5] = a[5] * y;
+ out[6] = a[6] * y;
+ out[7] = a[7] * y;
+ out[8] = a[8] * z;
+ out[9] = a[9] * z;
+ out[10] = a[10] * z;
+ out[11] = a[11] * z;
+ out[12] = a[12];
+ out[13] = a[13];
+ out[14] = a[14];
+ out[15] = a[15];
+ return out;
+}
+
+/**
+ * Rotates a mat4 by the given angle around the given axis
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the matrix to rotate
+ * @param {Number} rad the angle to rotate the matrix by
+ * @param {ReadonlyVec3} axis the axis to rotate around
+ * @returns {mat4} out
+ */
+export function rotate(out: mat4, a: ReadonlyMat4, rad: f64, axis: vec3.ReadonlyVec3): mat4 | null {
+ let x = axis[0],
+ y = axis[1],
+ z = axis[2];
+ let len = Maths.hypot3(x, y, z);
+ let s: f64, c: f64, t: f64;
+ let a00: f64, a01: f64, a02: f64, a03: f64;
+ let a10: f64, a11: f64, a12: f64, a13: f64;
+ let a20: f64, a21: f64, a22: f64, a23: f64;
+ let b00: f64, b01: f64, b02: f64;
+ let b10: f64, b11: f64, b12: f64;
+ let b20: f64, b21: f64, b22: f64;
+
+ if (len < glMatrix.EPSILON) {
+ return null;
+ }
+
+ len = 1 / len;
+ x *= len;
+ y *= len;
+ z *= len;
+
+ s = Math.sin(rad);
+ c = Math.cos(rad);
+ t = 1 - c;
+
+ a00 = a[0];
+ a01 = a[1];
+ a02 = a[2];
+ a03 = a[3];
+ a10 = a[4];
+ a11 = a[5];
+ a12 = a[6];
+ a13 = a[7];
+ a20 = a[8];
+ a21 = a[9];
+ a22 = a[10];
+ a23 = a[11];
+
+ // Construct the elements of the rotation matrix
+ b00 = x * x * t + c;
+ b01 = y * x * t + z * s;
+ b02 = z * x * t - y * s;
+ b10 = x * y * t - z * s;
+ b11 = y * y * t + c;
+ b12 = z * y * t + x * s;
+ b20 = x * z * t + y * s;
+ b21 = y * z * t - x * s;
+ b22 = z * z * t + c;
+
+ // Perform rotation-specific matrix multiplication
+ out[0] = a00 * b00 + a10 * b01 + a20 * b02;
+ out[1] = a01 * b00 + a11 * b01 + a21 * b02;
+ out[2] = a02 * b00 + a12 * b01 + a22 * b02;
+ out[3] = a03 * b00 + a13 * b01 + a23 * b02;
+ out[4] = a00 * b10 + a10 * b11 + a20 * b12;
+ out[5] = a01 * b10 + a11 * b11 + a21 * b12;
+ out[6] = a02 * b10 + a12 * b11 + a22 * b12;
+ out[7] = a03 * b10 + a13 * b11 + a23 * b12;
+ out[8] = a00 * b20 + a10 * b21 + a20 * b22;
+ out[9] = a01 * b20 + a11 * b21 + a21 * b22;
+ out[10] = a02 * b20 + a12 * b21 + a22 * b22;
+ out[11] = a03 * b20 + a13 * b21 + a23 * b22;
+
+ if (a !== out) {
+ // If the source and destination differ, copy the unchanged last row
+ out[12] = a[12];
+ out[13] = a[13];
+ out[14] = a[14];
+ out[15] = a[15];
+ }
+ return out;
+}
+
+/**
+ * Rotates a matrix by the given angle around the X axis
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the matrix to rotate
+ * @param {Number} rad the angle to rotate the matrix by
+ * @returns {mat4} out
+ */
+export function rotateX(out: mat4, a: ReadonlyMat4, rad: f64): mat4 {
+ let s = Math.sin(rad);
+ let c = Math.cos(rad);
+ let a10 = a[4];
+ let a11 = a[5];
+ let a12 = a[6];
+ let a13 = a[7];
+ let a20 = a[8];
+ let a21 = a[9];
+ let a22 = a[10];
+ let a23 = a[11];
+
+ if (a !== out) {
+ // If the source and destination differ, copy the unchanged rows
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ out[3] = a[3];
+ out[12] = a[12];
+ out[13] = a[13];
+ out[14] = a[14];
+ out[15] = a[15];
+ }
+
+ // Perform axis-specific matrix multiplication
+ out[4] = a10 * c + a20 * s;
+ out[5] = a11 * c + a21 * s;
+ out[6] = a12 * c + a22 * s;
+ out[7] = a13 * c + a23 * s;
+ out[8] = a20 * c - a10 * s;
+ out[9] = a21 * c - a11 * s;
+ out[10] = a22 * c - a12 * s;
+ out[11] = a23 * c - a13 * s;
+ return out;
+}
+
+/**
+ * Rotates a matrix by the given angle around the Y axis
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the matrix to rotate
+ * @param {Number} rad the angle to rotate the matrix by
+ * @returns {mat4} out
+ */
+export function rotateY(out: mat4, a: ReadonlyMat4, rad: f64): mat4 {
+ let s = Math.sin(rad);
+ let c = Math.cos(rad);
+ let a00 = a[0];
+ let a01 = a[1];
+ let a02 = a[2];
+ let a03 = a[3];
+ let a20 = a[8];
+ let a21 = a[9];
+ let a22 = a[10];
+ let a23 = a[11];
+
+ if (a !== out) {
+ // If the source and destination differ, copy the unchanged rows
+ out[4] = a[4];
+ out[5] = a[5];
+ out[6] = a[6];
+ out[7] = a[7];
+ out[12] = a[12];
+ out[13] = a[13];
+ out[14] = a[14];
+ out[15] = a[15];
+ }
+
+ // Perform axis-specific matrix multiplication
+ out[0] = a00 * c - a20 * s;
+ out[1] = a01 * c - a21 * s;
+ out[2] = a02 * c - a22 * s;
+ out[3] = a03 * c - a23 * s;
+ out[8] = a00 * s + a20 * c;
+ out[9] = a01 * s + a21 * c;
+ out[10] = a02 * s + a22 * c;
+ out[11] = a03 * s + a23 * c;
+ return out;
+}
+
+/**
+ * Rotates a matrix by the given angle around the Z axis
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the matrix to rotate
+ * @param {Number} rad the angle to rotate the matrix by
+ * @returns {mat4} out
+ */
+export function rotateZ(out: mat4, a: ReadonlyMat4, rad: f64): mat4 {
+ let s = Math.sin(rad);
+ let c = Math.cos(rad);
+ let a00 = a[0];
+ let a01 = a[1];
+ let a02 = a[2];
+ let a03 = a[3];
+ let a10 = a[4];
+ let a11 = a[5];
+ let a12 = a[6];
+ let a13 = a[7];
+
+ if (a !== out) {
+ // If the source and destination differ, copy the unchanged last row
+ out[8] = a[8];
+ out[9] = a[9];
+ out[10] = a[10];
+ out[11] = a[11];
+ out[12] = a[12];
+ out[13] = a[13];
+ out[14] = a[14];
+ out[15] = a[15];
+ }
+
+ // Perform axis-specific matrix multiplication
+ out[0] = a00 * c + a10 * s;
+ out[1] = a01 * c + a11 * s;
+ out[2] = a02 * c + a12 * s;
+ out[3] = a03 * c + a13 * s;
+ out[4] = a10 * c - a00 * s;
+ out[5] = a11 * c - a01 * s;
+ out[6] = a12 * c - a02 * s;
+ out[7] = a13 * c - a03 * s;
+ return out;
+}
+
+/**
+ * Creates a matrix from a vector translation
+ * This is equivalent to (but much faster than):
+ *
+ * mat4.identity(dest);
+ * mat4.translate(dest, dest, vec);
+ *
+ * @param {mat4} out mat4 receiving operation result
+ * @param {ReadonlyVec3} v Translation vector
+ * @returns {mat4} out
+ */
+export function fromTranslation(out: mat4, v: vec3.ReadonlyVec3): mat4 {
+ out[0] = 1;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = 0;
+ out[5] = 1;
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = 0;
+ out[9] = 0;
+ out[10] = 1;
+ out[11] = 0;
+ out[12] = v[0];
+ out[13] = v[1];
+ out[14] = v[2];
+ out[15] = 1;
+ return out;
+}
+
+/**
+ * Creates a matrix from a vector scaling
+ * This is equivalent to (but much faster than):
+ *
+ * mat4.identity(dest);
+ * mat4.scale(dest, dest, vec);
+ *
+ * @param {mat4} out mat4 receiving operation result
+ * @param {ReadonlyVec3} v Scaling vector
+ * @returns {mat4} out
+ */
+export function fromScaling(out: mat4, v: vec3.ReadonlyVec3): mat4 {
+ out[0] = v[0];
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = 0;
+ out[5] = v[1];
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = 0;
+ out[9] = 0;
+ out[10] = v[2];
+ out[11] = 0;
+ out[12] = 0;
+ out[13] = 0;
+ out[14] = 0;
+ out[15] = 1;
+ return out;
+}
+
+/**
+ * Creates a matrix from a given angle around a given axis
+ * This is equivalent to (but much faster than):
+ *
+ * mat4.identity(dest);
+ * mat4.rotate(dest, dest, rad: f64, axis: vec3.ReadonlyVec3);
+ *
+ * @param {mat4} out mat4 receiving operation result
+ * @param {Number} rad the angle to rotate the matrix by
+ * @param {ReadonlyVec3} axis the axis to rotate around
+ * @returns {mat4} out
+ */
+export function fromRotation(out: mat4, rad: f64, axis: vec3.ReadonlyVec3): mat4 | null {
+ let x = axis[0],
+ y = axis[1],
+ z = axis[2];
+ let len = Maths.hypot3(x, y, z);
+ let s: f64, c: f64, t: f64;
+
+ if (len < glMatrix.EPSILON) {
+ return null;
+ }
+
+ len = 1 / len;
+ x *= len;
+ y *= len;
+ z *= len;
+
+ s = Math.sin(rad);
+ c = Math.cos(rad);
+ t = 1 - c;
+
+ // Perform rotation-specific matrix multiplication
+ out[0] = x * x * t + c;
+ out[1] = y * x * t + z * s;
+ out[2] = z * x * t - y * s;
+ out[3] = 0;
+ out[4] = x * y * t - z * s;
+ out[5] = y * y * t + c;
+ out[6] = z * y * t + x * s;
+ out[7] = 0;
+ out[8] = x * z * t + y * s;
+ out[9] = y * z * t - x * s;
+ out[10] = z * z * t + c;
+ out[11] = 0;
+ out[12] = 0;
+ out[13] = 0;
+ out[14] = 0;
+ out[15] = 1;
+ return out;
+}
+
+/**
+ * Creates a matrix from the given angle around the X axis
+ * This is equivalent to (but much faster than):
+ *
+ * mat4.identity(dest);
+ * mat4.rotateX(dest, dest, rad);
+ *
+ * @param {mat4} out mat4 receiving operation result
+ * @param {Number} rad the angle to rotate the matrix by
+ * @returns {mat4} out
+ */
+export function fromXRotation(out: mat4, rad: f64): mat4 {
+ let s = Math.sin(rad);
+ let c = Math.cos(rad);
+
+ // Perform axis-specific matrix multiplication
+ out[0] = 1;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = 0;
+ out[5] = c;
+ out[6] = s;
+ out[7] = 0;
+ out[8] = 0;
+ out[9] = -s;
+ out[10] = c;
+ out[11] = 0;
+ out[12] = 0;
+ out[13] = 0;
+ out[14] = 0;
+ out[15] = 1;
+ return out;
+}
+
+/**
+ * Creates a matrix from the given angle around the Y axis
+ * This is equivalent to (but much faster than):
+ *
+ * mat4.identity(dest);
+ * mat4.rotateY(dest, dest, rad);
+ *
+ * @param {mat4} out mat4 receiving operation result
+ * @param {Number} rad the angle to rotate the matrix by
+ * @returns {mat4} out
+ */
+export function fromYRotation(out: mat4, rad: f64): mat4 {
+ let s = Math.sin(rad);
+ let c = Math.cos(rad);
+
+ // Perform axis-specific matrix multiplication
+ out[0] = c;
+ out[1] = 0;
+ out[2] = -s;
+ out[3] = 0;
+ out[4] = 0;
+ out[5] = 1;
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = s;
+ out[9] = 0;
+ out[10] = c;
+ out[11] = 0;
+ out[12] = 0;
+ out[13] = 0;
+ out[14] = 0;
+ out[15] = 1;
+ return out;
+}
+
+/**
+ * Creates a matrix from the given angle around the Z axis
+ * This is equivalent to (but much faster than):
+ *
+ * mat4.identity(dest);
+ * mat4.rotateZ(dest, dest, rad);
+ *
+ * @param {mat4} out mat4 receiving operation result
+ * @param {Number} rad the angle to rotate the matrix by
+ * @returns {mat4} out
+ */
+export function fromZRotation(out: mat4, rad: f64): mat4 {
+ let s = Math.sin(rad);
+ let c = Math.cos(rad);
+
+ // Perform axis-specific matrix multiplication
+ out[0] = c;
+ out[1] = s;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = -s;
+ out[5] = c;
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = 0;
+ out[9] = 0;
+ out[10] = 1;
+ out[11] = 0;
+ out[12] = 0;
+ out[13] = 0;
+ out[14] = 0;
+ out[15] = 1;
+ return out;
+}
+
+/**
+ * Creates a matrix from a quaternion rotation and vector translation
+ * This is equivalent to (but much faster than):
+ *
+ * mat4.identity(dest);
+ * mat4.translate(dest, vec);
+ * let quatMat = mat4.create();
+ * quat4.toMat4(quat, quatMat);
+ * mat4.multiply(dest, quatMat);
+ *
+ * @param {mat4} out mat4 receiving operation result
+ * @param {quat4} q Rotation quaternion
+ * @param {ReadonlyVec3} v Translation vector
+ * @returns {mat4} out
+ */
+export function fromRotationTranslation(out: mat4, q: quat4, v: vec3.ReadonlyVec3): mat4 {
+ // Quaternion math
+ let x = q[0],
+ y = q[1],
+ z = q[2],
+ w = q[3];
+ let x2 = x + x;
+ let y2 = y + y;
+ let z2 = z + z;
+
+ let xx = x * x2;
+ let xy = x * y2;
+ let xz = x * z2;
+ let yy = y * y2;
+ let yz = y * z2;
+ let zz = z * z2;
+ let wx = w * x2;
+ let wy = w * y2;
+ let wz = w * z2;
+
+ out[0] = 1 - (yy + zz);
+ out[1] = xy + wz;
+ out[2] = xz - wy;
+ out[3] = 0;
+ out[4] = xy - wz;
+ out[5] = 1 - (xx + zz);
+ out[6] = yz + wx;
+ out[7] = 0;
+ out[8] = xz + wy;
+ out[9] = yz - wx;
+ out[10] = 1 - (xx + yy);
+ out[11] = 0;
+ out[12] = v[0];
+ out[13] = v[1];
+ out[14] = v[2];
+ out[15] = 1;
+
+ return out;
+}
+
+/**
+ * Creates a new mat4 from a dual quat.
+ *
+ * @param {mat4} out Matrix
+ * @param {ReadonlyQuat2} a Dual Quaternion
+ * @returns {mat4} mat4 receiving operation result
+ */
+export function fromQuat2(out: mat4, a: ReadonlyQuat2): mat4 {
+ let translation = new Float64Array(3);
+ let bx = -a[0],
+ by = -a[1],
+ bz = -a[2],
+ bw = a[3],
+ ax = a[4],
+ ay = a[5],
+ az = a[6],
+ aw = a[7];
+
+ let magnitude = bx * bx + by * by + bz * bz + bw * bw;
+ //Only scale if it makes sense
+ if (magnitude > 0) {
+ translation[0] = ((ax * bw + aw * bx + ay * bz - az * by) * 2) / magnitude;
+ translation[1] = ((ay * bw + aw * by + az * bx - ax * bz) * 2) / magnitude;
+ translation[2] = ((az * bw + aw * bz + ax * by - ay * bx) * 2) / magnitude;
+ } else {
+ translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;
+ translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;
+ translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;
+ }
+ fromRotationTranslation(out, a, translation);
+ return out;
+}
+
+/**
+ * Returns the translation vector component of a transformation
+ * matrix. If a matrix is built with fromRotationTranslation,
+ * the returned vector will be the same as the translation vector
+ * originally supplied.
+ * @param {vec3} out Vector to receive translation component
+ * @param {ReadonlyMat4} mat Matrix to be decomposed (input)
+ * @return {vec3} out
+ */
+export function getTranslation(out: vec3.vec3, mat: ReadonlyMat4): vec3.vec3 {
+ out[0] = mat[12];
+ out[1] = mat[13];
+ out[2] = mat[14];
+
+ return out;
+}
+
+/**
+ * Returns the scaling factor component of a transformation
+ * matrix. If a matrix is built with fromRotationTranslationScale
+ * with a normalized Quaternion paramter, the returned vector will be
+ * the same as the scaling vector
+ * originally supplied.
+ * @param {vec3} out Vector to receive scaling factor component
+ * @param {ReadonlyMat4} mat Matrix to be decomposed (input)
+ * @return {vec3} out
+ */
+export function getScaling(out: mat4, mat: ReadonlyMat4): mat4 {
+ let m11 = mat[0];
+ let m12 = mat[1];
+ let m13 = mat[2];
+ let m21 = mat[4];
+ let m22 = mat[5];
+ let m23 = mat[6];
+ let m31 = mat[8];
+ let m32 = mat[9];
+ let m33 = mat[10];
+
+ out[0] = Maths.hypot3(m11, m12, m13);
+ out[1] = Maths.hypot3(m21, m22, m23);
+ out[2] = Maths.hypot3(m31, m32, m33);
+
+ return out;
+}
+
+/**
+ * Returns a quaternion representing the rotational component
+ * of a transformation matrix. If a matrix is built with
+ * fromRotationTranslation, the returned quaternion will be the
+ * same as the quaternion originally supplied.
+ * @param {quat} out Quaternion to receive the rotation component
+ * @param {ReadonlyMat4} mat Matrix to be decomposed (input)
+ * @return {quat} out
+ */
+export function getRotation(out: mat4, mat: ReadonlyMat4): mat4 {
+ let scaling = changetype(new Float64Array(3));
+ getScaling(scaling, mat);
+
+ let is1 = 1 / scaling[0];
+ let is2 = 1 / scaling[1];
+ let is3 = 1 / scaling[2];
+
+ let sm11 = mat[0] * is1;
+ let sm12 = mat[1] * is2;
+ let sm13 = mat[2] * is3;
+ let sm21 = mat[4] * is1;
+ let sm22 = mat[5] * is2;
+ let sm23 = mat[6] * is3;
+ let sm31 = mat[8] * is1;
+ let sm32 = mat[9] * is2;
+ let sm33 = mat[10] * is3;
+
+ let trace = sm11 + sm22 + sm33;
+ let S: f64 = 0;
+
+ if (trace > 0) {
+ S = Math.sqrt(trace + 1.0) * 2;
+ out[3] = 0.25 * S;
+ out[0] = (sm23 - sm32) / S;
+ out[1] = (sm31 - sm13) / S;
+ out[2] = (sm12 - sm21) / S;
+ } else if (sm11 > sm22 && sm11 > sm33) {
+ S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;
+ out[3] = (sm23 - sm32) / S;
+ out[0] = 0.25 * S;
+ out[1] = (sm12 + sm21) / S;
+ out[2] = (sm31 + sm13) / S;
+ } else if (sm22 > sm33) {
+ S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;
+ out[3] = (sm31 - sm13) / S;
+ out[0] = (sm12 + sm21) / S;
+ out[1] = 0.25 * S;
+ out[2] = (sm23 + sm32) / S;
+ } else {
+ S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;
+ out[3] = (sm12 - sm21) / S;
+ out[0] = (sm31 + sm13) / S;
+ out[1] = (sm23 + sm32) / S;
+ out[2] = 0.25 * S;
+ }
+
+ return out;
+}
+
+/**
+ * Decomposes a transformation matrix into its rotation, translation
+ * and scale components. Returns only the rotation component
+ * @param {quat} out_r Quaternion to receive the rotation component
+ * @param {vec3} out_t Vector to receive the translation vector
+ * @param {vec3} out_s Vector to receive the scaling factor
+ * @param {ReadonlyMat4} mat Matrix to be decomposed (input)
+ * @returns {quat} out_r
+ */
+export function decompose(out_r: quat.quat, out_t: vec3.vec3, out_s: vec3.vec3, mat: ReadonlyMat4): quat.quat {
+ out_t[0] = mat[12];
+ out_t[1] = mat[13];
+ out_t[2] = mat[14];
+
+ let m11 = mat[0];
+ let m12 = mat[1];
+ let m13 = mat[2];
+ let m21 = mat[4];
+ let m22 = mat[5];
+ let m23 = mat[6];
+ let m31 = mat[8];
+ let m32 = mat[9];
+ let m33 = mat[10];
+
+ out_s[0] = Maths.hypot3(m11, m12, m13);
+ out_s[1] = Maths.hypot3(m21, m22, m23);
+ out_s[2] = Maths.hypot3(m31, m32, m33);
+
+ let is1 = 1 / out_s[0];
+ let is2 = 1 / out_s[1];
+ let is3 = 1 / out_s[2];
+
+ let sm11 = m11 * is1;
+ let sm12 = m12 * is2;
+ let sm13 = m13 * is3;
+ let sm21 = m21 * is1;
+ let sm22 = m22 * is2;
+ let sm23 = m23 * is3;
+ let sm31 = m31 * is1;
+ let sm32 = m32 * is2;
+ let sm33 = m33 * is3;
+
+ let trace = sm11 + sm22 + sm33;
+ let S: f64 = 0;
+
+ if (trace > 0) {
+ S = Math.sqrt(trace + 1.0) * 2;
+ out_r[3] = 0.25 * S;
+ out_r[0] = (sm23 - sm32) / S;
+ out_r[1] = (sm31 - sm13) / S;
+ out_r[2] = (sm12 - sm21) / S;
+ } else if (sm11 > sm22 && sm11 > sm33) {
+ S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;
+ out_r[3] = (sm23 - sm32) / S;
+ out_r[0] = 0.25 * S;
+ out_r[1] = (sm12 + sm21) / S;
+ out_r[2] = (sm31 + sm13) / S;
+ } else if (sm22 > sm33) {
+ S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;
+ out_r[3] = (sm31 - sm13) / S;
+ out_r[0] = (sm12 + sm21) / S;
+ out_r[1] = 0.25 * S;
+ out_r[2] = (sm23 + sm32) / S;
+ } else {
+ S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;
+ out_r[3] = (sm12 - sm21) / S;
+ out_r[0] = (sm31 + sm13) / S;
+ out_r[1] = (sm23 + sm32) / S;
+ out_r[2] = 0.25 * S;
+ }
+
+ return out_r;
+}
+
+/**
+ * Creates a matrix from a quaternion rotation, vector translation and vector scale
+ * This is equivalent to (but much faster than):
+ *
+ * mat4.identity(dest);
+ * mat4.translate(dest, vec);
+ * let quatMat = mat4.create();
+ * quat4.toMat4(quat, quatMat);
+ * mat4.multiply(dest, quatMat);
+ * mat4.scale(dest, scale)
+ *
+ * @param {mat4} out mat4 receiving operation result
+ * @param {quat4} q Rotation quaternion
+ * @param {ReadonlyVec3} v Translation vector
+ * @param {ReadonlyVec3} s Scaling vector
+ * @returns {mat4} out
+ */
+export function fromRotationTranslationScale(out: mat4, q: quat4, v: vec3.ReadonlyVec3, s: vec3.ReadonlyVec3): mat4 {
+ // Quaternion math
+ let x = q[0],
+ y = q[1],
+ z = q[2],
+ w = q[3];
+ let x2 = x + x;
+ let y2 = y + y;
+ let z2 = z + z;
+
+ let xx = x * x2;
+ let xy = x * y2;
+ let xz = x * z2;
+ let yy = y * y2;
+ let yz = y * z2;
+ let zz = z * z2;
+ let wx = w * x2;
+ let wy = w * y2;
+ let wz = w * z2;
+ let sx = s[0];
+ let sy = s[1];
+ let sz = s[2];
+
+ out[0] = (1 - (yy + zz)) * sx;
+ out[1] = (xy + wz) * sx;
+ out[2] = (xz - wy) * sx;
+ out[3] = 0;
+ out[4] = (xy - wz) * sy;
+ out[5] = (1 - (xx + zz)) * sy;
+ out[6] = (yz + wx) * sy;
+ out[7] = 0;
+ out[8] = (xz + wy) * sz;
+ out[9] = (yz - wx) * sz;
+ out[10] = (1 - (xx + yy)) * sz;
+ out[11] = 0;
+ out[12] = v[0];
+ out[13] = v[1];
+ out[14] = v[2];
+ out[15] = 1;
+
+ return out;
+}
+
+/**
+ * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin
+ * This is equivalent to (but much faster than):
+ *
+ * mat4.identity(dest);
+ * mat4.translate(dest, vec);
+ * mat4.translate(dest, origin);
+ * let quatMat = mat4.create();
+ * quat4.toMat4(quat, quatMat);
+ * mat4.multiply(dest, quatMat);
+ * mat4.scale(dest, scale)
+ * mat4.translate(dest, negativeOrigin);
+ *
+ * @param {mat4} out mat4 receiving operation result
+ * @param {quat4} q Rotation quaternion
+ * @param {ReadonlyVec3} v Translation vector
+ * @param {ReadonlyVec3} s Scaling vector
+ * @param {ReadonlyVec3} o The origin vector around which to scale and rotate
+ * @returns {mat4} out
+ */
+export function fromRotationTranslationScaleOrigin(out: mat4, q: quat4, v: vec3.ReadonlyVec3, s: vec3.ReadonlyVec3, o: vec3.ReadonlyVec3): mat4 {
+ // Quaternion math
+ let x = q[0],
+ y = q[1],
+ z = q[2],
+ w = q[3];
+ let x2 = x + x;
+ let y2 = y + y;
+ let z2 = z + z;
+
+ let xx = x * x2;
+ let xy = x * y2;
+ let xz = x * z2;
+ let yy = y * y2;
+ let yz = y * z2;
+ let zz = z * z2;
+ let wx = w * x2;
+ let wy = w * y2;
+ let wz = w * z2;
+
+ let sx = s[0];
+ let sy = s[1];
+ let sz = s[2];
+
+ let ox = o[0];
+ let oy = o[1];
+ let oz = o[2];
+
+ let out0 = (1 - (yy + zz)) * sx;
+ let out1 = (xy + wz) * sx;
+ let out2 = (xz - wy) * sx;
+ let out4 = (xy - wz) * sy;
+ let out5 = (1 - (xx + zz)) * sy;
+ let out6 = (yz + wx) * sy;
+ let out8 = (xz + wy) * sz;
+ let out9 = (yz - wx) * sz;
+ let out10 = (1 - (xx + yy)) * sz;
+
+ out[0] = out0;
+ out[1] = out1;
+ out[2] = out2;
+ out[3] = 0;
+ out[4] = out4;
+ out[5] = out5;
+ out[6] = out6;
+ out[7] = 0;
+ out[8] = out8;
+ out[9] = out9;
+ out[10] = out10;
+ out[11] = 0;
+ out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);
+ out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);
+ out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);
+ out[15] = 1;
+
+ return out;
+}
+
+/**
+ * Calculates a 4x4 matrix from the given quaternion
+ *
+ * @param {mat4} out mat4 receiving operation result
+ * @param {ReadonlyQuat} q Quaternion to create matrix from
+ *
+ * @returns {mat4} out
+ */
+export function fromQuat(out: mat4, q: quat.ReadonlyQuat): mat4 {
+ let x = q[0],
+ y = q[1],
+ z = q[2],
+ w = q[3];
+ let x2 = x + x;
+ let y2 = y + y;
+ let z2 = z + z;
+
+ let xx = x * x2;
+ let yx = y * x2;
+ let yy = y * y2;
+ let zx = z * x2;
+ let zy = z * y2;
+ let zz = z * z2;
+ let wx = w * x2;
+ let wy = w * y2;
+ let wz = w * z2;
+
+ out[0] = 1 - yy - zz;
+ out[1] = yx + wz;
+ out[2] = zx - wy;
+ out[3] = 0;
+
+ out[4] = yx - wz;
+ out[5] = 1 - xx - zz;
+ out[6] = zy + wx;
+ out[7] = 0;
+
+ out[8] = zx + wy;
+ out[9] = zy - wx;
+ out[10] = 1 - xx - yy;
+ out[11] = 0;
+
+ out[12] = 0;
+ out[13] = 0;
+ out[14] = 0;
+ out[15] = 1;
+
+ return out;
+}
+
+/**
+ * Generates a frustum matrix with the given bounds
+ *
+ * @param {mat4} out mat4 frustum matrix will be written into
+ * @param {Number} left Left bound of the frustum
+ * @param {Number} right Right bound of the frustum
+ * @param {Number} bottom Bottom bound of the frustum
+ * @param {Number} top Top bound of the frustum
+ * @param {Number} near Near bound of the frustum
+ * @param {Number} far Far bound of the frustum
+ * @returns {mat4} out
+ */
+export function frustum(out: mat4, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): mat4 {
+ let rl = 1 / (right - left);
+ let tb = 1 / (top - bottom);
+ let nf = 1 / (near - far);
+ out[0] = near * 2 * rl;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = 0;
+ out[5] = near * 2 * tb;
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = (right + left) * rl;
+ out[9] = (top + bottom) * tb;
+ out[10] = (far + near) * nf;
+ out[11] = -1;
+ out[12] = 0;
+ out[13] = 0;
+ out[14] = far * near * 2 * nf;
+ out[15] = 0;
+ return out;
+}
+
+/**
+ * Generates a perspective projection matrix with the given bounds.
+ * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],
+ * which matches WebGL/OpenGL's clip volume.
+ * Passing null/undefined/no value for far will generate infinite projection matrix.
+ *
+ * Read https://www.assemblyscript.org/types.html#type-rules
+ *
+ * @param {mat4} out mat4 frustum matrix will be written into
+ * @param {number} fovy Vertical field of view in radians
+ * @param {number} aspect Aspect ratio. typically viewport width/height
+ * @param {number} near Near bound of the frustum
+ * @param {number} far Far bound of the frustum, can be null or Infinity
+ * @returns {mat4} out
+ */
+export function perspectiveNO(out: mat4, fovy: f64, aspect: f64, near: f64, far: f64): mat4 {
+ const f = 1.0 / Math.tan(fovy / 2);
+ out[0] = f / aspect;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = 0;
+ out[5] = f;
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = 0;
+ out[9] = 0;
+ out[11] = -1;
+ out[12] = 0;
+ out[13] = 0;
+ out[15] = 0;
+ if (typeof far === "number" && far !== Infinity) {
+ const nf = 1 / (near - far);
+ out[10] = (far + near) * nf;
+ out[14] = 2 * far * near * nf;
+ } else {
+ out[10] = -1;
+ out[14] = -2 * near;
+ }
+ return out;
+}
+
+/**
+ * Alias for {@link mat4.perspectiveNO}
+ * @function
+ */
+export const perspective = perspectiveNO;
+
+/**
+ * Generates a perspective projection matrix suitable for WebGPU with the given bounds.
+ * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],
+ * which matches WebGPU/Vulkan/DirectX/Metal's clip volume.
+ * Passing null/undefined/no value for far will generate infinite projection matrix.
+ *
+ * Read https://www.assemblyscript.org/types.html#type-rules
+ *
+ * @param {mat4} out mat4 frustum matrix will be written into
+ * @param {number} fovy Vertical field of view in radians
+ * @param {number} aspect Aspect ratio. typically viewport width/height
+ * @param {number} near Near bound of the frustum
+ * @param {number} far Far bound of the frustum, can be null or Infinity
+ * @returns {mat4} out
+ */
+export function perspectiveZO(out: mat4, fovy: f64, aspect: f64, near: f64, far: f64): mat4 {
+ const f = 1.0 / Math.tan(fovy / 2);
+ out[0] = f / aspect;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = 0;
+ out[5] = f;
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = 0;
+ out[9] = 0;
+ out[11] = -1;
+ out[12] = 0;
+ out[13] = 0;
+ out[15] = 0;
+ if (typeof far === "number" && far !== Infinity) {
+ const nf = 1 / (near - far);
+ out[10] = far * nf;
+ out[14] = far * near * nf;
+ } else {
+ out[10] = -1;
+ out[14] = -near;
+ }
+ return out;
+}
+
+/**
+ * Generates a perspective projection matrix with the given field of view.
+ * This is primarily useful for generating projection matrices to be used
+ * with the still experiemental WebVR API.
+ *
+ * @param {mat4} out mat4 frustum matrix will be written into
+ * @param {Fov} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees
+ * @param {number} near Near bound of the frustum
+ * @param {number} far Far bound of the frustum
+ * @returns {mat4} out
+ */
+export function perspectiveFromFieldOfView(out: mat4, fov: Fov, near: f64, far: f64): mat4 {
+ let upTan = Math.tan((fov.upDegrees * Math.PI) / 180.0);
+ let downTan = Math.tan((fov.downDegrees * Math.PI) / 180.0);
+ let leftTan = Math.tan((fov.leftDegrees * Math.PI) / 180.0);
+ let rightTan = Math.tan((fov.rightDegrees * Math.PI) / 180.0);
+ let xScale = 2.0 / (leftTan + rightTan);
+ let yScale = 2.0 / (upTan + downTan);
+
+ out[0] = xScale;
+ out[1] = 0.0;
+ out[2] = 0.0;
+ out[3] = 0.0;
+ out[4] = 0.0;
+ out[5] = yScale;
+ out[6] = 0.0;
+ out[7] = 0.0;
+ out[8] = -((leftTan - rightTan) * xScale * 0.5);
+ out[9] = (upTan - downTan) * yScale * 0.5;
+ out[10] = far / (near - far);
+ out[11] = -1.0;
+ out[12] = 0.0;
+ out[13] = 0.0;
+ out[14] = (far * near) / (near - far);
+ out[15] = 0.0;
+ return out;
+}
+
+/**
+ * Generates a orthogonal projection matrix with the given bounds.
+ * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],
+ * which matches WebGL/OpenGL's clip volume.
+ *
+ * @param {mat4} out mat4 frustum matrix will be written into
+ * @param {number} left Left bound of the frustum
+ * @param {number} right Right bound of the frustum
+ * @param {number} bottom Bottom bound of the frustum
+ * @param {number} top Top bound of the frustum
+ * @param {number} near Near bound of the frustum
+ * @param {number} far Far bound of the frustum
+ * @returns {mat4} out
+ */
+export function orthoNO(out: mat4, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): mat4 {
+ const lr = 1 / (left - right);
+ const bt = 1 / (bottom - top);
+ const nf = 1 / (near - far);
+ out[0] = -2 * lr;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = 0;
+ out[5] = -2 * bt;
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = 0;
+ out[9] = 0;
+ out[10] = 2 * nf;
+ out[11] = 0;
+ out[12] = (left + right) * lr;
+ out[13] = (top + bottom) * bt;
+ out[14] = (far + near) * nf;
+ out[15] = 1;
+ return out;
+}
+
+/**
+ * Alias for {@link mat4.orthoNO}
+ * @function
+ */
+export const ortho = orthoNO;
+
+/**
+ * Generates a orthogonal projection matrix with the given bounds.
+ * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],
+ * which matches WebGPU/Vulkan/DirectX/Metal's clip volume.
+ *
+ * @param {mat4} out mat4 frustum matrix will be written into
+ * @param {number} left Left bound of the frustum
+ * @param {number} right Right bound of the frustum
+ * @param {number} bottom Bottom bound of the frustum
+ * @param {number} top Top bound of the frustum
+ * @param {number} near Near bound of the frustum
+ * @param {number} far Far bound of the frustum
+ * @returns {mat4} out
+ */
+export function orthoZO(out: mat4, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): mat4 {
+ const lr = 1 / (left - right);
+ const bt = 1 / (bottom - top);
+ const nf = 1 / (near - far);
+ out[0] = -2 * lr;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ out[4] = 0;
+ out[5] = -2 * bt;
+ out[6] = 0;
+ out[7] = 0;
+ out[8] = 0;
+ out[9] = 0;
+ out[10] = nf;
+ out[11] = 0;
+ out[12] = (left + right) * lr;
+ out[13] = (top + bottom) * bt;
+ out[14] = near * nf;
+ out[15] = 1;
+ return out;
+}
+
+/**
+ * Generates a look-at matrix with the given eye position, focal point, and up axis.
+ * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.
+ *
+ * @param {mat4} out mat4 frustum matrix will be written into
+ * @param {ReadonlyVec3} eye Position of the viewer
+ * @param {ReadonlyVec3} center Point the viewer is looking at
+ * @param {ReadonlyVec3} up vec3 pointing up
+ * @returns {mat4} out
+ */
+export function lookAt(out: mat4, eye: vec3.ReadonlyVec3, center: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3): mat4 {
+ let x0: f64, x1: f64, x2: f64, y0: f64, y1: f64, y2: f64, z0: f64, z1: f64, z2: f64, len: f64;
+ let eyex = eye[0];
+ let eyey = eye[1];
+ let eyez = eye[2];
+ let upx = up[0];
+ let upy = up[1];
+ let upz = up[2];
+ let centerx = center[0];
+ let centery = center[1];
+ let centerz = center[2];
+
+ if (
+ Math.abs(eyex - centerx) < glMatrix.EPSILON &&
+ Math.abs(eyey - centery) < glMatrix.EPSILON &&
+ Math.abs(eyez - centerz) < glMatrix.EPSILON
+ ) {
+ return identity(out);
+ }
+
+ z0 = eyex - centerx;
+ z1 = eyey - centery;
+ z2 = eyez - centerz;
+
+ len = 1 / Maths.hypot3(z0, z1, z2);
+ z0 *= len;
+ z1 *= len;
+ z2 *= len;
+
+ x0 = upy * z2 - upz * z1;
+ x1 = upz * z0 - upx * z2;
+ x2 = upx * z1 - upy * z0;
+ len = Maths.hypot3(x0, x1, x2);
+ if (!len) {
+ x0 = 0;
+ x1 = 0;
+ x2 = 0;
+ } else {
+ len = 1 / len;
+ x0 *= len;
+ x1 *= len;
+ x2 *= len;
+ }
+
+ y0 = z1 * x2 - z2 * x1;
+ y1 = z2 * x0 - z0 * x2;
+ y2 = z0 * x1 - z1 * x0;
+
+ len = Maths.hypot3(y0, y1, y2);
+ if (!len) {
+ y0 = 0;
+ y1 = 0;
+ y2 = 0;
+ } else {
+ len = 1 / len;
+ y0 *= len;
+ y1 *= len;
+ y2 *= len;
+ }
+
+ out[0] = x0;
+ out[1] = y0;
+ out[2] = z0;
+ out[3] = 0;
+ out[4] = x1;
+ out[5] = y1;
+ out[6] = z1;
+ out[7] = 0;
+ out[8] = x2;
+ out[9] = y2;
+ out[10] = z2;
+ out[11] = 0;
+ out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);
+ out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);
+ out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);
+ out[15] = 1;
+
+ return out;
+}
+
+/**
+ * Generates a matrix that makes something look at something else.
+ *
+ * @param {mat4} out mat4 frustum matrix will be written into
+ * @param {ReadonlyVec3} eye Position of the viewer
+ * @param {ReadonlyVec3} center Point the viewer is looking at
+ * @param {ReadonlyVec3} up vec3 pointing up
+ * @returns {mat4} out
+ */
+export function targetTo(out: mat4, eye: vec3.ReadonlyVec3, target: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3): mat4 {
+ let eyex = eye[0],
+ eyey = eye[1],
+ eyez = eye[2],
+ upx = up[0],
+ upy = up[1],
+ upz = up[2];
+
+ let z0 = eyex - target[0],
+ z1 = eyey - target[1],
+ z2 = eyez - target[2];
+
+ let len = z0 * z0 + z1 * z1 + z2 * z2;
+ if (len > 0) {
+ len = 1 / Math.sqrt(len);
+ z0 *= len;
+ z1 *= len;
+ z2 *= len;
+ }
+
+ let x0 = upy * z2 - upz * z1,
+ x1 = upz * z0 - upx * z2,
+ x2 = upx * z1 - upy * z0;
+
+ len = x0 * x0 + x1 * x1 + x2 * x2;
+ if (len > 0) {
+ len = 1 / Math.sqrt(len);
+ x0 *= len;
+ x1 *= len;
+ x2 *= len;
+ }
+
+ out[0] = x0;
+ out[1] = x1;
+ out[2] = x2;
+ out[3] = 0;
+ out[4] = z1 * x2 - z2 * x1;
+ out[5] = z2 * x0 - z0 * x2;
+ out[6] = z0 * x1 - z1 * x0;
+ out[7] = 0;
+ out[8] = z0;
+ out[9] = z1;
+ out[10] = z2;
+ out[11] = 0;
+ out[12] = eyex;
+ out[13] = eyey;
+ out[14] = eyez;
+ out[15] = 1;
+ return out;
+}
+
+/**
+ * Returns a string representation of a mat4
+ *
+ * @param {ReadonlyMat4} a matrix to represent as a string
+ * @returns {String} string representation of the matrix
+ */
+export function str(a: ReadonlyMat4): string {
+ return (
+ "mat4(" +
+ a[0].toString() +
+ ", " +
+ a[1].toString() +
+ ", " +
+ a[2].toString() +
+ ", " +
+ a[3].toString() +
+ ", " +
+ a[4].toString() +
+ ", " +
+ a[5].toString() +
+ ", " +
+ a[6].toString() +
+ ", " +
+ a[7].toString() +
+ ", " +
+ a[8].toString() +
+ ", " +
+ a[9].toString() +
+ ", " +
+ a[10].toString() +
+ ", " +
+ a[11].toString() +
+ ", " +
+ a[12].toString() +
+ ", " +
+ a[13].toString() +
+ ", " +
+ a[14].toString() +
+ ", " +
+ a[15].toString() +
+ ")"
+ );
+}
+
+/**
+ * Returns Frobenius norm of a mat4
+ *
+ * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of
+ * @returns {Number} Frobenius norm
+ */
+export function frob(a: ReadonlyMat4): f64 {
+ return Maths.hypot16(
+ a[0],
+ a[1],
+ a[2],
+ a[3],
+ a[4],
+ a[5],
+ a[6],
+ a[7],
+ a[8],
+ a[9],
+ a[10],
+ a[11],
+ a[12],
+ a[13],
+ a[14],
+ a[15]
+ );
+}
+
+/**
+ * Adds two mat4's
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the first operand
+ * @param {ReadonlyMat4} b the second operand
+ * @returns {mat4} out
+ */
+export function add(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4 {
+ out[0] = a[0] + b[0];
+ out[1] = a[1] + b[1];
+ out[2] = a[2] + b[2];
+ out[3] = a[3] + b[3];
+ out[4] = a[4] + b[4];
+ out[5] = a[5] + b[5];
+ out[6] = a[6] + b[6];
+ out[7] = a[7] + b[7];
+ out[8] = a[8] + b[8];
+ out[9] = a[9] + b[9];
+ out[10] = a[10] + b[10];
+ out[11] = a[11] + b[11];
+ out[12] = a[12] + b[12];
+ out[13] = a[13] + b[13];
+ out[14] = a[14] + b[14];
+ out[15] = a[15] + b[15];
+ return out;
+}
+
+/**
+ * Subtracts matrix b from matrix a
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the first operand
+ * @param {ReadonlyMat4} b the second operand
+ * @returns {mat4} out
+ */
+export function subtract(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4 {
+ out[0] = a[0] - b[0];
+ out[1] = a[1] - b[1];
+ out[2] = a[2] - b[2];
+ out[3] = a[3] - b[3];
+ out[4] = a[4] - b[4];
+ out[5] = a[5] - b[5];
+ out[6] = a[6] - b[6];
+ out[7] = a[7] - b[7];
+ out[8] = a[8] - b[8];
+ out[9] = a[9] - b[9];
+ out[10] = a[10] - b[10];
+ out[11] = a[11] - b[11];
+ out[12] = a[12] - b[12];
+ out[13] = a[13] - b[13];
+ out[14] = a[14] - b[14];
+ out[15] = a[15] - b[15];
+ return out;
+}
+
+/**
+ * Multiply each element of the matrix by a scalar.
+ *
+ * @param {mat4} out the receiving matrix
+ * @param {ReadonlyMat4} a the matrix to scale
+ * @param {Number} b amount to scale the matrix's elements by
+ * @returns {mat4} out
+ */
+export function multiplyScalar(out: mat4, a: ReadonlyMat4, b: f64): mat4 {
+ out[0] = a[0] * b;
+ out[1] = a[1] * b;
+ out[2] = a[2] * b;
+ out[3] = a[3] * b;
+ out[4] = a[4] * b;
+ out[5] = a[5] * b;
+ out[6] = a[6] * b;
+ out[7] = a[7] * b;
+ out[8] = a[8] * b;
+ out[9] = a[9] * b;
+ out[10] = a[10] * b;
+ out[11] = a[11] * b;
+ out[12] = a[12] * b;
+ out[13] = a[13] * b;
+ out[14] = a[14] * b;
+ out[15] = a[15] * b;
+ return out;
+}
+
+/**
+ * Adds two mat4's after multiplying each element of the second operand by a scalar value.
+ *
+ * @param {mat4} out the receiving vector
+ * @param {ReadonlyMat4} a the first operand
+ * @param {ReadonlyMat4} b the second operand
+ * @param {Number} scale the amount to scale b's elements by before adding
+ * @returns {mat4} out
+ */
+export function multiplyScalarAndAdd(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4, scale: f64): mat4 {
+ out[0] = a[0] + b[0] * scale;
+ out[1] = a[1] + b[1] * scale;
+ out[2] = a[2] + b[2] * scale;
+ out[3] = a[3] + b[3] * scale;
+ out[4] = a[4] + b[4] * scale;
+ out[5] = a[5] + b[5] * scale;
+ out[6] = a[6] + b[6] * scale;
+ out[7] = a[7] + b[7] * scale;
+ out[8] = a[8] + b[8] * scale;
+ out[9] = a[9] + b[9] * scale;
+ out[10] = a[10] + b[10] * scale;
+ out[11] = a[11] + b[11] * scale;
+ out[12] = a[12] + b[12] * scale;
+ out[13] = a[13] + b[13] * scale;
+ out[14] = a[14] + b[14] * scale;
+ out[15] = a[15] + b[15] * scale;
+ return out;
+}
+
+/**
+ * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
+ *
+ * @param {ReadonlyMat4} a The first matrix.
+ * @param {ReadonlyMat4} b The second matrix.
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
+ */
+export function exactEquals(a: ReadonlyMat4, b: ReadonlyMat4): bool {
+ return (
+ a[0] === b[0] &&
+ a[1] === b[1] &&
+ a[2] === b[2] &&
+ a[3] === b[3] &&
+ a[4] === b[4] &&
+ a[5] === b[5] &&
+ a[6] === b[6] &&
+ a[7] === b[7] &&
+ a[8] === b[8] &&
+ a[9] === b[9] &&
+ a[10] === b[10] &&
+ a[11] === b[11] &&
+ a[12] === b[12] &&
+ a[13] === b[13] &&
+ a[14] === b[14] &&
+ a[15] === b[15]
+ );
+}
+
+/**
+ * Returns whether or not the matrices have approximately the same elements in the same position.
+ *
+ * @param {ReadonlyMat4} a The first matrix.
+ * @param {ReadonlyMat4} b The second matrix.
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
+ */
+export function equals(a: ReadonlyMat4, b: ReadonlyMat4): bool {
+ let a0 = a[0],
+ a1 = a[1],
+ a2 = a[2],
+ a3 = a[3];
+ let a4 = a[4],
+ a5 = a[5],
+ a6 = a[6],
+ a7 = a[7];
+ let a8 = a[8],
+ a9 = a[9],
+ a10 = a[10],
+ a11 = a[11];
+ let a12 = a[12],
+ a13 = a[13],
+ a14 = a[14],
+ a15 = a[15];
+
+ let b0 = b[0],
+ b1 = b[1],
+ b2 = b[2],
+ b3 = b[3];
+ let b4 = b[4],
+ b5 = b[5],
+ b6 = b[6],
+ b7 = b[7];
+ let b8 = b[8],
+ b9 = b[9],
+ b10 = b[10],
+ b11 = b[11];
+ let b12 = b[12],
+ b13 = b[13],
+ b14 = b[14],
+ b15 = b[15];
+
+ return (
+ Math.abs(a0 - b0) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) &&
+ Math.abs(a1 - b1) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) &&
+ Math.abs(a2 - b2) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) &&
+ Math.abs(a3 - b3) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) &&
+ Math.abs(a4 - b4) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) &&
+ Math.abs(a5 - b5) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) &&
+ Math.abs(a6 - b6) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) &&
+ Math.abs(a7 - b7) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7)) &&
+ Math.abs(a8 - b8) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a8), Math.abs(b8)) &&
+ Math.abs(a9 - b9) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a9), Math.abs(b9)) &&
+ Math.abs(a10 - b10) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a10), Math.abs(b10)) &&
+ Math.abs(a11 - b11) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a11), Math.abs(b11)) &&
+ Math.abs(a12 - b12) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a12), Math.abs(b12)) &&
+ Math.abs(a13 - b13) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a13), Math.abs(b13)) &&
+ Math.abs(a14 - b14) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a14), Math.abs(b14)) &&
+ Math.abs(a15 - b15) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a15), Math.abs(b15))
+ );
+}
+
+/**
+ * Alias for {@link mat4.multiply}
+ * @function
+ */
+export const mul = multiply;
+
+/**
+ * Alias for {@link mat4.subtract}
+ * @function
+ */
+export const sub = subtract;
diff --git a/assembly/maths.ts b/assembly/maths.ts
new file mode 100644
index 00000000..2899b956
--- /dev/null
+++ b/assembly/maths.ts
@@ -0,0 +1,188 @@
+/**
+ * Extended Math functions
+ */
+
+export namespace Maths {
+ /**
+ * Returns the square root of the sum of squares of its arguments.
+ * @param a a
+ * @param b b
+ * @param c c
+ */
+ export function hypot3(a: f64, b: f64, c: f64): f64 {
+ a = Math.abs(a);
+ b = Math.abs(b);
+ c = Math.abs(c);
+ Math.hypot
+
+ let s = max(a, b, c);
+ if (s == 0) return 0;
+ let invs = 1.0 / s;
+ a *= invs;
+ b *= invs;
+ c *= invs;
+ return s * Math.sqrt(a * a + b * b + c * c);
+ }
+
+ /**
+ * Returns the square root of the sum of squares of its arguments.
+ * @param a a
+ * @param b b
+ * @param c c
+ * @param d d
+ */
+ export function hypot4(a: f64, b: f64, c: f64, d: f64): f64 {
+ a = Math.abs(a);
+ b = Math.abs(b);
+ c = Math.abs(c);
+ d = Math.abs(d);
+
+ let s = Math.max(a, max(b, c, d));
+ if (s == 0) return 0;
+ let invs = 1.0 / s;
+ a *= invs;
+ b *= invs;
+ c *= invs;
+ d *= invs;
+ return s * Math.sqrt(a * a + b * b + c * c + d * d);
+ }
+
+ /**
+ * Returns the square root of the sum of squares of its arguments.
+ * @param a a
+ * @param b b
+ * @param c c
+ * @param d d
+ * @param e e
+ * @param f f
+ * @param g g
+ */
+ export function hypot7(a: f64, b: f64, c: f64, d: f64, e: f64, f: f64, g: f64): f64 {
+ a = Math.abs(a);
+ b = Math.abs(b);
+ c = Math.abs(c);
+ d = Math.abs(d);
+ e = Math.abs(e);
+ f = Math.abs(f);
+ g = Math.abs(g);
+
+ let s = max(a, max(b, c, d), max(e, f, g));
+ if (s == 0) return 0;
+ let invs = 1.0 / s;
+ a *= invs;
+ b *= invs;
+ c *= invs;
+ d *= invs;
+ e *= invs;
+ f *= invs;
+ g *= invs;
+ return s * Math.sqrt(a * a + b * b + c * c + d * d + e * e + f * f + g * g);
+ }
+
+ /**
+ * Returns the square root of the sum of squares of its arguments.
+ * @param a a
+ * @param b b
+ * @param c c
+ * @param d d
+ * @param e e
+ * @param f f
+ * @param g g
+ * @param h h
+ * @param i i
+ */
+ export function hypot9(a: f64, b: f64, c: f64, d: f64, e: f64, f: f64, g: f64, h: f64, i: f64): f64 {
+ a = Math.abs(a);
+ b = Math.abs(b);
+ c = Math.abs(c);
+ d = Math.abs(d);
+ e = Math.abs(e);
+ f = Math.abs(f);
+ g = Math.abs(g);
+ h = Math.abs(h);
+ i = Math.abs(i);
+
+ let s = max(max(a, max(b, c, d), max(e, f, g)), h, i);
+ if (s == 0) return 0;
+ let invs = 1.0 / s;
+ a *= invs;
+ b *= invs;
+ c *= invs;
+ d *= invs;
+ e *= invs;
+ f *= invs;
+ g *= invs;
+ h *= invs;
+ i *= invs;
+ return s * Math.sqrt(a * a + b * b + c * c + d * d + e * e + f * f + g * g + h * h + i * i);
+ }
+
+ /**
+ * Returns the square root of the sum of squares of its arguments.
+ * @param a a
+ * @param b b
+ * @param c c
+ * @param d d
+ * @param e e
+ * @param f f
+ * @param g g
+ * @param h h
+ * @param i i
+ * @param j j
+ * @param k k
+ * @param l l
+ * @param m m
+ * @param n n
+ * @param o o
+ * @param p p
+ */
+ export function hypot16(a: f64, b: f64, c: f64, d: f64, e: f64, f: f64, g: f64, h: f64, i: f64, j: f64, k: f64, l: f64, m: f64, n: f64, o: f64, p: f64): f64 {
+ a = Math.abs(a);
+ b = Math.abs(b);
+ c = Math.abs(c);
+ d = Math.abs(d);
+ e = Math.abs(e);
+ f = Math.abs(f);
+ g = Math.abs(g);
+ h = Math.abs(h);
+ i = Math.abs(i);
+ j = Math.abs(j);
+ k = Math.abs(k);
+ l = Math.abs(l);
+ m = Math.abs(m);
+ n = Math.abs(n);
+ o = Math.abs(o);
+ p = Math.abs(p);
+
+ let s = Math.max(max(a, max(b, c, d), max(e, f, g)), max(max(h, i, j), max(k, l, m), max(n, o, p)));
+ if (s == 0) return 0;
+ let invs = 1.0 / s;
+ a *= invs;
+ b *= invs;
+ c *= invs;
+ d *= invs;
+ e *= invs;
+ f *= invs;
+ g *= invs;
+ h *= invs;
+ j *= invs;
+ k *= invs;
+ l *= invs;
+ m *= invs;
+ n *= invs;
+ o *= invs;
+ p *= invs;
+ return s * Math.sqrt(a * a + b * b + c * c + d * d + e * e + f * f + g * g + h * h + i * i + j * j + k * k + m * m + n * n + o * o + p * p);
+ }
+
+ /**
+ * Returns the larger of a set of supplied numeric expressions.
+ * @param a a
+ * @param b b
+ * @param c c
+ */
+ export function max(a: f64, b: f64, c: f64): f64 {
+ const q = Math.max(b, c);
+ return Math.max(a, q);
+ }
+}
\ No newline at end of file
diff --git a/assembly/quat.ts b/assembly/quat.ts
new file mode 100644
index 00000000..5636aa90
--- /dev/null
+++ b/assembly/quat.ts
@@ -0,0 +1,776 @@
+import * as glMatrix from "./common";
+import { IndexedCollection } from "./imports";
+import * as mat3 from "./mat3";
+import * as vec3 from "./vec3";
+import * as vec4 from "./vec4";
+
+export type quat = IndexedCollection;
+
+export type ReadonlyQuat = IndexedCollection;
+
+/**
+ * Quaternion in the format XYZW
+ * @module quat
+ */
+
+/**
+ * Creates a new identity quat
+ *
+ * @returns {quat} a new quaternion
+ */
+export function create(): quat {
+ let out = new Float64Array(4);
+ if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) {
+ out[0] = 0;
+ out[1] = 0;
+ out[2] = 0;
+ }
+ out[3] = 1;
+ return out;
+}
+
+/**
+ * Set a quat to the identity quaternion
+ *
+ * @param {quat} out the receiving quaternion
+ * @returns {quat} out
+ */
+export function identity(out: quat): quat {
+ out[0] = 0;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 1;
+ return out;
+}
+
+/**
+ * Sets a quat from the given angle and rotation axis,
+ * then returns it.
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyVec3} axis the axis around which to rotate
+ * @param {Number} rad the angle in radians
+ * @returns {quat} out
+ **/
+export function setAxisAngle(out: quat, axis: vec3.ReadonlyVec3, rad: f64): quat {
+ rad = rad * 0.5;
+ let s = Math.sin(rad);
+ out[0] = s * axis[0];
+ out[1] = s * axis[1];
+ out[2] = s * axis[2];
+ out[3] = Math.cos(rad);
+ return out;
+}
+
+/**
+ * Gets the rotation axis and angle for a given
+ * quaternion. If a quaternion is created with
+ * setAxisAngle, this method will return the same
+ * values as providied in the original parameter list
+ * OR functionally equivalent values.
+ * Example: The quaternion formed by axis [0, 0, 1] and
+ * angle -90 is the same as the quaternion formed by
+ * [0, 0, 1] and 270. This method favors the latter.
+ * @param {vec3} out_axis Vector receiving the axis of rotation
+ * @param {ReadonlyQuat} q Quaternion to be decomposed
+ * @return {Number} Angle, in radians, of the rotation
+ */
+export function getAxisAngle(out_axis: vec3.vec3, q: ReadonlyQuat): f64 {
+ let rad = Math.acos(q[3]) * 2.0;
+ let s = Math.sin(rad / 2.0);
+ if (s > glMatrix.EPSILON) {
+ out_axis[0] = q[0] / s;
+ out_axis[1] = q[1] / s;
+ out_axis[2] = q[2] / s;
+ } else {
+ // If s is zero, return any axis (no rotation - axis does not matter)
+ out_axis[0] = 1;
+ out_axis[1] = 0;
+ out_axis[2] = 0;
+ }
+ return rad;
+}
+
+/**
+ * Gets the angular distance between two unit quaternions
+ *
+ * @param {ReadonlyQuat} a Origin unit quaternion
+ * @param {ReadonlyQuat} b Destination unit quaternion
+ * @return {Number} Angle, in radians, between the two quaternions
+ */
+export function getAngle(a: ReadonlyQuat, b: ReadonlyQuat): f64 {
+ let dotproduct = dot(a, b);
+
+ return Math.acos(2 * dotproduct * dotproduct - 1);
+}
+
+/**
+ * Multiplies two quat's
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a the first operand
+ * @param {ReadonlyQuat} b the second operand
+ * @returns {quat} out
+ */
+export function multiply(out: quat, a: ReadonlyQuat, b: ReadonlyQuat): quat {
+ let ax = a[0],
+ ay = a[1],
+ az = a[2],
+ aw = a[3];
+ let bx = b[0],
+ by = b[1],
+ bz = b[2],
+ bw = b[3];
+
+ out[0] = ax * bw + aw * bx + ay * bz - az * by;
+ out[1] = ay * bw + aw * by + az * bx - ax * bz;
+ out[2] = az * bw + aw * bz + ax * by - ay * bx;
+ out[3] = aw * bw - ax * bx - ay * by - az * bz;
+ return out;
+}
+
+/**
+ * Rotates a quaternion by the given angle about the X axis
+ *
+ * @param {quat} out quat receiving operation result
+ * @param {ReadonlyQuat} a quat to rotate
+ * @param {number} rad angle (in radians) to rotate
+ * @returns {quat} out
+ */
+export function rotateX(out: quat, a: ReadonlyQuat, rad: f64): quat {
+ rad *= 0.5;
+
+ let ax = a[0],
+ ay = a[1],
+ az = a[2],
+ aw = a[3];
+ let bx = Math.sin(rad),
+ bw = Math.cos(rad);
+
+ out[0] = ax * bw + aw * bx;
+ out[1] = ay * bw + az * bx;
+ out[2] = az * bw - ay * bx;
+ out[3] = aw * bw - ax * bx;
+ return out;
+}
+
+/**
+ * Rotates a quaternion by the given angle about the Y axis
+ *
+ * @param {quat} out quat receiving operation result
+ * @param {ReadonlyQuat} a quat to rotate
+ * @param {number} rad angle (in radians) to rotate
+ * @returns {quat} out
+ */
+export function rotateY(out: quat, a: ReadonlyQuat, rad: f64): quat {
+ rad *= 0.5;
+
+ let ax = a[0],
+ ay = a[1],
+ az = a[2],
+ aw = a[3];
+ let by = Math.sin(rad),
+ bw = Math.cos(rad);
+
+ out[0] = ax * bw - az * by;
+ out[1] = ay * bw + aw * by;
+ out[2] = az * bw + ax * by;
+ out[3] = aw * bw - ay * by;
+ return out;
+}
+
+/**
+ * Rotates a quaternion by the given angle about the Z axis
+ *
+ * @param {quat} out quat receiving operation result
+ * @param {ReadonlyQuat} a quat to rotate
+ * @param {number} rad angle (in radians) to rotate
+ * @returns {quat} out
+ */
+export function rotateZ(out: quat, a: ReadonlyQuat, rad: f64): quat {
+ rad *= 0.5;
+
+ let ax = a[0],
+ ay = a[1],
+ az = a[2],
+ aw = a[3];
+ let bz = Math.sin(rad),
+ bw = Math.cos(rad);
+
+ out[0] = ax * bw + ay * bz;
+ out[1] = ay * bw - ax * bz;
+ out[2] = az * bw + aw * bz;
+ out[3] = aw * bw - az * bz;
+ return out;
+}
+
+/**
+ * Calculates the W component of a quat from the X, Y, and Z components.
+ * Assumes that quaternion is 1 unit in length.
+ * Any existing W component will be ignored.
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a quat to calculate W component of
+ * @returns {quat} out
+ */
+export function calculateW(out: quat, a: ReadonlyQuat): quat {
+ let x = a[0],
+ y = a[1],
+ z = a[2];
+
+ out[0] = x;
+ out[1] = y;
+ out[2] = z;
+ out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));
+ return out;
+}
+
+/**
+ * Calculate the exponential of a unit quaternion.
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a quat to calculate the exponential of
+ * @returns {quat} out
+ */
+export function exp(out: quat, a: ReadonlyQuat): quat {
+ let x = a[0],
+ y = a[1],
+ z = a[2],
+ w = a[3];
+
+ let r = Math.sqrt(x * x + y * y + z * z);
+ let et = Math.exp(w);
+ let s = r > 0 ? (et * Math.sin(r)) / r : 0;
+
+ out[0] = x * s;
+ out[1] = y * s;
+ out[2] = z * s;
+ out[3] = et * Math.cos(r);
+
+ return out;
+}
+
+/**
+ * Calculate the natural logarithm of a unit quaternion.
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a quat to calculate the exponential of
+ * @returns {quat} out
+ */
+export function ln(out: quat, a: ReadonlyQuat): quat {
+ let x = a[0],
+ y = a[1],
+ z = a[2],
+ w = a[3];
+
+ let r = Math.sqrt(x * x + y * y + z * z);
+ let t = r > 0 ? Math.atan2(r, w) / r : 0;
+
+ out[0] = x * t;
+ out[1] = y * t;
+ out[2] = z * t;
+ out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);
+
+ return out;
+}
+
+/**
+ * Calculate the scalar power of a unit quaternion.
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a quat to calculate the exponential of
+ * @param {Number} b amount to scale the quaternion by
+ * @returns {quat} out
+ */
+export function pow(out: quat, a: ReadonlyQuat, b: f64): quat {
+ ln(out, a);
+ scale(out, out, b);
+ exp(out, out);
+ return out;
+}
+
+/**
+ * Performs a spherical linear interpolation between two quat
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a the first operand
+ * @param {ReadonlyQuat} b the second operand
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
+ * @returns {quat} out
+ */
+export function slerp(out: quat, a: ReadonlyQuat, b: ReadonlyQuat, t: f64): quat {
+ // benchmarks:
+ // http://jsperf.com/quaternion-slerp-implementations
+ let ax = a[0],
+ ay = a[1],
+ az = a[2],
+ aw = a[3];
+ let bx = b[0],
+ by = b[1],
+ bz = b[2],
+ bw = b[3];
+
+ let omega: f64, cosom: f64, sinom: f64, scale0: f64, scale1: f64;
+
+ // calc cosine
+ cosom = ax * bx + ay * by + az * bz + aw * bw;
+ // adjust signs (if necessary)
+ if (cosom < 0.0) {
+ cosom = -cosom;
+ bx = -bx;
+ by = -by;
+ bz = -bz;
+ bw = -bw;
+ }
+ // calculate coefficients
+ if (1.0 - cosom > glMatrix.EPSILON) {
+ // standard case (slerp)
+ omega = Math.acos(cosom);
+ sinom = Math.sin(omega);
+ scale0 = Math.sin((1.0 - t) * omega) / sinom;
+ scale1 = Math.sin(t * omega) / sinom;
+ } else {
+ // "from" and "to" quaternions are very close
+ // ... so we can do a linear interpolation
+ scale0 = 1.0 - t;
+ scale1 = t;
+ }
+ // calculate final values
+ out[0] = scale0 * ax + scale1 * bx;
+ out[1] = scale0 * ay + scale1 * by;
+ out[2] = scale0 * az + scale1 * bz;
+ out[3] = scale0 * aw + scale1 * bw;
+
+ return out;
+}
+
+/**
+ * Generates a random unit quaternion
+ *
+ * @param {quat} out the receiving quaternion
+ * @returns {quat} out
+ */
+export function random(out: quat): quat {
+ // Implementation of http://planning.cs.uiuc.edu/node198.html
+ // TODO: Calling random 3 times is probably not the fastest solution
+ let u1 = glMatrix.RANDOM();
+ let u2 = glMatrix.RANDOM();
+ let u3 = glMatrix.RANDOM();
+
+ let sqrt1MinusU1 = Math.sqrt(1 - u1);
+ let sqrtU1 = Math.sqrt(u1);
+
+ out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);
+ out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);
+ out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);
+ out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);
+ return out;
+}
+
+/**
+ * Calculates the inverse of a quat
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a quat to calculate inverse of
+ * @returns {quat} out
+ */
+export function invert(out: quat, a: ReadonlyQuat): quat {
+ let a0 = a[0],
+ a1 = a[1],
+ a2 = a[2],
+ a3 = a[3];
+ let dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;
+ let invDot = dot ? 1.0 / dot : 0;
+
+ // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0
+
+ out[0] = -a0 * invDot;
+ out[1] = -a1 * invDot;
+ out[2] = -a2 * invDot;
+ out[3] = a3 * invDot;
+ return out;
+}
+
+/**
+ * Calculates the conjugate of a quat
+ * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a quat to calculate conjugate of
+ * @returns {quat} out
+ */
+export function conjugate(out: quat, a: ReadonlyQuat): quat {
+ out[0] = -a[0];
+ out[1] = -a[1];
+ out[2] = -a[2];
+ out[3] = a[3];
+ return out;
+}
+
+/**
+ * Creates a quaternion from the given 3x3 rotation matrix.
+ *
+ * NOTE: The resultant quaternion is not normalized, so you should be sure
+ * to renormalize the quaternion yourself where necessary.
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyMat3} m rotation matrix
+ * @returns {quat} out
+ * @function
+ */
+export function fromMat3(out: quat, m: mat3.ReadonlyMat3): quat {
+ // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes
+ // article "Quaternion Calculus and Fast Animation".
+ let fTrace = m[0] + m[4] + m[8];
+ let fRoot: f64;
+
+ if (fTrace > 0.0) {
+ // |w| > 1/2, may as well choose w > 1/2
+ fRoot = Math.sqrt(fTrace + 1.0); // 2w
+ out[3] = 0.5 * fRoot;
+ fRoot = 0.5 / fRoot; // 1/(4w)
+ out[0] = (m[5] - m[7]) * fRoot;
+ out[1] = (m[6] - m[2]) * fRoot;
+ out[2] = (m[1] - m[3]) * fRoot;
+ } else {
+ // |w| <= 1/2
+ let i = 0;
+ if (m[4] > m[0]) i = 1;
+ if (m[8] > m[i * 3 + i]) i = 2;
+ let j = (i + 1) % 3;
+ let k = (i + 2) % 3;
+
+ fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);
+ out[i] = 0.5 * fRoot;
+ fRoot = 0.5 / fRoot;
+ out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;
+ out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;
+ out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;
+ }
+
+ return out;
+}
+
+type x = f64;
+type y = f64;
+type z = f64;
+
+/**
+ * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion.
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {x} x Angle to rotate around X axis in degrees.
+ * @param {y} y Angle to rotate around Y axis in degrees.
+ * @param {z} z Angle to rotate around Z axis in degrees.
+ * @param {'zyx'|'xyz'|'yxz'|'yzx'|'zxy'|'zyx'} order Intrinsic order for conversion, default is zyx.
+ * @returns {quat} out
+ * @function
+ */
+export function fromEuler(out: quat, x: x, y: y, z: z, order: string = glMatrix.ANGLE_ORDER): quat {
+ let halfToRad = Math.PI / 360;
+ x *= halfToRad;
+ z *= halfToRad;
+ y *= halfToRad;
+
+ let sx = Math.sin(x);
+ let cx = Math.cos(x);
+ let sy = Math.sin(y);
+ let cy = Math.cos(y);
+ let sz = Math.sin(z);
+ let cz = Math.cos(z);
+
+ if (order === "xyz") {
+ out[0] = sx * cy * cz + cx * sy * sz;
+ out[1] = cx * sy * cz - sx * cy * sz;
+ out[2] = cx * cy * sz + sx * sy * cz;
+ out[3] = cx * cy * cz - sx * sy * sz;
+ } else if (order === "xzy") {
+ out[0] = sx * cy * cz - cx * sy * sz;
+ out[1] = cx * sy * cz - sx * cy * sz;
+ out[2] = cx * cy * sz + sx * sy * cz;
+ out[3] = cx * cy * cz + sx * sy * sz;
+ } else if (order === "yxz") {
+ out[0] = sx * cy * cz + cx * sy * sz;
+ out[1] = cx * sy * cz - sx * cy * sz;
+ out[2] = cx * cy * sz - sx * sy * cz;
+ out[3] = cx * cy * cz + sx * sy * sz;
+ } else if (order === "yzx") {
+ out[0] = sx * cy * cz + cx * sy * sz;
+ out[1] = cx * sy * cz + sx * cy * sz;
+ out[2] = cx * cy * sz - sx * sy * cz;
+ out[3] = cx * cy * cz - sx * sy * sz;
+ } else if (order === "zxy") {
+ out[0] = sx * cy * cz - cx * sy * sz;
+ out[1] = cx * sy * cz + sx * cy * sz;
+ out[2] = cx * cy * sz + sx * sy * cz;
+ out[3] = cx * cy * cz - sx * sy * sz;
+ } else if (order === "zyx") {
+ out[0] = sx * cy * cz - cx * sy * sz;
+ out[1] = cx * sy * cz + sx * cy * sz;
+ out[2] = cx * cy * sz - sx * sy * cz;
+ out[3] = cx * cy * cz + sx * sy * sz;
+ } else throw new Error('Unknown angle order ' + order);
+
+ return out;
+}
+
+/**
+ * Returns a string representation of a quaternion
+ *
+ * @param {ReadonlyQuat} a vector to represent as a string
+ * @returns {String} string representation of the vector
+ */
+export function str(a: ReadonlyQuat): string {
+ return "quat(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")";
+}
+
+/**
+ * Creates a new quat initialized with values from an existing quaternion
+ *
+ * @param {ReadonlyQuat} a quaternion to clone
+ * @returns {quat} a new quaternion
+ * @function
+ */
+export const clone = vec4.clone;
+
+/**
+ * Creates a new quat initialized with the given values
+ *
+ * @param {Number} x X component
+ * @param {Number} y Y component
+ * @param {Number} z Z component
+ * @param {Number} w W component
+ * @returns {quat} a new quaternion
+ * @function
+ */
+export const fromValues = vec4.fromValues;
+
+/**
+ * Copy the values from one quat to another
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a the source quaternion
+ * @returns {quat} out
+ * @function
+ */
+export const copy = vec4.copy;
+
+/**
+ * Set the components of a quat to the given values
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {Number} x X component
+ * @param {Number} y Y component
+ * @param {Number} z Z component
+ * @param {Number} w W component
+ * @returns {quat} out
+ * @function
+ */
+export const set = vec4.set;
+
+/**
+ * Adds two quat's
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a the first operand
+ * @param {ReadonlyQuat} b the second operand
+ * @returns {quat} out
+ * @function
+ */
+export const add = vec4.add;
+
+/**
+ * Alias for {@link quat.multiply}
+ * @function
+ */
+export const mul = multiply;
+
+/**
+ * Scales a quat by a scalar number
+ *
+ * @param {quat} out the receiving vector
+ * @param {ReadonlyQuat} a the vector to scale
+ * @param {Number} b amount to scale the vector by
+ * @returns {quat} out
+ * @function
+ */
+export const scale = vec4.scale;
+
+/**
+ * Calculates the dot product of two quat's
+ *
+ * @param {ReadonlyQuat} a the first operand
+ * @param {ReadonlyQuat} b the second operand
+ * @returns {Number} dot product of a and b
+ * @function
+ */
+export const dot = vec4.dot;
+
+/**
+ * Performs a linear interpolation between two quat's
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a the first operand
+ * @param {ReadonlyQuat} b the second operand
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
+ * @returns {quat} out
+ * @function
+ */
+export const lerp = vec4.lerp;
+
+/**
+ * Calculates the length of a quat
+ *
+ * @param {ReadonlyQuat} a vector to calculate length of
+ * @returns {Number} length of a
+ */
+export const length = vec4.length;
+
+/**
+ * Alias for {@link quat.length}
+ * @function
+ */
+export const len = length;
+
+/**
+ * Calculates the squared length of a quat
+ *
+ * @param {ReadonlyQuat} a vector to calculate squared length of
+ * @returns {Number} squared length of a
+ * @function
+ */
+export const squaredLength = vec4.squaredLength;
+
+/**
+ * Alias for {@link quat.squaredLength}
+ * @function
+ */
+export const sqrLen = squaredLength;
+
+/**
+ * Normalize a quat
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a quaternion to normalize
+ * @returns {quat} out
+ * @function
+ */
+export const normalize = vec4.normalize;
+
+/**
+ * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)
+ *
+ * @param {ReadonlyQuat} a The first quaternion.
+ * @param {ReadonlyQuat} b The second quaternion.
+ * @returns {Boolean} True if the vectors are equal, false otherwise.
+ */
+export const exactEquals = vec4.exactEquals;
+
+/**
+ * Returns whether or not the quaternions point approximately to the same direction.
+ *
+ * Both quaternions are assumed to be unit length.
+ *
+ * @param {ReadonlyQuat} a The first unit quaternion.
+ * @param {ReadonlyQuat} b The second unit quaternion.
+ * @returns {Boolean} True if the quaternions are equal, false otherwise.
+ */
+export function equals(a: ReadonlyQuat, b: ReadonlyQuat): bool {
+ return Math.abs(vec4.dot(a, b)) >= 1 - glMatrix.EPSILON;
+}
+
+/**
+ * Sets a quaternion to represent the shortest rotation from one
+ * vector to another.
+ *
+ * Both vectors are assumed to be unit length.
+ *
+ * @param {quat} out the receiving quaternion.
+ * @param {ReadonlyVec3} a the initial vector
+ * @param {ReadonlyVec3} b the destination vector
+ * @returns {quat} out
+ */
+ let tmpvec3 = vec3.create();
+ let xUnitVec3 = vec3.fromValues(1, 0, 0);
+ let yUnitVec3 = vec3.fromValues(0, 1, 0);
+export const rotationTo = ((): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) => quat => {
+
+ return function (out: quat, a: ReadonlyQuat, b: ReadonlyQuat) {
+ let dot = vec3.dot(a, b);
+ if (dot < -0.999999) {
+ vec3.cross(tmpvec3, xUnitVec3, a);
+ if (vec3.len(tmpvec3) < 0.000001) vec3.cross(tmpvec3, yUnitVec3, a);
+ vec3.normalize(tmpvec3, tmpvec3);
+ setAxisAngle(out, tmpvec3, Math.PI);
+ return out;
+ } else if (dot > 0.999999) {
+ out[0] = 0;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 1;
+ return out;
+ } else {
+ vec3.cross(tmpvec3, a, b);
+ out[0] = tmpvec3[0];
+ out[1] = tmpvec3[1];
+ out[2] = tmpvec3[2];
+ out[3] = 1 + dot;
+ return normalize(out, out);
+ }
+ };
+})();
+
+/**
+ * Performs a spherical linear interpolation with two control points
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyQuat} a the first operand
+ * @param {ReadonlyQuat} b the second operand
+ * @param {ReadonlyQuat} c the third operand
+ * @param {ReadonlyQuat} d the fourth operand
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
+ * @returns {quat} out
+ */
+ let temp1 = create();
+ let temp2 = create();
+export const sqlerp = ((): (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) => quat => {
+
+ return function (out: quat, a: ReadonlyQuat, b: ReadonlyQuat, c: ReadonlyQuat, d: ReadonlyQuat, t: f64) {
+ slerp(temp1, a, d, t);
+ slerp(temp2, b, c, t);
+ slerp(out, temp1, temp2, 2 * t * (1 - t));
+
+ return out;
+ };
+})();
+
+/**
+ * Sets the specified quaternion with values corresponding to the given
+ * axes. Each axis is a vec3 and is expected to be unit length and
+ * perpendicular to all other specified axes.
+ *
+ * @param {quat} out the receiving quaternion
+ * @param {ReadonlyVec3} view the vector representing the viewing direction
+ * @param {ReadonlyVec3} right the vector representing the local "right" direction
+ * @param {ReadonlyVec3} up the vector representing the local "up" direction
+ * @returns {quat} out
+ */
+ let matr = mat3.create();
+export const setAxes = ((): (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) => quat => {
+
+ return function (out: quat, view: vec3.ReadonlyVec3, right: vec3.ReadonlyVec3, up: vec3.ReadonlyVec3) {
+ matr[0] = right[0];
+ matr[3] = right[1];
+ matr[6] = right[2];
+
+ matr[1] = up[0];
+ matr[4] = up[1];
+ matr[7] = up[2];
+
+ matr[2] = -view[0];
+ matr[5] = -view[1];
+ matr[8] = -view[2];
+
+ return normalize(out, fromMat3(out, matr));
+ };
+})();
diff --git a/assembly/quat2.ts b/assembly/quat2.ts
new file mode 100644
index 00000000..06ac06b3
--- /dev/null
+++ b/assembly/quat2.ts
@@ -0,0 +1,927 @@
+import * as glMatrix from "./common";
+import { IndexedCollection } from "./imports";
+import { Maths } from "./maths";
+import * as mat4 from "./mat4";
+import * as quat from "./quat";
+import * as vec3 from "./vec3";
+
+export type quat2 = IndexedCollection;
+
+export type ReadonlyQuat2 = IndexedCollection;
+
+/**
+ * Dual Quaternion
+ * Format: [real, dual]
+ * Quaternion format: XYZW
+ * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.
+ * @module quat2
+ */
+
+/**
+ * Creates a new identity dual quat
+ *
+ * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation]
+ */
+export function create(): quat2 {
+ let dq = changetype(new Float64Array(8));
+ if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) {
+ dq[0] = 0;
+ dq[1] = 0;
+ dq[2] = 0;
+ dq[4] = 0;
+ dq[5] = 0;
+ dq[6] = 0;
+ dq[7] = 0;
+ }
+ dq[3] = 1;
+ return dq;
+}
+
+/**
+ * Creates a new quat initialized with values from an existing quaternion
+ *
+ * @param {ReadonlyQuat2} a dual quaternion to clone
+ * @returns {quat2} new dual quaternion
+ * @function
+ */
+export function clone(a: ReadonlyQuat2): quat2 {
+ let dq = changetype(new Float64Array(8));
+ dq[0] = a[0];
+ dq[1] = a[1];
+ dq[2] = a[2];
+ dq[3] = a[3];
+ dq[4] = a[4];
+ dq[5] = a[5];
+ dq[6] = a[6];
+ dq[7] = a[7];
+ return dq;
+}
+
+/**
+ * Creates a new dual quat initialized with the given values
+ *
+ * @param {Number} x1 X component
+ * @param {Number} y1 Y component
+ * @param {Number} z1 Z component
+ * @param {Number} w1 W component
+ * @param {Number} x2 X component
+ * @param {Number} y2 Y component
+ * @param {Number} z2 Z component
+ * @param {Number} w2 W component
+ * @returns {quat2} new dual quaternion
+ * @function
+ */
+export function fromValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): quat2 {
+ let dq = changetype(new Float64Array(8));
+ dq[0] = x1;
+ dq[1] = y1;
+ dq[2] = z1;
+ dq[3] = w1;
+ dq[4] = x2;
+ dq[5] = y2;
+ dq[6] = z2;
+ dq[7] = w2;
+ return dq;
+}
+
+/**
+ * Creates a new dual quat from the given values (quat and translation)
+ *
+ * @param {Number} x1 X component
+ * @param {Number} y1 Y component
+ * @param {Number} z1 Z component
+ * @param {Number} w1 W component
+ * @param {Number} x2 X component (translation)
+ * @param {Number} y2 Y component (translation)
+ * @param {Number} z2 Z component (translation)
+ * @returns {quat2} new dual quaternion
+ * @function
+ */
+export function fromRotationTranslationValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64): quat2 {
+ let dq = changetype(new Float64Array(8));
+ dq[0] = x1;
+ dq[1] = y1;
+ dq[2] = z1;
+ dq[3] = w1;
+ let ax = x2 * 0.5,
+ ay = y2 * 0.5,
+ az = z2 * 0.5;
+ dq[4] = ax * w1 + ay * z1 - az * y1;
+ dq[5] = ay * w1 + az * x1 - ax * z1;
+ dq[6] = az * w1 + ax * y1 - ay * x1;
+ dq[7] = -ax * x1 - ay * y1 - az * z1;
+ return dq;
+}
+
+/**
+ * Creates a dual quat from a quaternion and a translation
+ *
+ * @param {quat2} out quaternion receiving operation result
+ * @param {ReadonlyQuat} q a normalized quaternion
+ * @param {ReadonlyVec3} t translation vector
+ * @returns {quat2} dual quaternion receiving operation result
+ * @function
+ */
+export function fromRotationTranslation(out: quat2, q: quat.ReadonlyQuat, t: vec3.ReadonlyVec3): quat2 {
+ let ax = t[0] * 0.5,
+ ay = t[1] * 0.5,
+ az = t[2] * 0.5,
+ bx = q[0],
+ by = q[1],
+ bz = q[2],
+ bw = q[3];
+ out[0] = bx;
+ out[1] = by;
+ out[2] = bz;
+ out[3] = bw;
+ out[4] = ax * bw + ay * bz - az * by;
+ out[5] = ay * bw + az * bx - ax * bz;
+ out[6] = az * bw + ax * by - ay * bx;
+ out[7] = -ax * bx - ay * by - az * bz;
+ return out;
+}
+
+/**
+ * Creates a dual quat from a translation
+ *
+ * @param {quat2} out quaternion receiving operation result
+ * @param {ReadonlyVec3} t translation vector
+ * @returns {quat2} out quaternion receiving operation result
+ * @function
+ */
+export function fromTranslation(out: quat2, t: vec3.ReadonlyVec3): quat2 {
+ out[0] = 0;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 1;
+ out[4] = t[0] * 0.5;
+ out[5] = t[1] * 0.5;
+ out[6] = t[2] * 0.5;
+ out[7] = 0;
+ return out;
+}
+
+/**
+ * Creates a dual quat from a quaternion
+ *
+ * @param {quat2} out quaternion receiving operation result
+ * @param {ReadonlyQuat} q the quaternion
+ * @returns {quat2} out quaternion receiving operation result
+ * @function
+ */
+export function fromRotation(out: quat2, q: quat.ReadonlyQuat): quat2 {
+ out[0] = q[0];
+ out[1] = q[1];
+ out[2] = q[2];
+ out[3] = q[3];
+ out[4] = 0;
+ out[5] = 0;
+ out[6] = 0;
+ out[7] = 0;
+ return out;
+}
+
+/**
+ * Creates a new dual quat from a matrix (4x4)
+ *
+ * @param {quat2} out the dual quaternion
+ * @param {ReadonlyMat4} a the matrix
+ * @returns {quat2} dual quat receiving operation result
+ * @function
+ */
+export function fromMat4(out: quat2, a: mat4.ReadonlyMat4): quat2 {
+ //TODO Optimize this
+ let outer = quat.create();
+ mat4.getRotation(outer, a);
+ let t = new Float64Array(3);
+ mat4.getTranslation(t, a);
+ fromRotationTranslation(out, outer, t);
+ return out;
+}
+
+/**
+ * Copy the values from one dual quat to another
+ *
+ * @param {quat2} out the receiving dual quaternion
+ * @param {ReadonlyQuat2} a the source dual quaternion
+ * @returns {quat2} out
+ * @function
+ */
+export function copy(out: quat2, a: ReadonlyQuat2): quat2 {
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ out[3] = a[3];
+ out[4] = a[4];
+ out[5] = a[5];
+ out[6] = a[6];
+ out[7] = a[7];
+ return out;
+}
+
+/**
+ * Set a dual quat to the identity dual quaternion
+ *
+ * @param {quat2} out the receiving quaternion
+ * @returns {quat2} out
+ */
+export function identity(out: quat2): quat2 {
+ out[0] = 0;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 1;
+ out[4] = 0;
+ out[5] = 0;
+ out[6] = 0;
+ out[7] = 0;
+ return out;
+}
+
+/**
+ * Set the components of a dual quat to the given values
+ *
+ * @param {quat2} out the receiving quaternion
+ * @param {Number} x1 X component
+ * @param {Number} y1 Y component
+ * @param {Number} z1 Z component
+ * @param {Number} w1 W component
+ * @param {Number} x2 X component
+ * @param {Number} y2 Y component
+ * @param {Number} z2 Z component
+ * @param {Number} w2 W component
+ * @returns {quat2} out
+ * @function
+ */
+export function set(out: quat2, x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): quat2 {
+ out[0] = x1;
+ out[1] = y1;
+ out[2] = z1;
+ out[3] = w1;
+
+ out[4] = x2;
+ out[5] = y2;
+ out[6] = z2;
+ out[7] = w2;
+ return out;
+}
+
+/**
+ * Gets the real part of a dual quat
+ * @param {quat} out real part
+ * @param {ReadonlyQuat2} a Dual Quaternion
+ * @return {quat} real part
+ */
+export const getReal = quat.copy;
+
+/**
+ * Gets the dual part of a dual quat
+ * @param {quat} out dual part
+ * @param {ReadonlyQuat2} a Dual Quaternion
+ * @return {quat} dual part
+ */
+export function getDual(out: quat.quat, a: ReadonlyQuat2): quat.quat {
+ out[0] = a[4];
+ out[1] = a[5];
+ out[2] = a[6];
+ out[3] = a[7];
+ return out;
+}
+
+/**
+ * Set the real component of a dual quat to the given quaternion
+ *
+ * @param {quat2} out the receiving quaternion
+ * @param {ReadonlyQuat} q a quaternion representing the real part
+ * @returns {quat2} out
+ * @function
+ */
+export const setReal = quat.copy;
+
+/**
+ * Set the dual component of a dual quat to the given quaternion
+ *
+ * @param {quat2} out the receiving quaternion
+ * @param {ReadonlyQuat} q a quaternion representing the dual part
+ * @returns {quat2} out
+ * @function
+ */
+export function setDual(out: quat2, q: quat.ReadonlyQuat): quat2 {
+ out[4] = q[0];
+ out[5] = q[1];
+ out[6] = q[2];
+ out[7] = q[3];
+ return out;
+}
+
+/**
+ * Gets the translation of a normalized dual quat
+ * @param {vec3} out translation
+ * @param {ReadonlyQuat2} a Dual Quaternion to be decomposed
+ * @return {vec3} translation
+ */
+export function getTranslation(out: vec3.vec3, a: ReadonlyQuat2): vec3.vec3 {
+ let ax = a[4],
+ ay = a[5],
+ az = a[6],
+ aw = a[7],
+ bx = -a[0],
+ by = -a[1],
+ bz = -a[2],
+ bw = a[3];
+ out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;
+ out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;
+ out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;
+ return out;
+}
+
+/**
+ * Translates a dual quat by the given vector
+ *
+ * @param {quat2} out the receiving dual quaternion
+ * @param {ReadonlyQuat2} a the dual quaternion to translate
+ * @param {ReadonlyVec3} v vector to translate by
+ * @returns {quat2} out
+ */
+export function translate(out: quat2, a: ReadonlyQuat2, v: vec3.ReadonlyVec3): quat2 {
+ let ax1 = a[0],
+ ay1 = a[1],
+ az1 = a[2],
+ aw1 = a[3],
+ bx1 = v[0] * 0.5,
+ by1 = v[1] * 0.5,
+ bz1 = v[2] * 0.5,
+ ax2 = a[4],
+ ay2 = a[5],
+ az2 = a[6],
+ aw2 = a[7];
+ out[0] = ax1;
+ out[1] = ay1;
+ out[2] = az1;
+ out[3] = aw1;
+ out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2;
+ out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2;
+ out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2;
+ out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2;
+ return out;
+}
+
+/**
+ * Rotates a dual quat around the X axis
+ *
+ * @param {quat2} out the receiving dual quaternion
+ * @param {ReadonlyQuat2} a the dual quaternion to rotate
+ * @param {number} rad how far should the rotation be
+ * @returns {quat2} out
+ */
+export function rotateX(out: quat2, a: ReadonlyQuat2, rad: f64): quat2 {
+ let bx = -a[0],
+ by = -a[1],
+ bz = -a[2],
+ bw = a[3],
+ ax = a[4],
+ ay = a[5],
+ az = a[6],
+ aw = a[7],
+ ax1 = ax * bw + aw * bx + ay * bz - az * by,
+ ay1 = ay * bw + aw * by + az * bx - ax * bz,
+ az1 = az * bw + aw * bz + ax * by - ay * bx,
+ aw1 = aw * bw - ax * bx - ay * by - az * bz;
+ quat.rotateX(out, a, rad);
+ bx = out[0];
+ by = out[1];
+ bz = out[2];
+ bw = out[3];
+ out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;
+ out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;
+ out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;
+ out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;
+ return out;
+}
+
+/**
+ * Rotates a dual quat around the Y axis
+ *
+ * @param {quat2} out the receiving dual quaternion
+ * @param {ReadonlyQuat2} a the dual quaternion to rotate
+ * @param {number} rad how far should the rotation be
+ * @returns {quat2} out
+ */
+export function rotateY(out: quat2, a: ReadonlyQuat2, rad: f64): quat2 {
+ let bx = -a[0],
+ by = -a[1],
+ bz = -a[2],
+ bw = a[3],
+ ax = a[4],
+ ay = a[5],
+ az = a[6],
+ aw = a[7],
+ ax1 = ax * bw + aw * bx + ay * bz - az * by,
+ ay1 = ay * bw + aw * by + az * bx - ax * bz,
+ az1 = az * bw + aw * bz + ax * by - ay * bx,
+ aw1 = aw * bw - ax * bx - ay * by - az * bz;
+ quat.rotateY(out, a, rad);
+ bx = out[0];
+ by = out[1];
+ bz = out[2];
+ bw = out[3];
+ out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;
+ out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;
+ out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;
+ out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;
+ return out;
+}
+
+/**
+ * Rotates a dual quat around the Z axis
+ *
+ * @param {quat2} out the receiving dual quaternion
+ * @param {ReadonlyQuat2} a the dual quaternion to rotate
+ * @param {number} rad how far should the rotation be
+ * @returns {quat2} out
+ */
+export function rotateZ(out: quat2, a: ReadonlyQuat2, rad: f64): quat2 {
+ let bx = -a[0],
+ by = -a[1],
+ bz = -a[2],
+ bw = a[3],
+ ax = a[4],
+ ay = a[5],
+ az = a[6],
+ aw = a[7],
+ ax1 = ax * bw + aw * bx + ay * bz - az * by,
+ ay1 = ay * bw + aw * by + az * bx - ax * bz,
+ az1 = az * bw + aw * bz + ax * by - ay * bx,
+ aw1 = aw * bw - ax * bx - ay * by - az * bz;
+ quat.rotateZ(out, a, rad);
+ bx = out[0];
+ by = out[1];
+ bz = out[2];
+ bw = out[3];
+ out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;
+ out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;
+ out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;
+ out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;
+ return out;
+}
+
+/**
+ * Rotates a dual quat by a given quaternion (a * q)
+ *
+ * @param {quat2} out the receiving dual quaternion
+ * @param {ReadonlyQuat2} a the dual quaternion to rotate
+ * @param {ReadonlyQuat} q quaternion to rotate by
+ * @returns {quat2} out
+ */
+export function rotateByQuatAppend(out: quat2, a: ReadonlyQuat2, q: quat.ReadonlyQuat): quat2 {
+ let qx = q[0],
+ qy = q[1],
+ qz = q[2],
+ qw = q[3],
+ ax = a[0],
+ ay = a[1],
+ az = a[2],
+ aw = a[3];
+
+ out[0] = ax * qw + aw * qx + ay * qz - az * qy;
+ out[1] = ay * qw + aw * qy + az * qx - ax * qz;
+ out[2] = az * qw + aw * qz + ax * qy - ay * qx;
+ out[3] = aw * qw - ax * qx - ay * qy - az * qz;
+ ax = a[4];
+ ay = a[5];
+ az = a[6];
+ aw = a[7];
+ out[4] = ax * qw + aw * qx + ay * qz - az * qy;
+ out[5] = ay * qw + aw * qy + az * qx - ax * qz;
+ out[6] = az * qw + aw * qz + ax * qy - ay * qx;
+ out[7] = aw * qw - ax * qx - ay * qy - az * qz;
+ return out;
+}
+
+/**
+ * Rotates a dual quat by a given quaternion (q * a)
+ *
+ * @param {quat2} out the receiving dual quaternion
+ * @param {ReadonlyQuat} q quaternion to rotate by
+ * @param {ReadonlyQuat2} a the dual quaternion to rotate
+ * @returns {quat2} out
+ */
+export function rotateByQuatPrepend(out: quat2, q: quat.ReadonlyQuat, a: ReadonlyQuat2): quat2 {
+ let qx = q[0],
+ qy = q[1],
+ qz = q[2],
+ qw = q[3],
+ bx = a[0],
+ by = a[1],
+ bz = a[2],
+ bw = a[3];
+
+ out[0] = qx * bw + qw * bx + qy * bz - qz * by;
+ out[1] = qy * bw + qw * by + qz * bx - qx * bz;
+ out[2] = qz * bw + qw * bz + qx * by - qy * bx;
+ out[3] = qw * bw - qx * bx - qy * by - qz * bz;
+ bx = a[4];
+ by = a[5];
+ bz = a[6];
+ bw = a[7];
+ out[4] = qx * bw + qw * bx + qy * bz - qz * by;
+ out[5] = qy * bw + qw * by + qz * bx - qx * bz;
+ out[6] = qz * bw + qw * bz + qx * by - qy * bx;
+ out[7] = qw * bw - qx * bx - qy * by - qz * bz;
+ return out;
+}
+
+/**
+ * Rotates a dual quat around a given axis. Does the normalisation automatically
+ *
+ * @param {quat2} out the receiving dual quaternion
+ * @param {ReadonlyQuat2} a the dual quaternion to rotate
+ * @param {ReadonlyVec3} axis the axis to rotate around
+ * @param {Number} rad how far the rotation should be
+ * @returns {quat2} out
+ */
+export function rotateAroundAxis(out: quat2, a: ReadonlyQuat2, axis: vec3.ReadonlyVec3, rad: f64): quat2 {
+ //Special case for rad = 0
+ if (Math.abs(rad) < glMatrix.EPSILON) {
+ return copy(out, a);
+ }
+ let axisLength = Maths.hypot3(axis[0], axis[1], axis[2]);
+
+ rad = rad * 0.5;
+ let s = Math.sin(rad);
+ let bx = (s * axis[0]) / axisLength;
+ let by = (s * axis[1]) / axisLength;
+ let bz = (s * axis[2]) / axisLength;
+ let bw = Math.cos(rad);
+
+ let ax1 = a[0],
+ ay1 = a[1],
+ az1 = a[2],
+ aw1 = a[3];
+ out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;
+ out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;
+ out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;
+ out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;
+
+ let ax = a[4],
+ ay = a[5],
+ az = a[6],
+ aw = a[7];
+ out[4] = ax * bw + aw * bx + ay * bz - az * by;
+ out[5] = ay * bw + aw * by + az * bx - ax * bz;
+ out[6] = az * bw + aw * bz + ax * by - ay * bx;
+ out[7] = aw * bw - ax * bx - ay * by - az * bz;
+
+ return out;
+}
+
+/**
+ * Adds two dual quat's
+ *
+ * @param {quat2} out the receiving dual quaternion
+ * @param {ReadonlyQuat2} a the first operand
+ * @param {ReadonlyQuat2} b the second operand
+ * @returns {quat2} out
+ * @function
+ */
+export function add(out: quat2, a: ReadonlyQuat2, b: ReadonlyQuat2): quat2 {
+ out[0] = a[0] + b[0];
+ out[1] = a[1] + b[1];
+ out[2] = a[2] + b[2];
+ out[3] = a[3] + b[3];
+ out[4] = a[4] + b[4];
+ out[5] = a[5] + b[5];
+ out[6] = a[6] + b[6];
+ out[7] = a[7] + b[7];
+ return out;
+}
+
+/**
+ * Multiplies two dual quat's
+ *
+ * @param {quat2} out the receiving dual quaternion
+ * @param {ReadonlyQuat2} a the first operand
+ * @param {ReadonlyQuat2} b the second operand
+ * @returns {quat2} out
+ */
+export function multiply(out: quat2, a: ReadonlyQuat2, b: ReadonlyQuat2): quat2 {
+ let ax0 = a[0],
+ ay0 = a[1],
+ az0 = a[2],
+ aw0 = a[3],
+ bx1 = b[4],
+ by1 = b[5],
+ bz1 = b[6],
+ bw1 = b[7],
+ ax1 = a[4],
+ ay1 = a[5],
+ az1 = a[6],
+ aw1 = a[7],
+ bx0 = b[0],
+ by0 = b[1],
+ bz0 = b[2],
+ bw0 = b[3];
+ out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0;
+ out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0;
+ out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0;
+ out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0;
+ out[4] =
+ ax0 * bw1 +
+ aw0 * bx1 +
+ ay0 * bz1 -
+ az0 * by1 +
+ ax1 * bw0 +
+ aw1 * bx0 +
+ ay1 * bz0 -
+ az1 * by0;
+ out[5] =
+ ay0 * bw1 +
+ aw0 * by1 +
+ az0 * bx1 -
+ ax0 * bz1 +
+ ay1 * bw0 +
+ aw1 * by0 +
+ az1 * bx0 -
+ ax1 * bz0;
+ out[6] =
+ az0 * bw1 +
+ aw0 * bz1 +
+ ax0 * by1 -
+ ay0 * bx1 +
+ az1 * bw0 +
+ aw1 * bz0 +
+ ax1 * by0 -
+ ay1 * bx0;
+ out[7] =
+ aw0 * bw1 -
+ ax0 * bx1 -
+ ay0 * by1 -
+ az0 * bz1 +
+ aw1 * bw0 -
+ ax1 * bx0 -
+ ay1 * by0 -
+ az1 * bz0;
+ return out;
+}
+
+/**
+ * Alias for {@link quat2.multiply}
+ * @function
+ */
+export const mul = multiply;
+
+/**
+ * Scales a dual quat by a scalar number
+ *
+ * @param {quat2} out the receiving dual quat
+ * @param {ReadonlyQuat2} a the dual quat to scale
+ * @param {Number} b amount to scale the dual quat by
+ * @returns {quat2} out
+ * @function
+ */
+export function scale(out: quat2, a: ReadonlyQuat2, b: f64): quat2 {
+ out[0] = a[0] * b;
+ out[1] = a[1] * b;
+ out[2] = a[2] * b;
+ out[3] = a[3] * b;
+ out[4] = a[4] * b;
+ out[5] = a[5] * b;
+ out[6] = a[6] * b;
+ out[7] = a[7] * b;
+ return out;
+}
+
+/**
+ * Calculates the dot product of two dual quat's (The dot product of the real parts)
+ *
+ * @param {ReadonlyQuat2} a the first operand
+ * @param {ReadonlyQuat2} b the second operand
+ * @returns {Number} dot product of a and b
+ * @function
+ */
+export const dot = quat.dot;
+
+/**
+ * Performs a linear interpolation between two dual quats's
+ * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5)
+ *
+ * @param {quat2} out the receiving dual quat
+ * @param {ReadonlyQuat2} a the first operand
+ * @param {ReadonlyQuat2} b the second operand
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
+ * @returns {quat2} out
+ */
+export function lerp(out: quat2, a: ReadonlyQuat2, b: ReadonlyQuat2, t: f64): quat2 {
+ let mt = 1 - t;
+ if (dot(a, b) < 0) t = -t;
+
+ out[0] = a[0] * mt + b[0] * t;
+ out[1] = a[1] * mt + b[1] * t;
+ out[2] = a[2] * mt + b[2] * t;
+ out[3] = a[3] * mt + b[3] * t;
+ out[4] = a[4] * mt + b[4] * t;
+ out[5] = a[5] * mt + b[5] * t;
+ out[6] = a[6] * mt + b[6] * t;
+ out[7] = a[7] * mt + b[7] * t;
+
+ return out;
+}
+
+/**
+ * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper
+ *
+ * @param {quat2} out the receiving dual quaternion
+ * @param {ReadonlyQuat2} a dual quat to calculate inverse of
+ * @returns {quat2} out
+ */
+export function invert(out: quat2, a: ReadonlyQuat2): quat2 {
+ let sqlen = squaredLength(a);
+ out[0] = -a[0] / sqlen;
+ out[1] = -a[1] / sqlen;
+ out[2] = -a[2] / sqlen;
+ out[3] = a[3] / sqlen;
+ out[4] = -a[4] / sqlen;
+ out[5] = -a[5] / sqlen;
+ out[6] = -a[6] / sqlen;
+ out[7] = a[7] / sqlen;
+ return out;
+}
+
+/**
+ * Calculates the conjugate of a dual quat
+ * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result.
+ *
+ * @param {quat2} out the receiving quaternion
+ * @param {ReadonlyQuat2} a quat to calculate conjugate of
+ * @returns {quat2} out
+ */
+export function conjugate(out: quat2, a: ReadonlyQuat2): quat2 {
+ out[0] = -a[0];
+ out[1] = -a[1];
+ out[2] = -a[2];
+ out[3] = a[3];
+ out[4] = -a[4];
+ out[5] = -a[5];
+ out[6] = -a[6];
+ out[7] = a[7];
+ return out;
+}
+
+/**
+ * Calculates the length of a dual quat
+ *
+ * @param {ReadonlyQuat2} a dual quat to calculate length of
+ * @returns {Number} length of a
+ * @function
+ */
+export const length = quat.length;
+
+/**
+ * Alias for {@link quat2.length}
+ * @function
+ */
+export const len = length;
+
+/**
+ * Calculates the squared length of a dual quat
+ *
+ * @param {ReadonlyQuat2} a dual quat to calculate squared length of
+ * @returns {Number} squared length of a
+ * @function
+ */
+export const squaredLength = quat.squaredLength;
+
+/**
+ * Alias for {@link quat2.squaredLength}
+ * @function
+ */
+export const sqrLen = squaredLength;
+
+/**
+ * Normalize a dual quat
+ *
+ * @param {quat2} out the receiving dual quaternion
+ * @param {ReadonlyQuat2} a dual quaternion to normalize
+ * @returns {quat2} out
+ * @function
+ */
+export function normalize(out: quat2, a: ReadonlyQuat2): quat2 {
+ let magnitude = squaredLength(a);
+ if (magnitude > 0) {
+ magnitude = Math.sqrt(magnitude);
+
+ let a0 = a[0] / magnitude;
+ let a1 = a[1] / magnitude;
+ let a2 = a[2] / magnitude;
+ let a3 = a[3] / magnitude;
+
+ let b0 = a[4];
+ let b1 = a[5];
+ let b2 = a[6];
+ let b3 = a[7];
+
+ let a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3;
+
+ out[0] = a0;
+ out[1] = a1;
+ out[2] = a2;
+ out[3] = a3;
+
+ out[4] = (b0 - a0 * a_dot_b) / magnitude;
+ out[5] = (b1 - a1 * a_dot_b) / magnitude;
+ out[6] = (b2 - a2 * a_dot_b) / magnitude;
+ out[7] = (b3 - a3 * a_dot_b) / magnitude;
+ }
+ return out;
+}
+
+/**
+ * Returns a string representation of a dual quaternion
+ *
+ * @param {ReadonlyQuat2} a dual quaternion to represent as a string
+ * @returns {String} string representation of the dual quat
+ */
+export function str(a: ReadonlyQuat2): string {
+ return (
+ "quat2(" +
+ a[0].toString() +
+ ", " +
+ a[1].toString() +
+ ", " +
+ a[2].toString() +
+ ", " +
+ a[3].toString() +
+ ", " +
+ a[4].toString() +
+ ", " +
+ a[5].toString() +
+ ", " +
+ a[6].toString() +
+ ", " +
+ a[7].toString() +
+ ")"
+ );
+}
+
+/**
+ * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===)
+ *
+ * @param {ReadonlyQuat2} a the first dual quaternion.
+ * @param {ReadonlyQuat2} b the second dual quaternion.
+ * @returns {Boolean} true if the dual quaternions are equal, false otherwise.
+ */
+export function exactEquals(a: ReadonlyQuat2, b: ReadonlyQuat2): bool {
+ return (
+ a[0] === b[0] &&
+ a[1] === b[1] &&
+ a[2] === b[2] &&
+ a[3] === b[3] &&
+ a[4] === b[4] &&
+ a[5] === b[5] &&
+ a[6] === b[6] &&
+ a[7] === b[7]
+ );
+}
+
+/**
+ * Returns whether or not the dual quaternions have approximately the same elements in the same position.
+ *
+ * @param {ReadonlyQuat2} a the first dual quat.
+ * @param {ReadonlyQuat2} b the second dual quat.
+ * @returns {Boolean} true if the dual quats are equal, false otherwise.
+ */
+export function equals(a: ReadonlyQuat2, b: ReadonlyQuat2): bool {
+ let a0 = a[0],
+ a1 = a[1],
+ a2 = a[2],
+ a3 = a[3],
+ a4 = a[4],
+ a5 = a[5],
+ a6 = a[6],
+ a7 = a[7];
+ let b0 = b[0],
+ b1 = b[1],
+ b2 = b[2],
+ b3 = b[3],
+ b4 = b[4],
+ b5 = b[5],
+ b6 = b[6],
+ b7 = b[7];
+ return (
+ Math.abs(a0 - b0) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) &&
+ Math.abs(a1 - b1) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) &&
+ Math.abs(a2 - b2) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) &&
+ Math.abs(a3 - b3) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3)) &&
+ Math.abs(a4 - b4) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a4), Math.abs(b4)) &&
+ Math.abs(a5 - b5) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a5), Math.abs(b5)) &&
+ Math.abs(a6 - b6) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a6), Math.abs(b6)) &&
+ Math.abs(a7 - b7) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a7), Math.abs(b7))
+ );
+}
diff --git a/assembly/tsconfig.json b/assembly/tsconfig.json
new file mode 100644
index 00000000..0b761ae0
--- /dev/null
+++ b/assembly/tsconfig.json
@@ -0,0 +1,16 @@
+{
+ "extends": "assemblyscript/std/portable.json",
+ "compilerOptions": {
+ "module": "esnext",
+ "outDir": "../dist/loader",
+ "declarationDir": "../dist/loader",
+ "emitDeclarationOnly": true,
+ "declaration": true
+ },
+ "exclude": [
+ "**/*.spec.ts"
+ ],
+ "include": [
+ "**/*.ts"
+ ]
+}
\ No newline at end of file
diff --git a/assembly/vec2.ts b/assembly/vec2.ts
new file mode 100644
index 00000000..98ca20db
--- /dev/null
+++ b/assembly/vec2.ts
@@ -0,0 +1,637 @@
+import * as glMatrix from "./common";
+import { IArguments, IndexedCollection } from "./imports";
+import { Maths } from "./maths";
+import { ReadonlyMat2 } from "./mat2";
+import { ReadonlyMat2d } from "./mat2d";
+import { ReadonlyMat3 } from "./mat3";
+import { ReadonlyMat4 } from "./mat4";
+
+export type vec2 = IndexedCollection;
+
+export type ReadonlyVec2 = IndexedCollection;
+
+/**
+ * 2 Dimensional Vector
+ * @module vec2
+ */
+
+/**
+ * Creates a new, empty vec2
+ *
+ * @returns {vec2} a new 2D vector
+ */
+export function create(): vec2 {
+ let out = new Float64Array(2);
+ if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) {
+ out[0] = 0;
+ out[1] = 0;
+ }
+ return out;
+}
+
+/**
+ * Creates a new vec2 initialized with values from an existing vector
+ *
+ * @param {ReadonlyVec2} a vector to clone
+ * @returns {vec2} a new 2D vector
+ */
+export function clone(a: ReadonlyVec2): vec2 {
+ let out = new Float64Array(2);
+ out[0] = a[0];
+ out[1] = a[1];
+ return out;
+}
+
+/**
+ * Creates a new vec2 initialized with the given values
+ *
+ * @param {Number} x X component
+ * @param {Number} y Y component
+ * @returns {vec2} a new 2D vector
+ */
+export function fromValues(x: f64, y: f64): vec2 {
+ let out = new Float64Array(2);
+ out[0] = x;
+ out[1] = y;
+ return out;
+}
+
+/**
+ * Copy the values from one vec2 to another
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the source vector
+ * @returns {vec2} out
+ */
+export function copy(out: vec2, a: ReadonlyVec2): vec2 {
+ out[0] = a[0];
+ out[1] = a[1];
+ return out;
+}
+
+/**
+ * Set the components of a vec2 to the given values
+ *
+ * @param {vec2} out the receiving vector
+ * @param {Number} x X component
+ * @param {Number} y Y component
+ * @returns {vec2} out
+ */
+export function set(out: vec2, x: f64, y: f64): vec2 {
+ out[0] = x;
+ out[1] = y;
+ return out;
+}
+
+/**
+ * Adds two vec2's
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the first operand
+ * @param {ReadonlyVec2} b the second operand
+ * @returns {vec2} out
+ */
+export function add(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 {
+ out[0] = a[0] + b[0];
+ out[1] = a[1] + b[1];
+ return out;
+}
+
+/**
+ * Subtracts vector b from vector a
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the first operand
+ * @param {ReadonlyVec2} b the second operand
+ * @returns {vec2} out
+ */
+export function subtract(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 {
+ out[0] = a[0] - b[0];
+ out[1] = a[1] - b[1];
+ return out;
+}
+
+/**
+ * Multiplies two vec2's
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the first operand
+ * @param {ReadonlyVec2} b the second operand
+ * @returns {vec2} out
+ */
+export function multiply(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 {
+ out[0] = a[0] * b[0];
+ out[1] = a[1] * b[1];
+ return out;
+}
+
+/**
+ * Divides two vec2's
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the first operand
+ * @param {ReadonlyVec2} b the second operand
+ * @returns {vec2} out
+ */
+export function divide(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 {
+ out[0] = a[0] / b[0];
+ out[1] = a[1] / b[1];
+ return out;
+}
+
+/**
+ * Math.ceil the components of a vec2
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a vector to ceil
+ * @returns {vec2} out
+ */
+export function ceil(out: vec2, a: ReadonlyVec2): vec2 {
+ out[0] = Math.ceil(a[0]);
+ out[1] = Math.ceil(a[1]);
+ return out;
+}
+
+/**
+ * Math.floor the components of a vec2
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a vector to floor
+ * @returns {vec2} out
+ */
+export function floor(out: vec2, a: ReadonlyVec2): vec2 {
+ out[0] = Math.floor(a[0]);
+ out[1] = Math.floor(a[1]);
+ return out;
+}
+
+/**
+ * Returns the minimum of two vec2's
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the first operand
+ * @param {ReadonlyVec2} b the second operand
+ * @returns {vec2} out
+ */
+export function min(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 {
+ out[0] = Math.min(a[0], b[0]);
+ out[1] = Math.min(a[1], b[1]);
+ return out;
+}
+
+/**
+ * Returns the maximum of two vec2's
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the first operand
+ * @param {ReadonlyVec2} b the second operand
+ * @returns {vec2} out
+ */
+export function max(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 {
+ out[0] = Math.max(a[0], b[0]);
+ out[1] = Math.max(a[1], b[1]);
+ return out;
+}
+
+/**
+ * Math.round the components of a vec2
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a vector to round
+ * @returns {vec2} out
+ */
+export function round(out: vec2, a: ReadonlyVec2): vec2 {
+ out[0] = Math.round(a[0]);
+ out[1] = Math.round(a[1]);
+ return out;
+}
+
+/**
+ * Scales a vec2 by a scalar number
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the vector to scale
+ * @param {Number} b amount to scale the vector by
+ * @returns {vec2} out
+ */
+export function scale(out: vec2, a: ReadonlyVec2, b: f64): vec2 {
+ out[0] = a[0] * b;
+ out[1] = a[1] * b;
+ return out;
+}
+
+/**
+ * Adds two vec2's after scaling the second operand by a scalar value
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the first operand
+ * @param {ReadonlyVec2} b the second operand
+ * @param {Number} scale the amount to scale b by before adding
+ * @returns {vec2} out
+ */
+export function scaleAndAdd(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, scale: f64): vec2 {
+ out[0] = a[0] + b[0] * scale;
+ out[1] = a[1] + b[1] * scale;
+ return out;
+}
+
+/**
+ * Calculates the euclidian distance between two vec2's
+ *
+ * @param {ReadonlyVec2} a the first operand
+ * @param {ReadonlyVec2} b the second operand
+ * @returns {Number} distance between a and b
+ */
+export function distance(a: ReadonlyVec2, b: ReadonlyVec2): f64 {
+ var x = b[0] - a[0],
+ y = b[1] - a[1];
+ return Math.hypot(x, y);
+}
+
+/**
+ * Calculates the squared euclidian distance between two vec2's
+ *
+ * @param {ReadonlyVec2} a the first operand
+ * @param {ReadonlyVec2} b the second operand
+ * @returns {Number} squared distance between a and b
+ */
+export function squaredDistance(a: ReadonlyVec2, b: ReadonlyVec2): f64 {
+ var x = b[0] - a[0],
+ y = b[1] - a[1];
+ return x * x + y * y;
+}
+
+/**
+ * Calculates the length of a vec2
+ *
+ * @param {ReadonlyVec2} a vector to calculate length of
+ * @returns {Number} length of a
+ */
+export function length(a: ReadonlyVec2): f64 {
+ var x = a[0],
+ y = a[1];
+ return Math.hypot(x, y);
+}
+
+/**
+ * Calculates the squared length of a vec2
+ *
+ * @param {ReadonlyVec2} a vector to calculate squared length of
+ * @returns {Number} squared length of a
+ */
+export function squaredLength(a: ReadonlyVec2): f64 {
+ var x = a[0],
+ y = a[1];
+ return x * x + y * y;
+}
+
+/**
+ * Negates the components of a vec2
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a vector to negate
+ * @returns {vec2} out
+ */
+export function negate(out: vec2, a: ReadonlyVec2): vec2 {
+ out[0] = -a[0];
+ out[1] = -a[1];
+ return out;
+}
+
+/**
+ * Returns the inverse of the components of a vec2
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a vector to invert
+ * @returns {vec2} out
+ */
+export function inverse(out: vec2, a: ReadonlyVec2): vec2 {
+ out[0] = 1.0 / a[0];
+ out[1] = 1.0 / a[1];
+ return out;
+}
+
+/**
+ * Normalize a vec2
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a vector to normalize
+ * @returns {vec2} out
+ */
+export function normalize(out: vec2, a: ReadonlyVec2): vec2 {
+ var x = a[0],
+ y = a[1];
+ var len = x * x + y * y;
+ if (len > 0) {
+ //TODO: evaluate use of glm_invsqrt here?
+ len = 1 / Math.sqrt(len);
+ }
+ out[0] = a[0] * len;
+ out[1] = a[1] * len;
+ return out;
+}
+
+/**
+ * Calculates the dot product of two vec2's
+ *
+ * @param {ReadonlyVec2} a the first operand
+ * @param {ReadonlyVec2} b the second operand
+ * @returns {Number} dot product of a and b
+ */
+export function dot(a: ReadonlyVec2, b: ReadonlyVec2): f64 {
+ return a[0] * b[0] + a[1] * b[1];
+}
+
+/**
+ * Computes the cross product of two vec2's
+ * Note that the cross product must by definition produce a 3D vector
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec2} a the first operand
+ * @param {ReadonlyVec2} b the second operand
+ * @returns {vec3} out
+ */
+export function cross(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2 {
+ var z = a[0] * b[1] - a[1] * b[0];
+ out[0] = out[1] = 0;
+ out[2] = z;
+ return out;
+}
+
+/**
+ * Performs a linear interpolation between two vec2's
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the first operand
+ * @param {ReadonlyVec2} b the second operand
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
+ * @returns {vec2} out
+ */
+export function lerp(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, t: f64): vec2 {
+ var ax = a[0],
+ ay = a[1];
+ out[0] = ax + t * (b[0] - ax);
+ out[1] = ay + t * (b[1] - ay);
+ return out;
+}
+
+/**
+ * Generates a random vector with the given scale
+ *
+ * @param {vec2} out the receiving vector
+ * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned
+ * @returns {vec2} out
+ */
+export function random(out: vec2, scale: f64): vec2 {
+ scale = scale || 1.0;
+ var r = glMatrix.RANDOM() * 2.0 * Math.PI;
+ out[0] = Math.cos(r) * scale;
+ out[1] = Math.sin(r) * scale;
+ return out;
+}
+
+/**
+ * Transforms the vec2 with a mat2
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the vector to transform
+ * @param {ReadonlyMat2} m matrix to transform with
+ * @returns {vec2} out
+ */
+export function transformMat2(out: vec2, a: ReadonlyVec2, m: ReadonlyMat2): vec2 {
+ var x = a[0],
+ y = a[1];
+ out[0] = m[0] * x + m[2] * y;
+ out[1] = m[1] * x + m[3] * y;
+ return out;
+}
+
+/**
+ * Transforms the vec2 with a mat2d
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the vector to transform
+ * @param {ReadonlyMat2d} m matrix to transform with
+ * @returns {vec2} out
+ */
+export function transformMat2d(out: vec2, a: ReadonlyVec2, m: ReadonlyMat2d): vec2 {
+ var x = a[0],
+ y = a[1];
+ out[0] = m[0] * x + m[2] * y + m[4];
+ out[1] = m[1] * x + m[3] * y + m[5];
+ return out;
+}
+
+/**
+ * Transforms the vec2 with a mat3
+ * 3rd vector component is implicitly '1'
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the vector to transform
+ * @param {ReadonlyMat3} m matrix to transform with
+ * @returns {vec2} out
+ */
+export function transformMat3(out: vec2, a: ReadonlyVec2, m: ReadonlyMat3): vec2 {
+ var x = a[0],
+ y = a[1];
+ out[0] = m[0] * x + m[3] * y + m[6];
+ out[1] = m[1] * x + m[4] * y + m[7];
+ return out;
+}
+
+/**
+ * Transforms the vec2 with a mat4
+ * 3rd vector component is implicitly '0'
+ * 4th vector component is implicitly '1'
+ *
+ * @param {vec2} out the receiving vector
+ * @param {ReadonlyVec2} a the vector to transform
+ * @param {ReadonlyMat4} m matrix to transform with
+ * @returns {vec2} out
+ */
+export function transformMat4(out: vec2, a: ReadonlyVec2, m: ReadonlyMat4): vec2 {
+ let x = a[0];
+ let y = a[1];
+ out[0] = m[0] * x + m[4] * y + m[12];
+ out[1] = m[1] * x + m[5] * y + m[13];
+ return out;
+}
+
+/**
+ * Rotate a 2D vector
+ * @param {vec2} out The receiving vec2
+ * @param {ReadonlyVec2} a The vec2 point to rotate
+ * @param {ReadonlyVec2} b The origin of the rotation
+ * @param {Number} rad The angle of rotation in radians
+ * @returns {vec2} out
+ */
+export function rotate(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, rad: f64): vec2 {
+ //Translate point to the origin
+ let p0 = a[0] - b[0],
+ p1 = a[1] - b[1],
+ sinC = Math.sin(rad),
+ cosC = Math.cos(rad);
+
+ //perform rotation and translate to correct position
+ out[0] = p0 * cosC - p1 * sinC + b[0];
+ out[1] = p0 * sinC + p1 * cosC + b[1];
+
+ return out;
+}
+
+/**
+ * Get the angle between two 2D vectors
+ * @param {ReadonlyVec2} a The first operand
+ * @param {ReadonlyVec2} b The second operand
+ * @returns {Number} The angle in radians
+ */
+export function angle(a: ReadonlyVec2, b: ReadonlyVec2): f64 {
+ let x1 = a[0],
+ y1 = a[1],
+ x2 = b[0],
+ y2 = b[1],
+ // mag is the product of the magnitudes of a and b
+ mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2),
+ // mag &&.. short circuits if mag == 0
+ cosine = mag && (x1 * x2 + y1 * y2) / mag;
+ // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1
+ return Math.acos(Math.min(Math.max(cosine, -1), 1));
+}
+
+/**
+ * Set the components of a vec2 to zero
+ *
+ * @param {vec2} out the receiving vector
+ * @returns {vec2} out
+ */
+export function zero(out: vec2): vec2 {
+ out[0] = 0.0;
+ out[1] = 0.0;
+ return out;
+}
+
+/**
+ * Returns a string representation of a vector
+ *
+ * @param {ReadonlyVec2} a vector to represent as a string
+ * @returns {String} string representation of the vector
+ */
+export function str(a: ReadonlyVec2): string {
+ return "vec2(" + a[0].toString() + ", " + a[1].toString() + ")";
+}
+
+/**
+ * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)
+ *
+ * @param {ReadonlyVec2} a The first vector.
+ * @param {ReadonlyVec2} b The second vector.
+ * @returns {Boolean} True if the vectors are equal, false otherwise.
+ */
+export function exactEquals(a: ReadonlyVec2, b: ReadonlyVec2): bool {
+ return a[0] === b[0] && a[1] === b[1];
+}
+
+/**
+ * Returns whether or not the vectors have approximately the same elements in the same position.
+ *
+ * @param {ReadonlyVec2} a The first vector.
+ * @param {ReadonlyVec2} b The second vector.
+ * @returns {Boolean} True if the vectors are equal, false otherwise.
+ */
+export function equals(a: ReadonlyVec2, b: ReadonlyVec2): bool {
+ let a0 = a[0],
+ a1 = a[1];
+ let b0 = b[0],
+ b1 = b[1];
+ return (
+ Math.abs(a0 - b0) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) &&
+ Math.abs(a1 - b1) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1))
+ );
+}
+
+/**
+ * Alias for {@link vec2.length}
+ * @function
+ */
+export const len = length;
+
+/**
+ * Alias for {@link vec2.subtract}
+ * @function
+ */
+export const sub = subtract;
+
+/**
+ * Alias for {@link vec2.multiply}
+ * @function
+ */
+export const mul = multiply;
+
+/**
+ * Alias for {@link vec2.divide}
+ * @function
+ */
+export const div = divide;
+
+/**
+ * Alias for {@link vec2.distance}
+ * @function
+ */
+export const dist = distance;
+
+/**
+ * Alias for {@link vec2.squaredDistance}
+ * @function
+ */
+export const sqrDist = squaredDistance;
+
+/**
+ * Alias for {@link vec2.squaredLength}
+ * @function
+ */
+export const sqrLen = squaredLength;
+
+/**
+ * Perform some operation over an array of vec2s.
+ *
+ * @param {Array} a the array of vectors to iterate over
+ * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed
+ * @param {Number} offset Number of elements to skip at the beginning of the array
+ * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array
+ * @param {Function} fn Function to call for each vector in the array
+ * @param {Object} [arg] additional argument to pass to fn
+ * @returns {Array} a
+ * @function
+ */
+ let vec = create();
+export const forEach = ((): (a: vec2, stride: i32, offset: i32, count: i32, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) => vec2 => {
+
+ return function (a: vec2, stride: i32, offset: i32, count: i32, fn: (a: vec2, b: vec2, arg: IArguments) => void, arg: IArguments) {
+ let i: i32, l: i32;
+ if (!stride) {
+ stride = 2;
+ }
+
+ if (!offset) {
+ offset = 0;
+ }
+
+ if (count) {
+ l = Math.min(count * stride + offset, a.length);
+ } else {
+ l = a.length;
+ }
+
+ for (i = offset; i < l; i += stride) {
+ vec[0] = a[i];
+ vec[1] = a[i + 1];
+ fn(vec, vec, arg);
+ a[i] = vec[0];
+ a[i + 1] = vec[1];
+ }
+
+ return a;
+ };
+})();
diff --git a/assembly/vec3.ts b/assembly/vec3.ts
new file mode 100644
index 00000000..a80c073d
--- /dev/null
+++ b/assembly/vec3.ts
@@ -0,0 +1,837 @@
+import * as glMatrix from "./common";
+import { IArguments, IndexedCollection } from "./imports";
+import { Maths } from "./maths";
+import { ReadonlyMat3 } from "./mat3";
+import { ReadonlyMat4 } from "./mat4";
+import { ReadonlyQuat } from "./quat";
+
+export type vec3 = IndexedCollection;
+
+export type ReadonlyVec3 = IndexedCollection;
+
+/**
+ * 3 Dimensional Vector
+ * @module vec3
+ */
+
+/**
+ * Creates a new, empty vec3
+ *
+ * @returns {vec3} a new 3D vector
+ */
+export function create(): vec3 {
+ let out = new Float64Array(3);
+ if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) {
+ out[0] = 0;
+ out[1] = 0;
+ out[2] = 0;
+ }
+ return out;
+}
+
+/**
+ * Creates a new vec3 initialized with values from an existing vector
+ *
+ * @param {ReadonlyVec3} a vector to clone
+ * @returns {vec3} a new 3D vector
+ */
+export function clone(a: ReadonlyVec3): vec3 {
+ var out = new Float64Array(3);
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ return out;
+}
+
+/**
+ * Calculates the length of a vec3
+ *
+ * @param {ReadonlyVec3} a vector to calculate length of
+ * @returns {Number} length of a
+ */
+export function length(a: ReadonlyVec3): f64 {
+ let x = a[0];
+ let y = a[1];
+ let z = a[2];
+ return Maths.hypot3(x, y, z);
+}
+
+/**
+ * Creates a new vec3 initialized with the given values
+ *
+ * @param {Number} x X component
+ * @param {Number} y Y component
+ * @param {Number} z Z component
+ * @returns {vec3} a new 3D vector
+ */
+export function fromValues(x: f64, y: f64, z: f64): vec3 {
+ let out = new Float64Array(3);
+ out[0] = x;
+ out[1] = y;
+ out[2] = z;
+ return out;
+}
+
+/**
+ * Copy the values from one vec3 to another
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the source vector
+ * @returns {vec3} out
+ */
+export function copy(out: vec3, a: ReadonlyVec3): vec3 {
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ return out;
+}
+
+/**
+ * Set the components of a vec3 to the given values
+ *
+ * @param {vec3} out the receiving vector
+ * @param {Number} x X component
+ * @param {Number} y Y component
+ * @param {Number} z Z component
+ * @returns {vec3} out
+ */
+export function set(out: vec3, x: f64, y: f64, z: f64): vec3 {
+ out[0] = x;
+ out[1] = y;
+ out[2] = z;
+ return out;
+}
+
+/**
+ * Adds two vec3's
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @returns {vec3} out
+ */
+export function add(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 {
+ out[0] = a[0] + b[0];
+ out[1] = a[1] + b[1];
+ out[2] = a[2] + b[2];
+ return out;
+}
+
+/**
+ * Subtracts vector b from vector a
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @returns {vec3} out
+ */
+export function subtract(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 {
+ out[0] = a[0] - b[0];
+ out[1] = a[1] - b[1];
+ out[2] = a[2] - b[2];
+ return out;
+}
+
+/**
+ * Multiplies two vec3's
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @returns {vec3} out
+ */
+export function multiply(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 {
+ out[0] = a[0] * b[0];
+ out[1] = a[1] * b[1];
+ out[2] = a[2] * b[2];
+ return out;
+}
+
+/**
+ * Divides two vec3's
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @returns {vec3} out
+ */
+export function divide(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 {
+ out[0] = a[0] / b[0];
+ out[1] = a[1] / b[1];
+ out[2] = a[2] / b[2];
+ return out;
+}
+
+/**
+ * Math.ceil the components of a vec3
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a vector to ceil
+ * @returns {vec3} out
+ */
+export function ceil(out: vec3, a: ReadonlyVec3): vec3 {
+ out[0] = Math.ceil(a[0]);
+ out[1] = Math.ceil(a[1]);
+ out[2] = Math.ceil(a[2]);
+ return out;
+}
+
+/**
+ * Math.floor the components of a vec3
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a vector to floor
+ * @returns {vec3} out
+ */
+export function floor(out: vec3, a: ReadonlyVec3): vec3 {
+ out[0] = Math.floor(a[0]);
+ out[1] = Math.floor(a[1]);
+ out[2] = Math.floor(a[2]);
+ return out;
+}
+
+/**
+ * Returns the minimum of two vec3's
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @returns {vec3} out
+ */
+export function min(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 {
+ out[0] = Math.min(a[0], b[0]);
+ out[1] = Math.min(a[1], b[1]);
+ out[2] = Math.min(a[2], b[2]);
+ return out;
+}
+
+/**
+ * Returns the maximum of two vec3's
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @returns {vec3} out
+ */
+export function max(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 {
+ out[0] = Math.max(a[0], b[0]);
+ out[1] = Math.max(a[1], b[1]);
+ out[2] = Math.max(a[2], b[2]);
+ return out;
+}
+
+/**
+ * Math.round the components of a vec3
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a vector to round
+ * @returns {vec3} out
+ */
+export function round(out: vec3, a: ReadonlyVec3): vec3 {
+ out[0] = Math.round(a[0]);
+ out[1] = Math.round(a[1]);
+ out[2] = Math.round(a[2]);
+ return out;
+}
+
+/**
+ * Scales a vec3 by a scalar number
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the vector to scale
+ * @param {Number} b amount to scale the vector by
+ * @returns {vec3} out
+ */
+export function scale(out: vec3, a: ReadonlyVec3, b: f64): vec3 {
+ out[0] = a[0] * b;
+ out[1] = a[1] * b;
+ out[2] = a[2] * b;
+ return out;
+}
+
+/**
+ * Adds two vec3's after scaling the second operand by a scalar value
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @param {Number} scale the amount to scale b by before adding
+ * @returns {vec3} out
+ */
+export function scaleAndAdd(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, scale: f64): vec3 {
+ out[0] = a[0] + b[0] * scale;
+ out[1] = a[1] + b[1] * scale;
+ out[2] = a[2] + b[2] * scale;
+ return out;
+}
+
+/**
+ * Calculates the euclidian distance between two vec3's
+ *
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @returns {Number} distance between a and b
+ */
+export function distance(a: ReadonlyVec3, b: ReadonlyVec3): f64 {
+ let x = b[0] - a[0];
+ let y = b[1] - a[1];
+ let z = b[2] - a[2];
+ return Maths.hypot3(x, y, z);
+}
+
+/**
+ * Calculates the squared euclidian distance between two vec3's
+ *
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @returns {Number} squared distance between a and b
+ */
+export function squaredDistance(a: ReadonlyVec3, b: ReadonlyVec3): f64 {
+ let x = b[0] - a[0];
+ let y = b[1] - a[1];
+ let z = b[2] - a[2];
+ return x * x + y * y + z * z;
+}
+
+/**
+ * Calculates the squared length of a vec3
+ *
+ * @param {ReadonlyVec3} a vector to calculate squared length of
+ * @returns {Number} squared length of a
+ */
+export function squaredLength(a: ReadonlyVec3): f64 {
+ let x = a[0];
+ let y = a[1];
+ let z = a[2];
+ return x * x + y * y + z * z;
+}
+
+/**
+ * Negates the components of a vec3
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a vector to negate
+ * @returns {vec3} out
+ */
+export function negate(out: vec3, a: ReadonlyVec3): vec3 {
+ out[0] = -a[0];
+ out[1] = -a[1];
+ out[2] = -a[2];
+ return out;
+}
+
+/**
+ * Returns the inverse of the components of a vec3
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a vector to invert
+ * @returns {vec3} out
+ */
+export function inverse(out: vec3, a: ReadonlyVec3): vec3 {
+ out[0] = 1.0 / a[0];
+ out[1] = 1.0 / a[1];
+ out[2] = 1.0 / a[2];
+ return out;
+}
+
+/**
+ * Normalize a vec3
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a vector to normalize
+ * @returns {vec3} out
+ */
+export function normalize(out: vec3, a: ReadonlyVec3): vec3 {
+ let x = a[0];
+ let y = a[1];
+ let z = a[2];
+ let len = x * x + y * y + z * z;
+ if (len > 0) {
+ //TODO: evaluate use of glm_invsqrt here?
+ len = 1 / Math.sqrt(len);
+ }
+ out[0] = a[0] * len;
+ out[1] = a[1] * len;
+ out[2] = a[2] * len;
+ return out;
+}
+
+/**
+ * Calculates the dot product of two vec3's
+ *
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @returns {Number} dot product of a and b
+ */
+export function dot(a: ReadonlyVec3, b: ReadonlyVec3): f64 {
+ return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
+}
+
+/**
+ * Computes the cross product of two vec3's
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @returns {vec3} out
+ */
+export function cross(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3 {
+ let ax = a[0],
+ ay = a[1],
+ az = a[2];
+ let bx = b[0],
+ by = b[1],
+ bz = b[2];
+
+ out[0] = ay * bz - az * by;
+ out[1] = az * bx - ax * bz;
+ out[2] = ax * by - ay * bx;
+ return out;
+}
+
+/**
+ * Performs a linear interpolation between two vec3's
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
+ * @returns {vec3} out
+ */
+export function lerp(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, t: f64): vec3 {
+ let ax = a[0];
+ let ay = a[1];
+ let az = a[2];
+ out[0] = ax + t * (b[0] - ax);
+ out[1] = ay + t * (b[1] - ay);
+ out[2] = az + t * (b[2] - az);
+ return out;
+}
+
+/**
+ * Performs a spherical linear interpolation between two vec3's
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
+ * @returns {vec3} out
+ */
+export function slerp(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, t: f64): vec3 {
+ let angle = Math.acos(Math.min(Math.max(dot(a, b), -1), 1));
+ let sinTotal = Math.sin(angle);
+
+ let ratioA = Math.sin((1 - t) * angle) / sinTotal;
+ let ratioB = Math.sin(t * angle) / sinTotal;
+ out[0] = ratioA * a[0] + ratioB * b[0];
+ out[1] = ratioA * a[1] + ratioB * b[1];
+ out[2] = ratioA * a[2] + ratioB * b[2];
+
+ return out;
+}
+
+/**
+ * Performs a hermite interpolation with two control points
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @param {ReadonlyVec3} c the third operand
+ * @param {ReadonlyVec3} d the fourth operand
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
+ * @returns {vec3} out
+ */
+export function hermite(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, c: ReadonlyVec3, d: ReadonlyVec3, t: f64): vec3 {
+ let factorTimes2 = t * t;
+ let factor1 = factorTimes2 * (2 * t - 3) + 1;
+ let factor2 = factorTimes2 * (t - 2) + t;
+ let factor3 = factorTimes2 * (t - 1);
+ let factor4 = factorTimes2 * (3 - 2 * t);
+
+ out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
+ out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
+ out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
+
+ return out;
+}
+
+/**
+ * Performs a bezier interpolation with two control points
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the first operand
+ * @param {ReadonlyVec3} b the second operand
+ * @param {ReadonlyVec3} c the third operand
+ * @param {ReadonlyVec3} d the fourth operand
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
+ * @returns {vec3} out
+ */
+export function bezier(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, c: ReadonlyVec3, d: ReadonlyVec3, t: f64): vec3 {
+ let inverseFactor = 1 - t;
+ let inverseFactorTimesTwo = inverseFactor * inverseFactor;
+ let factorTimes2 = t * t;
+ let factor1 = inverseFactorTimesTwo * inverseFactor;
+ let factor2 = 3 * t * inverseFactorTimesTwo;
+ let factor3 = 3 * factorTimes2 * inverseFactor;
+ let factor4 = factorTimes2 * t;
+
+ out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
+ out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
+ out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
+
+ return out;
+}
+
+/**
+ * Generates a random vector with the given scale
+ *
+ * @param {vec3} out the receiving vector
+ * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned
+ * @returns {vec3} out
+ */
+export function random(out: vec3, scale: f64): vec3 {
+ scale = scale || 1.0;
+
+ let r = glMatrix.RANDOM() * 2.0 * Math.PI;
+ let z = glMatrix.RANDOM() * 2.0 - 1.0;
+ let zScale = Math.sqrt(1.0 - z * z) * scale;
+
+ out[0] = Math.cos(r) * zScale;
+ out[1] = Math.sin(r) * zScale;
+ out[2] = z * scale;
+ return out;
+}
+
+/**
+ * Transforms the vec3 with a mat4.
+ * 4th vector component is implicitly '1'
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the vector to transform
+ * @param {ReadonlyMat4} m matrix to transform with
+ * @returns {vec3} out
+ */
+export function transformMat4(out: vec3, a: ReadonlyVec3, m: ReadonlyMat4): vec3 {
+ let x = a[0],
+ y = a[1],
+ z = a[2];
+ let w = m[3] * x + m[7] * y + m[11] * z + m[15];
+ w = w || 1.0;
+ out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;
+ out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;
+ out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;
+ return out;
+}
+
+/**
+ * Transforms the vec3 with a mat3.
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the vector to transform
+ * @param {ReadonlyMat3} m the 3x3 matrix to transform with
+ * @returns {vec3} out
+ */
+export function transformMat3(out: vec3, a: ReadonlyVec3, m: ReadonlyMat3): vec3 {
+ let x = a[0],
+ y = a[1],
+ z = a[2];
+ out[0] = x * m[0] + y * m[3] + z * m[6];
+ out[1] = x * m[1] + y * m[4] + z * m[7];
+ out[2] = x * m[2] + y * m[5] + z * m[8];
+ return out;
+}
+
+/**
+ * Transforms the vec3 with a quat
+ * Can also be used for dual quaternions. (Multiply it with the real part)
+ *
+ * @param {vec3} out the receiving vector
+ * @param {ReadonlyVec3} a the vector to transform
+ * @param {ReadonlyQuat} q quaternion to transform with
+ * @returns {vec3} out
+ */
+export function transformQuat(out: vec3, a: ReadonlyVec3, q: ReadonlyQuat): vec3 {
+ // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed
+ let qx = q[0],
+ qy = q[1],
+ qz = q[2],
+ qw = q[3];
+ let x = a[0],
+ y = a[1],
+ z = a[2];
+ // var qvec = [qx, qy, qz];
+ // var uv = vec3.cross([], qvec, a);
+ let uvx = qy * z - qz * y,
+ uvy = qz * x - qx * z,
+ uvz = qx * y - qy * x;
+ // var uuv = vec3.cross([], qvec, uv);
+ let uuvx = qy * uvz - qz * uvy,
+ uuvy = qz * uvx - qx * uvz,
+ uuvz = qx * uvy - qy * uvx;
+ // vec3.scale(uv, uv, 2 * w);
+ let w2 = qw * 2;
+ uvx *= w2;
+ uvy *= w2;
+ uvz *= w2;
+ // vec3.scale(uuv, uuv, 2);
+ uuvx *= 2;
+ uuvy *= 2;
+ uuvz *= 2;
+ // return vec3.add(out, a, vec3.add(out, uv, uuv));
+ out[0] = x + uvx + uuvx;
+ out[1] = y + uvy + uuvy;
+ out[2] = z + uvz + uuvz;
+ return out;
+}
+
+/**
+ * Rotate a 3D vector around the x-axis
+ * @param {vec3} out The receiving vec3
+ * @param {ReadonlyVec3} a The vec3 point to rotate
+ * @param {ReadonlyVec3} b The origin of the rotation
+ * @param {Number} rad The angle of rotation in radians
+ * @returns {vec3} out
+ */
+export function rotateX(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: f64): vec3 {
+ let p: f64[] = [],
+ r: f64[] = [];
+ //Translate point to the origin
+ p[0] = a[0] - b[0];
+ p[1] = a[1] - b[1];
+ p[2] = a[2] - b[2];
+
+ //perform rotation
+ r[0] = p[0];
+ r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);
+ r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad);
+
+ //translate to correct position
+ out[0] = r[0] + b[0];
+ out[1] = r[1] + b[1];
+ out[2] = r[2] + b[2];
+
+ return out;
+}
+
+/**
+ * Rotate a 3D vector around the y-axis
+ * @param {vec3} out The receiving vec3
+ * @param {ReadonlyVec3} a The vec3 point to rotate
+ * @param {ReadonlyVec3} b The origin of the rotation
+ * @param {Number} rad The angle of rotation in radians
+ * @returns {vec3} out
+ */
+export function rotateY(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: f64): vec3 {
+ let p: f64[] = [],
+ r: f64[] = [];
+ //Translate point to the origin
+ p[0] = a[0] - b[0];
+ p[1] = a[1] - b[1];
+ p[2] = a[2] - b[2];
+
+ //perform rotation
+ r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);
+ r[1] = p[1];
+ r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad);
+
+ //translate to correct position
+ out[0] = r[0] + b[0];
+ out[1] = r[1] + b[1];
+ out[2] = r[2] + b[2];
+
+ return out;
+}
+
+/**
+ * Rotate a 3D vector around the z-axis
+ * @param {vec3} out The receiving vec3
+ * @param {ReadonlyVec3} a The vec3 point to rotate
+ * @param {ReadonlyVec3} b The origin of the rotation
+ * @param {Number} rad The angle of rotation in radians
+ * @returns {vec3} out
+ */
+export function rotateZ(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: f64): vec3 {
+ let p: f64[] = [],
+ r: f64[] = [];
+ //Translate point to the origin
+ p[0] = a[0] - b[0];
+ p[1] = a[1] - b[1];
+ p[2] = a[2] - b[2];
+
+ //perform rotation
+ r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);
+ r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);
+ r[2] = p[2];
+
+ //translate to correct position
+ out[0] = r[0] + b[0];
+ out[1] = r[1] + b[1];
+ out[2] = r[2] + b[2];
+
+ return out;
+}
+
+/**
+ * Get the angle between two 3D vectors
+ * @param {ReadonlyVec3} a The first operand
+ * @param {ReadonlyVec3} b The second operand
+ * @returns {Number} The angle in radians
+ */
+export function angle(a: ReadonlyVec3, b: ReadonlyVec3): f64 {
+ let ax = a[0],
+ ay = a[1],
+ az = a[2],
+ bx = b[0],
+ by = b[1],
+ bz = b[2],
+ mag1 = Math.sqrt(ax * ax + ay * ay + az * az),
+ mag2 = Math.sqrt(bx * bx + by * by + bz * bz),
+ mag = mag1 * mag2,
+ cosine = mag && dot(a, b) / mag;
+ return Math.acos(Math.min(Math.max(cosine, -1), 1));
+}
+
+/**
+ * Set the components of a vec3 to zero
+ *
+ * @param {vec3} out the receiving vector
+ * @returns {vec3} out
+ */
+export function zero(out: vec3): vec3 {
+ out[0] = 0.0;
+ out[1] = 0.0;
+ out[2] = 0.0;
+ return out;
+}
+
+/**
+ * Returns a string representation of a vector
+ *
+ * @param {ReadonlyVec3} a vector to represent as a string
+ * @returns {String} string representation of the vector
+ */
+export function str(a: ReadonlyVec3): string {
+ return "vec3(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ")";
+}
+
+/**
+ * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
+ *
+ * @param {ReadonlyVec3} a The first vector.
+ * @param {ReadonlyVec3} b The second vector.
+ * @returns {Boolean} True if the vectors are equal, false otherwise.
+ */
+export function exactEquals(a: ReadonlyVec3, b: ReadonlyVec3): bool {
+ return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];
+}
+
+/**
+ * Returns whether or not the vectors have approximately the same elements in the same position.
+ *
+ * @param {ReadonlyVec3} a The first vector.
+ * @param {ReadonlyVec3} b The second vector.
+ * @returns {Boolean} True if the vectors are equal, false otherwise.
+ */
+export function equals(a: ReadonlyVec3, b: ReadonlyVec3): bool {
+ let a0 = a[0],
+ a1 = a[1],
+ a2 = a[2];
+ let b0 = b[0],
+ b1 = b[1],
+ b2 = b[2];
+ return (
+ Math.abs(a0 - b0) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) &&
+ Math.abs(a1 - b1) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) &&
+ Math.abs(a2 - b2) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2))
+ );
+}
+
+/**
+ * Alias for {@link vec3.subtract}
+ * @function
+ */
+export const sub = subtract;
+
+/**
+ * Alias for {@link vec3.multiply}
+ * @function
+ */
+export const mul = multiply;
+
+/**
+ * Alias for {@link vec3.divide}
+ * @function
+ */
+export const div = divide;
+
+/**
+ * Alias for {@link vec3.distance}
+ * @function
+ */
+export const dist = distance;
+
+/**
+ * Alias for {@link vec3.squaredDistance}
+ * @function
+ */
+export const sqrDist = squaredDistance;
+
+/**
+ * Alias for {@link vec3.length}
+ * @function
+ */
+export const len = length;
+
+/**
+ * Alias for {@link vec3.squaredLength}
+ * @function
+ */
+export const sqrLen = squaredLength;
+
+/**
+ * Perform some operation over an array of vec3s.
+ *
+ * @param {Array} a the array of vectors to iterate over
+ * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed
+ * @param {Number} offset Number of elements to skip at the beginning of the array
+ * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array
+ * @param {Function} fn Function to call for each vector in the array
+ * @param {Object} [arg] additional argument to pass to fn
+ * @returns {Array} a
+ * @function
+ */
+ let vec = create();
+export const forEach = ((): (a: vec3, stride: i32, offset: i32, count: i32, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) => vec3 => {
+
+ return function(a: vec3, stride: i32, offset: i32, count: i32, fn: (a: vec3, b: vec3, arg: IArguments) => void, arg: IArguments) {
+ let i: i32, l: i32;
+ if (!stride) {
+ stride = 3;
+ }
+
+ if (!offset) {
+ offset = 0;
+ }
+
+ if (count) {
+ l = Math.min(count * stride + offset, a.length);
+ } else {
+ l = a.length;
+ }
+
+ for (i = offset; i < l; i += stride) {
+ vec[0] = a[i];
+ vec[1] = a[i + 1];
+ vec[2] = a[i + 2];
+ fn(vec, vec, arg);
+ a[i] = vec[0];
+ a[i + 1] = vec[1];
+ a[i + 2] = vec[2];
+ }
+
+ return a;
+ };
+})();
diff --git a/assembly/vec4.ts b/assembly/vec4.ts
new file mode 100644
index 00000000..8fc7911d
--- /dev/null
+++ b/assembly/vec4.ts
@@ -0,0 +1,678 @@
+import * as glMatrix from "./common";
+import { IArguments, IndexedCollection } from "./imports";
+import { Maths } from "./maths";
+import { ReadonlyQuat } from "./quat";
+
+export type vec4 = IndexedCollection;
+
+export type ReadonlyVec4 = IndexedCollection;
+
+/**
+ * 4 Dimensional Vector
+ * @module vec4
+ */
+
+/**
+ * Creates a new, empty vec4
+ *
+ * @returns {vec4} a new 4D vector
+ */
+export function create(): vec4 {
+ let out = new Float64Array(4);
+ if (glMatrix.ARRAY_TYPE != glMatrix.ArrayTypeEnum.Float64ArrayT) {
+ out[0] = 0;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 0;
+ }
+ return out;
+}
+
+/**
+ * Creates a new vec4 initialized with values from an existing vector
+ *
+ * @param {ReadonlyVec4} a vector to clone
+ * @returns {vec4} a new 4D vector
+ */
+export function clone(a: ReadonlyVec4): vec4 {
+ let out = new Float64Array(4);
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ out[3] = a[3];
+ return out;
+}
+
+/**
+ * Creates a new vec4 initialized with the given values
+ *
+ * @param {Number} x X component
+ * @param {Number} y Y component
+ * @param {Number} z Z component
+ * @param {Number} w W component
+ * @returns {vec4} a new 4D vector
+ */
+export function fromValues(x: f64, y: f64, z: f64, w: f64): vec4 {
+ let out = new Float64Array(4);
+ out[0] = x;
+ out[1] = y;
+ out[2] = z;
+ out[3] = w;
+ return out;
+}
+
+/**
+ * Copy the values from one vec4 to another
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a the source vector
+ * @returns {vec4} out
+ */
+export function copy(out: vec4, a: ReadonlyVec4): vec4 {
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ out[3] = a[3];
+ return out;
+}
+
+/**
+ * Set the components of a vec4 to the given values
+ *
+ * @param {vec4} out the receiving vector
+ * @param {Number} x X component
+ * @param {Number} y Y component
+ * @param {Number} z Z component
+ * @param {Number} w W component
+ * @returns {vec4} out
+ */
+export function set(out: vec4, x: f64, y: f64, z: f64, w: f64): vec4 {
+ out[0] = x;
+ out[1] = y;
+ out[2] = z;
+ out[3] = w;
+ return out;
+}
+
+/**
+ * Adds two vec4's
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a the first operand
+ * @param {ReadonlyVec4} b the second operand
+ * @returns {vec4} out
+ */
+export function add(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 {
+ out[0] = a[0] + b[0];
+ out[1] = a[1] + b[1];
+ out[2] = a[2] + b[2];
+ out[3] = a[3] + b[3];
+ return out;
+}
+
+/**
+ * Subtracts vector b from vector a
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a the first operand
+ * @param {ReadonlyVec4} b the second operand
+ * @returns {vec4} out
+ */
+export function subtract(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 {
+ out[0] = a[0] - b[0];
+ out[1] = a[1] - b[1];
+ out[2] = a[2] - b[2];
+ out[3] = a[3] - b[3];
+ return out;
+}
+
+/**
+ * Multiplies two vec4's
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a the first operand
+ * @param {ReadonlyVec4} b the second operand
+ * @returns {vec4} out
+ */
+export function multiply(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 {
+ out[0] = a[0] * b[0];
+ out[1] = a[1] * b[1];
+ out[2] = a[2] * b[2];
+ out[3] = a[3] * b[3];
+ return out;
+}
+
+/**
+ * Divides two vec4's
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a the first operand
+ * @param {ReadonlyVec4} b the second operand
+ * @returns {vec4} out
+ */
+export function divide(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 {
+ out[0] = a[0] / b[0];
+ out[1] = a[1] / b[1];
+ out[2] = a[2] / b[2];
+ out[3] = a[3] / b[3];
+ return out;
+}
+
+/**
+ * Math.ceil the components of a vec4
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a vector to ceil
+ * @returns {vec4} out
+ */
+export function ceil(out: vec4, a: ReadonlyVec4): vec4 {
+ out[0] = Math.ceil(a[0]);
+ out[1] = Math.ceil(a[1]);
+ out[2] = Math.ceil(a[2]);
+ out[3] = Math.ceil(a[3]);
+ return out;
+}
+
+/**
+ * Math.floor the components of a vec4
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a vector to floor
+ * @returns {vec4} out
+ */
+export function floor(out: vec4, a: ReadonlyVec4): vec4 {
+ out[0] = Math.floor(a[0]);
+ out[1] = Math.floor(a[1]);
+ out[2] = Math.floor(a[2]);
+ out[3] = Math.floor(a[3]);
+ return out;
+}
+
+/**
+ * Returns the minimum of two vec4's
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a the first operand
+ * @param {ReadonlyVec4} b the second operand
+ * @returns {vec4} out
+ */
+export function min(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 {
+ out[0] = Math.min(a[0], b[0]);
+ out[1] = Math.min(a[1], b[1]);
+ out[2] = Math.min(a[2], b[2]);
+ out[3] = Math.min(a[3], b[3]);
+ return out;
+}
+
+/**
+ * Returns the maximum of two vec4's
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a the first operand
+ * @param {ReadonlyVec4} b the second operand
+ * @returns {vec4} out
+ */
+export function max(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4 {
+ out[0] = Math.max(a[0], b[0]);
+ out[1] = Math.max(a[1], b[1]);
+ out[2] = Math.max(a[2], b[2]);
+ out[3] = Math.max(a[3], b[3]);
+ return out;
+}
+
+/**
+ * Math.round the components of a vec4
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a vector to round
+ * @returns {vec4} out
+ */
+export function round(out: vec4, a: ReadonlyVec4): vec4 {
+ out[0] = Math.round(a[0]);
+ out[1] = Math.round(a[1]);
+ out[2] = Math.round(a[2]);
+ out[3] = Math.round(a[3]);
+ return out;
+}
+
+/**
+ * Scales a vec4 by a scalar number
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a the vector to scale
+ * @param {Number} b amount to scale the vector by
+ * @returns {vec4} out
+ */
+export function scale(out: vec4, a: ReadonlyVec4, b: f64): vec4 {
+ out[0] = a[0] * b;
+ out[1] = a[1] * b;
+ out[2] = a[2] * b;
+ out[3] = a[3] * b;
+ return out;
+}
+
+/**
+ * Adds two vec4's after scaling the second operand by a scalar value
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a the first operand
+ * @param {ReadonlyVec4} b the second operand
+ * @param {Number} scale the amount to scale b by before adding
+ * @returns {vec4} out
+ */
+export function scaleAndAdd(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4, scale: f64): vec4 {
+ out[0] = a[0] + b[0] * scale;
+ out[1] = a[1] + b[1] * scale;
+ out[2] = a[2] + b[2] * scale;
+ out[3] = a[3] + b[3] * scale;
+ return out;
+}
+
+/**
+ * Calculates the euclidian distance between two vec4's
+ *
+ * @param {ReadonlyVec4} a the first operand
+ * @param {ReadonlyVec4} b the second operand
+ * @returns {Number} distance between a and b
+ */
+export function distance(a: ReadonlyVec4, b: ReadonlyVec4): f64 {
+ let x = b[0] - a[0];
+ let y = b[1] - a[1];
+ let z = b[2] - a[2];
+ let w = b[3] - a[3];
+ return Maths.hypot4(x, y, z, w);
+}
+
+/**
+ * Calculates the squared euclidian distance between two vec4's
+ *
+ * @param {ReadonlyVec4} a the first operand
+ * @param {ReadonlyVec4} b the second operand
+ * @returns {Number} squared distance between a and b
+ */
+export function squaredDistance(a: ReadonlyVec4, b: ReadonlyVec4): f64 {
+ let x = b[0] - a[0];
+ let y = b[1] - a[1];
+ let z = b[2] - a[2];
+ let w = b[3] - a[3];
+ return x * x + y * y + z * z + w * w;
+}
+
+/**
+ * Calculates the length of a vec4
+ *
+ * @param {ReadonlyVec4} a vector to calculate length of
+ * @returns {Number} length of a
+ */
+export function length(a: ReadonlyVec4): f64 {
+ let x = a[0];
+ let y = a[1];
+ let z = a[2];
+ let w = a[3];
+ return Maths.hypot4(x, y, z, w);
+}
+
+/**
+ * Calculates the squared length of a vec4
+ *
+ * @param {ReadonlyVec4} a vector to calculate squared length of
+ * @returns {Number} squared length of a
+ */
+export function squaredLength(a: ReadonlyVec4): f64 {
+ let x = a[0];
+ let y = a[1];
+ let z = a[2];
+ let w = a[3];
+ return x * x + y * y + z * z + w * w;
+}
+
+/**
+ * Negates the components of a vec4
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a vector to negate
+ * @returns {vec4} out
+ */
+export function negate(out: vec4, a: ReadonlyVec4): vec4 {
+ out[0] = -a[0];
+ out[1] = -a[1];
+ out[2] = -a[2];
+ out[3] = -a[3];
+ return out;
+}
+
+/**
+ * Returns the inverse of the components of a vec4
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a vector to invert
+ * @returns {vec4} out
+ */
+export function inverse(out: vec4, a: ReadonlyVec4): vec4 {
+ out[0] = 1.0 / a[0];
+ out[1] = 1.0 / a[1];
+ out[2] = 1.0 / a[2];
+ out[3] = 1.0 / a[3];
+ return out;
+}
+
+/**
+ * Normalize a vec4
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a vector to normalize
+ * @returns {vec4} out
+ */
+export function normalize(out: vec4, a: ReadonlyVec4): vec4 {
+ let x = a[0];
+ let y = a[1];
+ let z = a[2];
+ let w = a[3];
+ let len = x * x + y * y + z * z + w * w;
+ if (len > 0) {
+ len = 1 / Math.sqrt(len);
+ }
+ out[0] = x * len;
+ out[1] = y * len;
+ out[2] = z * len;
+ out[3] = w * len;
+ return out;
+}
+
+/**
+ * Calculates the dot product of two vec4's
+ *
+ * @param {ReadonlyVec4} a the first operand
+ * @param {ReadonlyVec4} b the second operand
+ * @returns {Number} dot product of a and b
+ */
+export function dot(a: ReadonlyVec4, b: ReadonlyVec4): f64 {
+ return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
+}
+
+/**
+ * Returns the cross-product of three vectors in a 4-dimensional space
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} u the first vector
+ * @param {ReadonlyVec4} v the second vector
+ * @param {ReadonlyVec4} w the third vector
+ * @returns {vec4} out
+ */
+export function cross(out: vec4, u: ReadonlyVec4, v: ReadonlyVec4, w: ReadonlyVec4): vec4 {
+ let A = v[0] * w[1] - v[1] * w[0],
+ B = v[0] * w[2] - v[2] * w[0],
+ C = v[0] * w[3] - v[3] * w[0],
+ D = v[1] * w[2] - v[2] * w[1],
+ E = v[1] * w[3] - v[3] * w[1],
+ F = v[2] * w[3] - v[3] * w[2];
+ let G = u[0];
+ let H = u[1];
+ let I = u[2];
+ let J = u[3];
+
+ out[0] = H * F - I * E + J * D;
+ out[1] = -(G * F) + I * C - J * B;
+ out[2] = G * E - H * C + J * A;
+ out[3] = -(G * D) + H * B - I * A;
+
+ return out;
+}
+
+/**
+ * Performs a linear interpolation between two vec4's
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a the first operand
+ * @param {ReadonlyVec4} b the second operand
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
+ * @returns {vec4} out
+ */
+export function lerp(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4, t: f64): vec4 {
+ let ax = a[0];
+ let ay = a[1];
+ let az = a[2];
+ let aw = a[3];
+ out[0] = ax + t * (b[0] - ax);
+ out[1] = ay + t * (b[1] - ay);
+ out[2] = az + t * (b[2] - az);
+ out[3] = aw + t * (b[3] - aw);
+ return out;
+}
+
+/**
+ * Generates a random vector with the given scale
+ *
+ * @param {vec4} out the receiving vector
+ * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned
+ * @returns {vec4} out
+ */
+export function random(out: vec4, scale: f64): vec4 {
+ scale = scale || 1.0;
+
+ // Marsaglia, George. Choosing a Point from the Surface of a
+ // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.
+ // http://projecteuclid.org/euclid.aoms/1177692644;
+ var v1: f64, v2: f64, v3: f64, v4: f64;
+ var s1: f64, s2: f64;
+ do {
+ v1 = glMatrix.RANDOM() * 2 - 1;
+ v2 = glMatrix.RANDOM() * 2 - 1;
+ s1 = v1 * v1 + v2 * v2;
+ } while (s1 >= 1);
+ do {
+ v3 = glMatrix.RANDOM() * 2 - 1;
+ v4 = glMatrix.RANDOM() * 2 - 1;
+ s2 = v3 * v3 + v4 * v4;
+ } while (s2 >= 1);
+
+ var d = Math.sqrt((1 - s1) / s2);
+ out[0] = scale * v1;
+ out[1] = scale * v2;
+ out[2] = scale * v3 * d;
+ out[3] = scale * v4 * d;
+ return out;
+}
+
+/**
+ * Transforms the vec4 with a mat4.
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a the vector to transform
+ * @param {ReadonlyMat4} m matrix to transform with
+ * @returns {vec4} out
+ */
+export function transformMat4(out: vec4, a: ReadonlyVec4, m: ReadonlyVec4): vec4 {
+ let x = a[0],
+ y = a[1],
+ z = a[2],
+ w = a[3];
+ out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;
+ out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;
+ out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;
+ out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;
+ return out;
+}
+
+/**
+ * Transforms the vec4 with a quat
+ *
+ * @param {vec4} out the receiving vector
+ * @param {ReadonlyVec4} a the vector to transform
+ * @param {ReadonlyQuat} q quaternion to transform with
+ * @returns {vec4} out
+ */
+export function transformQuat(out: vec4, a: ReadonlyVec4, q: ReadonlyQuat):vec4 {
+ let x = a[0],
+ y = a[1],
+ z = a[2];
+ let qx = q[0],
+ qy = q[1],
+ qz = q[2],
+ qw = q[3];
+
+ // calculate quat * vec
+ let ix = qw * x + qy * z - qz * y;
+ let iy = qw * y + qz * x - qx * z;
+ let iz = qw * z + qx * y - qy * x;
+ let iw = -qx * x - qy * y - qz * z;
+
+ // calculate result * inverse quat
+ out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
+ out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
+ out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
+ out[3] = a[3];
+ return out;
+}
+
+/**
+ * Set the components of a vec4 to zero
+ *
+ * @param {vec4} out the receiving vector
+ * @returns {vec4} out
+ */
+export function zero(out: vec4): vec4 {
+ out[0] = 0.0;
+ out[1] = 0.0;
+ out[2] = 0.0;
+ out[3] = 0.0;
+ return out;
+}
+
+/**
+ * Returns a string representation of a vector
+ *
+ * @param {ReadonlyVec4} a vector to represent as a string
+ * @returns {String} string representation of the vector
+ */
+export function str(a: ReadonlyVec4): string {
+ return "vec4(" + a[0].toString() + ", " + a[1].toString() + ", " + a[2].toString() + ", " + a[3].toString() + ")";
+}
+
+/**
+ * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
+ *
+ * @param {ReadonlyVec4} a The first vector.
+ * @param {ReadonlyVec4} b The second vector.
+ * @returns {Boolean} True if the vectors are equal, false otherwise.
+ */
+export function exactEquals(a: ReadonlyVec4, b: ReadonlyVec4): bool {
+ return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];
+}
+
+/**
+ * Returns whether or not the vectors have approximately the same elements in the same position.
+ *
+ * @param {ReadonlyVec4} a The first vector.
+ * @param {ReadonlyVec4} b The second vector.
+ * @returns {Boolean} True if the vectors are equal, false otherwise.
+ */
+export function equals(a: ReadonlyVec4, b: ReadonlyVec4): bool {
+ let a0 = a[0],
+ a1 = a[1],
+ a2 = a[2],
+ a3 = a[3];
+ let b0 = b[0],
+ b1 = b[1],
+ b2 = b[2],
+ b3 = b[3];
+ return (
+ Math.abs(a0 - b0) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a0), Math.abs(b0)) &&
+ Math.abs(a1 - b1) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a1), Math.abs(b1)) &&
+ Math.abs(a2 - b2) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a2), Math.abs(b2)) &&
+ Math.abs(a3 - b3) <=
+ glMatrix.EPSILON * Maths.max(1.0, Math.abs(a3), Math.abs(b3))
+ );
+}
+
+/**
+ * Alias for {@link vec4.subtract}
+ * @function
+ */
+export const sub = subtract;
+
+/**
+ * Alias for {@link vec4.multiply}
+ * @function
+ */
+export const mul = multiply;
+
+/**
+ * Alias for {@link vec4.divide}
+ * @function
+ */
+export const div = divide;
+
+/**
+ * Alias for {@link vec4.distance}
+ * @function
+ */
+export const dist = distance;
+
+/**
+ * Alias for {@link vec4.squaredDistance}
+ * @function
+ */
+export const sqrDist = squaredDistance;
+
+/**
+ * Alias for {@link vec4.length}
+ * @function
+ */
+export const len = length;
+
+/**
+ * Alias for {@link vec4.squaredLength}
+ * @function
+ */
+export const sqrLen = squaredLength;
+
+/**
+ * Perform some operation over an array of vec4s.
+ *
+ * @param {Array} a the array of vectors to iterate over
+ * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed
+ * @param {Number} offset Number of elements to skip at the beginning of the array
+ * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array
+ * @param {Function} fn Function to call for each vector in the array
+ * @param {Object} [arg] additional argument to pass to fn
+ * @returns {Array} a
+ * @function
+ */
+ let vec = create();
+export const forEach = ((): (a: vec4, stride: i32, offset: i32, count: i32, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) => vec4 => {
+
+ return function(a: vec4, stride: i32, offset: i32, count: i32, fn: (a: vec4, b: vec4, arg: IArguments) => void, arg: IArguments) {
+ let i: i32, l: i32;
+ if (!stride) {
+ stride = 4;
+ }
+
+ if (!offset) {
+ offset = 0;
+ }
+
+ if (count) {
+ l = Math.min(count * stride + offset, a.length);
+ } else {
+ l = a.length;
+ }
+
+ for (i = offset; i < l; i += stride) {
+ vec[0] = a[i];
+ vec[1] = a[i + 1];
+ vec[2] = a[i + 2];
+ vec[3] = a[i + 3];
+ fn(vec, vec, arg);
+ a[i] = vec[0];
+ a[i + 1] = vec[1];
+ a[i + 2] = vec[2];
+ a[i + 3] = vec[3];
+ }
+
+ return a;
+ };
+})();
diff --git a/build/.gitignore b/build/.gitignore
new file mode 100644
index 00000000..22b2ed20
--- /dev/null
+++ b/build/.gitignore
@@ -0,0 +1,3 @@
+*.wasm
+*.wasm.map
+*.asm.js
diff --git a/build/optimized.wasm.d.ts b/build/optimized.wasm.d.ts
new file mode 100644
index 00000000..c423912e
--- /dev/null
+++ b/build/optimized.wasm.d.ts
@@ -0,0 +1,399 @@
+declare module ASModule {
+ type i8 = number;
+ type i16 = number;
+ type i32 = number;
+ type i64 = bigint;
+ type isize = number;
+ type u8 = number;
+ type u16 = number;
+ type u32 = number;
+ type u64 = bigint;
+ type usize = number;
+ type f32 = number;
+ type f64 = number;
+ type bool = boolean | number;
+ export namespace glMatrix {
+ export var EPSILON: f64;
+ export var RANDOM: usize;
+ export var ANGLE_ORDER: usize;
+ export function setMatrixArrayType(type: usize): void;
+ export function toRadian(a: f64): f64;
+ export function equals(a: f64, b: f64): bool;
+ }
+ export namespace mat2 {
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function identity(out: usize): usize;
+ export function fromValues(m00: f64, m01: f64, m10: f64, m11: f64): usize;
+ export function set(out: usize, m00: f64, m01: f64, m10: f64, m11: f64): usize;
+ export function transpose(out: usize, a: usize): usize;
+ export function invert(out: usize, a: usize): usize;
+ export function adjoint(out: usize, a: usize): usize;
+ export function determinant(a: usize): f64;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function rotate(out: usize, a: usize, rad: f64): usize;
+ export function scale(out: usize, a: usize, v: usize): usize;
+ export function fromRotation(out: usize, rad: f64): usize;
+ export function fromScaling(out: usize, v: usize): usize;
+ export function str(a: usize): usize;
+ export function frob(a: usize): f64;
+ export function LDU(L: usize, D: usize, U: usize, a: usize): usize;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export function multiplyScalar(out: usize, a: usize, b: f64): usize;
+ export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export var mul: usize;
+ export var sub: usize;
+ }
+ export namespace mat2d {
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function identity(out: usize): usize;
+ export function fromValues(a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): usize;
+ export function set(out: usize, a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): usize;
+ export function invert(out: usize, a: usize): usize;
+ export function determinant(a: usize): f64;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function rotate(out: usize, a: usize, rad: f64): usize;
+ export function scale(out: usize, a: usize, v: usize): usize;
+ export function translate(out: usize, a: usize, v: usize): usize;
+ export function fromRotation(out: usize, rad: f64): usize;
+ export function fromScaling(out: usize, v: usize): usize;
+ export function fromTranslation(out: usize, v: usize): usize;
+ export function str(a: usize): usize;
+ export function frob(a: usize): f64;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function multiplyScalar(out: usize, a: usize, b: f64): usize;
+ export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export var mul: usize;
+ export var sub: usize;
+ }
+ export namespace mat3 {
+ export function create(): usize;
+ export function fromMat4(out: usize, a: usize): usize;
+ export function clone(a: usize): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function fromValues(m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): usize;
+ export function set(out: usize, m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): usize;
+ export function identity(out: usize): usize;
+ export function transpose(out: usize, a: usize): usize;
+ export function invert(out: usize, a: usize): usize;
+ export function adjoint(out: usize, a: usize): usize;
+ export function determinant(a: usize): f64;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function translate(out: usize, a: usize, v: usize): usize;
+ export function rotate(out: usize, a: usize, rad: f64): usize;
+ export function scale(out: usize, a: usize, v: usize): usize;
+ export function fromTranslation(out: usize, v: usize): usize;
+ export function fromRotation(out: usize, rad: f64): usize;
+ export function fromScaling(out: usize, v: usize): usize;
+ export function fromMat2d(out: usize, a: usize): usize;
+ export function fromQuat(out: usize, q: usize): usize;
+ export function normalFromMat4(out: usize, a: usize): usize;
+ export function projection(out: usize, width: f64, height: f64): usize;
+ export function str(a: usize): usize;
+ export function frob(a: usize): f64;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function multiplyScalar(out: usize, a: usize, b: f64): usize;
+ export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export var mul: usize;
+ export var sub: usize;
+ }
+ export namespace mat4 {
+ export class Fov {
+ static wrap(ptr: usize): Fov;
+ valueOf(): usize;
+ upDegrees: f64;
+ downDegrees: f64;
+ leftDegrees: f64;
+ rightDegrees: f64;
+ constructor();
+ }
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function fromValues(m00: f64, m01: f64, m02: f64, m03: f64, m10: f64, m11: f64, m12: f64, m13: f64, m20: f64, m21: f64, m22: f64, m23: f64, m30: f64, m31: f64, m32: f64, m33: f64): usize;
+ export function set(out: usize, m00: f64, m01: f64, m02: f64, m03: f64, m10: f64, m11: f64, m12: f64, m13: f64, m20: f64, m21: f64, m22: f64, m23: f64, m30: f64, m31: f64, m32: f64, m33: f64): usize;
+ export function identity(out: usize): usize;
+ export function transpose(out: usize, a: usize): usize;
+ export function invert(out: usize, a: usize): usize;
+ export function adjoint(out: usize, a: usize): usize;
+ export function determinant(a: usize): f64;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function translate(out: usize, a: usize, v: usize): usize;
+ export function scale(out: usize, a: usize, v: usize): usize;
+ export function rotate(out: usize, a: usize, rad: f64, axis: usize): usize;
+ export function rotateX(out: usize, a: usize, rad: f64): usize;
+ export function rotateY(out: usize, a: usize, rad: f64): usize;
+ export function rotateZ(out: usize, a: usize, rad: f64): usize;
+ export function fromTranslation(out: usize, v: usize): usize;
+ export function fromScaling(out: usize, v: usize): usize;
+ export function fromRotation(out: usize, rad: f64, axis: usize): usize;
+ export function fromXRotation(out: usize, rad: f64): usize;
+ export function fromYRotation(out: usize, rad: f64): usize;
+ export function fromZRotation(out: usize, rad: f64): usize;
+ export function fromRotationTranslation(out: usize, q: usize, v: usize): usize;
+ export function fromQuat2(out: usize, a: usize): usize;
+ export function getTranslation(out: usize, mat: usize): usize;
+ export function getScaling(out: usize, mat: usize): usize;
+ export function getRotation(out: usize, mat: usize): usize;
+ export function decompose(out_r: usize, out_t: usize, out_s: usize, mat: usize): usize;
+ export function fromRotationTranslationScale(out: usize, q: usize, v: usize, s: usize): usize;
+ export function fromRotationTranslationScaleOrigin(out: usize, q: usize, v: usize, s: usize, o: usize): usize;
+ export function fromQuat(out: usize, q: usize): usize;
+ export function frustum(out: usize, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): usize;
+ export function perspectiveNO(out: usize, fovy: f64, aspect: f64, near: f64, far: f64): usize;
+ export var perspective: usize;
+ export function perspectiveZO(out: usize, fovy: f64, aspect: f64, near: f64, far: f64): usize;
+ export function perspectiveFromFieldOfView(out: usize, fov: usize, near: f64, far: f64): usize;
+ export function orthoNO(out: usize, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): usize;
+ export var ortho: usize;
+ export function orthoZO(out: usize, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): usize;
+ export function lookAt(out: usize, eye: usize, center: usize, up: usize): usize;
+ export function targetTo(out: usize, eye: usize, target: usize, up: usize): usize;
+ export function str(a: usize): usize;
+ export function frob(a: usize): f64;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function multiplyScalar(out: usize, a: usize, b: f64): usize;
+ export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export var mul: usize;
+ export var sub: usize;
+ }
+ export namespace quat {
+ export function create(): usize;
+ export function identity(out: usize): usize;
+ export function setAxisAngle(out: usize, axis: usize, rad: f64): usize;
+ export function getAxisAngle(out_axis: usize, q: usize): f64;
+ export function getAngle(a: usize, b: usize): f64;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function rotateX(out: usize, a: usize, rad: f64): usize;
+ export function rotateY(out: usize, a: usize, rad: f64): usize;
+ export function rotateZ(out: usize, a: usize, rad: f64): usize;
+ export function calculateW(out: usize, a: usize): usize;
+ export function exp(out: usize, a: usize): usize;
+ export function ln(out: usize, a: usize): usize;
+ export function pow(out: usize, a: usize, b: f64): usize;
+ export function slerp(out: usize, a: usize, b: usize, t: f64): usize;
+ export function random(out: usize): usize;
+ export function invert(out: usize, a: usize): usize;
+ export function conjugate(out: usize, a: usize): usize;
+ export function fromMat3(out: usize, m: usize): usize;
+ export function fromEuler(out: usize, x: f64, y: f64, z: f64, order?: usize): usize;
+ export function str(a: usize): usize;
+ export var clone: usize;
+ export var fromValues: usize;
+ export var copy: usize;
+ export var set: usize;
+ export var add: usize;
+ export var mul: usize;
+ export var scale: usize;
+ export var dot: usize;
+ export var lerp: usize;
+ export var length: usize;
+ export var len: usize;
+ export var squaredLength: usize;
+ export var sqrLen: usize;
+ export var normalize: usize;
+ export var exactEquals: usize;
+ export function equals(a: usize, b: usize): bool;
+ export var rotationTo: usize;
+ export var sqlerp: usize;
+ export var setAxes: usize;
+ }
+ export namespace quat2 {
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function fromValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): usize;
+ export function fromRotationTranslationValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64): usize;
+ export function fromRotationTranslation(out: usize, q: usize, t: usize): usize;
+ export function fromTranslation(out: usize, t: usize): usize;
+ export function fromRotation(out: usize, q: usize): usize;
+ export function fromMat4(out: usize, a: usize): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function identity(out: usize): usize;
+ export function set(out: usize, x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): usize;
+ export var getReal: usize;
+ export function getDual(out: usize, a: usize): usize;
+ export var setReal: usize;
+ export function setDual(out: usize, q: usize): usize;
+ export function getTranslation(out: usize, a: usize): usize;
+ export function translate(out: usize, a: usize, v: usize): usize;
+ export function rotateX(out: usize, a: usize, rad: f64): usize;
+ export function rotateY(out: usize, a: usize, rad: f64): usize;
+ export function rotateZ(out: usize, a: usize, rad: f64): usize;
+ export function rotateByQuatAppend(out: usize, a: usize, q: usize): usize;
+ export function rotateByQuatPrepend(out: usize, q: usize, a: usize): usize;
+ export function rotateAroundAxis(out: usize, a: usize, axis: usize, rad: f64): usize;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export var mul: usize;
+ export function scale(out: usize, a: usize, b: f64): usize;
+ export var dot: usize;
+ export function lerp(out: usize, a: usize, b: usize, t: f64): usize;
+ export function invert(out: usize, a: usize): usize;
+ export function conjugate(out: usize, a: usize): usize;
+ export var length: usize;
+ export var len: usize;
+ export var squaredLength: usize;
+ export var sqrLen: usize;
+ export function normalize(out: usize, a: usize): usize;
+ export function str(a: usize): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ }
+ export namespace vec2 {
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function fromValues(x: f64, y: f64): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function set(out: usize, x: f64, y: f64): usize;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function divide(out: usize, a: usize, b: usize): usize;
+ export function ceil(out: usize, a: usize): usize;
+ export function floor(out: usize, a: usize): usize;
+ export function min(out: usize, a: usize, b: usize): usize;
+ export function max(out: usize, a: usize, b: usize): usize;
+ export function round(out: usize, a: usize): usize;
+ export function scale(out: usize, a: usize, b: f64): usize;
+ export function scaleAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export function distance(a: usize, b: usize): f64;
+ export function squaredDistance(a: usize, b: usize): f64;
+ export function length(a: usize): f64;
+ export function squaredLength(a: usize): f64;
+ export function negate(out: usize, a: usize): usize;
+ export function inverse(out: usize, a: usize): usize;
+ export function normalize(out: usize, a: usize): usize;
+ export function dot(a: usize, b: usize): f64;
+ export function cross(out: usize, a: usize, b: usize): usize;
+ export function lerp(out: usize, a: usize, b: usize, t: f64): usize;
+ export function random(out: usize, scale: f64): usize;
+ export function transformMat2(out: usize, a: usize, m: usize): usize;
+ export function transformMat2d(out: usize, a: usize, m: usize): usize;
+ export function transformMat3(out: usize, a: usize, m: usize): usize;
+ export function transformMat4(out: usize, a: usize, m: usize): usize;
+ export function rotate(out: usize, a: usize, b: usize, rad: f64): usize;
+ export function angle(a: usize, b: usize): f64;
+ export function zero(out: usize): usize;
+ export function str(a: usize): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export var len: usize;
+ export var sub: usize;
+ export var mul: usize;
+ export var div: usize;
+ export var dist: usize;
+ export var sqrDist: usize;
+ export var sqrLen: usize;
+ export var forEach: usize;
+ }
+ export namespace vec3 {
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function length(a: usize): f64;
+ export function fromValues(x: f64, y: f64, z: f64): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function set(out: usize, x: f64, y: f64, z: f64): usize;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function divide(out: usize, a: usize, b: usize): usize;
+ export function ceil(out: usize, a: usize): usize;
+ export function floor(out: usize, a: usize): usize;
+ export function min(out: usize, a: usize, b: usize): usize;
+ export function max(out: usize, a: usize, b: usize): usize;
+ export function round(out: usize, a: usize): usize;
+ export function scale(out: usize, a: usize, b: f64): usize;
+ export function scaleAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export function distance(a: usize, b: usize): f64;
+ export function squaredDistance(a: usize, b: usize): f64;
+ export function squaredLength(a: usize): f64;
+ export function negate(out: usize, a: usize): usize;
+ export function inverse(out: usize, a: usize): usize;
+ export function normalize(out: usize, a: usize): usize;
+ export function dot(a: usize, b: usize): f64;
+ export function cross(out: usize, a: usize, b: usize): usize;
+ export function lerp(out: usize, a: usize, b: usize, t: f64): usize;
+ export function slerp(out: usize, a: usize, b: usize, t: f64): usize;
+ export function hermite(out: usize, a: usize, b: usize, c: usize, d: usize, t: f64): usize;
+ export function bezier(out: usize, a: usize, b: usize, c: usize, d: usize, t: f64): usize;
+ export function random(out: usize, scale: f64): usize;
+ export function transformMat4(out: usize, a: usize, m: usize): usize;
+ export function transformMat3(out: usize, a: usize, m: usize): usize;
+ export function transformQuat(out: usize, a: usize, q: usize): usize;
+ export function rotateX(out: usize, a: usize, b: usize, rad: f64): usize;
+ export function rotateY(out: usize, a: usize, b: usize, rad: f64): usize;
+ export function rotateZ(out: usize, a: usize, b: usize, rad: f64): usize;
+ export function angle(a: usize, b: usize): f64;
+ export function zero(out: usize): usize;
+ export function str(a: usize): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export var sub: usize;
+ export var mul: usize;
+ export var div: usize;
+ export var dist: usize;
+ export var sqrDist: usize;
+ export var len: usize;
+ export var sqrLen: usize;
+ export var forEach: usize;
+ }
+ export namespace vec4 {
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function fromValues(x: f64, y: f64, z: f64, w: f64): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function set(out: usize, x: f64, y: f64, z: f64, w: f64): usize;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function divide(out: usize, a: usize, b: usize): usize;
+ export function ceil(out: usize, a: usize): usize;
+ export function floor(out: usize, a: usize): usize;
+ export function min(out: usize, a: usize, b: usize): usize;
+ export function max(out: usize, a: usize, b: usize): usize;
+ export function round(out: usize, a: usize): usize;
+ export function scale(out: usize, a: usize, b: f64): usize;
+ export function scaleAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export function distance(a: usize, b: usize): f64;
+ export function squaredDistance(a: usize, b: usize): f64;
+ export function length(a: usize): f64;
+ export function squaredLength(a: usize): f64;
+ export function negate(out: usize, a: usize): usize;
+ export function inverse(out: usize, a: usize): usize;
+ export function normalize(out: usize, a: usize): usize;
+ export function dot(a: usize, b: usize): f64;
+ export function cross(out: usize, u: usize, v: usize, w: usize): usize;
+ export function lerp(out: usize, a: usize, b: usize, t: f64): usize;
+ export function random(out: usize, scale: f64): usize;
+ export function transformMat4(out: usize, a: usize, m: usize): usize;
+ export function transformQuat(out: usize, a: usize, q: usize): usize;
+ export function zero(out: usize): usize;
+ export function str(a: usize): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export var sub: usize;
+ export var mul: usize;
+ export var div: usize;
+ export var dist: usize;
+ export var sqrDist: usize;
+ export var len: usize;
+ export var sqrLen: usize;
+ export var forEach: usize;
+ }
+}
+export default ASModule;
diff --git a/build/optimized.wat b/build/optimized.wat
new file mode 100644
index 00000000..0fbc50cd
--- /dev/null
+++ b/build/optimized.wat
@@ -0,0 +1,43396 @@
+(module
+ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
+ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32)))
+ (type $i32_=>_i32 (func (param i32) (result i32)))
+ (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32)))
+ (type $i32_=>_f64 (func (param i32) (result f64)))
+ (type $i32_i32_=>_f64 (func (param i32 i32) (result f64)))
+ (type $none_=>_i32 (func (result i32)))
+ (type $i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 f64) (result i32)))
+ (type $none_=>_f64 (func (result f64)))
+ (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32)))
+ (type $i32_i32_i32_=>_none (func (param i32 i32 i32)))
+ (type $i32_f64_=>_i32 (func (param i32 f64) (result i32)))
+ (type $f64_=>_f64 (func (param f64) (result f64)))
+ (type $i32_=>_none (func (param i32)))
+ (type $i32_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64) (result i32)))
+ (type $i32_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $none_=>_none (func))
+ (type $i32_f64_=>_none (func (param i32 f64)))
+ (type $i32_i32_=>_none (func (param i32 i32)))
+ (type $i32_i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32 i32) (result i32)))
+ (type $i32_i32_i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 i32 i32 f64) (result i32)))
+ (type $i32_i32_f64_=>_none (func (param i32 i32 f64)))
+ (type $f64_=>_i32 (func (param f64) (result i32)))
+ (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32)))
+ (type $i32_i32_f64_i32_=>_i32 (func (param i32 i32 f64 i32) (result i32)))
+ (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32)))
+ (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32)))
+ (type $i32_f64_f64_f64_i32_=>_i32 (func (param i32 f64 f64 f64 i32) (result i32)))
+ (type $f64_f64_=>_i32 (func (param f64 f64) (result i32)))
+ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32)))
+ (type $i64_=>_i32 (func (param i64) (result i32)))
+ (type $i32_i32_f64_f64_=>_i32 (func (param i32 i32 f64 f64) (result i32)))
+ (type $i32_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64) (result i32)))
+ (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $i64_i32_i64_i32_i64_i32_=>_i32 (func (param i64 i32 i64 i32 i64 i32) (result i32)))
+ (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32)))
+ (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32)))
+ (type $f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $f64_f64_=>_f64 (func (param f64 f64) (result f64)))
+ (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64)))
+ (import "env" "seed" (func $~lib/builtins/seed (result f64)))
+ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_entryfile_flag i32 (i32.const 1))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_String_ID i32 (i32.const 1))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBuffer_ID i32 (i32.const 0))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBufferView_ID i32 (i32.const 2))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int8Array_ID i32 (i32.const 3))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint8Array_ID i32 (i32.const 4))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int16Array_ID i32 (i32.const 5))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint16Array_ID i32 (i32.const 6))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int32Array_ID i32 (i32.const 7))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint32Array_ID i32 (i32.const 8))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float32Array_ID i32 (i32.const 9))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float64Array_ID i32 (i32.const 10))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int64Array_ID i32 (i32.const 11))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint64Array_ID i32 (i32.const 12))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32Array_ID i32 (i32.const 13))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64Array_ID i32 (i32.const 14))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArray_ID i32 (i32.const 15))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArray_ID i32 (i32.const 16))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32ArrayArray_ID i32 (i32.const 17))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64ArrayArray_ID i32 (i32.const 18))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArrayArray_ID i32 (i32.const 19))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArrayArray_ID i32 (i32.const 20))
+ (global $assembly/common/EPSILON f64 (f64.const 1e-06))
+ (global $assembly/common/ArrayTypeEnum.Float64ArrayT i32 (i32.const 10))
+ (global $assembly/common/ArrayTypeEnum.ArrayF64T i32 (i32.const 21))
+ (global $assembly/common/ARRAY_TYPE (mut i32) (i32.const 0))
+ (global $~lib/math/random_seeded (mut i32) (i32.const 0))
+ (global $~lib/math/random_state0_64 (mut i64) (i64.const 0))
+ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0))
+ (global $assembly/common/RANDOM (mut i32) (i32.const 1056))
+ (global $assembly/common/ANGLE_ORDER (mut i32) (i32.const 1088))
+ (global $assembly/mat2d/mul i32 (i32.const 1248))
+ (global $assembly/mat2d/sub i32 (i32.const 1280))
+ (global $assembly/vec3/sub i32 (i32.const 1312))
+ (global $assembly/vec3/mul i32 (i32.const 1344))
+ (global $assembly/vec3/div i32 (i32.const 1376))
+ (global $assembly/vec3/dist i32 (i32.const 1440))
+ (global $assembly/vec3/sqrDist i32 (i32.const 1472))
+ (global $assembly/vec3/len i32 (i32.const 1504))
+ (global $assembly/vec3/sqrLen i32 (i32.const 1536))
+ (global $~lib/rt/itcms/total (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/state (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/iter (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/white (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0))
+ (global $assembly/vec3/vec (mut i32) (i32.const 0))
+ (global $~argumentsLength (mut i32) (i32.const 0))
+ (global $assembly/vec3/forEach (mut i32) (i32.const 0))
+ (global $assembly/vec4/sub i32 (i32.const 2080))
+ (global $assembly/vec4/mul i32 (i32.const 2112))
+ (global $assembly/vec4/div i32 (i32.const 2144))
+ (global $assembly/vec4/dist i32 (i32.const 2176))
+ (global $assembly/vec4/sqrDist i32 (i32.const 2208))
+ (global $assembly/vec4/len i32 (i32.const 2240))
+ (global $assembly/vec4/sqrLen i32 (i32.const 2272))
+ (global $assembly/vec4/vec (mut i32) (i32.const 0))
+ (global $assembly/vec4/forEach (mut i32) (i32.const 0))
+ (global $assembly/quat/clone i32 (i32.const 2368))
+ (global $assembly/quat/fromValues i32 (i32.const 2400))
+ (global $assembly/quat/copy i32 (i32.const 2432))
+ (global $assembly/quat/set i32 (i32.const 2464))
+ (global $assembly/quat/add i32 (i32.const 2496))
+ (global $assembly/quat/mul i32 (i32.const 2528))
+ (global $assembly/quat/scale i32 (i32.const 2560))
+ (global $assembly/quat/dot i32 (i32.const 2592))
+ (global $assembly/quat/lerp i32 (i32.const 2624))
+ (global $assembly/quat/length i32 (i32.const 2240))
+ (global $assembly/quat/len i32 (i32.const 2240))
+ (global $assembly/quat/squaredLength i32 (i32.const 2272))
+ (global $assembly/quat/sqrLen i32 (i32.const 2272))
+ (global $assembly/quat/normalize i32 (i32.const 2656))
+ (global $assembly/quat/exactEquals i32 (i32.const 2688))
+ (global $assembly/quat/tmpvec3 (mut i32) (i32.const 0))
+ (global $assembly/quat/xUnitVec3 (mut i32) (i32.const 0))
+ (global $assembly/quat/yUnitVec3 (mut i32) (i32.const 0))
+ (global $~lib/math/rempio2_y0 (mut f64) (f64.const 0))
+ (global $~lib/math/rempio2_y1 (mut f64) (f64.const 0))
+ (global $~lib/math/res128_hi (mut i64) (i64.const 0))
+ (global $assembly/quat/rotationTo (mut i32) (i32.const 0))
+ (global $assembly/quat/temp1 (mut i32) (i32.const 0))
+ (global $assembly/quat/temp2 (mut i32) (i32.const 0))
+ (global $assembly/quat/sqlerp (mut i32) (i32.const 0))
+ (global $assembly/quat/matr (mut i32) (i32.const 0))
+ (global $assembly/quat/setAxes (mut i32) (i32.const 0))
+ (global $assembly/quat2/getReal i32 (i32.const 2432))
+ (global $assembly/quat2/setReal i32 (i32.const 2432))
+ (global $assembly/quat2/mul i32 (i32.const 3120))
+ (global $assembly/quat2/dot i32 (i32.const 2592))
+ (global $assembly/quat2/length i32 (i32.const 2240))
+ (global $assembly/quat2/len i32 (i32.const 2240))
+ (global $assembly/quat2/squaredLength i32 (i32.const 2272))
+ (global $assembly/quat2/sqrLen i32 (i32.const 2272))
+ (global $assembly/mat4/perspective i32 (i32.const 3184))
+ (global $assembly/mat4/ortho i32 (i32.const 3216))
+ (global $assembly/mat4/mul i32 (i32.const 3248))
+ (global $assembly/mat4/sub i32 (i32.const 3280))
+ (global $assembly/mat3/mul i32 (i32.const 3312))
+ (global $assembly/mat3/sub i32 (i32.const 3344))
+ (global $assembly/vec2/len i32 (i32.const 3376))
+ (global $assembly/vec2/sub i32 (i32.const 3408))
+ (global $assembly/vec2/mul i32 (i32.const 3440))
+ (global $assembly/vec2/div i32 (i32.const 3472))
+ (global $assembly/vec2/dist i32 (i32.const 3504))
+ (global $assembly/vec2/sqrDist i32 (i32.const 3536))
+ (global $assembly/vec2/sqrLen i32 (i32.const 3568))
+ (global $assembly/vec2/vec (mut i32) (i32.const 0))
+ (global $assembly/vec2/forEach (mut i32) (i32.const 0))
+ (global $assembly/mat2/mul i32 (i32.const 3664))
+ (global $assembly/mat2/sub i32 (i32.const 3696))
+ (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0))
+ (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0))
+ (global $~lib/util/number/_exp (mut i32) (i32.const 0))
+ (global $~lib/util/number/_K (mut i32) (i32.const 0))
+ (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0))
+ (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0))
+ (global $assembly/mat4/Fov i32 (i32.const 44))
+ (global $~lib/rt/__rtti_base i32 (i32.const 12448))
+ (global $~lib/memory/__stack_pointer (mut i32) (i32.const 29196))
+ (memory $0 1)
+ (data (i32.const 1036) "\1c")
+ (data (i32.const 1048) "\16\00\00\00\08\00\00\00\01")
+ (data (i32.const 1068) "\1c")
+ (data (i32.const 1080) "\01\00\00\00\06\00\00\00z\00y\00x")
+ (data (i32.const 1100) "<")
+ (data (i32.const 1112) "\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e")
+ (data (i32.const 1164) "<")
+ (data (i32.const 1176) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s")
+ (data (i32.const 1228) "\1c")
+ (data (i32.const 1240) "\17\00\00\00\08\00\00\00\02")
+ (data (i32.const 1260) "\1c")
+ (data (i32.const 1272) "\17\00\00\00\08\00\00\00\03")
+ (data (i32.const 1292) "\1c")
+ (data (i32.const 1304) "\17\00\00\00\08\00\00\00\04")
+ (data (i32.const 1324) "\1c")
+ (data (i32.const 1336) "\17\00\00\00\08\00\00\00\05")
+ (data (i32.const 1356) "\1c")
+ (data (i32.const 1368) "\17\00\00\00\08\00\00\00\06")
+ (data (i32.const 1388) "\1c")
+ (data (i32.const 1400) "\18\00\00\00\08\00\00\00\07")
+ (data (i32.const 1420) "\1c")
+ (data (i32.const 1432) "\19\00\00\00\08\00\00\00\08")
+ (data (i32.const 1452) "\1c")
+ (data (i32.const 1464) "\19\00\00\00\08\00\00\00\t")
+ (data (i32.const 1484) "\1c")
+ (data (i32.const 1496) "\1a\00\00\00\08\00\00\00\n")
+ (data (i32.const 1516) "\1c")
+ (data (i32.const 1528) "\1a\00\00\00\08\00\00\00\0b")
+ (data (i32.const 1548) ",")
+ (data (i32.const 1560) "\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h")
+ (data (i32.const 1596) "<")
+ (data (i32.const 1608) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s")
+ (data (i32.const 1660) "<")
+ (data (i32.const 1672) "\01\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")
+ (data (i32.const 1724) "<")
+ (data (i32.const 1736) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s")
+ (data (i32.const 1852) ",")
+ (data (i32.const 1864) "\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s")
+ (data (i32.const 1932) "<")
+ (data (i32.const 1944) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s")
+ (data (i32.const 1996) "\1c")
+ (data (i32.const 2008) "\1d\00\00\00\08\00\00\00\0c")
+ (data (i32.const 2028) "\1c")
+ (data (i32.const 2040) "\1c\00\00\00\08\00\00\00\0d")
+ (data (i32.const 2060) "\1c")
+ (data (i32.const 2072) "\17\00\00\00\08\00\00\00\0e")
+ (data (i32.const 2092) "\1c")
+ (data (i32.const 2104) "\17\00\00\00\08\00\00\00\0f")
+ (data (i32.const 2124) "\1c")
+ (data (i32.const 2136) "\17\00\00\00\08\00\00\00\10")
+ (data (i32.const 2156) "\1c")
+ (data (i32.const 2168) "\19\00\00\00\08\00\00\00\11")
+ (data (i32.const 2188) "\1c")
+ (data (i32.const 2200) "\19\00\00\00\08\00\00\00\12")
+ (data (i32.const 2220) "\1c")
+ (data (i32.const 2232) "\1a\00\00\00\08\00\00\00\13")
+ (data (i32.const 2252) "\1c")
+ (data (i32.const 2264) "\1a\00\00\00\08\00\00\00\14")
+ (data (i32.const 2284) "\1c")
+ (data (i32.const 2296) "\1d\00\00\00\08\00\00\00\15")
+ (data (i32.const 2316) "\1c")
+ (data (i32.const 2328) "\1c\00\00\00\08\00\00\00\16")
+ (data (i32.const 2348) "\1c")
+ (data (i32.const 2360) "\1e\00\00\00\08\00\00\00\17")
+ (data (i32.const 2380) "\1c")
+ (data (i32.const 2392) "\1f\00\00\00\08\00\00\00\18")
+ (data (i32.const 2412) "\1c")
+ (data (i32.const 2424) " \00\00\00\08\00\00\00\19")
+ (data (i32.const 2444) "\1c")
+ (data (i32.const 2456) "!\00\00\00\08\00\00\00\1a")
+ (data (i32.const 2476) "\1c")
+ (data (i32.const 2488) "\17\00\00\00\08\00\00\00\1b")
+ (data (i32.const 2508) "\1c")
+ (data (i32.const 2520) "\17\00\00\00\08\00\00\00\1c")
+ (data (i32.const 2540) "\1c")
+ (data (i32.const 2552) "\"\00\00\00\08\00\00\00\1d")
+ (data (i32.const 2572) "\1c")
+ (data (i32.const 2584) "\19\00\00\00\08\00\00\00\1e")
+ (data (i32.const 2604) "\1c")
+ (data (i32.const 2616) "#\00\00\00\08\00\00\00\1f")
+ (data (i32.const 2636) "\1c")
+ (data (i32.const 2648) " \00\00\00\08\00\00\00 ")
+ (data (i32.const 2668) "\1c")
+ (data (i32.const 2680) "$\00\00\00\08\00\00\00!")
+ (data (i32.const 2704) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM")
+ (data (i32.const 2908) "\1c")
+ (data (i32.const 2920) "\17\00\00\00\08\00\00\00\"")
+ (data (i32.const 2940) "\1c")
+ (data (i32.const 2952) "%\00\00\00\08\00\00\00#")
+ (data (i32.const 2972) "\1c")
+ (data (i32.const 2984) "\'\00\00\00\08\00\00\00$")
+ (data (i32.const 3004) "\1c")
+ (data (i32.const 3016) "&\00\00\00\08\00\00\00%")
+ (data (i32.const 3036) "\1c")
+ (data (i32.const 3048) ")\00\00\00\08\00\00\00&")
+ (data (i32.const 3068) "\1c")
+ (data (i32.const 3080) "(\00\00\00\08\00\00\00\'")
+ (data (i32.const 3100) "\1c")
+ (data (i32.const 3112) "\17\00\00\00\08\00\00\00(")
+ (data (i32.const 3132) "\1c")
+ (data (i32.const 3144) "\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r")
+ (data (i32.const 3164) "\1c")
+ (data (i32.const 3176) "!\00\00\00\08\00\00\00)")
+ (data (i32.const 3196) "\1c")
+ (data (i32.const 3208) "*\00\00\00\08\00\00\00*")
+ (data (i32.const 3228) "\1c")
+ (data (i32.const 3240) "\17\00\00\00\08\00\00\00+")
+ (data (i32.const 3260) "\1c")
+ (data (i32.const 3272) "\17\00\00\00\08\00\00\00,")
+ (data (i32.const 3292) "\1c")
+ (data (i32.const 3304) "\17\00\00\00\08\00\00\00-")
+ (data (i32.const 3324) "\1c")
+ (data (i32.const 3336) "\17\00\00\00\08\00\00\00.")
+ (data (i32.const 3356) "\1c")
+ (data (i32.const 3368) "\1a\00\00\00\08\00\00\00/")
+ (data (i32.const 3388) "\1c")
+ (data (i32.const 3400) "\17\00\00\00\08\00\00\000")
+ (data (i32.const 3420) "\1c")
+ (data (i32.const 3432) "\17\00\00\00\08\00\00\001")
+ (data (i32.const 3452) "\1c")
+ (data (i32.const 3464) "\17\00\00\00\08\00\00\002")
+ (data (i32.const 3484) "\1c")
+ (data (i32.const 3496) "\19\00\00\00\08\00\00\003")
+ (data (i32.const 3516) "\1c")
+ (data (i32.const 3528) "\19\00\00\00\08\00\00\004")
+ (data (i32.const 3548) "\1c")
+ (data (i32.const 3560) "\1a\00\00\00\08\00\00\005")
+ (data (i32.const 3580) "\1c")
+ (data (i32.const 3592) "\1d\00\00\00\08\00\00\006")
+ (data (i32.const 3612) "\1c")
+ (data (i32.const 3624) "\1c\00\00\00\08\00\00\007")
+ (data (i32.const 3644) "\1c")
+ (data (i32.const 3656) "\17\00\00\00\08\00\00\008")
+ (data (i32.const 3676) "\1c")
+ (data (i32.const 3688) "\17\00\00\00\08\00\00\009")
+ (data (i32.const 3708) "\1c")
+ (data (i32.const 3720) "\01\00\00\00\n\00\00\00m\00a\00t\002\00(")
+ (data (i32.const 3740) "\1c")
+ (data (i32.const 3752) "\01\00\00\00\06\00\00\000\00.\000")
+ (data (i32.const 3772) "\1c")
+ (data (i32.const 3784) "\01\00\00\00\06\00\00\00N\00a\00N")
+ (data (i32.const 3804) ",")
+ (data (i32.const 3816) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y")
+ (data (i32.const 3852) ",")
+ (data (i32.const 3864) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y")
+ (data (i32.const 3960) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a6\b2O\ce1\ef?\f2\e7\1f\98+G\80<\dd|\e2eE+\ef?^\08q?{\b8\96\bc\81c\f5\e1\df$\ef?1\ab\tm\e1\f7\82<\e1\de\1f\f5\9d\1e\ef?\fa\bfo\1a\9b!=\bc\90\d9\da\d0\7f\18\ef?\b4\n\0cr\827\8b<\0b\03\e4\a6\85\12\ef?\8f\cb\ce\89\92\14n\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90]\deOi\a0\ee?\1d\a5M\b9\dc2{\bc\87\01\ebs\14\a1\ee?k\c0gT\fd\ec\94<2\c10\01\ed\a1\ee?Ul\d6\ab\e1\ebeT\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?")
+ (data (i32.const 7520) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?")
+ (data (i32.const 9568) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc")
+ (data (i32.const 11628) "\1c")
+ (data (i32.const 11640) "\01\00\00\00\06\00\00\00x\00y\00z")
+ (data (i32.const 11660) "\1c")
+ (data (i32.const 11672) "\01\00\00\00\06\00\00\00x\00z\00y")
+ (data (i32.const 11692) "\1c")
+ (data (i32.const 11704) "\01\00\00\00\06\00\00\00y\00x\00z")
+ (data (i32.const 11724) "\1c")
+ (data (i32.const 11736) "\01\00\00\00\06\00\00\00y\00z\00x")
+ (data (i32.const 11756) "\1c")
+ (data (i32.const 11768) "\01\00\00\00\06\00\00\00z\00x\00y")
+ (data (i32.const 11788) "<")
+ (data (i32.const 11800) "\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 ")
+ (data (i32.const 11852) "<")
+ (data (i32.const 11864) "\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s")
+ (data (i32.const 11916) "\1c")
+ (data (i32.const 11928) "\01\00\00\00\n\00\00\00q\00u\00a\00t\00(")
+ (data (i32.const 11948) "\1c")
+ (data (i32.const 11960) "\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(")
+ (data (i32.const 11980) "\1c")
+ (data (i32.const 11992) "\01\00\00\00\n\00\00\00v\00e\00c\002\00(")
+ (data (i32.const 12012) "\1c")
+ (data (i32.const 12044) "\1c")
+ (data (i32.const 12076) ",")
+ (data (i32.const 12088) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s")
+ (data (i32.const 12124) "\1c")
+ (data (i32.const 12156) "\1c")
+ (data (i32.const 12188) "\1c")
+ (data (i32.const 12220) "\1c")
+ (data (i32.const 12252) "\1c")
+ (data (i32.const 12264) "\01\00\00\00\n\00\00\00v\00e\00c\003\00(")
+ (data (i32.const 12284) "\1c")
+ (data (i32.const 12296) "\01\00\00\00\n\00\00\00v\00e\00c\004\00(")
+ (data (i32.const 12316) "<")
+ (data (i32.const 12328) "\01\00\00\00*\00\00\00O\00b\00j\00e\00c\00t\00 \00a\00l\00r\00e\00a\00d\00y\00 \00p\00i\00n\00n\00e\00d")
+ (data (i32.const 12380) "<")
+ (data (i32.const 12392) "\01\00\00\00(\00\00\00O\00b\00j\00e\00c\00t\00 \00i\00s\00 \00n\00o\00t\00 \00p\00i\00n\00n\00e\00d")
+ (data (i32.const 12448) "-\00\00\00 \00\00\00\00\00\00\00 ")
+ (data (i32.const 12476) "A\08\00\00\02\00\00\00A\00\00\00\02\00\00\00\81\08\00\00\02\00\00\00\81\00\00\00\02\00\00\00\01\t\00\00\02\00\00\00\01\01\00\00\02\00\00\00\01\19\00\00\02\00\00\00\01\1a\00\00\02\00\00\00\01\n\00\00\02\00\00\00\01\02\00\00\02\00\00\00\02\t\00\00\00\00\00\00\02\n\00\00\00\00\00\00\02A\00\00\00\00\00\00B\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\1a")
+ (data (i32.const 12668) " ")
+ (data (i32.const 12796) "\02A\00\00\00\00\00\00 ")
+ (table $0 58 funcref)
+ (elem $0 (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $~lib/math/NativeMath.hypot $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/vec4/subtract)
+ (export "__asbind_entryfile_flag" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_entryfile_flag))
+ (export "__asbind_String_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_String_ID))
+ (export "__asbind_ArrayBuffer_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBuffer_ID))
+ (export "__asbind_ArrayBufferView_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBufferView_ID))
+ (export "__asbind_Int8Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int8Array_ID))
+ (export "__asbind_Uint8Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint8Array_ID))
+ (export "__asbind_Int16Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int16Array_ID))
+ (export "__asbind_Uint16Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint16Array_ID))
+ (export "__asbind_Int32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int32Array_ID))
+ (export "__asbind_Uint32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint32Array_ID))
+ (export "__asbind_Float32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float32Array_ID))
+ (export "__asbind_Float64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float64Array_ID))
+ (export "__asbind_Int64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int64Array_ID))
+ (export "__asbind_Uint64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint64Array_ID))
+ (export "__asbind_I32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32Array_ID))
+ (export "__asbind_I64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64Array_ID))
+ (export "__asbind_StringArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArray_ID))
+ (export "__asbind_BoolArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArray_ID))
+ (export "__asbind_I32ArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32ArrayArray_ID))
+ (export "__asbind_I64ArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64ArrayArray_ID))
+ (export "__asbind_StringArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArrayArray_ID))
+ (export "__asbind_BoolArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArrayArray_ID))
+ (export "glMatrix.EPSILON" (global $assembly/common/EPSILON))
+ (export "glMatrix.ArrayTypeEnum.Float64ArrayT" (global $assembly/common/ArrayTypeEnum.Float64ArrayT))
+ (export "glMatrix.ArrayTypeEnum.ArrayF64T" (global $assembly/common/ArrayTypeEnum.ArrayF64T))
+ (export "glMatrix.ARRAY_TYPE" (global $assembly/common/ARRAY_TYPE))
+ (export "glMatrix.RANDOM" (global $assembly/common/RANDOM))
+ (export "glMatrix.ANGLE_ORDER" (global $assembly/common/ANGLE_ORDER))
+ (export "glMatrix.setMatrixArrayType" (func $assembly/common/setMatrixArrayType))
+ (export "glMatrix.toRadian" (func $assembly/common/toRadian))
+ (export "glMatrix.equals" (func $assembly/common/equals))
+ (export "mat2.create" (func $assembly/mat2/create))
+ (export "mat2.fromValues" (func $assembly/vec4/fromValues))
+ (export "mat2.mul" (global $assembly/mat2/mul))
+ (export "mat2.sub" (global $assembly/mat2/sub))
+ (export "mat2d.create" (func $assembly/mat2d/create))
+ (export "mat2d.fromValues" (func $assembly/mat2d/fromValues))
+ (export "mat2d.mul" (global $assembly/mat2d/mul))
+ (export "mat2d.sub" (global $assembly/mat2d/sub))
+ (export "mat3.create" (func $assembly/mat3/create))
+ (export "mat3.fromValues" (func $assembly/mat3/fromValues))
+ (export "mat3.mul" (global $assembly/mat3/mul))
+ (export "mat3.sub" (global $assembly/mat3/sub))
+ (export "mat4.Fov" (global $assembly/mat4/Fov))
+ (export "mat4.create" (func $assembly/mat4/create))
+ (export "mat4.fromValues" (func $assembly/mat4/fromValues))
+ (export "mat4.perspective" (global $assembly/mat4/perspective))
+ (export "mat4.ortho" (global $assembly/mat4/ortho))
+ (export "mat4.mul" (global $assembly/mat4/mul))
+ (export "mat4.sub" (global $assembly/mat4/sub))
+ (export "quat.create" (func $assembly/quat/create))
+ (export "quat.clone" (global $assembly/quat/clone))
+ (export "quat.fromValues" (global $assembly/quat/fromValues))
+ (export "quat.copy" (global $assembly/quat/copy))
+ (export "quat.set" (global $assembly/quat/set))
+ (export "quat.add" (global $assembly/quat/add))
+ (export "quat.mul" (global $assembly/quat/mul))
+ (export "quat.scale" (global $assembly/quat/scale))
+ (export "quat.dot" (global $assembly/quat/dot))
+ (export "quat.lerp" (global $assembly/quat/lerp))
+ (export "quat.length" (global $assembly/quat/length))
+ (export "quat.len" (global $assembly/quat/len))
+ (export "quat.squaredLength" (global $assembly/quat/squaredLength))
+ (export "quat.sqrLen" (global $assembly/quat/sqrLen))
+ (export "quat.normalize" (global $assembly/quat/normalize))
+ (export "quat.exactEquals" (global $assembly/quat/exactEquals))
+ (export "quat.rotationTo" (global $assembly/quat/rotationTo))
+ (export "quat.sqlerp" (global $assembly/quat/sqlerp))
+ (export "quat.setAxes" (global $assembly/quat/setAxes))
+ (export "quat2.create" (func $assembly/quat2/create))
+ (export "quat2.fromValues" (func $assembly/quat2/fromValues))
+ (export "quat2.fromRotationTranslationValues" (func $assembly/quat2/fromRotationTranslationValues))
+ (export "quat2.getReal" (global $assembly/quat2/getReal))
+ (export "quat2.setReal" (global $assembly/quat2/setReal))
+ (export "quat2.mul" (global $assembly/quat2/mul))
+ (export "quat2.dot" (global $assembly/quat2/dot))
+ (export "quat2.length" (global $assembly/quat2/length))
+ (export "quat2.len" (global $assembly/quat2/len))
+ (export "quat2.squaredLength" (global $assembly/quat2/squaredLength))
+ (export "quat2.sqrLen" (global $assembly/quat2/sqrLen))
+ (export "vec2.create" (func $assembly/vec2/create))
+ (export "vec2.fromValues" (func $assembly/vec2/fromValues))
+ (export "vec2.len" (global $assembly/vec2/len))
+ (export "vec2.sub" (global $assembly/vec2/sub))
+ (export "vec2.mul" (global $assembly/vec2/mul))
+ (export "vec2.div" (global $assembly/vec2/div))
+ (export "vec2.dist" (global $assembly/vec2/dist))
+ (export "vec2.sqrDist" (global $assembly/vec2/sqrDist))
+ (export "vec2.sqrLen" (global $assembly/vec2/sqrLen))
+ (export "vec2.forEach" (global $assembly/vec2/forEach))
+ (export "vec3.create" (func $assembly/vec3/create))
+ (export "vec3.fromValues" (func $assembly/vec3/fromValues))
+ (export "vec3.sub" (global $assembly/vec3/sub))
+ (export "vec3.mul" (global $assembly/vec3/mul))
+ (export "vec3.div" (global $assembly/vec3/div))
+ (export "vec3.dist" (global $assembly/vec3/dist))
+ (export "vec3.sqrDist" (global $assembly/vec3/sqrDist))
+ (export "vec3.len" (global $assembly/vec3/len))
+ (export "vec3.sqrLen" (global $assembly/vec3/sqrLen))
+ (export "vec3.forEach" (global $assembly/vec3/forEach))
+ (export "vec4.create" (func $assembly/vec4/create))
+ (export "vec4.fromValues" (func $assembly/vec4/fromValues))
+ (export "vec4.sub" (global $assembly/vec4/sub))
+ (export "vec4.mul" (global $assembly/vec4/mul))
+ (export "vec4.div" (global $assembly/vec4/div))
+ (export "vec4.dist" (global $assembly/vec4/dist))
+ (export "vec4.sqrDist" (global $assembly/vec4/sqrDist))
+ (export "vec4.len" (global $assembly/vec4/len))
+ (export "vec4.sqrLen" (global $assembly/vec4/sqrLen))
+ (export "vec4.forEach" (global $assembly/vec4/forEach))
+ (export "__new" (func $~lib/rt/itcms/__new))
+ (export "__pin" (func $~lib/rt/itcms/__pin))
+ (export "__unpin" (func $~lib/rt/itcms/__unpin))
+ (export "__collect" (func $~lib/rt/itcms/__collect))
+ (export "__rtti_base" (global $~lib/rt/__rtti_base))
+ (export "memory" (memory $0))
+ (export "__setArgumentsLength" (func $~setArgumentsLength))
+ (export "mat2.clone" (func $export:assembly/mat2/clone))
+ (export "mat2.copy" (func $export:assembly/mat2/copy))
+ (export "mat2.identity" (func $export:assembly/mat2/identity))
+ (export "mat2.set" (func $export:assembly/mat2/set))
+ (export "mat2.transpose" (func $export:assembly/mat2/transpose))
+ (export "mat2.invert" (func $export:assembly/mat2/invert))
+ (export "mat2.adjoint" (func $export:assembly/mat2/adjoint))
+ (export "mat2.determinant" (func $export:assembly/mat2/determinant))
+ (export "mat2.multiply" (func $export:assembly/mat2/multiply))
+ (export "mat2.rotate" (func $export:assembly/mat2/rotate))
+ (export "mat2.scale" (func $export:assembly/mat2/scale))
+ (export "mat2.fromRotation" (func $export:assembly/mat2/fromRotation))
+ (export "mat2.fromScaling" (func $export:assembly/mat2/fromScaling))
+ (export "mat2.str" (func $export:assembly/mat2/str))
+ (export "mat2.frob" (func $export:assembly/mat2/frob))
+ (export "mat2.LDU" (func $export:assembly/mat2/LDU))
+ (export "mat2.add" (func $export:assembly/mat2/add))
+ (export "mat2.subtract" (func $export:assembly/mat2/subtract))
+ (export "mat2.exactEquals" (func $export:assembly/mat2/exactEquals))
+ (export "mat2.equals" (func $export:assembly/mat2/equals))
+ (export "mat2.multiplyScalar" (func $export:assembly/mat2/multiplyScalar))
+ (export "mat2.multiplyScalarAndAdd" (func $export:assembly/mat2/multiplyScalarAndAdd))
+ (export "mat2d.clone" (func $export:assembly/mat2d/clone))
+ (export "mat2d.copy" (func $export:assembly/mat2d/copy))
+ (export "mat2d.identity" (func $export:assembly/mat2d/identity))
+ (export "mat2d.set" (func $export:assembly/mat2d/set))
+ (export "mat2d.invert" (func $export:assembly/mat2d/invert))
+ (export "mat2d.determinant" (func $export:assembly/mat2d/determinant))
+ (export "mat2d.multiply" (func $export:assembly/mat2d/multiply))
+ (export "mat2d.rotate" (func $export:assembly/mat2d/rotate))
+ (export "mat2d.scale" (func $export:assembly/mat2d/scale))
+ (export "mat2d.translate" (func $export:assembly/mat2d/translate))
+ (export "mat2d.fromRotation" (func $export:assembly/mat2d/fromRotation))
+ (export "mat2d.fromScaling" (func $export:assembly/mat2d/fromScaling))
+ (export "mat2d.fromTranslation" (func $export:assembly/mat2d/fromTranslation))
+ (export "mat2d.str" (func $export:assembly/mat2d/str))
+ (export "mat2d.frob" (func $export:assembly/mat2d/frob))
+ (export "mat2d.add" (func $export:assembly/mat2d/add))
+ (export "mat2d.subtract" (func $export:assembly/mat2d/subtract))
+ (export "mat2d.multiplyScalar" (func $export:assembly/mat2d/multiplyScalar))
+ (export "mat2d.multiplyScalarAndAdd" (func $export:assembly/mat2d/multiplyScalarAndAdd))
+ (export "mat2d.exactEquals" (func $export:assembly/mat2d/exactEquals))
+ (export "mat2d.equals" (func $export:assembly/mat2d/equals))
+ (export "mat3.fromMat4" (func $export:assembly/mat3/fromMat4))
+ (export "mat3.clone" (func $export:assembly/mat3/clone))
+ (export "mat3.copy" (func $export:assembly/mat3/copy))
+ (export "mat3.set" (func $export:assembly/mat3/set))
+ (export "mat3.identity" (func $export:assembly/mat3/identity))
+ (export "mat3.transpose" (func $export:assembly/mat3/transpose))
+ (export "mat3.invert" (func $export:assembly/mat3/invert))
+ (export "mat3.adjoint" (func $export:assembly/mat3/adjoint))
+ (export "mat3.determinant" (func $export:assembly/mat3/determinant))
+ (export "mat3.multiply" (func $export:assembly/mat3/multiply))
+ (export "mat3.translate" (func $export:assembly/mat3/translate))
+ (export "mat3.rotate" (func $export:assembly/mat3/rotate))
+ (export "mat3.scale" (func $export:assembly/mat3/scale))
+ (export "mat3.fromTranslation" (func $export:assembly/mat3/fromTranslation))
+ (export "mat3.fromRotation" (func $export:assembly/mat3/fromRotation))
+ (export "mat3.fromScaling" (func $export:assembly/mat3/fromScaling))
+ (export "mat3.fromMat2d" (func $export:assembly/mat3/fromMat2d))
+ (export "mat3.fromQuat" (func $export:assembly/mat3/fromQuat))
+ (export "mat3.normalFromMat4" (func $export:assembly/mat3/normalFromMat4))
+ (export "mat3.projection" (func $export:assembly/mat3/projection))
+ (export "mat3.str" (func $export:assembly/mat3/str))
+ (export "mat3.frob" (func $export:assembly/mat3/frob))
+ (export "mat3.add" (func $export:assembly/mat3/add))
+ (export "mat3.subtract" (func $export:assembly/mat3/subtract))
+ (export "mat3.multiplyScalar" (func $export:assembly/mat3/multiplyScalar))
+ (export "mat3.multiplyScalarAndAdd" (func $export:assembly/mat3/multiplyScalarAndAdd))
+ (export "mat3.exactEquals" (func $export:assembly/mat3/exactEquals))
+ (export "mat3.equals" (func $export:assembly/mat3/equals))
+ (export "mat4.Fov#get:upDegrees" (func $export:assembly/mat4/Fov#get:upDegrees))
+ (export "mat4.Fov#set:upDegrees" (func $export:assembly/mat4/Fov#set:upDegrees))
+ (export "mat4.Fov#get:downDegrees" (func $export:assembly/mat4/Fov#get:downDegrees))
+ (export "mat4.Fov#set:downDegrees" (func $export:assembly/mat4/Fov#set:downDegrees))
+ (export "mat4.Fov#get:leftDegrees" (func $export:assembly/mat4/Fov#get:leftDegrees))
+ (export "mat4.Fov#set:leftDegrees" (func $export:assembly/mat4/Fov#set:leftDegrees))
+ (export "mat4.Fov#get:rightDegrees" (func $export:assembly/mat4/Fov#get:rightDegrees))
+ (export "mat4.Fov#set:rightDegrees" (func $export:assembly/mat4/Fov#set:rightDegrees))
+ (export "mat4.Fov#constructor" (func $export:assembly/mat4/Fov#constructor))
+ (export "mat4.clone" (func $export:assembly/mat4/clone))
+ (export "mat4.copy" (func $export:assembly/mat4/copy))
+ (export "mat4.set" (func $export:assembly/mat4/set))
+ (export "mat4.identity" (func $export:assembly/mat4/identity))
+ (export "mat4.transpose" (func $export:assembly/mat4/transpose))
+ (export "mat4.invert" (func $export:assembly/mat4/invert))
+ (export "mat4.adjoint" (func $export:assembly/mat4/adjoint))
+ (export "mat4.determinant" (func $export:assembly/mat4/determinant))
+ (export "mat4.multiply" (func $export:assembly/mat4/multiply))
+ (export "mat4.translate" (func $export:assembly/mat4/translate))
+ (export "mat4.scale" (func $export:assembly/mat4/scale))
+ (export "mat4.rotate" (func $export:assembly/mat4/rotate))
+ (export "mat4.rotateX" (func $export:assembly/mat4/rotateX))
+ (export "mat4.rotateY" (func $export:assembly/mat4/rotateY))
+ (export "mat4.rotateZ" (func $export:assembly/mat4/rotateZ))
+ (export "mat4.fromTranslation" (func $export:assembly/mat4/fromTranslation))
+ (export "mat4.fromScaling" (func $export:assembly/mat4/fromScaling))
+ (export "mat4.fromRotation" (func $export:assembly/mat4/fromRotation))
+ (export "mat4.fromXRotation" (func $export:assembly/mat4/fromXRotation))
+ (export "mat4.fromYRotation" (func $export:assembly/mat4/fromYRotation))
+ (export "mat4.fromZRotation" (func $export:assembly/mat4/fromZRotation))
+ (export "mat4.fromRotationTranslation" (func $export:assembly/mat4/fromRotationTranslation))
+ (export "mat4.fromQuat2" (func $export:assembly/mat4/fromQuat2))
+ (export "mat4.getTranslation" (func $export:assembly/mat4/getTranslation))
+ (export "mat4.getScaling" (func $export:assembly/mat4/getScaling))
+ (export "mat4.getRotation" (func $export:assembly/mat4/getRotation))
+ (export "mat4.decompose" (func $export:assembly/mat4/decompose))
+ (export "mat4.fromRotationTranslationScale" (func $export:assembly/mat4/fromRotationTranslationScale))
+ (export "mat4.fromRotationTranslationScaleOrigin" (func $export:assembly/mat4/fromRotationTranslationScaleOrigin))
+ (export "mat4.fromQuat" (func $export:assembly/mat4/fromQuat))
+ (export "mat4.frustum" (func $export:assembly/mat4/frustum))
+ (export "mat4.perspectiveNO" (func $export:assembly/mat4/perspectiveNO))
+ (export "mat4.perspectiveZO" (func $export:assembly/mat4/perspectiveZO))
+ (export "mat4.perspectiveFromFieldOfView" (func $export:assembly/mat4/perspectiveFromFieldOfView))
+ (export "mat4.orthoNO" (func $export:assembly/mat4/orthoNO))
+ (export "mat4.orthoZO" (func $export:assembly/mat4/orthoZO))
+ (export "mat4.lookAt" (func $export:assembly/mat4/lookAt))
+ (export "mat4.targetTo" (func $export:assembly/mat4/targetTo))
+ (export "mat4.str" (func $export:assembly/mat4/str))
+ (export "mat4.frob" (func $export:assembly/mat4/frob))
+ (export "mat4.add" (func $export:assembly/mat4/add))
+ (export "mat4.subtract" (func $export:assembly/mat4/subtract))
+ (export "mat4.multiplyScalar" (func $export:assembly/mat4/multiplyScalar))
+ (export "mat4.multiplyScalarAndAdd" (func $export:assembly/mat4/multiplyScalarAndAdd))
+ (export "mat4.exactEquals" (func $export:assembly/mat4/exactEquals))
+ (export "mat4.equals" (func $export:assembly/mat4/equals))
+ (export "quat.identity" (func $export:assembly/quat/identity))
+ (export "quat.setAxisAngle" (func $export:assembly/quat/setAxisAngle))
+ (export "quat.getAxisAngle" (func $export:assembly/quat/getAxisAngle))
+ (export "quat.getAngle" (func $export:assembly/quat/getAngle))
+ (export "quat.multiply" (func $export:assembly/quat/multiply))
+ (export "quat.rotateX" (func $export:assembly/quat/rotateX))
+ (export "quat.rotateY" (func $export:assembly/quat/rotateY))
+ (export "quat.rotateZ" (func $export:assembly/quat/rotateZ))
+ (export "quat.calculateW" (func $export:assembly/quat/calculateW))
+ (export "quat.exp" (func $export:assembly/quat/exp))
+ (export "quat.ln" (func $export:assembly/quat/ln))
+ (export "quat.pow" (func $export:assembly/quat/pow))
+ (export "quat.slerp" (func $export:assembly/quat/slerp))
+ (export "quat.random" (func $export:assembly/quat/random))
+ (export "quat.invert" (func $export:assembly/quat/invert))
+ (export "quat.conjugate" (func $export:assembly/quat/conjugate))
+ (export "quat.fromMat3" (func $export:assembly/quat/fromMat3))
+ (export "quat.fromEuler" (func $export:assembly/quat/fromEuler@varargs))
+ (export "quat.str" (func $export:assembly/quat/str))
+ (export "quat.equals" (func $export:assembly/quat/equals))
+ (export "quat2.clone" (func $export:assembly/quat2/clone))
+ (export "quat2.fromRotationTranslation" (func $export:assembly/quat2/fromRotationTranslation))
+ (export "quat2.fromTranslation" (func $export:assembly/quat2/fromTranslation))
+ (export "quat2.fromRotation" (func $export:assembly/quat2/fromRotation))
+ (export "quat2.fromMat4" (func $export:assembly/quat2/fromMat4))
+ (export "quat2.copy" (func $export:assembly/quat2/copy))
+ (export "quat2.identity" (func $export:assembly/quat2/identity))
+ (export "quat2.set" (func $export:assembly/quat2/set))
+ (export "quat2.getDual" (func $export:assembly/quat2/getDual))
+ (export "quat2.setDual" (func $export:assembly/quat2/setDual))
+ (export "quat2.getTranslation" (func $export:assembly/quat2/getTranslation))
+ (export "quat2.translate" (func $export:assembly/quat2/translate))
+ (export "quat2.rotateX" (func $export:assembly/quat2/rotateX))
+ (export "quat2.rotateY" (func $export:assembly/quat2/rotateY))
+ (export "quat2.rotateZ" (func $export:assembly/quat2/rotateZ))
+ (export "quat2.rotateByQuatAppend" (func $export:assembly/quat2/rotateByQuatAppend))
+ (export "quat2.rotateByQuatPrepend" (func $export:assembly/quat2/rotateByQuatPrepend))
+ (export "quat2.rotateAroundAxis" (func $export:assembly/quat2/rotateAroundAxis))
+ (export "quat2.add" (func $export:assembly/quat2/add))
+ (export "quat2.multiply" (func $export:assembly/quat2/multiply))
+ (export "quat2.scale" (func $export:assembly/quat2/scale))
+ (export "quat2.lerp" (func $export:assembly/quat2/lerp))
+ (export "quat2.invert" (func $export:assembly/quat2/invert))
+ (export "quat2.conjugate" (func $export:assembly/quat2/conjugate))
+ (export "quat2.normalize" (func $export:assembly/quat2/normalize))
+ (export "quat2.str" (func $export:assembly/quat2/str))
+ (export "quat2.exactEquals" (func $export:assembly/quat2/exactEquals))
+ (export "quat2.equals" (func $export:assembly/quat2/equals))
+ (export "vec2.clone" (func $export:assembly/vec2/clone))
+ (export "vec2.copy" (func $export:assembly/vec2/copy))
+ (export "vec2.set" (func $export:assembly/vec2/set))
+ (export "vec2.add" (func $export:assembly/vec2/add))
+ (export "vec2.subtract" (func $export:assembly/vec2/subtract))
+ (export "vec2.multiply" (func $export:assembly/vec2/multiply))
+ (export "vec2.divide" (func $export:assembly/vec2/divide))
+ (export "vec2.ceil" (func $export:assembly/vec2/ceil))
+ (export "vec2.floor" (func $export:assembly/vec2/floor))
+ (export "vec2.min" (func $export:assembly/vec2/min))
+ (export "vec2.max" (func $export:assembly/vec2/max))
+ (export "vec2.round" (func $export:assembly/vec2/round))
+ (export "vec2.scale" (func $export:assembly/vec2/scale))
+ (export "vec2.scaleAndAdd" (func $export:assembly/vec2/scaleAndAdd))
+ (export "vec2.distance" (func $export:assembly/vec2/distance))
+ (export "vec2.squaredDistance" (func $export:assembly/vec2/squaredDistance))
+ (export "vec2.length" (func $export:assembly/vec2/length))
+ (export "vec2.squaredLength" (func $export:assembly/vec2/squaredLength))
+ (export "vec2.negate" (func $export:assembly/vec2/negate))
+ (export "vec2.inverse" (func $export:assembly/vec2/inverse))
+ (export "vec2.normalize" (func $export:assembly/vec2/normalize))
+ (export "vec2.dot" (func $export:assembly/vec2/dot))
+ (export "vec2.cross" (func $export:assembly/vec2/cross))
+ (export "vec2.lerp" (func $export:assembly/vec2/lerp))
+ (export "vec2.random" (func $export:assembly/vec2/random))
+ (export "vec2.transformMat2" (func $export:assembly/vec2/transformMat2))
+ (export "vec2.transformMat2d" (func $export:assembly/vec2/transformMat2d))
+ (export "vec2.transformMat3" (func $export:assembly/vec2/transformMat3))
+ (export "vec2.transformMat4" (func $export:assembly/vec2/transformMat4))
+ (export "vec2.rotate" (func $export:assembly/vec2/rotate))
+ (export "vec2.angle" (func $export:assembly/vec2/angle))
+ (export "vec2.zero" (func $export:assembly/vec2/zero))
+ (export "vec2.str" (func $export:assembly/vec2/str))
+ (export "vec2.exactEquals" (func $export:assembly/vec2/exactEquals))
+ (export "vec2.equals" (func $export:assembly/vec2/equals))
+ (export "vec3.clone" (func $export:assembly/vec3/clone))
+ (export "vec3.length" (func $export:assembly/vec3/length))
+ (export "vec3.copy" (func $export:assembly/vec3/copy))
+ (export "vec3.set" (func $export:assembly/vec3/set))
+ (export "vec3.add" (func $export:assembly/vec3/add))
+ (export "vec3.subtract" (func $export:assembly/vec3/subtract))
+ (export "vec3.multiply" (func $export:assembly/vec3/multiply))
+ (export "vec3.divide" (func $export:assembly/vec3/divide))
+ (export "vec3.ceil" (func $export:assembly/vec3/ceil))
+ (export "vec3.floor" (func $export:assembly/vec3/floor))
+ (export "vec3.min" (func $export:assembly/vec3/min))
+ (export "vec3.max" (func $export:assembly/vec3/max))
+ (export "vec3.round" (func $export:assembly/vec3/round))
+ (export "vec3.scale" (func $export:assembly/vec3/scale))
+ (export "vec3.scaleAndAdd" (func $export:assembly/vec3/scaleAndAdd))
+ (export "vec3.distance" (func $export:assembly/vec3/distance))
+ (export "vec3.squaredDistance" (func $export:assembly/vec3/squaredDistance))
+ (export "vec3.squaredLength" (func $export:assembly/vec3/squaredLength))
+ (export "vec3.negate" (func $export:assembly/vec3/negate))
+ (export "vec3.inverse" (func $export:assembly/vec3/inverse))
+ (export "vec3.normalize" (func $export:assembly/vec3/normalize))
+ (export "vec3.dot" (func $export:assembly/vec3/dot))
+ (export "vec3.cross" (func $export:assembly/vec3/cross))
+ (export "vec3.lerp" (func $export:assembly/vec3/lerp))
+ (export "vec3.slerp" (func $export:assembly/vec3/slerp))
+ (export "vec3.hermite" (func $export:assembly/vec3/hermite))
+ (export "vec3.bezier" (func $export:assembly/vec3/bezier))
+ (export "vec3.random" (func $export:assembly/vec3/random))
+ (export "vec3.transformMat4" (func $export:assembly/vec3/transformMat4))
+ (export "vec3.transformMat3" (func $export:assembly/vec3/transformMat3))
+ (export "vec3.transformQuat" (func $export:assembly/vec3/transformQuat))
+ (export "vec3.rotateX" (func $export:assembly/vec3/rotateX))
+ (export "vec3.rotateY" (func $export:assembly/vec3/rotateY))
+ (export "vec3.rotateZ" (func $export:assembly/vec3/rotateZ))
+ (export "vec3.angle" (func $export:assembly/vec3/angle))
+ (export "vec3.zero" (func $export:assembly/vec3/zero))
+ (export "vec3.str" (func $export:assembly/vec3/str))
+ (export "vec3.exactEquals" (func $export:assembly/vec3/exactEquals))
+ (export "vec3.equals" (func $export:assembly/vec3/equals))
+ (export "vec4.clone" (func $export:assembly/mat2/clone))
+ (export "vec4.copy" (func $export:assembly/mat2/copy))
+ (export "vec4.set" (func $export:assembly/mat2/set))
+ (export "vec4.add" (func $export:assembly/mat2/add))
+ (export "vec4.subtract" (func $export:assembly/mat2/subtract))
+ (export "vec4.multiply" (func $export:assembly/vec4/multiply))
+ (export "vec4.divide" (func $export:assembly/vec4/divide))
+ (export "vec4.ceil" (func $export:assembly/vec4/ceil))
+ (export "vec4.floor" (func $export:assembly/vec4/floor))
+ (export "vec4.min" (func $export:assembly/vec4/min))
+ (export "vec4.max" (func $export:assembly/vec4/max))
+ (export "vec4.round" (func $export:assembly/vec4/round))
+ (export "vec4.scale" (func $export:assembly/mat2/multiplyScalar))
+ (export "vec4.scaleAndAdd" (func $export:assembly/mat2/multiplyScalarAndAdd))
+ (export "vec4.distance" (func $export:assembly/vec4/distance))
+ (export "vec4.squaredDistance" (func $export:assembly/vec4/squaredDistance))
+ (export "vec4.length" (func $export:assembly/vec4/length))
+ (export "vec4.squaredLength" (func $export:assembly/vec4/squaredLength))
+ (export "vec4.negate" (func $export:assembly/vec4/negate))
+ (export "vec4.inverse" (func $export:assembly/vec4/inverse))
+ (export "vec4.normalize" (func $export:assembly/vec4/normalize))
+ (export "vec4.dot" (func $export:assembly/vec4/dot))
+ (export "vec4.cross" (func $export:assembly/vec4/cross))
+ (export "vec4.lerp" (func $export:assembly/vec4/lerp))
+ (export "vec4.random" (func $export:assembly/vec4/random))
+ (export "vec4.transformMat4" (func $export:assembly/vec4/transformMat4))
+ (export "vec4.transformQuat" (func $export:assembly/vec4/transformQuat))
+ (export "vec4.zero" (func $export:assembly/vec4/zero))
+ (export "vec4.str" (func $export:assembly/vec4/str))
+ (export "vec4.exactEquals" (func $export:assembly/mat2/exactEquals))
+ (export "vec4.equals" (func $export:assembly/mat2/equals))
+ (start $~start)
+ (func $~lib/math/NativeMath.random (result f64)
+ (local $0 i64)
+ (local $1 i64)
+ (local $2 i32)
+ global.get $~lib/math/random_seeded
+ i32.eqz
+ if
+ call $~lib/builtins/seed
+ i64.reinterpret_f64
+ local.set $1
+ i32.const 1
+ global.set $~lib/math/random_seeded
+ local.get $1
+ local.get $1
+ i64.const 33
+ i64.shr_u
+ i64.xor
+ i64.const -49064778989728563
+ i64.mul
+ local.tee $0
+ local.get $0
+ i64.const 33
+ i64.shr_u
+ i64.xor
+ i64.const -4265267296055464877
+ i64.mul
+ local.tee $0
+ local.get $0
+ i64.const 33
+ i64.shr_u
+ i64.xor
+ global.set $~lib/math/random_state0_64
+ global.get $~lib/math/random_state0_64
+ i64.const -1
+ i64.xor
+ local.tee $0
+ local.get $0
+ i64.const 33
+ i64.shr_u
+ i64.xor
+ i64.const -49064778989728563
+ i64.mul
+ local.tee $0
+ local.get $0
+ i64.const 33
+ i64.shr_u
+ i64.xor
+ i64.const -4265267296055464877
+ i64.mul
+ local.tee $0
+ local.get $0
+ i64.const 33
+ i64.shr_u
+ i64.xor
+ global.set $~lib/math/random_state1_64
+ end
+ global.get $~lib/math/random_state0_64
+ local.set $0
+ global.get $~lib/math/random_state1_64
+ local.tee $1
+ global.set $~lib/math/random_state0_64
+ local.get $1
+ local.get $0
+ local.get $0
+ i64.const 23
+ i64.shl
+ i64.xor
+ local.tee $0
+ local.get $0
+ i64.const 17
+ i64.shr_u
+ i64.xor
+ i64.xor
+ local.get $1
+ i64.const 26
+ i64.shr_u
+ i64.xor
+ global.set $~lib/math/random_state1_64
+ local.get $1
+ i64.const 12
+ i64.shr_u
+ i64.const 4607182418800017408
+ i64.or
+ f64.reinterpret_i64
+ f64.const 1
+ f64.sub
+ )
+ (func $~lib/typedarray/Float64Array#__get (param $0 i32) (param $1 i32) (result f64)
+ local.get $1
+ local.get $0
+ i32.load offset=8
+ i32.const 3
+ i32.shr_u
+ i32.ge_u
+ if
+ i32.const 1120
+ i32.const 1184
+ i32.const 1374
+ i32.const 64
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ i32.const 3
+ i32.shl
+ i32.add
+ f64.load
+ )
+ (func $~lib/typedarray/Float64Array#__set (param $0 i32) (param $1 i32) (param $2 f64)
+ local.get $1
+ local.get $0
+ i32.load offset=8
+ i32.const 3
+ i32.shr_u
+ i32.ge_u
+ if
+ i32.const 1120
+ i32.const 1184
+ i32.const 1385
+ i32.const 64
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ i32.const 3
+ i32.shl
+ i32.add
+ local.get $2
+ f64.store
+ )
+ (func $assembly/mat2d/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $7
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $7
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $6
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $3
+ local.get $11
+ f64.mul
+ local.get $5
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $13
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $14
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $~lib/math/NativeMath.hypot (param $0 f64) (param $1 f64) (result f64)
+ (local $2 i64)
+ (local $3 i64)
+ (local $4 i64)
+ (local $5 f64)
+ (local $6 i32)
+ (local $7 f64)
+ (local $8 i32)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ local.get $1
+ i64.reinterpret_f64
+ i64.const 9223372036854775807
+ i64.and
+ local.tee $2
+ local.get $0
+ i64.reinterpret_f64
+ i64.const 9223372036854775807
+ i64.and
+ local.tee $3
+ i64.gt_u
+ if
+ local.get $3
+ local.get $2
+ local.set $3
+ local.set $2
+ end
+ local.get $2
+ f64.reinterpret_i64
+ local.set $1
+ local.get $2
+ i64.const 52
+ i64.shr_u
+ i32.wrap_i64
+ local.tee $6
+ i32.const 2047
+ i32.eq
+ if
+ local.get $1
+ return
+ end
+ local.get $3
+ f64.reinterpret_i64
+ local.set $0
+ i32.const 1
+ local.get $2
+ i64.eqz
+ local.get $3
+ i64.const 52
+ i64.shr_u
+ i32.wrap_i64
+ local.tee $8
+ i32.const 2047
+ i32.eq
+ select
+ if
+ local.get $0
+ return
+ end
+ local.get $8
+ local.get $6
+ i32.sub
+ i32.const 64
+ i32.gt_s
+ if
+ local.get $0
+ local.get $1
+ f64.add
+ return
+ end
+ f64.const 1
+ local.set $7
+ local.get $8
+ i32.const 1533
+ i32.gt_u
+ if (result f64)
+ f64.const 5260135901548373507240989e186
+ local.set $7
+ local.get $1
+ f64.const 1.90109156629516e-211
+ f64.mul
+ local.set $1
+ local.get $0
+ f64.const 1.90109156629516e-211
+ f64.mul
+ else
+ local.get $6
+ i32.const 573
+ i32.lt_u
+ if (result f64)
+ f64.const 1.90109156629516e-211
+ local.set $7
+ local.get $1
+ f64.const 5260135901548373507240989e186
+ f64.mul
+ local.set $1
+ local.get $0
+ f64.const 5260135901548373507240989e186
+ f64.mul
+ else
+ local.get $0
+ end
+ end
+ local.set $0
+ local.get $1
+ local.get $1
+ local.get $1
+ f64.const 134217729
+ f64.mul
+ local.tee $11
+ f64.sub
+ local.get $11
+ f64.add
+ local.tee $10
+ f64.sub
+ local.set $5
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.const 134217729
+ f64.mul
+ local.tee $11
+ f64.sub
+ local.get $11
+ f64.add
+ local.tee $9
+ f64.sub
+ local.set $11
+ local.get $7
+ local.get $10
+ local.get $10
+ f64.mul
+ local.get $1
+ local.get $1
+ f64.mul
+ local.tee $1
+ f64.sub
+ local.get $10
+ local.get $10
+ f64.add
+ local.get $5
+ f64.add
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $9
+ f64.mul
+ local.get $0
+ local.get $0
+ f64.mul
+ local.tee $0
+ f64.sub
+ local.get $9
+ local.get $9
+ f64.add
+ local.get $11
+ f64.add
+ local.get $11
+ f64.mul
+ f64.add
+ f64.add
+ local.get $1
+ f64.add
+ local.get $0
+ f64.add
+ f64.sqrt
+ f64.mul
+ )
+ (func $assembly/vec3/distance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ block $__inlined_func$assembly/maths/Maths.hypot3 (result f64)
+ f64.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ f64.abs
+ local.tee $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ f64.abs
+ local.tee $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ f64.abs
+ local.tee $5
+ f64.max
+ f64.max
+ local.tee $2
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot3
+ drop
+ local.get $2
+ local.get $3
+ f64.const 1
+ local.get $2
+ f64.div
+ local.tee $2
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $2
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $2
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ )
+ (func $assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.mul
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ )
+ (func $assembly/vec3/length (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ block $__inlined_func$assembly/maths/Maths.hypot3 (result f64)
+ f64.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $4
+ f64.max
+ f64.max
+ local.tee $1
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot3
+ drop
+ local.get $1
+ local.get $2
+ f64.const 1
+ local.get $1
+ f64.div
+ local.tee $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $1
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ )
+ (func $assembly/vec3/squaredLength (param $0 i32) (result f64)
+ (local $1 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $1
+ local.get $1
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ )
+ (func $~lib/rt/itcms/visitRoots
+ (local $0 i32)
+ (local $1 i32)
+ i32.const 1120
+ call $~lib/rt/itcms/__visit
+ i32.const 1568
+ call $~lib/rt/itcms/__visit
+ i32.const 1680
+ call $~lib/rt/itcms/__visit
+ i32.const 12336
+ call $~lib/rt/itcms/__visit
+ i32.const 12400
+ call $~lib/rt/itcms/__visit
+ global.get $assembly/common/ANGLE_ORDER
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/quat/tmpvec3
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/quat/xUnitVec3
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/quat/yUnitVec3
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/quat/temp1
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/quat/temp2
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/quat/matr
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/vec2/vec
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/vec3/vec
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/vec4/vec
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $~lib/rt/itcms/pinSpace
+ local.tee $1
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ loop $while-continue|0
+ local.get $0
+ local.get $1
+ i32.ne
+ if
+ local.get $0
+ i32.load offset=4
+ drop
+ local.get $0
+ i32.const 20
+ i32.add
+ call $~lib/rt/__visit_members
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ br $while-continue|0
+ end
+ end
+ )
+ (func $~lib/rt/itcms/Object#makeGray (param $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ local.get $0
+ global.get $~lib/rt/itcms/iter
+ i32.eq
+ if
+ local.get $0
+ i32.load offset=8
+ global.set $~lib/rt/itcms/iter
+ end
+ block $__inlined_func$~lib/rt/itcms/Object#unlink
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.tee $2
+ i32.eqz
+ if
+ local.get $0
+ i32.load offset=8
+ drop
+ br $__inlined_func$~lib/rt/itcms/Object#unlink
+ end
+ local.get $2
+ local.get $0
+ i32.load offset=8
+ local.tee $1
+ i32.store offset=8
+ local.get $1
+ local.get $2
+ local.get $1
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ end
+ global.get $~lib/rt/itcms/toSpace
+ local.set $2
+ local.get $0
+ i32.load offset=12
+ local.tee $1
+ i32.const 1
+ i32.le_u
+ if (result i32)
+ i32.const 1
+ else
+ local.get $1
+ i32.const 12448
+ i32.load
+ i32.gt_u
+ if
+ i32.const 1120
+ i32.const 1872
+ i32.const 22
+ i32.const 28
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ i32.const 3
+ i32.shl
+ i32.const 12452
+ i32.add
+ i32.load
+ i32.const 32
+ i32.and
+ end
+ if (result i32)
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ else
+ i32.const 2
+ end
+ local.set $3
+ local.get $2
+ i32.load offset=8
+ local.set $1
+ local.get $0
+ local.get $2
+ local.get $3
+ i32.or
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $0
+ local.get $1
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ local.get $2
+ local.get $0
+ i32.store offset=8
+ )
+ (func $~lib/rt/itcms/__visit (param $0 i32)
+ local.get $0
+ i32.eqz
+ if
+ return
+ end
+ global.get $~lib/rt/itcms/white
+ local.get $0
+ i32.const 20
+ i32.sub
+ local.tee $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.eq
+ if
+ local.get $0
+ call $~lib/rt/itcms/Object#makeGray
+ global.get $~lib/rt/itcms/visitCount
+ i32.const 1
+ i32.add
+ global.set $~lib/rt/itcms/visitCount
+ end
+ )
+ (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ local.get $1
+ i32.load
+ i32.const -4
+ i32.and
+ local.tee $2
+ i32.const 256
+ i32.lt_u
+ if (result i32)
+ local.get $2
+ i32.const 4
+ i32.shr_u
+ else
+ i32.const 31
+ local.get $2
+ i32.const 1073741820
+ local.get $2
+ i32.const 1073741820
+ i32.lt_u
+ select
+ local.tee $3
+ i32.clz
+ i32.sub
+ local.tee $2
+ i32.const 7
+ i32.sub
+ local.set $4
+ local.get $3
+ local.get $2
+ i32.const 4
+ i32.sub
+ i32.shr_u
+ i32.const 16
+ i32.xor
+ end
+ local.set $3
+ local.get $1
+ i32.load offset=8
+ local.set $2
+ local.get $1
+ i32.load offset=4
+ local.tee $5
+ if
+ local.get $5
+ local.get $2
+ i32.store offset=8
+ end
+ local.get $2
+ if
+ local.get $2
+ local.get $5
+ i32.store offset=4
+ end
+ local.get $1
+ local.get $0
+ local.get $3
+ local.get $4
+ i32.const 4
+ i32.shl
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ i32.eq
+ if
+ local.get $0
+ local.get $3
+ local.get $4
+ i32.const 4
+ i32.shl
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $2
+ i32.store offset=96
+ local.get $2
+ i32.eqz
+ if
+ local.get $0
+ local.get $4
+ i32.const 2
+ i32.shl
+ i32.add
+ local.tee $2
+ i32.load offset=4
+ i32.const -2
+ local.get $3
+ i32.rotl
+ i32.and
+ local.set $1
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.eqz
+ if
+ local.get $0
+ local.get $0
+ i32.load
+ i32.const -2
+ local.get $4
+ i32.rotl
+ i32.and
+ i32.store
+ end
+ end
+ end
+ )
+ (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ local.get $1
+ i32.load
+ local.set $3
+ local.get $1
+ i32.const 4
+ i32.add
+ local.get $1
+ i32.load
+ i32.const -4
+ i32.and
+ i32.add
+ local.tee $4
+ i32.load
+ local.tee $2
+ i32.const 1
+ i32.and
+ if
+ local.get $0
+ local.get $4
+ call $~lib/rt/tlsf/removeBlock
+ local.get $1
+ local.get $3
+ i32.const 4
+ i32.add
+ local.get $2
+ i32.const -4
+ i32.and
+ i32.add
+ local.tee $3
+ i32.store
+ local.get $1
+ i32.const 4
+ i32.add
+ local.get $1
+ i32.load
+ i32.const -4
+ i32.and
+ i32.add
+ local.tee $4
+ i32.load
+ local.set $2
+ end
+ local.get $3
+ i32.const 2
+ i32.and
+ if
+ local.get $1
+ i32.const 4
+ i32.sub
+ i32.load
+ local.tee $1
+ i32.load
+ local.set $6
+ local.get $0
+ local.get $1
+ call $~lib/rt/tlsf/removeBlock
+ local.get $1
+ local.get $6
+ i32.const 4
+ i32.add
+ local.get $3
+ i32.const -4
+ i32.and
+ i32.add
+ local.tee $3
+ i32.store
+ end
+ local.get $4
+ local.get $2
+ i32.const 2
+ i32.or
+ i32.store
+ local.get $4
+ i32.const 4
+ i32.sub
+ local.get $1
+ i32.store
+ local.get $0
+ local.get $3
+ i32.const -4
+ i32.and
+ local.tee $3
+ i32.const 256
+ i32.lt_u
+ if (result i32)
+ local.get $3
+ i32.const 4
+ i32.shr_u
+ else
+ i32.const 31
+ local.get $3
+ i32.const 1073741820
+ local.get $3
+ i32.const 1073741820
+ i32.lt_u
+ select
+ local.tee $3
+ i32.clz
+ i32.sub
+ local.tee $4
+ i32.const 7
+ i32.sub
+ local.set $5
+ local.get $3
+ local.get $4
+ i32.const 4
+ i32.sub
+ i32.shr_u
+ i32.const 16
+ i32.xor
+ end
+ local.tee $3
+ local.get $5
+ i32.const 4
+ i32.shl
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ local.set $4
+ local.get $1
+ i32.const 0
+ i32.store offset=4
+ local.get $1
+ local.get $4
+ i32.store offset=8
+ local.get $4
+ if
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ end
+ local.get $0
+ local.get $3
+ local.get $5
+ i32.const 4
+ i32.shl
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $1
+ i32.store offset=96
+ local.get $0
+ local.get $0
+ i32.load
+ i32.const 1
+ local.get $5
+ i32.shl
+ i32.or
+ i32.store
+ local.get $0
+ local.get $5
+ i32.const 2
+ i32.shl
+ i32.add
+ local.tee $0
+ local.get $0
+ i32.load offset=4
+ i32.const 1
+ local.get $3
+ i32.shl
+ i32.or
+ i32.store offset=4
+ )
+ (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ local.get $1
+ i32.const 19
+ i32.add
+ i32.const -16
+ i32.and
+ i32.const 4
+ i32.sub
+ local.set $1
+ local.get $2
+ i32.const -16
+ i32.and
+ local.get $0
+ i32.load offset=1568
+ local.tee $2
+ if
+ local.get $2
+ local.get $1
+ i32.const 16
+ i32.sub
+ i32.eq
+ if
+ local.get $2
+ i32.load
+ local.set $3
+ local.get $1
+ i32.const 16
+ i32.sub
+ local.set $1
+ end
+ end
+ local.get $1
+ i32.sub
+ local.tee $2
+ i32.const 20
+ i32.lt_u
+ if
+ return
+ end
+ local.get $1
+ local.get $3
+ i32.const 2
+ i32.and
+ local.get $2
+ i32.const 8
+ i32.sub
+ local.tee $2
+ i32.const 1
+ i32.or
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 0
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ i32.store offset=8
+ local.get $2
+ local.get $1
+ i32.const 4
+ i32.add
+ i32.add
+ local.tee $2
+ i32.const 2
+ i32.store
+ local.get $0
+ local.get $2
+ i32.store offset=1568
+ local.get $0
+ local.get $1
+ call $~lib/rt/tlsf/insertBlock
+ )
+ (func $~lib/rt/tlsf/initialize
+ (local $0 i32)
+ (local $1 i32)
+ memory.size
+ local.tee $0
+ i32.const 1
+ i32.lt_s
+ if (result i32)
+ i32.const 1
+ local.get $0
+ i32.sub
+ memory.grow
+ i32.const 0
+ i32.lt_s
+ else
+ i32.const 0
+ end
+ if
+ unreachable
+ end
+ i32.const 29200
+ i32.const 0
+ i32.store
+ i32.const 30768
+ i32.const 0
+ i32.store
+ loop $for-loop|0
+ local.get $1
+ i32.const 23
+ i32.lt_u
+ if
+ local.get $1
+ i32.const 2
+ i32.shl
+ i32.const 29200
+ i32.add
+ i32.const 0
+ i32.store offset=4
+ i32.const 0
+ local.set $0
+ loop $for-loop|1
+ local.get $0
+ i32.const 16
+ i32.lt_u
+ if
+ local.get $0
+ local.get $1
+ i32.const 4
+ i32.shl
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.const 29200
+ i32.add
+ i32.const 0
+ i32.store offset=96
+ local.get $0
+ i32.const 1
+ i32.add
+ local.set $0
+ br $for-loop|1
+ end
+ end
+ local.get $1
+ i32.const 1
+ i32.add
+ local.set $1
+ br $for-loop|0
+ end
+ end
+ i32.const 29200
+ i32.const 30772
+ memory.size
+ i32.const 16
+ i32.shl
+ call $~lib/rt/tlsf/addMemory
+ i32.const 29200
+ global.set $~lib/rt/tlsf/ROOT
+ )
+ (func $~lib/rt/itcms/step (result i32)
+ (local $0 i32)
+ (local $1 i32)
+ block $folding-inner0
+ block $break|0
+ block $case2|0
+ block $case1|0
+ block $case0|0
+ global.get $~lib/rt/itcms/state
+ br_table $case0|0 $case1|0 $case2|0 $break|0
+ end
+ i32.const 1
+ global.set $~lib/rt/itcms/state
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ call $~lib/rt/itcms/visitRoots
+ global.get $~lib/rt/itcms/toSpace
+ global.set $~lib/rt/itcms/iter
+ br $folding-inner0
+ end
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ local.set $1
+ global.get $~lib/rt/itcms/iter
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ loop $while-continue|1
+ local.get $0
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ if
+ local.get $0
+ global.set $~lib/rt/itcms/iter
+ local.get $1
+ local.get $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.ne
+ if
+ local.get $0
+ local.get $1
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ i32.or
+ i32.store offset=4
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ local.get $0
+ i32.const 20
+ i32.add
+ call $~lib/rt/__visit_members
+ br $folding-inner0
+ end
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ br $while-continue|1
+ end
+ end
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ call $~lib/rt/itcms/visitRoots
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/iter
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ i32.eq
+ if
+ global.get $~lib/memory/__stack_pointer
+ local.set $0
+ loop $while-continue|0
+ local.get $0
+ i32.const 29196
+ i32.lt_u
+ if
+ local.get $0
+ i32.load
+ call $~lib/rt/itcms/__visit
+ local.get $0
+ i32.const 4
+ i32.add
+ local.set $0
+ br $while-continue|0
+ end
+ end
+ global.get $~lib/rt/itcms/iter
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ loop $while-continue|2
+ local.get $0
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ if
+ local.get $1
+ local.get $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.ne
+ if
+ local.get $0
+ local.get $1
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ i32.or
+ i32.store offset=4
+ local.get $0
+ i32.const 20
+ i32.add
+ call $~lib/rt/__visit_members
+ end
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.set $0
+ br $while-continue|2
+ end
+ end
+ global.get $~lib/rt/itcms/fromSpace
+ local.set $0
+ global.get $~lib/rt/itcms/toSpace
+ global.set $~lib/rt/itcms/fromSpace
+ local.get $0
+ global.set $~lib/rt/itcms/toSpace
+ local.get $1
+ global.set $~lib/rt/itcms/white
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ global.set $~lib/rt/itcms/iter
+ i32.const 2
+ global.set $~lib/rt/itcms/state
+ end
+ br $folding-inner0
+ end
+ global.get $~lib/rt/itcms/iter
+ local.tee $0
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ if
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ global.set $~lib/rt/itcms/iter
+ local.get $0
+ i32.load offset=4
+ drop
+ local.get $0
+ i32.const 29196
+ i32.lt_u
+ if
+ local.get $0
+ i32.const 0
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ i32.store offset=8
+ else
+ global.get $~lib/rt/itcms/total
+ local.get $0
+ i32.load
+ i32.const -4
+ i32.and
+ i32.const 4
+ i32.add
+ i32.sub
+ global.set $~lib/rt/itcms/total
+ local.get $0
+ i32.const 4
+ i32.add
+ local.tee $0
+ i32.const 29196
+ i32.ge_u
+ if
+ global.get $~lib/rt/tlsf/ROOT
+ i32.eqz
+ if
+ call $~lib/rt/tlsf/initialize
+ end
+ local.get $0
+ i32.const 4
+ i32.sub
+ local.set $1
+ local.get $0
+ i32.const 15
+ i32.and
+ i32.eqz
+ i32.const 0
+ local.get $0
+ select
+ if
+ local.get $1
+ i32.load
+ drop
+ end
+ local.get $1
+ local.tee $0
+ i32.load
+ i32.const 1
+ i32.or
+ local.set $1
+ local.get $0
+ local.get $1
+ i32.store
+ global.get $~lib/rt/tlsf/ROOT
+ local.get $0
+ call $~lib/rt/tlsf/insertBlock
+ end
+ end
+ i32.const 10
+ return
+ end
+ global.get $~lib/rt/itcms/toSpace
+ local.tee $0
+ local.get $0
+ i32.store offset=4
+ global.get $~lib/rt/itcms/toSpace
+ local.tee $0
+ local.get $0
+ i32.store offset=8
+ i32.const 0
+ global.set $~lib/rt/itcms/state
+ end
+ i32.const 0
+ return
+ end
+ global.get $~lib/rt/itcms/visitCount
+ )
+ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
+ local.get $1
+ i32.const 256
+ i32.lt_u
+ if
+ local.get $1
+ i32.const 4
+ i32.shr_u
+ local.set $1
+ else
+ local.get $1
+ i32.const 536870910
+ i32.lt_u
+ if
+ local.get $1
+ i32.const 1
+ i32.const 27
+ local.get $1
+ i32.clz
+ i32.sub
+ i32.shl
+ i32.add
+ i32.const 1
+ i32.sub
+ local.set $1
+ end
+ local.get $1
+ i32.const 31
+ local.get $1
+ i32.clz
+ i32.sub
+ local.tee $2
+ i32.const 4
+ i32.sub
+ i32.shr_u
+ i32.const 16
+ i32.xor
+ local.set $1
+ local.get $2
+ i32.const 7
+ i32.sub
+ local.set $2
+ end
+ local.get $0
+ local.get $2
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=4
+ i32.const -1
+ local.get $1
+ i32.shl
+ i32.and
+ local.tee $1
+ if (result i32)
+ local.get $0
+ local.get $1
+ i32.ctz
+ local.get $2
+ i32.const 4
+ i32.shl
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ else
+ local.get $0
+ i32.load
+ i32.const -1
+ local.get $2
+ i32.const 1
+ i32.add
+ i32.shl
+ i32.and
+ local.tee $1
+ if (result i32)
+ local.get $0
+ local.get $1
+ i32.ctz
+ local.tee $1
+ i32.const 4
+ i32.shl
+ local.get $0
+ local.get $1
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=4
+ i32.ctz
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ else
+ i32.const 0
+ end
+ end
+ )
+ (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32)
+ (local $2 i32)
+ block $~lib/util/memory/memset|inlined.0
+ local.get $1
+ i32.eqz
+ br_if $~lib/util/memory/memset|inlined.0
+ local.get $0
+ i32.const 0
+ i32.store8
+ local.get $0
+ local.get $1
+ i32.add
+ local.tee $2
+ i32.const 1
+ i32.sub
+ i32.const 0
+ i32.store8
+ local.get $1
+ i32.const 2
+ i32.le_u
+ br_if $~lib/util/memory/memset|inlined.0
+ local.get $0
+ i32.const 0
+ i32.store8 offset=1
+ local.get $0
+ i32.const 0
+ i32.store8 offset=2
+ local.get $2
+ i32.const 2
+ i32.sub
+ i32.const 0
+ i32.store8
+ local.get $2
+ i32.const 3
+ i32.sub
+ i32.const 0
+ i32.store8
+ local.get $1
+ i32.const 6
+ i32.le_u
+ br_if $~lib/util/memory/memset|inlined.0
+ local.get $0
+ i32.const 0
+ i32.store8 offset=3
+ local.get $2
+ i32.const 4
+ i32.sub
+ i32.const 0
+ i32.store8
+ local.get $1
+ i32.const 8
+ i32.le_u
+ br_if $~lib/util/memory/memset|inlined.0
+ local.get $0
+ i32.const 0
+ local.get $0
+ i32.sub
+ i32.const 3
+ i32.and
+ local.tee $2
+ i32.add
+ local.tee $0
+ i32.const 0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ i32.sub
+ i32.const -4
+ i32.and
+ local.tee $2
+ i32.add
+ local.tee $1
+ i32.const 4
+ i32.sub
+ i32.const 0
+ i32.store
+ local.get $2
+ i32.const 8
+ i32.le_u
+ br_if $~lib/util/memory/memset|inlined.0
+ local.get $0
+ i32.const 0
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ i32.store offset=8
+ local.get $1
+ i32.const 12
+ i32.sub
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 8
+ i32.sub
+ i32.const 0
+ i32.store
+ local.get $2
+ i32.const 24
+ i32.le_u
+ br_if $~lib/util/memory/memset|inlined.0
+ local.get $0
+ i32.const 0
+ i32.store offset=12
+ local.get $0
+ i32.const 0
+ i32.store offset=16
+ local.get $0
+ i32.const 0
+ i32.store offset=20
+ local.get $0
+ i32.const 0
+ i32.store offset=24
+ local.get $1
+ i32.const 28
+ i32.sub
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 24
+ i32.sub
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 20
+ i32.sub
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 16
+ i32.sub
+ i32.const 0
+ i32.store
+ local.get $0
+ local.get $0
+ i32.const 4
+ i32.and
+ i32.const 24
+ i32.add
+ local.tee $1
+ i32.add
+ local.set $0
+ local.get $2
+ local.get $1
+ i32.sub
+ local.set $1
+ loop $while-continue|0
+ local.get $1
+ i32.const 32
+ i32.ge_u
+ if
+ local.get $0
+ i64.const 0
+ i64.store
+ local.get $0
+ i64.const 0
+ i64.store offset=8
+ local.get $0
+ i64.const 0
+ i64.store offset=16
+ local.get $0
+ i64.const 0
+ i64.store offset=24
+ local.get $1
+ i32.const 32
+ i32.sub
+ local.set $1
+ local.get $0
+ i32.const 32
+ i32.add
+ local.set $0
+ br $while-continue|0
+ end
+ end
+ end
+ )
+ (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ local.get $0
+ i32.const 1073741804
+ i32.ge_u
+ if
+ i32.const 1680
+ i32.const 1744
+ i32.const 260
+ i32.const 31
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/rt/itcms/total
+ global.get $~lib/rt/itcms/threshold
+ i32.ge_u
+ if
+ block $__inlined_func$~lib/rt/itcms/interrupt
+ i32.const 2048
+ local.set $3
+ loop $do-continue|0
+ local.get $3
+ call $~lib/rt/itcms/step
+ i32.sub
+ local.set $3
+ global.get $~lib/rt/itcms/state
+ i32.eqz
+ if
+ global.get $~lib/rt/itcms/total
+ i64.extend_i32_u
+ i64.const 200
+ i64.mul
+ i64.const 100
+ i64.div_u
+ i32.wrap_i64
+ i32.const 1024
+ i32.add
+ global.set $~lib/rt/itcms/threshold
+ br $__inlined_func$~lib/rt/itcms/interrupt
+ end
+ local.get $3
+ i32.const 0
+ i32.gt_s
+ br_if $do-continue|0
+ end
+ global.get $~lib/rt/itcms/total
+ local.tee $3
+ local.get $3
+ global.get $~lib/rt/itcms/threshold
+ i32.sub
+ i32.const 1024
+ i32.lt_u
+ i32.const 10
+ i32.shl
+ i32.add
+ global.set $~lib/rt/itcms/threshold
+ end
+ end
+ local.get $0
+ i32.const 16
+ i32.add
+ local.set $2
+ global.get $~lib/rt/tlsf/ROOT
+ i32.eqz
+ if
+ call $~lib/rt/tlsf/initialize
+ end
+ global.get $~lib/rt/tlsf/ROOT
+ local.set $3
+ local.get $2
+ i32.const 1073741820
+ i32.ge_u
+ if
+ i32.const 1680
+ i32.const 1952
+ i32.const 458
+ i32.const 30
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $3
+ local.tee $4
+ local.get $2
+ i32.const 12
+ i32.le_u
+ if (result i32)
+ i32.const 12
+ else
+ local.get $2
+ i32.const 19
+ i32.add
+ i32.const -16
+ i32.and
+ i32.const 4
+ i32.sub
+ end
+ local.tee $3
+ call $~lib/rt/tlsf/searchBlock
+ local.tee $2
+ i32.eqz
+ if
+ local.get $3
+ i32.const 536870910
+ i32.lt_u
+ if (result i32)
+ local.get $3
+ i32.const 1
+ i32.const 27
+ local.get $3
+ i32.clz
+ i32.sub
+ i32.shl
+ i32.const 1
+ i32.sub
+ i32.add
+ else
+ local.get $3
+ end
+ i32.const 4
+ memory.size
+ local.tee $2
+ i32.const 16
+ i32.shl
+ i32.const 4
+ i32.sub
+ local.get $4
+ i32.load offset=1568
+ i32.ne
+ i32.shl
+ i32.add
+ i32.const 65535
+ i32.add
+ i32.const -65536
+ i32.and
+ i32.const 16
+ i32.shr_u
+ local.set $5
+ local.get $2
+ local.get $5
+ local.get $2
+ local.get $5
+ i32.gt_s
+ select
+ memory.grow
+ i32.const 0
+ i32.lt_s
+ if
+ local.get $5
+ memory.grow
+ i32.const 0
+ i32.lt_s
+ if
+ unreachable
+ end
+ end
+ local.get $4
+ local.get $2
+ i32.const 16
+ i32.shl
+ memory.size
+ i32.const 16
+ i32.shl
+ call $~lib/rt/tlsf/addMemory
+ local.get $4
+ local.get $3
+ call $~lib/rt/tlsf/searchBlock
+ local.set $2
+ end
+ local.get $2
+ i32.load
+ drop
+ local.get $4
+ local.get $2
+ call $~lib/rt/tlsf/removeBlock
+ local.get $2
+ i32.load
+ local.tee $5
+ i32.const -4
+ i32.and
+ local.get $3
+ i32.sub
+ local.tee $6
+ i32.const 16
+ i32.ge_u
+ if
+ local.get $2
+ local.get $3
+ local.get $5
+ i32.const 2
+ i32.and
+ i32.or
+ i32.store
+ local.get $3
+ local.get $2
+ i32.const 4
+ i32.add
+ i32.add
+ local.tee $3
+ local.get $6
+ i32.const 4
+ i32.sub
+ i32.const 1
+ i32.or
+ i32.store
+ local.get $4
+ local.get $3
+ call $~lib/rt/tlsf/insertBlock
+ else
+ local.get $2
+ local.get $5
+ i32.const -2
+ i32.and
+ i32.store
+ local.get $2
+ i32.const 4
+ i32.add
+ local.tee $3
+ local.get $2
+ i32.load
+ i32.const -4
+ i32.and
+ i32.add
+ local.get $3
+ local.get $2
+ i32.load
+ i32.const -4
+ i32.and
+ i32.add
+ i32.load
+ i32.const -3
+ i32.and
+ i32.store
+ end
+ local.get $2
+ local.get $1
+ i32.store offset=12
+ local.get $2
+ local.get $0
+ i32.store offset=16
+ global.get $~lib/rt/itcms/fromSpace
+ local.tee $3
+ i32.load offset=8
+ local.set $1
+ local.get $2
+ local.get $3
+ global.get $~lib/rt/itcms/white
+ i32.or
+ i32.store offset=4
+ local.get $2
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $2
+ local.get $1
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ global.get $~lib/rt/itcms/total
+ local.get $2
+ i32.load
+ i32.const -4
+ i32.and
+ i32.const 4
+ i32.add
+ i32.add
+ global.set $~lib/rt/itcms/total
+ local.get $2
+ i32.const 20
+ i32.add
+ local.tee $1
+ local.get $0
+ call $~lib/memory/memory.fill
+ local.get $1
+ )
+ (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ local.get $1
+ i32.eqz
+ if
+ return
+ end
+ global.get $~lib/rt/itcms/white
+ local.get $1
+ i32.const 20
+ i32.sub
+ local.tee $1
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.eq
+ if
+ local.get $0
+ i32.const 20
+ i32.sub
+ local.tee $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ local.tee $3
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ i32.eq
+ if
+ local.get $2
+ if
+ local.get $0
+ call $~lib/rt/itcms/Object#makeGray
+ else
+ local.get $1
+ call $~lib/rt/itcms/Object#makeGray
+ end
+ else
+ global.get $~lib/rt/itcms/state
+ i32.const 1
+ i32.eq
+ i32.const 0
+ local.get $3
+ i32.const 3
+ i32.eq
+ select
+ if
+ local.get $1
+ call $~lib/rt/itcms/Object#makeGray
+ end
+ end
+ end
+ )
+ (func $start:assembly/vec3~anonymous|0 (result i32)
+ i32.const 2016
+ )
+ (func $assembly/vec4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/distance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ block $__inlined_func$assembly/maths/Maths.hypot4 (result f64)
+ f64.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ f64.abs
+ local.tee $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ f64.abs
+ local.tee $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ f64.abs
+ local.tee $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ f64.abs
+ local.tee $6
+ f64.max
+ f64.max
+ f64.max
+ local.tee $2
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot4
+ drop
+ local.get $2
+ local.get $3
+ f64.const 1
+ local.get $2
+ f64.div
+ local.tee $2
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $2
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $2
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $2
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ )
+ (func $assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.mul
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ )
+ (func $assembly/vec4/length (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ block $__inlined_func$assembly/maths/Maths.hypot4 (result f64)
+ f64.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $5
+ f64.max
+ f64.max
+ f64.max
+ local.tee $1
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot4
+ drop
+ local.get $1
+ local.get $2
+ f64.const 1
+ local.get $1
+ f64.div
+ local.tee $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $1
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ )
+ (func $assembly/vec4/squaredLength (param $0 i32) (result f64)
+ (local $1 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $1
+ local.get $1
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ )
+ (func $start:assembly/vec4~anonymous|0 (result i32)
+ i32.const 2304
+ )
+ (func $assembly/vec4/copy (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $10
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ local.get $10
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/dot (param $0 i32) (param $1 i32) (result f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ )
+ (func $assembly/vec4/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $3
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $3
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $3
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $7
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/normalize (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $3
+ local.get $3
+ f64.mul
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $6
+ local.get $6
+ f64.mul
+ f64.add
+ local.tee $2
+ f64.const 0
+ f64.gt
+ if
+ f64.const 1
+ local.get $2
+ f64.sqrt
+ f64.div
+ local.set $2
+ end
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/exactEquals (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/vec3/dot (param $0 i32) (param $1 i32) (result f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ )
+ (func $assembly/vec3/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $8
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $6
+ f64.mul
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $7
+ f64.mul
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/normalize (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ local.get $2
+ f64.mul
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.tee $2
+ f64.const 0
+ f64.gt
+ if
+ f64.const 1
+ local.get $2
+ f64.sqrt
+ f64.div
+ local.set $2
+ end
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $~lib/math/pio2_large_quot (param $0 i64) (result i32)
+ (local $1 i64)
+ (local $2 i64)
+ (local $3 i64)
+ (local $4 i64)
+ (local $5 i64)
+ (local $6 i64)
+ (local $7 i32)
+ (local $8 i64)
+ (local $9 i64)
+ (local $10 i64)
+ (local $11 i64)
+ (local $12 f64)
+ local.get $0
+ i64.const 9223372036854775807
+ i64.and
+ i64.const 52
+ i64.shr_u
+ i64.const 1045
+ i64.sub
+ local.tee $4
+ i64.const 6
+ i64.shr_s
+ i32.wrap_i64
+ i32.const 3
+ i32.shl
+ i32.const 2704
+ i32.add
+ local.tee $7
+ i64.load
+ local.set $6
+ local.get $7
+ i64.load offset=8
+ local.set $3
+ local.get $7
+ i64.load offset=16
+ local.set $1
+ local.get $4
+ i64.const 63
+ i64.and
+ local.tee $4
+ i64.const 0
+ i64.ne
+ if
+ local.get $6
+ local.get $4
+ i64.shl
+ local.get $3
+ i64.const 64
+ local.get $4
+ i64.sub
+ local.tee $2
+ i64.shr_u
+ i64.or
+ local.set $6
+ local.get $3
+ local.get $4
+ i64.shl
+ local.get $1
+ local.get $2
+ i64.shr_u
+ i64.or
+ local.set $3
+ local.get $1
+ local.get $4
+ i64.shl
+ local.get $7
+ i64.load offset=24
+ local.get $2
+ i64.shr_u
+ i64.or
+ local.set $1
+ end
+ local.get $0
+ i64.const 4503599627370495
+ i64.and
+ i64.const 4503599627370496
+ i64.or
+ local.tee $4
+ i64.const 4294967295
+ i64.and
+ local.tee $2
+ local.get $3
+ i64.const 32
+ i64.shr_u
+ local.tee $8
+ i64.mul
+ local.get $3
+ i64.const 4294967295
+ i64.and
+ local.tee $5
+ local.get $2
+ i64.mul
+ local.tee $9
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.set $3
+ local.get $5
+ local.get $4
+ i64.const 32
+ i64.shr_u
+ local.tee $5
+ i64.mul
+ local.get $3
+ i64.const 4294967295
+ i64.and
+ i64.add
+ local.set $2
+ local.get $5
+ local.get $8
+ i64.mul
+ local.get $3
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.get $2
+ i64.const 32
+ i64.shr_u
+ i64.add
+ global.set $~lib/math/res128_hi
+ local.get $4
+ i64.const 32
+ i64.shr_s
+ local.get $1
+ i64.const 32
+ i64.shr_u
+ i64.mul
+ local.tee $3
+ local.get $9
+ i64.const 4294967295
+ i64.and
+ local.get $2
+ i64.const 32
+ i64.shl
+ i64.add
+ i64.add
+ local.set $1
+ local.get $1
+ local.get $3
+ i64.lt_u
+ i64.extend_i32_u
+ global.get $~lib/math/res128_hi
+ local.get $4
+ local.get $6
+ i64.mul
+ i64.add
+ i64.add
+ local.tee $8
+ i64.const 2
+ i64.shl
+ local.get $1
+ i64.const 62
+ i64.shr_u
+ i64.or
+ local.tee $6
+ i64.const 63
+ i64.shr_s
+ local.tee $4
+ i64.const 1
+ i64.shr_s
+ local.get $6
+ i64.xor
+ local.tee $2
+ i64.clz
+ local.set $3
+ local.get $2
+ local.get $3
+ i64.shl
+ local.get $4
+ local.get $1
+ i64.const 2
+ i64.shl
+ i64.xor
+ local.tee $5
+ i64.const 64
+ local.get $3
+ i64.sub
+ i64.shr_u
+ i64.or
+ local.tee $1
+ i64.const 4294967295
+ i64.and
+ local.set $2
+ local.get $1
+ i64.const 32
+ i64.shr_u
+ local.tee $9
+ i64.const 560513588
+ i64.mul
+ local.get $2
+ i64.const 3373259426
+ i64.mul
+ local.get $2
+ i64.const 560513588
+ i64.mul
+ local.tee $10
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.tee $11
+ i64.const 4294967295
+ i64.and
+ i64.add
+ local.set $2
+ local.get $9
+ i64.const 3373259426
+ i64.mul
+ local.get $11
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.get $2
+ i64.const 32
+ i64.shr_u
+ i64.add
+ global.set $~lib/math/res128_hi
+ local.get $10
+ i64.const 4294967295
+ i64.and
+ local.get $2
+ i64.const 32
+ i64.shl
+ i64.add
+ local.tee $2
+ local.get $1
+ f64.convert_i64_u
+ f64.const 3.753184150245214e-04
+ f64.mul
+ local.get $5
+ local.get $3
+ i64.shl
+ f64.convert_i64_u
+ f64.const 3.834951969714103e-04
+ f64.mul
+ f64.add
+ i64.trunc_f64_u
+ local.tee $1
+ i64.lt_u
+ i64.extend_i32_u
+ global.get $~lib/math/res128_hi
+ local.tee $5
+ i64.const 11
+ i64.shr_u
+ i64.add
+ f64.convert_i64_u
+ global.set $~lib/math/rempio2_y0
+ local.get $1
+ local.get $5
+ i64.const 53
+ i64.shl
+ local.get $2
+ i64.const 11
+ i64.shr_u
+ i64.or
+ i64.add
+ f64.convert_i64_u
+ f64.const 5.421010862427522e-20
+ f64.mul
+ global.set $~lib/math/rempio2_y1
+ global.get $~lib/math/rempio2_y0
+ i64.const 4372995238176751616
+ local.get $3
+ i64.const 52
+ i64.shl
+ i64.sub
+ local.get $0
+ local.get $6
+ i64.xor
+ i64.const -9223372036854775808
+ i64.and
+ i64.or
+ f64.reinterpret_i64
+ local.tee $12
+ f64.mul
+ global.set $~lib/math/rempio2_y0
+ global.get $~lib/math/rempio2_y1
+ local.get $12
+ f64.mul
+ global.set $~lib/math/rempio2_y1
+ local.get $8
+ i64.const 62
+ i64.shr_s
+ local.get $4
+ i64.sub
+ i32.wrap_i64
+ )
+ (func $~lib/math/NativeMath.sin (param $0 f64) (result f64)
+ (local $1 f64)
+ (local $2 i64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 i32)
+ (local $8 f64)
+ local.get $0
+ i64.reinterpret_f64
+ local.tee $2
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.tee $5
+ i32.const 31
+ i32.shr_u
+ local.set $6
+ local.get $5
+ i32.const 2147483647
+ i32.and
+ local.tee $5
+ i32.const 1072243195
+ i32.le_u
+ if
+ local.get $5
+ i32.const 1045430272
+ i32.lt_u
+ if
+ local.get $0
+ return
+ end
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.mul
+ local.tee $3
+ local.get $0
+ f64.mul
+ local.get $3
+ local.get $3
+ local.get $3
+ f64.const 2.7557313707070068e-06
+ f64.mul
+ f64.const -1.984126982985795e-04
+ f64.add
+ f64.mul
+ f64.const 0.00833333333332249
+ f64.add
+ local.get $3
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.mul
+ local.get $3
+ f64.const 1.58969099521155e-10
+ f64.mul
+ f64.const -2.5050760253406863e-08
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.const -0.16666666666666632
+ f64.add
+ f64.mul
+ f64.add
+ return
+ end
+ local.get $5
+ i32.const 2146435072
+ i32.ge_u
+ if
+ local.get $0
+ local.get $0
+ f64.sub
+ return
+ end
+ block $~lib/math/rempio2|inlined.0 (result i32)
+ local.get $2
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 2147483647
+ i32.and
+ local.tee $7
+ i32.const 1073928572
+ i32.lt_u
+ if
+ i32.const 1
+ local.set $5
+ local.get $6
+ if (result f64)
+ local.get $0
+ f64.const 1.5707963267341256
+ f64.add
+ local.set $0
+ i32.const -1
+ local.set $5
+ local.get $7
+ i32.const 1073291771
+ i32.ne
+ if (result f64)
+ local.get $0
+ local.get $0
+ f64.const 6.077100506506192e-11
+ f64.add
+ local.tee $0
+ f64.sub
+ f64.const 6.077100506506192e-11
+ f64.add
+ else
+ local.get $0
+ f64.const 6.077100506303966e-11
+ f64.add
+ local.tee $3
+ f64.const 2.0222662487959506e-21
+ f64.add
+ local.set $0
+ local.get $3
+ local.get $0
+ f64.sub
+ f64.const 2.0222662487959506e-21
+ f64.add
+ end
+ else
+ local.get $0
+ f64.const 1.5707963267341256
+ f64.sub
+ local.set $0
+ local.get $7
+ i32.const 1073291771
+ i32.ne
+ if (result f64)
+ local.get $0
+ local.get $0
+ f64.const 6.077100506506192e-11
+ f64.sub
+ local.tee $0
+ f64.sub
+ f64.const 6.077100506506192e-11
+ f64.sub
+ else
+ local.get $0
+ f64.const 6.077100506303966e-11
+ f64.sub
+ local.tee $3
+ f64.const 2.0222662487959506e-21
+ f64.sub
+ local.set $0
+ local.get $3
+ local.get $0
+ f64.sub
+ f64.const 2.0222662487959506e-21
+ f64.sub
+ end
+ end
+ local.get $0
+ global.set $~lib/math/rempio2_y0
+ global.set $~lib/math/rempio2_y1
+ local.get $5
+ br $~lib/math/rempio2|inlined.0
+ end
+ local.get $7
+ i32.const 1094263291
+ i32.lt_u
+ if
+ local.get $7
+ i32.const 20
+ i32.shr_u
+ local.tee $6
+ local.get $0
+ local.get $0
+ f64.const 0.6366197723675814
+ f64.mul
+ f64.nearest
+ local.tee $3
+ f64.const 1.5707963267341256
+ f64.mul
+ f64.sub
+ local.tee $0
+ local.get $3
+ f64.const 6.077100506506192e-11
+ f64.mul
+ local.tee $4
+ f64.sub
+ local.tee $1
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 20
+ i32.shr_u
+ i32.const 2047
+ i32.and
+ i32.sub
+ i32.const 16
+ i32.gt_u
+ if
+ local.get $3
+ f64.const 2.0222662487959506e-21
+ f64.mul
+ local.get $0
+ local.get $0
+ local.get $3
+ f64.const 6.077100506303966e-11
+ f64.mul
+ local.tee $4
+ f64.sub
+ local.tee $0
+ f64.sub
+ local.get $4
+ f64.sub
+ f64.sub
+ local.set $4
+ local.get $6
+ local.get $0
+ local.get $4
+ f64.sub
+ local.tee $1
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 20
+ i32.shr_u
+ i32.const 2047
+ i32.and
+ i32.sub
+ i32.const 49
+ i32.gt_u
+ if (result f64)
+ local.get $3
+ f64.const 8.4784276603689e-32
+ f64.mul
+ local.get $0
+ local.get $0
+ local.get $3
+ f64.const 2.0222662487111665e-21
+ f64.mul
+ local.tee $4
+ f64.sub
+ local.tee $0
+ f64.sub
+ local.get $4
+ f64.sub
+ f64.sub
+ local.set $4
+ local.get $0
+ local.get $4
+ f64.sub
+ else
+ local.get $1
+ end
+ local.set $1
+ end
+ local.get $1
+ global.set $~lib/math/rempio2_y0
+ local.get $0
+ local.get $1
+ f64.sub
+ local.get $4
+ f64.sub
+ global.set $~lib/math/rempio2_y1
+ local.get $3
+ i32.trunc_f64_s
+ br $~lib/math/rempio2|inlined.0
+ end
+ i32.const 0
+ local.get $2
+ call $~lib/math/pio2_large_quot
+ local.tee $5
+ i32.sub
+ local.get $5
+ local.get $6
+ select
+ end
+ local.set $6
+ global.get $~lib/math/rempio2_y0
+ local.set $3
+ global.get $~lib/math/rempio2_y1
+ local.set $4
+ local.get $6
+ i32.const 1
+ i32.and
+ if (result f64)
+ f64.const 1
+ local.get $3
+ local.get $3
+ f64.mul
+ local.tee $0
+ f64.const 0.5
+ f64.mul
+ local.tee $1
+ f64.sub
+ local.tee $8
+ f64.const 1
+ local.get $8
+ f64.sub
+ local.get $1
+ f64.sub
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.const 2.480158728947673e-05
+ f64.mul
+ f64.const -0.001388888888887411
+ f64.add
+ f64.mul
+ f64.const 0.0416666666666666
+ f64.add
+ f64.mul
+ local.get $0
+ local.get $0
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ local.get $0
+ local.get $0
+ f64.const -1.1359647557788195e-11
+ f64.mul
+ f64.const 2.087572321298175e-09
+ f64.add
+ f64.mul
+ f64.const -2.7557314351390663e-07
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.get $3
+ local.get $4
+ f64.mul
+ f64.sub
+ f64.add
+ f64.add
+ else
+ local.get $3
+ local.get $3
+ f64.mul
+ local.tee $0
+ local.get $3
+ f64.mul
+ local.set $1
+ local.get $3
+ local.get $0
+ local.get $4
+ f64.const 0.5
+ f64.mul
+ local.get $1
+ local.get $0
+ local.get $0
+ f64.const 2.7557313707070068e-06
+ f64.mul
+ f64.const -1.984126982985795e-04
+ f64.add
+ f64.mul
+ f64.const 0.00833333333332249
+ f64.add
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.mul
+ f64.mul
+ local.get $0
+ f64.const 1.58969099521155e-10
+ f64.mul
+ f64.const -2.5050760253406863e-08
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.sub
+ f64.mul
+ local.get $4
+ f64.sub
+ local.get $1
+ f64.const -0.16666666666666632
+ f64.mul
+ f64.sub
+ f64.sub
+ end
+ local.tee $0
+ f64.neg
+ local.get $0
+ local.get $6
+ i32.const 2
+ i32.and
+ select
+ )
+ (func $~lib/math/NativeMath.cos (param $0 f64) (result f64)
+ (local $1 f64)
+ (local $2 i64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 i32)
+ (local $8 f64)
+ local.get $0
+ i64.reinterpret_f64
+ local.tee $2
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.tee $5
+ i32.const 31
+ i32.shr_u
+ local.set $6
+ local.get $5
+ i32.const 2147483647
+ i32.and
+ local.tee $5
+ i32.const 1072243195
+ i32.le_u
+ if
+ local.get $5
+ i32.const 1044816030
+ i32.lt_u
+ if
+ f64.const 1
+ return
+ end
+ f64.const 1
+ local.get $0
+ local.get $0
+ f64.mul
+ local.tee $3
+ f64.const 0.5
+ f64.mul
+ local.tee $4
+ f64.sub
+ local.tee $1
+ f64.const 1
+ local.get $1
+ f64.sub
+ local.get $4
+ f64.sub
+ local.get $3
+ local.get $3
+ local.get $3
+ local.get $3
+ f64.const 2.480158728947673e-05
+ f64.mul
+ f64.const -0.001388888888887411
+ f64.add
+ f64.mul
+ f64.const 0.0416666666666666
+ f64.add
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ local.tee $4
+ local.get $4
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.const -1.1359647557788195e-11
+ f64.mul
+ f64.const 2.087572321298175e-09
+ f64.add
+ f64.mul
+ f64.const -2.7557314351390663e-07
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.get $0
+ f64.const 0
+ f64.mul
+ f64.sub
+ f64.add
+ f64.add
+ return
+ end
+ local.get $5
+ i32.const 2146435072
+ i32.ge_u
+ if
+ local.get $0
+ local.get $0
+ f64.sub
+ return
+ end
+ block $~lib/math/rempio2|inlined.1 (result i32)
+ local.get $2
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 2147483647
+ i32.and
+ local.tee $7
+ i32.const 1073928572
+ i32.lt_u
+ if
+ i32.const 1
+ local.set $5
+ local.get $6
+ if (result f64)
+ local.get $0
+ f64.const 1.5707963267341256
+ f64.add
+ local.set $0
+ i32.const -1
+ local.set $5
+ local.get $7
+ i32.const 1073291771
+ i32.ne
+ if (result f64)
+ local.get $0
+ local.get $0
+ f64.const 6.077100506506192e-11
+ f64.add
+ local.tee $0
+ f64.sub
+ f64.const 6.077100506506192e-11
+ f64.add
+ else
+ local.get $0
+ f64.const 6.077100506303966e-11
+ f64.add
+ local.tee $3
+ f64.const 2.0222662487959506e-21
+ f64.add
+ local.set $0
+ local.get $3
+ local.get $0
+ f64.sub
+ f64.const 2.0222662487959506e-21
+ f64.add
+ end
+ else
+ local.get $0
+ f64.const 1.5707963267341256
+ f64.sub
+ local.set $0
+ local.get $7
+ i32.const 1073291771
+ i32.ne
+ if (result f64)
+ local.get $0
+ local.get $0
+ f64.const 6.077100506506192e-11
+ f64.sub
+ local.tee $0
+ f64.sub
+ f64.const 6.077100506506192e-11
+ f64.sub
+ else
+ local.get $0
+ f64.const 6.077100506303966e-11
+ f64.sub
+ local.tee $3
+ f64.const 2.0222662487959506e-21
+ f64.sub
+ local.set $0
+ local.get $3
+ local.get $0
+ f64.sub
+ f64.const 2.0222662487959506e-21
+ f64.sub
+ end
+ end
+ local.get $0
+ global.set $~lib/math/rempio2_y0
+ global.set $~lib/math/rempio2_y1
+ local.get $5
+ br $~lib/math/rempio2|inlined.1
+ end
+ local.get $7
+ i32.const 1094263291
+ i32.lt_u
+ if
+ local.get $7
+ i32.const 20
+ i32.shr_u
+ local.tee $6
+ local.get $0
+ local.get $0
+ f64.const 0.6366197723675814
+ f64.mul
+ f64.nearest
+ local.tee $3
+ f64.const 1.5707963267341256
+ f64.mul
+ f64.sub
+ local.tee $0
+ local.get $3
+ f64.const 6.077100506506192e-11
+ f64.mul
+ local.tee $4
+ f64.sub
+ local.tee $1
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 20
+ i32.shr_u
+ i32.const 2047
+ i32.and
+ i32.sub
+ i32.const 16
+ i32.gt_u
+ if
+ local.get $3
+ f64.const 2.0222662487959506e-21
+ f64.mul
+ local.get $0
+ local.get $0
+ local.get $3
+ f64.const 6.077100506303966e-11
+ f64.mul
+ local.tee $4
+ f64.sub
+ local.tee $0
+ f64.sub
+ local.get $4
+ f64.sub
+ f64.sub
+ local.set $4
+ local.get $6
+ local.get $0
+ local.get $4
+ f64.sub
+ local.tee $1
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 20
+ i32.shr_u
+ i32.const 2047
+ i32.and
+ i32.sub
+ i32.const 49
+ i32.gt_u
+ if (result f64)
+ local.get $3
+ f64.const 8.4784276603689e-32
+ f64.mul
+ local.get $0
+ local.get $0
+ local.get $3
+ f64.const 2.0222662487111665e-21
+ f64.mul
+ local.tee $4
+ f64.sub
+ local.tee $0
+ f64.sub
+ local.get $4
+ f64.sub
+ f64.sub
+ local.set $4
+ local.get $0
+ local.get $4
+ f64.sub
+ else
+ local.get $1
+ end
+ local.set $1
+ end
+ local.get $1
+ global.set $~lib/math/rempio2_y0
+ local.get $0
+ local.get $1
+ f64.sub
+ local.get $4
+ f64.sub
+ global.set $~lib/math/rempio2_y1
+ local.get $3
+ i32.trunc_f64_s
+ br $~lib/math/rempio2|inlined.1
+ end
+ i32.const 0
+ local.get $2
+ call $~lib/math/pio2_large_quot
+ local.tee $5
+ i32.sub
+ local.get $5
+ local.get $6
+ select
+ end
+ local.set $6
+ global.get $~lib/math/rempio2_y0
+ local.set $3
+ global.get $~lib/math/rempio2_y1
+ local.set $4
+ local.get $6
+ i32.const 1
+ i32.and
+ if (result f64)
+ local.get $3
+ local.get $3
+ f64.mul
+ local.tee $0
+ local.get $3
+ f64.mul
+ local.set $1
+ local.get $3
+ local.get $0
+ local.get $4
+ f64.const 0.5
+ f64.mul
+ local.get $1
+ local.get $0
+ local.get $0
+ f64.const 2.7557313707070068e-06
+ f64.mul
+ f64.const -1.984126982985795e-04
+ f64.add
+ f64.mul
+ f64.const 0.00833333333332249
+ f64.add
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.mul
+ f64.mul
+ local.get $0
+ f64.const 1.58969099521155e-10
+ f64.mul
+ f64.const -2.5050760253406863e-08
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.sub
+ f64.mul
+ local.get $4
+ f64.sub
+ local.get $1
+ f64.const -0.16666666666666632
+ f64.mul
+ f64.sub
+ f64.sub
+ else
+ f64.const 1
+ local.get $3
+ local.get $3
+ f64.mul
+ local.tee $0
+ f64.const 0.5
+ f64.mul
+ local.tee $1
+ f64.sub
+ local.tee $8
+ f64.const 1
+ local.get $8
+ f64.sub
+ local.get $1
+ f64.sub
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.const 2.480158728947673e-05
+ f64.mul
+ f64.const -0.001388888888887411
+ f64.add
+ f64.mul
+ f64.const 0.0416666666666666
+ f64.add
+ f64.mul
+ local.get $0
+ local.get $0
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ local.get $0
+ local.get $0
+ f64.const -1.1359647557788195e-11
+ f64.mul
+ f64.const 2.087572321298175e-09
+ f64.add
+ f64.mul
+ f64.const -2.7557314351390663e-07
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.get $3
+ local.get $4
+ f64.mul
+ f64.sub
+ f64.add
+ f64.add
+ end
+ local.tee $0
+ f64.neg
+ local.get $0
+ local.get $6
+ i32.const 1
+ i32.add
+ i32.const 2
+ i32.and
+ select
+ )
+ (func $assembly/quat/setAxisAngle (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ local.get $0
+ i32.const 0
+ local.get $2
+ f64.const 0.5
+ f64.mul
+ local.tee $3
+ call $~lib/math/NativeMath.sin
+ local.tee $2
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $start:assembly/quat~anonymous|0 (result i32)
+ i32.const 2928
+ )
+ (func $~lib/math/NativeMath.acos (param $0 f64) (result f64)
+ (local $1 f64)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 f64)
+ local.get $0
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.tee $3
+ i32.const 2147483647
+ i32.and
+ local.tee $2
+ i32.const 1072693248
+ i32.ge_u
+ if
+ local.get $0
+ i64.reinterpret_f64
+ i32.wrap_i64
+ local.get $2
+ i32.const 1072693248
+ i32.sub
+ i32.or
+ i32.eqz
+ if
+ local.get $3
+ i32.const 31
+ i32.shr_u
+ if
+ f64.const 3.141592653589793
+ return
+ end
+ f64.const 0
+ return
+ end
+ f64.const 0
+ local.get $0
+ local.get $0
+ f64.sub
+ f64.div
+ return
+ end
+ local.get $2
+ i32.const 1071644672
+ i32.lt_u
+ if
+ local.get $2
+ i32.const 1012924416
+ i32.le_u
+ if
+ f64.const 1.5707963267948966
+ return
+ end
+ f64.const 1.5707963267948966
+ local.get $0
+ f64.const 6.123233995736766e-17
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.mul
+ local.tee $0
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.const 3.479331075960212e-05
+ f64.mul
+ f64.const 7.915349942898145e-04
+ f64.add
+ f64.mul
+ f64.const -0.04005553450067941
+ f64.add
+ f64.mul
+ f64.const 0.20121253213486293
+ f64.add
+ f64.mul
+ f64.const -0.3255658186224009
+ f64.add
+ f64.mul
+ f64.const 0.16666666666666666
+ f64.add
+ f64.mul
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.const 0.07703815055590194
+ f64.mul
+ f64.const -0.6882839716054533
+ f64.add
+ f64.mul
+ f64.const 2.0209457602335057
+ f64.add
+ f64.mul
+ f64.const -2.403394911734414
+ f64.add
+ f64.mul
+ f64.const 1
+ f64.add
+ f64.div
+ f64.mul
+ f64.sub
+ f64.sub
+ f64.sub
+ return
+ end
+ local.get $3
+ i32.const 31
+ i32.shr_u
+ if
+ local.get $0
+ f64.const 0.5
+ f64.mul
+ f64.const 0.5
+ f64.add
+ local.tee $0
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.const 3.479331075960212e-05
+ f64.mul
+ f64.const 7.915349942898145e-04
+ f64.add
+ f64.mul
+ f64.const -0.04005553450067941
+ f64.add
+ f64.mul
+ f64.const 0.20121253213486293
+ f64.add
+ f64.mul
+ f64.const -0.3255658186224009
+ f64.add
+ f64.mul
+ f64.const 0.16666666666666666
+ f64.add
+ f64.mul
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.const 0.07703815055590194
+ f64.mul
+ f64.const -0.6882839716054533
+ f64.add
+ f64.mul
+ f64.const 2.0209457602335057
+ f64.add
+ f64.mul
+ f64.const -2.403394911734414
+ f64.add
+ f64.mul
+ f64.const 1
+ f64.add
+ f64.div
+ local.set $1
+ f64.const 1.5707963267948966
+ local.get $0
+ f64.sqrt
+ local.tee $0
+ local.get $1
+ local.get $0
+ f64.mul
+ f64.const 6.123233995736766e-17
+ f64.sub
+ f64.add
+ f64.sub
+ local.tee $0
+ local.get $0
+ f64.add
+ return
+ end
+ f64.const 0.5
+ local.get $0
+ f64.const 0.5
+ f64.mul
+ f64.sub
+ local.tee $0
+ f64.sqrt
+ local.tee $4
+ i64.reinterpret_f64
+ i64.const -4294967296
+ i64.and
+ f64.reinterpret_i64
+ local.tee $1
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.const 3.479331075960212e-05
+ f64.mul
+ f64.const 7.915349942898145e-04
+ f64.add
+ f64.mul
+ f64.const -0.04005553450067941
+ f64.add
+ f64.mul
+ f64.const 0.20121253213486293
+ f64.add
+ f64.mul
+ f64.const -0.3255658186224009
+ f64.add
+ f64.mul
+ f64.const 0.16666666666666666
+ f64.add
+ f64.mul
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.const 0.07703815055590194
+ f64.mul
+ f64.const -0.6882839716054533
+ f64.add
+ f64.mul
+ f64.const 2.0209457602335057
+ f64.add
+ f64.mul
+ f64.const -2.403394911734414
+ f64.add
+ f64.mul
+ f64.const 1
+ f64.add
+ f64.div
+ local.get $4
+ f64.mul
+ local.get $0
+ local.get $1
+ local.get $1
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $1
+ f64.add
+ f64.div
+ f64.add
+ f64.add
+ local.tee $0
+ local.get $0
+ f64.add
+ )
+ (func $assembly/quat/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ f64.const 1
+ local.get $9
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $5
+ f64.mul
+ local.get $10
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $6
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $7
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $8
+ f64.mul
+ f64.add
+ local.tee $4
+ f64.const 0
+ f64.lt
+ if
+ local.get $5
+ f64.neg
+ local.set $5
+ local.get $6
+ f64.neg
+ local.set $6
+ local.get $7
+ f64.neg
+ local.set $7
+ local.get $8
+ f64.neg
+ local.set $8
+ local.get $4
+ f64.neg
+ local.set $4
+ end
+ local.get $4
+ f64.sub
+ f64.const 1e-06
+ f64.gt
+ if
+ local.get $4
+ call $~lib/math/NativeMath.acos
+ local.tee $13
+ call $~lib/math/NativeMath.sin
+ local.set $14
+ f64.const 1
+ local.get $3
+ f64.sub
+ local.get $13
+ f64.mul
+ call $~lib/math/NativeMath.sin
+ local.get $14
+ f64.div
+ local.set $4
+ local.get $3
+ local.get $13
+ f64.mul
+ call $~lib/math/NativeMath.sin
+ local.get $14
+ f64.div
+ local.set $3
+ else
+ f64.const 1
+ local.get $3
+ f64.sub
+ local.set $4
+ end
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $3
+ local.get $5
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $10
+ f64.mul
+ local.get $3
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ local.get $11
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ local.get $12
+ f64.mul
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $start:assembly/quat~anonymous|1 (result i32)
+ i32.const 2992
+ )
+ (func $assembly/quat/fromMat3 (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 i32)
+ (local $8 i32)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.tee $2
+ f64.const 0
+ f64.gt
+ if
+ local.get $0
+ i32.const 3
+ local.get $2
+ f64.const 1
+ f64.add
+ f64.sqrt
+ local.tee $2
+ f64.const 0.5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ f64.const 0.5
+ local.get $2
+ f64.div
+ local.tee $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.gt
+ local.tee $3
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ local.get $3
+ local.get $3
+ i32.const 3
+ i32.mul
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ f64.gt
+ select
+ local.tee $3
+ local.get $1
+ local.get $3
+ local.get $3
+ i32.const 3
+ i32.mul
+ local.tee $6
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ local.get $3
+ i32.const 1
+ i32.add
+ i32.const 3
+ i32.rem_s
+ local.tee $4
+ local.get $4
+ i32.const 3
+ i32.mul
+ local.tee $7
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.get $1
+ local.get $3
+ i32.const 2
+ i32.add
+ i32.const 3
+ i32.rem_s
+ local.tee $5
+ local.get $5
+ i32.const 3
+ i32.mul
+ local.tee $8
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ f64.const 1
+ f64.add
+ f64.sqrt
+ local.tee $2
+ f64.const 0.5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ local.get $5
+ local.get $7
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ local.get $4
+ local.get $8
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ f64.const 0.5
+ local.get $2
+ f64.div
+ local.tee $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $4
+ local.get $1
+ local.get $3
+ local.get $7
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ local.get $4
+ local.get $6
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $5
+ local.get $1
+ local.get $3
+ local.get $8
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ local.get $5
+ local.get $6
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $start:assembly/quat~anonymous|2 (result i32)
+ i32.const 3056
+ )
+ (func $assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $10
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ local.get $10
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $3
+ local.get $14
+ f64.mul
+ local.get $6
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $13
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $12
+ f64.mul
+ f64.sub
+ local.get $15
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $18
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $17
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $14
+ f64.mul
+ local.get $6
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $13
+ f64.mul
+ f64.sub
+ local.get $16
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $18
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $17
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $15
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $5
+ local.get $14
+ f64.mul
+ local.get $6
+ local.get $13
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $11
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $18
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $15
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $6
+ local.get $14
+ f64.mul
+ local.get $3
+ local.get $11
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $12
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $13
+ f64.mul
+ f64.sub
+ local.get $18
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $15
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $16
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $~lib/math/tan_kern (param $0 f64) (param $1 f64) (param $2 i32) (result f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 i32)
+ (local $7 i32)
+ local.get $0
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.tee $6
+ i32.const 2147483647
+ i32.and
+ i32.const 1072010280
+ i32.ge_u
+ local.tee $7
+ if
+ f64.const 0.7853981633974483
+ local.get $6
+ i32.const 0
+ i32.lt_s
+ if (result f64)
+ local.get $1
+ f64.neg
+ local.set $1
+ local.get $0
+ f64.neg
+ else
+ local.get $0
+ end
+ f64.sub
+ f64.const 3.061616997868383e-17
+ local.get $1
+ f64.sub
+ f64.add
+ local.set $0
+ f64.const 0
+ local.set $1
+ end
+ local.get $0
+ local.get $0
+ f64.mul
+ local.tee $4
+ local.get $0
+ f64.mul
+ local.set $5
+ local.get $0
+ local.get $1
+ local.get $4
+ local.get $5
+ local.get $4
+ local.get $4
+ f64.mul
+ local.tee $3
+ local.get $3
+ local.get $3
+ local.get $3
+ local.get $3
+ f64.const -1.8558637485527546e-05
+ f64.mul
+ f64.const 7.817944429395571e-05
+ f64.add
+ f64.mul
+ f64.const 5.880412408202641e-04
+ f64.add
+ f64.mul
+ f64.const 3.5920791075913124e-03
+ f64.add
+ f64.mul
+ f64.const 0.021869488294859542
+ f64.add
+ f64.mul
+ f64.const 0.13333333333320124
+ f64.add
+ local.get $4
+ local.get $3
+ local.get $3
+ local.get $3
+ local.get $3
+ local.get $3
+ f64.const 2.590730518636337e-05
+ f64.mul
+ f64.const 7.140724913826082e-05
+ f64.add
+ f64.mul
+ f64.const 2.464631348184699e-04
+ f64.add
+ f64.mul
+ f64.const 1.4562094543252903e-03
+ f64.add
+ f64.mul
+ f64.const 0.0088632398235993
+ f64.add
+ f64.mul
+ f64.const 0.05396825397622605
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.get $1
+ f64.add
+ f64.mul
+ f64.add
+ local.get $5
+ f64.const 0.3333333333333341
+ f64.mul
+ f64.add
+ local.tee $3
+ f64.add
+ local.set $1
+ local.get $7
+ if
+ f64.const 1
+ local.get $6
+ i32.const 30
+ i32.shr_s
+ i32.const 2
+ i32.and
+ f64.convert_i32_s
+ f64.sub
+ local.get $2
+ f64.convert_i32_s
+ local.tee $4
+ local.get $0
+ local.get $1
+ local.get $1
+ f64.mul
+ local.get $1
+ local.get $4
+ f64.add
+ f64.div
+ local.get $3
+ f64.sub
+ f64.sub
+ local.tee $0
+ local.get $0
+ f64.add
+ f64.sub
+ f64.mul
+ return
+ end
+ local.get $2
+ i32.const 1
+ i32.eq
+ if
+ local.get $1
+ return
+ end
+ f64.const -1
+ local.get $1
+ f64.div
+ local.tee $5
+ i64.reinterpret_f64
+ i64.const -4294967296
+ i64.and
+ f64.reinterpret_i64
+ local.tee $4
+ local.get $5
+ local.get $4
+ local.get $1
+ i64.reinterpret_f64
+ i64.const -4294967296
+ i64.and
+ f64.reinterpret_i64
+ local.tee $1
+ f64.mul
+ f64.const 1
+ f64.add
+ local.get $4
+ local.get $3
+ local.get $1
+ local.get $0
+ f64.sub
+ f64.sub
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ )
+ (func $~lib/math/NativeMath.tan (param $0 f64) (result f64)
+ (local $1 f64)
+ (local $2 i64)
+ (local $3 f64)
+ (local $4 i32)
+ (local $5 f64)
+ (local $6 i32)
+ (local $7 i32)
+ local.get $0
+ i64.reinterpret_f64
+ local.tee $2
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.tee $4
+ i32.const 31
+ i32.shr_u
+ local.set $6
+ local.get $4
+ i32.const 2147483647
+ i32.and
+ local.tee $4
+ i32.const 1072243195
+ i32.le_u
+ if
+ local.get $4
+ i32.const 1044381696
+ i32.lt_s
+ if
+ local.get $0
+ return
+ end
+ local.get $0
+ f64.const 0
+ i32.const 1
+ call $~lib/math/tan_kern
+ return
+ end
+ local.get $4
+ i32.const 2146435072
+ i32.ge_s
+ if
+ local.get $0
+ local.get $0
+ f64.sub
+ return
+ end
+ block $~lib/math/rempio2|inlined.2 (result i32)
+ local.get $2
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 2147483647
+ i32.and
+ local.tee $7
+ i32.const 1073928572
+ i32.lt_u
+ if
+ i32.const 1
+ local.set $4
+ local.get $6
+ if (result f64)
+ local.get $0
+ f64.const 1.5707963267341256
+ f64.add
+ local.set $0
+ i32.const -1
+ local.set $4
+ local.get $7
+ i32.const 1073291771
+ i32.ne
+ if (result f64)
+ local.get $0
+ local.get $0
+ f64.const 6.077100506506192e-11
+ f64.add
+ local.tee $0
+ f64.sub
+ f64.const 6.077100506506192e-11
+ f64.add
+ else
+ local.get $0
+ f64.const 6.077100506303966e-11
+ f64.add
+ local.tee $3
+ f64.const 2.0222662487959506e-21
+ f64.add
+ local.set $0
+ local.get $3
+ local.get $0
+ f64.sub
+ f64.const 2.0222662487959506e-21
+ f64.add
+ end
+ else
+ local.get $0
+ f64.const 1.5707963267341256
+ f64.sub
+ local.set $0
+ local.get $7
+ i32.const 1073291771
+ i32.ne
+ if (result f64)
+ local.get $0
+ local.get $0
+ f64.const 6.077100506506192e-11
+ f64.sub
+ local.tee $0
+ f64.sub
+ f64.const 6.077100506506192e-11
+ f64.sub
+ else
+ local.get $0
+ f64.const 6.077100506303966e-11
+ f64.sub
+ local.tee $3
+ f64.const 2.0222662487959506e-21
+ f64.sub
+ local.set $0
+ local.get $3
+ local.get $0
+ f64.sub
+ f64.const 2.0222662487959506e-21
+ f64.sub
+ end
+ end
+ local.get $0
+ global.set $~lib/math/rempio2_y0
+ global.set $~lib/math/rempio2_y1
+ local.get $4
+ br $~lib/math/rempio2|inlined.2
+ end
+ local.get $7
+ i32.const 1094263291
+ i32.lt_u
+ if
+ local.get $7
+ i32.const 20
+ i32.shr_u
+ local.tee $6
+ local.get $0
+ local.get $0
+ f64.const 0.6366197723675814
+ f64.mul
+ f64.nearest
+ local.tee $3
+ f64.const 1.5707963267341256
+ f64.mul
+ f64.sub
+ local.tee $0
+ local.get $3
+ f64.const 6.077100506506192e-11
+ f64.mul
+ local.tee $5
+ f64.sub
+ local.tee $1
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 20
+ i32.shr_u
+ i32.const 2047
+ i32.and
+ i32.sub
+ i32.const 16
+ i32.gt_u
+ if
+ local.get $3
+ f64.const 2.0222662487959506e-21
+ f64.mul
+ local.get $0
+ local.get $0
+ local.get $3
+ f64.const 6.077100506303966e-11
+ f64.mul
+ local.tee $5
+ f64.sub
+ local.tee $0
+ f64.sub
+ local.get $5
+ f64.sub
+ f64.sub
+ local.set $5
+ local.get $6
+ local.get $0
+ local.get $5
+ f64.sub
+ local.tee $1
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 20
+ i32.shr_u
+ i32.const 2047
+ i32.and
+ i32.sub
+ i32.const 49
+ i32.gt_u
+ if (result f64)
+ local.get $3
+ f64.const 8.4784276603689e-32
+ f64.mul
+ local.get $0
+ local.get $0
+ local.get $3
+ f64.const 2.0222662487111665e-21
+ f64.mul
+ local.tee $5
+ f64.sub
+ local.tee $0
+ f64.sub
+ local.get $5
+ f64.sub
+ f64.sub
+ local.set $5
+ local.get $0
+ local.get $5
+ f64.sub
+ else
+ local.get $1
+ end
+ local.set $1
+ end
+ local.get $1
+ global.set $~lib/math/rempio2_y0
+ local.get $0
+ local.get $1
+ f64.sub
+ local.get $5
+ f64.sub
+ global.set $~lib/math/rempio2_y1
+ local.get $3
+ i32.trunc_f64_s
+ br $~lib/math/rempio2|inlined.2
+ end
+ i32.const 0
+ local.get $2
+ call $~lib/math/pio2_large_quot
+ local.tee $4
+ i32.sub
+ local.get $4
+ local.get $6
+ select
+ end
+ local.set $6
+ global.get $~lib/math/rempio2_y0
+ global.get $~lib/math/rempio2_y1
+ i32.const 1
+ local.get $6
+ i32.const 1
+ i32.and
+ i32.const 1
+ i32.shl
+ i32.sub
+ call $~lib/math/tan_kern
+ )
+ (func $assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $1
+ f64.const 0.5
+ f64.mul
+ call $~lib/math/NativeMath.tan
+ f64.div
+ local.tee $1
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ f64.const inf
+ f64.ne
+ if
+ local.get $0
+ i32.const 10
+ local.get $4
+ local.get $3
+ f64.add
+ f64.const 1
+ local.get $3
+ local.get $4
+ f64.sub
+ f64.div
+ local.tee $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $4
+ local.get $4
+ f64.add
+ local.get $3
+ f64.mul
+ local.get $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 10
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $3
+ f64.const -2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $assembly/mat4/orthoNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $1
+ local.get $2
+ f64.sub
+ f64.div
+ local.tee $8
+ f64.const -2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ local.get $3
+ local.get $4
+ f64.sub
+ f64.div
+ local.tee $9
+ f64.const -2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ local.get $5
+ local.get $6
+ f64.sub
+ f64.div
+ local.tee $7
+ local.get $7
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ local.get $2
+ f64.add
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $4
+ local.get $3
+ f64.add
+ local.get $9
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $6
+ local.get $5
+ f64.add
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $21
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.set $22
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $3
+ local.get $7
+ f64.mul
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $4
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $5
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $6
+ local.get $19
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ local.get $10
+ f64.mul
+ local.get $4
+ local.get $13
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $16
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $20
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $11
+ f64.mul
+ local.get $4
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $17
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $21
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ local.get $12
+ f64.mul
+ local.get $4
+ local.get $15
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $18
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $22
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $3
+ local.get $7
+ f64.mul
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $4
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $5
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $6
+ local.get $19
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $3
+ local.get $10
+ f64.mul
+ local.get $4
+ local.get $13
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $16
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $20
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $3
+ local.get $11
+ f64.mul
+ local.get $4
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $17
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $21
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $3
+ local.get $12
+ f64.mul
+ local.get $4
+ local.get $15
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $18
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $22
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $3
+ local.get $7
+ f64.mul
+ local.get $2
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $4
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $5
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $6
+ local.get $19
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $3
+ local.get $10
+ f64.mul
+ local.get $4
+ local.get $13
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $16
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $20
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $3
+ local.get $11
+ f64.mul
+ local.get $4
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $17
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $21
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $3
+ local.get $12
+ f64.mul
+ local.get $4
+ local.get $15
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $18
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $22
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $3
+ local.get $7
+ f64.mul
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $7
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $8
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $9
+ local.get $19
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $3
+ local.get $10
+ f64.mul
+ local.get $7
+ local.get $13
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $16
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $20
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $3
+ local.get $11
+ f64.mul
+ local.get $7
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $17
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $21
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $3
+ local.get $12
+ f64.mul
+ local.get $7
+ local.get $15
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $18
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $22
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $0
+ i32.const 0
+ local.get $12
+ local.get $3
+ f64.mul
+ local.get $13
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $12
+ local.get $4
+ f64.mul
+ local.get $13
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ local.get $5
+ f64.mul
+ local.get $13
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $11
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $15
+ local.get $3
+ f64.mul
+ local.get $16
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $17
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $15
+ local.get $4
+ f64.mul
+ local.get $16
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $17
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $15
+ local.get $5
+ f64.mul
+ local.get $16
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $17
+ local.get $11
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $18
+ local.get $3
+ f64.mul
+ local.get $19
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $20
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $18
+ local.get $4
+ f64.mul
+ local.get $19
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $20
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $18
+ local.get $5
+ f64.mul
+ local.get $19
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $20
+ local.get $11
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/length (param $0 i32) (result f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/math/NativeMath.hypot
+ )
+ (func $assembly/vec2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/distance (param $0 i32) (param $1 i32) (result f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/math/NativeMath.hypot
+ )
+ (func $assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.mul
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ )
+ (func $assembly/vec2/squaredLength (param $0 i32) (result f64)
+ (local $1 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $1
+ local.get $1
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ )
+ (func $start:assembly/vec2~anonymous|0 (result i32)
+ i32.const 3600
+ )
+ (func $assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $7
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $7
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $6
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/common/setMatrixArrayType (param $0 i32)
+ local.get $0
+ global.set $assembly/common/ARRAY_TYPE
+ )
+ (func $assembly/common/toRadian (param $0 f64) (result f64)
+ local.get $0
+ f64.const 0.017453292519943295
+ f64.mul
+ )
+ (func $assembly/common/equals (param $0 f64) (param $1 f64) (result i32)
+ local.get $0
+ local.get $1
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $0
+ f64.abs
+ local.get $1
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ )
+ (func $~lib/util/number/genDigits (param $0 i64) (param $1 i32) (param $2 i64) (param $3 i32) (param $4 i64) (param $5 i32) (result i32)
+ (local $6 i64)
+ (local $7 i32)
+ (local $8 i64)
+ (local $9 i32)
+ (local $10 i64)
+ (local $11 i64)
+ local.get $2
+ local.get $0
+ i64.sub
+ local.set $8
+ local.get $2
+ i64.const 1
+ i32.const 0
+ local.get $3
+ i32.sub
+ local.tee $9
+ i64.extend_i32_s
+ local.tee $0
+ i64.shl
+ local.tee $10
+ i64.const 1
+ i64.sub
+ local.tee $11
+ i64.and
+ local.set $6
+ local.get $2
+ local.get $0
+ i64.shr_u
+ i32.wrap_i64
+ local.tee $1
+ local.set $3
+ local.get $1
+ i32.const 100000
+ i32.lt_u
+ if (result i32)
+ local.get $3
+ i32.const 100
+ i32.lt_u
+ if (result i32)
+ local.get $3
+ i32.const 10
+ i32.ge_u
+ i32.const 1
+ i32.add
+ else
+ local.get $3
+ i32.const 10000
+ i32.ge_u
+ i32.const 3
+ i32.add
+ local.get $3
+ i32.const 1000
+ i32.ge_u
+ i32.add
+ end
+ else
+ local.get $3
+ i32.const 10000000
+ i32.lt_u
+ if (result i32)
+ local.get $3
+ i32.const 1000000
+ i32.ge_u
+ i32.const 6
+ i32.add
+ else
+ local.get $3
+ i32.const 1000000000
+ i32.ge_u
+ i32.const 8
+ i32.add
+ local.get $3
+ i32.const 100000000
+ i32.ge_u
+ i32.add
+ end
+ end
+ local.set $7
+ loop $while-continue|0
+ local.get $7
+ i32.const 0
+ i32.gt_s
+ if
+ block $break|1
+ block $case10|1
+ block $case9|1
+ block $case8|1
+ block $case7|1
+ block $case6|1
+ block $case5|1
+ block $case4|1
+ block $case3|1
+ block $case2|1
+ block $case1|1
+ block $case0|1
+ local.get $7
+ i32.const 1
+ i32.sub
+ br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case0|1 $case10|1
+ end
+ local.get $1
+ i32.const 1000000000
+ i32.div_u
+ local.set $3
+ local.get $1
+ i32.const 1000000000
+ i32.rem_u
+ local.set $1
+ br $break|1
+ end
+ local.get $1
+ i32.const 100000000
+ i32.div_u
+ local.set $3
+ local.get $1
+ i32.const 100000000
+ i32.rem_u
+ local.set $1
+ br $break|1
+ end
+ local.get $1
+ i32.const 10000000
+ i32.div_u
+ local.set $3
+ local.get $1
+ i32.const 10000000
+ i32.rem_u
+ local.set $1
+ br $break|1
+ end
+ local.get $1
+ i32.const 1000000
+ i32.div_u
+ local.set $3
+ local.get $1
+ i32.const 1000000
+ i32.rem_u
+ local.set $1
+ br $break|1
+ end
+ local.get $1
+ i32.const 100000
+ i32.div_u
+ local.set $3
+ local.get $1
+ i32.const 100000
+ i32.rem_u
+ local.set $1
+ br $break|1
+ end
+ local.get $1
+ i32.const 10000
+ i32.div_u
+ local.set $3
+ local.get $1
+ i32.const 10000
+ i32.rem_u
+ local.set $1
+ br $break|1
+ end
+ local.get $1
+ i32.const 1000
+ i32.div_u
+ local.set $3
+ local.get $1
+ i32.const 1000
+ i32.rem_u
+ local.set $1
+ br $break|1
+ end
+ local.get $1
+ i32.const 100
+ i32.div_u
+ local.set $3
+ local.get $1
+ i32.const 100
+ i32.rem_u
+ local.set $1
+ br $break|1
+ end
+ local.get $1
+ i32.const 10
+ i32.div_u
+ local.set $3
+ local.get $1
+ i32.const 10
+ i32.rem_u
+ local.set $1
+ br $break|1
+ end
+ local.get $1
+ local.set $3
+ i32.const 0
+ local.set $1
+ br $break|1
+ end
+ i32.const 0
+ local.set $3
+ end
+ local.get $3
+ local.get $5
+ i32.or
+ if
+ local.get $5
+ i32.const 1
+ i32.shl
+ i32.const 3904
+ i32.add
+ local.get $3
+ i32.const 65535
+ i32.and
+ i32.const 48
+ i32.add
+ i32.store16
+ local.get $5
+ i32.const 1
+ i32.add
+ local.set $5
+ end
+ local.get $7
+ i32.const 1
+ i32.sub
+ local.set $7
+ local.get $6
+ local.get $1
+ i64.extend_i32_u
+ local.get $9
+ i64.extend_i32_s
+ i64.shl
+ i64.add
+ local.tee $0
+ local.get $4
+ i64.le_u
+ if
+ local.get $7
+ global.get $~lib/util/number/_K
+ i32.add
+ global.set $~lib/util/number/_K
+ local.get $7
+ i32.const 2
+ i32.shl
+ i32.const 4832
+ i32.add
+ i64.load32_u
+ local.get $9
+ i64.extend_i32_s
+ i64.shl
+ local.set $2
+ local.get $5
+ i32.const 1
+ i32.shl
+ i32.const 3902
+ i32.add
+ local.tee $7
+ i32.load16_u
+ local.set $3
+ loop $while-continue|3
+ local.get $2
+ local.get $4
+ local.get $0
+ i64.sub
+ i64.le_u
+ i32.const 0
+ local.get $0
+ local.get $8
+ i64.lt_u
+ select
+ if (result i32)
+ i32.const 1
+ local.get $8
+ local.get $0
+ i64.sub
+ local.get $0
+ local.get $2
+ i64.add
+ local.tee $6
+ local.get $8
+ i64.sub
+ i64.gt_u
+ local.get $6
+ local.get $8
+ i64.lt_u
+ select
+ else
+ i32.const 0
+ end
+ if
+ local.get $3
+ i32.const 1
+ i32.sub
+ local.set $3
+ local.get $0
+ local.get $2
+ i64.add
+ local.set $0
+ br $while-continue|3
+ end
+ end
+ local.get $7
+ local.get $3
+ i32.store16
+ local.get $5
+ return
+ end
+ br $while-continue|0
+ end
+ end
+ local.get $9
+ i64.extend_i32_s
+ local.set $0
+ loop $while-continue|4
+ local.get $4
+ i64.const 10
+ i64.mul
+ local.set $4
+ local.get $6
+ i64.const 10
+ i64.mul
+ local.tee $2
+ local.get $0
+ i64.shr_u
+ local.tee $6
+ local.get $5
+ i64.extend_i32_s
+ i64.or
+ i64.const 0
+ i64.ne
+ if
+ local.get $5
+ i32.const 1
+ i32.shl
+ i32.const 3904
+ i32.add
+ local.get $6
+ i32.wrap_i64
+ i32.const 65535
+ i32.and
+ i32.const 48
+ i32.add
+ i32.store16
+ local.get $5
+ i32.const 1
+ i32.add
+ local.set $5
+ end
+ local.get $7
+ i32.const 1
+ i32.sub
+ local.set $7
+ local.get $4
+ local.get $2
+ local.get $11
+ i64.and
+ local.tee $6
+ i64.le_u
+ br_if $while-continue|4
+ end
+ local.get $7
+ global.get $~lib/util/number/_K
+ i32.add
+ global.set $~lib/util/number/_K
+ local.get $6
+ local.set $0
+ local.get $8
+ i32.const 0
+ local.get $7
+ i32.sub
+ i32.const 2
+ i32.shl
+ i32.const 4832
+ i32.add
+ i64.load32_u
+ i64.mul
+ local.set $2
+ local.get $5
+ i32.const 1
+ i32.shl
+ i32.const 3902
+ i32.add
+ local.tee $7
+ i32.load16_u
+ local.set $3
+ loop $while-continue|6
+ local.get $10
+ local.get $4
+ local.get $0
+ i64.sub
+ i64.le_u
+ i32.const 0
+ local.get $0
+ local.get $2
+ i64.lt_u
+ select
+ if (result i32)
+ i32.const 1
+ local.get $2
+ local.get $0
+ i64.sub
+ local.get $0
+ local.get $10
+ i64.add
+ local.tee $6
+ local.get $2
+ i64.sub
+ i64.gt_u
+ local.get $2
+ local.get $6
+ i64.gt_u
+ select
+ else
+ i32.const 0
+ end
+ if
+ local.get $3
+ i32.const 1
+ i32.sub
+ local.set $3
+ local.get $0
+ local.get $10
+ i64.add
+ local.set $0
+ br $while-continue|6
+ end
+ end
+ local.get $7
+ local.get $3
+ i32.store16
+ local.get $5
+ )
+ (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ loop $while-continue|0
+ local.get $1
+ i32.const 3
+ i32.and
+ i32.const 0
+ local.get $2
+ select
+ if
+ local.get $0
+ local.tee $3
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $1
+ local.tee $4
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $3
+ local.get $4
+ i32.load8_u
+ i32.store8
+ local.get $2
+ i32.const 1
+ i32.sub
+ local.set $2
+ br $while-continue|0
+ end
+ end
+ local.get $0
+ i32.const 3
+ i32.and
+ i32.eqz
+ if
+ loop $while-continue|1
+ local.get $2
+ i32.const 16
+ i32.ge_u
+ if
+ local.get $0
+ local.get $1
+ i32.load
+ i32.store
+ local.get $0
+ local.get $1
+ i32.load offset=4
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ i32.load offset=8
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ i32.load offset=12
+ i32.store offset=12
+ local.get $1
+ i32.const 16
+ i32.add
+ local.set $1
+ local.get $0
+ i32.const 16
+ i32.add
+ local.set $0
+ local.get $2
+ i32.const 16
+ i32.sub
+ local.set $2
+ br $while-continue|1
+ end
+ end
+ local.get $2
+ i32.const 8
+ i32.and
+ if
+ local.get $0
+ local.get $1
+ i32.load
+ i32.store
+ local.get $0
+ local.get $1
+ i32.load offset=4
+ i32.store offset=4
+ local.get $1
+ i32.const 8
+ i32.add
+ local.set $1
+ local.get $0
+ i32.const 8
+ i32.add
+ local.set $0
+ end
+ local.get $2
+ i32.const 4
+ i32.and
+ if
+ local.get $0
+ local.get $1
+ i32.load
+ i32.store
+ local.get $1
+ i32.const 4
+ i32.add
+ local.set $1
+ local.get $0
+ i32.const 4
+ i32.add
+ local.set $0
+ end
+ local.get $2
+ i32.const 2
+ i32.and
+ if
+ local.get $0
+ local.get $1
+ i32.load16_u
+ i32.store16
+ local.get $1
+ i32.const 2
+ i32.add
+ local.set $1
+ local.get $0
+ i32.const 2
+ i32.add
+ local.set $0
+ end
+ local.get $2
+ i32.const 1
+ i32.and
+ if
+ local.get $0
+ local.get $1
+ i32.load8_u
+ i32.store8
+ end
+ return
+ end
+ local.get $2
+ i32.const 32
+ i32.ge_u
+ if
+ block $break|2
+ block $case2|2
+ block $case1|2
+ block $case0|2
+ local.get $0
+ i32.const 3
+ i32.and
+ i32.const 1
+ i32.sub
+ br_table $case0|2 $case1|2 $case2|2 $break|2
+ end
+ local.get $1
+ i32.load
+ local.set $5
+ local.get $0
+ local.get $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $4
+ i32.const 2
+ i32.add
+ local.set $0
+ local.get $1
+ local.tee $3
+ i32.const 2
+ i32.add
+ local.set $1
+ local.get $4
+ local.get $3
+ i32.load8_u offset=1
+ i32.store8 offset=1
+ local.get $2
+ i32.const 3
+ i32.sub
+ local.set $2
+ loop $while-continue|3
+ local.get $2
+ i32.const 17
+ i32.ge_u
+ if
+ local.get $0
+ local.get $1
+ i32.load offset=1
+ local.tee $3
+ i32.const 8
+ i32.shl
+ local.get $5
+ i32.const 24
+ i32.shr_u
+ i32.or
+ i32.store
+ local.get $0
+ local.get $3
+ i32.const 24
+ i32.shr_u
+ local.get $1
+ i32.load offset=5
+ local.tee $3
+ i32.const 8
+ i32.shl
+ i32.or
+ i32.store offset=4
+ local.get $0
+ local.get $3
+ i32.const 24
+ i32.shr_u
+ local.get $1
+ i32.load offset=9
+ local.tee $3
+ i32.const 8
+ i32.shl
+ i32.or
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ i32.load offset=13
+ local.tee $5
+ i32.const 8
+ i32.shl
+ local.get $3
+ i32.const 24
+ i32.shr_u
+ i32.or
+ i32.store offset=12
+ local.get $1
+ i32.const 16
+ i32.add
+ local.set $1
+ local.get $0
+ i32.const 16
+ i32.add
+ local.set $0
+ local.get $2
+ i32.const 16
+ i32.sub
+ local.set $2
+ br $while-continue|3
+ end
+ end
+ br $break|2
+ end
+ local.get $1
+ i32.load
+ local.set $5
+ local.get $0
+ local.get $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $4
+ i32.const 2
+ i32.add
+ local.set $0
+ local.get $1
+ local.tee $3
+ i32.const 2
+ i32.add
+ local.set $1
+ local.get $4
+ local.get $3
+ i32.load8_u offset=1
+ i32.store8 offset=1
+ local.get $2
+ i32.const 2
+ i32.sub
+ local.set $2
+ loop $while-continue|4
+ local.get $2
+ i32.const 18
+ i32.ge_u
+ if
+ local.get $0
+ local.get $1
+ i32.load offset=2
+ local.tee $3
+ i32.const 16
+ i32.shl
+ local.get $5
+ i32.const 16
+ i32.shr_u
+ i32.or
+ i32.store
+ local.get $0
+ local.get $3
+ i32.const 16
+ i32.shr_u
+ local.get $1
+ i32.load offset=6
+ local.tee $3
+ i32.const 16
+ i32.shl
+ i32.or
+ i32.store offset=4
+ local.get $0
+ local.get $3
+ i32.const 16
+ i32.shr_u
+ local.get $1
+ i32.load offset=10
+ local.tee $3
+ i32.const 16
+ i32.shl
+ i32.or
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ i32.load offset=14
+ local.tee $5
+ i32.const 16
+ i32.shl
+ local.get $3
+ i32.const 16
+ i32.shr_u
+ i32.or
+ i32.store offset=12
+ local.get $1
+ i32.const 16
+ i32.add
+ local.set $1
+ local.get $0
+ i32.const 16
+ i32.add
+ local.set $0
+ local.get $2
+ i32.const 16
+ i32.sub
+ local.set $2
+ br $while-continue|4
+ end
+ end
+ br $break|2
+ end
+ local.get $1
+ i32.load
+ local.set $5
+ local.get $0
+ local.tee $3
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $1
+ local.tee $4
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $3
+ local.get $4
+ i32.load8_u
+ i32.store8
+ local.get $2
+ i32.const 1
+ i32.sub
+ local.set $2
+ loop $while-continue|5
+ local.get $2
+ i32.const 19
+ i32.ge_u
+ if
+ local.get $0
+ local.get $1
+ i32.load offset=3
+ local.tee $3
+ i32.const 24
+ i32.shl
+ local.get $5
+ i32.const 8
+ i32.shr_u
+ i32.or
+ i32.store
+ local.get $0
+ local.get $3
+ i32.const 8
+ i32.shr_u
+ local.get $1
+ i32.load offset=7
+ local.tee $3
+ i32.const 24
+ i32.shl
+ i32.or
+ i32.store offset=4
+ local.get $0
+ local.get $3
+ i32.const 8
+ i32.shr_u
+ local.get $1
+ i32.load offset=11
+ local.tee $3
+ i32.const 24
+ i32.shl
+ i32.or
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ i32.load offset=15
+ local.tee $5
+ i32.const 24
+ i32.shl
+ local.get $3
+ i32.const 8
+ i32.shr_u
+ i32.or
+ i32.store offset=12
+ local.get $1
+ i32.const 16
+ i32.add
+ local.set $1
+ local.get $0
+ i32.const 16
+ i32.add
+ local.set $0
+ local.get $2
+ i32.const 16
+ i32.sub
+ local.set $2
+ br $while-continue|5
+ end
+ end
+ end
+ end
+ local.get $2
+ i32.const 16
+ i32.and
+ if
+ local.get $0
+ local.get $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $4
+ i32.const 2
+ i32.add
+ local.set $0
+ local.get $1
+ local.tee $3
+ i32.const 2
+ i32.add
+ local.set $1
+ local.get $4
+ local.get $3
+ i32.load8_u offset=1
+ i32.store8 offset=1
+ end
+ local.get $2
+ i32.const 8
+ i32.and
+ if
+ local.get $0
+ local.get $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $4
+ i32.const 2
+ i32.add
+ local.set $0
+ local.get $1
+ local.tee $3
+ i32.const 2
+ i32.add
+ local.set $1
+ local.get $4
+ local.get $3
+ i32.load8_u offset=1
+ i32.store8 offset=1
+ end
+ local.get $2
+ i32.const 4
+ i32.and
+ if
+ local.get $0
+ local.get $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ i32.const 1
+ i32.add
+ local.tee $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $4
+ i32.const 2
+ i32.add
+ local.set $0
+ local.get $1
+ local.tee $3
+ i32.const 2
+ i32.add
+ local.set $1
+ local.get $4
+ local.get $3
+ i32.load8_u offset=1
+ i32.store8 offset=1
+ end
+ local.get $2
+ i32.const 2
+ i32.and
+ if
+ local.get $0
+ local.get $1
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $4
+ i32.const 2
+ i32.add
+ local.set $0
+ local.get $1
+ local.tee $3
+ i32.const 2
+ i32.add
+ local.set $1
+ local.get $4
+ local.get $3
+ i32.load8_u offset=1
+ i32.store8 offset=1
+ end
+ local.get $2
+ i32.const 1
+ i32.and
+ if
+ local.get $0
+ local.get $1
+ i32.load8_u
+ i32.store8
+ end
+ )
+ (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ block $~lib/util/memory/memmove|inlined.0
+ local.get $2
+ local.set $4
+ local.get $0
+ local.get $1
+ i32.eq
+ br_if $~lib/util/memory/memmove|inlined.0
+ local.get $1
+ local.get $0
+ i32.sub
+ local.get $4
+ i32.sub
+ i32.const 0
+ local.get $4
+ i32.const 1
+ i32.shl
+ i32.sub
+ i32.le_u
+ if
+ local.get $0
+ local.get $1
+ local.get $4
+ call $~lib/util/memory/memcpy
+ br $~lib/util/memory/memmove|inlined.0
+ end
+ local.get $0
+ local.get $1
+ i32.lt_u
+ if
+ local.get $1
+ i32.const 7
+ i32.and
+ local.get $0
+ i32.const 7
+ i32.and
+ i32.eq
+ if
+ loop $while-continue|0
+ local.get $0
+ i32.const 7
+ i32.and
+ if
+ local.get $4
+ i32.eqz
+ br_if $~lib/util/memory/memmove|inlined.0
+ local.get $4
+ i32.const 1
+ i32.sub
+ local.set $4
+ local.get $0
+ local.tee $2
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $1
+ local.tee $3
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $2
+ local.get $3
+ i32.load8_u
+ i32.store8
+ br $while-continue|0
+ end
+ end
+ loop $while-continue|1
+ local.get $4
+ i32.const 8
+ i32.ge_u
+ if
+ local.get $0
+ local.get $1
+ i64.load
+ i64.store
+ local.get $4
+ i32.const 8
+ i32.sub
+ local.set $4
+ local.get $0
+ i32.const 8
+ i32.add
+ local.set $0
+ local.get $1
+ i32.const 8
+ i32.add
+ local.set $1
+ br $while-continue|1
+ end
+ end
+ end
+ loop $while-continue|2
+ local.get $4
+ if
+ local.get $0
+ local.tee $2
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $1
+ local.tee $3
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $2
+ local.get $3
+ i32.load8_u
+ i32.store8
+ local.get $4
+ i32.const 1
+ i32.sub
+ local.set $4
+ br $while-continue|2
+ end
+ end
+ else
+ local.get $1
+ i32.const 7
+ i32.and
+ local.get $0
+ i32.const 7
+ i32.and
+ i32.eq
+ if
+ loop $while-continue|3
+ local.get $0
+ local.get $4
+ i32.add
+ i32.const 7
+ i32.and
+ if
+ local.get $4
+ i32.eqz
+ br_if $~lib/util/memory/memmove|inlined.0
+ local.get $4
+ i32.const 1
+ i32.sub
+ local.tee $4
+ local.get $0
+ i32.add
+ local.get $1
+ local.get $4
+ i32.add
+ i32.load8_u
+ i32.store8
+ br $while-continue|3
+ end
+ end
+ loop $while-continue|4
+ local.get $4
+ i32.const 8
+ i32.ge_u
+ if
+ local.get $4
+ i32.const 8
+ i32.sub
+ local.tee $4
+ local.get $0
+ i32.add
+ local.get $1
+ local.get $4
+ i32.add
+ i64.load
+ i64.store
+ br $while-continue|4
+ end
+ end
+ end
+ loop $while-continue|5
+ local.get $4
+ if
+ local.get $4
+ i32.const 1
+ i32.sub
+ local.tee $4
+ local.get $0
+ i32.add
+ local.get $1
+ local.get $4
+ i32.add
+ i32.load8_u
+ i32.store8
+ br $while-continue|5
+ end
+ end
+ end
+ end
+ )
+ (func $~lib/util/number/utoa32_dec_lut (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ loop $while-continue|0
+ local.get $1
+ i32.const 10000
+ i32.ge_u
+ if
+ local.get $1
+ i32.const 10000
+ i32.rem_u
+ local.set $3
+ local.get $1
+ i32.const 10000
+ i32.div_u
+ local.set $1
+ local.get $0
+ local.get $2
+ i32.const 4
+ i32.sub
+ local.tee $2
+ i32.const 1
+ i32.shl
+ i32.add
+ local.get $3
+ i32.const 100
+ i32.div_u
+ i32.const 2
+ i32.shl
+ i32.const 4872
+ i32.add
+ i64.load32_u
+ local.get $3
+ i32.const 100
+ i32.rem_u
+ i32.const 2
+ i32.shl
+ i32.const 4872
+ i32.add
+ i64.load32_u
+ 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 $0
+ local.get $2
+ i32.const 2
+ i32.sub
+ local.tee $2
+ i32.const 1
+ i32.shl
+ i32.add
+ local.get $1
+ i32.const 100
+ i32.rem_u
+ i32.const 2
+ i32.shl
+ i32.const 4872
+ i32.add
+ i32.load
+ i32.store
+ local.get $1
+ i32.const 100
+ i32.div_u
+ local.set $1
+ end
+ local.get $1
+ i32.const 10
+ i32.ge_u
+ if
+ local.get $0
+ local.get $2
+ i32.const 2
+ i32.sub
+ i32.const 1
+ i32.shl
+ i32.add
+ local.get $1
+ i32.const 2
+ i32.shl
+ i32.const 4872
+ i32.add
+ i32.load
+ i32.store
+ else
+ local.get $0
+ local.get $2
+ i32.const 1
+ i32.sub
+ i32.const 1
+ i32.shl
+ i32.add
+ local.get $1
+ i32.const 48
+ i32.add
+ i32.store16
+ end
+ )
+ (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ local.get $2
+ i32.eqz
+ if
+ local.get $0
+ local.get $1
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.const 3145774
+ i32.store
+ local.get $1
+ i32.const 2
+ i32.add
+ return
+ end
+ local.get $1
+ local.get $2
+ i32.add
+ local.tee $4
+ i32.const 21
+ i32.le_s
+ i32.const 0
+ local.get $1
+ local.get $4
+ i32.le_s
+ select
+ if (result i32)
+ loop $for-loop|0
+ local.get $1
+ local.get $4
+ i32.lt_s
+ if
+ local.get $0
+ local.get $1
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.const 48
+ i32.store16
+ local.get $1
+ i32.const 1
+ i32.add
+ local.set $1
+ br $for-loop|0
+ end
+ end
+ local.get $0
+ local.get $4
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.const 3145774
+ i32.store
+ local.get $4
+ i32.const 2
+ i32.add
+ else
+ local.get $4
+ i32.const 21
+ i32.le_s
+ i32.const 0
+ local.get $4
+ i32.const 0
+ i32.gt_s
+ select
+ if (result i32)
+ local.get $0
+ local.get $4
+ i32.const 1
+ i32.shl
+ i32.add
+ local.tee $0
+ i32.const 2
+ i32.add
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.sub
+ i32.const 1
+ i32.shl
+ call $~lib/memory/memory.copy
+ local.get $0
+ i32.const 46
+ i32.store16
+ local.get $1
+ i32.const 1
+ i32.add
+ else
+ local.get $4
+ i32.const 0
+ i32.le_s
+ i32.const 0
+ local.get $4
+ i32.const -6
+ i32.gt_s
+ select
+ if (result i32)
+ local.get $0
+ i32.const 2
+ local.get $4
+ i32.sub
+ local.tee $5
+ i32.const 1
+ i32.shl
+ i32.add
+ local.get $0
+ local.get $1
+ i32.const 1
+ i32.shl
+ call $~lib/memory/memory.copy
+ local.get $0
+ i32.const 3014704
+ i32.store
+ i32.const 2
+ local.set $2
+ loop $for-loop|1
+ local.get $2
+ local.get $5
+ i32.lt_s
+ if
+ local.get $0
+ local.get $2
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.const 48
+ i32.store16
+ local.get $2
+ i32.const 1
+ i32.add
+ local.set $2
+ br $for-loop|1
+ end
+ end
+ local.get $1
+ local.get $5
+ i32.add
+ else
+ local.get $1
+ i32.const 1
+ i32.eq
+ if (result i32)
+ local.get $0
+ i32.const 101
+ i32.store16 offset=2
+ local.get $0
+ local.tee $3
+ i32.const 4
+ i32.add
+ local.get $4
+ i32.const 1
+ i32.sub
+ local.tee $0
+ i32.const 0
+ i32.lt_s
+ local.tee $2
+ if
+ i32.const 0
+ local.get $0
+ i32.sub
+ local.set $0
+ end
+ local.get $0
+ local.tee $1
+ i32.const 100000
+ i32.lt_u
+ if (result i32)
+ local.get $1
+ i32.const 100
+ i32.lt_u
+ if (result i32)
+ local.get $1
+ i32.const 10
+ i32.ge_u
+ i32.const 1
+ i32.add
+ else
+ local.get $1
+ i32.const 10000
+ i32.ge_u
+ i32.const 3
+ i32.add
+ local.get $1
+ i32.const 1000
+ i32.ge_u
+ i32.add
+ end
+ else
+ local.get $1
+ i32.const 10000000
+ i32.lt_u
+ if (result i32)
+ local.get $1
+ i32.const 1000000
+ i32.ge_u
+ i32.const 6
+ i32.add
+ else
+ local.get $1
+ i32.const 1000000000
+ i32.ge_u
+ i32.const 8
+ i32.add
+ local.get $1
+ i32.const 100000000
+ i32.ge_u
+ i32.add
+ end
+ end
+ local.set $1
+ local.get $0
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $0
+ call $~lib/util/number/utoa32_dec_lut
+ local.get $3
+ i32.const 45
+ i32.const 43
+ local.get $2
+ select
+ i32.store16 offset=4
+ local.get $0
+ i32.const 2
+ i32.add
+ else
+ local.get $0
+ i32.const 4
+ i32.add
+ local.get $0
+ i32.const 2
+ i32.add
+ local.get $1
+ i32.const 1
+ i32.shl
+ local.tee $2
+ i32.const 2
+ i32.sub
+ call $~lib/memory/memory.copy
+ local.get $0
+ i32.const 46
+ i32.store16 offset=2
+ local.get $0
+ local.get $2
+ i32.add
+ local.tee $0
+ i32.const 101
+ i32.store16 offset=2
+ local.get $0
+ local.tee $3
+ i32.const 4
+ i32.add
+ local.get $4
+ i32.const 1
+ i32.sub
+ local.tee $0
+ i32.const 0
+ i32.lt_s
+ local.tee $5
+ if
+ i32.const 0
+ local.get $0
+ i32.sub
+ local.set $0
+ end
+ local.get $0
+ local.tee $2
+ i32.const 100000
+ i32.lt_u
+ if (result i32)
+ local.get $2
+ i32.const 100
+ i32.lt_u
+ if (result i32)
+ local.get $2
+ i32.const 10
+ i32.ge_u
+ i32.const 1
+ i32.add
+ else
+ local.get $2
+ i32.const 10000
+ i32.ge_u
+ i32.const 3
+ i32.add
+ local.get $2
+ i32.const 1000
+ i32.ge_u
+ i32.add
+ end
+ else
+ local.get $2
+ i32.const 10000000
+ i32.lt_u
+ if (result i32)
+ local.get $2
+ i32.const 1000000
+ i32.ge_u
+ i32.const 6
+ i32.add
+ else
+ local.get $2
+ i32.const 1000000000
+ i32.ge_u
+ i32.const 8
+ i32.add
+ local.get $2
+ i32.const 100000000
+ i32.ge_u
+ i32.add
+ end
+ end
+ local.set $2
+ local.get $0
+ local.get $2
+ i32.const 1
+ i32.add
+ local.tee $0
+ call $~lib/util/number/utoa32_dec_lut
+ local.get $3
+ i32.const 45
+ i32.const 43
+ local.get $5
+ select
+ i32.store16 offset=4
+ local.get $0
+ local.get $1
+ i32.add
+ i32.const 2
+ i32.add
+ end
+ end
+ end
+ end
+ )
+ (func $~lib/util/number/dtoa_core (param $0 f64) (result i32)
+ (local $1 i64)
+ (local $2 i64)
+ (local $3 i64)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i64)
+ (local $7 i32)
+ (local $8 i32)
+ (local $9 i32)
+ (local $10 i64)
+ (local $11 i64)
+ (local $12 i64)
+ local.get $0
+ f64.const 0
+ f64.lt
+ local.tee $8
+ if (result f64)
+ i32.const 3904
+ i32.const 45
+ i32.store16
+ local.get $0
+ f64.neg
+ else
+ local.get $0
+ end
+ i64.reinterpret_f64
+ local.tee $2
+ i64.const 9218868437227405312
+ i64.and
+ i64.const 52
+ i64.shr_u
+ i32.wrap_i64
+ local.tee $7
+ i32.const 0
+ i32.ne
+ i64.extend_i32_u
+ i64.const 52
+ i64.shl
+ local.get $2
+ i64.const 4503599627370495
+ i64.and
+ i64.add
+ local.tee $1
+ i64.const 1
+ i64.shl
+ i64.const 1
+ i64.add
+ local.tee $2
+ i64.clz
+ i32.wrap_i64
+ local.set $4
+ local.get $2
+ local.get $4
+ i64.extend_i32_s
+ i64.shl
+ global.set $~lib/util/number/_frc_plus
+ local.get $7
+ i32.const 1
+ local.get $7
+ select
+ i32.const 1075
+ i32.sub
+ local.tee $7
+ i32.const 1
+ i32.sub
+ local.get $4
+ i32.sub
+ local.set $4
+ local.get $1
+ local.get $1
+ i64.const 4503599627370496
+ i64.eq
+ i32.const 1
+ i32.add
+ local.tee $5
+ i64.extend_i32_s
+ i64.shl
+ i64.const 1
+ i64.sub
+ local.get $7
+ local.get $5
+ i32.sub
+ local.get $4
+ i32.sub
+ i64.extend_i32_s
+ i64.shl
+ global.set $~lib/util/number/_frc_minus
+ local.get $4
+ global.set $~lib/util/number/_exp
+ i32.const 348
+ i32.const -61
+ global.get $~lib/util/number/_exp
+ local.tee $4
+ i32.sub
+ f64.convert_i32_s
+ f64.const 0.30102999566398114
+ f64.mul
+ f64.const 347
+ f64.add
+ local.tee $0
+ i32.trunc_f64_s
+ local.tee $5
+ local.get $0
+ local.get $5
+ f64.convert_i32_s
+ f64.ne
+ i32.add
+ i32.const 3
+ i32.shr_s
+ i32.const 1
+ i32.add
+ local.tee $5
+ i32.const 3
+ i32.shl
+ local.tee $9
+ i32.sub
+ global.set $~lib/util/number/_K
+ local.get $9
+ i32.const 3960
+ i32.add
+ i64.load
+ global.set $~lib/util/number/_frc_pow
+ local.get $5
+ i32.const 1
+ i32.shl
+ i32.const 4656
+ i32.add
+ i32.load16_s
+ global.set $~lib/util/number/_exp_pow
+ global.get $~lib/util/number/_frc_pow
+ local.tee $3
+ i64.const 32
+ i64.shr_u
+ local.set $2
+ local.get $3
+ i64.const 4294967295
+ i64.and
+ local.tee $3
+ global.get $~lib/util/number/_frc_plus
+ local.tee $6
+ i64.const 32
+ i64.shr_u
+ local.tee $11
+ i64.mul
+ local.get $3
+ local.get $6
+ i64.const 4294967295
+ i64.and
+ local.tee $12
+ i64.mul
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.set $6
+ local.get $8
+ i32.const 1
+ i32.shl
+ i32.const 3904
+ i32.add
+ local.get $2
+ local.get $1
+ local.get $1
+ i64.clz
+ i32.wrap_i64
+ local.tee $5
+ i64.extend_i32_s
+ i64.shl
+ local.tee $1
+ i64.const 32
+ i64.shr_u
+ local.tee $10
+ i64.mul
+ local.get $3
+ local.get $10
+ i64.mul
+ local.get $3
+ local.get $1
+ i64.const 4294967295
+ i64.and
+ local.tee $1
+ i64.mul
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.tee $10
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.get $1
+ local.get $2
+ i64.mul
+ local.get $10
+ i64.const 4294967295
+ i64.and
+ i64.add
+ i64.const 2147483647
+ i64.add
+ i64.const 32
+ i64.shr_u
+ i64.add
+ global.get $~lib/util/number/_exp_pow
+ local.tee $9
+ local.get $7
+ local.get $5
+ i32.sub
+ i32.add
+ i32.const -64
+ i32.sub
+ local.get $2
+ local.get $11
+ i64.mul
+ local.get $6
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.get $2
+ local.get $12
+ i64.mul
+ local.get $6
+ i64.const 4294967295
+ i64.and
+ i64.add
+ i64.const 2147483647
+ i64.add
+ i64.const 32
+ i64.shr_u
+ i64.add
+ i64.const 1
+ i64.sub
+ local.tee $1
+ local.get $4
+ local.get $9
+ i32.add
+ i32.const -64
+ i32.sub
+ local.get $1
+ local.get $2
+ global.get $~lib/util/number/_frc_minus
+ local.tee $1
+ i64.const 32
+ i64.shr_u
+ local.tee $6
+ i64.mul
+ local.get $3
+ local.get $6
+ i64.mul
+ local.get $3
+ local.get $1
+ i64.const 4294967295
+ i64.and
+ local.tee $3
+ i64.mul
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.tee $1
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.get $2
+ local.get $3
+ i64.mul
+ local.get $1
+ i64.const 4294967295
+ i64.and
+ i64.add
+ i64.const 2147483647
+ i64.add
+ i64.const 32
+ i64.shr_u
+ i64.add
+ i64.const 1
+ i64.add
+ i64.sub
+ local.get $8
+ call $~lib/util/number/genDigits
+ local.get $8
+ i32.sub
+ global.get $~lib/util/number/_K
+ call $~lib/util/number/prettify
+ local.get $8
+ i32.add
+ )
+ (func $~lib/number/F64#toString (param $0 f64) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ block $__inlined_func$~lib/util/number/dtoa
+ local.get $0
+ f64.const 0
+ f64.eq
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ i32.const 3760
+ local.set $1
+ br $__inlined_func$~lib/util/number/dtoa
+ end
+ local.get $0
+ local.get $0
+ f64.sub
+ f64.const 0
+ f64.ne
+ if
+ local.get $0
+ local.get $0
+ f64.ne
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ i32.const 3792
+ local.set $1
+ br $__inlined_func$~lib/util/number/dtoa
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ i32.const 3824
+ i32.const 3872
+ local.get $0
+ f64.const 0
+ f64.lt
+ select
+ local.set $1
+ br $__inlined_func$~lib/util/number/dtoa
+ end
+ local.get $0
+ call $~lib/util/number/dtoa_core
+ i32.const 1
+ i32.shl
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.const 1
+ call $~lib/rt/itcms/__new
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 3904
+ local.get $2
+ call $~lib/memory/memory.copy
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ end
+ local.get $1
+ )
+ (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ block $__inlined_func$~lib/string/String#concat
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 1
+ i32.shr_u
+ i32.const 1
+ i32.shl
+ local.tee $3
+ local.get $1
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 1
+ i32.shr_u
+ i32.const 1
+ i32.shl
+ local.tee $4
+ i32.add
+ local.tee $2
+ i32.eqz
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ i32.const 5296
+ local.set $2
+ br $__inlined_func$~lib/string/String#concat
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.const 1
+ call $~lib/rt/itcms/__new
+ local.tee $2
+ i32.store
+ local.get $2
+ local.get $0
+ local.get $3
+ call $~lib/memory/memory.copy
+ local.get $2
+ local.get $3
+ i32.add
+ local.get $1
+ local.get $4
+ call $~lib/memory/memory.copy
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ end
+ local.get $2
+ )
+ (func $~lib/array/Array<~lib/typedarray/Float64Array>#__uset (param $0 i32) (param $1 i32) (param $2 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $2
+ i32.store
+ local.get $0
+ local.get $2
+ i32.const 1
+ call $~lib/rt/itcms/__link
+ )
+ (func $assembly/mat3/normalFromMat4 (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ (local $26 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $8
+ local.get $12
+ f64.mul
+ local.get $9
+ local.get $11
+ f64.mul
+ f64.sub
+ local.tee $24
+ local.get $7
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $17
+ f64.mul
+ local.get $3
+ local.get $16
+ f64.mul
+ f64.sub
+ local.tee $18
+ f64.mul
+ local.get $8
+ local.get $13
+ f64.mul
+ local.get $10
+ local.get $11
+ f64.mul
+ f64.sub
+ local.tee $25
+ local.get $6
+ local.get $17
+ f64.mul
+ local.get $3
+ local.get $15
+ f64.mul
+ f64.sub
+ local.tee $19
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $5
+ f64.mul
+ local.get $4
+ local.get $11
+ f64.mul
+ f64.sub
+ local.tee $20
+ local.get $6
+ local.get $16
+ f64.mul
+ local.get $7
+ local.get $15
+ f64.mul
+ f64.sub
+ local.tee $21
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $13
+ f64.mul
+ local.get $10
+ local.get $12
+ f64.mul
+ f64.sub
+ local.tee $26
+ local.get $2
+ local.get $17
+ f64.mul
+ local.get $3
+ local.get $14
+ f64.mul
+ f64.sub
+ local.tee $3
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $5
+ f64.mul
+ local.get $4
+ local.get $12
+ f64.mul
+ f64.sub
+ local.tee $22
+ local.get $2
+ local.get $16
+ f64.mul
+ local.get $7
+ local.get $14
+ f64.mul
+ f64.sub
+ local.tee $7
+ f64.mul
+ f64.sub
+ local.get $10
+ local.get $5
+ f64.mul
+ local.get $4
+ local.get $13
+ f64.mul
+ f64.sub
+ local.tee $23
+ local.get $2
+ local.get $15
+ f64.mul
+ local.get $6
+ local.get $14
+ f64.mul
+ f64.sub
+ local.tee $6
+ f64.mul
+ f64.add
+ local.tee $2
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.gt_u
+ if
+ i32.const 0
+ return
+ end
+ local.get $0
+ i32.const 0
+ local.get $12
+ local.get $18
+ f64.mul
+ local.get $13
+ local.get $19
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $21
+ f64.mul
+ f64.add
+ f64.const 1
+ local.get $2
+ f64.div
+ local.tee $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $13
+ local.get $3
+ f64.mul
+ local.get $11
+ local.get $18
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $11
+ local.get $19
+ f64.mul
+ local.get $12
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $10
+ local.get $19
+ f64.mul
+ local.get $9
+ local.get $18
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $21
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $8
+ local.get $18
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $9
+ local.get $3
+ f64.mul
+ local.get $8
+ local.get $19
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $15
+ local.get $23
+ f64.mul
+ local.get $16
+ local.get $22
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $26
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $16
+ local.get $20
+ f64.mul
+ local.get $14
+ local.get $23
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $25
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $14
+ local.get $22
+ f64.mul
+ local.get $15
+ local.get $20
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $24
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $2
+ local.get $11
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $2
+ f64.abs
+ local.get $11
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $12
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $3
+ f64.abs
+ local.get $12
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $13
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $4
+ f64.abs
+ local.get $13
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $5
+ local.get $14
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $5
+ f64.abs
+ local.get $14
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $6
+ local.get $15
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $6
+ f64.abs
+ local.get $15
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $7
+ local.get $16
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $7
+ f64.abs
+ local.get $16
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $8
+ local.get $17
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $8
+ f64.abs
+ local.get $17
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $9
+ local.get $18
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $9
+ f64.abs
+ local.get $18
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $10
+ local.get $19
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $10
+ f64.abs
+ local.get $19
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/mat4/identity (param $0 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/invert (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ (local $26 f64)
+ (local $27 f64)
+ (local $28 f64)
+ (local $29 f64)
+ (local $30 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.tee $19
+ local.get $13
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $18
+ f64.mul
+ local.get $14
+ local.get $17
+ f64.mul
+ f64.sub
+ local.tee $20
+ f64.mul
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ local.tee $21
+ local.get $12
+ local.get $18
+ f64.mul
+ local.get $14
+ local.get $16
+ f64.mul
+ f64.sub
+ local.tee $22
+ f64.mul
+ f64.sub
+ local.get $3
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.sub
+ local.tee $23
+ local.get $12
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $16
+ f64.mul
+ f64.sub
+ local.tee $24
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ local.tee $25
+ local.get $11
+ local.get $18
+ f64.mul
+ local.get $14
+ local.get $15
+ f64.mul
+ f64.sub
+ local.tee $26
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.sub
+ local.tee $27
+ local.get $11
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $15
+ f64.mul
+ f64.sub
+ local.tee $28
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ f64.sub
+ local.tee $29
+ local.get $11
+ local.get $16
+ f64.mul
+ local.get $12
+ local.get $15
+ f64.mul
+ f64.sub
+ local.tee $30
+ f64.mul
+ f64.add
+ local.tee $2
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.gt_u
+ if
+ i32.const 0
+ return
+ end
+ local.get $0
+ i32.const 0
+ local.get $8
+ local.get $20
+ f64.mul
+ local.get $9
+ local.get $22
+ f64.mul
+ f64.sub
+ local.get $10
+ local.get $24
+ f64.mul
+ f64.add
+ f64.const 1
+ local.get $2
+ f64.div
+ local.tee $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $22
+ f64.mul
+ local.get $4
+ local.get $20
+ f64.mul
+ f64.sub
+ local.get $6
+ local.get $24
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $16
+ local.get $29
+ f64.mul
+ local.get $17
+ local.get $27
+ f64.mul
+ f64.sub
+ local.get $18
+ local.get $25
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $13
+ local.get $27
+ f64.mul
+ local.get $12
+ local.get $29
+ f64.mul
+ f64.sub
+ local.get $14
+ local.get $25
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $9
+ local.get $26
+ f64.mul
+ local.get $7
+ local.get $20
+ f64.mul
+ f64.sub
+ local.get $10
+ local.get $28
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $3
+ local.get $20
+ f64.mul
+ local.get $5
+ local.get $26
+ f64.mul
+ f64.sub
+ local.get $6
+ local.get $28
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $17
+ local.get $23
+ f64.mul
+ local.get $15
+ local.get $29
+ f64.mul
+ f64.sub
+ local.get $18
+ local.get $21
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $11
+ local.get $29
+ f64.mul
+ local.get $13
+ local.get $23
+ f64.mul
+ f64.sub
+ local.get $14
+ local.get $21
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $7
+ local.get $22
+ f64.mul
+ local.get $8
+ local.get $26
+ f64.mul
+ f64.sub
+ local.get $10
+ local.get $30
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $4
+ local.get $26
+ f64.mul
+ local.get $3
+ local.get $22
+ f64.mul
+ f64.sub
+ local.get $6
+ local.get $30
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $15
+ local.get $27
+ f64.mul
+ local.get $16
+ local.get $23
+ f64.mul
+ f64.sub
+ local.get $18
+ local.get $19
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $12
+ local.get $23
+ f64.mul
+ local.get $11
+ local.get $27
+ f64.mul
+ f64.sub
+ local.get $14
+ local.get $19
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $8
+ local.get $28
+ f64.mul
+ local.get $7
+ local.get $24
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $30
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $3
+ local.get $24
+ f64.mul
+ local.get $4
+ local.get $28
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $30
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $16
+ local.get $21
+ f64.mul
+ local.get $15
+ local.get $25
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $19
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $11
+ local.get $25
+ f64.mul
+ local.get $12
+ local.get $21
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $19
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/adjoint (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ (local $26 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $0
+ i32.const 0
+ local.get $9
+ local.get $13
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $18
+ f64.mul
+ local.get $14
+ local.get $17
+ f64.mul
+ f64.sub
+ local.tee $4
+ f64.mul
+ local.get $10
+ local.get $12
+ local.get $18
+ f64.mul
+ local.get $14
+ local.get $16
+ f64.mul
+ f64.sub
+ local.tee $19
+ f64.mul
+ f64.sub
+ local.get $3
+ local.get $12
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $16
+ f64.mul
+ f64.sub
+ local.tee $20
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ local.get $19
+ f64.mul
+ local.get $6
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $2
+ local.get $20
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $16
+ local.get $7
+ local.get $3
+ f64.mul
+ local.get $2
+ local.get $10
+ f64.mul
+ f64.sub
+ local.tee $21
+ f64.mul
+ local.get $17
+ local.get $6
+ local.get $3
+ f64.mul
+ local.get $2
+ local.get $9
+ f64.mul
+ f64.sub
+ local.tee $22
+ f64.mul
+ f64.sub
+ local.get $18
+ local.get $6
+ local.get $10
+ f64.mul
+ local.get $7
+ local.get $9
+ f64.mul
+ f64.sub
+ local.tee $23
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $13
+ local.get $22
+ f64.mul
+ local.get $12
+ local.get $21
+ f64.mul
+ f64.sub
+ local.get $14
+ local.get $23
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $10
+ local.get $11
+ local.get $18
+ f64.mul
+ local.get $14
+ local.get $15
+ f64.mul
+ f64.sub
+ local.tee $24
+ f64.mul
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $3
+ local.get $11
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $15
+ f64.mul
+ f64.sub
+ local.tee $25
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $5
+ local.get $4
+ f64.mul
+ local.get $7
+ local.get $24
+ f64.mul
+ f64.sub
+ local.get $2
+ local.get $25
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $17
+ local.get $5
+ local.get $3
+ f64.mul
+ local.get $2
+ local.get $8
+ f64.mul
+ f64.sub
+ local.tee $4
+ f64.mul
+ local.get $15
+ local.get $21
+ f64.mul
+ f64.sub
+ local.get $18
+ local.get $5
+ local.get $10
+ f64.mul
+ local.get $7
+ local.get $8
+ f64.mul
+ f64.sub
+ local.tee $26
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $11
+ local.get $21
+ f64.mul
+ local.get $13
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $14
+ local.get $26
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $8
+ local.get $19
+ f64.mul
+ local.get $9
+ local.get $24
+ f64.mul
+ f64.sub
+ local.get $3
+ local.get $11
+ local.get $16
+ f64.mul
+ local.get $12
+ local.get $15
+ f64.mul
+ f64.sub
+ local.tee $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $6
+ local.get $24
+ f64.mul
+ local.get $5
+ local.get $19
+ f64.mul
+ f64.sub
+ local.get $2
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $15
+ local.get $22
+ f64.mul
+ local.get $16
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $18
+ local.get $5
+ local.get $9
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.sub
+ local.tee $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $12
+ local.get $4
+ f64.mul
+ local.get $11
+ local.get $22
+ f64.mul
+ f64.sub
+ local.get $14
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $9
+ local.get $25
+ f64.mul
+ local.get $8
+ local.get $20
+ f64.mul
+ f64.sub
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $5
+ local.get $20
+ f64.mul
+ local.get $6
+ local.get $25
+ f64.mul
+ f64.sub
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $16
+ local.get $26
+ f64.mul
+ local.get $15
+ local.get $23
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $11
+ local.get $23
+ f64.mul
+ local.get $12
+ local.get $26
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ local.get $1
+ i32.eq
+ if
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $0
+ i32.const 0
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $12
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $13
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $14
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $15
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $16
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $17
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $6
+ local.get $3
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $7
+ local.get $3
+ f64.mul
+ local.get $11
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $15
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $8
+ local.get $3
+ f64.mul
+ local.get $12
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $9
+ local.get $3
+ f64.mul
+ local.get $13
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $17
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $assembly/mat4/rotate (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ block $__inlined_func$assembly/maths/Maths.hypot3 (result f64)
+ f64.const 0
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $6
+ f64.abs
+ local.tee $5
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $7
+ f64.abs
+ local.tee $11
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $9
+ f64.abs
+ local.tee $8
+ f64.max
+ f64.max
+ local.tee $4
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot3
+ drop
+ local.get $4
+ local.get $5
+ f64.const 1
+ local.get $4
+ f64.div
+ local.tee $4
+ f64.mul
+ local.tee $5
+ local.get $5
+ f64.mul
+ local.get $11
+ local.get $4
+ f64.mul
+ local.tee $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $4
+ f64.mul
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ local.tee $4
+ f64.const 1e-06
+ f64.lt
+ if
+ i32.const 0
+ return
+ end
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $8
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $11
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $21
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $22
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $23
+ local.get $0
+ i32.const 0
+ local.get $12
+ local.get $6
+ f64.const 1
+ local.get $4
+ f64.div
+ local.tee $5
+ f64.mul
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.const 1
+ local.get $11
+ f64.sub
+ local.tee $2
+ f64.mul
+ local.get $11
+ f64.add
+ local.tee $10
+ f64.mul
+ local.get $16
+ local.get $7
+ local.get $5
+ f64.mul
+ local.tee $6
+ local.get $4
+ f64.mul
+ local.get $2
+ f64.mul
+ local.get $9
+ local.get $5
+ f64.mul
+ local.tee $5
+ local.get $8
+ f64.mul
+ local.tee $24
+ f64.add
+ local.tee $7
+ f64.mul
+ f64.add
+ local.get $20
+ local.get $5
+ local.get $4
+ f64.mul
+ local.get $2
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.tee $25
+ f64.sub
+ local.tee $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $13
+ local.get $10
+ f64.mul
+ local.get $17
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $14
+ local.get $10
+ f64.mul
+ local.get $18
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $15
+ local.get $10
+ f64.mul
+ local.get $19
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $23
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $12
+ local.get $4
+ local.get $6
+ f64.mul
+ local.get $2
+ f64.mul
+ local.get $24
+ f64.sub
+ local.tee $10
+ f64.mul
+ local.get $16
+ local.get $6
+ local.get $6
+ f64.mul
+ local.get $2
+ f64.mul
+ local.get $11
+ f64.add
+ local.tee $7
+ f64.mul
+ f64.add
+ local.get $20
+ local.get $5
+ local.get $6
+ f64.mul
+ local.get $2
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ local.tee $9
+ f64.add
+ local.tee $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $13
+ local.get $10
+ f64.mul
+ local.get $17
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $14
+ local.get $10
+ f64.mul
+ local.get $18
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $15
+ local.get $10
+ f64.mul
+ local.get $19
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $23
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $12
+ local.get $4
+ local.get $5
+ f64.mul
+ local.get $2
+ f64.mul
+ local.get $25
+ f64.add
+ local.tee $4
+ f64.mul
+ local.get $16
+ local.get $6
+ local.get $5
+ f64.mul
+ local.get $2
+ f64.mul
+ local.get $9
+ f64.sub
+ local.tee $6
+ f64.mul
+ f64.add
+ local.get $20
+ local.get $5
+ local.get $5
+ f64.mul
+ local.get $2
+ f64.mul
+ local.get $11
+ f64.add
+ local.tee $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $13
+ local.get $4
+ f64.mul
+ local.get $17
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $14
+ local.get $4
+ f64.mul
+ local.get $18
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $15
+ local.get $4
+ f64.mul
+ local.get $19
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $23
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $1
+ i32.ne
+ if
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ block $__inlined_func$assembly/maths/Maths.hypot3 (result f64)
+ f64.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $5
+ f64.abs
+ local.tee $4
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $8
+ f64.abs
+ local.tee $6
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $9
+ f64.abs
+ local.tee $7
+ f64.max
+ f64.max
+ local.tee $3
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot3
+ drop
+ local.get $3
+ local.get $4
+ f64.const 1
+ local.get $3
+ f64.div
+ local.tee $3
+ f64.mul
+ local.tee $4
+ local.get $4
+ f64.mul
+ local.get $6
+ local.get $3
+ f64.mul
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $3
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ local.tee $3
+ f64.const 1e-06
+ f64.lt
+ if
+ i32.const 0
+ return
+ end
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $6
+ local.get $0
+ i32.const 0
+ local.get $5
+ f64.const 1
+ local.get $3
+ f64.div
+ local.tee $4
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.const 1
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.tee $7
+ f64.sub
+ local.tee $1
+ f64.mul
+ local.get $7
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $8
+ local.get $4
+ f64.mul
+ local.tee $5
+ local.get $3
+ f64.mul
+ local.get $1
+ f64.mul
+ local.get $9
+ local.get $4
+ f64.mul
+ local.tee $4
+ local.get $6
+ f64.mul
+ local.tee $8
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ local.get $3
+ f64.mul
+ local.get $1
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ local.tee $9
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $3
+ local.get $5
+ f64.mul
+ local.get $1
+ f64.mul
+ local.get $8
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $5
+ local.get $5
+ f64.mul
+ local.get $1
+ f64.mul
+ local.get $7
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $4
+ local.get $5
+ f64.mul
+ local.get $1
+ f64.mul
+ local.get $3
+ local.get $6
+ f64.mul
+ local.tee $6
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $3
+ local.get $4
+ f64.mul
+ local.get $1
+ f64.mul
+ local.get $9
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $5
+ local.get $4
+ f64.mul
+ local.get $1
+ f64.mul
+ local.get $6
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $4
+ local.get $4
+ f64.mul
+ local.get $1
+ f64.mul
+ local.get $7
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $5
+ local.get $5
+ f64.add
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $4
+ local.get $4
+ local.get $4
+ f64.add
+ local.tee $7
+ f64.mul
+ local.tee $10
+ local.get $5
+ local.get $6
+ f64.mul
+ local.tee $5
+ f64.add
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ local.get $7
+ f64.mul
+ local.tee $9
+ local.get $8
+ local.get $6
+ f64.mul
+ local.tee $11
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $6
+ f64.mul
+ local.tee $12
+ local.get $8
+ local.get $7
+ f64.mul
+ local.tee $7
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $9
+ local.get $11
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ local.get $3
+ local.get $3
+ local.get $3
+ f64.add
+ local.tee $3
+ f64.mul
+ local.tee $9
+ local.get $5
+ f64.add
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $4
+ local.get $6
+ f64.mul
+ local.tee $4
+ local.get $8
+ local.get $3
+ f64.mul
+ local.tee $3
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $12
+ local.get $7
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $4
+ local.get $3
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ local.get $9
+ local.get $10
+ f64.add
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/getTranslation (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/getScaling (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $0
+ i32.const 0
+ block $__inlined_func$assembly/maths/Maths.hypot3 (result f64)
+ f64.const 0
+ local.get $2
+ f64.abs
+ local.tee $6
+ local.get $3
+ f64.abs
+ local.tee $3
+ local.get $4
+ f64.abs
+ local.tee $4
+ f64.max
+ f64.max
+ local.tee $2
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot3
+ drop
+ local.get $2
+ local.get $6
+ f64.const 1
+ local.get $2
+ f64.div
+ local.tee $2
+ f64.mul
+ local.tee $6
+ local.get $6
+ f64.mul
+ local.get $3
+ local.get $2
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $2
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ block $__inlined_func$assembly/maths/Maths.hypot30 (result f64)
+ f64.const 0
+ local.get $5
+ f64.abs
+ local.tee $3
+ local.get $7
+ f64.abs
+ local.tee $4
+ local.get $8
+ f64.abs
+ local.tee $5
+ f64.max
+ f64.max
+ local.tee $2
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot30
+ drop
+ local.get $2
+ local.get $3
+ f64.const 1
+ local.get $2
+ f64.div
+ local.tee $2
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $2
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $2
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ block $__inlined_func$assembly/maths/Maths.hypot31 (result f64)
+ f64.const 0
+ local.get $9
+ f64.abs
+ local.tee $3
+ local.get $10
+ f64.abs
+ local.tee $4
+ local.get $11
+ f64.abs
+ local.tee $5
+ f64.max
+ f64.max
+ local.tee $2
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot31
+ drop
+ local.get $2
+ local.get $3
+ f64.const 1
+ local.get $2
+ f64.div
+ local.tee $2
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $2
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $2
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/decompose (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ local.get $1
+ i32.const 0
+ local.get $3
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $3
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $3
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $3
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $3
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $3
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $3
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $3
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $3
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $2
+ i32.const 0
+ block $__inlined_func$assembly/maths/Maths.hypot3 (result f64)
+ f64.const 0
+ local.get $7
+ f64.abs
+ local.tee $5
+ local.get $6
+ f64.abs
+ local.tee $8
+ local.get $9
+ f64.abs
+ local.tee $14
+ f64.max
+ f64.max
+ local.tee $4
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot3
+ drop
+ local.get $4
+ local.get $5
+ f64.const 1
+ local.get $4
+ f64.div
+ local.tee $4
+ f64.mul
+ local.tee $5
+ local.get $5
+ f64.mul
+ local.get $8
+ local.get $4
+ f64.mul
+ local.tee $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $4
+ f64.mul
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 1
+ block $__inlined_func$assembly/maths/Maths.hypot30 (result f64)
+ f64.const 0
+ local.get $10
+ f64.abs
+ local.tee $5
+ local.get $15
+ f64.abs
+ local.tee $8
+ local.get $11
+ f64.abs
+ local.tee $14
+ f64.max
+ f64.max
+ local.tee $4
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot30
+ drop
+ local.get $4
+ local.get $5
+ f64.const 1
+ local.get $4
+ f64.div
+ local.tee $4
+ f64.mul
+ local.tee $5
+ local.get $5
+ f64.mul
+ local.get $8
+ local.get $4
+ f64.mul
+ local.tee $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $4
+ f64.mul
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 2
+ block $__inlined_func$assembly/maths/Maths.hypot31 (result f64)
+ f64.const 0
+ local.get $12
+ f64.abs
+ local.tee $5
+ local.get $13
+ f64.abs
+ local.tee $8
+ local.get $16
+ f64.abs
+ local.tee $14
+ f64.max
+ f64.max
+ local.tee $4
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot31
+ drop
+ local.get $4
+ local.get $5
+ f64.const 1
+ local.get $4
+ f64.div
+ local.tee $4
+ f64.mul
+ local.tee $5
+ local.get $5
+ f64.mul
+ local.get $8
+ local.get $4
+ f64.mul
+ local.tee $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $4
+ f64.mul
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ call $~lib/typedarray/Float64Array#__set
+ f64.const 1
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ local.set $4
+ local.get $6
+ f64.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ local.tee $6
+ f64.mul
+ local.set $5
+ local.get $9
+ f64.const 1
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ local.tee $8
+ f64.mul
+ local.set $9
+ local.get $10
+ local.get $4
+ f64.mul
+ local.set $10
+ local.get $11
+ local.get $8
+ f64.mul
+ local.set $11
+ local.get $12
+ local.get $4
+ f64.mul
+ local.set $12
+ local.get $13
+ local.get $6
+ f64.mul
+ local.set $13
+ local.get $7
+ local.get $4
+ f64.mul
+ local.tee $4
+ local.get $15
+ local.get $6
+ f64.mul
+ local.tee $7
+ f64.add
+ local.get $16
+ local.get $8
+ f64.mul
+ local.tee $6
+ f64.add
+ local.tee $15
+ f64.const 0
+ f64.gt
+ if
+ local.get $0
+ i32.const 3
+ local.get $15
+ f64.const 1
+ f64.add
+ f64.sqrt
+ local.tee $4
+ local.get $4
+ f64.add
+ local.tee $4
+ f64.const 0.25
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $11
+ local.get $13
+ f64.sub
+ local.get $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $12
+ local.get $9
+ f64.sub
+ local.get $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $10
+ f64.sub
+ local.get $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $4
+ local.get $6
+ f64.gt
+ i32.const 0
+ local.get $4
+ local.get $7
+ f64.gt
+ select
+ if
+ local.get $0
+ i32.const 3
+ local.get $11
+ local.get $13
+ f64.sub
+ local.get $4
+ f64.const 1
+ f64.add
+ local.get $7
+ f64.sub
+ local.get $6
+ f64.sub
+ f64.sqrt
+ local.tee $4
+ local.get $4
+ f64.add
+ local.tee $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $4
+ f64.const 0.25
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $10
+ f64.add
+ local.get $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ local.get $9
+ f64.add
+ local.get $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $6
+ local.get $7
+ f64.lt
+ if
+ local.get $0
+ i32.const 3
+ local.get $12
+ local.get $9
+ f64.sub
+ local.get $7
+ f64.const 1
+ f64.add
+ local.get $4
+ f64.sub
+ local.get $6
+ f64.sub
+ f64.sqrt
+ local.tee $4
+ local.get $4
+ f64.add
+ local.tee $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $10
+ f64.add
+ local.get $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ f64.const 0.25
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $11
+ local.get $13
+ f64.add
+ local.get $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 3
+ local.get $5
+ local.get $10
+ f64.sub
+ local.get $6
+ f64.const 1
+ f64.add
+ local.get $4
+ f64.sub
+ local.get $7
+ f64.sub
+ f64.sqrt
+ local.tee $4
+ local.get $4
+ f64.add
+ local.tee $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $12
+ local.get $9
+ f64.add
+ local.get $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $11
+ local.get $13
+ f64.add
+ local.get $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ f64.const 0.25
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ end
+ end
+ end
+ local.get $0
+ )
+ (func $assembly/mat4/fromRotationTranslationScaleOrigin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $7
+ local.get $7
+ f64.add
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $4
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $4
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $4
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $6
+ local.get $6
+ local.get $6
+ f64.add
+ local.tee $14
+ f64.mul
+ local.tee $19
+ local.get $7
+ local.get $8
+ f64.mul
+ local.tee $7
+ f64.add
+ f64.sub
+ local.get $10
+ f64.mul
+ local.tee $20
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $14
+ f64.mul
+ local.tee $17
+ local.get $9
+ local.get $8
+ f64.mul
+ local.tee $18
+ f64.add
+ local.get $10
+ f64.mul
+ local.tee $21
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $8
+ f64.mul
+ local.tee $22
+ local.get $9
+ local.get $14
+ f64.mul
+ local.tee $14
+ f64.sub
+ local.get $10
+ f64.mul
+ local.tee $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $17
+ local.get $18
+ f64.sub
+ local.get $15
+ f64.mul
+ local.tee $17
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ local.get $5
+ local.get $5
+ local.get $5
+ f64.add
+ local.tee $5
+ f64.mul
+ local.tee $18
+ local.get $7
+ f64.add
+ f64.sub
+ local.get $15
+ f64.mul
+ local.tee $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $6
+ local.get $8
+ f64.mul
+ local.tee $6
+ local.get $9
+ local.get $5
+ f64.mul
+ local.tee $5
+ f64.add
+ local.get $15
+ f64.mul
+ local.tee $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $22
+ local.get $14
+ f64.add
+ local.get $16
+ f64.mul
+ local.tee $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $6
+ local.get $5
+ f64.sub
+ local.get $16
+ f64.mul
+ local.tee $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ local.get $18
+ local.get $19
+ f64.add
+ f64.sub
+ local.get $16
+ f64.mul
+ local.tee $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $11
+ f64.add
+ local.get $20
+ local.get $11
+ f64.mul
+ local.get $17
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $13
+ f64.mul
+ f64.add
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $12
+ f64.add
+ local.get $21
+ local.get $11
+ f64.mul
+ local.get $7
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $13
+ f64.mul
+ f64.add
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $13
+ f64.add
+ local.get $10
+ local.get $11
+ f64.mul
+ local.get $8
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $13
+ f64.mul
+ f64.add
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/lookAt (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $15
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $8
+ f64.sub
+ f64.abs
+ f64.const 1e-06
+ f64.lt
+ i32.const 0
+ local.get $14
+ local.get $10
+ f64.sub
+ f64.abs
+ f64.const 1e-06
+ f64.lt
+ i32.const 0
+ local.get $13
+ local.get $6
+ f64.sub
+ f64.abs
+ f64.const 1e-06
+ f64.lt
+ select
+ select
+ if
+ local.get $0
+ call $assembly/mat4/identity
+ return
+ end
+ block $__inlined_func$assembly/maths/Maths.hypot3 (result f64)
+ f64.const 0
+ local.get $13
+ local.get $6
+ f64.sub
+ local.tee $11
+ f64.abs
+ local.tee $9
+ local.get $14
+ local.get $10
+ f64.sub
+ local.tee $10
+ f64.abs
+ local.tee $7
+ local.get $15
+ local.get $8
+ f64.sub
+ local.tee $8
+ f64.abs
+ local.tee $16
+ f64.max
+ f64.max
+ local.tee $6
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot3
+ drop
+ local.get $6
+ local.get $9
+ f64.const 1
+ local.get $6
+ f64.div
+ local.tee $6
+ f64.mul
+ local.tee $9
+ local.get $9
+ f64.mul
+ local.get $7
+ local.get $6
+ f64.mul
+ local.tee $9
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $6
+ f64.mul
+ local.tee $6
+ local.get $6
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ local.set $6
+ block $__inlined_func$assembly/maths/Maths.hypot30 (result f64)
+ f64.const 0
+ local.get $5
+ local.get $8
+ f64.const 1
+ local.get $6
+ f64.div
+ local.tee $8
+ f64.mul
+ local.tee $6
+ f64.mul
+ local.get $12
+ local.get $10
+ local.get $8
+ f64.mul
+ local.tee $10
+ f64.mul
+ f64.sub
+ local.tee $9
+ f64.abs
+ local.tee $7
+ local.get $12
+ local.get $11
+ local.get $8
+ f64.mul
+ local.tee $12
+ f64.mul
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ local.tee $11
+ f64.abs
+ local.tee $8
+ local.get $4
+ local.get $10
+ f64.mul
+ local.get $5
+ local.get $12
+ f64.mul
+ f64.sub
+ local.tee $5
+ f64.abs
+ local.tee $16
+ f64.max
+ f64.max
+ local.tee $4
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot30
+ drop
+ local.get $4
+ local.get $7
+ f64.const 1
+ local.get $4
+ f64.div
+ local.tee $4
+ f64.mul
+ local.tee $7
+ local.get $7
+ f64.mul
+ local.get $8
+ local.get $4
+ f64.mul
+ local.tee $8
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $4
+ f64.mul
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ local.tee $4
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.gt_u
+ if (result f64)
+ f64.const 0
+ local.set $8
+ f64.const 0
+ local.set $11
+ f64.const 0
+ else
+ local.get $9
+ f64.const 1
+ local.get $4
+ f64.div
+ local.tee $4
+ f64.mul
+ local.set $8
+ local.get $11
+ local.get $4
+ f64.mul
+ local.set $11
+ local.get $5
+ local.get $4
+ f64.mul
+ end
+ local.set $4
+ block $__inlined_func$assembly/maths/Maths.hypot31 (result f64)
+ f64.const 0
+ local.get $10
+ local.get $4
+ f64.mul
+ local.get $6
+ local.get $11
+ f64.mul
+ f64.sub
+ local.tee $9
+ f64.abs
+ local.tee $7
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $12
+ local.get $4
+ f64.mul
+ f64.sub
+ local.tee $16
+ f64.abs
+ local.tee $17
+ local.get $12
+ local.get $11
+ f64.mul
+ local.get $10
+ local.get $8
+ f64.mul
+ f64.sub
+ local.tee $18
+ f64.abs
+ local.tee $19
+ f64.max
+ f64.max
+ local.tee $5
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot31
+ drop
+ local.get $5
+ local.get $7
+ f64.const 1
+ local.get $5
+ f64.div
+ local.tee $5
+ f64.mul
+ local.tee $7
+ local.get $7
+ f64.mul
+ local.get $17
+ local.get $5
+ f64.mul
+ local.tee $7
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $19
+ local.get $5
+ f64.mul
+ local.tee $5
+ local.get $5
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ local.tee $5
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.gt_u
+ if (result f64)
+ f64.const 0
+ local.set $5
+ f64.const 0
+ local.set $9
+ f64.const 0
+ else
+ local.get $9
+ f64.const 1
+ local.get $5
+ f64.div
+ local.tee $7
+ f64.mul
+ local.set $5
+ local.get $16
+ local.get $7
+ f64.mul
+ local.set $9
+ local.get $18
+ local.get $7
+ f64.mul
+ end
+ local.set $7
+ local.get $0
+ i32.const 0
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $8
+ local.get $13
+ f64.mul
+ local.get $11
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $15
+ f64.mul
+ f64.add
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $5
+ local.get $13
+ f64.mul
+ local.get $9
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $15
+ f64.mul
+ f64.add
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $12
+ local.get $13
+ f64.mul
+ local.get $10
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $15
+ f64.mul
+ f64.add
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/targetTo (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $8
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.tee $11
+ local.get $11
+ f64.mul
+ local.get $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.tee $10
+ local.get $10
+ f64.mul
+ f64.add
+ local.tee $13
+ f64.const 0
+ f64.gt
+ if
+ local.get $11
+ f64.const 1
+ local.get $13
+ f64.sqrt
+ f64.div
+ local.tee $13
+ f64.mul
+ local.set $11
+ local.get $10
+ local.get $13
+ f64.mul
+ local.set $10
+ local.get $4
+ local.get $13
+ f64.mul
+ local.set $4
+ end
+ local.get $9
+ local.get $10
+ f64.mul
+ local.get $5
+ local.get $4
+ f64.mul
+ f64.sub
+ local.tee $13
+ local.get $13
+ f64.mul
+ local.get $5
+ local.get $11
+ f64.mul
+ local.get $12
+ local.get $10
+ f64.mul
+ f64.sub
+ local.tee $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $4
+ f64.mul
+ local.get $9
+ local.get $11
+ f64.mul
+ f64.sub
+ local.tee $12
+ local.get $12
+ f64.mul
+ f64.add
+ local.tee $9
+ f64.const 0
+ f64.gt
+ if
+ local.get $13
+ f64.const 1
+ local.get $9
+ f64.sqrt
+ f64.div
+ local.tee $9
+ f64.mul
+ local.set $13
+ local.get $12
+ local.get $9
+ f64.mul
+ local.set $12
+ local.get $5
+ local.get $9
+ f64.mul
+ local.set $5
+ end
+ local.get $0
+ i32.const 0
+ local.get $13
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $4
+ local.get $12
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $10
+ local.get $13
+ f64.mul
+ local.get $11
+ local.get $12
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $11
+ local.get $5
+ f64.mul
+ local.get $4
+ local.get $13
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ (local $26 f64)
+ (local $27 f64)
+ (local $28 f64)
+ (local $29 f64)
+ (local $30 f64)
+ (local $31 f64)
+ (local $32 f64)
+ (local $33 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $0
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $0
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $0
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $0
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $0
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $0
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $21
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $22
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $23
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $24
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $25
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $26
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $27
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $28
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $29
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $30
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $31
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $32
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.set $33
+ local.get $2
+ local.get $18
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $2
+ f64.abs
+ local.get $18
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $19
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $3
+ f64.abs
+ local.get $19
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $20
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $4
+ f64.abs
+ local.get $20
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $5
+ local.get $21
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $5
+ f64.abs
+ local.get $21
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $6
+ local.get $22
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $6
+ f64.abs
+ local.get $22
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $7
+ local.get $23
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $7
+ f64.abs
+ local.get $23
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $8
+ local.get $24
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $8
+ f64.abs
+ local.get $24
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $9
+ local.get $25
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $9
+ f64.abs
+ local.get $25
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $10
+ local.get $26
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $10
+ f64.abs
+ local.get $26
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $11
+ local.get $27
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $11
+ f64.abs
+ local.get $27
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $12
+ local.get $28
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $12
+ f64.abs
+ local.get $28
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $13
+ local.get $29
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $13
+ f64.abs
+ local.get $29
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $14
+ local.get $30
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $14
+ f64.abs
+ local.get $30
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $15
+ local.get $31
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $15
+ f64.abs
+ local.get $31
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $16
+ local.get $32
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $16
+ f64.abs
+ local.get $32
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $17
+ local.get $33
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $17
+ f64.abs
+ local.get $33
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/quat/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ f64.const 0.5
+ f64.mul
+ local.tee $3
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ local.tee $3
+ f64.mul
+ local.get $7
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $3
+ f64.mul
+ local.get $6
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $3
+ f64.mul
+ local.get $5
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ f64.const 0.5
+ f64.mul
+ local.tee $3
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ local.tee $3
+ f64.mul
+ local.get $6
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $3
+ f64.mul
+ local.get $7
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $3
+ f64.mul
+ local.get $5
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ f64.const 0.5
+ f64.mul
+ local.tee $3
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ local.tee $3
+ f64.mul
+ local.get $5
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $3
+ f64.mul
+ local.get $7
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $3
+ f64.mul
+ local.get $6
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/exp (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 i64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 i64)
+ (local $10 f64)
+ (local $11 i32)
+ (local $12 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ block $~lib/util/math/exp_lut|inlined.0 (result f64)
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $3
+ i64.reinterpret_f64
+ local.tee $5
+ i64.const 52
+ i64.shr_u
+ i64.const 2047
+ i64.and
+ i32.wrap_i64
+ local.tee $1
+ i32.const 969
+ i32.sub
+ i32.const 63
+ i32.ge_u
+ if
+ f64.const 1
+ local.get $1
+ i32.const 969
+ i32.sub
+ i32.const -2147483648
+ i32.ge_u
+ br_if $~lib/util/math/exp_lut|inlined.0
+ drop
+ local.get $1
+ i32.const 1033
+ i32.ge_u
+ if
+ f64.const 0
+ local.get $5
+ i64.const -4503599627370496
+ i64.eq
+ br_if $~lib/util/math/exp_lut|inlined.0
+ drop
+ local.get $3
+ f64.const 1
+ f64.add
+ local.get $1
+ i32.const 2047
+ i32.ge_u
+ br_if $~lib/util/math/exp_lut|inlined.0
+ drop
+ f64.const 0
+ f64.const inf
+ local.get $5
+ i64.const 63
+ i64.shr_u
+ i32.wrap_i64
+ select
+ br $~lib/util/math/exp_lut|inlined.0
+ end
+ i32.const 0
+ local.set $1
+ end
+ local.get $3
+ f64.const 184.6649652337873
+ f64.mul
+ f64.const 6755399441055744
+ f64.add
+ local.tee $2
+ i64.reinterpret_f64
+ local.tee $9
+ i64.const 127
+ i64.and
+ i64.const 1
+ i64.shl
+ i32.wrap_i64
+ i32.const 3
+ i32.shl
+ i32.const 5472
+ i32.add
+ local.tee $11
+ i64.load offset=8
+ local.get $9
+ i64.const 45
+ i64.shl
+ i64.add
+ local.set $5
+ local.get $3
+ local.get $2
+ f64.const 6755399441055744
+ f64.sub
+ local.tee $2
+ f64.const -0.005415212348111709
+ f64.mul
+ f64.add
+ local.get $2
+ f64.const -1.2864023111638346e-14
+ f64.mul
+ f64.add
+ local.tee $2
+ local.get $2
+ f64.mul
+ local.set $3
+ local.get $11
+ i64.load
+ f64.reinterpret_i64
+ local.get $2
+ f64.add
+ local.get $3
+ local.get $2
+ f64.const 0.16666666666665886
+ f64.mul
+ f64.const 0.49999999999996786
+ f64.add
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $3
+ f64.mul
+ local.get $2
+ f64.const 0.008333335853059549
+ f64.mul
+ f64.const 0.0416666808410674
+ f64.add
+ f64.mul
+ f64.add
+ local.set $3
+ local.get $1
+ i32.eqz
+ if
+ block $~lib/util/math/specialcase|inlined.0 (result f64)
+ local.get $9
+ i64.const 2147483648
+ i64.and
+ i64.eqz
+ if
+ local.get $5
+ i64.const 4544132024016830464
+ i64.sub
+ f64.reinterpret_i64
+ local.tee $2
+ local.get $2
+ local.get $3
+ f64.mul
+ f64.add
+ f64.const 5486124068793688683255936e279
+ f64.mul
+ br $~lib/util/math/specialcase|inlined.0
+ end
+ local.get $5
+ i64.const 4602678819172646912
+ i64.add
+ local.tee $5
+ f64.reinterpret_i64
+ local.tee $6
+ local.get $6
+ local.get $3
+ f64.mul
+ f64.add
+ local.tee $2
+ f64.abs
+ f64.const 1
+ f64.lt
+ if (result f64)
+ f64.const 1
+ local.get $2
+ f64.copysign
+ local.tee $10
+ local.get $2
+ f64.add
+ local.tee $12
+ local.get $10
+ local.get $12
+ f64.sub
+ local.get $2
+ f64.add
+ local.get $6
+ local.get $2
+ f64.sub
+ local.get $6
+ local.get $3
+ f64.mul
+ f64.add
+ f64.add
+ f64.add
+ local.get $10
+ f64.sub
+ local.tee $2
+ f64.const 0
+ f64.eq
+ if (result f64)
+ local.get $5
+ i64.const -9223372036854775808
+ i64.and
+ f64.reinterpret_i64
+ else
+ local.get $2
+ end
+ else
+ local.get $2
+ end
+ f64.const 2.2250738585072014e-308
+ f64.mul
+ end
+ br $~lib/util/math/exp_lut|inlined.0
+ end
+ local.get $5
+ f64.reinterpret_i64
+ local.tee $2
+ local.get $2
+ local.get $3
+ f64.mul
+ f64.add
+ end
+ local.set $2
+ local.tee $3
+ local.get $3
+ f64.mul
+ local.get $7
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $8
+ f64.mul
+ f64.add
+ f64.sqrt
+ local.tee $6
+ f64.const 0
+ f64.gt
+ if (result f64)
+ local.get $2
+ local.get $6
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ local.get $6
+ f64.div
+ else
+ f64.const 0
+ end
+ local.set $4
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $8
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ local.get $6
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $~lib/math/NativeMath.atan (param $0 f64) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 f64)
+ local.get $0
+ local.set $1
+ local.get $0
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 2147483647
+ i32.and
+ local.tee $3
+ i32.const 1141899264
+ i32.ge_u
+ if
+ local.get $0
+ local.get $0
+ f64.ne
+ if
+ local.get $0
+ return
+ end
+ f64.const 1.5707963267948966
+ local.get $1
+ f64.copysign
+ return
+ end
+ local.get $3
+ i32.const 1071382528
+ i32.lt_u
+ if
+ local.get $3
+ i32.const 1044381696
+ i32.lt_u
+ if
+ local.get $0
+ return
+ end
+ i32.const -1
+ local.set $4
+ else
+ local.get $0
+ f64.abs
+ local.set $0
+ local.get $3
+ i32.const 1072889856
+ i32.lt_u
+ if (result f64)
+ local.get $3
+ i32.const 1072037888
+ i32.lt_u
+ if (result f64)
+ local.get $0
+ local.get $0
+ f64.add
+ f64.const 1
+ f64.sub
+ local.get $0
+ f64.const 2
+ f64.add
+ f64.div
+ else
+ i32.const 1
+ local.set $4
+ local.get $0
+ f64.const 1
+ f64.sub
+ local.get $0
+ f64.const 1
+ f64.add
+ f64.div
+ end
+ else
+ local.get $3
+ i32.const 1073971200
+ i32.lt_u
+ if (result f64)
+ i32.const 2
+ local.set $4
+ local.get $0
+ f64.const 1.5
+ f64.sub
+ local.get $0
+ f64.const 1.5
+ f64.mul
+ f64.const 1
+ f64.add
+ f64.div
+ else
+ i32.const 3
+ local.set $4
+ f64.const -1
+ local.get $0
+ f64.div
+ end
+ end
+ local.set $0
+ end
+ local.get $0
+ local.get $0
+ f64.mul
+ local.tee $5
+ local.get $5
+ f64.mul
+ local.set $2
+ local.get $0
+ local.get $5
+ local.get $2
+ local.get $2
+ local.get $2
+ local.get $2
+ local.get $2
+ f64.const 0.016285820115365782
+ f64.mul
+ f64.const 0.049768779946159324
+ f64.add
+ f64.mul
+ f64.const 0.06661073137387531
+ f64.add
+ f64.mul
+ f64.const 0.09090887133436507
+ f64.add
+ f64.mul
+ f64.const 0.14285714272503466
+ f64.add
+ f64.mul
+ f64.const 0.3333333333333293
+ f64.add
+ f64.mul
+ local.get $2
+ local.get $2
+ local.get $2
+ local.get $2
+ local.get $2
+ f64.const -0.036531572744216916
+ f64.mul
+ f64.const -0.058335701337905735
+ f64.add
+ f64.mul
+ f64.const -0.0769187620504483
+ f64.add
+ f64.mul
+ f64.const -0.11111110405462356
+ f64.add
+ f64.mul
+ f64.const -0.19999999999876483
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.set $2
+ local.get $4
+ i32.const 0
+ i32.lt_s
+ if
+ local.get $0
+ local.get $2
+ f64.sub
+ return
+ end
+ block $break|0
+ block $case4|0
+ block $case3|0
+ block $case2|0
+ block $case1|0
+ block $case0|0
+ local.get $4
+ br_table $case0|0 $case1|0 $case2|0 $case3|0 $case4|0
+ end
+ f64.const 0.4636476090008061
+ local.get $2
+ f64.const 2.2698777452961687e-17
+ f64.sub
+ local.get $0
+ f64.sub
+ f64.sub
+ local.set $0
+ br $break|0
+ end
+ f64.const 0.7853981633974483
+ local.get $2
+ f64.const 3.061616997868383e-17
+ f64.sub
+ local.get $0
+ f64.sub
+ f64.sub
+ local.set $0
+ br $break|0
+ end
+ f64.const 0.982793723247329
+ local.get $2
+ f64.const 1.3903311031230998e-17
+ f64.sub
+ local.get $0
+ f64.sub
+ f64.sub
+ local.set $0
+ br $break|0
+ end
+ f64.const 1.5707963267948966
+ local.get $2
+ f64.const 6.123233995736766e-17
+ f64.sub
+ local.get $0
+ f64.sub
+ f64.sub
+ local.set $0
+ br $break|0
+ end
+ unreachable
+ end
+ local.get $0
+ local.get $1
+ f64.copysign
+ )
+ (func $~lib/math/NativeMath.log (param $0 f64) (result f64)
+ (local $1 i64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 i32)
+ (local $5 f64)
+ (local $6 i64)
+ (local $7 i32)
+ block $~lib/util/math/log_lut|inlined.0 (result f64)
+ local.get $0
+ i64.reinterpret_f64
+ local.tee $1
+ i64.const 4606619468846596096
+ i64.sub
+ i64.const 854320534781952
+ i64.lt_u
+ if
+ local.get $0
+ f64.const 1
+ f64.sub
+ local.tee $0
+ local.get $0
+ f64.mul
+ local.tee $2
+ local.get $0
+ f64.mul
+ local.tee $3
+ local.get $0
+ f64.const -0.24999999999998432
+ f64.mul
+ f64.const 0.3333333333333352
+ f64.add
+ local.get $2
+ f64.const 0.19999999999320328
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $0
+ f64.const 0.14285715076560868
+ f64.mul
+ f64.const -0.16666666669929706
+ f64.add
+ local.get $2
+ f64.const -0.12499997863982555
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $0
+ f64.const -0.10000486757818193
+ f64.mul
+ f64.const 0.11110712032936046
+ f64.add
+ local.get $2
+ f64.const 0.09181994006195467
+ f64.mul
+ f64.add
+ local.get $3
+ f64.const -0.08328363062289341
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.const 134217728
+ f64.mul
+ local.tee $2
+ f64.add
+ local.get $2
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.const -0.5
+ f64.mul
+ local.tee $3
+ f64.add
+ local.tee $5
+ f64.sub
+ local.get $3
+ f64.add
+ local.get $0
+ local.get $2
+ f64.sub
+ f64.const -0.5
+ f64.mul
+ local.get $2
+ local.get $0
+ f64.add
+ f64.mul
+ f64.add
+ f64.add
+ local.get $5
+ f64.add
+ br $~lib/util/math/log_lut|inlined.0
+ end
+ local.get $1
+ i64.const 48
+ i64.shr_u
+ i32.wrap_i64
+ local.tee $4
+ i32.const 16
+ i32.sub
+ i32.const 32736
+ i32.ge_u
+ if
+ f64.const -1
+ local.get $0
+ local.get $0
+ f64.mul
+ f64.div
+ local.get $1
+ i64.const 1
+ i64.shl
+ i64.eqz
+ br_if $~lib/util/math/log_lut|inlined.0
+ drop
+ local.get $0
+ local.get $1
+ i64.const 9218868437227405312
+ i64.eq
+ br_if $~lib/util/math/log_lut|inlined.0
+ drop
+ local.get $0
+ local.get $0
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.div
+ i32.const 1
+ local.get $4
+ i32.const 32752
+ i32.and
+ i32.const 32752
+ i32.eq
+ local.get $4
+ i32.const 32768
+ i32.and
+ select
+ br_if $~lib/util/math/log_lut|inlined.0
+ drop
+ local.get $0
+ f64.const 4503599627370496
+ f64.mul
+ i64.reinterpret_f64
+ i64.const 234187180623265792
+ i64.sub
+ local.set $1
+ end
+ local.get $1
+ i64.const 4604367669032910848
+ i64.sub
+ local.tee $6
+ i64.const 45
+ i64.shr_u
+ i64.const 127
+ i64.and
+ i32.wrap_i64
+ i32.const 4
+ i32.shl
+ local.tee $7
+ i32.const 9568
+ i32.add
+ local.set $4
+ local.get $1
+ local.get $6
+ i64.const -4503599627370496
+ i64.and
+ i64.sub
+ f64.reinterpret_i64
+ local.get $4
+ f64.load
+ f64.sub
+ local.get $4
+ f64.load offset=8
+ f64.sub
+ local.get $7
+ i32.const 7520
+ i32.add
+ local.tee $4
+ f64.load
+ f64.mul
+ local.set $0
+ local.get $6
+ i64.const 52
+ i64.shr_s
+ f64.convert_i64_s
+ local.tee $3
+ f64.const 0.6931471805598903
+ f64.mul
+ local.get $4
+ f64.load offset=8
+ f64.add
+ local.tee $5
+ local.get $0
+ f64.add
+ local.set $2
+ local.get $5
+ local.get $2
+ f64.sub
+ local.get $0
+ f64.add
+ local.get $3
+ f64.const 5.497923018708371e-14
+ f64.mul
+ f64.add
+ local.get $0
+ local.get $0
+ f64.mul
+ local.tee $3
+ f64.const -0.5000000000000001
+ f64.mul
+ f64.add
+ local.get $0
+ local.get $3
+ f64.mul
+ local.get $0
+ f64.const -0.2499999999622955
+ f64.mul
+ f64.const 0.33333333331825593
+ f64.add
+ local.get $3
+ local.get $0
+ f64.const -0.16667054827627667
+ f64.mul
+ f64.const 0.20000304511814496
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.get $2
+ f64.add
+ end
+ )
+ (func $assembly/quat/ln (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 i64)
+ (local $11 i32)
+ (local $12 i32)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ local.tee $1
+ i32.const 0
+ local.get $7
+ local.get $7
+ local.get $7
+ f64.mul
+ local.get $8
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $9
+ f64.mul
+ f64.add
+ f64.sqrt
+ local.tee $3
+ f64.const 0
+ f64.gt
+ if (result f64)
+ block $__inlined_func$~lib/math/NativeMath.atan2
+ i32.const 1
+ local.get $3
+ local.tee $2
+ local.get $2
+ f64.ne
+ local.get $4
+ local.get $4
+ f64.ne
+ select
+ if
+ local.get $4
+ local.get $2
+ f64.add
+ local.set $2
+ br $__inlined_func$~lib/math/NativeMath.atan2
+ end
+ local.get $2
+ i64.reinterpret_f64
+ local.tee $10
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $11
+ local.get $10
+ i32.wrap_i64
+ local.get $4
+ i64.reinterpret_f64
+ local.tee $10
+ i32.wrap_i64
+ local.tee $12
+ local.get $10
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.tee $5
+ i32.const 1072693248
+ i32.sub
+ i32.or
+ i32.eqz
+ if
+ local.get $2
+ call $~lib/math/NativeMath.atan
+ local.set $2
+ br $__inlined_func$~lib/math/NativeMath.atan2
+ end
+ local.get $5
+ i32.const 30
+ i32.shr_u
+ i32.const 2
+ i32.and
+ local.get $11
+ i32.const 31
+ i32.shr_u
+ i32.or
+ local.set $0
+ local.get $5
+ i32.const 2147483647
+ i32.and
+ local.set $5
+ local.get $11
+ i32.const 2147483647
+ i32.and
+ local.tee $6
+ i32.or
+ i32.eqz
+ if
+ block $break|0
+ block $case3|0
+ block $case2|0
+ local.get $0
+ i32.eqz
+ br_if $__inlined_func$~lib/math/NativeMath.atan2
+ block $tablify|0
+ local.get $0
+ i32.const 1
+ i32.sub
+ br_table $__inlined_func$~lib/math/NativeMath.atan2 $case2|0 $case3|0 $tablify|0
+ end
+ br $break|0
+ end
+ f64.const 3.141592653589793
+ local.set $2
+ br $__inlined_func$~lib/math/NativeMath.atan2
+ end
+ f64.const -3.141592653589793
+ local.set $2
+ br $__inlined_func$~lib/math/NativeMath.atan2
+ end
+ end
+ block $folding-inner0
+ local.get $5
+ local.get $12
+ i32.or
+ i32.eqz
+ br_if $folding-inner0
+ local.get $5
+ i32.const 2146435072
+ i32.eq
+ if
+ local.get $6
+ i32.const 2146435072
+ i32.eq
+ if (result f64)
+ f64.const 2.356194490192345
+ f64.const 0.7853981633974483
+ local.get $0
+ i32.const 2
+ i32.and
+ select
+ else
+ f64.const 3.141592653589793
+ f64.const 0
+ local.get $0
+ i32.const 2
+ i32.and
+ select
+ end
+ local.tee $2
+ f64.neg
+ local.get $2
+ local.get $0
+ i32.const 1
+ i32.and
+ select
+ local.set $2
+ br $__inlined_func$~lib/math/NativeMath.atan2
+ end
+ i32.const 1
+ local.get $6
+ i32.const 2146435072
+ i32.eq
+ local.get $6
+ local.get $5
+ i32.const 67108864
+ i32.add
+ i32.gt_u
+ select
+ br_if $folding-inner0
+ local.get $5
+ local.get $6
+ i32.const 67108864
+ i32.add
+ i32.gt_u
+ i32.const 0
+ local.get $0
+ i32.const 2
+ i32.and
+ select
+ if (result f64)
+ f64.const 0
+ else
+ local.get $2
+ local.get $4
+ f64.div
+ f64.abs
+ call $~lib/math/NativeMath.atan
+ end
+ local.set $2
+ block $break|1
+ block $case3|1
+ block $case2|1
+ block $case1|1
+ local.get $0
+ if
+ local.get $0
+ i32.const 1
+ i32.sub
+ br_table $case1|1 $case2|1 $case3|1 $break|1
+ end
+ br $__inlined_func$~lib/math/NativeMath.atan2
+ end
+ local.get $2
+ f64.neg
+ local.set $2
+ br $__inlined_func$~lib/math/NativeMath.atan2
+ end
+ f64.const 3.141592653589793
+ local.get $2
+ f64.const 1.2246467991473532e-16
+ f64.sub
+ f64.sub
+ local.set $2
+ br $__inlined_func$~lib/math/NativeMath.atan2
+ end
+ local.get $2
+ f64.const 1.2246467991473532e-16
+ f64.sub
+ f64.const 3.141592653589793
+ f64.sub
+ local.set $2
+ br $__inlined_func$~lib/math/NativeMath.atan2
+ end
+ unreachable
+ end
+ f64.const -1.5707963267948966
+ f64.const 1.5707963267948966
+ local.get $0
+ i32.const 1
+ i32.and
+ select
+ local.set $2
+ end
+ local.get $2
+ local.get $3
+ f64.div
+ else
+ f64.const 0
+ end
+ local.tee $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $8
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $9
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 3
+ local.get $7
+ local.get $7
+ f64.mul
+ local.get $8
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/math/NativeMath.log
+ f64.const 0.5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ )
+ (func $assembly/quat2/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ local.set $5
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 0
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $5
+ local.get $9
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $3
+ f64.neg
+ local.get $6
+ f64.mul
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/copy (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/rotateAroundAxis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $3
+ f64.abs
+ f64.const 1e-06
+ f64.lt
+ if
+ local.get $0
+ local.get $1
+ call $assembly/quat2/copy
+ return
+ end
+ block $__inlined_func$assembly/maths/Maths.hypot3 (result f64)
+ f64.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $5
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $6
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $7
+ f64.max
+ f64.max
+ local.tee $4
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot3
+ drop
+ local.get $4
+ local.get $5
+ f64.const 1
+ local.get $4
+ f64.div
+ local.tee $4
+ f64.mul
+ local.tee $5
+ local.get $5
+ f64.mul
+ local.get $6
+ local.get $4
+ f64.mul
+ local.tee $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ local.set $4
+ local.get $3
+ f64.const 0.5
+ f64.mul
+ local.tee $7
+ call $~lib/math/NativeMath.sin
+ local.tee $6
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $4
+ f64.div
+ local.set $3
+ local.get $6
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $4
+ f64.div
+ local.set $5
+ local.get $6
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $4
+ f64.div
+ local.set $4
+ local.get $7
+ call $~lib/math/NativeMath.cos
+ local.set $6
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 0
+ local.get $7
+ local.get $6
+ f64.mul
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $10
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 4
+ local.get $7
+ local.get $6
+ f64.mul
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $10
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64)
+ (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.get $1
+ local.get $0
+ i32.load offset=12
+ i32.ge_u
+ if
+ local.get $1
+ i32.const 0
+ i32.lt_s
+ if
+ i32.const 1120
+ i32.const 12096
+ i32.const 108
+ i32.const 22
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ i32.const 1
+ i32.add
+ local.tee $8
+ local.tee $3
+ local.get $0
+ i32.load offset=8
+ local.tee $5
+ i32.const 3
+ i32.shr_u
+ i32.gt_u
+ if
+ local.get $3
+ i32.const 134217727
+ i32.gt_u
+ if
+ i32.const 1568
+ i32.const 12096
+ i32.const 14
+ i32.const 48
+ call $~lib/builtins/abort
+ unreachable
+ end
+ block $__inlined_func$~lib/rt/itcms/__renew (result i32)
+ local.get $3
+ i32.const 3
+ i32.shl
+ local.tee $6
+ local.tee $3
+ local.get $0
+ i32.load
+ local.tee $9
+ local.tee $7
+ i32.const 20
+ i32.sub
+ local.tee $4
+ i32.load
+ i32.const -4
+ i32.and
+ i32.const 16
+ i32.sub
+ i32.le_u
+ if
+ local.get $4
+ local.get $3
+ i32.store offset=16
+ local.get $7
+ br $__inlined_func$~lib/rt/itcms/__renew
+ end
+ local.get $3
+ local.get $4
+ i32.load offset=12
+ call $~lib/rt/itcms/__new
+ local.tee $10
+ local.get $7
+ local.get $3
+ local.get $4
+ i32.load offset=16
+ local.tee $4
+ local.get $3
+ local.get $4
+ i32.lt_u
+ select
+ call $~lib/memory/memory.copy
+ local.get $10
+ end
+ local.tee $3
+ local.get $5
+ i32.add
+ local.get $6
+ local.get $5
+ i32.sub
+ call $~lib/memory/memory.fill
+ local.get $3
+ local.get $9
+ i32.ne
+ if
+ local.get $0
+ local.get $3
+ i32.store
+ local.get $0
+ local.get $3
+ i32.store offset=4
+ local.get $0
+ local.get $3
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ end
+ local.get $0
+ local.get $6
+ i32.store offset=8
+ end
+ local.get $0
+ local.get $8
+ i32.store offset=12
+ end
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ i32.const 3
+ i32.shl
+ i32.add
+ local.get $2
+ f64.store
+ )
+ (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64)
+ local.get $1
+ local.get $0
+ i32.load offset=12
+ i32.ge_u
+ if
+ i32.const 1120
+ i32.const 12096
+ i32.const 92
+ i32.const 42
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ i32.const 3
+ i32.shl
+ i32.add
+ f64.load
+ )
+ (func $~lib/rt/itcms/__pin (param $0 i32) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ local.get $0
+ if
+ local.get $0
+ i32.const 20
+ i32.sub
+ local.tee $1
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.const 3
+ i32.eq
+ if
+ i32.const 12336
+ i32.const 1744
+ i32.const 337
+ i32.const 7
+ call $~lib/builtins/abort
+ unreachable
+ end
+ block $__inlined_func$~lib/rt/itcms/Object#unlink
+ local.get $1
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.tee $2
+ i32.eqz
+ if
+ local.get $1
+ i32.load offset=8
+ drop
+ br $__inlined_func$~lib/rt/itcms/Object#unlink
+ end
+ local.get $2
+ local.get $1
+ i32.load offset=8
+ local.tee $3
+ i32.store offset=8
+ local.get $3
+ local.get $2
+ local.get $3
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ end
+ global.get $~lib/rt/itcms/pinSpace
+ local.tee $3
+ i32.load offset=8
+ local.set $2
+ local.get $1
+ local.get $3
+ i32.const 3
+ i32.or
+ i32.store offset=4
+ local.get $1
+ local.get $2
+ i32.store offset=8
+ local.get $2
+ local.get $1
+ local.get $2
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ local.get $3
+ local.get $1
+ i32.store offset=8
+ end
+ local.get $0
+ )
+ (func $~lib/rt/itcms/__unpin (param $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ local.get $0
+ i32.eqz
+ if
+ return
+ end
+ local.get $0
+ i32.const 20
+ i32.sub
+ local.tee $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.const 3
+ i32.ne
+ if
+ i32.const 12400
+ i32.const 1744
+ i32.const 351
+ i32.const 5
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/rt/itcms/state
+ i32.const 1
+ i32.eq
+ if
+ local.get $0
+ call $~lib/rt/itcms/Object#makeGray
+ else
+ block $__inlined_func$~lib/rt/itcms/Object#unlink
+ local.get $0
+ i32.load offset=4
+ i32.const -4
+ i32.and
+ local.tee $1
+ i32.eqz
+ if
+ local.get $0
+ i32.load offset=8
+ drop
+ br $__inlined_func$~lib/rt/itcms/Object#unlink
+ end
+ local.get $1
+ local.get $0
+ i32.load offset=8
+ local.tee $2
+ i32.store offset=8
+ local.get $2
+ local.get $1
+ local.get $2
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ end
+ global.get $~lib/rt/itcms/fromSpace
+ local.tee $2
+ i32.load offset=8
+ local.set $1
+ local.get $0
+ local.get $2
+ global.get $~lib/rt/itcms/white
+ i32.or
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $0
+ local.get $1
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ i32.store offset=4
+ local.get $2
+ local.get $0
+ i32.store offset=8
+ end
+ )
+ (func $~lib/rt/itcms/__collect
+ global.get $~lib/rt/itcms/state
+ i32.const 0
+ i32.gt_s
+ if
+ loop $while-continue|0
+ global.get $~lib/rt/itcms/state
+ if
+ call $~lib/rt/itcms/step
+ drop
+ br $while-continue|0
+ end
+ end
+ end
+ call $~lib/rt/itcms/step
+ drop
+ loop $while-continue|1
+ global.get $~lib/rt/itcms/state
+ if
+ call $~lib/rt/itcms/step
+ drop
+ br $while-continue|1
+ end
+ end
+ global.get $~lib/rt/itcms/total
+ i64.extend_i32_u
+ i64.const 200
+ i64.mul
+ i64.const 100
+ i64.div_u
+ i32.wrap_i64
+ i32.const 1024
+ i32.add
+ global.set $~lib/rt/itcms/threshold
+ )
+ (func $~lib/rt/__visit_members (param $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ block $folding-inner4
+ block $folding-inner3
+ block $folding-inner2
+ block $folding-inner1
+ block $invalid
+ block $assembly/mat4/Fov
+ block $assembly/imports/IArguments
+ block $~lib/string/String
+ block $~lib/arraybuffer/ArrayBuffer
+ local.get $0
+ i32.const 8
+ i32.sub
+ i32.load
+ br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner4 $folding-inner1 $folding-inner1 $folding-inner2 $folding-inner1 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner2 $folding-inner1 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $assembly/imports/IArguments $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner3 $folding-inner2 $assembly/mat4/Fov $invalid
+ end
+ return
+ end
+ return
+ end
+ return
+ end
+ return
+ end
+ unreachable
+ end
+ local.get $0
+ i32.load
+ call $~lib/rt/itcms/__visit
+ return
+ end
+ local.get $0
+ i32.load offset=4
+ local.tee $1
+ local.get $0
+ i32.load offset=12
+ i32.const 2
+ i32.shl
+ i32.add
+ local.set $2
+ loop $while-continue|0
+ local.get $1
+ local.get $2
+ i32.lt_u
+ if
+ local.get $1
+ i32.load
+ local.tee $3
+ if
+ local.get $3
+ call $~lib/rt/itcms/__visit
+ end
+ local.get $1
+ i32.const 4
+ i32.add
+ local.set $1
+ br $while-continue|0
+ end
+ end
+ local.get $0
+ i32.load
+ call $~lib/rt/itcms/__visit
+ return
+ end
+ local.get $0
+ i32.load offset=4
+ call $~lib/rt/itcms/__visit
+ return
+ end
+ local.get $0
+ i32.load
+ local.tee $0
+ if
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ )
+ (func $~setArgumentsLength (param $0 i32)
+ local.get $0
+ global.set $~argumentsLength
+ )
+ (func $~start
+ i32.const 10
+ global.set $assembly/common/ARRAY_TYPE
+ memory.size
+ i32.const 16
+ i32.shl
+ i32.const 29196
+ i32.sub
+ i32.const 1
+ i32.shr_u
+ global.set $~lib/rt/itcms/threshold
+ i32.const 1796
+ i32.const 1792
+ i32.store
+ i32.const 1800
+ i32.const 1792
+ i32.store
+ i32.const 1792
+ global.set $~lib/rt/itcms/pinSpace
+ i32.const 1828
+ i32.const 1824
+ i32.store
+ i32.const 1832
+ i32.const 1824
+ i32.store
+ i32.const 1824
+ global.set $~lib/rt/itcms/toSpace
+ i32.const 1908
+ i32.const 1904
+ i32.store
+ i32.const 1912
+ i32.const 1904
+ i32.store
+ i32.const 1904
+ global.set $~lib/rt/itcms/fromSpace
+ call $assembly/vec3/create
+ global.set $assembly/vec3/vec
+ i32.const 0
+ global.set $~argumentsLength
+ i32.const 2048
+ i32.load
+ call_indirect $0 (type $none_=>_i32)
+ global.set $assembly/vec3/forEach
+ call $assembly/vec4/create
+ global.set $assembly/vec4/vec
+ i32.const 0
+ global.set $~argumentsLength
+ i32.const 2336
+ i32.load
+ call_indirect $0 (type $none_=>_i32)
+ global.set $assembly/vec4/forEach
+ call $assembly/vec3/create
+ global.set $assembly/quat/tmpvec3
+ f64.const 1
+ f64.const 0
+ f64.const 0
+ call $assembly/vec3/fromValues
+ global.set $assembly/quat/xUnitVec3
+ f64.const 0
+ f64.const 1
+ f64.const 0
+ call $assembly/vec3/fromValues
+ global.set $assembly/quat/yUnitVec3
+ i32.const 0
+ global.set $~argumentsLength
+ i32.const 2960
+ i32.load
+ call_indirect $0 (type $none_=>_i32)
+ global.set $assembly/quat/rotationTo
+ call $assembly/quat/create
+ global.set $assembly/quat/temp1
+ call $assembly/quat/create
+ global.set $assembly/quat/temp2
+ i32.const 0
+ global.set $~argumentsLength
+ i32.const 3024
+ i32.load
+ call_indirect $0 (type $none_=>_i32)
+ global.set $assembly/quat/sqlerp
+ call $assembly/mat3/create
+ global.set $assembly/quat/matr
+ i32.const 0
+ global.set $~argumentsLength
+ i32.const 3088
+ i32.load
+ call_indirect $0 (type $none_=>_i32)
+ global.set $assembly/quat/setAxes
+ call $assembly/vec2/create
+ global.set $assembly/vec2/vec
+ i32.const 0
+ global.set $~argumentsLength
+ i32.const 3632
+ i32.load
+ call_indirect $0 (type $none_=>_i32)
+ global.set $assembly/vec2/forEach
+ )
+ (func $start:assembly/vec3~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32)
+ (local $6 i32)
+ (local $7 i32)
+ (local $8 i32)
+ (local $9 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ local.get $1
+ i32.const 3
+ local.get $1
+ select
+ local.set $6
+ local.get $2
+ i32.const 0
+ local.get $2
+ select
+ local.set $2
+ local.get $3
+ if (result i32)
+ local.get $2
+ local.get $3
+ local.get $6
+ i32.mul
+ i32.add
+ f64.convert_i32_s
+ local.get $0
+ i32.load offset=8
+ i32.const 3
+ i32.shr_u
+ f64.convert_i32_s
+ f64.min
+ i32.trunc_f64_s
+ else
+ local.get $0
+ i32.load offset=8
+ i32.const 3
+ i32.shr_u
+ end
+ local.set $1
+ loop $for-loop|0
+ local.get $1
+ local.get $2
+ i32.gt_s
+ if
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec3/vec
+ local.tee $3
+ i32.store
+ local.get $3
+ i32.const 0
+ local.get $0
+ local.get $2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec3/vec
+ local.tee $3
+ i32.store
+ local.get $3
+ i32.const 1
+ local.get $0
+ local.get $2
+ i32.const 1
+ i32.add
+ local.tee $7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec3/vec
+ local.tee $3
+ i32.store
+ local.get $3
+ i32.const 2
+ local.get $0
+ local.get $2
+ i32.const 2
+ i32.add
+ local.tee $8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ local.tee $9
+ global.get $assembly/vec3/vec
+ local.tee $3
+ i32.store
+ local.get $9
+ local.get $3
+ i32.store offset=4
+ i32.const 3
+ global.set $~argumentsLength
+ local.get $3
+ local.get $3
+ local.get $5
+ local.get $4
+ i32.load
+ call_indirect $0 (type $i32_i32_i32_=>_none)
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec3/vec
+ local.tee $3
+ i32.store
+ local.get $0
+ local.get $2
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec3/vec
+ local.tee $3
+ i32.store
+ local.get $0
+ local.get $7
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec3/vec
+ local.tee $3
+ i32.store
+ local.get $0
+ local.get $8
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ local.get $6
+ i32.add
+ local.set $2
+ br $for-loop|0
+ end
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $start:assembly/vec4~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32)
+ (local $6 i32)
+ (local $7 i32)
+ (local $8 i32)
+ (local $9 i32)
+ (local $10 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ local.get $1
+ i32.const 4
+ local.get $1
+ select
+ local.set $6
+ local.get $2
+ i32.const 0
+ local.get $2
+ select
+ local.set $2
+ local.get $3
+ if (result i32)
+ local.get $2
+ local.get $3
+ local.get $6
+ i32.mul
+ i32.add
+ f64.convert_i32_s
+ local.get $0
+ i32.load offset=8
+ i32.const 3
+ i32.shr_u
+ f64.convert_i32_s
+ f64.min
+ i32.trunc_f64_s
+ else
+ local.get $0
+ i32.load offset=8
+ i32.const 3
+ i32.shr_u
+ end
+ local.set $1
+ loop $for-loop|0
+ local.get $1
+ local.get $2
+ i32.gt_s
+ if
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec4/vec
+ local.tee $3
+ i32.store
+ local.get $3
+ i32.const 0
+ local.get $0
+ local.get $2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec4/vec
+ local.tee $3
+ i32.store
+ local.get $3
+ i32.const 1
+ local.get $0
+ local.get $2
+ i32.const 1
+ i32.add
+ local.tee $7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec4/vec
+ local.tee $3
+ i32.store
+ local.get $3
+ i32.const 2
+ local.get $0
+ local.get $2
+ i32.const 2
+ i32.add
+ local.tee $8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec4/vec
+ local.tee $3
+ i32.store
+ local.get $3
+ i32.const 3
+ local.get $0
+ local.get $2
+ i32.const 3
+ i32.add
+ local.tee $9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ local.tee $10
+ global.get $assembly/vec4/vec
+ local.tee $3
+ i32.store
+ local.get $10
+ local.get $3
+ i32.store offset=4
+ i32.const 3
+ global.set $~argumentsLength
+ local.get $3
+ local.get $3
+ local.get $5
+ local.get $4
+ i32.load
+ call_indirect $0 (type $i32_i32_i32_=>_none)
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec4/vec
+ local.tee $3
+ i32.store
+ local.get $0
+ local.get $2
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec4/vec
+ local.tee $3
+ i32.store
+ local.get $0
+ local.get $7
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec4/vec
+ local.tee $3
+ i32.store
+ local.get $0
+ local.get $8
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec4/vec
+ local.tee $3
+ i32.store
+ local.get $0
+ local.get $9
+ local.get $3
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ local.get $6
+ i32.add
+ local.set $2
+ br $for-loop|0
+ end
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $start:assembly/quat~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ (local $4 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ local.get $1
+ local.get $2
+ call $assembly/vec3/dot
+ local.tee $4
+ f64.const -0.999999
+ f64.lt
+ if
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ global.get $assembly/quat/tmpvec3
+ local.tee $3
+ i32.store
+ local.get $2
+ global.get $assembly/quat/xUnitVec3
+ local.tee $2
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ local.get $1
+ call $assembly/vec3/cross
+ drop
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/tmpvec3
+ local.tee $2
+ i32.store
+ i32.const 1
+ global.set $~argumentsLength
+ local.get $2
+ i32.const 1504
+ i32.load
+ call_indirect $0 (type $i32_=>_f64)
+ f64.const 1e-06
+ f64.lt
+ if
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ global.get $assembly/quat/tmpvec3
+ local.tee $3
+ i32.store
+ local.get $2
+ global.get $assembly/quat/yUnitVec3
+ local.tee $2
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ local.get $1
+ call $assembly/vec3/cross
+ drop
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ global.get $assembly/quat/tmpvec3
+ local.tee $1
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ local.get $1
+ call $assembly/vec3/normalize
+ drop
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/tmpvec3
+ local.tee $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ f64.const 3.141592653589793
+ call $assembly/quat/setAxisAngle
+ drop
+ else
+ local.get $4
+ f64.const 0.999999
+ f64.gt
+ if
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ else
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/tmpvec3
+ local.tee $3
+ i32.store
+ local.get $3
+ local.get $1
+ local.get $2
+ call $assembly/vec3/cross
+ drop
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/tmpvec3
+ local.tee $1
+ i32.store
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/tmpvec3
+ local.tee $1
+ i32.store
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/tmpvec3
+ local.tee $1
+ i32.store
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ f64.const 1
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ i32.const 2
+ global.set $~argumentsLength
+ local.get $0
+ local.get $0
+ i32.const 2656
+ i32.load
+ call_indirect $0 (type $i32_i32_=>_i32)
+ local.set $0
+ end
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $start:assembly/quat~anonymous|1~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32)
+ (local $6 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $6
+ i64.const 0
+ i64.store
+ local.get $6
+ i32.const 0
+ i32.store offset=8
+ local.get $6
+ global.get $assembly/quat/temp1
+ local.tee $6
+ i32.store
+ local.get $6
+ local.get $1
+ local.get $4
+ local.get $5
+ call $assembly/quat/slerp
+ drop
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/temp2
+ local.tee $1
+ i32.store
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $5
+ call $assembly/quat/slerp
+ drop
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ global.get $assembly/quat/temp1
+ local.tee $2
+ i32.store offset=4
+ local.get $1
+ global.get $assembly/quat/temp2
+ local.tee $1
+ i32.store offset=8
+ local.get $0
+ local.get $2
+ local.get $1
+ local.get $5
+ local.get $5
+ f64.add
+ f64.const 1
+ local.get $5
+ f64.sub
+ f64.mul
+ call $assembly/quat/slerp
+ drop
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $start:assembly/quat~anonymous|2~anonymous|0 (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 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ i64.const 0
+ i64.store
+ local.get $4
+ i32.const 0
+ i32.store offset=8
+ local.get $4
+ global.get $assembly/quat/matr
+ local.tee $4
+ i32.store
+ local.get $4
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/matr
+ local.tee $4
+ i32.store
+ local.get $4
+ i32.const 3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/matr
+ local.tee $4
+ i32.store
+ local.get $4
+ i32.const 6
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/matr
+ local.tee $2
+ i32.store
+ local.get $2
+ i32.const 1
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/matr
+ local.tee $2
+ i32.store
+ local.get $2
+ i32.const 4
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/matr
+ local.tee $2
+ i32.store
+ local.get $2
+ i32.const 7
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/matr
+ local.tee $2
+ i32.store
+ local.get $2
+ i32.const 2
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/matr
+ local.tee $2
+ i32.store
+ local.get $2
+ i32.const 5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/matr
+ local.tee $2
+ i32.store
+ local.get $2
+ i32.const 8
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/quat/matr
+ local.tee $1
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ call $assembly/quat/fromMat3
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ i32.const 2
+ global.set $~argumentsLength
+ local.get $0
+ local.get $1
+ i32.const 2656
+ i32.load
+ call_indirect $0 (type $i32_i32_=>_i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $start:assembly/vec2~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ local.get $1
+ i32.const 2
+ local.get $1
+ select
+ local.set $6
+ local.get $2
+ i32.const 0
+ local.get $2
+ select
+ local.set $2
+ local.get $3
+ if (result i32)
+ local.get $2
+ local.get $3
+ local.get $6
+ i32.mul
+ i32.add
+ f64.convert_i32_s
+ local.get $0
+ i32.load offset=8
+ i32.const 3
+ i32.shr_u
+ f64.convert_i32_s
+ f64.min
+ i32.trunc_f64_s
+ else
+ local.get $0
+ i32.load offset=8
+ i32.const 3
+ i32.shr_u
+ end
+ local.set $1
+ loop $for-loop|0
+ local.get $1
+ local.get $2
+ i32.gt_s
+ if
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec2/vec
+ local.tee $3
+ i32.store
+ local.get $3
+ i32.const 0
+ local.get $0
+ local.get $2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec2/vec
+ local.tee $3
+ i32.store
+ local.get $3
+ i32.const 1
+ local.get $0
+ local.get $2
+ i32.const 1
+ i32.add
+ local.tee $7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ local.tee $8
+ global.get $assembly/vec2/vec
+ local.tee $3
+ i32.store
+ local.get $8
+ local.get $3
+ i32.store offset=4
+ i32.const 3
+ global.set $~argumentsLength
+ local.get $3
+ local.get $3
+ local.get $5
+ local.get $4
+ i32.load
+ call_indirect $0 (type $i32_i32_i32_=>_none)
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec2/vec
+ local.tee $3
+ i32.store
+ local.get $0
+ local.get $2
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/vec2/vec
+ local.tee $3
+ i32.store
+ local.get $0
+ local.get $7
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ local.get $6
+ i32.add
+ local.set $2
+ br $for-loop|0
+ end
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $assembly/mat2d/str (param $0 i32) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 96
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i64.const 0
+ i64.store
+ local.get $1
+ i64.const 0
+ i64.store offset=8
+ local.get $1
+ i64.const 0
+ i64.store offset=16
+ local.get $1
+ i64.const 0
+ i64.store offset=24
+ local.get $1
+ i64.const 0
+ i64.store offset=32
+ local.get $1
+ i64.const 0
+ i64.store offset=40
+ local.get $1
+ i64.const 0
+ i64.store offset=48
+ local.get $1
+ i64.const 0
+ i64.store offset=56
+ local.get $1
+ i64.const 0
+ i64.store offset=64
+ local.get $1
+ i64.const 0
+ i64.store offset=72
+ local.get $1
+ i64.const 0
+ i64.store offset=80
+ local.get $1
+ i64.const 0
+ i64.store offset=88
+ local.get $1
+ i32.const 5392
+ i32.store offset=88
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=92
+ i32.const 5392
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=80
+ local.get $2
+ i32.const 5328
+ i32.store offset=84
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=72
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=76
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=64
+ local.get $2
+ i32.const 5328
+ i32.store offset=68
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=56
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=60
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=48
+ local.get $2
+ i32.const 5328
+ i32.store offset=52
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=44
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=32
+ local.get $2
+ i32.const 5328
+ i32.store offset=36
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=28
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=16
+ local.get $2
+ i32.const 5328
+ i32.store offset=20
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=12
+ local.get $1
+ local.get $0
+ call $~lib/string/String.__concat
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 5360
+ i32.store offset=4
+ local.get $0
+ i32.const 5360
+ call $~lib/string/String.__concat
+ global.get $~lib/memory/__stack_pointer
+ i32.const 96
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $assembly/mat3/str (param $0 i32) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 144
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i64.const 0
+ i64.store
+ local.get $1
+ i64.const 0
+ i64.store offset=8
+ local.get $1
+ i64.const 0
+ i64.store offset=16
+ local.get $1
+ i64.const 0
+ i64.store offset=24
+ local.get $1
+ i64.const 0
+ i64.store offset=32
+ local.get $1
+ i64.const 0
+ i64.store offset=40
+ local.get $1
+ i64.const 0
+ i64.store offset=48
+ local.get $1
+ i64.const 0
+ i64.store offset=56
+ local.get $1
+ i64.const 0
+ i64.store offset=64
+ local.get $1
+ i64.const 0
+ i64.store offset=72
+ local.get $1
+ i64.const 0
+ i64.store offset=80
+ local.get $1
+ i64.const 0
+ i64.store offset=88
+ local.get $1
+ i64.const 0
+ i64.store offset=96
+ local.get $1
+ i64.const 0
+ i64.store offset=104
+ local.get $1
+ i64.const 0
+ i64.store offset=112
+ local.get $1
+ i64.const 0
+ i64.store offset=120
+ local.get $1
+ i64.const 0
+ i64.store offset=128
+ local.get $1
+ i64.const 0
+ i64.store offset=136
+ local.get $1
+ i32.const 5424
+ i32.store offset=136
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=140
+ i32.const 5424
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=128
+ local.get $2
+ i32.const 5328
+ i32.store offset=132
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=120
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=124
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=112
+ local.get $2
+ i32.const 5328
+ i32.store offset=116
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=104
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=108
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=96
+ local.get $2
+ i32.const 5328
+ i32.store offset=100
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=88
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=92
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=80
+ local.get $2
+ i32.const 5328
+ i32.store offset=84
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=72
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=76
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=64
+ local.get $2
+ i32.const 5328
+ i32.store offset=68
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=56
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=60
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=48
+ local.get $2
+ i32.const 5328
+ i32.store offset=52
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=44
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=32
+ local.get $2
+ i32.const 5328
+ i32.store offset=36
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=28
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=16
+ local.get $2
+ i32.const 5328
+ i32.store offset=20
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=12
+ local.get $1
+ local.get $0
+ call $~lib/string/String.__concat
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 5360
+ i32.store offset=4
+ local.get $0
+ i32.const 5360
+ call $~lib/string/String.__concat
+ global.get $~lib/memory/__stack_pointer
+ i32.const 144
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $assembly/mat4/str (param $0 i32) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 256
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i64.const 0
+ i64.store
+ local.get $1
+ i64.const 0
+ i64.store offset=8
+ local.get $1
+ i64.const 0
+ i64.store offset=16
+ local.get $1
+ i64.const 0
+ i64.store offset=24
+ local.get $1
+ i64.const 0
+ i64.store offset=32
+ local.get $1
+ i64.const 0
+ i64.store offset=40
+ local.get $1
+ i64.const 0
+ i64.store offset=48
+ local.get $1
+ i64.const 0
+ i64.store offset=56
+ local.get $1
+ i64.const 0
+ i64.store offset=64
+ local.get $1
+ i64.const 0
+ i64.store offset=72
+ local.get $1
+ i64.const 0
+ i64.store offset=80
+ local.get $1
+ i64.const 0
+ i64.store offset=88
+ local.get $1
+ i64.const 0
+ i64.store offset=96
+ local.get $1
+ i64.const 0
+ i64.store offset=104
+ local.get $1
+ i64.const 0
+ i64.store offset=112
+ local.get $1
+ i64.const 0
+ i64.store offset=120
+ local.get $1
+ i64.const 0
+ i64.store offset=128
+ local.get $1
+ i64.const 0
+ i64.store offset=136
+ local.get $1
+ i64.const 0
+ i64.store offset=144
+ local.get $1
+ i64.const 0
+ i64.store offset=152
+ local.get $1
+ i64.const 0
+ i64.store offset=160
+ local.get $1
+ i64.const 0
+ i64.store offset=168
+ local.get $1
+ i64.const 0
+ i64.store offset=176
+ local.get $1
+ i64.const 0
+ i64.store offset=184
+ local.get $1
+ i64.const 0
+ i64.store offset=192
+ local.get $1
+ i64.const 0
+ i64.store offset=200
+ local.get $1
+ i64.const 0
+ i64.store offset=208
+ local.get $1
+ i64.const 0
+ i64.store offset=216
+ local.get $1
+ i64.const 0
+ i64.store offset=224
+ local.get $1
+ i64.const 0
+ i64.store offset=232
+ local.get $1
+ i64.const 0
+ i64.store offset=240
+ local.get $1
+ i64.const 0
+ i64.store offset=248
+ local.get $1
+ i32.const 5456
+ i32.store offset=248
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=252
+ i32.const 5456
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=240
+ local.get $2
+ i32.const 5328
+ i32.store offset=244
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=232
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=236
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=224
+ local.get $2
+ i32.const 5328
+ i32.store offset=228
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=216
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=220
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=208
+ local.get $2
+ i32.const 5328
+ i32.store offset=212
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=200
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=204
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=192
+ local.get $2
+ i32.const 5328
+ i32.store offset=196
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=184
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=188
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=176
+ local.get $2
+ i32.const 5328
+ i32.store offset=180
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=168
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=172
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=160
+ local.get $2
+ i32.const 5328
+ i32.store offset=164
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=152
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=156
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=144
+ local.get $2
+ i32.const 5328
+ i32.store offset=148
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=136
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=140
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=128
+ local.get $2
+ i32.const 5328
+ i32.store offset=132
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=120
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=124
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=112
+ local.get $2
+ i32.const 5328
+ i32.store offset=116
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=104
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=108
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=96
+ local.get $2
+ i32.const 5328
+ i32.store offset=100
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=88
+ local.get $0
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=92
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=80
+ local.get $2
+ i32.const 5328
+ i32.store offset=84
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=72
+ local.get $0
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=76
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=64
+ local.get $2
+ i32.const 5328
+ i32.store offset=68
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=56
+ local.get $0
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=60
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=48
+ local.get $2
+ i32.const 5328
+ i32.store offset=52
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $0
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=44
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=32
+ local.get $2
+ i32.const 5328
+ i32.store offset=36
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $0
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=28
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=16
+ local.get $2
+ i32.const 5328
+ i32.store offset=20
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $0
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=12
+ local.get $1
+ local.get $0
+ call $~lib/string/String.__concat
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 5360
+ i32.store offset=4
+ local.get $0
+ i32.const 5360
+ call $~lib/string/String.__concat
+ global.get $~lib/memory/__stack_pointer
+ i32.const 256
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $assembly/quat/fromEuler (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ local.get $1
+ f64.const 0.008726646259971648
+ f64.mul
+ local.tee $1
+ call $~lib/math/NativeMath.sin
+ local.set $5
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.set $6
+ local.get $2
+ f64.const 0.008726646259971648
+ f64.mul
+ local.tee $1
+ call $~lib/math/NativeMath.sin
+ local.set $7
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.set $8
+ local.get $3
+ f64.const 0.008726646259971648
+ f64.mul
+ local.tee $2
+ call $~lib/math/NativeMath.sin
+ local.set $1
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $2
+ local.get $4
+ i32.const 11648
+ i32.eq
+ if
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $8
+ f64.mul
+ local.tee $3
+ local.get $2
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ local.tee $9
+ local.get $1
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $9
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $1
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $8
+ f64.mul
+ local.tee $3
+ local.get $1
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ local.tee $5
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ local.get $2
+ f64.mul
+ local.get $5
+ local.get $1
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $4
+ i32.const 11680
+ i32.eq
+ if
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $8
+ f64.mul
+ local.tee $3
+ local.get $2
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ local.tee $9
+ local.get $1
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $9
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $1
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $8
+ f64.mul
+ local.tee $3
+ local.get $1
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ local.tee $5
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ local.get $2
+ f64.mul
+ local.get $5
+ local.get $1
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $4
+ i32.const 11712
+ i32.eq
+ if
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $8
+ f64.mul
+ local.tee $3
+ local.get $2
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ local.tee $9
+ local.get $1
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $9
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $1
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $8
+ f64.mul
+ local.tee $3
+ local.get $1
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ local.tee $5
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ local.get $2
+ f64.mul
+ local.get $5
+ local.get $1
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $4
+ i32.const 11744
+ i32.eq
+ if
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $8
+ f64.mul
+ local.tee $3
+ local.get $2
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ local.tee $9
+ local.get $1
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $9
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $1
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $8
+ f64.mul
+ local.tee $3
+ local.get $1
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ local.tee $5
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ local.get $2
+ f64.mul
+ local.get $5
+ local.get $1
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $4
+ i32.const 11776
+ i32.eq
+ if
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $8
+ f64.mul
+ local.tee $3
+ local.get $2
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ local.tee $9
+ local.get $1
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $9
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $1
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $8
+ f64.mul
+ local.tee $3
+ local.get $1
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ local.tee $5
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ local.get $2
+ f64.mul
+ local.get $5
+ local.get $1
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $4
+ i32.const 1088
+ i32.eq
+ if
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $8
+ f64.mul
+ local.tee $3
+ local.get $2
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ local.tee $9
+ local.get $1
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $9
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $1
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $8
+ f64.mul
+ local.tee $3
+ local.get $1
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ local.tee $5
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ local.get $2
+ f64.mul
+ local.get $5
+ local.get $1
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ else
+ global.get $~lib/memory/__stack_pointer
+ i32.const 11808
+ i32.store
+ i32.const 11808
+ local.get $4
+ call $~lib/string/String.__concat
+ i32.const 11872
+ i32.const 512
+ i32.const 10
+ call $~lib/builtins/abort
+ unreachable
+ end
+ end
+ end
+ end
+ end
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $assembly/quat2/str (param $0 i32) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 128
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i64.const 0
+ i64.store
+ local.get $1
+ i64.const 0
+ i64.store offset=8
+ local.get $1
+ i64.const 0
+ i64.store offset=16
+ local.get $1
+ i64.const 0
+ i64.store offset=24
+ local.get $1
+ i64.const 0
+ i64.store offset=32
+ local.get $1
+ i64.const 0
+ i64.store offset=40
+ local.get $1
+ i64.const 0
+ i64.store offset=48
+ local.get $1
+ i64.const 0
+ i64.store offset=56
+ local.get $1
+ i64.const 0
+ i64.store offset=64
+ local.get $1
+ i64.const 0
+ i64.store offset=72
+ local.get $1
+ i64.const 0
+ i64.store offset=80
+ local.get $1
+ i64.const 0
+ i64.store offset=88
+ local.get $1
+ i64.const 0
+ i64.store offset=96
+ local.get $1
+ i64.const 0
+ i64.store offset=104
+ local.get $1
+ i64.const 0
+ i64.store offset=112
+ local.get $1
+ i64.const 0
+ i64.store offset=120
+ local.get $1
+ i32.const 11968
+ i32.store offset=120
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=124
+ i32.const 11968
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=112
+ local.get $2
+ i32.const 5328
+ i32.store offset=116
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=104
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=108
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=96
+ local.get $2
+ i32.const 5328
+ i32.store offset=100
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=88
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=92
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=80
+ local.get $2
+ i32.const 5328
+ i32.store offset=84
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=72
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=76
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=64
+ local.get $2
+ i32.const 5328
+ i32.store offset=68
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=56
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=60
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=48
+ local.get $2
+ i32.const 5328
+ i32.store offset=52
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=44
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=32
+ local.get $2
+ i32.const 5328
+ i32.store offset=36
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=28
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=16
+ local.get $2
+ i32.const 5328
+ i32.store offset=20
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=12
+ local.get $1
+ local.get $0
+ call $~lib/string/String.__concat
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 5360
+ i32.store offset=4
+ local.get $0
+ i32.const 5360
+ call $~lib/string/String.__concat
+ global.get $~lib/memory/__stack_pointer
+ i32.const 128
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $~lib/typedarray/Float64Array#constructor (param $0 i32) (result i32)
+ (local $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
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 12
+ i32.const 10
+ call $~lib/rt/itcms/__new
+ local.tee $1
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ local.get $1
+ i32.eqz
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.const 2
+ call $~lib/rt/itcms/__new
+ local.tee $1
+ i32.store
+ end
+ local.get $1
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 0
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ local.get $1
+ i32.const 0
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ i32.store offset=8
+ local.get $0
+ i32.const 134217727
+ i32.gt_u
+ if
+ i32.const 1568
+ i32.const 1616
+ i32.const 18
+ i32.const 57
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.const 3
+ i32.shl
+ local.tee $0
+ i32.const 0
+ call $~lib/rt/itcms/__new
+ local.tee $2
+ i32.store offset=4
+ local.get $2
+ local.get $0
+ call $~lib/memory/memory.fill
+ local.get $1
+ local.get $2
+ i32.store
+ local.get $1
+ local.get $2
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ local.get $1
+ local.get $2
+ i32.store offset=4
+ local.get $1
+ local.get $0
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ local.get $1
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $assembly/vec3/create (result i32)
+ (local $0 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $0
+ i32.const 0
+ i32.store
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ i32.const 10
+ i32.ne
+ if
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $assembly/vec4/create (result i32)
+ (local $0 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $0
+ i32.const 0
+ i32.store
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ i32.const 10
+ i32.ne
+ if
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $assembly/vec4/clone (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $assembly/vec4/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32)
+ (local $4 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ i32.const 0
+ i32.store
+ local.get $4
+ i32.const 4
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $4
+ i32.store
+ local.get $4
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $assembly/vec3/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ i32.const 0
+ i32.store
+ local.get $3
+ i32.const 3
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $3
+ i32.store
+ local.get $3
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $3
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $3
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $assembly/quat/create (result i32)
+ (local $0 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $0
+ i32.const 0
+ i32.store
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ i32.const 10
+ i32.ne
+ if
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $assembly/mat3/create (result i32)
+ (local $0 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $0
+ i32.const 0
+ i32.store
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ i32.const 10
+ i32.ne
+ if
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $assembly/vec2/create (result i32)
+ (local $0 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $0
+ i32.const 0
+ i32.store
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ i32.const 10
+ i32.ne
+ if
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $assembly/mat2/create (result i32)
+ (local $0 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $0
+ i32.const 0
+ i32.store
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ i32.const 10
+ i32.ne
+ if
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $~lib/rt/__newArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $5
+ i32.const 0
+ i32.store
+ local.get $0
+ local.get $1
+ i32.shl
+ local.tee $4
+ local.set $6
+ local.get $4
+ i32.const 0
+ call $~lib/rt/itcms/__new
+ local.set $1
+ local.get $3
+ if
+ local.get $1
+ local.get $3
+ local.get $6
+ call $~lib/memory/memory.copy
+ end
+ local.get $5
+ local.get $1
+ i32.store
+ i32.const 16
+ local.get $2
+ call $~lib/rt/itcms/__new
+ local.tee $2
+ local.get $1
+ i32.store
+ local.get $2
+ local.get $1
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $2
+ local.get $4
+ i32.store offset=8
+ local.get $2
+ local.get $0
+ i32.store offset=12
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $assembly/mat2d/create (result i32)
+ (local $0 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $0
+ i32.const 0
+ i32.store
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ i32.const 10
+ i32.ne
+ if
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $assembly/mat2d/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (result i32)
+ (local $6 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $6
+ i32.const 0
+ i32.store
+ local.get $6
+ i32.const 6
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $6
+ i32.store
+ local.get $6
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ i32.const 4
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ i32.const 5
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $6
+ )
+ (func $assembly/mat3/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32)
+ (local $9 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $9
+ i32.const 0
+ i32.store
+ local.get $9
+ i32.const 9
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $9
+ i32.store
+ local.get $9
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 4
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 5
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 6
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 7
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 8
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $9
+ )
+ (func $assembly/mat4/create (result i32)
+ (local $0 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $0
+ i32.const 0
+ i32.store
+ local.get $0
+ i32.const 16
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ i32.const 10
+ i32.ne
+ if
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $assembly/mat4/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (result i32)
+ (local $16 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $16
+ i32.const 0
+ i32.store
+ local.get $16
+ i32.const 16
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $16
+ i32.store
+ local.get $16
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 4
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 5
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 6
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 7
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 8
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 9
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 10
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 11
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 12
+ local.get $12
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 13
+ local.get $13
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 14
+ local.get $14
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 15
+ local.get $15
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $16
+ )
+ (func $assembly/mat4/fromQuat2 (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ i32.const 0
+ i32.store
+ local.get $3
+ i32.const 3
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $3
+ i32.store
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $6
+ f64.mul
+ f64.add
+ local.tee $7
+ f64.const 0
+ f64.gt
+ if
+ local.get $3
+ i32.const 0
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $11
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.sub
+ local.tee $12
+ local.get $12
+ f64.add
+ local.get $7
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $3
+ i32.const 1
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $11
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.sub
+ local.tee $12
+ local.get $12
+ f64.add
+ local.get $7
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $3
+ i32.const 2
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $11
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $2
+ f64.mul
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.add
+ local.get $7
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $3
+ i32.const 0
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $11
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.sub
+ local.tee $7
+ local.get $7
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $3
+ i32.const 1
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $11
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.sub
+ local.tee $7
+ local.get $7
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $3
+ i32.const 2
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $11
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $2
+ f64.mul
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ local.get $1
+ local.get $3
+ call $assembly/mat4/fromRotationTranslation
+ drop
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $assembly/mat4/getRotation (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 i32)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $5
+ i32.const 0
+ i32.store
+ local.get $5
+ i32.const 3
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $5
+ i32.store
+ local.get $5
+ local.get $1
+ call $assembly/mat4/getScaling
+ drop
+ f64.const 1
+ local.get $5
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ local.set $3
+ f64.const 1
+ local.get $5
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ local.set $4
+ f64.const 1
+ local.get $5
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ local.set $7
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.set $8
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $7
+ f64.mul
+ local.set $9
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.set $10
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.set $6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $7
+ f64.mul
+ local.set $11
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.set $12
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.set $4
+ local.get $2
+ local.get $6
+ f64.add
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $7
+ f64.mul
+ local.tee $3
+ f64.add
+ local.tee $7
+ f64.const 0
+ f64.gt
+ if
+ local.get $0
+ i32.const 3
+ local.get $7
+ f64.const 1
+ f64.add
+ f64.sqrt
+ local.tee $2
+ local.get $2
+ f64.add
+ local.tee $2
+ f64.const 0.25
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $11
+ local.get $4
+ f64.sub
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $12
+ local.get $9
+ f64.sub
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $8
+ local.get $10
+ f64.sub
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $2
+ local.get $3
+ f64.gt
+ i32.const 0
+ local.get $2
+ local.get $6
+ f64.gt
+ select
+ if
+ local.get $0
+ i32.const 3
+ local.get $11
+ local.get $4
+ f64.sub
+ local.get $2
+ f64.const 1
+ f64.add
+ local.get $6
+ f64.sub
+ local.get $3
+ f64.sub
+ f64.sqrt
+ local.tee $2
+ local.get $2
+ f64.add
+ local.tee $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $2
+ f64.const 0.25
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $8
+ local.get $10
+ f64.add
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ local.get $9
+ f64.add
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $3
+ local.get $6
+ f64.lt
+ if
+ local.get $0
+ i32.const 3
+ local.get $12
+ local.get $9
+ f64.sub
+ local.get $6
+ f64.const 1
+ f64.add
+ local.get $2
+ f64.sub
+ local.get $3
+ f64.sub
+ f64.sqrt
+ local.tee $2
+ local.get $2
+ f64.add
+ local.tee $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $8
+ local.get $10
+ f64.add
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ f64.const 0.25
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $11
+ local.get $4
+ f64.add
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 3
+ local.get $8
+ local.get $10
+ f64.sub
+ local.get $3
+ f64.const 1
+ f64.add
+ local.get $2
+ f64.sub
+ local.get $6
+ f64.sub
+ f64.sqrt
+ local.tee $2
+ local.get $2
+ f64.add
+ local.tee $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $12
+ local.get $9
+ f64.add
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $11
+ local.get $4
+ f64.add
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ f64.const 0.25
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ end
+ end
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $assembly/quat2/create (result i32)
+ (local $0 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $0
+ i32.const 0
+ i32.store
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ i32.const 10
+ i32.ne
+ if
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $assembly/quat2/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32)
+ (local $8 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $8
+ i32.const 0
+ i32.store
+ local.get $8
+ i32.const 8
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $8
+ i32.store
+ local.get $8
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 4
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 5
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 6
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 7
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $8
+ )
+ (func $assembly/quat2/fromRotationTranslationValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32)
+ (local $7 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $7
+ i32.const 0
+ i32.store
+ local.get $7
+ i32.const 8
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $7
+ i32.store
+ local.get $7
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 4
+ local.get $4
+ f64.const 0.5
+ f64.mul
+ local.tee $4
+ local.get $3
+ f64.mul
+ local.get $5
+ f64.const 0.5
+ f64.mul
+ local.tee $5
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $6
+ f64.const 0.5
+ f64.mul
+ local.tee $6
+ local.get $1
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 5
+ local.get $5
+ local.get $3
+ f64.mul
+ local.get $6
+ local.get $0
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 6
+ local.get $6
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $0
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 7
+ local.get $4
+ f64.neg
+ local.get $0
+ f64.mul
+ local.get $5
+ local.get $1
+ f64.mul
+ f64.sub
+ local.get $6
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $7
+ )
+ (func $assembly/vec2/fromValues (param $0 f64) (param $1 f64) (result i32)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ i32.const 0
+ i32.store
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $2
+ i32.store
+ local.get $2
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2/clone (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec4/clone
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2/copy (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/copy
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2/identity (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/vec4/set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2/transpose (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
+ (local $3 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ i32.eq
+ if
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2/invert (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ block $__inlined_func$assembly/mat2/invert (result i32)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ i32.const 0
+ local.get $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ f64.mul
+ local.get $6
+ local.get $5
+ f64.mul
+ f64.sub
+ local.tee $7
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.gt_u
+ br_if $__inlined_func$assembly/mat2/invert
+ drop
+ local.get $0
+ i32.const 0
+ local.get $2
+ f64.const 1
+ local.get $7
+ f64.div
+ local.tee $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ f64.neg
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ f64.neg
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2/adjoint (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
+ (local $3 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2/determinant (param $0 i32) (result f64)
+ (local $1 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2/multiply
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $8
+ local.get $0
+ i32.store
+ local.get $8
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.tee $2
+ f64.mul
+ local.get $6
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $2
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ local.get $3
+ f64.neg
+ local.tee $3
+ f64.mul
+ local.get $6
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $5
+ local.get $3
+ f64.mul
+ local.get $7
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $6
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $8
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $9
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2/fromRotation (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.tee $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2/fromScaling (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2/str (param $0 i32) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const -64
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i64.const 0
+ i64.store
+ local.get $1
+ i64.const 0
+ i64.store offset=8
+ local.get $1
+ i64.const 0
+ i64.store offset=16
+ local.get $1
+ i64.const 0
+ i64.store offset=24
+ local.get $1
+ i64.const 0
+ i64.store offset=32
+ local.get $1
+ i64.const 0
+ i64.store offset=40
+ local.get $1
+ i64.const 0
+ i64.store offset=48
+ local.get $1
+ i64.const 0
+ i64.store offset=56
+ local.get $1
+ i32.const 3728
+ i32.store offset=56
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=60
+ i32.const 3728
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=48
+ local.get $2
+ i32.const 5328
+ i32.store offset=52
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=44
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=32
+ local.get $2
+ i32.const 5328
+ i32.store offset=36
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=28
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=16
+ local.get $2
+ i32.const 5328
+ i32.store offset=20
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=12
+ local.get $1
+ local.get $0
+ call $~lib/string/String.__concat
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 5360
+ i32.store offset=4
+ local.get $0
+ i32.const 5360
+ call $~lib/string/String.__concat
+ global.get $~lib/memory/__stack_pointer
+ i32.const -64
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/mat2/frob (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ block $__inlined_func$assembly/maths/Maths.hypot4 (result f64)
+ f64.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $5
+ f64.max
+ f64.max
+ f64.max
+ local.tee $1
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot4
+ drop
+ local.get $1
+ local.get $2
+ f64.const 1
+ local.get $1
+ f64.div
+ local.tee $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $1
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2/LDU (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 16
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $4
+ local.get $3
+ i32.store offset=12
+ local.get $4
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store
+ local.get $0
+ i32.const 2
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 0
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 1
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 3
+ local.get $3
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 3
+ i32.const 2
+ i32.const 43
+ i32.const 0
+ call $~lib/rt/__newArray
+ local.tee $3
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.load offset=4
+ i32.store offset=4
+ local.get $3
+ i32.const 0
+ local.get $0
+ call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset
+ local.get $3
+ i32.const 1
+ local.get $1
+ call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset
+ local.get $3
+ i32.const 2
+ local.get $2
+ call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/mat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/add
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/subtract
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2/exactEquals (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/exactEquals
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $10
+ local.get $0
+ i32.store
+ local.get $10
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ local.get $6
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $2
+ f64.abs
+ local.get $6
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $7
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $3
+ f64.abs
+ local.get $7
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $8
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $4
+ f64.abs
+ local.get $8
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $5
+ local.get $9
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $5
+ f64.abs
+ local.get $9
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $export:assembly/mat2/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/scale
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/clone (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
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 4
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 5
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/mat2d/copy (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/identity (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/invert (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $9
+ local.get $0
+ i32.store
+ local.get $9
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ block $__inlined_func$assembly/mat2d/invert
+ local.get $3
+ local.get $6
+ f64.mul
+ local.get $4
+ local.get $5
+ f64.mul
+ f64.sub
+ local.tee $2
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.gt_u
+ if
+ i32.const 0
+ local.set $0
+ br $__inlined_func$assembly/mat2d/invert
+ end
+ local.get $0
+ i32.const 0
+ local.get $6
+ f64.const 1
+ local.get $2
+ f64.div
+ local.tee $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ f64.neg
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ f64.neg
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $5
+ local.get $8
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $7
+ f64.mul
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/determinant (param $0 i32) (result f64)
+ (local $1 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2d/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2d/multiply
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2d/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 i32)
+ (local $9 f64)
+ (local $10 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $8
+ local.get $0
+ i32.store
+ local.get $8
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.tee $2
+ f64.mul
+ local.get $6
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $2
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ local.get $3
+ f64.neg
+ local.tee $3
+ f64.mul
+ local.get $6
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $5
+ local.get $3
+ f64.mul
+ local.get $7
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $6
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $8
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $9
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 0
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $4
+ local.get $8
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $10
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $5
+ local.get $8
+ f64.mul
+ local.get $7
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $11
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/fromRotation (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.tee $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/fromScaling (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/fromTranslation (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/str (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat2d/str
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2d/frob (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ block $__inlined_func$assembly/maths/Maths.hypot7 (result f64)
+ f64.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $5
+ f64.max
+ f64.max
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $6
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $7
+ f64.const 1
+ f64.max
+ f64.max
+ f64.max
+ f64.max
+ local.tee $2
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot7
+ drop
+ local.get $2
+ local.get $1
+ f64.const 1
+ local.get $2
+ f64.div
+ local.tee $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ local.get $3
+ local.get $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $2
+ local.get $2
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2d/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2d/subtract
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2d/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat2d/exactEquals (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat2d/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $14
+ local.get $0
+ i32.store
+ local.get $14
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ local.get $8
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $2
+ f64.abs
+ local.get $8
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $9
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $3
+ f64.abs
+ local.get $9
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $10
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $4
+ f64.abs
+ local.get $10
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $5
+ local.get $11
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $5
+ f64.abs
+ local.get $11
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $6
+ local.get $12
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $6
+ f64.abs
+ local.get $12
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $7
+ local.get $13
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $7
+ f64.abs
+ local.get $13
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $export:assembly/mat3/fromMat4 (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/clone (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
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 4
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 5
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 6
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 7
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 8
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/mat3/copy (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/identity (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/transpose (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ i32.eq
+ if
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/invert (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 i32)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $12
+ local.get $0
+ i32.store
+ local.get $12
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ block $__inlined_func$assembly/mat3/invert
+ local.get $3
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $11
+ local.get $7
+ f64.mul
+ local.get $8
+ local.get $10
+ f64.mul
+ f64.sub
+ local.tee $2
+ f64.mul
+ local.get $4
+ local.get $11
+ f64.neg
+ local.get $6
+ f64.mul
+ local.get $8
+ local.get $9
+ f64.mul
+ f64.add
+ local.tee $13
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $7
+ local.get $9
+ f64.mul
+ f64.sub
+ local.tee $14
+ f64.mul
+ f64.add
+ local.tee $15
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.gt_u
+ if
+ i32.const 0
+ local.set $0
+ br $__inlined_func$assembly/mat3/invert
+ end
+ local.get $0
+ i32.const 0
+ local.get $2
+ f64.const 1
+ local.get $15
+ f64.div
+ local.tee $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $11
+ f64.neg
+ local.get $4
+ f64.mul
+ local.get $5
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $8
+ local.get $4
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $13
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $11
+ local.get $3
+ f64.mul
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $8
+ f64.neg
+ local.get $3
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $14
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $10
+ f64.neg
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $7
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/adjoint (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $11
+ local.get $0
+ i32.store
+ local.get $11
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 0
+ local.get $6
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $10
+ f64.mul
+ local.get $7
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $3
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $7
+ f64.mul
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $5
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $2
+ local.get $10
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $5
+ f64.mul
+ local.get $2
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $5
+ local.get $9
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $2
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $2
+ local.get $6
+ f64.mul
+ local.get $3
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/determinant (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $1
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $6
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $5
+ f64.mul
+ f64.sub
+ f64.mul
+ local.get $8
+ local.get $6
+ f64.neg
+ local.get $1
+ f64.mul
+ local.get $3
+ local.get $4
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $5
+ local.get $1
+ f64.mul
+ local.get $2
+ local.get $4
+ f64.mul
+ f64.sub
+ f64.mul
+ f64.add
+ )
+ (func $export:assembly/mat3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat3/multiply
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat3/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 i32)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $5
+ local.get $0
+ i32.store
+ local.get $5
+ local.get $1
+ i32.store offset=4
+ local.get $5
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 0
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $3
+ local.get $6
+ f64.mul
+ local.get $4
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $12
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $3
+ local.get $7
+ f64.mul
+ local.get $4
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $13
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $4
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $14
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 i32)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $10
+ local.get $0
+ i32.store
+ local.get $10
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.tee $2
+ local.get $4
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ local.get $5
+ f64.mul
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ local.get $6
+ f64.mul
+ local.get $3
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ local.get $7
+ f64.mul
+ local.get $3
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $2
+ local.get $8
+ f64.mul
+ local.get $3
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $2
+ local.get $9
+ f64.mul
+ local.get $3
+ local.get $6
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $12
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $13
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $5
+ local.get $0
+ i32.store
+ local.get $5
+ local.get $1
+ i32.store offset=4
+ local.get $5
+ local.get $2
+ i32.store offset=8
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/fromTranslation (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/fromRotation (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.tee $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/fromScaling (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/fromMat2d (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/fromQuat (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 i32)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $8
+ local.get $0
+ i32.store
+ local.get $8
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $2
+ local.get $2
+ local.get $2
+ f64.add
+ local.tee $7
+ f64.mul
+ local.tee $9
+ f64.sub
+ local.get $3
+ local.get $3
+ local.get $3
+ f64.add
+ local.tee $6
+ f64.mul
+ local.tee $10
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ local.get $4
+ local.get $4
+ f64.add
+ local.tee $2
+ f64.mul
+ local.tee $11
+ local.get $5
+ local.get $6
+ f64.mul
+ local.tee $6
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $3
+ local.get $2
+ f64.mul
+ local.tee $12
+ local.get $5
+ local.get $7
+ f64.mul
+ local.tee $13
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $11
+ local.get $6
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 1
+ local.get $4
+ local.get $2
+ f64.mul
+ f64.sub
+ local.tee $4
+ local.get $10
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $3
+ local.get $7
+ f64.mul
+ local.tee $3
+ local.get $5
+ local.get $2
+ f64.mul
+ local.tee $2
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ local.get $13
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $3
+ local.get $2
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $4
+ local.get $9
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/normalFromMat4 (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/normalFromMat4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat3/projection (param $0 i32) (param $1 f64) (param $2 f64) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ f64.const 2
+ local.get $1
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const -2
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/str (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat3/str
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat3/frob (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ block $__inlined_func$assembly/maths/Maths.hypot9 (result f64)
+ f64.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $5
+ f64.max
+ f64.max
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $6
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $7
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $8
+ f64.max
+ f64.max
+ f64.max
+ f64.max
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $9
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $10
+ f64.max
+ f64.max
+ local.tee $2
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot9
+ drop
+ local.get $2
+ local.get $1
+ f64.const 1
+ local.get $2
+ f64.div
+ local.tee $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ local.get $3
+ local.get $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $2
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $2
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat3/subtract
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat3/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat3/exactEquals (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat3/equals (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/equals
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#get:upDegrees (param $0 i32) (result f64)
+ (local $1 i32)
+ (local $2 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $0
+ f64.load
+ local.get $1
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#set:upDegrees (param $0 i32) (param $1 f64)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ f64.store
+ local.get $2
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#get:downDegrees (param $0 i32) (result f64)
+ (local $1 i32)
+ (local $2 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $0
+ f64.load offset=8
+ local.get $1
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#set:downDegrees (param $0 i32) (param $1 f64)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ f64.store offset=8
+ local.get $2
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#get:leftDegrees (param $0 i32) (result f64)
+ (local $1 i32)
+ (local $2 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $0
+ f64.load offset=16
+ local.get $1
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#set:leftDegrees (param $0 i32) (param $1 f64)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ f64.store offset=16
+ local.get $2
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#get:rightDegrees (param $0 i32) (result f64)
+ (local $1 i32)
+ (local $2 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $0
+ f64.load offset=24
+ local.get $1
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#set:rightDegrees (param $0 i32) (param $1 f64)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ f64.store offset=24
+ local.get $2
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#constructor (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
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ local.get $0
+ i32.eqz
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 32
+ i32.const 44
+ call $~lib/rt/itcms/__new
+ local.tee $0
+ i32.store
+ end
+ local.get $0
+ f64.const 0
+ f64.store
+ local.get $0
+ f64.const 0
+ f64.store offset=8
+ local.get $0
+ f64.const 0
+ f64.store offset=16
+ local.get $0
+ f64.const 0
+ f64.store offset=24
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/mat4/clone (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
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 16
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 4
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 5
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 6
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 7
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 8
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 9
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 10
+ local.get $0
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 11
+ local.get $0
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 12
+ local.get $0
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 13
+ local.get $0
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 14
+ local.get $0
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 15
+ local.get $0
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/mat4/copy (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (param $16 f64) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $12
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $13
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $14
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $15
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $16
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/identity (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat4/identity
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/transpose (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ i32.eq
+ if
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/invert (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/invert
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/adjoint (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/adjoint
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/determinant (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $0
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $0
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ local.get $9
+ local.get $0
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $4
+ f64.mul
+ local.get $10
+ local.get $12
+ f64.mul
+ f64.sub
+ local.tee $15
+ f64.mul
+ local.get $5
+ local.get $3
+ local.get $4
+ f64.mul
+ local.get $10
+ local.get $11
+ f64.mul
+ f64.sub
+ local.tee $16
+ f64.mul
+ f64.sub
+ local.get $2
+ local.get $3
+ local.get $12
+ f64.mul
+ local.get $9
+ local.get $11
+ f64.mul
+ f64.sub
+ local.tee $17
+ f64.mul
+ f64.add
+ f64.mul
+ local.get $13
+ local.get $6
+ local.get $15
+ f64.mul
+ local.get $7
+ local.get $16
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $17
+ f64.mul
+ f64.add
+ f64.mul
+ f64.sub
+ local.get $0
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ local.get $5
+ local.get $8
+ f64.mul
+ local.get $2
+ local.get $7
+ f64.mul
+ f64.sub
+ local.tee $3
+ f64.mul
+ local.get $9
+ local.get $1
+ local.get $8
+ f64.mul
+ local.get $2
+ local.get $6
+ f64.mul
+ f64.sub
+ local.tee $2
+ f64.mul
+ f64.sub
+ local.get $10
+ local.get $1
+ local.get $7
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.sub
+ local.tee $1
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $11
+ local.get $3
+ f64.mul
+ local.get $12
+ local.get $2
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $1
+ f64.mul
+ f64.add
+ f64.mul
+ f64.sub
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/multiply
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/translate
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $6
+ local.get $0
+ i32.store
+ local.get $6
+ local.get $1
+ i32.store offset=4
+ local.get $6
+ local.get $2
+ i32.store offset=8
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/rotate (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (result i32)
+ (local $4 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $3
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat4/rotate
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $12
+ local.get $0
+ i32.store
+ local.get $12
+ local.get $1
+ i32.store offset=4
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $3
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $2
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $0
+ local.get $1
+ i32.ne
+ if
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 4
+ local.get $4
+ local.get $2
+ f64.mul
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $5
+ local.get $2
+ f64.mul
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $6
+ local.get $2
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $7
+ local.get $2
+ f64.mul
+ local.get $11
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $8
+ local.get $2
+ f64.mul
+ local.get $4
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $9
+ local.get $2
+ f64.mul
+ local.get $5
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $10
+ local.get $2
+ f64.mul
+ local.get $6
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $11
+ local.get $2
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $12
+ local.get $0
+ i32.store
+ local.get $12
+ local.get $1
+ i32.store offset=4
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $3
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $2
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $0
+ local.get $1
+ i32.ne
+ if
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $2
+ f64.mul
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $2
+ f64.mul
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $2
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $2
+ f64.mul
+ local.get $11
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $4
+ local.get $3
+ f64.mul
+ local.get $8
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $5
+ local.get $3
+ f64.mul
+ local.get $9
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $6
+ local.get $3
+ f64.mul
+ local.get $10
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $7
+ local.get $3
+ f64.mul
+ local.get $11
+ local.get $2
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $12
+ local.get $0
+ i32.store
+ local.get $12
+ local.get $1
+ i32.store offset=4
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $3
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $2
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $0
+ local.get $1
+ i32.ne
+ if
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $2
+ f64.mul
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $2
+ f64.mul
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $2
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $2
+ f64.mul
+ local.get $11
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $8
+ local.get $2
+ f64.mul
+ local.get $4
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $9
+ local.get $2
+ f64.mul
+ local.get $5
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $10
+ local.get $2
+ f64.mul
+ local.get $6
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $11
+ local.get $2
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/fromTranslation (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/fromScaling (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $2
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/fromRotation
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/fromXRotation (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.set $1
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $2
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/fromYRotation (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.tee $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/fromZRotation (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.tee $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $2
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/fromRotationTranslation
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/fromQuat2 (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/fromQuat2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/getTranslation (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/getTranslation
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/getScaling (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/getScaling
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/getRotation (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/getRotation
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/decompose (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 16
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $4
+ local.get $3
+ i32.store offset=12
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat4/decompose
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/fromRotationTranslationScale (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 i32)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $9
+ local.get $0
+ i32.store
+ local.get $9
+ local.get $1
+ i32.store offset=4
+ local.get $9
+ local.get $2
+ i32.store offset=8
+ local.get $9
+ local.get $3
+ i32.store offset=12
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $6
+ local.get $6
+ local.get $6
+ f64.add
+ local.tee $8
+ f64.mul
+ local.tee $13
+ local.get $5
+ local.get $5
+ local.get $5
+ f64.add
+ local.tee $5
+ f64.mul
+ local.tee $14
+ f64.add
+ f64.sub
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $8
+ f64.mul
+ local.tee $15
+ local.get $10
+ local.get $5
+ f64.mul
+ local.tee $16
+ f64.add
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ local.get $5
+ f64.mul
+ local.tee $17
+ local.get $10
+ local.get $8
+ f64.mul
+ local.tee $8
+ f64.sub
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $15
+ local.get $16
+ f64.sub
+ local.get $11
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ local.get $4
+ local.get $4
+ local.get $4
+ f64.add
+ local.tee $4
+ f64.mul
+ local.tee $7
+ local.get $14
+ f64.add
+ f64.sub
+ local.get $11
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $6
+ local.get $5
+ f64.mul
+ local.tee $6
+ local.get $10
+ local.get $4
+ f64.mul
+ local.tee $4
+ f64.add
+ local.get $11
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $17
+ local.get $8
+ f64.add
+ local.get $12
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $6
+ local.get $4
+ f64.sub
+ local.get $12
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ local.get $7
+ local.get $13
+ f64.add
+ f64.sub
+ local.get $12
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/fromRotationTranslationScaleOrigin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
+ (local $5 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 20
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $5
+ local.get $0
+ i32.store
+ local.get $5
+ local.get $1
+ i32.store offset=4
+ local.get $5
+ local.get $2
+ i32.store offset=8
+ local.get $5
+ local.get $3
+ i32.store offset=12
+ local.get $5
+ local.get $4
+ i32.store offset=16
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/mat4/fromRotationTranslationScaleOrigin
+ global.get $~lib/memory/__stack_pointer
+ i32.const 20
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/fromQuat (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 i32)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $8
+ local.get $0
+ i32.store
+ local.get $8
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $2
+ local.get $2
+ local.get $2
+ f64.add
+ local.tee $7
+ f64.mul
+ local.tee $9
+ f64.sub
+ local.get $3
+ local.get $3
+ local.get $3
+ f64.add
+ local.tee $6
+ f64.mul
+ local.tee $10
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ local.get $4
+ local.get $4
+ f64.add
+ local.tee $2
+ f64.mul
+ local.tee $11
+ local.get $5
+ local.get $6
+ f64.mul
+ local.tee $6
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $2
+ f64.mul
+ local.tee $12
+ local.get $5
+ local.get $7
+ f64.mul
+ local.tee $13
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $11
+ local.get $6
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ local.get $4
+ local.get $2
+ f64.mul
+ f64.sub
+ local.tee $4
+ local.get $10
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $3
+ local.get $7
+ f64.mul
+ local.tee $3
+ local.get $5
+ local.get $2
+ f64.mul
+ local.tee $2
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $12
+ local.get $13
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $3
+ local.get $2
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $4
+ local.get $9
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/frustum (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32)
+ (local $7 f64)
+ (local $8 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $5
+ f64.add
+ local.tee $7
+ f64.const 1
+ local.get $2
+ local.get $1
+ f64.sub
+ f64.div
+ local.tee $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $7
+ f64.const 1
+ local.get $4
+ local.get $3
+ f64.sub
+ f64.div
+ local.tee $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $2
+ local.get $1
+ f64.add
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $4
+ local.get $3
+ f64.add
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $6
+ local.get $5
+ f64.add
+ f64.const 1
+ local.get $5
+ local.get $6
+ f64.sub
+ f64.div
+ local.tee $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $6
+ local.get $5
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.add
+ local.get $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/mat4/perspectiveNO
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $1
+ f64.const 0.5
+ f64.mul
+ call $~lib/math/NativeMath.tan
+ f64.div
+ local.tee $1
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ f64.const inf
+ f64.ne
+ if
+ local.get $0
+ i32.const 10
+ local.get $4
+ f64.const 1
+ local.get $3
+ local.get $4
+ f64.sub
+ f64.div
+ local.tee $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $4
+ local.get $3
+ f64.mul
+ local.get $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 10
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $3
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/perspectiveFromFieldOfView (param $0 i32) (param $1 i32) (param $2 f64) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 i32)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $6
+ local.get $0
+ i32.store
+ local.get $6
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ f64.load
+ f64.const 3.141592653589793
+ f64.mul
+ f64.const 180
+ f64.div
+ call $~lib/math/NativeMath.tan
+ local.set $4
+ local.get $1
+ f64.load offset=8
+ f64.const 3.141592653589793
+ f64.mul
+ f64.const 180
+ f64.div
+ call $~lib/math/NativeMath.tan
+ local.set $5
+ local.get $0
+ i32.const 0
+ f64.const 2
+ local.get $1
+ f64.load offset=16
+ f64.const 3.141592653589793
+ f64.mul
+ f64.const 180
+ f64.div
+ call $~lib/math/NativeMath.tan
+ local.tee $7
+ local.get $1
+ f64.load offset=24
+ f64.const 3.141592653589793
+ f64.mul
+ f64.const 180
+ f64.div
+ call $~lib/math/NativeMath.tan
+ local.tee $8
+ f64.add
+ f64.div
+ local.tee $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 2
+ local.get $4
+ local.get $5
+ f64.add
+ f64.div
+ local.tee $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $7
+ local.get $8
+ f64.sub
+ local.get $9
+ f64.mul
+ f64.const 0.5
+ f64.mul
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $4
+ local.get $5
+ f64.sub
+ local.get $10
+ f64.mul
+ f64.const 0.5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $3
+ local.get $2
+ local.get $3
+ f64.sub
+ local.tee $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $3
+ local.get $2
+ f64.mul
+ local.get $4
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/orthoNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ local.get $5
+ local.get $6
+ call $assembly/mat4/orthoNO
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/orthoZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32)
+ (local $7 f64)
+ (local $8 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $1
+ local.get $2
+ f64.sub
+ f64.div
+ local.tee $7
+ f64.const -2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ local.get $3
+ local.get $4
+ f64.sub
+ f64.div
+ local.tee $8
+ f64.const -2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ local.get $5
+ local.get $6
+ f64.sub
+ f64.div
+ local.tee $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ local.get $2
+ f64.add
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $4
+ local.get $3
+ f64.add
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $5
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/lookAt (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 16
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $4
+ local.get $3
+ i32.store offset=12
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat4/lookAt
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/targetTo (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 16
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $4
+ local.get $3
+ i32.store offset=12
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat4/targetTo
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/str (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat4/str
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/frob (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ block $__inlined_func$assembly/maths/Maths.hypot16 (result f64)
+ f64.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $4
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $5
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $6
+ f64.max
+ f64.max
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $7
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $8
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $9
+ f64.max
+ f64.max
+ f64.max
+ f64.max
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $10
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $3
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $11
+ f64.max
+ f64.max
+ local.get $0
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $12
+ local.get $0
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.get $0
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $13
+ f64.max
+ f64.max
+ local.get $0
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $14
+ local.get $0
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $15
+ local.get $0
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.abs
+ local.tee $16
+ f64.max
+ f64.max
+ f64.max
+ f64.max
+ f64.max
+ local.tee $1
+ f64.const 0
+ f64.eq
+ br_if $__inlined_func$assembly/maths/Maths.hypot16
+ drop
+ local.get $1
+ local.get $2
+ f64.const 1
+ local.get $1
+ f64.div
+ local.tee $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ local.get $4
+ local.get $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $1
+ f64.mul
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $1
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $1
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $1
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $1
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $15
+ local.get $1
+ f64.mul
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $1
+ f64.mul
+ local.tee $1
+ local.get $1
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/subtract
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/mat4/exactEquals (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/equals (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/equals
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat/identity (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat/setAxisAngle (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/setAxisAngle
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat/getAxisAngle (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 i32)
+ (local $4 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/math/NativeMath.acos
+ local.tee $2
+ local.get $2
+ f64.add
+ local.tee $4
+ f64.const 0.5
+ f64.mul
+ call $~lib/math/NativeMath.sin
+ local.tee $2
+ f64.const 1e-06
+ f64.gt
+ if
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/quat/getAngle (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ i32.const 2
+ global.set $~argumentsLength
+ local.get $0
+ local.get $1
+ i32.const 2592
+ i32.load
+ call_indirect $0 (type $i32_i32_=>_f64)
+ local.tee $2
+ local.get $2
+ f64.add
+ local.get $2
+ f64.mul
+ f64.const 1
+ f64.sub
+ call $~lib/math/NativeMath.acos
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/multiply
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/rotateX
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/rotateY
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/rotateZ
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat/calculateW (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $5
+ local.get $0
+ i32.store
+ local.get $5
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 0
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ local.get $2
+ local.get $2
+ f64.mul
+ f64.sub
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.sub
+ f64.abs
+ f64.sqrt
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat/exp (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/exp
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat/ln (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/ln
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat/pow (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/ln
+ drop
+ i32.const 3
+ global.set $~argumentsLength
+ local.get $0
+ local.get $0
+ local.get $2
+ i32.const 2560
+ i32.load
+ call_indirect $0 (type $i32_i32_f64_=>_i32)
+ drop
+ local.get $0
+ local.get $0
+ call $assembly/quat/exp
+ drop
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/quat/slerp
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat/random (param $0 i32) (result i32)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.set $2
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.set $1
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.set $3
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $2
+ f64.sub
+ f64.sqrt
+ local.tee $4
+ local.get $1
+ f64.const 6.283185307179586
+ f64.mul
+ local.tee $1
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ f64.sqrt
+ local.tee $2
+ local.get $3
+ f64.const 6.283185307179586
+ f64.mul
+ local.tee $1
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat/invert (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $6
+ local.get $0
+ i32.store
+ local.get $6
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ f64.neg
+ f64.const 1
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.tee $2
+ f64.div
+ f64.const 0
+ local.get $2
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ select
+ local.tee $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ f64.neg
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ f64.neg
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $5
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat/conjugate (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat/fromMat3 (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/fromMat3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat/fromEuler@varargs (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32)
+ (local $5 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $5
+ local.get $0
+ i32.store
+ local.get $5
+ local.get $4
+ i32.store offset=4
+ local.get $5
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.store
+ block $1of1
+ block $0of1
+ block $outOfRange
+ global.get $~argumentsLength
+ i32.const 4
+ i32.sub
+ br_table $0of1 $1of1 $outOfRange
+ end
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/common/ANGLE_ORDER
+ local.tee $4
+ i32.store
+ end
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/quat/fromEuler
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/quat/str (param $0 i32) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const -64
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i64.const 0
+ i64.store
+ local.get $1
+ i64.const 0
+ i64.store offset=8
+ local.get $1
+ i64.const 0
+ i64.store offset=16
+ local.get $1
+ i64.const 0
+ i64.store offset=24
+ local.get $1
+ i64.const 0
+ i64.store offset=32
+ local.get $1
+ i64.const 0
+ i64.store offset=40
+ local.get $1
+ i64.const 0
+ i64.store offset=48
+ local.get $1
+ i64.const 0
+ i64.store offset=56
+ local.get $1
+ i32.const 11936
+ i32.store offset=56
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=60
+ i32.const 11936
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=48
+ local.get $2
+ i32.const 5328
+ i32.store offset=52
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=44
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=32
+ local.get $2
+ i32.const 5328
+ i32.store offset=36
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=28
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=16
+ local.get $2
+ i32.const 5328
+ i32.store offset=20
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=12
+ local.get $1
+ local.get $0
+ call $~lib/string/String.__concat
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 5360
+ i32.store offset=4
+ local.get $0
+ i32.const 5360
+ call $~lib/string/String.__concat
+ global.get $~lib/memory/__stack_pointer
+ i32.const -64
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/quat/equals (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/dot
+ f64.abs
+ f64.const 0.999999
+ f64.ge
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat2/clone (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
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 4
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 5
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 6
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 7
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/quat2/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat2/fromRotationTranslation
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat2/fromTranslation (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/fromRotation (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/fromMat4 (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
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $2
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ i64.const 0
+ i64.store
+ local.get $2
+ call $assembly/quat/create
+ local.tee $2
+ i32.store
+ local.get $2
+ local.get $1
+ call $assembly/mat4/getRotation
+ drop
+ global.get $~lib/memory/__stack_pointer
+ i32.const 3
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $3
+ i32.store offset=4
+ local.get $3
+ local.get $1
+ call $assembly/mat4/getTranslation
+ drop
+ local.get $0
+ local.get $2
+ local.get $3
+ call $assembly/quat2/fromRotationTranslation
+ drop
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/quat2/copy (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/copy
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat2/identity (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/getDual (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/setDual (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/getTranslation (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $11
+ local.get $0
+ i32.store
+ local.get $11
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $8
+ local.get $0
+ i32.const 0
+ local.get $2
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $10
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.tee $9
+ local.get $9
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ local.get $10
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $2
+ local.get $8
+ f64.mul
+ f64.sub
+ local.tee $9
+ local.get $9
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ local.get $10
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $2
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $6
+ f64.mul
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 i32)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $10
+ local.get $0
+ i32.store
+ local.get $10
+ local.get $1
+ i32.store offset=4
+ local.get $10
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ local.set $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ local.set $8
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ local.set $9
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $0
+ i32.const 0
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $6
+ local.get $7
+ f64.mul
+ local.get $4
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $11
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $9
+ f64.mul
+ f64.sub
+ local.get $12
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $13
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $3
+ f64.neg
+ local.get $7
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.sub
+ local.get $14
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $17
+ local.get $0
+ i32.store
+ local.get $17
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/rotateX
+ drop
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $0
+ i32.const 4
+ local.get $7
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.sub
+ local.tee $13
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $14
+ f64.mul
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.sub
+ local.tee $15
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.sub
+ local.tee $16
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ local.tee $3
+ local.get $11
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $16
+ local.get $14
+ f64.mul
+ local.get $15
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $12
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $3
+ local.get $14
+ f64.mul
+ local.get $15
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $15
+ local.get $14
+ f64.mul
+ local.get $13
+ local.get $2
+ f64.mul
+ f64.sub
+ local.get $16
+ local.get $11
+ f64.mul
+ f64.sub
+ local.get $3
+ local.get $12
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $17
+ local.get $0
+ i32.store
+ local.get $17
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/rotateY
+ drop
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $0
+ i32.const 4
+ local.get $7
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.sub
+ local.tee $13
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $14
+ f64.mul
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.sub
+ local.tee $15
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.sub
+ local.tee $16
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ local.tee $3
+ local.get $11
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $16
+ local.get $14
+ f64.mul
+ local.get $15
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $12
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $3
+ local.get $14
+ f64.mul
+ local.get $15
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $15
+ local.get $14
+ f64.mul
+ local.get $13
+ local.get $2
+ f64.mul
+ f64.sub
+ local.get $16
+ local.get $11
+ f64.mul
+ f64.sub
+ local.get $3
+ local.get $12
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $17
+ local.get $0
+ i32.store
+ local.get $17
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/rotateZ
+ drop
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $0
+ i32.const 4
+ local.get $7
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.sub
+ local.tee $13
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $14
+ f64.mul
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.sub
+ local.tee $15
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.sub
+ local.tee $16
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ local.tee $3
+ local.get $11
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $16
+ local.get $14
+ f64.mul
+ local.get $15
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $12
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $3
+ local.get $14
+ f64.mul
+ local.get $15
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $15
+ local.get $14
+ f64.mul
+ local.get $13
+ local.get $2
+ f64.mul
+ f64.sub
+ local.get $16
+ local.get $11
+ f64.mul
+ f64.sub
+ local.get $3
+ local.get $12
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/rotateByQuatAppend (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $11
+ local.get $0
+ i32.store
+ local.get $11
+ local.get $1
+ i32.store offset=4
+ local.get $11
+ local.get $2
+ i32.store offset=8
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $10
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $10
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $9
+ f64.mul
+ local.get $10
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $10
+ local.get $9
+ f64.mul
+ local.get $3
+ local.get $6
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 4
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $10
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $10
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $5
+ local.get $9
+ f64.mul
+ local.get $10
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $10
+ local.get $9
+ f64.mul
+ local.get $3
+ local.get $6
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/rotateByQuatPrepend (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $11
+ local.get $0
+ i32.store
+ local.get $11
+ local.get $1
+ i32.store offset=4
+ local.get $11
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $6
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $10
+ f64.mul
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ local.get $10
+ f64.mul
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $8
+ local.get $10
+ f64.mul
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $9
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 4
+ local.get $6
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $10
+ f64.mul
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $7
+ local.get $10
+ f64.mul
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $8
+ local.get $10
+ f64.mul
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $9
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/rotateAroundAxis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/quat2/rotateAroundAxis
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat2/multiply
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $5
+ local.get $0
+ i32.store
+ local.get $5
+ local.get $1
+ i32.store offset=4
+ local.get $5
+ local.get $2
+ i32.store offset=8
+ i32.const 2
+ global.set $~argumentsLength
+ local.get $3
+ f64.neg
+ local.get $3
+ local.get $1
+ local.get $2
+ i32.const 2592
+ i32.load
+ call_indirect $0 (type $i32_i32_=>_f64)
+ f64.const 0
+ f64.lt
+ select
+ local.set $4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 1
+ local.get $3
+ f64.sub
+ local.tee $3
+ f64.mul
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/invert (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ i32.const 1
+ global.set $~argumentsLength
+ local.get $1
+ i32.const 2272
+ i32.load
+ call_indirect $0 (type $i32_=>_f64)
+ local.set $2
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/conjugate (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/normalize (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $11
+ local.get $0
+ i32.store
+ local.get $11
+ local.get $1
+ i32.store offset=4
+ i32.const 1
+ global.set $~argumentsLength
+ local.get $1
+ i32.const 2272
+ i32.load
+ call_indirect $0 (type $i32_=>_f64)
+ local.tee $2
+ f64.const 0
+ f64.gt
+ if
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.sqrt
+ local.tee $2
+ f64.div
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $7
+ local.get $3
+ local.get $3
+ local.get $7
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $10
+ f64.mul
+ f64.add
+ local.tee $3
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $8
+ local.get $4
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $9
+ local.get $5
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $10
+ local.get $6
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/quat2/str (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/quat2/str
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat2/exactEquals (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/quat2/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $18
+ local.get $0
+ i32.store
+ local.get $18
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ local.get $10
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $2
+ f64.abs
+ local.get $10
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $11
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $3
+ f64.abs
+ local.get $11
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $12
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $4
+ f64.abs
+ local.get $12
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $5
+ local.get $13
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $5
+ f64.abs
+ local.get $13
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $6
+ local.get $14
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $6
+ f64.abs
+ local.get $14
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $7
+ local.get $15
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $7
+ f64.abs
+ local.get $15
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $8
+ local.get $16
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $8
+ f64.abs
+ local.get $16
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $9
+ local.get $17
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $9
+ f64.abs
+ local.get $17
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $export:assembly/vec2/clone (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
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/vec2/copy (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/set (param $0 i32) (param $1 f64) (param $2 f64) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/subtract
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/multiply
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec2/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/divide
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec2/ceil (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/floor (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/round (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/distance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 i32)
+ (local $3 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/distance
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 i32)
+ (local $3 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/squaredDistance
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec2/length (param $0 i32) (result f64)
+ (local $1 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/math/NativeMath.hypot
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec2/squaredLength (param $0 i32) (result f64)
+ (local $1 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec2/squaredLength
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec2/negate (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/inverse (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/normalize (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ local.get $2
+ f64.mul
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.tee $2
+ f64.const 0
+ f64.gt
+ if
+ f64.const 1
+ local.get $2
+ f64.sqrt
+ f64.div
+ local.set $2
+ end
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/dot (param $0 i32) (param $1 i32) (result f64)
+ (local $2 i32)
+ (local $3 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec2/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ (local $4 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $4
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ (local $5 f64)
+ (local $6 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $3
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $6
+ local.get $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/random (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ i32.const 0
+ global.set $~argumentsLength
+ local.get $0
+ i32.const 0
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.tee $2
+ local.get $2
+ f64.add
+ f64.const 3.141592653589793
+ f64.mul
+ local.tee $2
+ call $~lib/math/NativeMath.cos
+ local.get $1
+ f64.const 1
+ local.get $1
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ select
+ local.tee $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.get $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/transformMat2 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ (local $4 f64)
+ (local $5 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/transformMat2d (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ (local $4 f64)
+ (local $5 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ (local $4 f64)
+ (local $5 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ (local $4 f64)
+ (local $5 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/rotate (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $6
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ local.set $7
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ local.tee $3
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $7
+ f64.mul
+ local.get $6
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/angle (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $7
+ local.get $0
+ i32.store
+ local.get $7
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $3
+ local.get $3
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.add
+ f64.sqrt
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $5
+ local.get $5
+ f64.mul
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $6
+ local.get $6
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ local.tee $2
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ if (result f64)
+ local.get $3
+ local.get $5
+ f64.mul
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $2
+ f64.div
+ else
+ local.get $2
+ end
+ f64.const -1
+ f64.max
+ f64.const 1
+ f64.min
+ call $~lib/math/NativeMath.acos
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec2/zero (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec2/str (param $0 i32) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 32
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i64.const 0
+ i64.store
+ local.get $1
+ i64.const 0
+ i64.store offset=8
+ local.get $1
+ i64.const 0
+ i64.store offset=16
+ local.get $1
+ i64.const 0
+ i64.store offset=24
+ local.get $1
+ i32.const 12000
+ i32.store offset=24
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=28
+ i32.const 12000
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=16
+ local.get $2
+ i32.const 5328
+ i32.store offset=20
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=12
+ local.get $1
+ local.get $0
+ call $~lib/string/String.__concat
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 5360
+ i32.store offset=4
+ local.get $0
+ i32.const 5360
+ call $~lib/string/String.__concat
+ global.get $~lib/memory/__stack_pointer
+ i32.const 32
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/vec2/exactEquals (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec2/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $6
+ local.get $0
+ i32.store
+ local.get $6
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ local.get $4
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $2
+ f64.abs
+ local.get $4
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $5
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $3
+ f64.abs
+ local.get $5
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $export:assembly/vec3/clone (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
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i32.const 0
+ i32.store
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/vec3/length (param $0 i32) (result f64)
+ (local $1 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec3/length
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec3/copy (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/subtract
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/multiply
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec3/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/divide
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec3/ceil (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/floor (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/round (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/distance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 i32)
+ (local $3 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/distance
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 i32)
+ (local $3 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/squaredDistance
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec3/squaredLength (param $0 i32) (result f64)
+ (local $1 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec3/squaredLength
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec3/negate (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/inverse (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 1
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/normalize (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/normalize
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec3/dot (param $0 i32) (param $1 i32) (result f64)
+ (local $2 i32)
+ (local $3 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/dot
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec3/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/cross
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec3/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $3
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $6
+ local.get $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $7
+ local.get $3
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $7
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 i32)
+ (local $6 f64)
+ (local $7 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $5
+ local.get $0
+ i32.store
+ local.get $5
+ local.get $1
+ i32.store offset=4
+ local.get $5
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ local.get $2
+ call $assembly/vec3/dot
+ f64.const -1
+ f64.max
+ f64.const 1
+ f64.min
+ call $~lib/math/NativeMath.acos
+ local.tee $6
+ call $~lib/math/NativeMath.sin
+ local.set $7
+ f64.const 1
+ local.get $3
+ f64.sub
+ local.get $6
+ f64.mul
+ call $~lib/math/NativeMath.sin
+ local.get $7
+ f64.div
+ local.set $4
+ local.get $3
+ local.get $6
+ f64.mul
+ call $~lib/math/NativeMath.sin
+ local.get $7
+ f64.div
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $3
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $3
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/hermite (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32)
+ (local $6 f64)
+ (local $7 i32)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 20
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $7
+ local.get $0
+ i32.store
+ local.get $7
+ local.get $1
+ i32.store offset=4
+ local.get $7
+ local.get $2
+ i32.store offset=8
+ local.get $7
+ local.get $3
+ i32.store offset=12
+ local.get $7
+ local.get $4
+ i32.store offset=16
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ local.get $5
+ f64.mul
+ local.tee $6
+ local.get $5
+ local.get $5
+ f64.add
+ local.tee $10
+ f64.const 3
+ f64.sub
+ f64.mul
+ f64.const 1
+ f64.add
+ local.tee $8
+ f64.mul
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ local.get $5
+ f64.const 2
+ f64.sub
+ f64.mul
+ local.get $5
+ f64.add
+ local.tee $9
+ f64.mul
+ f64.add
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ local.get $5
+ f64.const 1
+ f64.sub
+ f64.mul
+ local.tee $5
+ f64.mul
+ f64.add
+ local.get $4
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.const 3
+ local.get $10
+ f64.sub
+ f64.mul
+ local.tee $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $8
+ f64.mul
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $4
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $8
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $4
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 20
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/bezier (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32)
+ (local $6 f64)
+ (local $7 i32)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 20
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $7
+ local.get $0
+ i32.store
+ local.get $7
+ local.get $1
+ i32.store offset=4
+ local.get $7
+ local.get $2
+ i32.store offset=8
+ local.get $7
+ local.get $3
+ i32.store offset=12
+ local.get $7
+ local.get $4
+ i32.store offset=16
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 1
+ local.get $5
+ f64.sub
+ local.tee $6
+ local.get $6
+ f64.mul
+ local.tee $8
+ local.get $6
+ f64.mul
+ local.tee $9
+ f64.mul
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.const 3
+ f64.mul
+ local.get $8
+ f64.mul
+ local.tee $8
+ f64.mul
+ f64.add
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ local.get $5
+ f64.mul
+ local.tee $10
+ f64.const 3
+ f64.mul
+ local.get $6
+ f64.mul
+ local.tee $6
+ f64.mul
+ f64.add
+ local.get $4
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $10
+ local.get $5
+ f64.mul
+ local.tee $5
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $9
+ f64.mul
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $4
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $9
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $4
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 20
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/random (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.set $2
+ i32.const 0
+ global.set $~argumentsLength
+ f64.const 1
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.tee $3
+ local.get $3
+ f64.add
+ f64.const 1
+ f64.sub
+ local.tee $3
+ local.get $3
+ f64.mul
+ f64.sub
+ f64.sqrt
+ local.get $1
+ f64.const 1
+ local.get $1
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ select
+ local.tee $4
+ f64.mul
+ local.set $1
+ local.get $0
+ i32.const 0
+ local.get $2
+ local.get $2
+ f64.add
+ f64.const 3.141592653589793
+ f64.mul
+ local.tee $2
+ call $~lib/math/NativeMath.cos
+ local.get $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.get $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $7
+ local.get $0
+ i32.store
+ local.get $7
+ local.get $1
+ i32.store offset=4
+ local.get $7
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.tee $3
+ f64.const 1
+ local.get $3
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ select
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.get $3
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.get $3
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.get $3
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $6
+ local.get $0
+ i32.store
+ local.get $6
+ local.get $1
+ i32.store offset=4
+ local.get $6
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $4
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $4
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $4
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 i32)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $9
+ local.get $0
+ i32.store
+ local.get $9
+ local.get $1
+ i32.store offset=4
+ local.get $9
+ local.get $2
+ i32.store offset=8
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $10
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ local.tee $11
+ local.get $6
+ local.get $6
+ f64.add
+ local.tee $6
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.sub
+ local.tee $12
+ f64.mul
+ local.get $4
+ local.get $4
+ local.get $5
+ f64.mul
+ local.get $3
+ local.get $10
+ f64.mul
+ f64.sub
+ local.tee $5
+ f64.mul
+ f64.sub
+ local.tee $13
+ local.get $13
+ f64.add
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $8
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $11
+ f64.mul
+ local.get $3
+ local.get $12
+ f64.mul
+ f64.sub
+ local.tee $4
+ local.get $4
+ f64.add
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $10
+ local.get $12
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $5
+ f64.mul
+ local.get $7
+ local.get $11
+ f64.mul
+ f64.sub
+ local.tee $3
+ local.get $3
+ f64.add
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/rotateX (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ (local $5 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $4
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ i64.const 0
+ i64.store
+ local.get $4
+ i32.const 0
+ i32.const 3
+ i32.const 21
+ i32.const 12032
+ call $~lib/rt/__newArray
+ local.tee $4
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ i32.const 21
+ i32.const 12064
+ call $~lib/rt/__newArray
+ local.tee $5
+ i32.store offset=4
+ local.get $4
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $4
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $4
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 0
+ local.get $4
+ i32.const 0
+ call $~lib/array/Array#__get
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 1
+ local.get $4
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ local.get $4
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 2
+ local.get $4
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ local.get $4
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ f64.add
+ call $~lib/array/Array#__set
+ local.get $0
+ i32.const 0
+ local.get $5
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/vec3/rotateY (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ (local $5 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $4
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ i64.const 0
+ i64.store
+ local.get $4
+ i32.const 0
+ i32.const 3
+ i32.const 21
+ i32.const 12144
+ call $~lib/rt/__newArray
+ local.tee $4
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ i32.const 21
+ i32.const 12176
+ call $~lib/rt/__newArray
+ local.tee $5
+ i32.store offset=4
+ local.get $4
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $4
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $4
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 0
+ local.get $4
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ local.get $4
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ f64.add
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 1
+ local.get $4
+ i32.const 1
+ call $~lib/array/Array#__get
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 2
+ local.get $4
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ local.get $4
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $0
+ i32.const 0
+ local.get $5
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/vec3/rotateZ (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ (local $5 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $4
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ i64.const 0
+ i64.store
+ local.get $4
+ i32.const 0
+ i32.const 3
+ i32.const 21
+ i32.const 12208
+ call $~lib/rt/__newArray
+ local.tee $4
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ i32.const 21
+ i32.const 12240
+ call $~lib/rt/__newArray
+ local.tee $5
+ i32.store offset=4
+ local.get $4
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $4
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $4
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 0
+ local.get $4
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ local.get $4
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 1
+ local.get $4
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ local.get $4
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ f64.add
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 2
+ local.get $4
+ i32.const 2
+ call $~lib/array/Array#__get
+ call $~lib/array/Array#__set
+ local.get $0
+ i32.const 0
+ local.get $5
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/vec3/angle (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ local.get $2
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ f64.sqrt
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ local.get $2
+ f64.mul
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ local.get $2
+ f64.mul
+ f64.add
+ f64.sqrt
+ f64.mul
+ local.tee $2
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ if (result f64)
+ local.get $0
+ local.get $1
+ call $assembly/vec3/dot
+ local.get $2
+ f64.div
+ else
+ local.get $2
+ end
+ f64.const -1
+ f64.max
+ f64.const 1
+ f64.min
+ call $~lib/math/NativeMath.acos
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec3/zero (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec3/str (param $0 i32) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 48
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i64.const 0
+ i64.store
+ local.get $1
+ i64.const 0
+ i64.store offset=8
+ local.get $1
+ i64.const 0
+ i64.store offset=16
+ local.get $1
+ i64.const 0
+ i64.store offset=24
+ local.get $1
+ i64.const 0
+ i64.store offset=32
+ local.get $1
+ i64.const 0
+ i64.store offset=40
+ local.get $1
+ i32.const 12272
+ i32.store offset=40
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=44
+ i32.const 12272
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=32
+ local.get $2
+ i32.const 5328
+ i32.store offset=36
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=28
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=16
+ local.get $2
+ i32.const 5328
+ i32.store offset=20
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=12
+ local.get $1
+ local.get $0
+ call $~lib/string/String.__concat
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 5360
+ i32.store offset=4
+ local.get $0
+ i32.const 5360
+ call $~lib/string/String.__concat
+ global.get $~lib/memory/__stack_pointer
+ i32.const 48
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+ (func $export:assembly/vec3/exactEquals (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec3/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $8
+ local.get $0
+ i32.store
+ local.get $8
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ local.get $5
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $2
+ f64.abs
+ local.get $5
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $6
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $3
+ f64.abs
+ local.get $6
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $7
+ f64.sub
+ f64.abs
+ f64.const 1
+ local.get $4
+ f64.abs
+ local.get $7
+ f64.abs
+ f64.max
+ f64.max
+ f64.const 1e-06
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $export:assembly/vec4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/multiply
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec4/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/divide
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec4/ceil (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec4/floor (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec4/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec4/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $3
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec4/round (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $3
+ local.get $0
+ i32.store
+ local.get $3
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec4/distance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 i32)
+ (local $3 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/distance
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 i32)
+ (local $3 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/squaredDistance
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec4/length (param $0 i32) (result f64)
+ (local $1 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec4/length
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec4/squaredLength (param $0 i32) (result f64)
+ (local $1 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec4/squaredLength
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec4/negate (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec4/inverse (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 1
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec4/normalize (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/normalize
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec4/dot (param $0 i32) (param $1 i32) (result f64)
+ (local $2 i32)
+ (local $3 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $0
+ i32.store
+ local.get $2
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/dot
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec4/cross (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (local $4 i32)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $4
+ local.get $3
+ i32.store offset=12
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $6
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $7
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $8
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $9
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $10
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $11
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $12
+ local.get $11
+ f64.mul
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $13
+ local.get $10
+ f64.mul
+ f64.sub
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $14
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $11
+ f64.mul
+ f64.neg
+ local.get $13
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $10
+ f64.mul
+ local.get $12
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $14
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.neg
+ local.get $12
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $6
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec4/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $4
+ local.get $0
+ i32.store
+ local.get $4
+ local.get $1
+ i32.store offset=4
+ local.get $4
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec4/lerp
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/vec4/random (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $1
+ f64.const 1
+ local.get $1
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ select
+ local.set $1
+ loop $do-continue|0
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.set $2
+ i32.const 0
+ global.set $~argumentsLength
+ local.get $2
+ local.get $2
+ f64.add
+ f64.const 1
+ f64.sub
+ local.tee $2
+ local.get $2
+ f64.mul
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.tee $4
+ local.get $4
+ f64.add
+ f64.const 1
+ f64.sub
+ local.tee $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.tee $6
+ f64.const 1
+ f64.ge
+ br_if $do-continue|0
+ end
+ loop $do-continue|1
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.set $3
+ i32.const 0
+ global.set $~argumentsLength
+ local.get $3
+ local.get $3
+ f64.add
+ f64.const 1
+ f64.sub
+ local.tee $3
+ local.get $3
+ f64.mul
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.tee $5
+ local.get $5
+ f64.add
+ f64.const 1
+ f64.sub
+ local.tee $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.tee $7
+ f64.const 1
+ f64.ge
+ br_if $do-continue|1
+ end
+ local.get $0
+ i32.const 0
+ local.get $1
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ local.get $3
+ f64.mul
+ f64.const 1
+ local.get $6
+ f64.sub
+ local.get $7
+ f64.div
+ f64.sqrt
+ local.tee $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ local.get $5
+ f64.mul
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec4/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $7
+ local.get $0
+ i32.store
+ local.get $7
+ local.get $1
+ i32.store offset=4
+ local.get $7
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec4/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 i32)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.tee $11
+ local.get $0
+ i32.store
+ local.get $11
+ local.get $1
+ i32.store offset=4
+ local.get $11
+ local.get $2
+ i32.store offset=8
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.tee $6
+ local.get $3
+ f64.mul
+ local.get $8
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $4
+ f64.mul
+ f64.sub
+ local.tee $12
+ local.get $6
+ f64.mul
+ local.get $9
+ f64.neg
+ local.tee $10
+ local.get $3
+ f64.mul
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ local.tee $13
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $4
+ f64.mul
+ local.get $5
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $7
+ f64.mul
+ f64.sub
+ local.tee $14
+ local.get $5
+ f64.neg
+ local.tee $5
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $7
+ f64.mul
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ local.tee $3
+ local.get $8
+ f64.neg
+ local.tee $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $14
+ local.get $6
+ f64.mul
+ local.get $13
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $6
+ f64.mul
+ local.get $13
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec4/zero (param $0 i32) (result i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ if
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $0
+ )
+ (func $export:assembly/vec4/str (param $0 i32) (result i32)
+ (local $1 i32)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ block $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const -64
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12812
+ i32.lt_s
+ br_if $folding-inner0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ i64.const 0
+ i64.store
+ local.get $1
+ i64.const 0
+ i64.store offset=8
+ local.get $1
+ i64.const 0
+ i64.store offset=16
+ local.get $1
+ i64.const 0
+ i64.store offset=24
+ local.get $1
+ i64.const 0
+ i64.store offset=32
+ local.get $1
+ i64.const 0
+ i64.store offset=40
+ local.get $1
+ i64.const 0
+ i64.store offset=48
+ local.get $1
+ i64.const 0
+ i64.store offset=56
+ local.get $1
+ i32.const 12304
+ i32.store offset=56
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=60
+ i32.const 12304
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=48
+ local.get $2
+ i32.const 5328
+ i32.store offset=52
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=44
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=32
+ local.get $2
+ i32.const 5328
+ i32.store offset=36
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=28
+ local.get $1
+ local.get $2
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.tee $2
+ local.get $1
+ i32.store offset=16
+ local.get $2
+ i32.const 5328
+ i32.store offset=20
+ local.get $1
+ i32.const 5328
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/number/F64#toString
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store offset=12
+ local.get $1
+ local.get $0
+ call $~lib/string/String.__concat
+ local.set $0
+ global.get $~lib/memory/__stack_pointer
+ local.tee $1
+ local.get $0
+ i32.store
+ local.get $1
+ i32.const 5360
+ i32.store offset=4
+ local.get $0
+ i32.const 5360
+ call $~lib/string/String.__concat
+ global.get $~lib/memory/__stack_pointer
+ i32.const -64
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ return
+ end
+ i32.const 29216
+ i32.const 29264
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ )
+)
diff --git a/build/untouched.wasm.d.ts b/build/untouched.wasm.d.ts
new file mode 100644
index 00000000..c423912e
--- /dev/null
+++ b/build/untouched.wasm.d.ts
@@ -0,0 +1,399 @@
+declare module ASModule {
+ type i8 = number;
+ type i16 = number;
+ type i32 = number;
+ type i64 = bigint;
+ type isize = number;
+ type u8 = number;
+ type u16 = number;
+ type u32 = number;
+ type u64 = bigint;
+ type usize = number;
+ type f32 = number;
+ type f64 = number;
+ type bool = boolean | number;
+ export namespace glMatrix {
+ export var EPSILON: f64;
+ export var RANDOM: usize;
+ export var ANGLE_ORDER: usize;
+ export function setMatrixArrayType(type: usize): void;
+ export function toRadian(a: f64): f64;
+ export function equals(a: f64, b: f64): bool;
+ }
+ export namespace mat2 {
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function identity(out: usize): usize;
+ export function fromValues(m00: f64, m01: f64, m10: f64, m11: f64): usize;
+ export function set(out: usize, m00: f64, m01: f64, m10: f64, m11: f64): usize;
+ export function transpose(out: usize, a: usize): usize;
+ export function invert(out: usize, a: usize): usize;
+ export function adjoint(out: usize, a: usize): usize;
+ export function determinant(a: usize): f64;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function rotate(out: usize, a: usize, rad: f64): usize;
+ export function scale(out: usize, a: usize, v: usize): usize;
+ export function fromRotation(out: usize, rad: f64): usize;
+ export function fromScaling(out: usize, v: usize): usize;
+ export function str(a: usize): usize;
+ export function frob(a: usize): f64;
+ export function LDU(L: usize, D: usize, U: usize, a: usize): usize;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export function multiplyScalar(out: usize, a: usize, b: f64): usize;
+ export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export var mul: usize;
+ export var sub: usize;
+ }
+ export namespace mat2d {
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function identity(out: usize): usize;
+ export function fromValues(a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): usize;
+ export function set(out: usize, a: f64, b: f64, c: f64, d: f64, tx: f64, ty: f64): usize;
+ export function invert(out: usize, a: usize): usize;
+ export function determinant(a: usize): f64;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function rotate(out: usize, a: usize, rad: f64): usize;
+ export function scale(out: usize, a: usize, v: usize): usize;
+ export function translate(out: usize, a: usize, v: usize): usize;
+ export function fromRotation(out: usize, rad: f64): usize;
+ export function fromScaling(out: usize, v: usize): usize;
+ export function fromTranslation(out: usize, v: usize): usize;
+ export function str(a: usize): usize;
+ export function frob(a: usize): f64;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function multiplyScalar(out: usize, a: usize, b: f64): usize;
+ export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export var mul: usize;
+ export var sub: usize;
+ }
+ export namespace mat3 {
+ export function create(): usize;
+ export function fromMat4(out: usize, a: usize): usize;
+ export function clone(a: usize): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function fromValues(m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): usize;
+ export function set(out: usize, m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64): usize;
+ export function identity(out: usize): usize;
+ export function transpose(out: usize, a: usize): usize;
+ export function invert(out: usize, a: usize): usize;
+ export function adjoint(out: usize, a: usize): usize;
+ export function determinant(a: usize): f64;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function translate(out: usize, a: usize, v: usize): usize;
+ export function rotate(out: usize, a: usize, rad: f64): usize;
+ export function scale(out: usize, a: usize, v: usize): usize;
+ export function fromTranslation(out: usize, v: usize): usize;
+ export function fromRotation(out: usize, rad: f64): usize;
+ export function fromScaling(out: usize, v: usize): usize;
+ export function fromMat2d(out: usize, a: usize): usize;
+ export function fromQuat(out: usize, q: usize): usize;
+ export function normalFromMat4(out: usize, a: usize): usize;
+ export function projection(out: usize, width: f64, height: f64): usize;
+ export function str(a: usize): usize;
+ export function frob(a: usize): f64;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function multiplyScalar(out: usize, a: usize, b: f64): usize;
+ export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export var mul: usize;
+ export var sub: usize;
+ }
+ export namespace mat4 {
+ export class Fov {
+ static wrap(ptr: usize): Fov;
+ valueOf(): usize;
+ upDegrees: f64;
+ downDegrees: f64;
+ leftDegrees: f64;
+ rightDegrees: f64;
+ constructor();
+ }
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function fromValues(m00: f64, m01: f64, m02: f64, m03: f64, m10: f64, m11: f64, m12: f64, m13: f64, m20: f64, m21: f64, m22: f64, m23: f64, m30: f64, m31: f64, m32: f64, m33: f64): usize;
+ export function set(out: usize, m00: f64, m01: f64, m02: f64, m03: f64, m10: f64, m11: f64, m12: f64, m13: f64, m20: f64, m21: f64, m22: f64, m23: f64, m30: f64, m31: f64, m32: f64, m33: f64): usize;
+ export function identity(out: usize): usize;
+ export function transpose(out: usize, a: usize): usize;
+ export function invert(out: usize, a: usize): usize;
+ export function adjoint(out: usize, a: usize): usize;
+ export function determinant(a: usize): f64;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function translate(out: usize, a: usize, v: usize): usize;
+ export function scale(out: usize, a: usize, v: usize): usize;
+ export function rotate(out: usize, a: usize, rad: f64, axis: usize): usize;
+ export function rotateX(out: usize, a: usize, rad: f64): usize;
+ export function rotateY(out: usize, a: usize, rad: f64): usize;
+ export function rotateZ(out: usize, a: usize, rad: f64): usize;
+ export function fromTranslation(out: usize, v: usize): usize;
+ export function fromScaling(out: usize, v: usize): usize;
+ export function fromRotation(out: usize, rad: f64, axis: usize): usize;
+ export function fromXRotation(out: usize, rad: f64): usize;
+ export function fromYRotation(out: usize, rad: f64): usize;
+ export function fromZRotation(out: usize, rad: f64): usize;
+ export function fromRotationTranslation(out: usize, q: usize, v: usize): usize;
+ export function fromQuat2(out: usize, a: usize): usize;
+ export function getTranslation(out: usize, mat: usize): usize;
+ export function getScaling(out: usize, mat: usize): usize;
+ export function getRotation(out: usize, mat: usize): usize;
+ export function decompose(out_r: usize, out_t: usize, out_s: usize, mat: usize): usize;
+ export function fromRotationTranslationScale(out: usize, q: usize, v: usize, s: usize): usize;
+ export function fromRotationTranslationScaleOrigin(out: usize, q: usize, v: usize, s: usize, o: usize): usize;
+ export function fromQuat(out: usize, q: usize): usize;
+ export function frustum(out: usize, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): usize;
+ export function perspectiveNO(out: usize, fovy: f64, aspect: f64, near: f64, far: f64): usize;
+ export var perspective: usize;
+ export function perspectiveZO(out: usize, fovy: f64, aspect: f64, near: f64, far: f64): usize;
+ export function perspectiveFromFieldOfView(out: usize, fov: usize, near: f64, far: f64): usize;
+ export function orthoNO(out: usize, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): usize;
+ export var ortho: usize;
+ export function orthoZO(out: usize, left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64): usize;
+ export function lookAt(out: usize, eye: usize, center: usize, up: usize): usize;
+ export function targetTo(out: usize, eye: usize, target: usize, up: usize): usize;
+ export function str(a: usize): usize;
+ export function frob(a: usize): f64;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function multiplyScalar(out: usize, a: usize, b: f64): usize;
+ export function multiplyScalarAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export var mul: usize;
+ export var sub: usize;
+ }
+ export namespace quat {
+ export function create(): usize;
+ export function identity(out: usize): usize;
+ export function setAxisAngle(out: usize, axis: usize, rad: f64): usize;
+ export function getAxisAngle(out_axis: usize, q: usize): f64;
+ export function getAngle(a: usize, b: usize): f64;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function rotateX(out: usize, a: usize, rad: f64): usize;
+ export function rotateY(out: usize, a: usize, rad: f64): usize;
+ export function rotateZ(out: usize, a: usize, rad: f64): usize;
+ export function calculateW(out: usize, a: usize): usize;
+ export function exp(out: usize, a: usize): usize;
+ export function ln(out: usize, a: usize): usize;
+ export function pow(out: usize, a: usize, b: f64): usize;
+ export function slerp(out: usize, a: usize, b: usize, t: f64): usize;
+ export function random(out: usize): usize;
+ export function invert(out: usize, a: usize): usize;
+ export function conjugate(out: usize, a: usize): usize;
+ export function fromMat3(out: usize, m: usize): usize;
+ export function fromEuler(out: usize, x: f64, y: f64, z: f64, order?: usize): usize;
+ export function str(a: usize): usize;
+ export var clone: usize;
+ export var fromValues: usize;
+ export var copy: usize;
+ export var set: usize;
+ export var add: usize;
+ export var mul: usize;
+ export var scale: usize;
+ export var dot: usize;
+ export var lerp: usize;
+ export var length: usize;
+ export var len: usize;
+ export var squaredLength: usize;
+ export var sqrLen: usize;
+ export var normalize: usize;
+ export var exactEquals: usize;
+ export function equals(a: usize, b: usize): bool;
+ export var rotationTo: usize;
+ export var sqlerp: usize;
+ export var setAxes: usize;
+ }
+ export namespace quat2 {
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function fromValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): usize;
+ export function fromRotationTranslationValues(x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64): usize;
+ export function fromRotationTranslation(out: usize, q: usize, t: usize): usize;
+ export function fromTranslation(out: usize, t: usize): usize;
+ export function fromRotation(out: usize, q: usize): usize;
+ export function fromMat4(out: usize, a: usize): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function identity(out: usize): usize;
+ export function set(out: usize, x1: f64, y1: f64, z1: f64, w1: f64, x2: f64, y2: f64, z2: f64, w2: f64): usize;
+ export var getReal: usize;
+ export function getDual(out: usize, a: usize): usize;
+ export var setReal: usize;
+ export function setDual(out: usize, q: usize): usize;
+ export function getTranslation(out: usize, a: usize): usize;
+ export function translate(out: usize, a: usize, v: usize): usize;
+ export function rotateX(out: usize, a: usize, rad: f64): usize;
+ export function rotateY(out: usize, a: usize, rad: f64): usize;
+ export function rotateZ(out: usize, a: usize, rad: f64): usize;
+ export function rotateByQuatAppend(out: usize, a: usize, q: usize): usize;
+ export function rotateByQuatPrepend(out: usize, q: usize, a: usize): usize;
+ export function rotateAroundAxis(out: usize, a: usize, axis: usize, rad: f64): usize;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export var mul: usize;
+ export function scale(out: usize, a: usize, b: f64): usize;
+ export var dot: usize;
+ export function lerp(out: usize, a: usize, b: usize, t: f64): usize;
+ export function invert(out: usize, a: usize): usize;
+ export function conjugate(out: usize, a: usize): usize;
+ export var length: usize;
+ export var len: usize;
+ export var squaredLength: usize;
+ export var sqrLen: usize;
+ export function normalize(out: usize, a: usize): usize;
+ export function str(a: usize): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ }
+ export namespace vec2 {
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function fromValues(x: f64, y: f64): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function set(out: usize, x: f64, y: f64): usize;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function divide(out: usize, a: usize, b: usize): usize;
+ export function ceil(out: usize, a: usize): usize;
+ export function floor(out: usize, a: usize): usize;
+ export function min(out: usize, a: usize, b: usize): usize;
+ export function max(out: usize, a: usize, b: usize): usize;
+ export function round(out: usize, a: usize): usize;
+ export function scale(out: usize, a: usize, b: f64): usize;
+ export function scaleAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export function distance(a: usize, b: usize): f64;
+ export function squaredDistance(a: usize, b: usize): f64;
+ export function length(a: usize): f64;
+ export function squaredLength(a: usize): f64;
+ export function negate(out: usize, a: usize): usize;
+ export function inverse(out: usize, a: usize): usize;
+ export function normalize(out: usize, a: usize): usize;
+ export function dot(a: usize, b: usize): f64;
+ export function cross(out: usize, a: usize, b: usize): usize;
+ export function lerp(out: usize, a: usize, b: usize, t: f64): usize;
+ export function random(out: usize, scale: f64): usize;
+ export function transformMat2(out: usize, a: usize, m: usize): usize;
+ export function transformMat2d(out: usize, a: usize, m: usize): usize;
+ export function transformMat3(out: usize, a: usize, m: usize): usize;
+ export function transformMat4(out: usize, a: usize, m: usize): usize;
+ export function rotate(out: usize, a: usize, b: usize, rad: f64): usize;
+ export function angle(a: usize, b: usize): f64;
+ export function zero(out: usize): usize;
+ export function str(a: usize): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export var len: usize;
+ export var sub: usize;
+ export var mul: usize;
+ export var div: usize;
+ export var dist: usize;
+ export var sqrDist: usize;
+ export var sqrLen: usize;
+ export var forEach: usize;
+ }
+ export namespace vec3 {
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function length(a: usize): f64;
+ export function fromValues(x: f64, y: f64, z: f64): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function set(out: usize, x: f64, y: f64, z: f64): usize;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function divide(out: usize, a: usize, b: usize): usize;
+ export function ceil(out: usize, a: usize): usize;
+ export function floor(out: usize, a: usize): usize;
+ export function min(out: usize, a: usize, b: usize): usize;
+ export function max(out: usize, a: usize, b: usize): usize;
+ export function round(out: usize, a: usize): usize;
+ export function scale(out: usize, a: usize, b: f64): usize;
+ export function scaleAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export function distance(a: usize, b: usize): f64;
+ export function squaredDistance(a: usize, b: usize): f64;
+ export function squaredLength(a: usize): f64;
+ export function negate(out: usize, a: usize): usize;
+ export function inverse(out: usize, a: usize): usize;
+ export function normalize(out: usize, a: usize): usize;
+ export function dot(a: usize, b: usize): f64;
+ export function cross(out: usize, a: usize, b: usize): usize;
+ export function lerp(out: usize, a: usize, b: usize, t: f64): usize;
+ export function slerp(out: usize, a: usize, b: usize, t: f64): usize;
+ export function hermite(out: usize, a: usize, b: usize, c: usize, d: usize, t: f64): usize;
+ export function bezier(out: usize, a: usize, b: usize, c: usize, d: usize, t: f64): usize;
+ export function random(out: usize, scale: f64): usize;
+ export function transformMat4(out: usize, a: usize, m: usize): usize;
+ export function transformMat3(out: usize, a: usize, m: usize): usize;
+ export function transformQuat(out: usize, a: usize, q: usize): usize;
+ export function rotateX(out: usize, a: usize, b: usize, rad: f64): usize;
+ export function rotateY(out: usize, a: usize, b: usize, rad: f64): usize;
+ export function rotateZ(out: usize, a: usize, b: usize, rad: f64): usize;
+ export function angle(a: usize, b: usize): f64;
+ export function zero(out: usize): usize;
+ export function str(a: usize): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export var sub: usize;
+ export var mul: usize;
+ export var div: usize;
+ export var dist: usize;
+ export var sqrDist: usize;
+ export var len: usize;
+ export var sqrLen: usize;
+ export var forEach: usize;
+ }
+ export namespace vec4 {
+ export function create(): usize;
+ export function clone(a: usize): usize;
+ export function fromValues(x: f64, y: f64, z: f64, w: f64): usize;
+ export function copy(out: usize, a: usize): usize;
+ export function set(out: usize, x: f64, y: f64, z: f64, w: f64): usize;
+ export function add(out: usize, a: usize, b: usize): usize;
+ export function subtract(out: usize, a: usize, b: usize): usize;
+ export function multiply(out: usize, a: usize, b: usize): usize;
+ export function divide(out: usize, a: usize, b: usize): usize;
+ export function ceil(out: usize, a: usize): usize;
+ export function floor(out: usize, a: usize): usize;
+ export function min(out: usize, a: usize, b: usize): usize;
+ export function max(out: usize, a: usize, b: usize): usize;
+ export function round(out: usize, a: usize): usize;
+ export function scale(out: usize, a: usize, b: f64): usize;
+ export function scaleAndAdd(out: usize, a: usize, b: usize, scale: f64): usize;
+ export function distance(a: usize, b: usize): f64;
+ export function squaredDistance(a: usize, b: usize): f64;
+ export function length(a: usize): f64;
+ export function squaredLength(a: usize): f64;
+ export function negate(out: usize, a: usize): usize;
+ export function inverse(out: usize, a: usize): usize;
+ export function normalize(out: usize, a: usize): usize;
+ export function dot(a: usize, b: usize): f64;
+ export function cross(out: usize, u: usize, v: usize, w: usize): usize;
+ export function lerp(out: usize, a: usize, b: usize, t: f64): usize;
+ export function random(out: usize, scale: f64): usize;
+ export function transformMat4(out: usize, a: usize, m: usize): usize;
+ export function transformQuat(out: usize, a: usize, q: usize): usize;
+ export function zero(out: usize): usize;
+ export function str(a: usize): usize;
+ export function exactEquals(a: usize, b: usize): bool;
+ export function equals(a: usize, b: usize): bool;
+ export var sub: usize;
+ export var mul: usize;
+ export var div: usize;
+ export var dist: usize;
+ export var sqrDist: usize;
+ export var len: usize;
+ export var sqrLen: usize;
+ export var forEach: usize;
+ }
+}
+export default ASModule;
diff --git a/build/untouched.wat b/build/untouched.wat
new file mode 100644
index 00000000..bcc43cbb
--- /dev/null
+++ b/build/untouched.wat
@@ -0,0 +1,46702 @@
+(module
+ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
+ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32)))
+ (type $i32_i32_=>_none (func (param i32 i32)))
+ (type $i32_=>_i32 (func (param i32) (result i32)))
+ (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32)))
+ (type $i32_=>_f64 (func (param i32) (result f64)))
+ (type $i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 f64) (result i32)))
+ (type $i32_i32_=>_f64 (func (param i32 i32) (result f64)))
+ (type $none_=>_i32 (func (result i32)))
+ (type $i32_f64_=>_i32 (func (param i32 f64) (result i32)))
+ (type $none_=>_none (func))
+ (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32)))
+ (type $i32_i32_i32_=>_none (func (param i32 i32 i32)))
+ (type $none_=>_f64 (func (result f64)))
+ (type $i32_=>_none (func (param i32)))
+ (type $f64_=>_f64 (func (param f64) (result f64)))
+ (type $i32_f64_=>_none (func (param i32 f64)))
+ (type $i32_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64) (result i32)))
+ (type $i32_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $i32_i32_i32_i32_i32_f64_=>_i32 (func (param i32 i32 i32 i32 i32 f64) (result i32)))
+ (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32)))
+ (type $i32_i32_f64_=>_none (func (param i32 i32 f64)))
+ (type $i32_i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32 i32) (result i32)))
+ (type $i32_f64_f64_f64_i32_=>_i32 (func (param i32 f64 f64 f64 i32) (result i32)))
+ (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32)))
+ (type $i32_i32_f64_i32_=>_i32 (func (param i32 i32 f64 i32) (result i32)))
+ (type $i32_i32_f64_f64_=>_i32 (func (param i32 i32 f64 f64) (result i32)))
+ (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32)))
+ (type $i32_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64) (result i32)))
+ (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $i32_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param i32 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $f64_f64_=>_i32 (func (param f64 f64) (result i32)))
+ (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32)))
+ (type $f64_f64_=>_f64 (func (param f64 f64) (result f64)))
+ (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64)))
+ (type $i64_=>_none (func (param i64)))
+ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32)))
+ (type $f64_=>_i32 (func (param f64) (result i32)))
+ (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32)))
+ (type $f64_i32_=>_i32 (func (param f64 i32) (result i32)))
+ (type $f64_i64_=>_i32 (func (param f64 i64) (result i32)))
+ (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32)))
+ (type $f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result i32)))
+ (type $i64_=>_i64 (func (param i64) (result i64)))
+ (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64)))
+ (type $f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64) (result f64)))
+ (type $f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64) (result f64)))
+ (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64)))
+ (type $f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_f64_=>_f64 (func (param f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64) (result f64)))
+ (import "env" "seed" (func $~lib/builtins/seed (result f64)))
+ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_entryfile_flag i32 (i32.const 1))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_String_ID i32 (i32.const 1))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBuffer_ID i32 (i32.const 0))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBufferView_ID i32 (i32.const 2))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int8Array_ID i32 (i32.const 3))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint8Array_ID i32 (i32.const 4))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int16Array_ID i32 (i32.const 5))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint16Array_ID i32 (i32.const 6))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int32Array_ID i32 (i32.const 7))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint32Array_ID i32 (i32.const 8))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float32Array_ID i32 (i32.const 9))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float64Array_ID i32 (i32.const 10))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int64Array_ID i32 (i32.const 11))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint64Array_ID i32 (i32.const 12))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32Array_ID i32 (i32.const 13))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64Array_ID i32 (i32.const 14))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArray_ID i32 (i32.const 15))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArray_ID i32 (i32.const 16))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32ArrayArray_ID i32 (i32.const 17))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64ArrayArray_ID i32 (i32.const 18))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArrayArray_ID i32 (i32.const 19))
+ (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArrayArray_ID i32 (i32.const 20))
+ (global $assembly/common/EPSILON f64 (f64.const 1e-06))
+ (global $assembly/common/ArrayTypeEnum.Float64ArrayT i32 (i32.const 10))
+ (global $assembly/common/ArrayTypeEnum.ArrayF64T i32 (i32.const 21))
+ (global $assembly/common/ARRAY_TYPE (mut i32) (i32.const 0))
+ (global $~lib/math/random_seeded (mut i32) (i32.const 0))
+ (global $~lib/math/random_state0_64 (mut i64) (i64.const 0))
+ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0))
+ (global $~lib/math/random_state0_32 (mut i32) (i32.const 0))
+ (global $~lib/math/random_state1_32 (mut i32) (i32.const 0))
+ (global $assembly/common/RANDOM (mut i32) (i32.const 80))
+ (global $assembly/common/ANGLE_ORDER (mut i32) (i32.const 112))
+ (global $~lib/math/NativeMath.PI f64 (f64.const 3.141592653589793))
+ (global $assembly/common/degree f64 (f64.const 0.017453292519943295))
+ (global $assembly/mat2d/mul i32 (i32.const 272))
+ (global $assembly/mat2d/sub i32 (i32.const 304))
+ (global $assembly/vec3/sub i32 (i32.const 336))
+ (global $assembly/vec3/mul i32 (i32.const 368))
+ (global $assembly/vec3/div i32 (i32.const 400))
+ (global $assembly/vec3/dist i32 (i32.const 464))
+ (global $assembly/vec3/sqrDist i32 (i32.const 496))
+ (global $assembly/vec3/len i32 (i32.const 528))
+ (global $assembly/vec3/sqrLen i32 (i32.const 560))
+ (global $~lib/rt/itcms/total (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/state (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/iter (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/white (mut i32) (i32.const 0))
+ (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0))
+ (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0))
+ (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0))
+ (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0))
+ (global $assembly/vec3/vec (mut i32) (i32.const 0))
+ (global $~argumentsLength (mut i32) (i32.const 0))
+ (global $assembly/vec3/forEach (mut i32) (i32.const 0))
+ (global $assembly/vec4/sub i32 (i32.const 1104))
+ (global $assembly/vec4/mul i32 (i32.const 1136))
+ (global $assembly/vec4/div i32 (i32.const 1168))
+ (global $assembly/vec4/dist i32 (i32.const 1200))
+ (global $assembly/vec4/sqrDist i32 (i32.const 1232))
+ (global $assembly/vec4/len i32 (i32.const 1264))
+ (global $assembly/vec4/sqrLen i32 (i32.const 1296))
+ (global $assembly/vec4/vec (mut i32) (i32.const 0))
+ (global $assembly/vec4/forEach (mut i32) (i32.const 0))
+ (global $assembly/quat/clone i32 (i32.const 1392))
+ (global $assembly/quat/fromValues i32 (i32.const 1424))
+ (global $assembly/quat/copy i32 (i32.const 1456))
+ (global $assembly/quat/set i32 (i32.const 1488))
+ (global $assembly/quat/add i32 (i32.const 1520))
+ (global $assembly/quat/mul i32 (i32.const 1552))
+ (global $assembly/quat/scale i32 (i32.const 1584))
+ (global $assembly/quat/dot i32 (i32.const 1616))
+ (global $assembly/quat/lerp i32 (i32.const 1648))
+ (global $assembly/quat/length i32 (i32.const 1264))
+ (global $assembly/quat/len i32 (i32.const 1264))
+ (global $assembly/quat/squaredLength i32 (i32.const 1296))
+ (global $assembly/quat/sqrLen i32 (i32.const 1296))
+ (global $assembly/quat/normalize i32 (i32.const 1680))
+ (global $assembly/quat/exactEquals i32 (i32.const 1712))
+ (global $assembly/quat/tmpvec3 (mut i32) (i32.const 0))
+ (global $assembly/quat/xUnitVec3 (mut i32) (i32.const 0))
+ (global $assembly/quat/yUnitVec3 (mut i32) (i32.const 0))
+ (global $~lib/math/rempio2_y0 (mut f64) (f64.const 0))
+ (global $~lib/math/rempio2_y1 (mut f64) (f64.const 0))
+ (global $~lib/math/res128_hi (mut i64) (i64.const 0))
+ (global $assembly/quat/rotationTo (mut i32) (i32.const 0))
+ (global $assembly/quat/temp1 (mut i32) (i32.const 0))
+ (global $assembly/quat/temp2 (mut i32) (i32.const 0))
+ (global $assembly/quat/sqlerp (mut i32) (i32.const 0))
+ (global $assembly/quat/matr (mut i32) (i32.const 0))
+ (global $assembly/quat/setAxes (mut i32) (i32.const 0))
+ (global $assembly/quat2/getReal i32 (i32.const 1456))
+ (global $assembly/quat2/setReal i32 (i32.const 1456))
+ (global $assembly/quat2/mul i32 (i32.const 2144))
+ (global $assembly/quat2/dot i32 (i32.const 1616))
+ (global $assembly/quat2/length i32 (i32.const 1264))
+ (global $assembly/quat2/len i32 (i32.const 1264))
+ (global $assembly/quat2/squaredLength i32 (i32.const 1296))
+ (global $assembly/quat2/sqrLen i32 (i32.const 1296))
+ (global $assembly/mat4/perspective i32 (i32.const 2208))
+ (global $assembly/mat4/ortho i32 (i32.const 2240))
+ (global $assembly/mat4/mul i32 (i32.const 2272))
+ (global $assembly/mat4/sub i32 (i32.const 2304))
+ (global $assembly/mat3/mul i32 (i32.const 2336))
+ (global $assembly/mat3/sub i32 (i32.const 2368))
+ (global $assembly/vec2/len i32 (i32.const 2400))
+ (global $assembly/vec2/sub i32 (i32.const 2432))
+ (global $assembly/vec2/mul i32 (i32.const 2464))
+ (global $assembly/vec2/div i32 (i32.const 2496))
+ (global $assembly/vec2/dist i32 (i32.const 2528))
+ (global $assembly/vec2/sqrDist i32 (i32.const 2560))
+ (global $assembly/vec2/sqrLen i32 (i32.const 2592))
+ (global $assembly/vec2/vec (mut i32) (i32.const 0))
+ (global $assembly/vec2/forEach (mut i32) (i32.const 0))
+ (global $assembly/mat2/mul i32 (i32.const 2688))
+ (global $assembly/mat2/sub i32 (i32.const 2720))
+ (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0))
+ (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0))
+ (global $~lib/util/number/_exp (mut i32) (i32.const 0))
+ (global $~lib/util/number/_K (mut i32) (i32.const 0))
+ (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0))
+ (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0))
+ (global $assembly/mat4/Fov i32 (i32.const 44))
+ (global $~lib/rt/__rtti_base i32 (i32.const 11472))
+ (global $~lib/memory/__data_end i32 (i32.const 11836))
+ (global $~lib/memory/__stack_pointer (mut i32) (i32.const 28220))
+ (global $~lib/memory/__heap_base i32 (i32.const 28220))
+ (memory $0 1)
+ (data (i32.const 12) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00\00\00\00\00")
+ (data (i32.const 60) "\1c\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\08\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 92) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00y\00x\00\00\00\00\00\00\00")
+ (data (i32.const 124) "<\00\00\00\00\00\00\00\00\00\00\00\01\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 (i32.const 188) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 252) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 284) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 316) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 348) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 380) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 412) "\1c\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\08\00\00\00\07\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 444) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 476) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00\t\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 508) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 540) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 572) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h\00")
+ (data (i32.const 620) "<\00\00\00\00\00\00\00\00\00\00\00\01\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 (i32.const 684) "<\00\00\00\00\00\00\00\00\00\00\00\01\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 (i32.const 748) "<\00\00\00\00\00\00\00\00\00\00\00\01\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 (i32.const 816) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 848) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 876) ",\00\00\00\00\00\00\00\00\00\00\00\01\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 (i32.const 928) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 956) "<\00\00\00\00\00\00\00\00\00\00\00\01\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 (i32.const 1020) "\1c\00\00\00\00\00\00\00\00\00\00\00\1d\00\00\00\08\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1052) "\1c\00\00\00\00\00\00\00\00\00\00\00\1c\00\00\00\08\00\00\00\0d\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1084) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1116) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\0f\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1148) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1180) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00\11\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1212) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1244) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\00\13\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1276) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1308) "\1c\00\00\00\00\00\00\00\00\00\00\00\1d\00\00\00\08\00\00\00\15\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1340) "\1c\00\00\00\00\00\00\00\00\00\00\00\1c\00\00\00\08\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1372) "\1c\00\00\00\00\00\00\00\00\00\00\00\1e\00\00\00\08\00\00\00\17\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1404) "\1c\00\00\00\00\00\00\00\00\00\00\00\1f\00\00\00\08\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1436) "\1c\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\08\00\00\00\19\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1468) "\1c\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\08\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1500) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\1b\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1532) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1564) "\1c\00\00\00\00\00\00\00\00\00\00\00\"\00\00\00\08\00\00\00\1d\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1596) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1628) "\1c\00\00\00\00\00\00\00\00\00\00\00#\00\00\00\08\00\00\00\1f\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1660) "\1c\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\08\00\00\00 \00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1692) "\1c\00\00\00\00\00\00\00\00\00\00\00$\00\00\00\08\00\00\00!\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1728) "n\83\f9\a2\00\00\00\00\d1W\'\fc)\15DN\99\95b\db\c0\dd4\f5\abcQ\feA\90C<:n$\b7a\c5\bb\de\ea.I\06\e0\d2MB\1c\eb\1d\fe\1c\92\d1\t\f55\82\e8>\a7)\b1&p\9c\e9\84D\bb.9\d6\919A~_\b4\8b_\84\9c\f49S\83\ff\97\f8\1f;(\f9\bd\8b\11/\ef\0f\98\05\de\cf~6m\1fm\nZf?FO\b7\t\cb\'\c7\ba\'u-\ea_\9e\f79\07={\f1\e5\eb\b1_\fbk\ea\92R\8aF0\03V\08]\8d\1f \bc\cf\f0\abk{\fca\91\e3\a9\1d6\f4\9a_\85\99e\08\1b\e6^\80\d8\ff\8d@h\a0\14W\15\06\061\'sM")
+ (data (i32.const 1932) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1964) "\1c\00\00\00\00\00\00\00\00\00\00\00%\00\00\00\08\00\00\00#\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 1996) "\1c\00\00\00\00\00\00\00\00\00\00\00\'\00\00\00\08\00\00\00$\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2028) "\1c\00\00\00\00\00\00\00\00\00\00\00&\00\00\00\08\00\00\00%\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2060) "\1c\00\00\00\00\00\00\00\00\00\00\00)\00\00\00\08\00\00\00&\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2092) "\1c\00\00\00\00\00\00\00\00\00\00\00(\00\00\00\08\00\00\00\'\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2124) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00(\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2156) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r\00")
+ (data (i32.const 2188) "\1c\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\08\00\00\00)\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2220) "\1c\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\08\00\00\00*\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2252) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00+\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2284) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00,\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2316) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00-\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2348) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\00.\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2380) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\00/\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2412) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\000\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2444) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\001\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2476) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\002\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2508) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\003\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2540) "\1c\00\00\00\00\00\00\00\00\00\00\00\19\00\00\00\08\00\00\004\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2572) "\1c\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\08\00\00\005\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2604) "\1c\00\00\00\00\00\00\00\00\00\00\00\1d\00\00\00\08\00\00\006\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2636) "\1c\00\00\00\00\00\00\00\00\00\00\00\1c\00\00\00\08\00\00\007\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2668) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\008\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2700) "\1c\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\08\00\00\009\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2732) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00m\00a\00t\002\00(\00\00\00")
+ (data (i32.const 2764) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\000\00.\000\00\00\00\00\00\00\00")
+ (data (i32.const 2796) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00N\00a\00N\00\00\00\00\00\00\00")
+ (data (i32.const 2828) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2876) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 2928) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\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 (i32.const 2984) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a6\b2O\ce1\ef?\f2\e7\1f\98+G\80<\dd|\e2eE+\ef?^\08q?{\b8\96\bc\81c\f5\e1\df$\ef?1\ab\tm\e1\f7\82<\e1\de\1f\f5\9d\1e\ef?\fa\bfo\1a\9b!=\bc\90\d9\da\d0\7f\18\ef?\b4\n\0cr\827\8b<\0b\03\e4\a6\85\12\ef?\8f\cb\ce\89\92\14n\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90]\deOi\a0\ee?\1d\a5M\b9\dc2{\bc\87\01\ebs\14\a1\ee?k\c0gT\fd\ec\94<2\c10\01\ed\a1\ee?Ul\d6\ab\e1\ebeT\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?")
+ (data (i32.const 6544) "\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\"\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\\\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90\')\e1\e9\d1\bf\df\bd\b2\db\"\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\"\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D\':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\"\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\\/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\n\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_\'\90\b9Q\f1?\00\e0\a1\de\\H\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\\\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea\'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\t\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\\\a9?\b5\99\n\83\91:\ee?\00\80W\efj\'\ad?V\9a`\t\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\\\fbf\ac\\\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,\'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\n\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\t\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\t\ef@W\ea?\00\80\f6T)\e9\c8?\'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\\Q[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\\\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\tU\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa\'t\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\t0\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?")
+ (data (i32.const 8592) "k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\tqf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\n\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\n\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc")
+ (data (i32.const 10652) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00y\00z\00\00\00\00\00\00\00")
+ (data (i32.const 10684) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00x\00z\00y\00\00\00\00\00\00\00")
+ (data (i32.const 10716) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00x\00z\00\00\00\00\00\00\00")
+ (data (i32.const 10748) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00y\00z\00x\00\00\00\00\00\00\00")
+ (data (i32.const 10780) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00z\00x\00y\00\00\00\00\00\00\00")
+ (data (i32.const 10812) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00U\00n\00k\00n\00o\00w\00n\00 \00a\00n\00g\00l\00e\00 \00o\00r\00d\00e\00r\00 \00\00\00\00\00")
+ (data (i32.const 10876) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00 \00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00q\00u\00a\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data (i32.const 10940) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00q\00u\00a\00t\00(\00\00\00")
+ (data (i32.const 10972) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00q\00u\00a\00t\002\00(\00")
+ (data (i32.const 11004) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\002\00(\00\00\00")
+ (data (i32.const 11036) "\1c\00\00\00\00\00\00\00\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 (i32.const 11068) "\1c\00\00\00\00\00\00\00\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 (i32.const 11100) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00")
+ (data (i32.const 11148) "\1c\00\00\00\00\00\00\00\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 (i32.const 11180) "\1c\00\00\00\00\00\00\00\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 (i32.const 11212) "\1c\00\00\00\00\00\00\00\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 (i32.const 11244) "\1c\00\00\00\00\00\00\00\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 (i32.const 11276) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\003\00(\00\00\00")
+ (data (i32.const 11308) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00v\00e\00c\004\00(\00\00\00")
+ (data (i32.const 11340) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00*\00\00\00O\00b\00j\00e\00c\00t\00 \00a\00l\00r\00e\00a\00d\00y\00 \00p\00i\00n\00n\00e\00d\00\00\00")
+ (data (i32.const 11404) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00O\00b\00j\00e\00c\00t\00 \00i\00s\00 \00n\00o\00t\00 \00p\00i\00n\00n\00e\00d\00\00\00\00\00")
+ (data (i32.const 11472) "-\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00A\08\00\00\02\00\00\00A\00\00\00\02\00\00\00\81\08\00\00\02\00\00\00\81\00\00\00\02\00\00\00\01\t\00\00\02\00\00\00\01\01\00\00\02\00\00\00\01\19\00\00\02\00\00\00\01\1a\00\00\02\00\00\00\01\n\00\00\02\00\00\00\01\02\00\00\02\00\00\00\02\t\00\00\00\00\00\00\02\n\00\00\00\00\00\00\02A\00\00\00\00\00\00B\00\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02A\00\00\00\00\00\00\02\1a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02A\00\00\00\00\00\00 \00\00\00\00\00\00\00")
+ (table $0 58 funcref)
+ (elem $0 (i32.const 1) $~lib/math/NativeMath.random $assembly/mat2d/multiply $assembly/mat2d/subtract $assembly/vec3/subtract $assembly/vec3/multiply $assembly/vec3/divide $~lib/math/NativeMath.hypot $assembly/vec3/distance $assembly/vec3/squaredDistance $assembly/vec3/length $assembly/vec3/squaredLength $start:assembly/vec3~anonymous|0~anonymous|0 $start:assembly/vec3~anonymous|0 $assembly/vec4/subtract $assembly/vec4/multiply $assembly/vec4/divide $assembly/vec4/distance $assembly/vec4/squaredDistance $assembly/vec4/length $assembly/vec4/squaredLength $start:assembly/vec4~anonymous|0~anonymous|0 $start:assembly/vec4~anonymous|0 $assembly/vec4/clone $assembly/vec4/fromValues $assembly/vec4/copy $assembly/vec4/set $assembly/vec4/add $assembly/quat/multiply $assembly/vec4/scale $assembly/vec4/dot $assembly/vec4/lerp $assembly/vec4/normalize $assembly/vec4/exactEquals $start:assembly/quat~anonymous|0~anonymous|0 $start:assembly/quat~anonymous|0 $start:assembly/quat~anonymous|1~anonymous|0 $start:assembly/quat~anonymous|1 $start:assembly/quat~anonymous|2~anonymous|0 $start:assembly/quat~anonymous|2 $assembly/quat2/multiply $assembly/mat4/perspectiveNO $assembly/mat4/orthoNO $assembly/mat4/multiply $assembly/mat4/subtract $assembly/mat3/multiply $assembly/mat3/subtract $assembly/vec2/length $assembly/vec2/subtract $assembly/vec2/multiply $assembly/vec2/divide $assembly/vec2/distance $assembly/vec2/squaredDistance $assembly/vec2/squaredLength $start:assembly/vec2~anonymous|0~anonymous|0 $start:assembly/vec2~anonymous|0 $assembly/mat2/multiply $assembly/mat2/subtract)
+ (export "__asbind_entryfile_flag" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_entryfile_flag))
+ (export "__asbind_String_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_String_ID))
+ (export "__asbind_ArrayBuffer_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBuffer_ID))
+ (export "__asbind_ArrayBufferView_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_ArrayBufferView_ID))
+ (export "__asbind_Int8Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int8Array_ID))
+ (export "__asbind_Uint8Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint8Array_ID))
+ (export "__asbind_Int16Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int16Array_ID))
+ (export "__asbind_Uint16Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint16Array_ID))
+ (export "__asbind_Int32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int32Array_ID))
+ (export "__asbind_Uint32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint32Array_ID))
+ (export "__asbind_Float32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float32Array_ID))
+ (export "__asbind_Float64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Float64Array_ID))
+ (export "__asbind_Int64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Int64Array_ID))
+ (export "__asbind_Uint64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_Uint64Array_ID))
+ (export "__asbind_I32Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32Array_ID))
+ (export "__asbind_I64Array_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64Array_ID))
+ (export "__asbind_StringArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArray_ID))
+ (export "__asbind_BoolArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArray_ID))
+ (export "__asbind_I32ArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I32ArrayArray_ID))
+ (export "__asbind_I64ArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_I64ArrayArray_ID))
+ (export "__asbind_StringArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_StringArrayArray_ID))
+ (export "__asbind_BoolArrayArray_ID" (global $node_modules/as-bind/lib/assembly/as-bind/__asbind_BoolArrayArray_ID))
+ (export "glMatrix.EPSILON" (global $assembly/common/EPSILON))
+ (export "glMatrix.ArrayTypeEnum.Float64ArrayT" (global $assembly/common/ArrayTypeEnum.Float64ArrayT))
+ (export "glMatrix.ArrayTypeEnum.ArrayF64T" (global $assembly/common/ArrayTypeEnum.ArrayF64T))
+ (export "glMatrix.ARRAY_TYPE" (global $assembly/common/ARRAY_TYPE))
+ (export "glMatrix.RANDOM" (global $assembly/common/RANDOM))
+ (export "glMatrix.ANGLE_ORDER" (global $assembly/common/ANGLE_ORDER))
+ (export "glMatrix.setMatrixArrayType" (func $assembly/common/setMatrixArrayType))
+ (export "glMatrix.toRadian" (func $assembly/common/toRadian))
+ (export "glMatrix.equals" (func $assembly/common/equals))
+ (export "mat2.create" (func $assembly/mat2/create))
+ (export "mat2.fromValues" (func $assembly/mat2/fromValues))
+ (export "mat2.mul" (global $assembly/mat2/mul))
+ (export "mat2.sub" (global $assembly/mat2/sub))
+ (export "mat2d.create" (func $assembly/mat2d/create))
+ (export "mat2d.fromValues" (func $assembly/mat2d/fromValues))
+ (export "mat2d.mul" (global $assembly/mat2d/mul))
+ (export "mat2d.sub" (global $assembly/mat2d/sub))
+ (export "mat3.create" (func $assembly/mat3/create))
+ (export "mat3.fromValues" (func $assembly/mat3/fromValues))
+ (export "mat3.mul" (global $assembly/mat3/mul))
+ (export "mat3.sub" (global $assembly/mat3/sub))
+ (export "mat4.Fov" (global $assembly/mat4/Fov))
+ (export "mat4.create" (func $assembly/mat4/create))
+ (export "mat4.fromValues" (func $assembly/mat4/fromValues))
+ (export "mat4.perspective" (global $assembly/mat4/perspective))
+ (export "mat4.ortho" (global $assembly/mat4/ortho))
+ (export "mat4.mul" (global $assembly/mat4/mul))
+ (export "mat4.sub" (global $assembly/mat4/sub))
+ (export "quat.create" (func $assembly/quat/create))
+ (export "quat.clone" (global $assembly/quat/clone))
+ (export "quat.fromValues" (global $assembly/quat/fromValues))
+ (export "quat.copy" (global $assembly/quat/copy))
+ (export "quat.set" (global $assembly/quat/set))
+ (export "quat.add" (global $assembly/quat/add))
+ (export "quat.mul" (global $assembly/quat/mul))
+ (export "quat.scale" (global $assembly/quat/scale))
+ (export "quat.dot" (global $assembly/quat/dot))
+ (export "quat.lerp" (global $assembly/quat/lerp))
+ (export "quat.length" (global $assembly/quat/length))
+ (export "quat.len" (global $assembly/quat/len))
+ (export "quat.squaredLength" (global $assembly/quat/squaredLength))
+ (export "quat.sqrLen" (global $assembly/quat/sqrLen))
+ (export "quat.normalize" (global $assembly/quat/normalize))
+ (export "quat.exactEquals" (global $assembly/quat/exactEquals))
+ (export "quat.rotationTo" (global $assembly/quat/rotationTo))
+ (export "quat.sqlerp" (global $assembly/quat/sqlerp))
+ (export "quat.setAxes" (global $assembly/quat/setAxes))
+ (export "quat2.create" (func $assembly/quat2/create))
+ (export "quat2.fromValues" (func $assembly/quat2/fromValues))
+ (export "quat2.fromRotationTranslationValues" (func $assembly/quat2/fromRotationTranslationValues))
+ (export "quat2.getReal" (global $assembly/quat2/getReal))
+ (export "quat2.setReal" (global $assembly/quat2/setReal))
+ (export "quat2.mul" (global $assembly/quat2/mul))
+ (export "quat2.dot" (global $assembly/quat2/dot))
+ (export "quat2.length" (global $assembly/quat2/length))
+ (export "quat2.len" (global $assembly/quat2/len))
+ (export "quat2.squaredLength" (global $assembly/quat2/squaredLength))
+ (export "quat2.sqrLen" (global $assembly/quat2/sqrLen))
+ (export "vec2.create" (func $assembly/vec2/create))
+ (export "vec2.fromValues" (func $assembly/vec2/fromValues))
+ (export "vec2.len" (global $assembly/vec2/len))
+ (export "vec2.sub" (global $assembly/vec2/sub))
+ (export "vec2.mul" (global $assembly/vec2/mul))
+ (export "vec2.div" (global $assembly/vec2/div))
+ (export "vec2.dist" (global $assembly/vec2/dist))
+ (export "vec2.sqrDist" (global $assembly/vec2/sqrDist))
+ (export "vec2.sqrLen" (global $assembly/vec2/sqrLen))
+ (export "vec2.forEach" (global $assembly/vec2/forEach))
+ (export "vec3.create" (func $assembly/vec3/create))
+ (export "vec3.fromValues" (func $assembly/vec3/fromValues))
+ (export "vec3.sub" (global $assembly/vec3/sub))
+ (export "vec3.mul" (global $assembly/vec3/mul))
+ (export "vec3.div" (global $assembly/vec3/div))
+ (export "vec3.dist" (global $assembly/vec3/dist))
+ (export "vec3.sqrDist" (global $assembly/vec3/sqrDist))
+ (export "vec3.len" (global $assembly/vec3/len))
+ (export "vec3.sqrLen" (global $assembly/vec3/sqrLen))
+ (export "vec3.forEach" (global $assembly/vec3/forEach))
+ (export "vec4.create" (func $assembly/vec4/create))
+ (export "vec4.fromValues" (func $assembly/vec4/fromValues))
+ (export "vec4.sub" (global $assembly/vec4/sub))
+ (export "vec4.mul" (global $assembly/vec4/mul))
+ (export "vec4.div" (global $assembly/vec4/div))
+ (export "vec4.dist" (global $assembly/vec4/dist))
+ (export "vec4.sqrDist" (global $assembly/vec4/sqrDist))
+ (export "vec4.len" (global $assembly/vec4/len))
+ (export "vec4.sqrLen" (global $assembly/vec4/sqrLen))
+ (export "vec4.forEach" (global $assembly/vec4/forEach))
+ (export "__new" (func $~lib/rt/itcms/__new))
+ (export "__pin" (func $~lib/rt/itcms/__pin))
+ (export "__unpin" (func $~lib/rt/itcms/__unpin))
+ (export "__collect" (func $~lib/rt/itcms/__collect))
+ (export "__rtti_base" (global $~lib/rt/__rtti_base))
+ (export "memory" (memory $0))
+ (export "__setArgumentsLength" (func $~setArgumentsLength))
+ (export "mat2.clone" (func $export:assembly/mat2/clone))
+ (export "mat2.copy" (func $export:assembly/mat2/copy))
+ (export "mat2.identity" (func $export:assembly/mat2/identity))
+ (export "mat2.set" (func $export:assembly/mat2/set))
+ (export "mat2.transpose" (func $export:assembly/mat2/transpose))
+ (export "mat2.invert" (func $export:assembly/mat2/invert))
+ (export "mat2.adjoint" (func $export:assembly/mat2/adjoint))
+ (export "mat2.determinant" (func $export:assembly/mat2/determinant))
+ (export "mat2.multiply" (func $export:assembly/mat2/multiply))
+ (export "mat2.rotate" (func $export:assembly/mat2/rotate))
+ (export "mat2.scale" (func $export:assembly/mat2/scale))
+ (export "mat2.fromRotation" (func $export:assembly/mat2/fromRotation))
+ (export "mat2.fromScaling" (func $export:assembly/mat2/fromScaling))
+ (export "mat2.str" (func $export:assembly/mat2/str))
+ (export "mat2.frob" (func $export:assembly/mat2/frob))
+ (export "mat2.LDU" (func $export:assembly/mat2/LDU))
+ (export "mat2.add" (func $export:assembly/mat2/add))
+ (export "mat2.subtract" (func $export:assembly/mat2/subtract))
+ (export "mat2.exactEquals" (func $export:assembly/mat2/exactEquals))
+ (export "mat2.equals" (func $export:assembly/mat2/equals))
+ (export "mat2.multiplyScalar" (func $export:assembly/mat2/multiplyScalar))
+ (export "mat2.multiplyScalarAndAdd" (func $export:assembly/mat2/multiplyScalarAndAdd))
+ (export "mat2d.clone" (func $export:assembly/mat2d/clone))
+ (export "mat2d.copy" (func $export:assembly/mat2d/copy))
+ (export "mat2d.identity" (func $export:assembly/mat2d/identity))
+ (export "mat2d.set" (func $export:assembly/mat2d/set))
+ (export "mat2d.invert" (func $export:assembly/mat2d/invert))
+ (export "mat2d.determinant" (func $export:assembly/mat2d/determinant))
+ (export "mat2d.multiply" (func $export:assembly/mat2d/multiply))
+ (export "mat2d.rotate" (func $export:assembly/mat2d/rotate))
+ (export "mat2d.scale" (func $export:assembly/mat2d/scale))
+ (export "mat2d.translate" (func $export:assembly/mat2d/translate))
+ (export "mat2d.fromRotation" (func $export:assembly/mat2d/fromRotation))
+ (export "mat2d.fromScaling" (func $export:assembly/mat2d/fromScaling))
+ (export "mat2d.fromTranslation" (func $export:assembly/mat2d/fromTranslation))
+ (export "mat2d.str" (func $export:assembly/mat2d/str))
+ (export "mat2d.frob" (func $export:assembly/mat2d/frob))
+ (export "mat2d.add" (func $export:assembly/mat2d/add))
+ (export "mat2d.subtract" (func $export:assembly/mat2d/subtract))
+ (export "mat2d.multiplyScalar" (func $export:assembly/mat2d/multiplyScalar))
+ (export "mat2d.multiplyScalarAndAdd" (func $export:assembly/mat2d/multiplyScalarAndAdd))
+ (export "mat2d.exactEquals" (func $export:assembly/mat2d/exactEquals))
+ (export "mat2d.equals" (func $export:assembly/mat2d/equals))
+ (export "mat3.fromMat4" (func $export:assembly/mat3/fromMat4))
+ (export "mat3.clone" (func $export:assembly/mat3/clone))
+ (export "mat3.copy" (func $export:assembly/mat3/copy))
+ (export "mat3.set" (func $export:assembly/mat3/set))
+ (export "mat3.identity" (func $export:assembly/mat3/identity))
+ (export "mat3.transpose" (func $export:assembly/mat3/transpose))
+ (export "mat3.invert" (func $export:assembly/mat3/invert))
+ (export "mat3.adjoint" (func $export:assembly/mat3/adjoint))
+ (export "mat3.determinant" (func $export:assembly/mat3/determinant))
+ (export "mat3.multiply" (func $export:assembly/mat3/multiply))
+ (export "mat3.translate" (func $export:assembly/mat3/translate))
+ (export "mat3.rotate" (func $export:assembly/mat3/rotate))
+ (export "mat3.scale" (func $export:assembly/mat3/scale))
+ (export "mat3.fromTranslation" (func $export:assembly/mat3/fromTranslation))
+ (export "mat3.fromRotation" (func $export:assembly/mat3/fromRotation))
+ (export "mat3.fromScaling" (func $export:assembly/mat3/fromScaling))
+ (export "mat3.fromMat2d" (func $export:assembly/mat3/fromMat2d))
+ (export "mat3.fromQuat" (func $export:assembly/mat3/fromQuat))
+ (export "mat3.normalFromMat4" (func $export:assembly/mat3/normalFromMat4))
+ (export "mat3.projection" (func $export:assembly/mat3/projection))
+ (export "mat3.str" (func $export:assembly/mat3/str))
+ (export "mat3.frob" (func $export:assembly/mat3/frob))
+ (export "mat3.add" (func $export:assembly/mat3/add))
+ (export "mat3.subtract" (func $export:assembly/mat3/subtract))
+ (export "mat3.multiplyScalar" (func $export:assembly/mat3/multiplyScalar))
+ (export "mat3.multiplyScalarAndAdd" (func $export:assembly/mat3/multiplyScalarAndAdd))
+ (export "mat3.exactEquals" (func $export:assembly/mat3/exactEquals))
+ (export "mat3.equals" (func $export:assembly/mat3/equals))
+ (export "mat4.Fov#get:upDegrees" (func $export:assembly/mat4/Fov#get:upDegrees))
+ (export "mat4.Fov#set:upDegrees" (func $export:assembly/mat4/Fov#set:upDegrees))
+ (export "mat4.Fov#get:downDegrees" (func $export:assembly/mat4/Fov#get:downDegrees))
+ (export "mat4.Fov#set:downDegrees" (func $export:assembly/mat4/Fov#set:downDegrees))
+ (export "mat4.Fov#get:leftDegrees" (func $export:assembly/mat4/Fov#get:leftDegrees))
+ (export "mat4.Fov#set:leftDegrees" (func $export:assembly/mat4/Fov#set:leftDegrees))
+ (export "mat4.Fov#get:rightDegrees" (func $export:assembly/mat4/Fov#get:rightDegrees))
+ (export "mat4.Fov#set:rightDegrees" (func $export:assembly/mat4/Fov#set:rightDegrees))
+ (export "mat4.Fov#constructor" (func $export:assembly/mat4/Fov#constructor))
+ (export "mat4.clone" (func $export:assembly/mat4/clone))
+ (export "mat4.copy" (func $export:assembly/mat4/copy))
+ (export "mat4.set" (func $export:assembly/mat4/set))
+ (export "mat4.identity" (func $export:assembly/mat4/identity))
+ (export "mat4.transpose" (func $export:assembly/mat4/transpose))
+ (export "mat4.invert" (func $export:assembly/mat4/invert))
+ (export "mat4.adjoint" (func $export:assembly/mat4/adjoint))
+ (export "mat4.determinant" (func $export:assembly/mat4/determinant))
+ (export "mat4.multiply" (func $export:assembly/mat4/multiply))
+ (export "mat4.translate" (func $export:assembly/mat4/translate))
+ (export "mat4.scale" (func $export:assembly/mat4/scale))
+ (export "mat4.rotate" (func $export:assembly/mat4/rotate))
+ (export "mat4.rotateX" (func $export:assembly/mat4/rotateX))
+ (export "mat4.rotateY" (func $export:assembly/mat4/rotateY))
+ (export "mat4.rotateZ" (func $export:assembly/mat4/rotateZ))
+ (export "mat4.fromTranslation" (func $export:assembly/mat4/fromTranslation))
+ (export "mat4.fromScaling" (func $export:assembly/mat4/fromScaling))
+ (export "mat4.fromRotation" (func $export:assembly/mat4/fromRotation))
+ (export "mat4.fromXRotation" (func $export:assembly/mat4/fromXRotation))
+ (export "mat4.fromYRotation" (func $export:assembly/mat4/fromYRotation))
+ (export "mat4.fromZRotation" (func $export:assembly/mat4/fromZRotation))
+ (export "mat4.fromRotationTranslation" (func $export:assembly/mat4/fromRotationTranslation))
+ (export "mat4.fromQuat2" (func $export:assembly/mat4/fromQuat2))
+ (export "mat4.getTranslation" (func $export:assembly/mat4/getTranslation))
+ (export "mat4.getScaling" (func $export:assembly/mat4/getScaling))
+ (export "mat4.getRotation" (func $export:assembly/mat4/getRotation))
+ (export "mat4.decompose" (func $export:assembly/mat4/decompose))
+ (export "mat4.fromRotationTranslationScale" (func $export:assembly/mat4/fromRotationTranslationScale))
+ (export "mat4.fromRotationTranslationScaleOrigin" (func $export:assembly/mat4/fromRotationTranslationScaleOrigin))
+ (export "mat4.fromQuat" (func $export:assembly/mat4/fromQuat))
+ (export "mat4.frustum" (func $export:assembly/mat4/frustum))
+ (export "mat4.perspectiveNO" (func $export:assembly/mat4/perspectiveNO))
+ (export "mat4.perspectiveZO" (func $export:assembly/mat4/perspectiveZO))
+ (export "mat4.perspectiveFromFieldOfView" (func $export:assembly/mat4/perspectiveFromFieldOfView))
+ (export "mat4.orthoNO" (func $export:assembly/mat4/orthoNO))
+ (export "mat4.orthoZO" (func $export:assembly/mat4/orthoZO))
+ (export "mat4.lookAt" (func $export:assembly/mat4/lookAt))
+ (export "mat4.targetTo" (func $export:assembly/mat4/targetTo))
+ (export "mat4.str" (func $export:assembly/mat4/str))
+ (export "mat4.frob" (func $export:assembly/mat4/frob))
+ (export "mat4.add" (func $export:assembly/mat4/add))
+ (export "mat4.subtract" (func $export:assembly/mat4/subtract))
+ (export "mat4.multiplyScalar" (func $export:assembly/mat4/multiplyScalar))
+ (export "mat4.multiplyScalarAndAdd" (func $export:assembly/mat4/multiplyScalarAndAdd))
+ (export "mat4.exactEquals" (func $export:assembly/mat4/exactEquals))
+ (export "mat4.equals" (func $export:assembly/mat4/equals))
+ (export "quat.identity" (func $export:assembly/quat/identity))
+ (export "quat.setAxisAngle" (func $export:assembly/quat/setAxisAngle))
+ (export "quat.getAxisAngle" (func $export:assembly/quat/getAxisAngle))
+ (export "quat.getAngle" (func $export:assembly/quat/getAngle))
+ (export "quat.multiply" (func $export:assembly/quat/multiply))
+ (export "quat.rotateX" (func $export:assembly/quat/rotateX))
+ (export "quat.rotateY" (func $export:assembly/quat/rotateY))
+ (export "quat.rotateZ" (func $export:assembly/quat/rotateZ))
+ (export "quat.calculateW" (func $export:assembly/quat/calculateW))
+ (export "quat.exp" (func $export:assembly/quat/exp))
+ (export "quat.ln" (func $export:assembly/quat/ln))
+ (export "quat.pow" (func $export:assembly/quat/pow))
+ (export "quat.slerp" (func $export:assembly/quat/slerp))
+ (export "quat.random" (func $export:assembly/quat/random))
+ (export "quat.invert" (func $export:assembly/quat/invert))
+ (export "quat.conjugate" (func $export:assembly/quat/conjugate))
+ (export "quat.fromMat3" (func $export:assembly/quat/fromMat3))
+ (export "quat.fromEuler" (func $export:assembly/quat/fromEuler@varargs))
+ (export "quat.str" (func $export:assembly/quat/str))
+ (export "quat.equals" (func $export:assembly/quat/equals))
+ (export "quat2.clone" (func $export:assembly/quat2/clone))
+ (export "quat2.fromRotationTranslation" (func $export:assembly/quat2/fromRotationTranslation))
+ (export "quat2.fromTranslation" (func $export:assembly/quat2/fromTranslation))
+ (export "quat2.fromRotation" (func $export:assembly/quat2/fromRotation))
+ (export "quat2.fromMat4" (func $export:assembly/quat2/fromMat4))
+ (export "quat2.copy" (func $export:assembly/quat2/copy))
+ (export "quat2.identity" (func $export:assembly/quat2/identity))
+ (export "quat2.set" (func $export:assembly/quat2/set))
+ (export "quat2.getDual" (func $export:assembly/quat2/getDual))
+ (export "quat2.setDual" (func $export:assembly/quat2/setDual))
+ (export "quat2.getTranslation" (func $export:assembly/quat2/getTranslation))
+ (export "quat2.translate" (func $export:assembly/quat2/translate))
+ (export "quat2.rotateX" (func $export:assembly/quat2/rotateX))
+ (export "quat2.rotateY" (func $export:assembly/quat2/rotateY))
+ (export "quat2.rotateZ" (func $export:assembly/quat2/rotateZ))
+ (export "quat2.rotateByQuatAppend" (func $export:assembly/quat2/rotateByQuatAppend))
+ (export "quat2.rotateByQuatPrepend" (func $export:assembly/quat2/rotateByQuatPrepend))
+ (export "quat2.rotateAroundAxis" (func $export:assembly/quat2/rotateAroundAxis))
+ (export "quat2.add" (func $export:assembly/quat2/add))
+ (export "quat2.multiply" (func $export:assembly/quat2/multiply))
+ (export "quat2.scale" (func $export:assembly/quat2/scale))
+ (export "quat2.lerp" (func $export:assembly/quat2/lerp))
+ (export "quat2.invert" (func $export:assembly/quat2/invert))
+ (export "quat2.conjugate" (func $export:assembly/quat2/conjugate))
+ (export "quat2.normalize" (func $export:assembly/quat2/normalize))
+ (export "quat2.str" (func $export:assembly/quat2/str))
+ (export "quat2.exactEquals" (func $export:assembly/quat2/exactEquals))
+ (export "quat2.equals" (func $export:assembly/quat2/equals))
+ (export "vec2.clone" (func $export:assembly/vec2/clone))
+ (export "vec2.copy" (func $export:assembly/vec2/copy))
+ (export "vec2.set" (func $export:assembly/vec2/set))
+ (export "vec2.add" (func $export:assembly/vec2/add))
+ (export "vec2.subtract" (func $export:assembly/vec2/subtract))
+ (export "vec2.multiply" (func $export:assembly/vec2/multiply))
+ (export "vec2.divide" (func $export:assembly/vec2/divide))
+ (export "vec2.ceil" (func $export:assembly/vec2/ceil))
+ (export "vec2.floor" (func $export:assembly/vec2/floor))
+ (export "vec2.min" (func $export:assembly/vec2/min))
+ (export "vec2.max" (func $export:assembly/vec2/max))
+ (export "vec2.round" (func $export:assembly/vec2/round))
+ (export "vec2.scale" (func $export:assembly/vec2/scale))
+ (export "vec2.scaleAndAdd" (func $export:assembly/vec2/scaleAndAdd))
+ (export "vec2.distance" (func $export:assembly/vec2/distance))
+ (export "vec2.squaredDistance" (func $export:assembly/vec2/squaredDistance))
+ (export "vec2.length" (func $export:assembly/vec2/length))
+ (export "vec2.squaredLength" (func $export:assembly/vec2/squaredLength))
+ (export "vec2.negate" (func $export:assembly/vec2/negate))
+ (export "vec2.inverse" (func $export:assembly/vec2/inverse))
+ (export "vec2.normalize" (func $export:assembly/vec2/normalize))
+ (export "vec2.dot" (func $export:assembly/vec2/dot))
+ (export "vec2.cross" (func $export:assembly/vec2/cross))
+ (export "vec2.lerp" (func $export:assembly/vec2/lerp))
+ (export "vec2.random" (func $export:assembly/vec2/random))
+ (export "vec2.transformMat2" (func $export:assembly/vec2/transformMat2))
+ (export "vec2.transformMat2d" (func $export:assembly/vec2/transformMat2d))
+ (export "vec2.transformMat3" (func $export:assembly/vec2/transformMat3))
+ (export "vec2.transformMat4" (func $export:assembly/vec2/transformMat4))
+ (export "vec2.rotate" (func $export:assembly/vec2/rotate))
+ (export "vec2.angle" (func $export:assembly/vec2/angle))
+ (export "vec2.zero" (func $export:assembly/vec2/zero))
+ (export "vec2.str" (func $export:assembly/vec2/str))
+ (export "vec2.exactEquals" (func $export:assembly/vec2/exactEquals))
+ (export "vec2.equals" (func $export:assembly/vec2/equals))
+ (export "vec3.clone" (func $export:assembly/vec3/clone))
+ (export "vec3.length" (func $export:assembly/vec3/length))
+ (export "vec3.copy" (func $export:assembly/vec3/copy))
+ (export "vec3.set" (func $export:assembly/vec3/set))
+ (export "vec3.add" (func $export:assembly/vec3/add))
+ (export "vec3.subtract" (func $export:assembly/vec3/subtract))
+ (export "vec3.multiply" (func $export:assembly/vec3/multiply))
+ (export "vec3.divide" (func $export:assembly/vec3/divide))
+ (export "vec3.ceil" (func $export:assembly/vec3/ceil))
+ (export "vec3.floor" (func $export:assembly/vec3/floor))
+ (export "vec3.min" (func $export:assembly/vec3/min))
+ (export "vec3.max" (func $export:assembly/vec3/max))
+ (export "vec3.round" (func $export:assembly/vec3/round))
+ (export "vec3.scale" (func $export:assembly/vec3/scale))
+ (export "vec3.scaleAndAdd" (func $export:assembly/vec3/scaleAndAdd))
+ (export "vec3.distance" (func $export:assembly/vec3/distance))
+ (export "vec3.squaredDistance" (func $export:assembly/vec3/squaredDistance))
+ (export "vec3.squaredLength" (func $export:assembly/vec3/squaredLength))
+ (export "vec3.negate" (func $export:assembly/vec3/negate))
+ (export "vec3.inverse" (func $export:assembly/vec3/inverse))
+ (export "vec3.normalize" (func $export:assembly/vec3/normalize))
+ (export "vec3.dot" (func $export:assembly/vec3/dot))
+ (export "vec3.cross" (func $export:assembly/vec3/cross))
+ (export "vec3.lerp" (func $export:assembly/vec3/lerp))
+ (export "vec3.slerp" (func $export:assembly/vec3/slerp))
+ (export "vec3.hermite" (func $export:assembly/vec3/hermite))
+ (export "vec3.bezier" (func $export:assembly/vec3/bezier))
+ (export "vec3.random" (func $export:assembly/vec3/random))
+ (export "vec3.transformMat4" (func $export:assembly/vec3/transformMat4))
+ (export "vec3.transformMat3" (func $export:assembly/vec3/transformMat3))
+ (export "vec3.transformQuat" (func $export:assembly/vec3/transformQuat))
+ (export "vec3.rotateX" (func $export:assembly/vec3/rotateX))
+ (export "vec3.rotateY" (func $export:assembly/vec3/rotateY))
+ (export "vec3.rotateZ" (func $export:assembly/vec3/rotateZ))
+ (export "vec3.angle" (func $export:assembly/vec3/angle))
+ (export "vec3.zero" (func $export:assembly/vec3/zero))
+ (export "vec3.str" (func $export:assembly/vec3/str))
+ (export "vec3.exactEquals" (func $export:assembly/vec3/exactEquals))
+ (export "vec3.equals" (func $export:assembly/vec3/equals))
+ (export "vec4.clone" (func $export:assembly/vec4/clone))
+ (export "vec4.copy" (func $export:assembly/vec4/copy))
+ (export "vec4.set" (func $export:assembly/vec4/set))
+ (export "vec4.add" (func $export:assembly/vec4/add))
+ (export "vec4.subtract" (func $export:assembly/vec4/subtract))
+ (export "vec4.multiply" (func $export:assembly/vec4/multiply))
+ (export "vec4.divide" (func $export:assembly/vec4/divide))
+ (export "vec4.ceil" (func $export:assembly/vec4/ceil))
+ (export "vec4.floor" (func $export:assembly/vec4/floor))
+ (export "vec4.min" (func $export:assembly/vec4/min))
+ (export "vec4.max" (func $export:assembly/vec4/max))
+ (export "vec4.round" (func $export:assembly/vec4/round))
+ (export "vec4.scale" (func $export:assembly/vec4/scale))
+ (export "vec4.scaleAndAdd" (func $export:assembly/vec4/scaleAndAdd))
+ (export "vec4.distance" (func $export:assembly/vec4/distance))
+ (export "vec4.squaredDistance" (func $export:assembly/vec4/squaredDistance))
+ (export "vec4.length" (func $export:assembly/vec4/length))
+ (export "vec4.squaredLength" (func $export:assembly/vec4/squaredLength))
+ (export "vec4.negate" (func $export:assembly/vec4/negate))
+ (export "vec4.inverse" (func $export:assembly/vec4/inverse))
+ (export "vec4.normalize" (func $export:assembly/vec4/normalize))
+ (export "vec4.dot" (func $export:assembly/vec4/dot))
+ (export "vec4.cross" (func $export:assembly/vec4/cross))
+ (export "vec4.lerp" (func $export:assembly/vec4/lerp))
+ (export "vec4.random" (func $export:assembly/vec4/random))
+ (export "vec4.transformMat4" (func $export:assembly/vec4/transformMat4))
+ (export "vec4.transformQuat" (func $export:assembly/vec4/transformQuat))
+ (export "vec4.zero" (func $export:assembly/vec4/zero))
+ (export "vec4.str" (func $export:assembly/vec4/str))
+ (export "vec4.exactEquals" (func $export:assembly/vec4/exactEquals))
+ (export "vec4.equals" (func $export:assembly/vec4/equals))
+ (start $~start)
+ (func $~lib/math/murmurHash3 (param $0 i64) (result i64)
+ local.get $0
+ local.get $0
+ i64.const 33
+ i64.shr_u
+ i64.xor
+ local.set $0
+ local.get $0
+ i64.const -49064778989728563
+ i64.mul
+ local.set $0
+ local.get $0
+ local.get $0
+ i64.const 33
+ i64.shr_u
+ i64.xor
+ local.set $0
+ local.get $0
+ i64.const -4265267296055464877
+ i64.mul
+ local.set $0
+ local.get $0
+ local.get $0
+ i64.const 33
+ i64.shr_u
+ i64.xor
+ local.set $0
+ local.get $0
+ )
+ (func $~lib/math/splitMix32 (param $0 i32) (result i32)
+ local.get $0
+ i32.const 1831565813
+ i32.add
+ local.set $0
+ local.get $0
+ local.get $0
+ i32.const 15
+ i32.shr_u
+ i32.xor
+ local.get $0
+ i32.const 1
+ i32.or
+ i32.mul
+ local.set $0
+ local.get $0
+ local.get $0
+ local.get $0
+ local.get $0
+ i32.const 7
+ i32.shr_u
+ i32.xor
+ local.get $0
+ i32.const 61
+ i32.or
+ i32.mul
+ i32.add
+ i32.xor
+ local.set $0
+ local.get $0
+ local.get $0
+ i32.const 14
+ i32.shr_u
+ i32.xor
+ )
+ (func $~lib/math/NativeMath.seedRandom (param $0 i64)
+ i32.const 1
+ global.set $~lib/math/random_seeded
+ local.get $0
+ call $~lib/math/murmurHash3
+ global.set $~lib/math/random_state0_64
+ global.get $~lib/math/random_state0_64
+ i64.const -1
+ i64.xor
+ call $~lib/math/murmurHash3
+ global.set $~lib/math/random_state1_64
+ local.get $0
+ i32.wrap_i64
+ call $~lib/math/splitMix32
+ global.set $~lib/math/random_state0_32
+ global.get $~lib/math/random_state0_32
+ call $~lib/math/splitMix32
+ global.set $~lib/math/random_state1_32
+ global.get $~lib/math/random_state0_64
+ i64.const 0
+ i64.ne
+ if (result i32)
+ global.get $~lib/math/random_state1_64
+ i64.const 0
+ i64.ne
+ else
+ i32.const 0
+ end
+ if (result i32)
+ global.get $~lib/math/random_state0_32
+ i32.const 0
+ i32.ne
+ else
+ i32.const 0
+ end
+ if (result i32)
+ global.get $~lib/math/random_state1_32
+ i32.const 0
+ i32.ne
+ else
+ i32.const 0
+ end
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 32
+ i32.const 1417
+ i32.const 5
+ call $~lib/builtins/abort
+ unreachable
+ end
+ )
+ (func $~lib/math/NativeMath.random (result f64)
+ (local $0 i64)
+ (local $1 i64)
+ (local $2 i64)
+ global.get $~lib/math/random_seeded
+ i32.eqz
+ if
+ call $~lib/builtins/seed
+ i64.reinterpret_f64
+ call $~lib/math/NativeMath.seedRandom
+ end
+ global.get $~lib/math/random_state0_64
+ local.set $0
+ global.get $~lib/math/random_state1_64
+ local.set $1
+ local.get $1
+ global.set $~lib/math/random_state0_64
+ local.get $0
+ local.get $0
+ i64.const 23
+ i64.shl
+ i64.xor
+ local.set $0
+ local.get $0
+ local.get $0
+ i64.const 17
+ i64.shr_u
+ i64.xor
+ local.set $0
+ local.get $0
+ local.get $1
+ i64.xor
+ local.set $0
+ local.get $0
+ local.get $1
+ i64.const 26
+ i64.shr_u
+ i64.xor
+ local.set $0
+ local.get $0
+ global.set $~lib/math/random_state1_64
+ local.get $1
+ i64.const 12
+ i64.shr_u
+ i64.const 4607182418800017408
+ i64.or
+ local.set $2
+ local.get $2
+ f64.reinterpret_i64
+ f64.const 1
+ f64.sub
+ )
+ (func $start:assembly/common
+ global.get $assembly/common/ArrayTypeEnum.Float64ArrayT
+ global.set $assembly/common/ARRAY_TYPE
+ )
+ (func $~lib/typedarray/Float64Array#__get (param $0 i32) (param $1 i32) (result f64)
+ local.get $1
+ local.get $0
+ i32.load offset=8
+ i32.const 3
+ i32.shr_u
+ i32.ge_u
+ if
+ i32.const 144
+ i32.const 208
+ i32.const 1374
+ i32.const 64
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ i32.const 3
+ i32.shl
+ i32.add
+ f64.load
+ )
+ (func $~lib/typedarray/Float64Array#__set (param $0 i32) (param $1 i32) (param $2 f64)
+ local.get $1
+ local.get $0
+ i32.load offset=8
+ i32.const 3
+ i32.shr_u
+ i32.ge_u
+ if
+ i32.const 144
+ i32.const 208
+ i32.const 1385
+ i32.const 64
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ i32.const 3
+ i32.shl
+ i32.add
+ local.get $2
+ f64.store
+ )
+ (func $assembly/mat2d/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $6
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $11
+ f64.mul
+ local.get $5
+ local.get $12
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $12
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $3
+ local.get $13
+ f64.mul
+ local.get $5
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $7
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $13
+ f64.mul
+ local.get $6
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $8
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $~lib/math/NativeMath.hypot (param $0 f64) (param $1 f64) (result f64)
+ (local $2 i64)
+ (local $3 i64)
+ (local $4 i64)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ local.get $0
+ i64.reinterpret_f64
+ local.set $2
+ local.get $1
+ i64.reinterpret_f64
+ local.set $3
+ local.get $2
+ i64.const 9223372036854775807
+ i64.and
+ local.set $2
+ local.get $3
+ i64.const 9223372036854775807
+ i64.and
+ local.set $3
+ local.get $2
+ local.get $3
+ i64.lt_u
+ if
+ local.get $2
+ local.set $4
+ local.get $3
+ local.set $2
+ local.get $4
+ local.set $3
+ end
+ local.get $2
+ i64.const 52
+ i64.shr_u
+ i32.wrap_i64
+ local.set $5
+ local.get $3
+ i64.const 52
+ i64.shr_u
+ i32.wrap_i64
+ local.set $6
+ local.get $3
+ f64.reinterpret_i64
+ local.set $1
+ local.get $6
+ i32.const 2047
+ i32.eq
+ if
+ local.get $1
+ return
+ end
+ local.get $2
+ f64.reinterpret_i64
+ local.set $0
+ local.get $5
+ i32.const 2047
+ i32.eq
+ if (result i32)
+ i32.const 1
+ else
+ local.get $3
+ i64.const 0
+ i64.eq
+ end
+ if
+ local.get $0
+ return
+ end
+ local.get $5
+ local.get $6
+ i32.sub
+ i32.const 64
+ i32.gt_s
+ if
+ local.get $0
+ local.get $1
+ f64.add
+ return
+ end
+ f64.const 1
+ local.set $7
+ local.get $5
+ i32.const 1023
+ i32.const 510
+ i32.add
+ i32.gt_s
+ if
+ f64.const 5260135901548373507240989e186
+ local.set $7
+ local.get $0
+ f64.const 1.90109156629516e-211
+ f64.mul
+ local.set $0
+ local.get $1
+ f64.const 1.90109156629516e-211
+ f64.mul
+ local.set $1
+ else
+ local.get $6
+ i32.const 1023
+ i32.const 450
+ i32.sub
+ i32.lt_s
+ if
+ f64.const 1.90109156629516e-211
+ local.set $7
+ local.get $0
+ f64.const 5260135901548373507240989e186
+ f64.mul
+ local.set $0
+ local.get $1
+ f64.const 5260135901548373507240989e186
+ f64.mul
+ local.set $1
+ end
+ end
+ local.get $0
+ f64.const 134217729
+ f64.mul
+ local.set $8
+ local.get $0
+ local.get $8
+ f64.sub
+ local.get $8
+ f64.add
+ local.set $9
+ local.get $0
+ local.get $9
+ f64.sub
+ local.set $10
+ local.get $0
+ local.get $0
+ f64.mul
+ local.set $11
+ local.get $9
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.sub
+ f64.const 2
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.add
+ local.get $10
+ f64.mul
+ f64.add
+ local.set $12
+ local.get $1
+ f64.const 134217729
+ f64.mul
+ local.set $8
+ local.get $1
+ local.get $8
+ f64.sub
+ local.get $8
+ f64.add
+ local.set $9
+ local.get $1
+ local.get $9
+ f64.sub
+ local.set $10
+ local.get $1
+ local.get $1
+ f64.mul
+ local.set $13
+ local.get $9
+ local.get $9
+ f64.mul
+ local.get $13
+ f64.sub
+ f64.const 2
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.add
+ local.get $10
+ f64.mul
+ f64.add
+ local.set $14
+ local.get $7
+ local.get $14
+ local.get $12
+ f64.add
+ local.get $13
+ f64.add
+ local.get $11
+ f64.add
+ f64.sqrt
+ f64.mul
+ )
+ (func $assembly/maths/Maths.max (param $0 f64) (param $1 f64) (param $2 f64) (result f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ local.get $1
+ local.set $4
+ local.get $2
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.max
+ local.set $4
+ local.get $0
+ local.set $5
+ local.get $4
+ local.set $3
+ local.get $5
+ local.get $3
+ f64.max
+ )
+ (func $assembly/maths/Maths.hypot3 (param $0 f64) (param $1 f64) (param $2 f64) (result f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ local.get $0
+ local.set $3
+ local.get $3
+ f64.abs
+ local.set $0
+ local.get $1
+ local.set $3
+ local.get $3
+ f64.abs
+ local.set $1
+ local.get $2
+ local.set $3
+ local.get $3
+ f64.abs
+ local.set $2
+ i32.const 432
+ drop
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/maths/Maths.max
+ local.set $3
+ local.get $3
+ f64.const 0
+ f64.eq
+ if
+ f64.const 0
+ return
+ end
+ f64.const 1
+ local.get $3
+ f64.div
+ local.set $4
+ local.get $0
+ local.get $4
+ f64.mul
+ local.set $0
+ local.get $1
+ local.get $4
+ f64.mul
+ local.set $1
+ local.get $2
+ local.get $4
+ f64.mul
+ local.set $2
+ local.get $3
+ local.get $0
+ local.get $0
+ f64.mul
+ local.get $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.set $5
+ local.get $5
+ f64.sqrt
+ f64.mul
+ )
+ (func $assembly/vec3/distance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $4
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/maths/Maths.hypot3
+ )
+ (func $assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $4
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ )
+ (func $assembly/vec3/length (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/maths/Maths.hypot3
+ )
+ (func $assembly/vec3/squaredLength (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ local.get $1
+ f64.mul
+ local.get $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ )
+ (func $~lib/rt/itcms/Object#set:nextWithColor (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ i32.store offset=4
+ )
+ (func $~lib/rt/itcms/Object#set:prev (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ i32.store offset=8
+ )
+ (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32)
+ local.get $0
+ local.get $0
+ call $~lib/rt/itcms/Object#set:nextWithColor
+ local.get $0
+ local.get $0
+ call $~lib/rt/itcms/Object#set:prev
+ local.get $0
+ )
+ (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32)
+ local.get $0
+ i32.load offset=4
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ )
+ (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32)
+ local.get $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ )
+ (func $~lib/rt/itcms/visitRoots (param $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ local.get $0
+ call $~lib/rt/__visit_globals
+ global.get $~lib/rt/itcms/pinSpace
+ local.set $1
+ local.get $1
+ call $~lib/rt/itcms/Object#get:next
+ local.set $2
+ loop $while-continue|0
+ local.get $2
+ local.get $1
+ i32.ne
+ local.set $3
+ local.get $3
+ if
+ i32.const 1
+ drop
+ local.get $2
+ call $~lib/rt/itcms/Object#get:color
+ i32.const 3
+ i32.eq
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 768
+ i32.const 159
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $2
+ i32.const 20
+ i32.add
+ local.get $0
+ call $~lib/rt/__visit_members
+ local.get $2
+ call $~lib/rt/itcms/Object#get:next
+ local.set $2
+ br $while-continue|0
+ end
+ end
+ )
+ (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $0
+ i32.load offset=4
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ local.get $1
+ i32.or
+ call $~lib/rt/itcms/Object#set:nextWithColor
+ )
+ (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ local.get $0
+ i32.load offset=4
+ i32.const 3
+ i32.and
+ i32.or
+ call $~lib/rt/itcms/Object#set:nextWithColor
+ )
+ (func $~lib/rt/itcms/Object#unlink (param $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ local.get $0
+ call $~lib/rt/itcms/Object#get:next
+ local.set $1
+ local.get $1
+ i32.const 0
+ i32.eq
+ if
+ i32.const 1
+ drop
+ local.get $0
+ i32.load offset=8
+ i32.const 0
+ i32.eq
+ if (result i32)
+ local.get $0
+ global.get $~lib/memory/__heap_base
+ i32.lt_u
+ else
+ i32.const 0
+ end
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 768
+ i32.const 127
+ i32.const 18
+ call $~lib/builtins/abort
+ unreachable
+ end
+ return
+ end
+ local.get $0
+ i32.load offset=8
+ local.set $2
+ i32.const 1
+ drop
+ local.get $2
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 768
+ i32.const 131
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ local.get $2
+ call $~lib/rt/itcms/Object#set:prev
+ local.get $2
+ local.get $1
+ call $~lib/rt/itcms/Object#set:next
+ )
+ (func $~lib/rt/__typeinfo (param $0 i32) (result i32)
+ (local $1 i32)
+ global.get $~lib/rt/__rtti_base
+ local.set $1
+ local.get $0
+ local.get $1
+ i32.load
+ i32.gt_u
+ if
+ i32.const 144
+ i32.const 896
+ i32.const 22
+ i32.const 28
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ i32.const 4
+ i32.add
+ local.get $0
+ i32.const 8
+ i32.mul
+ i32.add
+ i32.load
+ )
+ (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32)
+ (local $1 i32)
+ local.get $0
+ i32.load offset=12
+ local.set $1
+ local.get $1
+ i32.const 1
+ i32.le_u
+ if (result i32)
+ i32.const 1
+ else
+ local.get $1
+ call $~lib/rt/__typeinfo
+ i32.const 32
+ i32.and
+ i32.const 0
+ i32.ne
+ end
+ )
+ (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ local.get $1
+ i32.load offset=8
+ local.set $3
+ local.get $0
+ local.get $1
+ local.get $2
+ i32.or
+ call $~lib/rt/itcms/Object#set:nextWithColor
+ local.get $0
+ local.get $3
+ call $~lib/rt/itcms/Object#set:prev
+ local.get $3
+ local.get $0
+ call $~lib/rt/itcms/Object#set:next
+ local.get $1
+ local.get $0
+ call $~lib/rt/itcms/Object#set:prev
+ )
+ (func $~lib/rt/itcms/Object#makeGray (param $0 i32)
+ (local $1 i32)
+ local.get $0
+ global.get $~lib/rt/itcms/iter
+ i32.eq
+ if
+ local.get $0
+ i32.load offset=8
+ local.tee $1
+ i32.eqz
+ if (result i32)
+ i32.const 0
+ i32.const 768
+ i32.const 147
+ i32.const 30
+ call $~lib/builtins/abort
+ unreachable
+ else
+ local.get $1
+ end
+ global.set $~lib/rt/itcms/iter
+ end
+ local.get $0
+ call $~lib/rt/itcms/Object#unlink
+ local.get $0
+ global.get $~lib/rt/itcms/toSpace
+ local.get $0
+ call $~lib/rt/itcms/Object#get:isPointerfree
+ if (result i32)
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ else
+ i32.const 2
+ end
+ call $~lib/rt/itcms/Object#linkTo
+ )
+ (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32)
+ (local $2 i32)
+ local.get $0
+ i32.eqz
+ if
+ return
+ end
+ local.get $0
+ i32.const 20
+ i32.sub
+ local.set $2
+ i32.const 0
+ drop
+ local.get $2
+ call $~lib/rt/itcms/Object#get:color
+ global.get $~lib/rt/itcms/white
+ i32.eq
+ if
+ local.get $2
+ call $~lib/rt/itcms/Object#makeGray
+ global.get $~lib/rt/itcms/visitCount
+ i32.const 1
+ i32.add
+ global.set $~lib/rt/itcms/visitCount
+ end
+ )
+ (func $~lib/rt/itcms/visitStack (param $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ global.get $~lib/memory/__stack_pointer
+ local.set $1
+ loop $while-continue|0
+ local.get $1
+ global.get $~lib/memory/__heap_base
+ i32.lt_u
+ local.set $2
+ local.get $2
+ if
+ local.get $1
+ i32.load
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ local.get $1
+ i32.const 4
+ i32.add
+ local.set $1
+ br $while-continue|0
+ end
+ end
+ )
+ (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32)
+ i32.const 4
+ local.get $0
+ i32.load
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ )
+ (func $~lib/rt/tlsf/Root#set:flMap (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ i32.store
+ )
+ (func $~lib/rt/common/BLOCK#set:mmInfo (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ i32.store
+ )
+ (func $~lib/rt/tlsf/Block#set:prev (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ i32.store offset=4
+ )
+ (func $~lib/rt/tlsf/Block#set:next (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ i32.store offset=8
+ )
+ (func $~lib/rt/tlsf/removeBlock (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.get $1
+ i32.load
+ local.set $2
+ i32.const 1
+ drop
+ local.get $2
+ i32.const 1
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 268
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $2
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ local.set $3
+ i32.const 1
+ drop
+ local.get $3
+ i32.const 12
+ i32.ge_u
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 270
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $3
+ i32.const 256
+ i32.lt_u
+ if
+ i32.const 0
+ local.set $4
+ local.get $3
+ i32.const 4
+ i32.shr_u
+ local.set $5
+ else
+ local.get $3
+ local.tee $6
+ i32.const 1073741820
+ local.tee $7
+ local.get $6
+ local.get $7
+ i32.lt_u
+ select
+ local.set $6
+ i32.const 31
+ local.get $6
+ i32.clz
+ i32.sub
+ local.set $4
+ local.get $6
+ local.get $4
+ i32.const 4
+ i32.sub
+ i32.shr_u
+ i32.const 1
+ i32.const 4
+ i32.shl
+ i32.xor
+ local.set $5
+ local.get $4
+ i32.const 8
+ i32.const 1
+ i32.sub
+ i32.sub
+ local.set $4
+ end
+ i32.const 1
+ drop
+ local.get $4
+ i32.const 23
+ i32.lt_u
+ if (result i32)
+ local.get $5
+ i32.const 16
+ i32.lt_u
+ else
+ i32.const 0
+ end
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 284
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ i32.load offset=4
+ local.set $8
+ local.get $1
+ i32.load offset=8
+ local.set $9
+ local.get $8
+ if
+ local.get $8
+ local.get $9
+ call $~lib/rt/tlsf/Block#set:next
+ end
+ local.get $9
+ if
+ local.get $9
+ local.get $8
+ call $~lib/rt/tlsf/Block#set:prev
+ end
+ local.get $1
+ local.get $0
+ local.set $10
+ local.get $4
+ local.set $6
+ local.get $5
+ local.set $7
+ local.get $10
+ local.get $6
+ i32.const 4
+ i32.shl
+ local.get $7
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ i32.eq
+ if
+ local.get $0
+ local.set $11
+ local.get $4
+ local.set $10
+ local.get $5
+ local.set $6
+ local.get $9
+ local.set $7
+ local.get $11
+ local.get $10
+ i32.const 4
+ i32.shl
+ local.get $6
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $7
+ i32.store offset=96
+ local.get $9
+ i32.eqz
+ if
+ local.get $0
+ local.set $6
+ local.get $4
+ local.set $7
+ local.get $6
+ local.get $7
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=4
+ local.set $6
+ local.get $0
+ local.set $7
+ local.get $4
+ local.set $11
+ local.get $6
+ i32.const 1
+ local.get $5
+ i32.shl
+ i32.const -1
+ i32.xor
+ i32.and
+ local.tee $6
+ local.set $10
+ local.get $7
+ local.get $11
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $10
+ i32.store offset=4
+ local.get $6
+ i32.eqz
+ if
+ local.get $0
+ local.get $0
+ i32.load
+ i32.const 1
+ local.get $4
+ i32.shl
+ i32.const -1
+ i32.xor
+ i32.and
+ call $~lib/rt/tlsf/Root#set:flMap
+ end
+ end
+ end
+ )
+ (func $~lib/rt/tlsf/insertBlock (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)
+ i32.const 1
+ drop
+ local.get $1
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 201
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ i32.load
+ local.set $2
+ i32.const 1
+ drop
+ local.get $2
+ i32.const 1
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 203
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ local.set $3
+ local.get $3
+ i32.const 4
+ i32.add
+ local.get $3
+ i32.load
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ local.set $4
+ local.get $4
+ i32.load
+ local.set $5
+ local.get $5
+ i32.const 1
+ i32.and
+ if
+ local.get $0
+ local.get $4
+ call $~lib/rt/tlsf/removeBlock
+ local.get $1
+ local.get $2
+ i32.const 4
+ i32.add
+ local.get $5
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ local.tee $2
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $1
+ local.set $3
+ local.get $3
+ i32.const 4
+ i32.add
+ local.get $3
+ i32.load
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ local.set $4
+ local.get $4
+ i32.load
+ local.set $5
+ end
+ local.get $2
+ i32.const 2
+ i32.and
+ if
+ local.get $1
+ local.set $3
+ local.get $3
+ i32.const 4
+ i32.sub
+ i32.load
+ local.set $3
+ local.get $3
+ i32.load
+ local.set $6
+ i32.const 1
+ drop
+ local.get $6
+ i32.const 1
+ i32.and
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 221
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.get $3
+ call $~lib/rt/tlsf/removeBlock
+ local.get $3
+ local.set $1
+ local.get $1
+ local.get $6
+ i32.const 4
+ i32.add
+ local.get $2
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ local.tee $2
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ end
+ local.get $4
+ local.get $5
+ i32.const 2
+ i32.or
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $2
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ local.set $7
+ i32.const 1
+ drop
+ local.get $7
+ i32.const 12
+ i32.ge_u
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 233
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ i32.const 1
+ drop
+ local.get $1
+ i32.const 4
+ i32.add
+ local.get $7
+ i32.add
+ local.get $4
+ i32.eq
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 234
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $4
+ i32.const 4
+ i32.sub
+ local.get $1
+ i32.store
+ local.get $7
+ i32.const 256
+ i32.lt_u
+ if
+ i32.const 0
+ local.set $8
+ local.get $7
+ i32.const 4
+ i32.shr_u
+ local.set $9
+ else
+ local.get $7
+ local.tee $3
+ i32.const 1073741820
+ local.tee $6
+ local.get $3
+ local.get $6
+ i32.lt_u
+ select
+ local.set $3
+ i32.const 31
+ local.get $3
+ i32.clz
+ i32.sub
+ local.set $8
+ local.get $3
+ local.get $8
+ i32.const 4
+ i32.sub
+ i32.shr_u
+ i32.const 1
+ i32.const 4
+ i32.shl
+ i32.xor
+ local.set $9
+ local.get $8
+ i32.const 8
+ i32.const 1
+ i32.sub
+ i32.sub
+ local.set $8
+ end
+ i32.const 1
+ drop
+ local.get $8
+ i32.const 23
+ i32.lt_u
+ if (result i32)
+ local.get $9
+ i32.const 16
+ i32.lt_u
+ else
+ i32.const 0
+ end
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 251
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.set $10
+ local.get $8
+ local.set $3
+ local.get $9
+ local.set $6
+ local.get $10
+ local.get $3
+ i32.const 4
+ i32.shl
+ local.get $6
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ local.set $11
+ local.get $1
+ i32.const 0
+ call $~lib/rt/tlsf/Block#set:prev
+ local.get $1
+ local.get $11
+ call $~lib/rt/tlsf/Block#set:next
+ local.get $11
+ if
+ local.get $11
+ local.get $1
+ call $~lib/rt/tlsf/Block#set:prev
+ end
+ local.get $0
+ local.set $12
+ local.get $8
+ local.set $10
+ local.get $9
+ local.set $3
+ local.get $1
+ local.set $6
+ local.get $12
+ local.get $10
+ i32.const 4
+ i32.shl
+ local.get $3
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $6
+ i32.store offset=96
+ local.get $0
+ local.get $0
+ i32.load
+ i32.const 1
+ local.get $8
+ i32.shl
+ i32.or
+ call $~lib/rt/tlsf/Root#set:flMap
+ local.get $0
+ local.set $13
+ local.get $8
+ local.set $12
+ local.get $0
+ local.set $3
+ local.get $8
+ local.set $6
+ local.get $3
+ local.get $6
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=4
+ i32.const 1
+ local.get $9
+ i32.shl
+ i32.or
+ local.set $10
+ local.get $13
+ local.get $12
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $10
+ i32.store offset=4
+ )
+ (func $~lib/rt/tlsf/addMemory (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)
+ i32.const 1
+ drop
+ local.get $1
+ local.get $2
+ i32.le_u
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 377
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ i32.const 4
+ i32.add
+ i32.const 15
+ i32.add
+ i32.const 15
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.const 4
+ i32.sub
+ local.set $1
+ local.get $2
+ i32.const 15
+ i32.const -1
+ i32.xor
+ i32.and
+ local.set $2
+ local.get $0
+ local.set $3
+ local.get $3
+ i32.load offset=1568
+ local.set $4
+ i32.const 0
+ local.set $5
+ local.get $4
+ if
+ i32.const 1
+ drop
+ local.get $1
+ local.get $4
+ i32.const 4
+ i32.add
+ i32.ge_u
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 384
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ i32.const 16
+ i32.sub
+ local.get $4
+ i32.eq
+ if
+ local.get $1
+ i32.const 16
+ i32.sub
+ local.set $1
+ local.get $4
+ i32.load
+ local.set $5
+ else
+ nop
+ end
+ else
+ i32.const 1
+ drop
+ local.get $1
+ local.get $0
+ i32.const 1572
+ i32.add
+ i32.ge_u
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 397
+ i32.const 5
+ call $~lib/builtins/abort
+ unreachable
+ end
+ end
+ local.get $2
+ local.get $1
+ i32.sub
+ local.set $6
+ local.get $6
+ i32.const 4
+ i32.const 12
+ i32.add
+ i32.const 4
+ i32.add
+ i32.lt_u
+ if
+ i32.const 0
+ return
+ end
+ local.get $6
+ i32.const 2
+ i32.const 4
+ i32.mul
+ i32.sub
+ local.set $7
+ local.get $1
+ local.set $8
+ local.get $8
+ local.get $7
+ i32.const 1
+ i32.or
+ local.get $5
+ i32.const 2
+ i32.and
+ i32.or
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $8
+ i32.const 0
+ call $~lib/rt/tlsf/Block#set:prev
+ local.get $8
+ i32.const 0
+ call $~lib/rt/tlsf/Block#set:next
+ local.get $1
+ i32.const 4
+ i32.add
+ local.get $7
+ i32.add
+ local.set $4
+ local.get $4
+ i32.const 0
+ i32.const 2
+ i32.or
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $0
+ local.set $9
+ local.get $4
+ local.set $3
+ local.get $9
+ local.get $3
+ i32.store offset=1568
+ local.get $0
+ local.get $8
+ call $~lib/rt/tlsf/insertBlock
+ i32.const 1
+ )
+ (func $~lib/rt/tlsf/initialize
+ (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 i32)
+ (local $11 i32)
+ (local $12 i32)
+ i32.const 0
+ drop
+ global.get $~lib/memory/__heap_base
+ i32.const 15
+ i32.add
+ i32.const 15
+ i32.const -1
+ i32.xor
+ i32.and
+ local.set $0
+ memory.size
+ local.set $1
+ local.get $0
+ i32.const 1572
+ i32.add
+ i32.const 65535
+ i32.add
+ i32.const 65535
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.const 16
+ i32.shr_u
+ local.set $2
+ local.get $2
+ local.get $1
+ i32.gt_s
+ if (result i32)
+ local.get $2
+ local.get $1
+ i32.sub
+ memory.grow
+ i32.const 0
+ i32.lt_s
+ else
+ i32.const 0
+ end
+ if
+ unreachable
+ end
+ local.get $0
+ local.set $3
+ local.get $3
+ i32.const 0
+ call $~lib/rt/tlsf/Root#set:flMap
+ local.get $3
+ local.set $5
+ i32.const 0
+ local.set $4
+ local.get $5
+ local.get $4
+ i32.store offset=1568
+ i32.const 0
+ local.set $5
+ loop $for-loop|0
+ local.get $5
+ i32.const 23
+ i32.lt_u
+ local.set $4
+ local.get $4
+ if
+ local.get $3
+ local.set $8
+ local.get $5
+ local.set $7
+ i32.const 0
+ local.set $6
+ local.get $8
+ local.get $7
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $6
+ i32.store offset=4
+ i32.const 0
+ local.set $8
+ loop $for-loop|1
+ local.get $8
+ i32.const 16
+ i32.lt_u
+ local.set $7
+ local.get $7
+ if
+ local.get $3
+ local.set $11
+ local.get $5
+ local.set $10
+ local.get $8
+ local.set $9
+ i32.const 0
+ local.set $6
+ local.get $11
+ local.get $10
+ i32.const 4
+ i32.shl
+ local.get $9
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ local.get $6
+ i32.store offset=96
+ local.get $8
+ i32.const 1
+ i32.add
+ local.set $8
+ br $for-loop|1
+ end
+ end
+ local.get $5
+ i32.const 1
+ i32.add
+ local.set $5
+ br $for-loop|0
+ end
+ end
+ local.get $0
+ i32.const 1572
+ i32.add
+ local.set $12
+ i32.const 0
+ drop
+ local.get $3
+ local.get $12
+ memory.size
+ i32.const 16
+ i32.shl
+ call $~lib/rt/tlsf/addMemory
+ drop
+ local.get $3
+ global.set $~lib/rt/tlsf/ROOT
+ )
+ (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32)
+ (local $1 i32)
+ local.get $0
+ i32.const 4
+ i32.sub
+ local.set $1
+ local.get $0
+ i32.const 0
+ i32.ne
+ if (result i32)
+ local.get $0
+ i32.const 15
+ i32.and
+ i32.eqz
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $1
+ i32.load
+ i32.const 1
+ i32.and
+ i32.eqz
+ else
+ i32.const 0
+ end
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 559
+ i32.const 3
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ )
+ (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32)
+ i32.const 0
+ drop
+ local.get $1
+ local.get $1
+ i32.load
+ i32.const 1
+ i32.or
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $0
+ local.get $1
+ call $~lib/rt/tlsf/insertBlock
+ )
+ (func $~lib/rt/tlsf/__free (param $0 i32)
+ local.get $0
+ global.get $~lib/memory/__heap_base
+ i32.lt_u
+ if
+ return
+ end
+ global.get $~lib/rt/tlsf/ROOT
+ i32.eqz
+ if
+ call $~lib/rt/tlsf/initialize
+ end
+ global.get $~lib/rt/tlsf/ROOT
+ local.get $0
+ call $~lib/rt/tlsf/checkUsedBlock
+ call $~lib/rt/tlsf/freeBlock
+ )
+ (func $~lib/rt/itcms/free (param $0 i32)
+ local.get $0
+ global.get $~lib/memory/__heap_base
+ i32.lt_u
+ if
+ local.get $0
+ i32.const 0
+ call $~lib/rt/itcms/Object#set:nextWithColor
+ local.get $0
+ i32.const 0
+ call $~lib/rt/itcms/Object#set:prev
+ else
+ global.get $~lib/rt/itcms/total
+ local.get $0
+ call $~lib/rt/itcms/Object#get:size
+ i32.sub
+ global.set $~lib/rt/itcms/total
+ i32.const 0
+ drop
+ local.get $0
+ i32.const 4
+ i32.add
+ call $~lib/rt/tlsf/__free
+ end
+ )
+ (func $~lib/rt/itcms/step (result i32)
+ (local $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ block $break|0
+ block $case2|0
+ block $case1|0
+ block $case0|0
+ global.get $~lib/rt/itcms/state
+ 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
+ br $break|0
+ end
+ i32.const 1
+ global.set $~lib/rt/itcms/state
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ i32.const 0
+ call $~lib/rt/itcms/visitRoots
+ global.get $~lib/rt/itcms/toSpace
+ global.set $~lib/rt/itcms/iter
+ global.get $~lib/rt/itcms/visitCount
+ i32.const 1
+ i32.mul
+ return
+ end
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ local.set $1
+ global.get $~lib/rt/itcms/iter
+ call $~lib/rt/itcms/Object#get:next
+ local.set $0
+ loop $while-continue|1
+ local.get $0
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ local.set $2
+ local.get $2
+ if
+ local.get $0
+ global.set $~lib/rt/itcms/iter
+ local.get $0
+ call $~lib/rt/itcms/Object#get:color
+ local.get $1
+ i32.ne
+ if
+ local.get $0
+ local.get $1
+ call $~lib/rt/itcms/Object#set:color
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ local.get $0
+ i32.const 20
+ i32.add
+ i32.const 0
+ call $~lib/rt/__visit_members
+ global.get $~lib/rt/itcms/visitCount
+ i32.const 1
+ i32.mul
+ return
+ end
+ local.get $0
+ call $~lib/rt/itcms/Object#get:next
+ local.set $0
+ br $while-continue|1
+ end
+ end
+ i32.const 0
+ global.set $~lib/rt/itcms/visitCount
+ i32.const 0
+ call $~lib/rt/itcms/visitRoots
+ global.get $~lib/rt/itcms/iter
+ call $~lib/rt/itcms/Object#get:next
+ local.set $0
+ local.get $0
+ global.get $~lib/rt/itcms/toSpace
+ i32.eq
+ if
+ i32.const 0
+ call $~lib/rt/itcms/visitStack
+ global.get $~lib/rt/itcms/iter
+ call $~lib/rt/itcms/Object#get:next
+ local.set $0
+ loop $while-continue|2
+ local.get $0
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ local.set $2
+ local.get $2
+ if
+ local.get $0
+ call $~lib/rt/itcms/Object#get:color
+ local.get $1
+ i32.ne
+ if
+ local.get $0
+ local.get $1
+ call $~lib/rt/itcms/Object#set:color
+ local.get $0
+ i32.const 20
+ i32.add
+ i32.const 0
+ call $~lib/rt/__visit_members
+ end
+ local.get $0
+ call $~lib/rt/itcms/Object#get:next
+ local.set $0
+ br $while-continue|2
+ end
+ end
+ global.get $~lib/rt/itcms/fromSpace
+ local.set $2
+ global.get $~lib/rt/itcms/toSpace
+ global.set $~lib/rt/itcms/fromSpace
+ local.get $2
+ global.set $~lib/rt/itcms/toSpace
+ local.get $1
+ global.set $~lib/rt/itcms/white
+ local.get $2
+ call $~lib/rt/itcms/Object#get:next
+ global.set $~lib/rt/itcms/iter
+ i32.const 2
+ global.set $~lib/rt/itcms/state
+ end
+ global.get $~lib/rt/itcms/visitCount
+ i32.const 1
+ i32.mul
+ return
+ end
+ global.get $~lib/rt/itcms/iter
+ local.set $0
+ local.get $0
+ global.get $~lib/rt/itcms/toSpace
+ i32.ne
+ if
+ local.get $0
+ call $~lib/rt/itcms/Object#get:next
+ global.set $~lib/rt/itcms/iter
+ i32.const 1
+ drop
+ local.get $0
+ call $~lib/rt/itcms/Object#get:color
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ i32.eq
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 768
+ i32.const 228
+ i32.const 20
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ call $~lib/rt/itcms/free
+ i32.const 10
+ return
+ end
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/toSpace
+ call $~lib/rt/itcms/Object#set:nextWithColor
+ global.get $~lib/rt/itcms/toSpace
+ global.get $~lib/rt/itcms/toSpace
+ call $~lib/rt/itcms/Object#set:prev
+ i32.const 0
+ global.set $~lib/rt/itcms/state
+ br $break|0
+ end
+ i32.const 0
+ )
+ (func $~lib/rt/itcms/interrupt
+ (local $0 i32)
+ (local $1 i32)
+ i32.const 0
+ drop
+ i32.const 0
+ drop
+ i32.const 1024
+ i32.const 200
+ i32.mul
+ i32.const 100
+ i32.div_u
+ local.set $0
+ loop $do-continue|0
+ local.get $0
+ call $~lib/rt/itcms/step
+ i32.sub
+ local.set $0
+ global.get $~lib/rt/itcms/state
+ i32.const 0
+ i32.eq
+ if
+ i32.const 0
+ drop
+ global.get $~lib/rt/itcms/total
+ i64.extend_i32_u
+ i64.const 200
+ i64.mul
+ i64.const 100
+ i64.div_u
+ i32.wrap_i64
+ i32.const 1024
+ i32.add
+ global.set $~lib/rt/itcms/threshold
+ i32.const 0
+ drop
+ return
+ end
+ local.get $0
+ i32.const 0
+ i32.gt_s
+ local.set $1
+ local.get $1
+ br_if $do-continue|0
+ end
+ i32.const 0
+ drop
+ global.get $~lib/rt/itcms/total
+ i32.const 1024
+ global.get $~lib/rt/itcms/total
+ global.get $~lib/rt/itcms/threshold
+ i32.sub
+ i32.const 1024
+ i32.lt_u
+ i32.mul
+ i32.add
+ global.set $~lib/rt/itcms/threshold
+ i32.const 0
+ drop
+ )
+ (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32)
+ local.get $0
+ i32.const 12
+ i32.le_u
+ if (result i32)
+ i32.const 12
+ else
+ local.get $0
+ i32.const 4
+ i32.add
+ i32.const 15
+ i32.add
+ i32.const 15
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.const 4
+ i32.sub
+ end
+ )
+ (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32)
+ local.get $0
+ i32.const 1073741820
+ i32.ge_u
+ if
+ i32.const 704
+ i32.const 976
+ i32.const 458
+ i32.const 30
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ call $~lib/rt/tlsf/computeSize
+ )
+ (func $~lib/rt/tlsf/searchBlock (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.get $1
+ i32.const 256
+ i32.lt_u
+ if
+ i32.const 0
+ local.set $2
+ local.get $1
+ i32.const 4
+ i32.shr_u
+ local.set $3
+ else
+ local.get $1
+ i32.const 536870910
+ i32.lt_u
+ if (result i32)
+ local.get $1
+ i32.const 1
+ i32.const 27
+ local.get $1
+ i32.clz
+ i32.sub
+ i32.shl
+ i32.add
+ i32.const 1
+ i32.sub
+ else
+ local.get $1
+ end
+ local.set $4
+ i32.const 31
+ local.get $4
+ i32.clz
+ i32.sub
+ local.set $2
+ local.get $4
+ local.get $2
+ i32.const 4
+ i32.sub
+ i32.shr_u
+ i32.const 1
+ i32.const 4
+ i32.shl
+ i32.xor
+ local.set $3
+ local.get $2
+ i32.const 8
+ i32.const 1
+ i32.sub
+ i32.sub
+ local.set $2
+ end
+ i32.const 1
+ drop
+ local.get $2
+ i32.const 23
+ i32.lt_u
+ if (result i32)
+ local.get $3
+ i32.const 16
+ i32.lt_u
+ else
+ i32.const 0
+ end
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 330
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.set $5
+ local.get $2
+ local.set $4
+ local.get $5
+ local.get $4
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=4
+ i32.const 0
+ i32.const -1
+ i32.xor
+ local.get $3
+ i32.shl
+ i32.and
+ local.set $6
+ i32.const 0
+ local.set $7
+ local.get $6
+ i32.eqz
+ if
+ local.get $0
+ i32.load
+ i32.const 0
+ i32.const -1
+ i32.xor
+ local.get $2
+ i32.const 1
+ i32.add
+ i32.shl
+ i32.and
+ local.set $5
+ local.get $5
+ i32.eqz
+ if
+ i32.const 0
+ local.set $7
+ else
+ local.get $5
+ i32.ctz
+ local.set $2
+ local.get $0
+ local.set $8
+ local.get $2
+ local.set $4
+ local.get $8
+ local.get $4
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=4
+ local.set $6
+ i32.const 1
+ drop
+ local.get $6
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 343
+ i32.const 18
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.set $9
+ local.get $2
+ local.set $8
+ local.get $6
+ i32.ctz
+ local.set $4
+ local.get $9
+ local.get $8
+ i32.const 4
+ i32.shl
+ local.get $4
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ local.set $7
+ end
+ else
+ local.get $0
+ local.set $9
+ local.get $2
+ local.set $8
+ local.get $6
+ i32.ctz
+ local.set $4
+ local.get $9
+ local.get $8
+ i32.const 4
+ i32.shl
+ local.get $4
+ i32.add
+ i32.const 2
+ i32.shl
+ i32.add
+ i32.load offset=96
+ local.set $7
+ end
+ local.get $7
+ )
+ (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 i32)
+ i32.const 0
+ drop
+ local.get $1
+ i32.const 536870910
+ i32.lt_u
+ if
+ local.get $1
+ i32.const 1
+ i32.const 27
+ local.get $1
+ i32.clz
+ i32.sub
+ i32.shl
+ i32.const 1
+ i32.sub
+ i32.add
+ local.set $1
+ end
+ memory.size
+ local.set $2
+ local.get $1
+ i32.const 4
+ local.get $2
+ i32.const 16
+ i32.shl
+ i32.const 4
+ i32.sub
+ local.get $0
+ local.set $3
+ local.get $3
+ i32.load offset=1568
+ i32.ne
+ i32.shl
+ i32.add
+ local.set $1
+ local.get $1
+ i32.const 65535
+ i32.add
+ i32.const 65535
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.const 16
+ i32.shr_u
+ local.set $4
+ local.get $2
+ local.tee $3
+ local.get $4
+ local.tee $5
+ local.get $3
+ local.get $5
+ i32.gt_s
+ select
+ local.set $6
+ local.get $6
+ memory.grow
+ i32.const 0
+ i32.lt_s
+ if
+ local.get $4
+ memory.grow
+ i32.const 0
+ i32.lt_s
+ if
+ unreachable
+ end
+ end
+ memory.size
+ local.set $7
+ local.get $0
+ local.get $2
+ i32.const 16
+ i32.shl
+ local.get $7
+ i32.const 16
+ i32.shl
+ call $~lib/rt/tlsf/addMemory
+ drop
+ )
+ (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ local.get $1
+ i32.load
+ local.set $3
+ i32.const 1
+ drop
+ local.get $2
+ i32.const 4
+ i32.add
+ i32.const 15
+ i32.and
+ i32.eqz
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 357
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $3
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ local.get $2
+ i32.sub
+ local.set $4
+ local.get $4
+ i32.const 4
+ i32.const 12
+ i32.add
+ i32.ge_u
+ if
+ local.get $1
+ local.get $2
+ local.get $3
+ i32.const 2
+ i32.and
+ i32.or
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $1
+ i32.const 4
+ i32.add
+ local.get $2
+ i32.add
+ local.set $5
+ local.get $5
+ local.get $4
+ i32.const 4
+ i32.sub
+ i32.const 1
+ i32.or
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $0
+ local.get $5
+ call $~lib/rt/tlsf/insertBlock
+ else
+ local.get $1
+ local.get $3
+ i32.const 1
+ i32.const -1
+ i32.xor
+ i32.and
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ local.get $1
+ local.set $5
+ local.get $5
+ i32.const 4
+ i32.add
+ local.get $5
+ i32.load
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ local.get $1
+ local.set $5
+ local.get $5
+ i32.const 4
+ i32.add
+ local.get $5
+ i32.load
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ i32.add
+ i32.load
+ i32.const 2
+ i32.const -1
+ i32.xor
+ i32.and
+ call $~lib/rt/common/BLOCK#set:mmInfo
+ end
+ )
+ (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
+ (local $3 i32)
+ local.get $1
+ call $~lib/rt/tlsf/prepareSize
+ local.set $2
+ local.get $0
+ local.get $2
+ call $~lib/rt/tlsf/searchBlock
+ local.set $3
+ local.get $3
+ i32.eqz
+ if
+ local.get $0
+ local.get $2
+ call $~lib/rt/tlsf/growMemory
+ local.get $0
+ local.get $2
+ call $~lib/rt/tlsf/searchBlock
+ local.set $3
+ i32.const 1
+ drop
+ local.get $3
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 496
+ i32.const 16
+ call $~lib/builtins/abort
+ unreachable
+ end
+ end
+ i32.const 1
+ drop
+ local.get $3
+ i32.load
+ i32.const 3
+ i32.const -1
+ i32.xor
+ i32.and
+ local.get $2
+ i32.ge_u
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 976
+ i32.const 498
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.get $3
+ call $~lib/rt/tlsf/removeBlock
+ local.get $0
+ local.get $3
+ local.get $2
+ call $~lib/rt/tlsf/prepareBlock
+ i32.const 0
+ drop
+ local.get $3
+ )
+ (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32)
+ global.get $~lib/rt/tlsf/ROOT
+ i32.eqz
+ if
+ call $~lib/rt/tlsf/initialize
+ end
+ global.get $~lib/rt/tlsf/ROOT
+ local.get $0
+ call $~lib/rt/tlsf/allocateBlock
+ i32.const 4
+ i32.add
+ )
+ (func $~lib/rt/itcms/Object#set:rtId (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ i32.store offset=12
+ )
+ (func $~lib/rt/itcms/Object#set:rtSize (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ i32.store offset=16
+ )
+ (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 i32)
+ (local $8 i32)
+ (local $9 i64)
+ (local $10 i32)
+ block $~lib/util/memory/memset|inlined.0
+ local.get $0
+ local.set $5
+ local.get $1
+ local.set $4
+ local.get $2
+ local.set $3
+ i32.const 0
+ i32.const 1
+ i32.gt_s
+ drop
+ local.get $3
+ i32.eqz
+ if
+ br $~lib/util/memory/memset|inlined.0
+ end
+ local.get $5
+ local.get $3
+ i32.add
+ local.set $6
+ local.get $5
+ local.get $4
+ i32.store8
+ local.get $6
+ i32.const 1
+ i32.sub
+ local.get $4
+ i32.store8
+ local.get $3
+ i32.const 2
+ i32.le_u
+ if
+ br $~lib/util/memory/memset|inlined.0
+ end
+ local.get $5
+ local.get $4
+ i32.store8 offset=1
+ local.get $5
+ local.get $4
+ i32.store8 offset=2
+ local.get $6
+ i32.const 2
+ i32.sub
+ local.get $4
+ i32.store8
+ local.get $6
+ i32.const 3
+ i32.sub
+ local.get $4
+ i32.store8
+ local.get $3
+ i32.const 6
+ i32.le_u
+ if
+ br $~lib/util/memory/memset|inlined.0
+ end
+ local.get $5
+ local.get $4
+ i32.store8 offset=3
+ local.get $6
+ i32.const 4
+ i32.sub
+ local.get $4
+ i32.store8
+ local.get $3
+ i32.const 8
+ i32.le_u
+ if
+ br $~lib/util/memory/memset|inlined.0
+ end
+ i32.const 0
+ local.get $5
+ i32.sub
+ i32.const 3
+ i32.and
+ local.set $7
+ local.get $5
+ local.get $7
+ i32.add
+ local.set $5
+ local.get $3
+ local.get $7
+ i32.sub
+ local.set $3
+ local.get $3
+ i32.const -4
+ i32.and
+ local.set $3
+ i32.const -1
+ i32.const 255
+ i32.div_u
+ local.get $4
+ i32.const 255
+ i32.and
+ i32.mul
+ local.set $8
+ local.get $5
+ local.get $3
+ i32.add
+ local.set $6
+ local.get $5
+ local.get $8
+ i32.store
+ local.get $6
+ i32.const 4
+ i32.sub
+ local.get $8
+ i32.store
+ local.get $3
+ i32.const 8
+ i32.le_u
+ if
+ br $~lib/util/memory/memset|inlined.0
+ end
+ local.get $5
+ local.get $8
+ i32.store offset=4
+ local.get $5
+ local.get $8
+ i32.store offset=8
+ local.get $6
+ i32.const 12
+ i32.sub
+ local.get $8
+ i32.store
+ local.get $6
+ i32.const 8
+ i32.sub
+ local.get $8
+ i32.store
+ local.get $3
+ i32.const 24
+ i32.le_u
+ if
+ br $~lib/util/memory/memset|inlined.0
+ end
+ local.get $5
+ local.get $8
+ i32.store offset=12
+ local.get $5
+ local.get $8
+ i32.store offset=16
+ local.get $5
+ local.get $8
+ i32.store offset=20
+ local.get $5
+ local.get $8
+ i32.store offset=24
+ local.get $6
+ i32.const 28
+ i32.sub
+ local.get $8
+ i32.store
+ local.get $6
+ i32.const 24
+ i32.sub
+ local.get $8
+ i32.store
+ local.get $6
+ i32.const 20
+ i32.sub
+ local.get $8
+ i32.store
+ local.get $6
+ i32.const 16
+ i32.sub
+ local.get $8
+ i32.store
+ i32.const 24
+ local.get $5
+ i32.const 4
+ i32.and
+ i32.add
+ local.set $7
+ local.get $5
+ local.get $7
+ i32.add
+ local.set $5
+ local.get $3
+ local.get $7
+ i32.sub
+ local.set $3
+ local.get $8
+ i64.extend_i32_u
+ local.get $8
+ i64.extend_i32_u
+ i64.const 32
+ i64.shl
+ i64.or
+ local.set $9
+ loop $while-continue|0
+ local.get $3
+ i32.const 32
+ i32.ge_u
+ local.set $10
+ local.get $10
+ if
+ local.get $5
+ local.get $9
+ i64.store
+ local.get $5
+ local.get $9
+ i64.store offset=8
+ local.get $5
+ local.get $9
+ i64.store offset=16
+ local.get $5
+ local.get $9
+ i64.store offset=24
+ local.get $3
+ i32.const 32
+ i32.sub
+ local.set $3
+ local.get $5
+ i32.const 32
+ i32.add
+ local.set $5
+ br $while-continue|0
+ end
+ end
+ end
+ )
+ (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
+ (local $3 i32)
+ local.get $0
+ i32.const 1073741804
+ i32.ge_u
+ if
+ i32.const 704
+ i32.const 768
+ i32.const 260
+ i32.const 31
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/rt/itcms/total
+ global.get $~lib/rt/itcms/threshold
+ i32.ge_u
+ if
+ call $~lib/rt/itcms/interrupt
+ end
+ i32.const 16
+ local.get $0
+ i32.add
+ call $~lib/rt/tlsf/__alloc
+ i32.const 4
+ i32.sub
+ local.set $2
+ local.get $2
+ local.get $1
+ call $~lib/rt/itcms/Object#set:rtId
+ local.get $2
+ local.get $0
+ call $~lib/rt/itcms/Object#set:rtSize
+ local.get $2
+ global.get $~lib/rt/itcms/fromSpace
+ global.get $~lib/rt/itcms/white
+ call $~lib/rt/itcms/Object#linkTo
+ global.get $~lib/rt/itcms/total
+ local.get $2
+ call $~lib/rt/itcms/Object#get:size
+ i32.add
+ global.set $~lib/rt/itcms/total
+ local.get $2
+ i32.const 20
+ i32.add
+ local.set $3
+ local.get $3
+ i32.const 0
+ local.get $0
+ call $~lib/memory/memory.fill
+ local.get $3
+ )
+ (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ local.get $1
+ i32.eqz
+ if
+ return
+ end
+ i32.const 1
+ drop
+ local.get $0
+ i32.eqz
+ if
+ i32.const 0
+ i32.const 768
+ i32.const 294
+ i32.const 14
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ i32.const 20
+ i32.sub
+ local.set $3
+ local.get $3
+ call $~lib/rt/itcms/Object#get:color
+ global.get $~lib/rt/itcms/white
+ i32.eq
+ if
+ local.get $0
+ i32.const 20
+ i32.sub
+ local.set $4
+ local.get $4
+ call $~lib/rt/itcms/Object#get:color
+ local.set $5
+ local.get $5
+ global.get $~lib/rt/itcms/white
+ i32.eqz
+ i32.eq
+ if
+ local.get $2
+ if
+ local.get $4
+ call $~lib/rt/itcms/Object#makeGray
+ else
+ local.get $3
+ call $~lib/rt/itcms/Object#makeGray
+ end
+ else
+ local.get $5
+ i32.const 3
+ i32.eq
+ if (result i32)
+ global.get $~lib/rt/itcms/state
+ i32.const 1
+ i32.eq
+ else
+ i32.const 0
+ end
+ if
+ local.get $3
+ call $~lib/rt/itcms/Object#makeGray
+ end
+ end
+ end
+ )
+ (func $~lib/arraybuffer/ArrayBufferView#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/arraybuffer/ArrayBufferView#set:dataStart (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ i32.store offset=4
+ )
+ (func $~lib/arraybuffer/ArrayBufferView#set:byteLength (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ i32.store offset=8
+ )
+ (func $~lib/typedarray/Float64Array#get:length (param $0 i32) (result i32)
+ local.get $0
+ i32.load offset=8
+ i32.const 3
+ i32.shr_u
+ )
+ (func $start:assembly/vec3~anonymous|0 (result i32)
+ i32.const 1040
+ )
+ (func $start:assembly/vec3
+ 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 816
+ call $~lib/rt/itcms/initLazy
+ global.set $~lib/rt/itcms/pinSpace
+ i32.const 848
+ call $~lib/rt/itcms/initLazy
+ global.set $~lib/rt/itcms/toSpace
+ i32.const 928
+ call $~lib/rt/itcms/initLazy
+ global.set $~lib/rt/itcms/fromSpace
+ call $assembly/vec3/create
+ global.set $assembly/vec3/vec
+ i32.const 0
+ global.set $~argumentsLength
+ i32.const 1072
+ i32.load
+ call_indirect $0 (type $none_=>_i32)
+ global.set $assembly/vec3/forEach
+ )
+ (func $assembly/vec4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/maths/Maths.hypot4 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ local.get $0
+ local.set $4
+ local.get $4
+ f64.abs
+ local.set $0
+ local.get $1
+ local.set $4
+ local.get $4
+ f64.abs
+ local.set $1
+ local.get $2
+ local.set $4
+ local.get $4
+ f64.abs
+ local.set $2
+ local.get $3
+ local.set $4
+ local.get $4
+ f64.abs
+ local.set $3
+ local.get $0
+ local.set $5
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/maths/Maths.max
+ local.set $4
+ local.get $5
+ local.get $4
+ f64.max
+ local.set $5
+ local.get $5
+ f64.const 0
+ f64.eq
+ if
+ f64.const 0
+ return
+ end
+ f64.const 1
+ local.get $5
+ f64.div
+ local.set $4
+ local.get $0
+ local.get $4
+ f64.mul
+ local.set $0
+ local.get $1
+ local.get $4
+ f64.mul
+ local.set $1
+ local.get $2
+ local.get $4
+ f64.mul
+ local.set $2
+ local.get $3
+ local.get $4
+ f64.mul
+ local.set $3
+ local.get $5
+ local.get $0
+ local.get $0
+ f64.mul
+ local.get $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.set $6
+ local.get $6
+ f64.sqrt
+ f64.mul
+ )
+ (func $assembly/vec4/distance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $5
+ local.get $2
+ local.get $3
+ local.get $4
+ local.get $5
+ call $assembly/maths/Maths.hypot4
+ )
+ (func $assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $5
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $5
+ f64.mul
+ f64.add
+ )
+ (func $assembly/vec4/length (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/maths/Maths.hypot4
+ )
+ (func $assembly/vec4/squaredLength (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ local.get $1
+ f64.mul
+ local.get $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ )
+ (func $start:assembly/vec4~anonymous|0 (result i32)
+ i32.const 1328
+ )
+ (func $start:assembly/vec4
+ call $assembly/vec4/create
+ global.set $assembly/vec4/vec
+ i32.const 0
+ global.set $~argumentsLength
+ i32.const 1360
+ i32.load
+ call_indirect $0 (type $none_=>_i32)
+ global.set $assembly/vec4/forEach
+ )
+ (func $assembly/vec4/copy (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ local.get $10
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/dot (param $0 i32) (param $1 i32) (result f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ )
+ (func $assembly/vec4/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $3
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $3
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $3
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $7
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/normalize (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.set $6
+ local.get $6
+ f64.const 0
+ f64.gt
+ if
+ f64.const 1
+ local.get $6
+ local.set $7
+ local.get $7
+ f64.sqrt
+ f64.div
+ local.set $6
+ end
+ local.get $0
+ i32.const 0
+ local.get $2
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $5
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/exactEquals (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/vec3/dot (param $0 i32) (param $1 i32) (result f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ )
+ (func $assembly/vec3/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $8
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $6
+ f64.mul
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $7
+ f64.mul
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/normalize (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.set $5
+ local.get $5
+ f64.const 0
+ f64.gt
+ if
+ f64.const 1
+ local.get $5
+ local.set $6
+ local.get $6
+ f64.sqrt
+ f64.div
+ local.set $5
+ end
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $~lib/math/pio2_large_quot (param $0 f64) (param $1 i64) (result i32)
+ (local $2 i64)
+ (local $3 i64)
+ (local $4 i64)
+ (local $5 i32)
+ (local $6 i64)
+ (local $7 i64)
+ (local $8 i64)
+ (local $9 i64)
+ (local $10 i64)
+ (local $11 i64)
+ (local $12 i64)
+ (local $13 i64)
+ (local $14 i64)
+ (local $15 i64)
+ (local $16 i64)
+ (local $17 i64)
+ (local $18 i64)
+ (local $19 i64)
+ (local $20 i64)
+ (local $21 i64)
+ (local $22 i64)
+ (local $23 i64)
+ (local $24 i64)
+ (local $25 i64)
+ (local $26 i64)
+ (local $27 i64)
+ (local $28 i64)
+ (local $29 i64)
+ (local $30 i64)
+ (local $31 i64)
+ (local $32 i64)
+ (local $33 i64)
+ (local $34 i64)
+ (local $35 i64)
+ (local $36 f64)
+ local.get $1
+ i64.const 9223372036854775807
+ i64.and
+ local.set $2
+ local.get $2
+ i64.const 52
+ i64.shr_s
+ i64.const 1045
+ i64.sub
+ local.set $3
+ local.get $3
+ i64.const 63
+ i64.and
+ local.set $4
+ i32.const 1728
+ local.get $3
+ i64.const 6
+ i64.shr_s
+ i32.wrap_i64
+ i32.const 3
+ i32.shl
+ i32.add
+ local.set $5
+ local.get $5
+ i64.load
+ local.set $9
+ local.get $5
+ i64.load offset=8
+ local.set $10
+ local.get $5
+ i64.load offset=16
+ local.set $11
+ local.get $4
+ i64.const 0
+ i64.ne
+ if
+ i32.const 64
+ i64.extend_i32_s
+ local.get $4
+ i64.sub
+ local.set $12
+ local.get $5
+ i64.load offset=24
+ local.set $13
+ local.get $10
+ local.get $12
+ i64.shr_u
+ local.get $9
+ local.get $4
+ i64.shl
+ i64.or
+ local.set $6
+ local.get $11
+ local.get $12
+ i64.shr_u
+ local.get $10
+ local.get $4
+ i64.shl
+ i64.or
+ local.set $7
+ local.get $13
+ local.get $12
+ i64.shr_u
+ local.get $11
+ local.get $4
+ i64.shl
+ i64.or
+ local.set $8
+ else
+ local.get $9
+ local.set $6
+ local.get $10
+ local.set $7
+ local.get $11
+ local.set $8
+ end
+ local.get $1
+ i64.const 4503599627370495
+ i64.and
+ i64.const 4503599627370496
+ i64.or
+ local.set $14
+ local.get $7
+ local.set $13
+ local.get $14
+ local.set $12
+ local.get $13
+ i64.const 4294967295
+ i64.and
+ local.set $15
+ local.get $12
+ i64.const 4294967295
+ i64.and
+ local.set $16
+ local.get $13
+ i64.const 32
+ i64.shr_u
+ local.set $13
+ local.get $12
+ i64.const 32
+ i64.shr_u
+ local.set $12
+ local.get $15
+ local.get $16
+ i64.mul
+ local.set $19
+ local.get $19
+ i64.const 4294967295
+ i64.and
+ local.set $17
+ local.get $13
+ local.get $16
+ i64.mul
+ local.get $19
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.set $19
+ local.get $19
+ i64.const 32
+ i64.shr_u
+ local.set $18
+ local.get $15
+ local.get $12
+ i64.mul
+ local.get $19
+ i64.const 4294967295
+ i64.and
+ i64.add
+ local.set $19
+ local.get $13
+ local.get $12
+ i64.mul
+ local.get $18
+ i64.add
+ local.get $19
+ i64.const 32
+ i64.shr_u
+ i64.add
+ global.set $~lib/math/res128_hi
+ local.get $19
+ i64.const 32
+ i64.shl
+ local.get $17
+ i64.add
+ local.set $20
+ global.get $~lib/math/res128_hi
+ local.set $21
+ local.get $6
+ local.get $14
+ i64.mul
+ local.set $22
+ local.get $8
+ i64.const 32
+ i64.shr_u
+ local.get $14
+ i64.const 32
+ i64.shr_s
+ i64.mul
+ local.set $23
+ local.get $20
+ local.get $23
+ i64.add
+ local.set $24
+ local.get $22
+ local.get $21
+ i64.add
+ local.get $24
+ local.get $23
+ i64.lt_u
+ i64.extend_i32_u
+ i64.add
+ local.set $25
+ local.get $24
+ i64.const 2
+ i64.shl
+ local.set $26
+ local.get $25
+ i64.const 2
+ i64.shl
+ local.get $24
+ i64.const 62
+ i64.shr_u
+ i64.or
+ local.set $27
+ local.get $27
+ i64.const 63
+ i64.shr_s
+ local.set $28
+ local.get $28
+ i64.const 1
+ i64.shr_s
+ local.set $29
+ local.get $25
+ i64.const 62
+ i64.shr_s
+ local.get $28
+ i64.sub
+ local.set $30
+ i64.const 4372995238176751616
+ local.get $26
+ local.get $28
+ i64.xor
+ local.set $13
+ local.get $27
+ local.get $29
+ i64.xor
+ local.set $12
+ local.get $12
+ i64.clz
+ local.set $19
+ local.get $12
+ local.get $19
+ i64.shl
+ local.get $13
+ i64.const 64
+ local.get $19
+ i64.sub
+ i64.shr_u
+ i64.or
+ local.set $12
+ local.get $13
+ local.get $19
+ i64.shl
+ local.set $13
+ i64.const -3958705157555305932
+ local.set $16
+ local.get $12
+ local.set $15
+ local.get $16
+ i64.const 4294967295
+ i64.and
+ local.set $18
+ local.get $15
+ i64.const 4294967295
+ i64.and
+ local.set $17
+ local.get $16
+ i64.const 32
+ i64.shr_u
+ local.set $16
+ local.get $15
+ i64.const 32
+ i64.shr_u
+ local.set $15
+ local.get $18
+ local.get $17
+ i64.mul
+ local.set $33
+ local.get $33
+ i64.const 4294967295
+ i64.and
+ local.set $31
+ local.get $16
+ local.get $17
+ i64.mul
+ local.get $33
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.set $33
+ local.get $33
+ i64.const 32
+ i64.shr_u
+ local.set $32
+ local.get $18
+ local.get $15
+ i64.mul
+ local.get $33
+ i64.const 4294967295
+ i64.and
+ i64.add
+ local.set $33
+ local.get $16
+ local.get $15
+ i64.mul
+ local.get $32
+ i64.add
+ local.get $33
+ i64.const 32
+ i64.shr_u
+ i64.add
+ global.set $~lib/math/res128_hi
+ local.get $33
+ i64.const 32
+ i64.shl
+ local.get $31
+ i64.add
+ local.set $33
+ global.get $~lib/math/res128_hi
+ local.set $32
+ local.get $32
+ i64.const 11
+ i64.shr_u
+ local.set $31
+ local.get $33
+ i64.const 11
+ i64.shr_u
+ local.get $32
+ i64.const 53
+ i64.shl
+ i64.or
+ local.set $17
+ f64.const 2.6469779601696886e-23
+ i64.const -4267615245585081135
+ f64.convert_i64_u
+ f64.mul
+ local.get $12
+ f64.convert_i64_u
+ f64.mul
+ f64.const 2.6469779601696886e-23
+ i64.const -3958705157555305932
+ f64.convert_i64_u
+ f64.mul
+ local.get $13
+ f64.convert_i64_u
+ f64.mul
+ f64.add
+ i64.trunc_f64_u
+ local.set $18
+ local.get $31
+ local.get $33
+ local.get $18
+ i64.lt_u
+ i64.extend_i32_u
+ i64.add
+ f64.convert_i64_u
+ global.set $~lib/math/rempio2_y0
+ f64.const 5.421010862427522e-20
+ local.get $17
+ local.get $18
+ i64.add
+ f64.convert_i64_u
+ f64.mul
+ global.set $~lib/math/rempio2_y1
+ local.get $19
+ i64.const 52
+ i64.shl
+ i64.sub
+ local.set $34
+ local.get $1
+ local.get $27
+ i64.xor
+ i64.const -9223372036854775808
+ i64.and
+ local.set $35
+ local.get $34
+ local.get $35
+ i64.or
+ f64.reinterpret_i64
+ local.set $36
+ global.get $~lib/math/rempio2_y0
+ local.get $36
+ f64.mul
+ global.set $~lib/math/rempio2_y0
+ global.get $~lib/math/rempio2_y1
+ local.get $36
+ f64.mul
+ global.set $~lib/math/rempio2_y1
+ local.get $30
+ i32.wrap_i64
+ )
+ (func $~lib/math/NativeMath.sin (param $0 f64) (result f64)
+ (local $1 i64)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 i64)
+ (local $12 i32)
+ (local $13 i32)
+ (local $14 i32)
+ (local $15 i32)
+ (local $16 f64)
+ (local $17 i32)
+ (local $18 f64)
+ (local $19 f64)
+ local.get $0
+ i64.reinterpret_f64
+ local.set $1
+ local.get $1
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $2
+ local.get $2
+ i32.const 31
+ i32.shr_u
+ local.set $3
+ local.get $2
+ i32.const 2147483647
+ i32.and
+ local.set $2
+ local.get $2
+ i32.const 1072243195
+ i32.le_u
+ if
+ local.get $2
+ i32.const 1045430272
+ i32.lt_u
+ if
+ local.get $0
+ return
+ end
+ block $~lib/math/sin_kern|inlined.0 (result f64)
+ local.get $0
+ local.set $6
+ f64.const 0
+ local.set $5
+ i32.const 0
+ local.set $4
+ local.get $6
+ local.get $6
+ f64.mul
+ local.set $7
+ local.get $7
+ local.get $7
+ f64.mul
+ local.set $8
+ f64.const 0.00833333333332249
+ local.get $7
+ f64.const -1.984126982985795e-04
+ local.get $7
+ f64.const 2.7557313707070068e-06
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $8
+ f64.mul
+ f64.const -2.5050760253406863e-08
+ local.get $7
+ f64.const 1.58969099521155e-10
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.set $9
+ local.get $7
+ local.get $6
+ f64.mul
+ local.set $10
+ local.get $4
+ i32.eqz
+ if
+ local.get $6
+ local.get $10
+ f64.const -0.16666666666666632
+ local.get $7
+ local.get $9
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ br $~lib/math/sin_kern|inlined.0
+ else
+ local.get $6
+ local.get $7
+ f64.const 0.5
+ local.get $5
+ f64.mul
+ local.get $10
+ local.get $9
+ f64.mul
+ f64.sub
+ f64.mul
+ local.get $5
+ f64.sub
+ local.get $10
+ f64.const -0.16666666666666632
+ f64.mul
+ f64.sub
+ f64.sub
+ br $~lib/math/sin_kern|inlined.0
+ end
+ unreachable
+ end
+ return
+ end
+ local.get $2
+ i32.const 2146435072
+ i32.ge_u
+ if
+ local.get $0
+ local.get $0
+ f64.sub
+ return
+ end
+ block $~lib/math/rempio2|inlined.0 (result i32)
+ local.get $0
+ local.set $5
+ local.get $1
+ local.set $11
+ local.get $3
+ local.set $4
+ local.get $11
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 2147483647
+ i32.and
+ local.set $12
+ i32.const 0
+ i32.const 1
+ i32.lt_s
+ drop
+ local.get $12
+ i32.const 1073928572
+ i32.lt_u
+ if
+ i32.const 1
+ local.set $13
+ local.get $4
+ i32.eqz
+ if
+ local.get $5
+ f64.const 1.5707963267341256
+ f64.sub
+ local.set $10
+ local.get $12
+ i32.const 1073291771
+ i32.ne
+ if
+ local.get $10
+ f64.const 6.077100506506192e-11
+ f64.sub
+ local.set $9
+ local.get $10
+ local.get $9
+ f64.sub
+ f64.const 6.077100506506192e-11
+ f64.sub
+ local.set $8
+ else
+ local.get $10
+ f64.const 6.077100506303966e-11
+ f64.sub
+ local.set $10
+ local.get $10
+ f64.const 2.0222662487959506e-21
+ f64.sub
+ local.set $9
+ local.get $10
+ local.get $9
+ f64.sub
+ f64.const 2.0222662487959506e-21
+ f64.sub
+ local.set $8
+ end
+ else
+ local.get $5
+ f64.const 1.5707963267341256
+ f64.add
+ local.set $10
+ local.get $12
+ i32.const 1073291771
+ i32.ne
+ if
+ local.get $10
+ f64.const 6.077100506506192e-11
+ f64.add
+ local.set $9
+ local.get $10
+ local.get $9
+ f64.sub
+ f64.const 6.077100506506192e-11
+ f64.add
+ local.set $8
+ else
+ local.get $10
+ f64.const 6.077100506303966e-11
+ f64.add
+ local.set $10
+ local.get $10
+ f64.const 2.0222662487959506e-21
+ f64.add
+ local.set $9
+ local.get $10
+ local.get $9
+ f64.sub
+ f64.const 2.0222662487959506e-21
+ f64.add
+ local.set $8
+ end
+ i32.const -1
+ local.set $13
+ end
+ local.get $9
+ global.set $~lib/math/rempio2_y0
+ local.get $8
+ global.set $~lib/math/rempio2_y1
+ local.get $13
+ br $~lib/math/rempio2|inlined.0
+ end
+ local.get $12
+ i32.const 1094263291
+ i32.lt_u
+ if
+ local.get $5
+ f64.const 0.6366197723675814
+ f64.mul
+ f64.nearest
+ local.set $8
+ local.get $5
+ local.get $8
+ f64.const 1.5707963267341256
+ f64.mul
+ f64.sub
+ local.set $9
+ local.get $8
+ f64.const 6.077100506506192e-11
+ f64.mul
+ local.set $10
+ local.get $12
+ i32.const 20
+ i32.shr_u
+ local.set $13
+ local.get $9
+ local.get $10
+ f64.sub
+ local.set $7
+ local.get $7
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $14
+ local.get $13
+ local.get $14
+ i32.const 20
+ i32.shr_u
+ i32.const 2047
+ i32.and
+ i32.sub
+ local.set $15
+ local.get $15
+ i32.const 16
+ i32.gt_u
+ if
+ local.get $9
+ local.set $6
+ local.get $8
+ f64.const 6.077100506303966e-11
+ f64.mul
+ local.set $10
+ local.get $6
+ local.get $10
+ f64.sub
+ local.set $9
+ local.get $8
+ f64.const 2.0222662487959506e-21
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.sub
+ local.get $10
+ f64.sub
+ f64.sub
+ local.set $10
+ local.get $9
+ local.get $10
+ f64.sub
+ local.set $7
+ local.get $7
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $14
+ local.get $13
+ local.get $14
+ i32.const 20
+ i32.shr_u
+ i32.const 2047
+ i32.and
+ i32.sub
+ local.set $15
+ local.get $15
+ i32.const 49
+ i32.gt_u
+ if
+ local.get $9
+ local.set $16
+ local.get $8
+ f64.const 2.0222662487111665e-21
+ f64.mul
+ local.set $10
+ local.get $16
+ local.get $10
+ f64.sub
+ local.set $9
+ local.get $8
+ f64.const 8.4784276603689e-32
+ f64.mul
+ local.get $16
+ local.get $9
+ f64.sub
+ local.get $10
+ f64.sub
+ f64.sub
+ local.set $10
+ local.get $9
+ local.get $10
+ f64.sub
+ local.set $7
+ end
+ end
+ local.get $9
+ local.get $7
+ f64.sub
+ local.get $10
+ f64.sub
+ local.set $6
+ local.get $7
+ global.set $~lib/math/rempio2_y0
+ local.get $6
+ global.set $~lib/math/rempio2_y1
+ local.get $8
+ i32.trunc_f64_s
+ br $~lib/math/rempio2|inlined.0
+ end
+ local.get $5
+ local.get $11
+ call $~lib/math/pio2_large_quot
+ local.set $15
+ i32.const 0
+ local.get $15
+ i32.sub
+ local.get $15
+ local.get $4
+ select
+ end
+ local.set $17
+ global.get $~lib/math/rempio2_y0
+ local.set $18
+ global.get $~lib/math/rempio2_y1
+ local.set $19
+ local.get $17
+ i32.const 1
+ i32.and
+ if (result f64)
+ local.get $18
+ local.set $8
+ local.get $19
+ local.set $16
+ local.get $8
+ local.get $8
+ f64.mul
+ local.set $5
+ local.get $5
+ local.get $5
+ f64.mul
+ local.set $6
+ local.get $5
+ f64.const 0.0416666666666666
+ local.get $5
+ f64.const -0.001388888888887411
+ local.get $5
+ f64.const 2.480158728947673e-05
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.get $6
+ local.get $6
+ f64.mul
+ f64.const -2.7557314351390663e-07
+ local.get $5
+ f64.const 2.087572321298175e-09
+ local.get $5
+ f64.const -1.1359647557788195e-11
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.set $7
+ f64.const 0.5
+ local.get $5
+ f64.mul
+ local.set $10
+ f64.const 1
+ local.get $10
+ f64.sub
+ local.set $6
+ local.get $6
+ f64.const 1
+ local.get $6
+ f64.sub
+ local.get $10
+ f64.sub
+ local.get $5
+ local.get $7
+ f64.mul
+ local.get $8
+ local.get $16
+ f64.mul
+ f64.sub
+ f64.add
+ f64.add
+ else
+ block $~lib/math/sin_kern|inlined.1 (result f64)
+ local.get $18
+ local.set $16
+ local.get $19
+ local.set $9
+ i32.const 1
+ local.set $13
+ local.get $16
+ local.get $16
+ f64.mul
+ local.set $10
+ local.get $10
+ local.get $10
+ f64.mul
+ local.set $7
+ f64.const 0.00833333333332249
+ local.get $10
+ f64.const -1.984126982985795e-04
+ local.get $10
+ f64.const 2.7557313707070068e-06
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $7
+ f64.mul
+ f64.const -2.5050760253406863e-08
+ local.get $10
+ f64.const 1.58969099521155e-10
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.set $6
+ local.get $10
+ local.get $16
+ f64.mul
+ local.set $5
+ local.get $13
+ i32.eqz
+ if
+ local.get $16
+ local.get $5
+ f64.const -0.16666666666666632
+ local.get $10
+ local.get $6
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ br $~lib/math/sin_kern|inlined.1
+ else
+ local.get $16
+ local.get $10
+ f64.const 0.5
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.sub
+ f64.mul
+ local.get $9
+ f64.sub
+ local.get $5
+ f64.const -0.16666666666666632
+ f64.mul
+ f64.sub
+ f64.sub
+ br $~lib/math/sin_kern|inlined.1
+ end
+ unreachable
+ end
+ end
+ local.set $0
+ local.get $17
+ i32.const 2
+ i32.and
+ if (result f64)
+ local.get $0
+ f64.neg
+ else
+ local.get $0
+ end
+ )
+ (func $~lib/math/NativeMath.cos (param $0 f64) (result f64)
+ (local $1 i64)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 i32)
+ (local $11 i64)
+ (local $12 i32)
+ (local $13 i32)
+ (local $14 i32)
+ (local $15 i32)
+ (local $16 f64)
+ (local $17 i32)
+ (local $18 f64)
+ (local $19 f64)
+ local.get $0
+ i64.reinterpret_f64
+ local.set $1
+ local.get $1
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $2
+ local.get $2
+ i32.const 31
+ i32.shr_u
+ local.set $3
+ local.get $2
+ i32.const 2147483647
+ i32.and
+ local.set $2
+ local.get $2
+ i32.const 1072243195
+ i32.le_u
+ if
+ local.get $2
+ i32.const 1044816030
+ i32.lt_u
+ if
+ f64.const 1
+ return
+ end
+ local.get $0
+ local.set $5
+ f64.const 0
+ local.set $4
+ local.get $5
+ local.get $5
+ f64.mul
+ local.set $6
+ local.get $6
+ local.get $6
+ f64.mul
+ local.set $7
+ local.get $6
+ f64.const 0.0416666666666666
+ local.get $6
+ f64.const -0.001388888888887411
+ local.get $6
+ f64.const 2.480158728947673e-05
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.get $7
+ local.get $7
+ f64.mul
+ f64.const -2.7557314351390663e-07
+ local.get $6
+ f64.const 2.087572321298175e-09
+ local.get $6
+ f64.const -1.1359647557788195e-11
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.set $8
+ f64.const 0.5
+ local.get $6
+ f64.mul
+ local.set $9
+ f64.const 1
+ local.get $9
+ f64.sub
+ local.set $7
+ local.get $7
+ f64.const 1
+ local.get $7
+ f64.sub
+ local.get $9
+ f64.sub
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $5
+ local.get $4
+ f64.mul
+ f64.sub
+ f64.add
+ f64.add
+ return
+ end
+ local.get $2
+ i32.const 2146435072
+ i32.ge_u
+ if
+ local.get $0
+ local.get $0
+ f64.sub
+ return
+ end
+ block $~lib/math/rempio2|inlined.1 (result i32)
+ local.get $0
+ local.set $4
+ local.get $1
+ local.set $11
+ local.get $3
+ local.set $10
+ local.get $11
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 2147483647
+ i32.and
+ local.set $12
+ i32.const 0
+ i32.const 1
+ i32.lt_s
+ drop
+ local.get $12
+ i32.const 1073928572
+ i32.lt_u
+ if
+ i32.const 1
+ local.set $13
+ local.get $10
+ i32.eqz
+ if
+ local.get $4
+ f64.const 1.5707963267341256
+ f64.sub
+ local.set $9
+ local.get $12
+ i32.const 1073291771
+ i32.ne
+ if
+ local.get $9
+ f64.const 6.077100506506192e-11
+ f64.sub
+ local.set $8
+ local.get $9
+ local.get $8
+ f64.sub
+ f64.const 6.077100506506192e-11
+ f64.sub
+ local.set $7
+ else
+ local.get $9
+ f64.const 6.077100506303966e-11
+ f64.sub
+ local.set $9
+ local.get $9
+ f64.const 2.0222662487959506e-21
+ f64.sub
+ local.set $8
+ local.get $9
+ local.get $8
+ f64.sub
+ f64.const 2.0222662487959506e-21
+ f64.sub
+ local.set $7
+ end
+ else
+ local.get $4
+ f64.const 1.5707963267341256
+ f64.add
+ local.set $9
+ local.get $12
+ i32.const 1073291771
+ i32.ne
+ if
+ local.get $9
+ f64.const 6.077100506506192e-11
+ f64.add
+ local.set $8
+ local.get $9
+ local.get $8
+ f64.sub
+ f64.const 6.077100506506192e-11
+ f64.add
+ local.set $7
+ else
+ local.get $9
+ f64.const 6.077100506303966e-11
+ f64.add
+ local.set $9
+ local.get $9
+ f64.const 2.0222662487959506e-21
+ f64.add
+ local.set $8
+ local.get $9
+ local.get $8
+ f64.sub
+ f64.const 2.0222662487959506e-21
+ f64.add
+ local.set $7
+ end
+ i32.const -1
+ local.set $13
+ end
+ local.get $8
+ global.set $~lib/math/rempio2_y0
+ local.get $7
+ global.set $~lib/math/rempio2_y1
+ local.get $13
+ br $~lib/math/rempio2|inlined.1
+ end
+ local.get $12
+ i32.const 1094263291
+ i32.lt_u
+ if
+ local.get $4
+ f64.const 0.6366197723675814
+ f64.mul
+ f64.nearest
+ local.set $7
+ local.get $4
+ local.get $7
+ f64.const 1.5707963267341256
+ f64.mul
+ f64.sub
+ local.set $8
+ local.get $7
+ f64.const 6.077100506506192e-11
+ f64.mul
+ local.set $9
+ local.get $12
+ i32.const 20
+ i32.shr_u
+ local.set $13
+ local.get $8
+ local.get $9
+ f64.sub
+ local.set $6
+ local.get $6
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $14
+ local.get $13
+ local.get $14
+ i32.const 20
+ i32.shr_u
+ i32.const 2047
+ i32.and
+ i32.sub
+ local.set $15
+ local.get $15
+ i32.const 16
+ i32.gt_u
+ if
+ local.get $8
+ local.set $5
+ local.get $7
+ f64.const 6.077100506303966e-11
+ f64.mul
+ local.set $9
+ local.get $5
+ local.get $9
+ f64.sub
+ local.set $8
+ local.get $7
+ f64.const 2.0222662487959506e-21
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.sub
+ local.get $9
+ f64.sub
+ f64.sub
+ local.set $9
+ local.get $8
+ local.get $9
+ f64.sub
+ local.set $6
+ local.get $6
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $14
+ local.get $13
+ local.get $14
+ i32.const 20
+ i32.shr_u
+ i32.const 2047
+ i32.and
+ i32.sub
+ local.set $15
+ local.get $15
+ i32.const 49
+ i32.gt_u
+ if
+ local.get $8
+ local.set $16
+ local.get $7
+ f64.const 2.0222662487111665e-21
+ f64.mul
+ local.set $9
+ local.get $16
+ local.get $9
+ f64.sub
+ local.set $8
+ local.get $7
+ f64.const 8.4784276603689e-32
+ f64.mul
+ local.get $16
+ local.get $8
+ f64.sub
+ local.get $9
+ f64.sub
+ f64.sub
+ local.set $9
+ local.get $8
+ local.get $9
+ f64.sub
+ local.set $6
+ end
+ end
+ local.get $8
+ local.get $6
+ f64.sub
+ local.get $9
+ f64.sub
+ local.set $5
+ local.get $6
+ global.set $~lib/math/rempio2_y0
+ local.get $5
+ global.set $~lib/math/rempio2_y1
+ local.get $7
+ i32.trunc_f64_s
+ br $~lib/math/rempio2|inlined.1
+ end
+ local.get $4
+ local.get $11
+ call $~lib/math/pio2_large_quot
+ local.set $15
+ i32.const 0
+ local.get $15
+ i32.sub
+ local.get $15
+ local.get $10
+ select
+ end
+ local.set $17
+ global.get $~lib/math/rempio2_y0
+ local.set $18
+ global.get $~lib/math/rempio2_y1
+ local.set $19
+ local.get $17
+ i32.const 1
+ i32.and
+ if (result f64)
+ block $~lib/math/sin_kern|inlined.2 (result f64)
+ local.get $18
+ local.set $7
+ local.get $19
+ local.set $16
+ i32.const 1
+ local.set $13
+ local.get $7
+ local.get $7
+ f64.mul
+ local.set $4
+ local.get $4
+ local.get $4
+ f64.mul
+ local.set $5
+ f64.const 0.00833333333332249
+ local.get $4
+ f64.const -1.984126982985795e-04
+ local.get $4
+ f64.const 2.7557313707070068e-06
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $5
+ f64.mul
+ f64.const -2.5050760253406863e-08
+ local.get $4
+ f64.const 1.58969099521155e-10
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.set $6
+ local.get $4
+ local.get $7
+ f64.mul
+ local.set $9
+ local.get $13
+ i32.eqz
+ if
+ local.get $7
+ local.get $9
+ f64.const -0.16666666666666632
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ br $~lib/math/sin_kern|inlined.2
+ else
+ local.get $7
+ local.get $4
+ f64.const 0.5
+ local.get $16
+ f64.mul
+ local.get $9
+ local.get $6
+ f64.mul
+ f64.sub
+ f64.mul
+ local.get $16
+ f64.sub
+ local.get $9
+ f64.const -0.16666666666666632
+ f64.mul
+ f64.sub
+ f64.sub
+ br $~lib/math/sin_kern|inlined.2
+ end
+ unreachable
+ end
+ else
+ local.get $18
+ local.set $16
+ local.get $19
+ local.set $8
+ local.get $16
+ local.get $16
+ f64.mul
+ local.set $9
+ local.get $9
+ local.get $9
+ f64.mul
+ local.set $6
+ local.get $9
+ f64.const 0.0416666666666666
+ local.get $9
+ f64.const -0.001388888888887411
+ local.get $9
+ f64.const 2.480158728947673e-05
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.get $6
+ local.get $6
+ f64.mul
+ f64.const -2.7557314351390663e-07
+ local.get $9
+ f64.const 2.087572321298175e-09
+ local.get $9
+ f64.const -1.1359647557788195e-11
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.set $5
+ f64.const 0.5
+ local.get $9
+ f64.mul
+ local.set $4
+ f64.const 1
+ local.get $4
+ f64.sub
+ local.set $6
+ local.get $6
+ f64.const 1
+ local.get $6
+ f64.sub
+ local.get $4
+ f64.sub
+ local.get $9
+ local.get $5
+ f64.mul
+ local.get $16
+ local.get $8
+ f64.mul
+ f64.sub
+ f64.add
+ f64.add
+ end
+ local.set $0
+ local.get $17
+ i32.const 1
+ i32.add
+ i32.const 2
+ i32.and
+ if (result f64)
+ local.get $0
+ f64.neg
+ else
+ local.get $0
+ end
+ )
+ (func $assembly/quat/setAxisAngle (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ local.get $2
+ f64.const 0.5
+ f64.mul
+ local.set $2
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $start:assembly/quat~anonymous|0 (result i32)
+ i32.const 1952
+ )
+ (func $~lib/math/R (param $0 f64) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ local.get $0
+ f64.const 0.16666666666666666
+ local.get $0
+ f64.const -0.3255658186224009
+ local.get $0
+ f64.const 0.20121253213486293
+ local.get $0
+ f64.const -0.04005553450067941
+ local.get $0
+ f64.const 7.915349942898145e-04
+ local.get $0
+ f64.const 3.479331075960212e-05
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.set $1
+ f64.const 1
+ local.get $0
+ f64.const -2.403394911734414
+ local.get $0
+ f64.const 2.0209457602335057
+ local.get $0
+ f64.const -0.6882839716054533
+ local.get $0
+ f64.const 0.07703815055590194
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.set $2
+ local.get $1
+ local.get $2
+ f64.div
+ )
+ (func $~lib/math/NativeMath.acos (param $0 f64) (result f64)
+ (local $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ local.get $0
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $1
+ local.get $1
+ i32.const 2147483647
+ i32.and
+ local.set $2
+ local.get $2
+ i32.const 1072693248
+ i32.ge_u
+ if
+ local.get $0
+ i64.reinterpret_f64
+ i32.wrap_i64
+ local.set $3
+ local.get $2
+ i32.const 1072693248
+ i32.sub
+ local.get $3
+ i32.or
+ i32.const 0
+ i32.eq
+ if
+ local.get $1
+ i32.const 31
+ i32.shr_u
+ if
+ f64.const 2
+ f64.const 1.5707963267948966
+ f64.mul
+ f32.const 7.52316384526264e-37
+ f64.promote_f32
+ f64.add
+ return
+ end
+ f64.const 0
+ return
+ end
+ f64.const 0
+ local.get $0
+ local.get $0
+ f64.sub
+ f64.div
+ return
+ end
+ local.get $2
+ i32.const 1071644672
+ i32.lt_u
+ if
+ local.get $2
+ i32.const 1012924416
+ i32.le_u
+ if
+ f64.const 1.5707963267948966
+ f32.const 7.52316384526264e-37
+ f64.promote_f32
+ f64.add
+ return
+ end
+ f64.const 1.5707963267948966
+ local.get $0
+ f64.const 6.123233995736766e-17
+ local.get $0
+ local.get $0
+ local.get $0
+ f64.mul
+ call $~lib/math/R
+ f64.mul
+ f64.sub
+ f64.sub
+ f64.sub
+ return
+ end
+ local.get $1
+ i32.const 31
+ i32.shr_u
+ if
+ f64.const 0.5
+ local.get $0
+ f64.const 0.5
+ f64.mul
+ f64.add
+ local.set $6
+ local.get $6
+ f64.sqrt
+ local.set $4
+ local.get $6
+ call $~lib/math/R
+ local.get $4
+ f64.mul
+ f64.const 6.123233995736766e-17
+ f64.sub
+ local.set $5
+ f64.const 2
+ f64.const 1.5707963267948966
+ local.get $4
+ local.get $5
+ f64.add
+ f64.sub
+ f64.mul
+ return
+ end
+ f64.const 0.5
+ local.get $0
+ f64.const 0.5
+ f64.mul
+ f64.sub
+ local.set $6
+ local.get $6
+ f64.sqrt
+ local.set $4
+ local.get $4
+ i64.reinterpret_f64
+ i64.const -4294967296
+ i64.and
+ f64.reinterpret_i64
+ local.set $7
+ local.get $6
+ local.get $7
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $7
+ f64.add
+ f64.div
+ local.set $8
+ local.get $6
+ call $~lib/math/R
+ local.get $4
+ f64.mul
+ local.get $8
+ f64.add
+ local.set $5
+ f64.const 2
+ local.get $7
+ local.get $5
+ f64.add
+ f64.mul
+ )
+ (func $assembly/quat/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $4
+ local.get $8
+ f64.mul
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $11
+ f64.mul
+ f64.add
+ local.set $13
+ local.get $13
+ f64.const 0
+ f64.lt
+ if
+ local.get $13
+ f64.neg
+ local.set $13
+ local.get $8
+ f64.neg
+ local.set $8
+ local.get $9
+ f64.neg
+ local.set $9
+ local.get $10
+ f64.neg
+ local.set $10
+ local.get $11
+ f64.neg
+ local.set $11
+ end
+ f64.const 1
+ local.get $13
+ f64.sub
+ global.get $assembly/common/EPSILON
+ f64.gt
+ if
+ local.get $13
+ call $~lib/math/NativeMath.acos
+ local.set $12
+ local.get $12
+ call $~lib/math/NativeMath.sin
+ local.set $14
+ f64.const 1
+ local.get $3
+ f64.sub
+ local.get $12
+ f64.mul
+ call $~lib/math/NativeMath.sin
+ local.get $14
+ f64.div
+ local.set $15
+ local.get $3
+ local.get $12
+ f64.mul
+ call $~lib/math/NativeMath.sin
+ local.get $14
+ f64.div
+ local.set $16
+ else
+ f64.const 1
+ local.get $3
+ f64.sub
+ local.set $15
+ local.get $3
+ local.set $16
+ end
+ local.get $0
+ i32.const 0
+ local.get $15
+ local.get $4
+ f64.mul
+ local.get $16
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $15
+ local.get $5
+ f64.mul
+ local.get $16
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $15
+ local.get $6
+ f64.mul
+ local.get $16
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $15
+ local.get $7
+ f64.mul
+ local.get $16
+ local.get $11
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $start:assembly/quat~anonymous|1 (result i32)
+ i32.const 2016
+ )
+ (func $assembly/quat/fromMat3 (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 i32)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.set $2
+ local.get $2
+ f64.const 0
+ f64.gt
+ if
+ local.get $2
+ f64.const 1
+ f64.add
+ local.set $4
+ local.get $4
+ f64.sqrt
+ local.set $3
+ local.get $0
+ i32.const 3
+ f64.const 0.5
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ f64.const 0.5
+ local.get $3
+ f64.div
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ else
+ i32.const 0
+ local.set $5
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.gt
+ if
+ i32.const 1
+ local.set $5
+ end
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ local.get $5
+ i32.const 3
+ i32.mul
+ local.get $5
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ f64.gt
+ if
+ i32.const 2
+ local.set $5
+ end
+ local.get $5
+ i32.const 1
+ i32.add
+ i32.const 3
+ i32.rem_s
+ local.set $6
+ local.get $5
+ i32.const 2
+ i32.add
+ i32.const 3
+ i32.rem_s
+ local.set $7
+ local.get $1
+ local.get $5
+ i32.const 3
+ i32.mul
+ local.get $5
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ local.get $6
+ i32.const 3
+ i32.mul
+ local.get $6
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.get $1
+ local.get $7
+ i32.const 3
+ i32.mul
+ local.get $7
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ f64.const 1
+ f64.add
+ local.set $4
+ local.get $4
+ f64.sqrt
+ local.set $3
+ local.get $0
+ local.get $5
+ f64.const 0.5
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ f64.const 0.5
+ local.get $3
+ f64.div
+ local.set $3
+ local.get $0
+ i32.const 3
+ local.get $1
+ local.get $6
+ i32.const 3
+ i32.mul
+ local.get $7
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ local.get $7
+ i32.const 3
+ i32.mul
+ local.get $6
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $6
+ local.get $1
+ local.get $6
+ i32.const 3
+ i32.mul
+ local.get $5
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ local.get $5
+ i32.const 3
+ i32.mul
+ local.get $6
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $7
+ local.get $1
+ local.get $7
+ i32.const 3
+ i32.mul
+ local.get $5
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ local.get $5
+ i32.const 3
+ i32.mul
+ local.get $7
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $start:assembly/quat~anonymous|2 (result i32)
+ i32.const 2080
+ )
+ (func $start:assembly/quat
+ call $start:assembly/vec3
+ call $start:assembly/vec4
+ call $assembly/vec3/create
+ global.set $assembly/quat/tmpvec3
+ f64.const 1
+ f64.const 0
+ f64.const 0
+ call $assembly/vec3/fromValues
+ global.set $assembly/quat/xUnitVec3
+ f64.const 0
+ f64.const 1
+ f64.const 0
+ call $assembly/vec3/fromValues
+ global.set $assembly/quat/yUnitVec3
+ i32.const 0
+ global.set $~argumentsLength
+ i32.const 1984
+ i32.load
+ call_indirect $0 (type $none_=>_i32)
+ global.set $assembly/quat/rotationTo
+ call $assembly/quat/create
+ global.set $assembly/quat/temp1
+ call $assembly/quat/create
+ global.set $assembly/quat/temp2
+ i32.const 0
+ global.set $~argumentsLength
+ i32.const 2048
+ i32.load
+ call_indirect $0 (type $none_=>_i32)
+ global.set $assembly/quat/sqlerp
+ call $assembly/mat3/create
+ global.set $assembly/quat/matr
+ i32.const 0
+ global.set $~argumentsLength
+ i32.const 2112
+ i32.load
+ call_indirect $0 (type $none_=>_i32)
+ global.set $assembly/quat/setAxes
+ )
+ (func $assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $18
+ f64.mul
+ local.get $6
+ local.get $15
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $17
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $16
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $18
+ f64.mul
+ local.get $6
+ local.get $16
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $15
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $17
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $18
+ f64.mul
+ local.get $6
+ local.get $17
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $16
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $15
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ local.get $18
+ f64.mul
+ local.get $3
+ local.get $15
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $16
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $17
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $3
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $11
+ local.get $18
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $15
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $17
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $16
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $9
+ f64.mul
+ f64.sub
+ local.get $12
+ local.get $18
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $16
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $15
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $17
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $5
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $18
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $17
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $16
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $15
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $6
+ local.get $10
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.sub
+ local.get $14
+ local.get $18
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $15
+ f64.mul
+ f64.sub
+ local.get $12
+ local.get $16
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $17
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $~lib/math/tan_kern (param $0 f64) (param $1 f64) (param $2 i32) (result f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 i32)
+ (local $9 i32)
+ (local $10 i32)
+ (local $11 f64)
+ (local $12 f64)
+ local.get $0
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $8
+ local.get $8
+ i32.const 2147483647
+ i32.and
+ local.set $9
+ local.get $9
+ i32.const 1072010280
+ i32.ge_s
+ local.set $10
+ local.get $10
+ if
+ local.get $8
+ i32.const 0
+ i32.lt_s
+ if
+ local.get $0
+ f64.neg
+ local.set $0
+ local.get $1
+ f64.neg
+ local.set $1
+ end
+ f64.const 0.7853981633974483
+ local.get $0
+ f64.sub
+ local.set $3
+ f64.const 3.061616997868383e-17
+ local.get $1
+ f64.sub
+ local.set $6
+ local.get $3
+ local.get $6
+ f64.add
+ local.set $0
+ f64.const 0
+ local.set $1
+ end
+ local.get $0
+ local.get $0
+ f64.mul
+ local.set $3
+ local.get $3
+ local.get $3
+ f64.mul
+ local.set $6
+ f64.const 0.13333333333320124
+ local.get $6
+ f64.const 0.021869488294859542
+ local.get $6
+ f64.const 3.5920791075913124e-03
+ local.get $6
+ f64.const 5.880412408202641e-04
+ local.get $6
+ f64.const 7.817944429395571e-05
+ local.get $6
+ f64.const -1.8558637485527546e-05
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.set $4
+ local.get $3
+ f64.const 0.05396825397622605
+ local.get $6
+ f64.const 0.0088632398235993
+ local.get $6
+ f64.const 1.4562094543252903e-03
+ local.get $6
+ f64.const 2.464631348184699e-04
+ local.get $6
+ f64.const 7.140724913826082e-05
+ local.get $6
+ f64.const 2.590730518636337e-05
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.set $5
+ local.get $3
+ local.get $0
+ f64.mul
+ local.set $7
+ local.get $1
+ local.get $3
+ local.get $7
+ local.get $4
+ local.get $5
+ f64.add
+ f64.mul
+ local.get $1
+ f64.add
+ f64.mul
+ f64.add
+ local.set $4
+ local.get $4
+ f64.const 0.3333333333333341
+ local.get $7
+ f64.mul
+ f64.add
+ local.set $4
+ local.get $0
+ local.get $4
+ f64.add
+ local.set $6
+ local.get $10
+ if
+ local.get $2
+ f64.convert_i32_s
+ local.set $5
+ f64.const 1
+ local.get $8
+ i32.const 30
+ i32.shr_s
+ i32.const 2
+ i32.and
+ f64.convert_i32_s
+ f64.sub
+ local.get $5
+ f64.const 2
+ local.get $0
+ local.get $6
+ local.get $6
+ f64.mul
+ local.get $6
+ local.get $5
+ f64.add
+ f64.div
+ local.get $4
+ f64.sub
+ f64.sub
+ f64.mul
+ f64.sub
+ f64.mul
+ return
+ end
+ local.get $2
+ i32.const 1
+ i32.eq
+ if
+ local.get $6
+ return
+ end
+ local.get $6
+ local.set $3
+ local.get $3
+ i64.reinterpret_f64
+ i64.const -4294967296
+ i64.and
+ f64.reinterpret_i64
+ local.set $3
+ local.get $4
+ local.get $3
+ local.get $0
+ f64.sub
+ f64.sub
+ local.set $5
+ f64.const 1
+ f64.neg
+ local.get $6
+ f64.div
+ local.tee $11
+ local.set $12
+ local.get $12
+ i64.reinterpret_f64
+ i64.const -4294967296
+ i64.and
+ f64.reinterpret_i64
+ local.set $12
+ f64.const 1
+ local.get $12
+ local.get $3
+ f64.mul
+ f64.add
+ local.set $7
+ local.get $12
+ local.get $11
+ local.get $7
+ local.get $12
+ local.get $5
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ )
+ (func $~lib/math/NativeMath.tan (param $0 f64) (result f64)
+ (local $1 i64)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i64)
+ (local $6 f64)
+ (local $7 i32)
+ (local $8 i32)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 i32)
+ (local $14 i32)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 i32)
+ local.get $0
+ i64.reinterpret_f64
+ local.set $1
+ local.get $1
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $2
+ local.get $2
+ i32.const 31
+ i32.shr_u
+ local.set $3
+ local.get $2
+ i32.const 2147483647
+ i32.and
+ local.set $2
+ local.get $2
+ i32.const 1072243195
+ i32.le_s
+ if
+ local.get $2
+ i32.const 1044381696
+ i32.lt_s
+ if
+ local.get $0
+ return
+ end
+ local.get $0
+ f64.const 0
+ i32.const 1
+ call $~lib/math/tan_kern
+ return
+ end
+ local.get $2
+ i32.const 2146435072
+ i32.ge_s
+ if
+ local.get $0
+ local.get $0
+ f64.sub
+ return
+ end
+ block $~lib/math/rempio2|inlined.2 (result i32)
+ local.get $0
+ local.set $6
+ local.get $1
+ local.set $5
+ local.get $3
+ local.set $4
+ local.get $5
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ i32.const 2147483647
+ i32.and
+ local.set $7
+ i32.const 0
+ i32.const 1
+ i32.lt_s
+ drop
+ local.get $7
+ i32.const 1073928572
+ i32.lt_u
+ if
+ i32.const 1
+ local.set $8
+ local.get $4
+ i32.eqz
+ if
+ local.get $6
+ f64.const 1.5707963267341256
+ f64.sub
+ local.set $9
+ local.get $7
+ i32.const 1073291771
+ i32.ne
+ if
+ local.get $9
+ f64.const 6.077100506506192e-11
+ f64.sub
+ local.set $10
+ local.get $9
+ local.get $10
+ f64.sub
+ f64.const 6.077100506506192e-11
+ f64.sub
+ local.set $11
+ else
+ local.get $9
+ f64.const 6.077100506303966e-11
+ f64.sub
+ local.set $9
+ local.get $9
+ f64.const 2.0222662487959506e-21
+ f64.sub
+ local.set $10
+ local.get $9
+ local.get $10
+ f64.sub
+ f64.const 2.0222662487959506e-21
+ f64.sub
+ local.set $11
+ end
+ else
+ local.get $6
+ f64.const 1.5707963267341256
+ f64.add
+ local.set $9
+ local.get $7
+ i32.const 1073291771
+ i32.ne
+ if
+ local.get $9
+ f64.const 6.077100506506192e-11
+ f64.add
+ local.set $10
+ local.get $9
+ local.get $10
+ f64.sub
+ f64.const 6.077100506506192e-11
+ f64.add
+ local.set $11
+ else
+ local.get $9
+ f64.const 6.077100506303966e-11
+ f64.add
+ local.set $9
+ local.get $9
+ f64.const 2.0222662487959506e-21
+ f64.add
+ local.set $10
+ local.get $9
+ local.get $10
+ f64.sub
+ f64.const 2.0222662487959506e-21
+ f64.add
+ local.set $11
+ end
+ i32.const -1
+ local.set $8
+ end
+ local.get $10
+ global.set $~lib/math/rempio2_y0
+ local.get $11
+ global.set $~lib/math/rempio2_y1
+ local.get $8
+ br $~lib/math/rempio2|inlined.2
+ end
+ local.get $7
+ i32.const 1094263291
+ i32.lt_u
+ if
+ local.get $6
+ f64.const 0.6366197723675814
+ f64.mul
+ f64.nearest
+ local.set $11
+ local.get $6
+ local.get $11
+ f64.const 1.5707963267341256
+ f64.mul
+ f64.sub
+ local.set $10
+ local.get $11
+ f64.const 6.077100506506192e-11
+ f64.mul
+ local.set $9
+ local.get $7
+ i32.const 20
+ i32.shr_u
+ local.set $8
+ local.get $10
+ local.get $9
+ f64.sub
+ local.set $12
+ local.get $12
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $13
+ local.get $8
+ local.get $13
+ i32.const 20
+ i32.shr_u
+ i32.const 2047
+ i32.and
+ i32.sub
+ local.set $14
+ local.get $14
+ i32.const 16
+ i32.gt_u
+ if
+ local.get $10
+ local.set $15
+ local.get $11
+ f64.const 6.077100506303966e-11
+ f64.mul
+ local.set $9
+ local.get $15
+ local.get $9
+ f64.sub
+ local.set $10
+ local.get $11
+ f64.const 2.0222662487959506e-21
+ f64.mul
+ local.get $15
+ local.get $10
+ f64.sub
+ local.get $9
+ f64.sub
+ f64.sub
+ local.set $9
+ local.get $10
+ local.get $9
+ f64.sub
+ local.set $12
+ local.get $12
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $13
+ local.get $8
+ local.get $13
+ i32.const 20
+ i32.shr_u
+ i32.const 2047
+ i32.and
+ i32.sub
+ local.set $14
+ local.get $14
+ i32.const 49
+ i32.gt_u
+ if
+ local.get $10
+ local.set $16
+ local.get $11
+ f64.const 2.0222662487111665e-21
+ f64.mul
+ local.set $9
+ local.get $16
+ local.get $9
+ f64.sub
+ local.set $10
+ local.get $11
+ f64.const 8.4784276603689e-32
+ f64.mul
+ local.get $16
+ local.get $10
+ f64.sub
+ local.get $9
+ f64.sub
+ f64.sub
+ local.set $9
+ local.get $10
+ local.get $9
+ f64.sub
+ local.set $12
+ end
+ end
+ local.get $10
+ local.get $12
+ f64.sub
+ local.get $9
+ f64.sub
+ local.set $15
+ local.get $12
+ global.set $~lib/math/rempio2_y0
+ local.get $15
+ global.set $~lib/math/rempio2_y1
+ local.get $11
+ i32.trunc_f64_s
+ br $~lib/math/rempio2|inlined.2
+ end
+ local.get $6
+ local.get $5
+ call $~lib/math/pio2_large_quot
+ local.set $14
+ i32.const 0
+ local.get $14
+ i32.sub
+ local.get $14
+ local.get $4
+ select
+ end
+ local.set $17
+ global.get $~lib/math/rempio2_y0
+ global.get $~lib/math/rempio2_y1
+ i32.const 1
+ local.get $17
+ i32.const 1
+ i32.and
+ i32.const 1
+ i32.shl
+ i32.sub
+ call $~lib/math/tan_kern
+ )
+ (func $assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32)
+ (local $5 f64)
+ (local $6 f64)
+ f64.const 1
+ local.get $1
+ f64.const 2
+ f64.div
+ call $~lib/math/NativeMath.tan
+ f64.div
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ drop
+ i32.const 2176
+ i32.const 2176
+ i32.eq
+ if (result i32)
+ local.get $4
+ f64.const inf
+ f64.ne
+ else
+ i32.const 0
+ end
+ if
+ i32.const 1
+ f64.convert_i32_s
+ local.get $3
+ local.get $4
+ f64.sub
+ f64.div
+ local.set $6
+ local.get $0
+ i32.const 10
+ local.get $4
+ local.get $3
+ f64.add
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 2
+ local.get $4
+ f64.mul
+ local.get $3
+ f64.mul
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 10
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const -2
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $assembly/mat4/orthoNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ i32.const 1
+ f64.convert_i32_s
+ local.get $1
+ local.get $2
+ f64.sub
+ f64.div
+ local.set $7
+ i32.const 1
+ f64.convert_i32_s
+ local.get $3
+ local.get $4
+ f64.sub
+ f64.div
+ local.set $8
+ i32.const 1
+ f64.convert_i32_s
+ local.get $5
+ local.get $6
+ f64.sub
+ f64.div
+ local.set $9
+ local.get $0
+ i32.const 0
+ f64.const -2
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const -2
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 2
+ local.get $9
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ local.get $2
+ f64.add
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $4
+ local.get $3
+ f64.add
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $6
+ local.get $5
+ f64.add
+ local.get $9
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $21
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $22
+ local.get $0
+ i32.const 0
+ local.get $19
+ local.get $3
+ f64.mul
+ local.get $20
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $15
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $19
+ local.get $4
+ f64.mul
+ local.get $20
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $16
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $19
+ local.get $5
+ f64.mul
+ local.get $20
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $13
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $17
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $19
+ local.get $6
+ f64.mul
+ local.get $20
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $18
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $21
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $22
+ local.get $0
+ i32.const 4
+ local.get $19
+ local.get $3
+ f64.mul
+ local.get $20
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $15
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $19
+ local.get $4
+ f64.mul
+ local.get $20
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $16
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $19
+ local.get $5
+ f64.mul
+ local.get $20
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $13
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $17
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $19
+ local.get $6
+ f64.mul
+ local.get $20
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $18
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $2
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $2
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $21
+ local.get $2
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $22
+ local.get $0
+ i32.const 8
+ local.get $19
+ local.get $3
+ f64.mul
+ local.get $20
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $15
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $19
+ local.get $4
+ f64.mul
+ local.get $20
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $16
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $19
+ local.get $5
+ f64.mul
+ local.get $20
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $13
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $17
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $19
+ local.get $6
+ f64.mul
+ local.get $20
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $18
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $2
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $21
+ local.get $2
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.set $22
+ local.get $0
+ i32.const 12
+ local.get $19
+ local.get $3
+ f64.mul
+ local.get $20
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $15
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $19
+ local.get $4
+ f64.mul
+ local.get $20
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $16
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $19
+ local.get $5
+ f64.mul
+ local.get $20
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $13
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $17
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $19
+ local.get $6
+ f64.mul
+ local.get $20
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $18
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $start:assembly/mat4
+ call $start:assembly/quat
+ )
+ (func $assembly/mat3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $0
+ i32.const 0
+ local.get $12
+ local.get $3
+ f64.mul
+ local.get $13
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $12
+ local.get $4
+ f64.mul
+ local.get $13
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ local.get $5
+ f64.mul
+ local.get $13
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $11
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $15
+ local.get $3
+ f64.mul
+ local.get $16
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $17
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $15
+ local.get $4
+ f64.mul
+ local.get $16
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $17
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $15
+ local.get $5
+ f64.mul
+ local.get $16
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $17
+ local.get $11
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $18
+ local.get $3
+ f64.mul
+ local.get $19
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $20
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $18
+ local.get $4
+ f64.mul
+ local.get $19
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $20
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $18
+ local.get $5
+ f64.mul
+ local.get $19
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $20
+ local.get $11
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $start:assembly/mat3
+ call $start:assembly/mat4
+ )
+ (func $assembly/vec2/length (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ local.get $2
+ call $~lib/math/NativeMath.hypot
+ )
+ (func $assembly/vec2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/distance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $3
+ local.get $2
+ local.get $3
+ call $~lib/math/NativeMath.hypot
+ )
+ (func $assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $3
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ )
+ (func $assembly/vec2/squaredLength (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ local.get $1
+ f64.mul
+ local.get $2
+ local.get $2
+ f64.mul
+ f64.add
+ )
+ (func $start:assembly/vec2~anonymous|0 (result i32)
+ i32.const 2624
+ )
+ (func $start:assembly/vec2
+ call $start:assembly/mat3
+ call $assembly/vec2/create
+ global.set $assembly/vec2/vec
+ i32.const 0
+ global.set $~argumentsLength
+ i32.const 2656
+ i32.load
+ call_indirect $0 (type $none_=>_i32)
+ global.set $assembly/vec2/forEach
+ )
+ (func $assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $7
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $7
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $6
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $start:assembly/mat2
+ call $start:assembly/vec2
+ )
+ (func $start:assembly/index
+ call $start:assembly/common
+ call $start:assembly/mat2
+ )
+ (func $assembly/common/setMatrixArrayType (param $0 i32)
+ local.get $0
+ global.set $assembly/common/ARRAY_TYPE
+ )
+ (func $assembly/common/toRadian (param $0 f64) (result f64)
+ local.get $0
+ global.get $assembly/common/degree
+ f64.mul
+ )
+ (func $assembly/common/equals (param $0 f64) (param $1 f64) (result i32)
+ (local $2 f64)
+ local.get $0
+ local.get $1
+ f64.sub
+ local.set $2
+ local.get $2
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $0
+ local.set $2
+ local.get $2
+ f64.abs
+ local.get $1
+ local.set $2
+ local.get $2
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ )
+ (func $assembly/mat2/copy (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2/identity (param $0 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2/transpose (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $0
+ local.get $1
+ i32.eq
+ if
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $assembly/mat2/invert (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ local.get $5
+ f64.mul
+ local.get $4
+ local.get $3
+ f64.mul
+ f64.sub
+ local.set $6
+ local.get $6
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ i32.eqz
+ if
+ i32.const 0
+ return
+ end
+ f64.const 1
+ local.get $6
+ f64.div
+ local.set $6
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ f64.neg
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ f64.neg
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2/adjoint (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2/determinant (param $0 i32) (result f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ )
+ (func $assembly/mat2/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $7
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $8
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $8
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $7
+ f64.neg
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ local.get $7
+ f64.neg
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2/fromRotation (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2/fromScaling (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32)
+ local.get $0
+ i32.const 100000
+ i32.lt_u
+ if
+ local.get $0
+ i32.const 100
+ i32.lt_u
+ if
+ i32.const 1
+ local.get $0
+ i32.const 10
+ i32.ge_u
+ i32.add
+ return
+ else
+ i32.const 3
+ local.get $0
+ i32.const 10000
+ i32.ge_u
+ i32.add
+ local.get $0
+ i32.const 1000
+ i32.ge_u
+ i32.add
+ return
+ end
+ unreachable
+ else
+ local.get $0
+ i32.const 10000000
+ i32.lt_u
+ if
+ i32.const 6
+ local.get $0
+ i32.const 1000000
+ i32.ge_u
+ i32.add
+ return
+ else
+ i32.const 8
+ local.get $0
+ i32.const 1000000000
+ i32.ge_u
+ i32.add
+ local.get $0
+ i32.const 100000000
+ i32.ge_u
+ i32.add
+ return
+ end
+ unreachable
+ end
+ unreachable
+ )
+ (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32)
+ (local $7 i32)
+ (local $8 i64)
+ (local $9 i64)
+ (local $10 i64)
+ (local $11 i32)
+ (local $12 i64)
+ (local $13 i32)
+ (local $14 i32)
+ (local $15 i32)
+ (local $16 i32)
+ (local $17 i32)
+ (local $18 i64)
+ (local $19 i64)
+ (local $20 i64)
+ (local $21 i64)
+ (local $22 i64)
+ (local $23 i32)
+ (local $24 i32)
+ (local $25 i32)
+ (local $26 i32)
+ (local $27 i64)
+ i32.const 0
+ local.get $4
+ i32.sub
+ local.set $7
+ i64.const 1
+ local.get $7
+ i64.extend_i32_s
+ i64.shl
+ local.set $8
+ local.get $8
+ i64.const 1
+ i64.sub
+ local.set $9
+ local.get $3
+ local.get $1
+ i64.sub
+ local.set $10
+ local.get $3
+ local.get $7
+ i64.extend_i32_s
+ i64.shr_u
+ i32.wrap_i64
+ local.set $11
+ local.get $3
+ local.get $9
+ i64.and
+ local.set $12
+ local.get $11
+ call $~lib/util/number/decimalCount32
+ local.set $13
+ local.get $6
+ local.set $14
+ loop $while-continue|0
+ local.get $13
+ i32.const 0
+ i32.gt_s
+ local.set $15
+ local.get $15
+ if
+ block $break|1
+ block $case10|1
+ block $case9|1
+ block $case8|1
+ block $case7|1
+ block $case6|1
+ block $case5|1
+ block $case4|1
+ block $case3|1
+ block $case2|1
+ block $case1|1
+ block $case0|1
+ local.get $13
+ local.set $17
+ local.get $17
+ i32.const 10
+ i32.eq
+ br_if $case0|1
+ local.get $17
+ i32.const 9
+ i32.eq
+ br_if $case1|1
+ local.get $17
+ i32.const 8
+ i32.eq
+ br_if $case2|1
+ local.get $17
+ i32.const 7
+ i32.eq
+ br_if $case3|1
+ local.get $17
+ i32.const 6
+ i32.eq
+ br_if $case4|1
+ local.get $17
+ i32.const 5
+ i32.eq
+ br_if $case5|1
+ local.get $17
+ i32.const 4
+ i32.eq
+ br_if $case6|1
+ local.get $17
+ i32.const 3
+ i32.eq
+ br_if $case7|1
+ local.get $17
+ i32.const 2
+ i32.eq
+ br_if $case8|1
+ local.get $17
+ i32.const 1
+ i32.eq
+ br_if $case9|1
+ br $case10|1
+ end
+ local.get $11
+ i32.const 1000000000
+ i32.div_u
+ local.set $16
+ local.get $11
+ i32.const 1000000000
+ i32.rem_u
+ local.set $11
+ br $break|1
+ end
+ local.get $11
+ i32.const 100000000
+ i32.div_u
+ local.set $16
+ local.get $11
+ i32.const 100000000
+ i32.rem_u
+ local.set $11
+ br $break|1
+ end
+ local.get $11
+ i32.const 10000000
+ i32.div_u
+ local.set $16
+ local.get $11
+ i32.const 10000000
+ i32.rem_u
+ local.set $11
+ br $break|1
+ end
+ local.get $11
+ i32.const 1000000
+ i32.div_u
+ local.set $16
+ local.get $11
+ i32.const 1000000
+ i32.rem_u
+ local.set $11
+ br $break|1
+ end
+ local.get $11
+ i32.const 100000
+ i32.div_u
+ local.set $16
+ local.get $11
+ i32.const 100000
+ i32.rem_u
+ local.set $11
+ br $break|1
+ end
+ local.get $11
+ i32.const 10000
+ i32.div_u
+ local.set $16
+ local.get $11
+ i32.const 10000
+ i32.rem_u
+ local.set $11
+ br $break|1
+ end
+ local.get $11
+ i32.const 1000
+ i32.div_u
+ local.set $16
+ local.get $11
+ i32.const 1000
+ i32.rem_u
+ local.set $11
+ br $break|1
+ end
+ local.get $11
+ i32.const 100
+ i32.div_u
+ local.set $16
+ local.get $11
+ i32.const 100
+ i32.rem_u
+ local.set $11
+ br $break|1
+ end
+ local.get $11
+ i32.const 10
+ i32.div_u
+ local.set $16
+ local.get $11
+ i32.const 10
+ i32.rem_u
+ local.set $11
+ br $break|1
+ end
+ local.get $11
+ local.set $16
+ i32.const 0
+ local.set $11
+ br $break|1
+ end
+ i32.const 0
+ local.set $16
+ br $break|1
+ end
+ local.get $16
+ local.get $14
+ i32.or
+ if
+ local.get $0
+ local.get $14
+ local.tee $17
+ i32.const 1
+ i32.add
+ local.set $14
+ local.get $17
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.const 48
+ local.get $16
+ i32.const 65535
+ i32.and
+ i32.add
+ i32.store16
+ end
+ local.get $13
+ i32.const 1
+ i32.sub
+ local.set $13
+ local.get $11
+ i64.extend_i32_u
+ local.get $7
+ i64.extend_i32_s
+ i64.shl
+ local.get $12
+ i64.add
+ local.set $18
+ local.get $18
+ local.get $5
+ i64.le_u
+ if
+ global.get $~lib/util/number/_K
+ local.get $13
+ i32.add
+ global.set $~lib/util/number/_K
+ local.get $0
+ local.set $23
+ local.get $14
+ local.set $17
+ local.get $5
+ local.set $22
+ local.get $18
+ local.set $21
+ i32.const 3856
+ local.get $13
+ i32.const 2
+ i32.shl
+ i32.add
+ i64.load32_u
+ local.get $7
+ i64.extend_i32_s
+ i64.shl
+ local.set $20
+ local.get $10
+ local.set $19
+ local.get $23
+ local.get $17
+ i32.const 1
+ i32.sub
+ i32.const 1
+ i32.shl
+ i32.add
+ local.set $24
+ local.get $24
+ i32.load16_u
+ local.set $25
+ loop $while-continue|3
+ local.get $21
+ local.get $19
+ i64.lt_u
+ if (result i32)
+ local.get $22
+ local.get $21
+ i64.sub
+ local.get $20
+ i64.ge_u
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $21
+ local.get $20
+ i64.add
+ local.get $19
+ i64.lt_u
+ if (result i32)
+ i32.const 1
+ else
+ local.get $19
+ local.get $21
+ i64.sub
+ local.get $21
+ local.get $20
+ i64.add
+ local.get $19
+ i64.sub
+ i64.gt_u
+ end
+ else
+ i32.const 0
+ end
+ local.set $26
+ local.get $26
+ if
+ local.get $25
+ i32.const 1
+ i32.sub
+ local.set $25
+ local.get $21
+ local.get $20
+ i64.add
+ local.set $21
+ br $while-continue|3
+ end
+ end
+ local.get $24
+ local.get $25
+ i32.store16
+ local.get $14
+ return
+ end
+ br $while-continue|0
+ end
+ end
+ loop $while-continue|4
+ i32.const 1
+ local.set $15
+ local.get $15
+ if
+ local.get $12
+ i64.const 10
+ i64.mul
+ local.set $12
+ local.get $5
+ i64.const 10
+ i64.mul
+ local.set $5
+ local.get $12
+ local.get $7
+ i64.extend_i32_s
+ i64.shr_u
+ local.set $22
+ local.get $22
+ local.get $14
+ i64.extend_i32_s
+ i64.or
+ i64.const 0
+ i64.ne
+ if
+ local.get $0
+ local.get $14
+ local.tee $25
+ i32.const 1
+ i32.add
+ local.set $14
+ local.get $25
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.const 48
+ local.get $22
+ i32.wrap_i64
+ i32.const 65535
+ i32.and
+ i32.add
+ i32.store16
+ end
+ local.get $12
+ local.get $9
+ i64.and
+ local.set $12
+ local.get $13
+ i32.const 1
+ i32.sub
+ local.set $13
+ local.get $12
+ local.get $5
+ i64.lt_u
+ if
+ global.get $~lib/util/number/_K
+ local.get $13
+ i32.add
+ global.set $~lib/util/number/_K
+ local.get $10
+ i32.const 3856
+ i32.const 0
+ local.get $13
+ i32.sub
+ i32.const 2
+ i32.shl
+ i32.add
+ i64.load32_u
+ i64.mul
+ local.set $10
+ local.get $0
+ local.set $17
+ local.get $14
+ local.set $26
+ local.get $5
+ local.set $27
+ local.get $12
+ local.set $21
+ local.get $8
+ local.set $20
+ local.get $10
+ local.set $19
+ local.get $17
+ local.get $26
+ i32.const 1
+ i32.sub
+ i32.const 1
+ i32.shl
+ i32.add
+ local.set $25
+ local.get $25
+ i32.load16_u
+ local.set $24
+ loop $while-continue|6
+ local.get $21
+ local.get $19
+ i64.lt_u
+ if (result i32)
+ local.get $27
+ local.get $21
+ i64.sub
+ local.get $20
+ i64.ge_u
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $21
+ local.get $20
+ i64.add
+ local.get $19
+ i64.lt_u
+ if (result i32)
+ i32.const 1
+ else
+ local.get $19
+ local.get $21
+ i64.sub
+ local.get $21
+ local.get $20
+ i64.add
+ local.get $19
+ i64.sub
+ i64.gt_u
+ end
+ else
+ i32.const 0
+ end
+ local.set $23
+ local.get $23
+ if
+ local.get $24
+ i32.const 1
+ i32.sub
+ local.set $24
+ local.get $21
+ local.get $20
+ i64.add
+ local.set $21
+ br $while-continue|6
+ end
+ end
+ local.get $25
+ local.get $24
+ i32.store16
+ local.get $14
+ return
+ end
+ br $while-continue|4
+ end
+ end
+ unreachable
+ )
+ (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ loop $while-continue|0
+ local.get $2
+ if (result i32)
+ local.get $1
+ i32.const 3
+ i32.and
+ else
+ i32.const 0
+ end
+ local.set $5
+ local.get $5
+ if
+ local.get $0
+ local.tee $6
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $6
+ local.get $1
+ local.tee $6
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $6
+ i32.load8_u
+ i32.store8
+ local.get $2
+ i32.const 1
+ i32.sub
+ local.set $2
+ br $while-continue|0
+ end
+ end
+ local.get $0
+ i32.const 3
+ i32.and
+ i32.const 0
+ i32.eq
+ if
+ loop $while-continue|1
+ local.get $2
+ i32.const 16
+ i32.ge_u
+ local.set $5
+ local.get $5
+ if
+ local.get $0
+ local.get $1
+ i32.load
+ i32.store
+ local.get $0
+ i32.const 4
+ i32.add
+ local.get $1
+ i32.const 4
+ i32.add
+ i32.load
+ i32.store
+ local.get $0
+ i32.const 8
+ i32.add
+ local.get $1
+ i32.const 8
+ i32.add
+ i32.load
+ i32.store
+ local.get $0
+ i32.const 12
+ i32.add
+ local.get $1
+ i32.const 12
+ i32.add
+ i32.load
+ i32.store
+ local.get $1
+ i32.const 16
+ i32.add
+ local.set $1
+ local.get $0
+ i32.const 16
+ i32.add
+ local.set $0
+ local.get $2
+ i32.const 16
+ i32.sub
+ local.set $2
+ br $while-continue|1
+ end
+ end
+ local.get $2
+ i32.const 8
+ i32.and
+ if
+ local.get $0
+ local.get $1
+ i32.load
+ i32.store
+ local.get $0
+ i32.const 4
+ i32.add
+ local.get $1
+ i32.const 4
+ i32.add
+ i32.load
+ i32.store
+ local.get $0
+ i32.const 8
+ i32.add
+ local.set $0
+ local.get $1
+ i32.const 8
+ i32.add
+ local.set $1
+ end
+ local.get $2
+ i32.const 4
+ i32.and
+ if
+ local.get $0
+ local.get $1
+ i32.load
+ i32.store
+ local.get $0
+ i32.const 4
+ i32.add
+ local.set $0
+ local.get $1
+ i32.const 4
+ i32.add
+ local.set $1
+ end
+ local.get $2
+ i32.const 2
+ i32.and
+ if
+ local.get $0
+ local.get $1
+ i32.load16_u
+ i32.store16
+ local.get $0
+ i32.const 2
+ i32.add
+ local.set $0
+ local.get $1
+ i32.const 2
+ i32.add
+ local.set $1
+ end
+ local.get $2
+ i32.const 1
+ i32.and
+ if
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ end
+ return
+ end
+ local.get $2
+ i32.const 32
+ i32.ge_u
+ if
+ block $break|2
+ block $case2|2
+ block $case1|2
+ block $case0|2
+ local.get $0
+ i32.const 3
+ i32.and
+ local.set $5
+ local.get $5
+ i32.const 1
+ i32.eq
+ br_if $case0|2
+ local.get $5
+ i32.const 2
+ i32.eq
+ br_if $case1|2
+ local.get $5
+ i32.const 3
+ i32.eq
+ br_if $case2|2
+ br $break|2
+ end
+ local.get $1
+ i32.load
+ local.set $3
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $2
+ i32.const 3
+ i32.sub
+ local.set $2
+ loop $while-continue|3
+ local.get $2
+ i32.const 17
+ i32.ge_u
+ local.set $5
+ local.get $5
+ if
+ local.get $1
+ i32.const 1
+ i32.add
+ i32.load
+ local.set $4
+ local.get $0
+ local.get $3
+ i32.const 24
+ i32.shr_u
+ local.get $4
+ i32.const 8
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 5
+ i32.add
+ i32.load
+ local.set $3
+ local.get $0
+ i32.const 4
+ i32.add
+ local.get $4
+ i32.const 24
+ i32.shr_u
+ local.get $3
+ i32.const 8
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 9
+ i32.add
+ i32.load
+ local.set $4
+ local.get $0
+ i32.const 8
+ i32.add
+ local.get $3
+ i32.const 24
+ i32.shr_u
+ local.get $4
+ i32.const 8
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 13
+ i32.add
+ i32.load
+ local.set $3
+ local.get $0
+ i32.const 12
+ i32.add
+ local.get $4
+ i32.const 24
+ i32.shr_u
+ local.get $3
+ i32.const 8
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 16
+ i32.add
+ local.set $1
+ local.get $0
+ i32.const 16
+ i32.add
+ local.set $0
+ local.get $2
+ i32.const 16
+ i32.sub
+ local.set $2
+ br $while-continue|3
+ end
+ end
+ br $break|2
+ end
+ local.get $1
+ i32.load
+ local.set $3
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $2
+ i32.const 2
+ i32.sub
+ local.set $2
+ loop $while-continue|4
+ local.get $2
+ i32.const 18
+ i32.ge_u
+ local.set $5
+ local.get $5
+ if
+ local.get $1
+ i32.const 2
+ i32.add
+ i32.load
+ local.set $4
+ local.get $0
+ local.get $3
+ i32.const 16
+ i32.shr_u
+ local.get $4
+ i32.const 16
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 6
+ i32.add
+ i32.load
+ local.set $3
+ local.get $0
+ i32.const 4
+ i32.add
+ local.get $4
+ i32.const 16
+ i32.shr_u
+ local.get $3
+ i32.const 16
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 10
+ i32.add
+ i32.load
+ local.set $4
+ local.get $0
+ i32.const 8
+ i32.add
+ local.get $3
+ i32.const 16
+ i32.shr_u
+ local.get $4
+ i32.const 16
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 14
+ i32.add
+ i32.load
+ local.set $3
+ local.get $0
+ i32.const 12
+ i32.add
+ local.get $4
+ i32.const 16
+ i32.shr_u
+ local.get $3
+ i32.const 16
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 16
+ i32.add
+ local.set $1
+ local.get $0
+ i32.const 16
+ i32.add
+ local.set $0
+ local.get $2
+ i32.const 16
+ i32.sub
+ local.set $2
+ br $while-continue|4
+ end
+ end
+ br $break|2
+ end
+ local.get $1
+ i32.load
+ local.set $3
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $2
+ i32.const 1
+ i32.sub
+ local.set $2
+ loop $while-continue|5
+ local.get $2
+ i32.const 19
+ i32.ge_u
+ local.set $5
+ local.get $5
+ if
+ local.get $1
+ i32.const 3
+ i32.add
+ i32.load
+ local.set $4
+ local.get $0
+ local.get $3
+ i32.const 8
+ i32.shr_u
+ local.get $4
+ i32.const 24
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 7
+ i32.add
+ i32.load
+ local.set $3
+ local.get $0
+ i32.const 4
+ i32.add
+ local.get $4
+ i32.const 8
+ i32.shr_u
+ local.get $3
+ i32.const 24
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 11
+ i32.add
+ i32.load
+ local.set $4
+ local.get $0
+ i32.const 8
+ i32.add
+ local.get $3
+ i32.const 8
+ i32.shr_u
+ local.get $4
+ i32.const 24
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 15
+ i32.add
+ i32.load
+ local.set $3
+ local.get $0
+ i32.const 12
+ i32.add
+ local.get $4
+ i32.const 8
+ i32.shr_u
+ local.get $3
+ i32.const 24
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 16
+ i32.add
+ local.set $1
+ local.get $0
+ i32.const 16
+ i32.add
+ local.set $0
+ local.get $2
+ i32.const 16
+ i32.sub
+ local.set $2
+ br $while-continue|5
+ end
+ end
+ br $break|2
+ end
+ end
+ local.get $2
+ i32.const 16
+ i32.and
+ if
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ end
+ local.get $2
+ i32.const 8
+ i32.and
+ if
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ end
+ local.get $2
+ i32.const 4
+ i32.and
+ if
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ end
+ local.get $2
+ i32.const 2
+ i32.and
+ if
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ end
+ local.get $2
+ i32.const 1
+ i32.and
+ if
+ local.get $0
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $0
+ local.get $5
+ local.get $1
+ local.tee $5
+ i32.const 1
+ i32.add
+ local.set $1
+ local.get $5
+ i32.load8_u
+ i32.store8
+ end
+ )
+ (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 i32)
+ block $~lib/util/memory/memmove|inlined.0
+ local.get $0
+ local.set $5
+ local.get $1
+ local.set $4
+ local.get $2
+ local.set $3
+ local.get $5
+ local.get $4
+ i32.eq
+ if
+ br $~lib/util/memory/memmove|inlined.0
+ end
+ i32.const 0
+ i32.const 1
+ i32.lt_s
+ drop
+ local.get $4
+ local.get $5
+ i32.sub
+ local.get $3
+ i32.sub
+ i32.const 0
+ local.get $3
+ i32.const 1
+ i32.shl
+ i32.sub
+ i32.le_u
+ if
+ local.get $5
+ local.get $4
+ local.get $3
+ call $~lib/util/memory/memcpy
+ br $~lib/util/memory/memmove|inlined.0
+ end
+ local.get $5
+ local.get $4
+ i32.lt_u
+ if
+ i32.const 0
+ i32.const 2
+ i32.lt_s
+ drop
+ local.get $4
+ i32.const 7
+ i32.and
+ local.get $5
+ i32.const 7
+ i32.and
+ i32.eq
+ if
+ loop $while-continue|0
+ local.get $5
+ i32.const 7
+ i32.and
+ local.set $6
+ local.get $6
+ if
+ local.get $3
+ i32.eqz
+ if
+ br $~lib/util/memory/memmove|inlined.0
+ end
+ local.get $3
+ i32.const 1
+ i32.sub
+ local.set $3
+ local.get $5
+ local.tee $7
+ i32.const 1
+ i32.add
+ local.set $5
+ local.get $7
+ local.get $4
+ local.tee $7
+ i32.const 1
+ i32.add
+ local.set $4
+ local.get $7
+ i32.load8_u
+ i32.store8
+ br $while-continue|0
+ end
+ end
+ loop $while-continue|1
+ local.get $3
+ i32.const 8
+ i32.ge_u
+ local.set $6
+ local.get $6
+ if
+ local.get $5
+ local.get $4
+ i64.load
+ i64.store
+ local.get $3
+ i32.const 8
+ i32.sub
+ local.set $3
+ local.get $5
+ i32.const 8
+ i32.add
+ local.set $5
+ local.get $4
+ i32.const 8
+ i32.add
+ local.set $4
+ br $while-continue|1
+ end
+ end
+ end
+ loop $while-continue|2
+ local.get $3
+ local.set $6
+ local.get $6
+ if
+ local.get $5
+ local.tee $7
+ i32.const 1
+ i32.add
+ local.set $5
+ local.get $7
+ local.get $4
+ local.tee $7
+ i32.const 1
+ i32.add
+ local.set $4
+ local.get $7
+ i32.load8_u
+ i32.store8
+ local.get $3
+ i32.const 1
+ i32.sub
+ local.set $3
+ br $while-continue|2
+ end
+ end
+ else
+ i32.const 0
+ i32.const 2
+ i32.lt_s
+ drop
+ local.get $4
+ i32.const 7
+ i32.and
+ local.get $5
+ i32.const 7
+ i32.and
+ i32.eq
+ if
+ loop $while-continue|3
+ local.get $5
+ local.get $3
+ i32.add
+ i32.const 7
+ i32.and
+ local.set $6
+ local.get $6
+ if
+ local.get $3
+ i32.eqz
+ if
+ br $~lib/util/memory/memmove|inlined.0
+ end
+ local.get $5
+ local.get $3
+ i32.const 1
+ i32.sub
+ local.tee $3
+ i32.add
+ local.get $4
+ local.get $3
+ i32.add
+ i32.load8_u
+ i32.store8
+ br $while-continue|3
+ end
+ end
+ loop $while-continue|4
+ local.get $3
+ i32.const 8
+ i32.ge_u
+ local.set $6
+ local.get $6
+ if
+ local.get $3
+ i32.const 8
+ i32.sub
+ local.set $3
+ local.get $5
+ local.get $3
+ i32.add
+ local.get $4
+ local.get $3
+ i32.add
+ i64.load
+ i64.store
+ br $while-continue|4
+ end
+ end
+ end
+ loop $while-continue|5
+ local.get $3
+ local.set $6
+ local.get $6
+ if
+ local.get $5
+ local.get $3
+ i32.const 1
+ i32.sub
+ local.tee $3
+ i32.add
+ local.get $4
+ local.get $3
+ i32.add
+ i32.load8_u
+ i32.store8
+ br $while-continue|5
+ end
+ end
+ end
+ end
+ )
+ (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 i32)
+ (local $8 i64)
+ (local $9 i64)
+ (local $10 i32)
+ (local $11 i32)
+ loop $while-continue|0
+ local.get $1
+ i32.const 10000
+ i32.ge_u
+ local.set $3
+ local.get $3
+ if
+ local.get $1
+ i32.const 10000
+ i32.div_u
+ local.set $4
+ local.get $1
+ i32.const 10000
+ i32.rem_u
+ local.set $5
+ local.get $4
+ local.set $1
+ local.get $5
+ i32.const 100
+ i32.div_u
+ local.set $6
+ local.get $5
+ i32.const 100
+ i32.rem_u
+ local.set $7
+ i32.const 3896
+ local.get $6
+ i32.const 2
+ i32.shl
+ i32.add
+ i64.load32_u
+ local.set $8
+ i32.const 3896
+ local.get $7
+ i32.const 2
+ i32.shl
+ i32.add
+ i64.load32_u
+ local.set $9
+ 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 $8
+ local.get $9
+ 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 $3
+ local.get $1
+ i32.const 100
+ i32.rem_u
+ local.set $10
+ local.get $3
+ local.set $1
+ local.get $2
+ i32.const 2
+ i32.sub
+ local.set $2
+ i32.const 3896
+ 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 3896
+ local.get $1
+ 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
+ else
+ local.get $2
+ i32.const 1
+ i32.sub
+ local.set $2
+ i32.const 48
+ local.get $1
+ i32.add
+ local.set $11
+ local.get $0
+ local.get $2
+ i32.const 1
+ i32.shl
+ i32.add
+ local.get $11
+ i32.store16
+ end
+ )
+ (func $~lib/util/number/prettify (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.get $2
+ i32.eqz
+ if
+ local.get $0
+ local.get $1
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.const 46
+ i32.const 48
+ i32.const 16
+ i32.shl
+ i32.or
+ i32.store
+ local.get $1
+ i32.const 2
+ i32.add
+ return
+ end
+ local.get $1
+ local.get $2
+ i32.add
+ local.set $3
+ local.get $1
+ local.get $3
+ i32.le_s
+ if (result i32)
+ local.get $3
+ i32.const 21
+ i32.le_s
+ else
+ i32.const 0
+ end
+ if
+ local.get $1
+ local.set $4
+ loop $for-loop|0
+ local.get $4
+ local.get $3
+ i32.lt_s
+ local.set $5
+ local.get $5
+ if
+ local.get $0
+ local.get $4
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.const 48
+ i32.store16
+ local.get $4
+ i32.const 1
+ i32.add
+ local.set $4
+ br $for-loop|0
+ end
+ end
+ local.get $0
+ local.get $3
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.const 46
+ i32.const 48
+ i32.const 16
+ i32.shl
+ i32.or
+ i32.store
+ local.get $3
+ i32.const 2
+ i32.add
+ return
+ else
+ local.get $3
+ i32.const 0
+ i32.gt_s
+ if (result i32)
+ local.get $3
+ i32.const 21
+ i32.le_s
+ else
+ i32.const 0
+ end
+ if
+ local.get $0
+ local.get $3
+ i32.const 1
+ i32.shl
+ i32.add
+ local.set $4
+ local.get $4
+ i32.const 2
+ i32.add
+ local.get $4
+ i32.const 0
+ local.get $2
+ i32.sub
+ i32.const 1
+ i32.shl
+ call $~lib/memory/memory.copy
+ local.get $0
+ local.get $3
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.const 46
+ i32.store16
+ local.get $1
+ i32.const 1
+ i32.add
+ return
+ else
+ i32.const -6
+ local.get $3
+ i32.lt_s
+ if (result i32)
+ local.get $3
+ i32.const 0
+ i32.le_s
+ else
+ i32.const 0
+ end
+ if
+ i32.const 2
+ local.get $3
+ i32.sub
+ local.set $4
+ local.get $0
+ local.get $4
+ i32.const 1
+ i32.shl
+ i32.add
+ local.get $0
+ local.get $1
+ i32.const 1
+ i32.shl
+ call $~lib/memory/memory.copy
+ local.get $0
+ i32.const 48
+ i32.const 46
+ i32.const 16
+ i32.shl
+ i32.or
+ i32.store
+ i32.const 2
+ local.set $5
+ loop $for-loop|1
+ local.get $5
+ local.get $4
+ i32.lt_s
+ local.set $6
+ local.get $6
+ if
+ local.get $0
+ local.get $5
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.const 48
+ i32.store16
+ local.get $5
+ i32.const 1
+ i32.add
+ local.set $5
+ br $for-loop|1
+ end
+ end
+ local.get $1
+ local.get $4
+ i32.add
+ return
+ else
+ local.get $1
+ i32.const 1
+ i32.eq
+ if
+ local.get $0
+ i32.const 101
+ i32.store16 offset=2
+ local.get $0
+ i32.const 4
+ i32.add
+ local.set $5
+ local.get $3
+ i32.const 1
+ i32.sub
+ local.set $6
+ local.get $6
+ i32.const 0
+ i32.lt_s
+ local.set $4
+ local.get $4
+ if
+ i32.const 0
+ local.get $6
+ i32.sub
+ local.set $6
+ end
+ local.get $6
+ call $~lib/util/number/decimalCount32
+ i32.const 1
+ i32.add
+ local.set $7
+ local.get $5
+ local.set $10
+ local.get $6
+ local.set $9
+ local.get $7
+ local.set $8
+ i32.const 0
+ i32.const 1
+ i32.ge_s
+ drop
+ local.get $10
+ local.get $9
+ local.get $8
+ call $~lib/util/number/utoa32_dec_lut
+ local.get $5
+ i32.const 45
+ i32.const 43
+ local.get $4
+ select
+ i32.store16
+ local.get $7
+ local.set $1
+ local.get $1
+ i32.const 2
+ i32.add
+ return
+ else
+ local.get $1
+ i32.const 1
+ i32.shl
+ local.set $7
+ local.get $0
+ i32.const 4
+ i32.add
+ local.get $0
+ i32.const 2
+ i32.add
+ local.get $7
+ i32.const 2
+ i32.sub
+ call $~lib/memory/memory.copy
+ local.get $0
+ i32.const 46
+ i32.store16 offset=2
+ local.get $0
+ local.get $7
+ i32.add
+ i32.const 101
+ i32.store16 offset=2
+ local.get $1
+ local.get $0
+ local.get $7
+ i32.add
+ i32.const 4
+ i32.add
+ local.set $9
+ local.get $3
+ i32.const 1
+ i32.sub
+ local.set $8
+ local.get $8
+ i32.const 0
+ i32.lt_s
+ local.set $4
+ local.get $4
+ if
+ i32.const 0
+ local.get $8
+ i32.sub
+ local.set $8
+ end
+ local.get $8
+ call $~lib/util/number/decimalCount32
+ i32.const 1
+ i32.add
+ local.set $5
+ local.get $9
+ local.set $11
+ local.get $8
+ local.set $6
+ local.get $5
+ local.set $10
+ i32.const 0
+ i32.const 1
+ i32.ge_s
+ drop
+ local.get $11
+ local.get $6
+ local.get $10
+ call $~lib/util/number/utoa32_dec_lut
+ local.get $9
+ i32.const 45
+ i32.const 43
+ local.get $4
+ select
+ i32.store16
+ local.get $5
+ i32.add
+ local.set $1
+ local.get $1
+ i32.const 2
+ i32.add
+ return
+ end
+ unreachable
+ end
+ unreachable
+ end
+ unreachable
+ end
+ unreachable
+ )
+ (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 f64)
+ (local $6 i64)
+ (local $7 i32)
+ (local $8 i64)
+ (local $9 i64)
+ (local $10 i32)
+ (local $11 i64)
+ (local $12 i64)
+ (local $13 i32)
+ (local $14 i32)
+ (local $15 i32)
+ (local $16 f64)
+ (local $17 i64)
+ (local $18 i64)
+ (local $19 i64)
+ (local $20 i64)
+ (local $21 i64)
+ (local $22 i64)
+ (local $23 i64)
+ (local $24 i64)
+ (local $25 i64)
+ (local $26 i32)
+ (local $27 i64)
+ (local $28 i32)
+ local.get $1
+ f64.const 0
+ f64.lt
+ local.set $2
+ local.get $2
+ if
+ local.get $1
+ f64.neg
+ local.set $1
+ local.get $0
+ i32.const 45
+ i32.store16
+ end
+ local.get $1
+ local.set $5
+ local.get $0
+ local.set $4
+ local.get $2
+ local.set $3
+ local.get $5
+ i64.reinterpret_f64
+ local.set $6
+ local.get $6
+ i64.const 9218868437227405312
+ i64.and
+ i64.const 52
+ i64.shr_u
+ i32.wrap_i64
+ local.set $7
+ local.get $6
+ i64.const 4503599627370495
+ i64.and
+ local.set $8
+ local.get $7
+ i32.const 0
+ i32.ne
+ i64.extend_i32_u
+ i64.const 52
+ i64.shl
+ local.get $8
+ i64.add
+ local.set $9
+ local.get $7
+ i32.const 1
+ local.get $7
+ select
+ i32.const 1023
+ i32.const 52
+ i32.add
+ i32.sub
+ local.set $7
+ local.get $9
+ local.set $11
+ local.get $7
+ local.set $10
+ local.get $11
+ i64.const 1
+ i64.shl
+ i64.const 1
+ i64.add
+ local.set $12
+ local.get $10
+ i32.const 1
+ i32.sub
+ local.set $13
+ local.get $12
+ i64.clz
+ i32.wrap_i64
+ local.set $14
+ local.get $12
+ local.get $14
+ i64.extend_i32_s
+ i64.shl
+ local.set $12
+ local.get $13
+ local.get $14
+ i32.sub
+ local.set $13
+ i32.const 1
+ local.get $11
+ i64.const 4503599627370496
+ i64.eq
+ i32.add
+ local.set $15
+ local.get $12
+ global.set $~lib/util/number/_frc_plus
+ local.get $11
+ local.get $15
+ i64.extend_i32_s
+ i64.shl
+ i64.const 1
+ i64.sub
+ local.get $10
+ local.get $15
+ i32.sub
+ local.get $13
+ i32.sub
+ i64.extend_i32_s
+ i64.shl
+ global.set $~lib/util/number/_frc_minus
+ local.get $13
+ global.set $~lib/util/number/_exp
+ global.get $~lib/util/number/_exp
+ local.set $10
+ i32.const -61
+ local.get $10
+ i32.sub
+ f64.convert_i32_s
+ f64.const 0.30102999566398114
+ f64.mul
+ f64.const 347
+ f64.add
+ local.set $16
+ local.get $16
+ i32.trunc_f64_s
+ local.set $15
+ local.get $15
+ local.get $15
+ f64.convert_i32_s
+ local.get $16
+ f64.ne
+ i32.add
+ local.set $15
+ local.get $15
+ i32.const 3
+ i32.shr_s
+ i32.const 1
+ i32.add
+ local.set $14
+ i32.const 348
+ local.get $14
+ i32.const 3
+ i32.shl
+ i32.sub
+ global.set $~lib/util/number/_K
+ i32.const 2984
+ local.get $14
+ i32.const 3
+ i32.shl
+ i32.add
+ i64.load
+ global.set $~lib/util/number/_frc_pow
+ i32.const 3680
+ local.get $14
+ i32.const 1
+ i32.shl
+ i32.add
+ i32.load16_s
+ global.set $~lib/util/number/_exp_pow
+ local.get $9
+ i64.clz
+ i32.wrap_i64
+ local.set $14
+ local.get $9
+ local.get $14
+ i64.extend_i32_s
+ i64.shl
+ local.set $9
+ local.get $7
+ local.get $14
+ i32.sub
+ local.set $7
+ global.get $~lib/util/number/_frc_pow
+ local.set $12
+ global.get $~lib/util/number/_exp_pow
+ local.set $15
+ local.get $9
+ local.set $17
+ local.get $12
+ local.set $11
+ local.get $17
+ i64.const 4294967295
+ i64.and
+ local.set $18
+ local.get $11
+ i64.const 4294967295
+ i64.and
+ local.set $19
+ local.get $17
+ i64.const 32
+ i64.shr_u
+ local.set $20
+ local.get $11
+ i64.const 32
+ i64.shr_u
+ local.set $21
+ local.get $18
+ local.get $19
+ i64.mul
+ local.set $22
+ local.get $20
+ local.get $19
+ i64.mul
+ local.get $22
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.set $23
+ local.get $18
+ local.get $21
+ i64.mul
+ local.get $23
+ i64.const 4294967295
+ i64.and
+ i64.add
+ local.set $24
+ local.get $24
+ i64.const 2147483647
+ i64.add
+ local.set $24
+ local.get $23
+ i64.const 32
+ i64.shr_u
+ local.set $23
+ local.get $24
+ i64.const 32
+ i64.shr_u
+ local.set $24
+ local.get $20
+ local.get $21
+ i64.mul
+ local.get $23
+ i64.add
+ local.get $24
+ i64.add
+ local.set $24
+ local.get $7
+ local.set $10
+ local.get $15
+ local.set $13
+ local.get $10
+ local.get $13
+ i32.add
+ i32.const 64
+ i32.add
+ local.set $10
+ global.get $~lib/util/number/_frc_plus
+ local.set $17
+ local.get $12
+ local.set $11
+ local.get $17
+ i64.const 4294967295
+ i64.and
+ local.set $23
+ local.get $11
+ i64.const 4294967295
+ i64.and
+ local.set $22
+ local.get $17
+ i64.const 32
+ i64.shr_u
+ local.set $21
+ local.get $11
+ i64.const 32
+ i64.shr_u
+ local.set $20
+ local.get $23
+ local.get $22
+ i64.mul
+ local.set $19
+ local.get $21
+ local.get $22
+ i64.mul
+ local.get $19
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.set $18
+ local.get $23
+ local.get $20
+ i64.mul
+ local.get $18
+ i64.const 4294967295
+ i64.and
+ i64.add
+ local.set $25
+ local.get $25
+ i64.const 2147483647
+ i64.add
+ local.set $25
+ local.get $18
+ i64.const 32
+ i64.shr_u
+ local.set $18
+ local.get $25
+ i64.const 32
+ i64.shr_u
+ local.set $25
+ local.get $21
+ local.get $20
+ i64.mul
+ local.get $18
+ i64.add
+ local.get $25
+ i64.add
+ i64.const 1
+ i64.sub
+ local.set $25
+ global.get $~lib/util/number/_exp
+ local.set $26
+ local.get $15
+ local.set $13
+ local.get $26
+ local.get $13
+ i32.add
+ i32.const 64
+ i32.add
+ local.set $26
+ global.get $~lib/util/number/_frc_minus
+ local.set $17
+ local.get $12
+ local.set $11
+ local.get $17
+ i64.const 4294967295
+ i64.and
+ local.set $18
+ local.get $11
+ i64.const 4294967295
+ i64.and
+ local.set $19
+ local.get $17
+ i64.const 32
+ i64.shr_u
+ local.set $20
+ local.get $11
+ i64.const 32
+ i64.shr_u
+ local.set $21
+ local.get $18
+ local.get $19
+ i64.mul
+ local.set $22
+ local.get $20
+ local.get $19
+ i64.mul
+ local.get $22
+ i64.const 32
+ i64.shr_u
+ i64.add
+ local.set $23
+ local.get $18
+ local.get $21
+ i64.mul
+ local.get $23
+ i64.const 4294967295
+ i64.and
+ i64.add
+ local.set $27
+ local.get $27
+ i64.const 2147483647
+ i64.add
+ local.set $27
+ local.get $23
+ i64.const 32
+ i64.shr_u
+ local.set $23
+ local.get $27
+ i64.const 32
+ i64.shr_u
+ local.set $27
+ local.get $20
+ local.get $21
+ i64.mul
+ local.get $23
+ i64.add
+ local.get $27
+ i64.add
+ i64.const 1
+ i64.add
+ local.set $27
+ local.get $25
+ local.get $27
+ i64.sub
+ local.set $23
+ local.get $4
+ local.get $24
+ local.get $10
+ local.get $25
+ local.get $26
+ local.get $23
+ local.get $3
+ call $~lib/util/number/genDigits
+ local.set $28
+ local.get $0
+ local.get $2
+ i32.const 1
+ i32.shl
+ i32.add
+ local.get $28
+ local.get $2
+ i32.sub
+ global.get $~lib/util/number/_K
+ call $~lib/util/number/prettify
+ local.set $28
+ local.get $28
+ local.get $2
+ i32.add
+ )
+ (func $~lib/number/F64#toString (param $0 f64) (param $1 i32) (result i32)
+ local.get $0
+ call $~lib/util/number/dtoa
+ )
+ (func $~lib/string/String#get:length (param $0 i32) (result i32)
+ local.get $0
+ i32.const 20
+ i32.sub
+ i32.load offset=16
+ i32.const 1
+ i32.shr_u
+ )
+ (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ local.get $1
+ call $~lib/string/String#concat
+ )
+ (func $assembly/mat2/frob (param $0 i32) (result f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $assembly/maths/Maths.hypot4
+ )
+ (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 i32)
+ local.get $0
+ local.get $1
+ call $~lib/rt/itcms/__new
+ local.set $3
+ local.get $2
+ if
+ local.get $3
+ local.get $2
+ local.get $0
+ call $~lib/memory/memory.copy
+ end
+ local.get $3
+ )
+ (func $~lib/array/Array<~lib/typedarray/Float64Array>#__uset (param $0 i32) (param $1 i32) (param $2 i32)
+ local.get $0
+ i32.load offset=4
+ 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 $assembly/mat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2/exactEquals (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/mat2/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ local.get $6
+ f64.sub
+ local.set $10
+ local.get $10
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $2
+ local.set $10
+ local.get $10
+ f64.abs
+ local.get $6
+ local.set $10
+ local.get $10
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $7
+ f64.sub
+ local.set $10
+ local.get $10
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $3
+ local.set $10
+ local.get $10
+ f64.abs
+ local.get $7
+ local.set $10
+ local.get $10
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $8
+ f64.sub
+ local.set $10
+ local.get $10
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $4
+ local.set $10
+ local.get $10
+ f64.abs
+ local.get $8
+ local.set $10
+ local.get $10
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $5
+ local.get $9
+ f64.sub
+ local.set $10
+ local.get $10
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $5
+ local.set $10
+ local.get $10
+ f64.abs
+ local.get $9
+ local.set $10
+ local.get $10
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/mat2/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/copy (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/identity (param $0 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/invert (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ local.get $5
+ f64.mul
+ local.get $3
+ local.get $4
+ f64.mul
+ f64.sub
+ local.set $8
+ local.get $8
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ i32.eqz
+ if
+ i32.const 0
+ return
+ end
+ f64.const 1
+ local.get $8
+ f64.div
+ local.set $8
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ f64.neg
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ f64.neg
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $4
+ local.get $7
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.sub
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $3
+ local.get $6
+ f64.mul
+ local.get $2
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/determinant (param $0 i32) (result f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ )
+ (func $assembly/mat2d/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $9
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $10
+ f64.mul
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $9
+ f64.neg
+ f64.mul
+ local.get $5
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ local.get $9
+ f64.neg
+ f64.mul
+ local.get $6
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $9
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $9
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $10
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ local.get $10
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $7
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $6
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $8
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/fromRotation (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/fromScaling (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/fromTranslation (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/maths/Maths.hypot7 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ local.get $0
+ local.set $7
+ local.get $7
+ f64.abs
+ local.set $0
+ local.get $1
+ local.set $7
+ local.get $7
+ f64.abs
+ local.set $1
+ local.get $2
+ local.set $7
+ local.get $7
+ f64.abs
+ local.set $2
+ local.get $3
+ local.set $7
+ local.get $7
+ f64.abs
+ local.set $3
+ local.get $4
+ local.set $7
+ local.get $7
+ f64.abs
+ local.set $4
+ local.get $5
+ local.set $7
+ local.get $7
+ f64.abs
+ local.set $5
+ local.get $6
+ local.set $7
+ local.get $7
+ f64.abs
+ local.set $6
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/maths/Maths.max
+ local.get $4
+ local.get $5
+ local.get $6
+ call $assembly/maths/Maths.max
+ call $assembly/maths/Maths.max
+ local.set $7
+ local.get $7
+ f64.const 0
+ f64.eq
+ if
+ f64.const 0
+ return
+ end
+ f64.const 1
+ local.get $7
+ f64.div
+ local.set $8
+ local.get $0
+ local.get $8
+ f64.mul
+ local.set $0
+ local.get $1
+ local.get $8
+ f64.mul
+ local.set $1
+ local.get $2
+ local.get $8
+ f64.mul
+ local.set $2
+ local.get $3
+ local.get $8
+ f64.mul
+ local.set $3
+ local.get $4
+ local.get $8
+ f64.mul
+ local.set $4
+ local.get $5
+ local.get $8
+ f64.mul
+ local.set $5
+ local.get $6
+ local.get $8
+ f64.mul
+ local.set $6
+ local.get $7
+ local.get $0
+ local.get $0
+ f64.mul
+ local.get $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $6
+ f64.mul
+ f64.add
+ local.set $9
+ local.get $9
+ f64.sqrt
+ f64.mul
+ )
+ (func $assembly/mat2d/frob (param $0 i32) (result f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 1
+ call $assembly/maths/Maths.hypot7
+ )
+ (func $assembly/mat2d/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat2d/exactEquals (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/mat2d/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $2
+ local.get $8
+ f64.sub
+ local.set $14
+ local.get $14
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $2
+ local.set $14
+ local.get $14
+ f64.abs
+ local.get $8
+ local.set $14
+ local.get $14
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $9
+ f64.sub
+ local.set $14
+ local.get $14
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $3
+ local.set $14
+ local.get $14
+ f64.abs
+ local.get $9
+ local.set $14
+ local.get $14
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $10
+ f64.sub
+ local.set $14
+ local.get $14
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $4
+ local.set $14
+ local.get $14
+ f64.abs
+ local.get $10
+ local.set $14
+ local.get $14
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $5
+ local.get $11
+ f64.sub
+ local.set $14
+ local.get $14
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $5
+ local.set $14
+ local.get $14
+ f64.abs
+ local.get $11
+ local.set $14
+ local.get $14
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $6
+ local.get $12
+ f64.sub
+ local.set $14
+ local.get $14
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $6
+ local.set $14
+ local.get $14
+ f64.abs
+ local.get $12
+ local.set $14
+ local.get $14
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $7
+ local.get $13
+ f64.sub
+ local.set $14
+ local.get $14
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $7
+ local.set $14
+ local.get $14
+ f64.abs
+ local.get $13
+ local.set $14
+ local.get $14
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/mat3/fromMat4 (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/copy (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/identity (param $0 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/transpose (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $0
+ local.get $1
+ i32.eq
+ if
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $assembly/mat3/invert (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $7
+ local.get $9
+ f64.mul
+ f64.sub
+ local.set $11
+ local.get $10
+ f64.neg
+ local.get $5
+ f64.mul
+ local.get $7
+ local.get $8
+ f64.mul
+ f64.add
+ local.set $12
+ local.get $9
+ local.get $5
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.sub
+ local.set $13
+ local.get $2
+ local.get $11
+ f64.mul
+ local.get $3
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $13
+ f64.mul
+ f64.add
+ local.set $14
+ local.get $14
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ i32.eqz
+ if
+ i32.const 0
+ return
+ end
+ f64.const 1
+ local.get $14
+ f64.div
+ local.set $14
+ local.get $0
+ i32.const 0
+ local.get $11
+ local.get $14
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $10
+ f64.neg
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $14
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $7
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ local.get $14
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $12
+ local.get $14
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $10
+ local.get $2
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $14
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $7
+ f64.neg
+ local.get $2
+ f64.mul
+ local.get $4
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $14
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $13
+ local.get $14
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $9
+ f64.neg
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $14
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $6
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $5
+ f64.mul
+ f64.sub
+ local.get $14
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/adjoint (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $6
+ local.get $10
+ f64.mul
+ local.get $7
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $3
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $7
+ f64.mul
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $5
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $2
+ local.get $10
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $5
+ f64.mul
+ local.get $2
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $5
+ local.get $9
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $2
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $2
+ local.get $6
+ f64.mul
+ local.get $3
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/determinant (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ local.get $9
+ local.get $5
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.sub
+ f64.mul
+ local.get $2
+ local.get $9
+ f64.neg
+ local.get $4
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ local.get $4
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ f64.mul
+ f64.add
+ )
+ (func $assembly/mat3/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $0
+ i32.const 0
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $12
+ local.get $3
+ f64.mul
+ local.get $13
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $9
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $12
+ local.get $4
+ f64.mul
+ local.get $13
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $10
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $12
+ local.get $5
+ f64.mul
+ local.get $13
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $11
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $12
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $13
+ local.get $0
+ i32.const 0
+ local.get $13
+ local.get $3
+ f64.mul
+ local.get $12
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $13
+ local.get $4
+ f64.mul
+ local.get $12
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $13
+ local.get $5
+ f64.mul
+ local.get $12
+ local.get $8
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $13
+ local.get $6
+ f64.mul
+ local.get $12
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $13
+ local.get $7
+ f64.mul
+ local.get $12
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $13
+ local.get $8
+ f64.mul
+ local.get $12
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/fromTranslation (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/fromRotation (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/fromScaling (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/fromMat2d (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/fromQuat (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ local.get $2
+ f64.add
+ local.set $6
+ local.get $3
+ local.get $3
+ f64.add
+ local.set $7
+ local.get $4
+ local.get $4
+ f64.add
+ local.set $8
+ local.get $2
+ local.get $6
+ f64.mul
+ local.set $9
+ local.get $3
+ local.get $6
+ f64.mul
+ local.set $10
+ local.get $3
+ local.get $7
+ f64.mul
+ local.set $11
+ local.get $4
+ local.get $6
+ f64.mul
+ local.set $12
+ local.get $4
+ local.get $7
+ f64.mul
+ local.set $13
+ local.get $4
+ local.get $8
+ f64.mul
+ local.set $14
+ local.get $5
+ local.get $6
+ f64.mul
+ local.set $15
+ local.get $5
+ local.get $7
+ f64.mul
+ local.set $16
+ local.get $5
+ local.get $8
+ f64.mul
+ local.set $17
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $11
+ f64.sub
+ local.get $14
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $10
+ local.get $17
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $12
+ local.get $16
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $10
+ local.get $17
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 1
+ local.get $9
+ f64.sub
+ local.get $14
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $13
+ local.get $15
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ local.get $16
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $13
+ local.get $15
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ local.get $9
+ f64.sub
+ local.get $11
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/normalFromMat4 (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ (local $26 f64)
+ (local $27 f64)
+ (local $28 f64)
+ (local $29 f64)
+ (local $30 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $2
+ local.get $7
+ f64.mul
+ local.get $3
+ local.get $6
+ f64.mul
+ f64.sub
+ local.set $18
+ local.get $2
+ local.get $8
+ f64.mul
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ local.set $19
+ local.get $2
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.sub
+ local.set $20
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.set $21
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ local.set $22
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ local.set $23
+ local.get $10
+ local.get $15
+ f64.mul
+ local.get $11
+ local.get $14
+ f64.mul
+ f64.sub
+ local.set $24
+ local.get $10
+ local.get $16
+ f64.mul
+ local.get $12
+ local.get $14
+ f64.mul
+ f64.sub
+ local.set $25
+ local.get $10
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $14
+ f64.mul
+ f64.sub
+ local.set $26
+ local.get $11
+ local.get $16
+ f64.mul
+ local.get $12
+ local.get $15
+ f64.mul
+ f64.sub
+ local.set $27
+ local.get $11
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $15
+ f64.mul
+ f64.sub
+ local.set $28
+ local.get $12
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $16
+ f64.mul
+ f64.sub
+ local.set $29
+ local.get $18
+ local.get $29
+ f64.mul
+ local.get $19
+ local.get $28
+ f64.mul
+ f64.sub
+ local.get $20
+ local.get $27
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $26
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $25
+ f64.mul
+ f64.sub
+ local.get $23
+ local.get $24
+ f64.mul
+ f64.add
+ local.set $30
+ local.get $30
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ i32.eqz
+ if
+ i32.const 0
+ return
+ end
+ f64.const 1
+ local.get $30
+ f64.div
+ local.set $30
+ local.get $0
+ i32.const 0
+ local.get $7
+ local.get $29
+ f64.mul
+ local.get $8
+ local.get $28
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $27
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $8
+ local.get $26
+ f64.mul
+ local.get $6
+ local.get $29
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $25
+ f64.mul
+ f64.sub
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $28
+ f64.mul
+ local.get $7
+ local.get $26
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $24
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ local.get $28
+ f64.mul
+ local.get $3
+ local.get $29
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $27
+ f64.mul
+ f64.sub
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $2
+ local.get $29
+ f64.mul
+ local.get $4
+ local.get $26
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $25
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $3
+ local.get $26
+ f64.mul
+ local.get $2
+ local.get $28
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $24
+ f64.mul
+ f64.sub
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $15
+ local.get $23
+ f64.mul
+ local.get $16
+ local.get $22
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $21
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $16
+ local.get $20
+ f64.mul
+ local.get $14
+ local.get $23
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $19
+ f64.mul
+ f64.sub
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $14
+ local.get $22
+ f64.mul
+ local.get $15
+ local.get $20
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $18
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/projection (param $0 i32) (param $1 f64) (param $2 f64) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 2
+ local.get $1
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const -2
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/maths/Maths.hypot9 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ local.get $0
+ local.set $9
+ local.get $9
+ f64.abs
+ local.set $0
+ local.get $1
+ local.set $9
+ local.get $9
+ f64.abs
+ local.set $1
+ local.get $2
+ local.set $9
+ local.get $9
+ f64.abs
+ local.set $2
+ local.get $3
+ local.set $9
+ local.get $9
+ f64.abs
+ local.set $3
+ local.get $4
+ local.set $9
+ local.get $9
+ f64.abs
+ local.set $4
+ local.get $5
+ local.set $9
+ local.get $9
+ f64.abs
+ local.set $5
+ local.get $6
+ local.set $9
+ local.get $9
+ f64.abs
+ local.set $6
+ local.get $7
+ local.set $9
+ local.get $9
+ f64.abs
+ local.set $7
+ local.get $8
+ local.set $9
+ local.get $9
+ f64.abs
+ local.set $8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/maths/Maths.max
+ local.get $4
+ local.get $5
+ local.get $6
+ call $assembly/maths/Maths.max
+ call $assembly/maths/Maths.max
+ local.get $7
+ local.get $8
+ call $assembly/maths/Maths.max
+ local.set $9
+ local.get $9
+ f64.const 0
+ f64.eq
+ if
+ f64.const 0
+ return
+ end
+ f64.const 1
+ local.get $9
+ f64.div
+ local.set $10
+ local.get $0
+ local.get $10
+ f64.mul
+ local.set $0
+ local.get $1
+ local.get $10
+ f64.mul
+ local.set $1
+ local.get $2
+ local.get $10
+ f64.mul
+ local.set $2
+ local.get $3
+ local.get $10
+ f64.mul
+ local.set $3
+ local.get $4
+ local.get $10
+ f64.mul
+ local.set $4
+ local.get $5
+ local.get $10
+ f64.mul
+ local.set $5
+ local.get $6
+ local.get $10
+ f64.mul
+ local.set $6
+ local.get $7
+ local.get $10
+ f64.mul
+ local.set $7
+ local.get $8
+ local.get $10
+ f64.mul
+ local.set $8
+ local.get $9
+ local.get $0
+ local.get $0
+ f64.mul
+ local.get $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $8
+ f64.mul
+ f64.add
+ local.set $11
+ local.get $11
+ f64.sqrt
+ f64.mul
+ )
+ (func $assembly/mat3/frob (param $0 i32) (result f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $assembly/maths/Maths.hypot9
+ )
+ (func $assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat3/exactEquals (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/mat3/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $2
+ local.get $11
+ f64.sub
+ local.set $20
+ local.get $20
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $2
+ local.set $20
+ local.get $20
+ f64.abs
+ local.get $11
+ local.set $20
+ local.get $20
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $12
+ f64.sub
+ local.set $20
+ local.get $20
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $3
+ local.set $20
+ local.get $20
+ f64.abs
+ local.get $12
+ local.set $20
+ local.get $20
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $13
+ f64.sub
+ local.set $20
+ local.get $20
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $4
+ local.set $20
+ local.get $20
+ f64.abs
+ local.get $13
+ local.set $20
+ local.get $20
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $5
+ local.get $14
+ f64.sub
+ local.set $20
+ local.get $20
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $5
+ local.set $20
+ local.get $20
+ f64.abs
+ local.get $14
+ local.set $20
+ local.get $20
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $6
+ local.get $15
+ f64.sub
+ local.set $20
+ local.get $20
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $6
+ local.set $20
+ local.get $20
+ f64.abs
+ local.get $15
+ local.set $20
+ local.get $20
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $7
+ local.get $16
+ f64.sub
+ local.set $20
+ local.get $20
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $7
+ local.set $20
+ local.get $20
+ f64.abs
+ local.get $16
+ local.set $20
+ local.get $20
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $8
+ local.get $17
+ f64.sub
+ local.set $20
+ local.get $20
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $8
+ local.set $20
+ local.get $20
+ f64.abs
+ local.get $17
+ local.set $20
+ local.get $20
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $9
+ local.get $18
+ f64.sub
+ local.set $20
+ local.get $20
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $9
+ local.set $20
+ local.get $20
+ f64.abs
+ local.get $18
+ local.set $20
+ local.get $20
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $10
+ local.get $19
+ f64.sub
+ local.set $20
+ local.get $20
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $10
+ local.set $20
+ local.get $20
+ f64.abs
+ local.get $19
+ local.set $20
+ local.get $20
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/mat4/Fov#set:upDegrees (param $0 i32) (param $1 f64)
+ local.get $0
+ local.get $1
+ f64.store
+ )
+ (func $assembly/mat4/Fov#set:downDegrees (param $0 i32) (param $1 f64)
+ local.get $0
+ local.get $1
+ f64.store offset=8
+ )
+ (func $assembly/mat4/Fov#set:leftDegrees (param $0 i32) (param $1 f64)
+ local.get $0
+ local.get $1
+ f64.store offset=16
+ )
+ (func $assembly/mat4/Fov#set:rightDegrees (param $0 i32) (param $1 f64)
+ local.get $0
+ local.get $1
+ f64.store offset=24
+ )
+ (func $assembly/mat4/Fov#get:upDegrees (param $0 i32) (result f64)
+ local.get $0
+ f64.load
+ )
+ (func $assembly/mat4/Fov#get:downDegrees (param $0 i32) (result f64)
+ local.get $0
+ f64.load offset=8
+ )
+ (func $assembly/mat4/Fov#get:leftDegrees (param $0 i32) (result f64)
+ local.get $0
+ f64.load offset=16
+ )
+ (func $assembly/mat4/Fov#get:rightDegrees (param $0 i32) (result f64)
+ local.get $0
+ f64.load offset=24
+ )
+ (func $assembly/mat4/copy (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (param $16 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $12
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $13
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $14
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $15
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $16
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/identity (param $0 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/transpose (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ local.get $0
+ local.get $1
+ i32.eq
+ if
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $assembly/mat4/invert (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ (local $26 f64)
+ (local $27 f64)
+ (local $28 f64)
+ (local $29 f64)
+ (local $30 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $2
+ local.get $7
+ f64.mul
+ local.get $3
+ local.get $6
+ f64.mul
+ f64.sub
+ local.set $18
+ local.get $2
+ local.get $8
+ f64.mul
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ local.set $19
+ local.get $2
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.sub
+ local.set $20
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.set $21
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ local.set $22
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ local.set $23
+ local.get $10
+ local.get $15
+ f64.mul
+ local.get $11
+ local.get $14
+ f64.mul
+ f64.sub
+ local.set $24
+ local.get $10
+ local.get $16
+ f64.mul
+ local.get $12
+ local.get $14
+ f64.mul
+ f64.sub
+ local.set $25
+ local.get $10
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $14
+ f64.mul
+ f64.sub
+ local.set $26
+ local.get $11
+ local.get $16
+ f64.mul
+ local.get $12
+ local.get $15
+ f64.mul
+ f64.sub
+ local.set $27
+ local.get $11
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $15
+ f64.mul
+ f64.sub
+ local.set $28
+ local.get $12
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $16
+ f64.mul
+ f64.sub
+ local.set $29
+ local.get $18
+ local.get $29
+ f64.mul
+ local.get $19
+ local.get $28
+ f64.mul
+ f64.sub
+ local.get $20
+ local.get $27
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $26
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $25
+ f64.mul
+ f64.sub
+ local.get $23
+ local.get $24
+ f64.mul
+ f64.add
+ local.set $30
+ local.get $30
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ i32.eqz
+ if
+ i32.const 0
+ return
+ end
+ f64.const 1
+ local.get $30
+ f64.div
+ local.set $30
+ local.get $0
+ i32.const 0
+ local.get $7
+ local.get $29
+ f64.mul
+ local.get $8
+ local.get $28
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $27
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $28
+ f64.mul
+ local.get $3
+ local.get $29
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $27
+ f64.mul
+ f64.sub
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $15
+ local.get $23
+ f64.mul
+ local.get $16
+ local.get $22
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $21
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $12
+ local.get $22
+ f64.mul
+ local.get $11
+ local.get $23
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $21
+ f64.mul
+ f64.sub
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $8
+ local.get $26
+ f64.mul
+ local.get $6
+ local.get $29
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $25
+ f64.mul
+ f64.sub
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $2
+ local.get $29
+ f64.mul
+ local.get $4
+ local.get $26
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $25
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $16
+ local.get $20
+ f64.mul
+ local.get $14
+ local.get $23
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $19
+ f64.mul
+ f64.sub
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $10
+ local.get $23
+ f64.mul
+ local.get $12
+ local.get $20
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $19
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $6
+ local.get $28
+ f64.mul
+ local.get $7
+ local.get $26
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $24
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $3
+ local.get $26
+ f64.mul
+ local.get $2
+ local.get $28
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $24
+ f64.mul
+ f64.sub
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $14
+ local.get $22
+ f64.mul
+ local.get $15
+ local.get $20
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $18
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $11
+ local.get $20
+ f64.mul
+ local.get $10
+ local.get $22
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $18
+ f64.mul
+ f64.sub
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $7
+ local.get $25
+ f64.mul
+ local.get $6
+ local.get $27
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $24
+ f64.mul
+ f64.sub
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $2
+ local.get $27
+ f64.mul
+ local.get $3
+ local.get $25
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $24
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $15
+ local.get $19
+ f64.mul
+ local.get $14
+ local.get $21
+ f64.mul
+ f64.sub
+ local.get $16
+ local.get $18
+ f64.mul
+ f64.sub
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $10
+ local.get $21
+ f64.mul
+ local.get $11
+ local.get $19
+ f64.mul
+ f64.sub
+ local.get $12
+ local.get $18
+ f64.mul
+ f64.add
+ local.get $30
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/adjoint (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ (local $26 f64)
+ (local $27 f64)
+ (local $28 f64)
+ (local $29 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $2
+ local.get $7
+ f64.mul
+ local.get $3
+ local.get $6
+ f64.mul
+ f64.sub
+ local.set $18
+ local.get $2
+ local.get $8
+ f64.mul
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ local.set $19
+ local.get $2
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.sub
+ local.set $20
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.set $21
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ local.set $22
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ local.set $23
+ local.get $10
+ local.get $15
+ f64.mul
+ local.get $11
+ local.get $14
+ f64.mul
+ f64.sub
+ local.set $24
+ local.get $10
+ local.get $16
+ f64.mul
+ local.get $12
+ local.get $14
+ f64.mul
+ f64.sub
+ local.set $25
+ local.get $10
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $14
+ f64.mul
+ f64.sub
+ local.set $26
+ local.get $11
+ local.get $16
+ f64.mul
+ local.get $12
+ local.get $15
+ f64.mul
+ f64.sub
+ local.set $27
+ local.get $11
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $15
+ f64.mul
+ f64.sub
+ local.set $28
+ local.get $12
+ local.get $17
+ f64.mul
+ local.get $13
+ local.get $16
+ f64.mul
+ f64.sub
+ local.set $29
+ local.get $0
+ i32.const 0
+ local.get $7
+ local.get $29
+ f64.mul
+ local.get $8
+ local.get $28
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $27
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $28
+ f64.mul
+ local.get $3
+ local.get $29
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $27
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $15
+ local.get $23
+ f64.mul
+ local.get $16
+ local.get $22
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $21
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $12
+ local.get $22
+ f64.mul
+ local.get $11
+ local.get $23
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $21
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $8
+ local.get $26
+ f64.mul
+ local.get $6
+ local.get $29
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $25
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $2
+ local.get $29
+ f64.mul
+ local.get $4
+ local.get $26
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $25
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $16
+ local.get $20
+ f64.mul
+ local.get $14
+ local.get $23
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $19
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $10
+ local.get $23
+ f64.mul
+ local.get $12
+ local.get $20
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $19
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $6
+ local.get $28
+ f64.mul
+ local.get $7
+ local.get $26
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $24
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $3
+ local.get $26
+ f64.mul
+ local.get $2
+ local.get $28
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $24
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $14
+ local.get $22
+ f64.mul
+ local.get $15
+ local.get $20
+ f64.mul
+ f64.sub
+ local.get $17
+ local.get $18
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $11
+ local.get $20
+ f64.mul
+ local.get $10
+ local.get $22
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $18
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $7
+ local.get $25
+ f64.mul
+ local.get $6
+ local.get $27
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $24
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $2
+ local.get $27
+ f64.mul
+ local.get $3
+ local.get $25
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $24
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $15
+ local.get $19
+ f64.mul
+ local.get $14
+ local.get $21
+ f64.mul
+ f64.sub
+ local.get $16
+ local.get $18
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $10
+ local.get $21
+ f64.mul
+ local.get $11
+ local.get $19
+ f64.mul
+ f64.sub
+ local.get $12
+ local.get $18
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/determinant (param $0 i32) (result f64)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ (local $26 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $0
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $0
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $0
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $0
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $0
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ local.get $6
+ f64.mul
+ local.get $2
+ local.get $5
+ f64.mul
+ f64.sub
+ local.set $17
+ local.get $1
+ local.get $7
+ f64.mul
+ local.get $3
+ local.get $5
+ f64.mul
+ f64.sub
+ local.set $18
+ local.get $2
+ local.get $7
+ f64.mul
+ local.get $3
+ local.get $6
+ f64.mul
+ f64.sub
+ local.set $19
+ local.get $9
+ local.get $14
+ f64.mul
+ local.get $10
+ local.get $13
+ f64.mul
+ f64.sub
+ local.set $20
+ local.get $9
+ local.get $15
+ f64.mul
+ local.get $11
+ local.get $13
+ f64.mul
+ f64.sub
+ local.set $21
+ local.get $10
+ local.get $15
+ f64.mul
+ local.get $11
+ local.get $14
+ f64.mul
+ f64.sub
+ local.set $22
+ local.get $1
+ local.get $22
+ f64.mul
+ local.get $2
+ local.get $21
+ f64.mul
+ f64.sub
+ local.get $3
+ local.get $20
+ f64.mul
+ f64.add
+ local.set $23
+ local.get $5
+ local.get $22
+ f64.mul
+ local.get $6
+ local.get $21
+ f64.mul
+ f64.sub
+ local.get $7
+ local.get $20
+ f64.mul
+ f64.add
+ local.set $24
+ local.get $9
+ local.get $19
+ f64.mul
+ local.get $10
+ local.get $18
+ f64.mul
+ f64.sub
+ local.get $11
+ local.get $17
+ f64.mul
+ f64.add
+ local.set $25
+ local.get $13
+ local.get $19
+ f64.mul
+ local.get $14
+ local.get $18
+ f64.mul
+ f64.sub
+ local.get $15
+ local.get $17
+ f64.mul
+ f64.add
+ local.set $26
+ local.get $8
+ local.get $23
+ f64.mul
+ local.get $4
+ local.get $24
+ f64.mul
+ f64.sub
+ local.get $16
+ local.get $25
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $26
+ f64.mul
+ f64.sub
+ )
+ (func $assembly/mat4/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ local.get $0
+ i32.eq
+ if
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $0
+ i32.const 0
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $12
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $13
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $14
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $15
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $16
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $17
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $6
+ local.get $3
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $7
+ local.get $3
+ f64.mul
+ local.get $11
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $15
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $8
+ local.get $3
+ f64.mul
+ local.get $12
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $9
+ local.get $3
+ f64.mul
+ local.get $13
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $17
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $assembly/mat4/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/rotate (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ (local $26 f64)
+ (local $27 f64)
+ (local $28 f64)
+ (local $29 f64)
+ (local $30 f64)
+ (local $31 f64)
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $4
+ local.get $5
+ local.get $6
+ call $assembly/maths/Maths.hypot3
+ local.set $7
+ local.get $7
+ global.get $assembly/common/EPSILON
+ f64.lt
+ if
+ i32.const 0
+ return
+ end
+ f64.const 1
+ local.get $7
+ f64.div
+ local.set $7
+ local.get $4
+ local.get $7
+ f64.mul
+ local.set $4
+ local.get $5
+ local.get $7
+ f64.mul
+ local.set $5
+ local.get $6
+ local.get $7
+ f64.mul
+ local.set $6
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $8
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $9
+ f64.const 1
+ local.get $9
+ f64.sub
+ local.set $10
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $21
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $22
+ local.get $4
+ local.get $4
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $9
+ f64.add
+ local.set $23
+ local.get $5
+ local.get $4
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.add
+ local.set $24
+ local.get $6
+ local.get $4
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ local.set $25
+ local.get $4
+ local.get $5
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.sub
+ local.set $26
+ local.get $5
+ local.get $5
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $9
+ f64.add
+ local.set $27
+ local.get $6
+ local.get $5
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.add
+ local.set $28
+ local.get $4
+ local.get $6
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.add
+ local.set $29
+ local.get $5
+ local.get $6
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ local.set $30
+ local.get $6
+ local.get $6
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $9
+ f64.add
+ local.set $31
+ local.get $0
+ i32.const 0
+ local.get $11
+ local.get $23
+ f64.mul
+ local.get $15
+ local.get $24
+ f64.mul
+ f64.add
+ local.get $19
+ local.get $25
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $12
+ local.get $23
+ f64.mul
+ local.get $16
+ local.get $24
+ f64.mul
+ f64.add
+ local.get $20
+ local.get $25
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $13
+ local.get $23
+ f64.mul
+ local.get $17
+ local.get $24
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $25
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $14
+ local.get $23
+ f64.mul
+ local.get $18
+ local.get $24
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $25
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $11
+ local.get $26
+ f64.mul
+ local.get $15
+ local.get $27
+ f64.mul
+ f64.add
+ local.get $19
+ local.get $28
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $12
+ local.get $26
+ f64.mul
+ local.get $16
+ local.get $27
+ f64.mul
+ f64.add
+ local.get $20
+ local.get $28
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $13
+ local.get $26
+ f64.mul
+ local.get $17
+ local.get $27
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $28
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $14
+ local.get $26
+ f64.mul
+ local.get $18
+ local.get $27
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $28
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $11
+ local.get $29
+ f64.mul
+ local.get $15
+ local.get $30
+ f64.mul
+ f64.add
+ local.get $19
+ local.get $31
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $12
+ local.get $29
+ f64.mul
+ local.get $16
+ local.get $30
+ f64.mul
+ f64.add
+ local.get $20
+ local.get $31
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $13
+ local.get $29
+ f64.mul
+ local.get $17
+ local.get $30
+ f64.mul
+ f64.add
+ local.get $21
+ local.get $31
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $14
+ local.get $29
+ f64.mul
+ local.get $18
+ local.get $30
+ f64.mul
+ f64.add
+ local.get $22
+ local.get $31
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ local.get $0
+ i32.ne
+ if
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $assembly/mat4/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $3
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ local.get $0
+ i32.ne
+ if
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 4
+ local.get $5
+ local.get $4
+ f64.mul
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $6
+ local.get $4
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $7
+ local.get $4
+ f64.mul
+ local.get $11
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $8
+ local.get $4
+ f64.mul
+ local.get $12
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $9
+ local.get $4
+ f64.mul
+ local.get $5
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $10
+ local.get $4
+ f64.mul
+ local.get $6
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $11
+ local.get $4
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $12
+ local.get $4
+ f64.mul
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $3
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ local.get $0
+ i32.ne
+ if
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $4
+ f64.mul
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $6
+ local.get $4
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $7
+ local.get $4
+ f64.mul
+ local.get $11
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $8
+ local.get $4
+ f64.mul
+ local.get $12
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $5
+ local.get $3
+ f64.mul
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $6
+ local.get $3
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $7
+ local.get $3
+ f64.mul
+ local.get $11
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $8
+ local.get $3
+ f64.mul
+ local.get $12
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $3
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ local.get $0
+ i32.ne
+ if
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $4
+ f64.mul
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $6
+ local.get $4
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $7
+ local.get $4
+ f64.mul
+ local.get $11
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $8
+ local.get $4
+ f64.mul
+ local.get $12
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $9
+ local.get $4
+ f64.mul
+ local.get $5
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $10
+ local.get $4
+ f64.mul
+ local.get $6
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $11
+ local.get $4
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $12
+ local.get $4
+ f64.mul
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/fromTranslation (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/fromScaling (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $3
+ local.get $4
+ local.get $5
+ call $assembly/maths/Maths.hypot3
+ local.set $6
+ local.get $6
+ global.get $assembly/common/EPSILON
+ f64.lt
+ if
+ i32.const 0
+ return
+ end
+ f64.const 1
+ local.get $6
+ f64.div
+ local.set $6
+ local.get $3
+ local.get $6
+ f64.mul
+ local.set $3
+ local.get $4
+ local.get $6
+ f64.mul
+ local.set $4
+ local.get $5
+ local.get $6
+ f64.mul
+ local.set $5
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $7
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.set $8
+ f64.const 1
+ local.get $8
+ f64.sub
+ local.set $9
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $3
+ f64.mul
+ local.get $9
+ f64.mul
+ local.get $8
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $3
+ f64.mul
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $3
+ f64.mul
+ local.get $9
+ f64.mul
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $3
+ local.get $4
+ f64.mul
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $4
+ f64.mul
+ local.get $9
+ f64.mul
+ local.get $8
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $5
+ local.get $4
+ f64.mul
+ local.get $9
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $3
+ local.get $5
+ f64.mul
+ local.get $9
+ f64.mul
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $4
+ local.get $5
+ f64.mul
+ local.get $9
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $5
+ local.get $5
+ f64.mul
+ local.get $9
+ f64.mul
+ local.get $8
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/fromXRotation (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.set $3
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $2
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/fromYRotation (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/fromZRotation (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $2
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $2
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $3
+ local.get $3
+ f64.add
+ local.set $7
+ local.get $4
+ local.get $4
+ f64.add
+ local.set $8
+ local.get $5
+ local.get $5
+ f64.add
+ local.set $9
+ local.get $3
+ local.get $7
+ f64.mul
+ local.set $10
+ local.get $3
+ local.get $8
+ f64.mul
+ local.set $11
+ local.get $3
+ local.get $9
+ f64.mul
+ local.set $12
+ local.get $4
+ local.get $8
+ f64.mul
+ local.set $13
+ local.get $4
+ local.get $9
+ f64.mul
+ local.set $14
+ local.get $5
+ local.get $9
+ f64.mul
+ local.set $15
+ local.get $6
+ local.get $7
+ f64.mul
+ local.set $16
+ local.get $6
+ local.get $8
+ f64.mul
+ local.set $17
+ local.get $6
+ local.get $9
+ f64.mul
+ local.set $18
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $13
+ local.get $15
+ f64.add
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $11
+ local.get $18
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ local.get $17
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $11
+ local.get $18
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ local.get $10
+ local.get $15
+ f64.add
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $14
+ local.get $16
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $12
+ local.get $17
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $14
+ local.get $16
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ local.get $10
+ local.get $13
+ f64.add
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/getTranslation (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/getScaling (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/maths/Maths.hypot3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $6
+ local.get $7
+ call $assembly/maths/Maths.hypot3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $8
+ local.get $9
+ local.get $10
+ call $assembly/maths/Maths.hypot3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/decompose (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ (local $26 f64)
+ (local $27 f64)
+ local.get $1
+ i32.const 0
+ local.get $3
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $3
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $3
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $3
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $3
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $3
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $3
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $3
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $3
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $2
+ i32.const 0
+ local.get $4
+ local.get $5
+ local.get $6
+ call $assembly/maths/Maths.hypot3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 1
+ local.get $7
+ local.get $8
+ local.get $9
+ call $assembly/maths/Maths.hypot3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 2
+ local.get $10
+ local.get $11
+ local.get $12
+ call $assembly/maths/Maths.hypot3
+ call $~lib/typedarray/Float64Array#__set
+ i32.const 1
+ f64.convert_i32_s
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ local.set $13
+ i32.const 1
+ f64.convert_i32_s
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ local.set $14
+ i32.const 1
+ f64.convert_i32_s
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ local.set $15
+ local.get $4
+ local.get $13
+ f64.mul
+ local.set $16
+ local.get $5
+ local.get $14
+ f64.mul
+ local.set $17
+ local.get $6
+ local.get $15
+ f64.mul
+ local.set $18
+ local.get $7
+ local.get $13
+ f64.mul
+ local.set $19
+ local.get $8
+ local.get $14
+ f64.mul
+ local.set $20
+ local.get $9
+ local.get $15
+ f64.mul
+ local.set $21
+ local.get $10
+ local.get $13
+ f64.mul
+ local.set $22
+ local.get $11
+ local.get $14
+ f64.mul
+ local.set $23
+ local.get $12
+ local.get $15
+ f64.mul
+ local.set $24
+ local.get $16
+ local.get $20
+ f64.add
+ local.get $24
+ f64.add
+ local.set $25
+ f64.const 0
+ local.set $26
+ local.get $25
+ f64.const 0
+ f64.gt
+ if
+ local.get $25
+ f64.const 1
+ f64.add
+ local.set $27
+ local.get $27
+ f64.sqrt
+ f64.const 2
+ f64.mul
+ local.set $26
+ local.get $0
+ i32.const 3
+ f64.const 0.25
+ local.get $26
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $21
+ local.get $23
+ f64.sub
+ local.get $26
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $22
+ local.get $18
+ f64.sub
+ local.get $26
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $17
+ local.get $19
+ f64.sub
+ local.get $26
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $16
+ local.get $20
+ f64.gt
+ if (result i32)
+ local.get $16
+ local.get $24
+ f64.gt
+ else
+ i32.const 0
+ end
+ if
+ f64.const 1
+ local.get $16
+ f64.add
+ local.get $20
+ f64.sub
+ local.get $24
+ f64.sub
+ local.set $27
+ local.get $27
+ f64.sqrt
+ f64.const 2
+ f64.mul
+ local.set $26
+ local.get $0
+ i32.const 3
+ local.get $21
+ local.get $23
+ f64.sub
+ local.get $26
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ f64.const 0.25
+ local.get $26
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $17
+ local.get $19
+ f64.add
+ local.get $26
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $22
+ local.get $18
+ f64.add
+ local.get $26
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $20
+ local.get $24
+ f64.gt
+ if
+ f64.const 1
+ local.get $20
+ f64.add
+ local.get $16
+ f64.sub
+ local.get $24
+ f64.sub
+ local.set $27
+ local.get $27
+ f64.sqrt
+ f64.const 2
+ f64.mul
+ local.set $26
+ local.get $0
+ i32.const 3
+ local.get $22
+ local.get $18
+ f64.sub
+ local.get $26
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $17
+ local.get $19
+ f64.add
+ local.get $26
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0.25
+ local.get $26
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $21
+ local.get $23
+ f64.add
+ local.get $26
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ f64.const 1
+ local.get $24
+ f64.add
+ local.get $16
+ f64.sub
+ local.get $20
+ f64.sub
+ local.set $27
+ local.get $27
+ f64.sqrt
+ f64.const 2
+ f64.mul
+ local.set $26
+ local.get $0
+ i32.const 3
+ local.get $17
+ local.get $19
+ f64.sub
+ local.get $26
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $22
+ local.get $18
+ f64.add
+ local.get $26
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $21
+ local.get $23
+ f64.add
+ local.get $26
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0.25
+ local.get $26
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ end
+ end
+ end
+ local.get $0
+ )
+ (func $assembly/mat4/fromRotationTranslationScale (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $4
+ local.get $4
+ f64.add
+ local.set $8
+ local.get $5
+ local.get $5
+ f64.add
+ local.set $9
+ local.get $6
+ local.get $6
+ f64.add
+ local.set $10
+ local.get $4
+ local.get $8
+ f64.mul
+ local.set $11
+ local.get $4
+ local.get $9
+ f64.mul
+ local.set $12
+ local.get $4
+ local.get $10
+ f64.mul
+ local.set $13
+ local.get $5
+ local.get $9
+ f64.mul
+ local.set $14
+ local.get $5
+ local.get $10
+ f64.mul
+ local.set $15
+ local.get $6
+ local.get $10
+ f64.mul
+ local.set $16
+ local.get $7
+ local.get $8
+ f64.mul
+ local.set $17
+ local.get $7
+ local.get $9
+ f64.mul
+ local.set $18
+ local.get $7
+ local.get $10
+ f64.mul
+ local.set $19
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $21
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $22
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $14
+ local.get $16
+ f64.add
+ f64.sub
+ local.get $20
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $12
+ local.get $19
+ f64.add
+ local.get $20
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $13
+ local.get $18
+ f64.sub
+ local.get $20
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $12
+ local.get $19
+ f64.sub
+ local.get $21
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ local.get $11
+ local.get $16
+ f64.add
+ f64.sub
+ local.get $21
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $15
+ local.get $17
+ f64.add
+ local.get $21
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $13
+ local.get $18
+ f64.add
+ local.get $22
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $15
+ local.get $17
+ f64.sub
+ local.get $22
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ local.get $11
+ local.get $14
+ f64.add
+ f64.sub
+ local.get $22
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/fromRotationTranslationScaleOrigin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ (local $26 f64)
+ (local $27 f64)
+ (local $28 f64)
+ (local $29 f64)
+ (local $30 f64)
+ (local $31 f64)
+ (local $32 f64)
+ (local $33 f64)
+ (local $34 f64)
+ (local $35 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $5
+ local.get $5
+ f64.add
+ local.set $9
+ local.get $6
+ local.get $6
+ f64.add
+ local.set $10
+ local.get $7
+ local.get $7
+ f64.add
+ local.set $11
+ local.get $5
+ local.get $9
+ f64.mul
+ local.set $12
+ local.get $5
+ local.get $10
+ f64.mul
+ local.set $13
+ local.get $5
+ local.get $11
+ f64.mul
+ local.set $14
+ local.get $6
+ local.get $10
+ f64.mul
+ local.set $15
+ local.get $6
+ local.get $11
+ f64.mul
+ local.set $16
+ local.get $7
+ local.get $11
+ f64.mul
+ local.set $17
+ local.get $8
+ local.get $9
+ f64.mul
+ local.set $18
+ local.get $8
+ local.get $10
+ f64.mul
+ local.set $19
+ local.get $8
+ local.get $11
+ f64.mul
+ local.set $20
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $21
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $22
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $23
+ local.get $4
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $24
+ local.get $4
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $25
+ local.get $4
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $26
+ i32.const 1
+ f64.convert_i32_s
+ local.get $15
+ local.get $17
+ f64.add
+ f64.sub
+ local.get $21
+ f64.mul
+ local.set $27
+ local.get $13
+ local.get $20
+ f64.add
+ local.get $21
+ f64.mul
+ local.set $28
+ local.get $14
+ local.get $19
+ f64.sub
+ local.get $21
+ f64.mul
+ local.set $29
+ local.get $13
+ local.get $20
+ f64.sub
+ local.get $22
+ f64.mul
+ local.set $30
+ i32.const 1
+ f64.convert_i32_s
+ local.get $12
+ local.get $17
+ f64.add
+ f64.sub
+ local.get $22
+ f64.mul
+ local.set $31
+ local.get $16
+ local.get $18
+ f64.add
+ local.get $22
+ f64.mul
+ local.set $32
+ local.get $14
+ local.get $19
+ f64.add
+ local.get $23
+ f64.mul
+ local.set $33
+ local.get $16
+ local.get $18
+ f64.sub
+ local.get $23
+ f64.mul
+ local.set $34
+ i32.const 1
+ f64.convert_i32_s
+ local.get $12
+ local.get $15
+ f64.add
+ f64.sub
+ local.get $23
+ f64.mul
+ local.set $35
+ local.get $0
+ i32.const 0
+ local.get $27
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $28
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $29
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $30
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $31
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $32
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $33
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $34
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $35
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $24
+ f64.add
+ local.get $27
+ local.get $24
+ f64.mul
+ local.get $30
+ local.get $25
+ f64.mul
+ f64.add
+ local.get $33
+ local.get $26
+ f64.mul
+ f64.add
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $25
+ f64.add
+ local.get $28
+ local.get $24
+ f64.mul
+ local.get $31
+ local.get $25
+ f64.mul
+ f64.add
+ local.get $34
+ local.get $26
+ f64.mul
+ f64.add
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $26
+ f64.add
+ local.get $29
+ local.get $24
+ f64.mul
+ local.get $32
+ local.get $25
+ f64.mul
+ f64.add
+ local.get $35
+ local.get $26
+ f64.mul
+ f64.add
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/fromQuat (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ local.get $2
+ f64.add
+ local.set $6
+ local.get $3
+ local.get $3
+ f64.add
+ local.set $7
+ local.get $4
+ local.get $4
+ f64.add
+ local.set $8
+ local.get $2
+ local.get $6
+ f64.mul
+ local.set $9
+ local.get $3
+ local.get $6
+ f64.mul
+ local.set $10
+ local.get $3
+ local.get $7
+ f64.mul
+ local.set $11
+ local.get $4
+ local.get $6
+ f64.mul
+ local.set $12
+ local.get $4
+ local.get $7
+ f64.mul
+ local.set $13
+ local.get $4
+ local.get $8
+ f64.mul
+ local.set $14
+ local.get $5
+ local.get $6
+ f64.mul
+ local.set $15
+ local.get $5
+ local.get $7
+ f64.mul
+ local.set $16
+ local.get $5
+ local.get $8
+ f64.mul
+ local.set $17
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $11
+ f64.sub
+ local.get $14
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $10
+ local.get $17
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ local.get $16
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $10
+ local.get $17
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ local.get $9
+ f64.sub
+ local.get $14
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $13
+ local.get $15
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $12
+ local.get $16
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $13
+ local.get $15
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ local.get $9
+ f64.sub
+ local.get $11
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/frustum (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ i32.const 1
+ f64.convert_i32_s
+ local.get $2
+ local.get $1
+ f64.sub
+ f64.div
+ local.set $7
+ i32.const 1
+ f64.convert_i32_s
+ local.get $4
+ local.get $3
+ f64.sub
+ f64.div
+ local.set $8
+ i32.const 1
+ f64.convert_i32_s
+ local.get $5
+ local.get $6
+ f64.sub
+ f64.div
+ local.set $9
+ local.get $0
+ i32.const 0
+ local.get $5
+ f64.const 2
+ f64.mul
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $5
+ f64.const 2
+ f64.mul
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $2
+ local.get $1
+ f64.add
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $4
+ local.get $3
+ f64.add
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $6
+ local.get $5
+ f64.add
+ local.get $9
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $6
+ local.get $5
+ f64.mul
+ f64.const 2
+ f64.mul
+ local.get $9
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result i32)
+ (local $5 f64)
+ (local $6 f64)
+ f64.const 1
+ local.get $1
+ f64.const 2
+ f64.div
+ call $~lib/math/NativeMath.tan
+ f64.div
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $5
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ drop
+ i32.const 2176
+ i32.const 2176
+ i32.eq
+ if (result i32)
+ local.get $4
+ f64.const inf
+ f64.ne
+ else
+ i32.const 0
+ end
+ if
+ i32.const 1
+ f64.convert_i32_s
+ local.get $3
+ local.get $4
+ f64.sub
+ f64.div
+ local.set $6
+ local.get $0
+ i32.const 10
+ local.get $4
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $4
+ local.get $3
+ f64.mul
+ local.get $6
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 10
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $3
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $assembly/mat4/perspectiveFromFieldOfView (param $0 i32) (param $1 i32) (param $2 f64) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ local.get $1
+ f64.load
+ global.get $~lib/math/NativeMath.PI
+ f64.mul
+ f64.const 180
+ f64.div
+ call $~lib/math/NativeMath.tan
+ local.set $4
+ local.get $1
+ f64.load offset=8
+ global.get $~lib/math/NativeMath.PI
+ f64.mul
+ f64.const 180
+ f64.div
+ call $~lib/math/NativeMath.tan
+ local.set $5
+ local.get $1
+ f64.load offset=16
+ global.get $~lib/math/NativeMath.PI
+ f64.mul
+ f64.const 180
+ f64.div
+ call $~lib/math/NativeMath.tan
+ local.set $6
+ local.get $1
+ f64.load offset=24
+ global.get $~lib/math/NativeMath.PI
+ f64.mul
+ f64.const 180
+ f64.div
+ call $~lib/math/NativeMath.tan
+ local.set $7
+ f64.const 2
+ local.get $6
+ local.get $7
+ f64.add
+ f64.div
+ local.set $8
+ f64.const 2
+ local.get $4
+ local.get $5
+ f64.add
+ f64.div
+ local.set $9
+ local.get $0
+ i32.const 0
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $6
+ local.get $7
+ f64.sub
+ local.get $8
+ f64.mul
+ f64.const 0.5
+ f64.mul
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $4
+ local.get $5
+ f64.sub
+ local.get $9
+ f64.mul
+ f64.const 0.5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $3
+ local.get $2
+ local.get $3
+ f64.sub
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const -1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $3
+ local.get $2
+ f64.mul
+ local.get $2
+ local.get $3
+ f64.sub
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/orthoZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ i32.const 1
+ f64.convert_i32_s
+ local.get $1
+ local.get $2
+ f64.sub
+ f64.div
+ local.set $7
+ i32.const 1
+ f64.convert_i32_s
+ local.get $3
+ local.get $4
+ f64.sub
+ f64.div
+ local.set $8
+ i32.const 1
+ f64.convert_i32_s
+ local.get $5
+ local.get $6
+ f64.sub
+ f64.div
+ local.set $9
+ local.get $0
+ i32.const 0
+ f64.const -2
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const -2
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ local.get $2
+ f64.add
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $4
+ local.get $3
+ f64.add
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $5
+ local.get $9
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/lookAt (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $21
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $22
+ local.get $14
+ local.get $20
+ f64.sub
+ local.set $23
+ local.get $23
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.lt
+ if (result i32)
+ local.get $15
+ local.get $21
+ f64.sub
+ local.set $23
+ local.get $23
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.lt
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $16
+ local.get $22
+ f64.sub
+ local.set $23
+ local.get $23
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.lt
+ else
+ i32.const 0
+ end
+ if
+ local.get $0
+ call $assembly/mat4/identity
+ return
+ end
+ local.get $14
+ local.get $20
+ f64.sub
+ local.set $10
+ local.get $15
+ local.get $21
+ f64.sub
+ local.set $11
+ local.get $16
+ local.get $22
+ f64.sub
+ local.set $12
+ f64.const 1
+ local.get $10
+ local.get $11
+ local.get $12
+ call $assembly/maths/Maths.hypot3
+ f64.div
+ local.set $13
+ local.get $10
+ local.get $13
+ f64.mul
+ local.set $10
+ local.get $11
+ local.get $13
+ f64.mul
+ local.set $11
+ local.get $12
+ local.get $13
+ f64.mul
+ local.set $12
+ local.get $18
+ local.get $12
+ f64.mul
+ local.get $19
+ local.get $11
+ f64.mul
+ f64.sub
+ local.set $4
+ local.get $19
+ local.get $10
+ f64.mul
+ local.get $17
+ local.get $12
+ f64.mul
+ f64.sub
+ local.set $5
+ local.get $17
+ local.get $11
+ f64.mul
+ local.get $18
+ local.get $10
+ f64.mul
+ f64.sub
+ local.set $6
+ local.get $4
+ local.get $5
+ local.get $6
+ call $assembly/maths/Maths.hypot3
+ local.set $13
+ local.get $13
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ i32.eqz
+ if
+ f64.const 0
+ local.set $4
+ f64.const 0
+ local.set $5
+ f64.const 0
+ local.set $6
+ else
+ f64.const 1
+ local.get $13
+ f64.div
+ local.set $13
+ local.get $4
+ local.get $13
+ f64.mul
+ local.set $4
+ local.get $5
+ local.get $13
+ f64.mul
+ local.set $5
+ local.get $6
+ local.get $13
+ f64.mul
+ local.set $6
+ end
+ local.get $11
+ local.get $6
+ f64.mul
+ local.get $12
+ local.get $5
+ f64.mul
+ f64.sub
+ local.set $7
+ local.get $12
+ local.get $4
+ f64.mul
+ local.get $10
+ local.get $6
+ f64.mul
+ f64.sub
+ local.set $8
+ local.get $10
+ local.get $5
+ f64.mul
+ local.get $11
+ local.get $4
+ f64.mul
+ f64.sub
+ local.set $9
+ local.get $7
+ local.get $8
+ local.get $9
+ call $assembly/maths/Maths.hypot3
+ local.set $13
+ local.get $13
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ i32.eqz
+ if
+ f64.const 0
+ local.set $7
+ f64.const 0
+ local.set $8
+ f64.const 0
+ local.set $9
+ else
+ f64.const 1
+ local.get $13
+ f64.div
+ local.set $13
+ local.get $7
+ local.get $13
+ f64.mul
+ local.set $7
+ local.get $8
+ local.get $13
+ f64.mul
+ local.set $8
+ local.get $9
+ local.get $13
+ f64.mul
+ local.set $9
+ end
+ local.get $0
+ i32.const 0
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $12
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $4
+ local.get $14
+ f64.mul
+ local.get $5
+ local.get $15
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $16
+ f64.mul
+ f64.add
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $7
+ local.get $14
+ f64.mul
+ local.get $8
+ local.get $15
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $16
+ f64.mul
+ f64.add
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $10
+ local.get $14
+ f64.mul
+ local.get $11
+ local.get $15
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $16
+ f64.mul
+ f64.add
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/targetTo (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $4
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $10
+ local.get $5
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $11
+ local.get $6
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $12
+ local.get $10
+ local.get $10
+ f64.mul
+ local.get $11
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $12
+ f64.mul
+ f64.add
+ local.set $13
+ local.get $13
+ f64.const 0
+ f64.gt
+ if
+ f64.const 1
+ local.get $13
+ local.set $14
+ local.get $14
+ f64.sqrt
+ f64.div
+ local.set $13
+ local.get $10
+ local.get $13
+ f64.mul
+ local.set $10
+ local.get $11
+ local.get $13
+ f64.mul
+ local.set $11
+ local.get $12
+ local.get $13
+ f64.mul
+ local.set $12
+ end
+ local.get $8
+ local.get $12
+ f64.mul
+ local.get $9
+ local.get $11
+ f64.mul
+ f64.sub
+ local.set $14
+ local.get $9
+ local.get $10
+ f64.mul
+ local.get $7
+ local.get $12
+ f64.mul
+ f64.sub
+ local.set $15
+ local.get $7
+ local.get $11
+ f64.mul
+ local.get $8
+ local.get $10
+ f64.mul
+ f64.sub
+ local.set $16
+ local.get $14
+ local.get $14
+ f64.mul
+ local.get $15
+ local.get $15
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $16
+ f64.mul
+ f64.add
+ local.set $13
+ local.get $13
+ f64.const 0
+ f64.gt
+ if
+ f64.const 1
+ local.get $13
+ local.set $17
+ local.get $17
+ f64.sqrt
+ f64.div
+ local.set $13
+ local.get $14
+ local.get $13
+ f64.mul
+ local.set $14
+ local.get $15
+ local.get $13
+ f64.mul
+ local.set $15
+ local.get $16
+ local.get $13
+ f64.mul
+ local.set $16
+ end
+ local.get $0
+ i32.const 0
+ local.get $14
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $15
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $16
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $11
+ local.get $16
+ f64.mul
+ local.get $12
+ local.get $15
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $12
+ local.get $14
+ f64.mul
+ local.get $10
+ local.get $16
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $10
+ local.get $15
+ f64.mul
+ local.get $11
+ local.get $14
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $12
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/maths/Maths.hypot16 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (result f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ local.get $0
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $0
+ local.get $1
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $1
+ local.get $2
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $2
+ local.get $3
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $3
+ local.get $4
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $4
+ local.get $5
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $5
+ local.get $6
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $6
+ local.get $7
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $7
+ local.get $8
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $8
+ local.get $9
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $9
+ local.get $10
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $10
+ local.get $11
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $11
+ local.get $12
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $12
+ local.get $13
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $13
+ local.get $14
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $14
+ local.get $15
+ local.set $16
+ local.get $16
+ f64.abs
+ local.set $15
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/maths/Maths.max
+ local.get $4
+ local.get $5
+ local.get $6
+ call $assembly/maths/Maths.max
+ call $assembly/maths/Maths.max
+ local.set $17
+ local.get $7
+ local.get $8
+ local.get $9
+ call $assembly/maths/Maths.max
+ local.get $10
+ local.get $11
+ local.get $12
+ call $assembly/maths/Maths.max
+ local.get $13
+ local.get $14
+ local.get $15
+ call $assembly/maths/Maths.max
+ call $assembly/maths/Maths.max
+ local.set $16
+ local.get $17
+ local.get $16
+ f64.max
+ local.set $17
+ local.get $17
+ f64.const 0
+ f64.eq
+ if
+ f64.const 0
+ return
+ end
+ f64.const 1
+ local.get $17
+ f64.div
+ local.set $16
+ local.get $0
+ local.get $16
+ f64.mul
+ local.set $0
+ local.get $1
+ local.get $16
+ f64.mul
+ local.set $1
+ local.get $2
+ local.get $16
+ f64.mul
+ local.set $2
+ local.get $3
+ local.get $16
+ f64.mul
+ local.set $3
+ local.get $4
+ local.get $16
+ f64.mul
+ local.set $4
+ local.get $5
+ local.get $16
+ f64.mul
+ local.set $5
+ local.get $6
+ local.get $16
+ f64.mul
+ local.set $6
+ local.get $7
+ local.get $16
+ f64.mul
+ local.set $7
+ local.get $9
+ local.get $16
+ f64.mul
+ local.set $9
+ local.get $10
+ local.get $16
+ f64.mul
+ local.set $10
+ local.get $11
+ local.get $16
+ f64.mul
+ local.set $11
+ local.get $12
+ local.get $16
+ f64.mul
+ local.set $12
+ local.get $13
+ local.get $16
+ f64.mul
+ local.set $13
+ local.get $14
+ local.get $16
+ f64.mul
+ local.set $14
+ local.get $15
+ local.get $16
+ f64.mul
+ local.set $15
+ local.get $17
+ local.get $0
+ local.get $0
+ f64.mul
+ local.get $1
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $2
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $12
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $13
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $14
+ f64.mul
+ f64.add
+ local.get $15
+ local.get $15
+ f64.mul
+ f64.add
+ local.set $18
+ local.get $18
+ f64.sqrt
+ f64.mul
+ )
+ (func $assembly/mat4/frob (param $0 i32) (result f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $assembly/maths/Maths.hypot16
+ )
+ (func $assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/mat4/exactEquals (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/mat4/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ (local $22 f64)
+ (local $23 f64)
+ (local $24 f64)
+ (local $25 f64)
+ (local $26 f64)
+ (local $27 f64)
+ (local $28 f64)
+ (local $29 f64)
+ (local $30 f64)
+ (local $31 f64)
+ (local $32 f64)
+ (local $33 f64)
+ (local $34 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $0
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $0
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $0
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $0
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $0
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $0
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $18
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $19
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $20
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $21
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $22
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $23
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $24
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $25
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.set $26
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.set $27
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.set $28
+ local.get $1
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.set $29
+ local.get $1
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.set $30
+ local.get $1
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.set $31
+ local.get $1
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.set $32
+ local.get $1
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.set $33
+ local.get $2
+ local.get $18
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $2
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $18
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $19
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $3
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $19
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $20
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $4
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $20
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $5
+ local.get $21
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $5
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $21
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $6
+ local.get $22
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $6
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $22
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $7
+ local.get $23
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $7
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $23
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $8
+ local.get $24
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $8
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $24
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $9
+ local.get $25
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $9
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $25
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $10
+ local.get $26
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $10
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $26
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $11
+ local.get $27
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $11
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $27
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $12
+ local.get $28
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $12
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $28
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $13
+ local.get $29
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $13
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $29
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $14
+ local.get $30
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $14
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $30
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $15
+ local.get $31
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $15
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $31
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $16
+ local.get $32
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $16
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $32
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $17
+ local.get $33
+ f64.sub
+ local.set $34
+ local.get $34
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $17
+ local.set $34
+ local.get $34
+ f64.abs
+ local.get $33
+ local.set $34
+ local.get $34
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/quat/identity (param $0 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/getAxisAngle (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 f64)
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/math/NativeMath.acos
+ f64.const 2
+ f64.mul
+ local.set $2
+ local.get $2
+ f64.const 2
+ f64.div
+ call $~lib/math/NativeMath.sin
+ local.set $3
+ local.get $3
+ global.get $assembly/common/EPSILON
+ f64.gt
+ if
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $2
+ )
+ (func $assembly/quat/getAngle (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ local.get $0
+ local.get $1
+ i32.const 2
+ global.set $~argumentsLength
+ global.get $assembly/quat/dot
+ i32.load
+ call_indirect $0 (type $i32_i32_=>_f64)
+ local.set $2
+ f64.const 2
+ local.get $2
+ f64.mul
+ local.get $2
+ f64.mul
+ f64.const 1
+ f64.sub
+ call $~lib/math/NativeMath.acos
+ )
+ (func $assembly/quat/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ local.get $2
+ f64.const 0.5
+ f64.mul
+ local.set $2
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $7
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $8
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $8
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $8
+ f64.mul
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ local.get $2
+ f64.const 0.5
+ f64.mul
+ local.set $2
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $7
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $8
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $8
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $8
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ local.get $2
+ f64.const 0.5
+ f64.mul
+ local.set $2
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $7
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $8
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $8
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $8
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/calculateW (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 0
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ local.get $2
+ local.get $2
+ f64.mul
+ f64.sub
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.sub
+ local.set $5
+ local.get $5
+ f64.abs
+ local.set $5
+ local.get $5
+ f64.sqrt
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $~lib/math/NativeMath.exp (param $0 f64) (result f64)
+ (local $1 f64)
+ (local $2 i64)
+ (local $3 i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 i64)
+ (local $7 f64)
+ (local $8 i32)
+ (local $9 i64)
+ (local $10 f64)
+ (local $11 i64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 i64)
+ (local $15 i64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ (local $19 f64)
+ (local $20 f64)
+ (local $21 f64)
+ i32.const 0
+ i32.const 1
+ i32.lt_s
+ drop
+ block $~lib/util/math/exp_lut|inlined.0 (result f64)
+ local.get $0
+ local.set $1
+ local.get $1
+ i64.reinterpret_f64
+ local.set $2
+ local.get $2
+ i64.const 52
+ i64.shr_u
+ i64.const 2047
+ i64.and
+ i32.wrap_i64
+ local.set $3
+ local.get $3
+ i32.const 969
+ i32.sub
+ i32.const 63
+ i32.ge_u
+ if
+ local.get $3
+ i32.const 969
+ i32.sub
+ i32.const -2147483648
+ i32.ge_u
+ if
+ f64.const 1
+ br $~lib/util/math/exp_lut|inlined.0
+ end
+ local.get $3
+ i32.const 1033
+ i32.ge_u
+ if
+ local.get $2
+ i64.const -4503599627370496
+ i64.eq
+ if
+ f64.const 0
+ br $~lib/util/math/exp_lut|inlined.0
+ end
+ local.get $3
+ i32.const 2047
+ i32.ge_u
+ if
+ f64.const 1
+ local.get $1
+ f64.add
+ br $~lib/util/math/exp_lut|inlined.0
+ end
+ f64.const 0
+ f64.const inf
+ local.get $2
+ i64.const 63
+ i64.shr_u
+ i64.const 0
+ i64.ne
+ select
+ br $~lib/util/math/exp_lut|inlined.0
+ end
+ i32.const 0
+ local.set $3
+ end
+ f64.const 184.6649652337873
+ local.get $1
+ f64.mul
+ local.set $4
+ local.get $4
+ f64.const 6755399441055744
+ f64.add
+ local.set $5
+ local.get $5
+ i64.reinterpret_f64
+ local.set $6
+ local.get $5
+ f64.const 6755399441055744
+ f64.sub
+ local.set $5
+ local.get $1
+ local.get $5
+ f64.const -0.005415212348111709
+ f64.mul
+ f64.add
+ local.get $5
+ f64.const -1.2864023111638346e-14
+ f64.mul
+ f64.add
+ local.set $7
+ local.get $6
+ i64.const 127
+ i64.and
+ i64.const 1
+ i64.shl
+ i32.wrap_i64
+ local.set $8
+ local.get $6
+ i64.const 52
+ i64.const 7
+ i64.sub
+ i64.shl
+ local.set $9
+ i32.const 4496
+ local.get $8
+ i32.const 3
+ i32.shl
+ i32.add
+ i64.load
+ f64.reinterpret_i64
+ local.set $10
+ i32.const 4496
+ local.get $8
+ i32.const 3
+ i32.shl
+ i32.add
+ i64.load offset=8
+ local.get $9
+ i64.add
+ local.set $11
+ local.get $7
+ local.get $7
+ f64.mul
+ local.set $12
+ local.get $10
+ local.get $7
+ f64.add
+ local.get $12
+ f64.const 0.49999999999996786
+ local.get $7
+ f64.const 0.16666666666665886
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $12
+ f64.mul
+ f64.const 0.0416666808410674
+ local.get $7
+ f64.const 0.008333335853059549
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.set $13
+ local.get $3
+ i32.const 0
+ i32.eq
+ if
+ block $~lib/util/math/specialcase|inlined.0 (result f64)
+ local.get $13
+ local.set $16
+ local.get $11
+ local.set $15
+ local.get $6
+ local.set $14
+ local.get $14
+ i64.const 2147483648
+ i64.and
+ i64.const 0
+ i64.ne
+ i32.eqz
+ if
+ local.get $15
+ i64.const 1009
+ i64.const 52
+ i64.shl
+ i64.sub
+ local.set $15
+ local.get $15
+ f64.reinterpret_i64
+ local.set $17
+ f64.const 5486124068793688683255936e279
+ local.get $17
+ local.get $17
+ local.get $16
+ f64.mul
+ f64.add
+ f64.mul
+ br $~lib/util/math/specialcase|inlined.0
+ end
+ local.get $15
+ i64.const 1022
+ i64.const 52
+ i64.shl
+ i64.add
+ local.set $15
+ local.get $15
+ f64.reinterpret_i64
+ local.set $17
+ local.get $17
+ local.get $17
+ local.get $16
+ f64.mul
+ f64.add
+ local.set $18
+ local.get $18
+ f64.abs
+ f64.const 1
+ f64.lt
+ if
+ f64.const 1
+ local.get $18
+ f64.copysign
+ local.set $19
+ local.get $17
+ local.get $18
+ f64.sub
+ local.get $17
+ local.get $16
+ f64.mul
+ f64.add
+ local.set $20
+ local.get $19
+ local.get $18
+ f64.add
+ local.set $21
+ local.get $19
+ local.get $21
+ f64.sub
+ local.get $18
+ f64.add
+ local.get $20
+ f64.add
+ local.set $20
+ local.get $21
+ local.get $20
+ f64.add
+ local.get $19
+ f64.sub
+ local.set $18
+ local.get $18
+ f64.const 0
+ f64.eq
+ if
+ local.get $15
+ i64.const -9223372036854775808
+ i64.and
+ f64.reinterpret_i64
+ local.set $18
+ end
+ end
+ local.get $18
+ f64.const 2.2250738585072014e-308
+ f64.mul
+ end
+ br $~lib/util/math/exp_lut|inlined.0
+ end
+ local.get $11
+ f64.reinterpret_i64
+ local.set $18
+ local.get $18
+ local.get $18
+ local.get $13
+ f64.mul
+ f64.add
+ end
+ return
+ )
+ (func $assembly/quat/exp (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.set $6
+ local.get $6
+ f64.sqrt
+ local.set $6
+ local.get $5
+ call $~lib/math/NativeMath.exp
+ local.set $7
+ local.get $6
+ f64.const 0
+ f64.gt
+ if (result f64)
+ local.get $7
+ local.get $6
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ local.get $6
+ f64.div
+ else
+ f64.const 0
+ end
+ local.set $8
+ local.get $0
+ i32.const 0
+ local.get $2
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ local.get $8
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $6
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $~lib/math/NativeMath.atan (param $0 f64) (result f64)
+ (local $1 i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 i32)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 i32)
+ local.get $0
+ i64.reinterpret_f64
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $1
+ local.get $0
+ local.set $2
+ local.get $1
+ i32.const 2147483647
+ i32.and
+ local.set $1
+ local.get $1
+ i32.const 1141899264
+ i32.ge_u
+ if
+ local.get $0
+ local.get $0
+ f64.ne
+ if
+ local.get $0
+ return
+ end
+ f64.const 1.5707963267948966
+ f32.const 7.52316384526264e-37
+ f64.promote_f32
+ f64.add
+ local.set $3
+ local.get $3
+ local.get $2
+ f64.copysign
+ return
+ end
+ local.get $1
+ i32.const 1071382528
+ i32.lt_u
+ if
+ local.get $1
+ i32.const 1044381696
+ i32.lt_u
+ if
+ local.get $0
+ return
+ end
+ i32.const -1
+ local.set $4
+ else
+ local.get $0
+ f64.abs
+ local.set $0
+ local.get $1
+ i32.const 1072889856
+ i32.lt_u
+ if
+ local.get $1
+ i32.const 1072037888
+ i32.lt_u
+ if
+ i32.const 0
+ local.set $4
+ f64.const 2
+ local.get $0
+ f64.mul
+ f64.const 1
+ f64.sub
+ f64.const 2
+ local.get $0
+ f64.add
+ f64.div
+ local.set $0
+ else
+ i32.const 1
+ local.set $4
+ local.get $0
+ f64.const 1
+ f64.sub
+ local.get $0
+ f64.const 1
+ f64.add
+ f64.div
+ local.set $0
+ end
+ else
+ local.get $1
+ i32.const 1073971200
+ i32.lt_u
+ if
+ i32.const 2
+ local.set $4
+ local.get $0
+ f64.const 1.5
+ f64.sub
+ f64.const 1
+ f64.const 1.5
+ local.get $0
+ f64.mul
+ f64.add
+ f64.div
+ local.set $0
+ else
+ i32.const 3
+ local.set $4
+ f64.const -1
+ local.get $0
+ f64.div
+ local.set $0
+ end
+ end
+ end
+ local.get $0
+ local.get $0
+ f64.mul
+ local.set $3
+ local.get $3
+ local.get $3
+ f64.mul
+ local.set $5
+ local.get $3
+ f64.const 0.3333333333333293
+ local.get $5
+ f64.const 0.14285714272503466
+ local.get $5
+ f64.const 0.09090887133436507
+ local.get $5
+ f64.const 0.06661073137387531
+ local.get $5
+ f64.const 0.049768779946159324
+ local.get $5
+ f64.const 0.016285820115365782
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.set $6
+ local.get $5
+ f64.const -0.19999999999876483
+ local.get $5
+ f64.const -0.11111110405462356
+ local.get $5
+ f64.const -0.0769187620504483
+ local.get $5
+ f64.const -0.058335701337905735
+ local.get $5
+ f64.const -0.036531572744216916
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.set $7
+ local.get $0
+ local.get $6
+ local.get $7
+ f64.add
+ f64.mul
+ local.set $8
+ local.get $4
+ i32.const 0
+ i32.lt_s
+ if
+ local.get $0
+ local.get $8
+ f64.sub
+ return
+ end
+ block $break|0
+ block $case4|0
+ block $case3|0
+ block $case2|0
+ block $case1|0
+ block $case0|0
+ local.get $4
+ local.set $9
+ local.get $9
+ i32.const 0
+ i32.eq
+ br_if $case0|0
+ local.get $9
+ i32.const 1
+ i32.eq
+ br_if $case1|0
+ local.get $9
+ i32.const 2
+ i32.eq
+ br_if $case2|0
+ local.get $9
+ i32.const 3
+ i32.eq
+ br_if $case3|0
+ br $case4|0
+ end
+ f64.const 0.4636476090008061
+ local.get $8
+ f64.const 2.2698777452961687e-17
+ f64.sub
+ local.get $0
+ f64.sub
+ f64.sub
+ local.set $3
+ br $break|0
+ end
+ f64.const 0.7853981633974483
+ local.get $8
+ f64.const 3.061616997868383e-17
+ f64.sub
+ local.get $0
+ f64.sub
+ f64.sub
+ local.set $3
+ br $break|0
+ end
+ f64.const 0.982793723247329
+ local.get $8
+ f64.const 1.3903311031230998e-17
+ f64.sub
+ local.get $0
+ f64.sub
+ f64.sub
+ local.set $3
+ br $break|0
+ end
+ f64.const 1.5707963267948966
+ local.get $8
+ f64.const 6.123233995736766e-17
+ f64.sub
+ local.get $0
+ f64.sub
+ f64.sub
+ local.set $3
+ br $break|0
+ end
+ unreachable
+ end
+ local.get $3
+ local.get $2
+ f64.copysign
+ )
+ (func $~lib/math/NativeMath.atan2 (param $0 f64) (param $1 f64) (result f64)
+ (local $2 i64)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 i32)
+ (local $8 i32)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $1
+ local.get $1
+ f64.ne
+ if (result i32)
+ i32.const 1
+ else
+ local.get $0
+ local.get $0
+ f64.ne
+ end
+ if
+ local.get $1
+ local.get $0
+ f64.add
+ return
+ end
+ local.get $1
+ i64.reinterpret_f64
+ local.set $2
+ local.get $2
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $3
+ local.get $2
+ i32.wrap_i64
+ local.set $4
+ local.get $0
+ i64.reinterpret_f64
+ local.set $2
+ local.get $2
+ i64.const 32
+ i64.shr_u
+ i32.wrap_i64
+ local.set $5
+ local.get $2
+ i32.wrap_i64
+ local.set $6
+ local.get $3
+ i32.const 1072693248
+ i32.sub
+ local.get $4
+ i32.or
+ i32.const 0
+ i32.eq
+ if
+ local.get $0
+ call $~lib/math/NativeMath.atan
+ return
+ end
+ local.get $5
+ i32.const 31
+ i32.shr_u
+ i32.const 1
+ i32.and
+ local.get $3
+ i32.const 30
+ i32.shr_u
+ i32.const 2
+ i32.and
+ i32.or
+ local.set $7
+ local.get $3
+ i32.const 2147483647
+ i32.and
+ local.set $3
+ local.get $5
+ i32.const 2147483647
+ i32.and
+ local.set $5
+ local.get $5
+ local.get $6
+ i32.or
+ i32.const 0
+ i32.eq
+ if
+ block $break|0
+ block $case3|0
+ block $case2|0
+ block $case1|0
+ block $case0|0
+ local.get $7
+ local.set $8
+ local.get $8
+ i32.const 0
+ i32.eq
+ br_if $case0|0
+ local.get $8
+ i32.const 1
+ i32.eq
+ br_if $case1|0
+ local.get $8
+ i32.const 2
+ i32.eq
+ br_if $case2|0
+ local.get $8
+ i32.const 3
+ i32.eq
+ br_if $case3|0
+ br $break|0
+ end
+ end
+ local.get $0
+ return
+ end
+ global.get $~lib/math/NativeMath.PI
+ return
+ end
+ global.get $~lib/math/NativeMath.PI
+ f64.neg
+ return
+ end
+ end
+ local.get $3
+ local.get $4
+ i32.or
+ i32.const 0
+ i32.eq
+ if
+ local.get $7
+ i32.const 1
+ i32.and
+ if (result f64)
+ global.get $~lib/math/NativeMath.PI
+ f64.neg
+ f64.const 2
+ f64.div
+ else
+ global.get $~lib/math/NativeMath.PI
+ f64.const 2
+ f64.div
+ end
+ return
+ end
+ local.get $3
+ i32.const 2146435072
+ i32.eq
+ if
+ local.get $5
+ i32.const 2146435072
+ i32.eq
+ if
+ local.get $7
+ i32.const 2
+ i32.and
+ if (result f64)
+ i32.const 3
+ f64.convert_i32_s
+ global.get $~lib/math/NativeMath.PI
+ f64.mul
+ f64.const 4
+ f64.div
+ else
+ global.get $~lib/math/NativeMath.PI
+ f64.const 4
+ f64.div
+ end
+ local.set $9
+ local.get $7
+ i32.const 1
+ i32.and
+ if (result f64)
+ local.get $9
+ f64.neg
+ else
+ local.get $9
+ end
+ return
+ else
+ local.get $7
+ i32.const 2
+ i32.and
+ if (result f64)
+ global.get $~lib/math/NativeMath.PI
+ else
+ f64.const 0
+ end
+ local.set $9
+ local.get $7
+ i32.const 1
+ i32.and
+ if (result f64)
+ local.get $9
+ f64.neg
+ else
+ local.get $9
+ end
+ return
+ end
+ unreachable
+ end
+ local.get $3
+ i32.const 64
+ i32.const 20
+ i32.shl
+ i32.add
+ local.get $5
+ i32.lt_u
+ if (result i32)
+ i32.const 1
+ else
+ local.get $5
+ i32.const 2146435072
+ i32.eq
+ end
+ if
+ local.get $7
+ i32.const 1
+ i32.and
+ if (result f64)
+ global.get $~lib/math/NativeMath.PI
+ f64.neg
+ f64.const 2
+ f64.div
+ else
+ global.get $~lib/math/NativeMath.PI
+ f64.const 2
+ f64.div
+ end
+ return
+ end
+ local.get $7
+ i32.const 2
+ i32.and
+ if (result i32)
+ local.get $5
+ i32.const 64
+ i32.const 20
+ i32.shl
+ i32.add
+ local.get $3
+ i32.lt_u
+ else
+ i32.const 0
+ end
+ if
+ f64.const 0
+ local.set $10
+ else
+ local.get $0
+ local.get $1
+ f64.div
+ f64.abs
+ call $~lib/math/NativeMath.atan
+ local.set $10
+ end
+ block $break|1
+ block $case3|1
+ block $case2|1
+ block $case1|1
+ block $case0|1
+ local.get $7
+ local.set $8
+ local.get $8
+ i32.const 0
+ i32.eq
+ br_if $case0|1
+ local.get $8
+ i32.const 1
+ i32.eq
+ br_if $case1|1
+ local.get $8
+ i32.const 2
+ i32.eq
+ br_if $case2|1
+ local.get $8
+ i32.const 3
+ i32.eq
+ br_if $case3|1
+ br $break|1
+ end
+ local.get $10
+ return
+ end
+ local.get $10
+ f64.neg
+ return
+ end
+ global.get $~lib/math/NativeMath.PI
+ local.get $10
+ f64.const 1.2246467991473532e-16
+ f64.sub
+ f64.sub
+ return
+ end
+ local.get $10
+ f64.const 1.2246467991473532e-16
+ f64.sub
+ global.get $~lib/math/NativeMath.PI
+ f64.sub
+ return
+ end
+ unreachable
+ )
+ (func $~lib/math/NativeMath.log (param $0 f64) (result f64)
+ (local $1 f64)
+ (local $2 i64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 i32)
+ (local $13 i64)
+ (local $14 i32)
+ (local $15 i64)
+ (local $16 i64)
+ (local $17 f64)
+ (local $18 f64)
+ i32.const 0
+ i32.const 1
+ i32.lt_s
+ drop
+ block $~lib/util/math/log_lut|inlined.0 (result f64)
+ local.get $0
+ local.set $1
+ local.get $1
+ i64.reinterpret_f64
+ local.set $2
+ local.get $2
+ i64.const 4606619468846596096
+ i64.sub
+ i64.const 4607473789381378048
+ i64.const 4606619468846596096
+ i64.sub
+ i64.lt_u
+ if
+ local.get $1
+ f64.const 1
+ f64.sub
+ local.set $3
+ local.get $3
+ local.get $3
+ f64.mul
+ local.set $4
+ local.get $4
+ local.get $3
+ f64.mul
+ local.set $5
+ local.get $5
+ f64.const 0.3333333333333352
+ local.get $3
+ f64.const -0.24999999999998432
+ f64.mul
+ f64.add
+ local.get $4
+ f64.const 0.19999999999320328
+ f64.mul
+ f64.add
+ local.get $5
+ f64.const -0.16666666669929706
+ local.get $3
+ f64.const 0.14285715076560868
+ f64.mul
+ f64.add
+ local.get $4
+ f64.const -0.12499997863982555
+ f64.mul
+ f64.add
+ local.get $5
+ f64.const 0.11110712032936046
+ local.get $3
+ f64.const -0.10000486757818193
+ f64.mul
+ f64.add
+ local.get $4
+ f64.const 0.09181994006195467
+ f64.mul
+ f64.add
+ local.get $5
+ f64.const -0.08328363062289341
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ local.set $6
+ local.get $3
+ f64.const 134217728
+ f64.mul
+ local.set $7
+ local.get $3
+ local.get $7
+ f64.add
+ local.get $7
+ f64.sub
+ local.set $8
+ local.get $3
+ local.get $8
+ f64.sub
+ local.set $9
+ local.get $8
+ local.get $8
+ f64.mul
+ f64.const -0.5
+ f64.mul
+ local.set $7
+ local.get $3
+ local.get $7
+ f64.add
+ local.set $10
+ local.get $3
+ local.get $10
+ f64.sub
+ local.get $7
+ f64.add
+ local.set $11
+ local.get $11
+ f64.const -0.5
+ local.get $9
+ f64.mul
+ local.get $8
+ local.get $3
+ f64.add
+ f64.mul
+ f64.add
+ local.set $11
+ local.get $6
+ local.get $11
+ f64.add
+ local.get $10
+ f64.add
+ br $~lib/util/math/log_lut|inlined.0
+ end
+ local.get $2
+ i64.const 48
+ i64.shr_u
+ i32.wrap_i64
+ local.set $12
+ local.get $12
+ i32.const 16
+ i32.sub
+ i32.const 32752
+ i32.const 16
+ i32.sub
+ i32.ge_u
+ if
+ local.get $2
+ i64.const 1
+ i64.shl
+ i64.const 0
+ i64.eq
+ if
+ f64.const -1
+ local.get $1
+ local.get $1
+ f64.mul
+ f64.div
+ br $~lib/util/math/log_lut|inlined.0
+ end
+ local.get $2
+ f64.const inf
+ i64.reinterpret_f64
+ i64.eq
+ if
+ local.get $1
+ br $~lib/util/math/log_lut|inlined.0
+ end
+ local.get $12
+ i32.const 32768
+ i32.and
+ if (result i32)
+ i32.const 1
+ else
+ local.get $12
+ i32.const 32752
+ i32.and
+ i32.const 32752
+ i32.eq
+ end
+ if
+ local.get $1
+ local.get $1
+ f64.sub
+ local.get $1
+ local.get $1
+ f64.sub
+ f64.div
+ br $~lib/util/math/log_lut|inlined.0
+ end
+ local.get $1
+ f64.const 4503599627370496
+ f64.mul
+ i64.reinterpret_f64
+ local.set $2
+ local.get $2
+ i64.const 52
+ i64.const 52
+ i64.shl
+ i64.sub
+ local.set $2
+ end
+ local.get $2
+ i64.const 4604367669032910848
+ i64.sub
+ local.set $13
+ local.get $13
+ i64.const 52
+ i64.const 7
+ i64.sub
+ i64.shr_u
+ i64.const 127
+ i64.and
+ i32.wrap_i64
+ local.set $14
+ local.get $13
+ i64.const 52
+ i64.shr_s
+ local.set $15
+ local.get $2
+ local.get $13
+ i64.const 4095
+ i64.const 52
+ i64.shl
+ i64.and
+ i64.sub
+ local.set $16
+ i32.const 6544
+ local.get $14
+ i32.const 1
+ i32.const 3
+ i32.add
+ i32.shl
+ i32.add
+ f64.load
+ local.set $11
+ i32.const 6544
+ local.get $14
+ i32.const 1
+ i32.const 3
+ i32.add
+ i32.shl
+ i32.add
+ f64.load offset=8
+ local.set $10
+ local.get $16
+ f64.reinterpret_i64
+ local.set $9
+ i32.const 8592
+ local.get $14
+ i32.const 1
+ i32.const 3
+ i32.add
+ i32.shl
+ i32.add
+ f64.load
+ local.set $8
+ i32.const 8592
+ local.get $14
+ i32.const 1
+ i32.const 3
+ i32.add
+ i32.shl
+ i32.add
+ f64.load offset=8
+ local.set $7
+ local.get $9
+ local.get $8
+ f64.sub
+ local.get $7
+ f64.sub
+ local.get $11
+ f64.mul
+ local.set $6
+ local.get $15
+ f64.convert_i64_s
+ local.set $5
+ local.get $5
+ f64.const 0.6931471805598903
+ f64.mul
+ local.get $10
+ f64.add
+ local.set $4
+ local.get $4
+ local.get $6
+ f64.add
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.sub
+ local.get $6
+ f64.add
+ local.get $5
+ f64.const 5.497923018708371e-14
+ f64.mul
+ f64.add
+ local.set $17
+ local.get $6
+ local.get $6
+ f64.mul
+ local.set $18
+ local.get $17
+ local.get $18
+ f64.const -0.5000000000000001
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $18
+ f64.mul
+ f64.const 0.33333333331825593
+ local.get $6
+ f64.const -0.2499999999622955
+ f64.mul
+ f64.add
+ local.get $18
+ f64.const 0.20000304511814496
+ local.get $6
+ f64.const -0.16667054827627667
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ f64.mul
+ f64.add
+ local.get $3
+ f64.add
+ end
+ return
+ )
+ (func $assembly/quat/ln (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.set $6
+ local.get $6
+ f64.sqrt
+ local.set $6
+ local.get $6
+ f64.const 0
+ f64.gt
+ if (result f64)
+ local.get $6
+ local.get $5
+ call $~lib/math/NativeMath.atan2
+ local.get $6
+ f64.div
+ else
+ f64.const 0
+ end
+ local.set $7
+ local.get $0
+ i32.const 0
+ local.get $2
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0.5
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $5
+ f64.mul
+ f64.add
+ call $~lib/math/NativeMath.log
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/pow (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ local.get $0
+ local.get $1
+ call $assembly/quat/ln
+ drop
+ local.get $0
+ local.get $0
+ local.get $2
+ i32.const 3
+ global.set $~argumentsLength
+ global.get $assembly/quat/scale
+ i32.load
+ call_indirect $0 (type $i32_i32_f64_=>_i32)
+ drop
+ local.get $0
+ local.get $0
+ call $assembly/quat/exp
+ drop
+ local.get $0
+ )
+ (func $assembly/quat/random (param $0 i32) (result i32)
+ (local $1 f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.set $1
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.set $2
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ local.set $3
+ f64.const 1
+ local.get $1
+ f64.sub
+ local.set $4
+ local.get $4
+ f64.sqrt
+ local.set $4
+ local.get $1
+ local.set $5
+ local.get $5
+ f64.sqrt
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $4
+ f64.const 2
+ global.get $~lib/math/NativeMath.PI
+ f64.mul
+ local.get $2
+ f64.mul
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ f64.const 2
+ global.get $~lib/math/NativeMath.PI
+ f64.mul
+ local.get $2
+ f64.mul
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ f64.const 2
+ global.get $~lib/math/NativeMath.PI
+ f64.mul
+ local.get $3
+ f64.mul
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $5
+ f64.const 2
+ global.get $~lib/math/NativeMath.PI
+ f64.mul
+ local.get $3
+ f64.mul
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/invert (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.set $6
+ local.get $6
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ if (result f64)
+ f64.const 1
+ local.get $6
+ f64.div
+ else
+ f64.const 0
+ end
+ local.set $7
+ local.get $0
+ i32.const 0
+ local.get $2
+ f64.neg
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ f64.neg
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ f64.neg
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $5
+ local.get $7
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/conjugate (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $0
+ local.get $1
+ call $assembly/vec4/dot
+ local.set $2
+ local.get $2
+ f64.abs
+ f64.const 1
+ global.get $assembly/common/EPSILON
+ f64.sub
+ f64.ge
+ )
+ (func $assembly/quat2/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ local.set $5
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 0
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $5
+ local.get $9
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $3
+ f64.neg
+ local.get $6
+ f64.mul
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/fromTranslation (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/fromRotation (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/copy (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/identity (param $0 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/getDual (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/setDual (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/getTranslation (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $0
+ i32.const 0
+ local.get $2
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ f64.const 2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $2
+ local.get $8
+ f64.mul
+ f64.sub
+ f64.const 2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $2
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $6
+ f64.mul
+ f64.sub
+ f64.const 2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ local.set $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ local.set $8
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.const 0.5
+ f64.mul
+ local.set $9
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $0
+ i32.const 0
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $6
+ local.get $7
+ f64.mul
+ local.get $4
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $10
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $9
+ f64.mul
+ f64.sub
+ local.get $11
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $12
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $3
+ f64.neg
+ local.get $7
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.sub
+ local.get $13
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $7
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.sub
+ local.set $11
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.sub
+ local.set $12
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ local.set $13
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.sub
+ local.set $14
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/rotateX
+ drop
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 4
+ local.get $11
+ local.get $6
+ f64.mul
+ local.get $14
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $12
+ local.get $6
+ f64.mul
+ local.get $14
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $13
+ local.get $6
+ f64.mul
+ local.get $14
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $14
+ local.get $6
+ f64.mul
+ local.get $11
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $12
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $7
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.sub
+ local.set $11
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.sub
+ local.set $12
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ local.set $13
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.sub
+ local.set $14
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/rotateY
+ drop
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 4
+ local.get $11
+ local.get $6
+ f64.mul
+ local.get $14
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $12
+ local.get $6
+ f64.mul
+ local.get $14
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $13
+ local.get $6
+ f64.mul
+ local.get $14
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $14
+ local.get $6
+ f64.mul
+ local.get $11
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $12
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $7
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.sub
+ local.set $11
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.sub
+ local.set $12
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ local.set $13
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.sub
+ local.set $14
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/rotateZ
+ drop
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 4
+ local.get $11
+ local.get $6
+ f64.mul
+ local.get $14
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $12
+ local.get $6
+ f64.mul
+ local.get $14
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $13
+ local.get $6
+ f64.mul
+ local.get $14
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $14
+ local.get $6
+ f64.mul
+ local.get $11
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $12
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/rotateByQuatAppend (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $7
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 4
+ local.get $7
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $10
+ local.get $6
+ f64.mul
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $9
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/rotateByQuatPrepend (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ local.get $10
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $0
+ i32.const 4
+ local.get $3
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $4
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $5
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $3
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $6
+ local.get $10
+ f64.mul
+ local.get $3
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/rotateAroundAxis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ local.get $3
+ local.set $4
+ local.get $4
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.lt
+ if
+ local.get $0
+ local.get $1
+ call $assembly/quat2/copy
+ return
+ end
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $assembly/maths/Maths.hypot3
+ local.set $4
+ local.get $3
+ f64.const 0.5
+ f64.mul
+ local.set $3
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ local.set $5
+ local.get $5
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $4
+ f64.div
+ local.set $6
+ local.get $5
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $4
+ f64.div
+ local.set $7
+ local.get $5
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $4
+ f64.div
+ local.set $8
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ local.set $9
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $0
+ i32.const 0
+ local.get $10
+ local.get $9
+ f64.mul
+ local.get $13
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $11
+ local.get $9
+ f64.mul
+ local.get $13
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ local.get $9
+ f64.mul
+ local.get $13
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $6
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $13
+ local.get $9
+ f64.mul
+ local.get $10
+ local.get $6
+ f64.mul
+ f64.sub
+ local.get $11
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $12
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $0
+ i32.const 4
+ local.get $14
+ local.get $9
+ f64.mul
+ local.get $17
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $15
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $7
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $15
+ local.get $9
+ f64.mul
+ local.get $17
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $16
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $16
+ local.get $9
+ f64.mul
+ local.get $17
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $14
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $15
+ local.get $6
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $17
+ local.get $9
+ f64.mul
+ local.get $14
+ local.get $6
+ f64.mul
+ f64.sub
+ local.get $15
+ local.get $7
+ f64.mul
+ f64.sub
+ local.get $16
+ local.get $8
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ i32.const 1
+ f64.convert_i32_s
+ local.get $3
+ f64.sub
+ local.set $4
+ local.get $1
+ local.get $2
+ i32.const 2
+ global.set $~argumentsLength
+ global.get $assembly/quat2/dot
+ i32.load
+ call_indirect $0 (type $i32_i32_=>_f64)
+ f64.const 0
+ f64.lt
+ if
+ local.get $3
+ f64.neg
+ local.set $3
+ end
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/invert (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $1
+ i32.const 1
+ global.set $~argumentsLength
+ global.get $assembly/quat2/squaredLength
+ i32.load
+ call_indirect $0 (type $i32_=>_f64)
+ local.set $2
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/conjugate (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/quat2/normalize (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ local.get $1
+ i32.const 1
+ global.set $~argumentsLength
+ global.get $assembly/quat2/squaredLength
+ i32.load
+ call_indirect $0 (type $i32_=>_f64)
+ local.set $2
+ local.get $2
+ f64.const 0
+ f64.gt
+ if
+ local.get $2
+ local.set $3
+ local.get $3
+ f64.sqrt
+ local.set $2
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.div
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $3
+ local.get $7
+ f64.mul
+ local.get $4
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $10
+ f64.mul
+ f64.add
+ local.set $11
+ local.get $0
+ i32.const 0
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ local.get $7
+ local.get $3
+ local.get $11
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ local.get $8
+ local.get $4
+ local.get $11
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ local.get $9
+ local.get $5
+ local.get $11
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ local.get $10
+ local.get $6
+ local.get $11
+ f64.mul
+ f64.sub
+ local.get $2
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ )
+ (func $assembly/quat2/exactEquals (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/quat2/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $14
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $15
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $16
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $17
+ local.get $2
+ local.get $10
+ f64.sub
+ local.set $18
+ local.get $18
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $2
+ local.set $18
+ local.get $18
+ f64.abs
+ local.get $10
+ local.set $18
+ local.get $18
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $11
+ f64.sub
+ local.set $18
+ local.get $18
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $3
+ local.set $18
+ local.get $18
+ f64.abs
+ local.get $11
+ local.set $18
+ local.get $18
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $12
+ f64.sub
+ local.set $18
+ local.get $18
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $4
+ local.set $18
+ local.get $18
+ f64.abs
+ local.get $12
+ local.set $18
+ local.get $18
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $5
+ local.get $13
+ f64.sub
+ local.set $18
+ local.get $18
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $5
+ local.set $18
+ local.get $18
+ f64.abs
+ local.get $13
+ local.set $18
+ local.get $18
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $6
+ local.get $14
+ f64.sub
+ local.set $18
+ local.get $18
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $6
+ local.set $18
+ local.get $18
+ f64.abs
+ local.get $14
+ local.set $18
+ local.get $18
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $7
+ local.get $15
+ f64.sub
+ local.set $18
+ local.get $18
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $7
+ local.set $18
+ local.get $18
+ f64.abs
+ local.get $15
+ local.set $18
+ local.get $18
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $8
+ local.get $16
+ f64.sub
+ local.set $18
+ local.get $18
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $8
+ local.set $18
+ local.get $18
+ f64.abs
+ local.get $16
+ local.set $18
+ local.get $18
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $9
+ local.get $17
+ f64.sub
+ local.set $18
+ local.get $18
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $9
+ local.set $18
+ local.get $18
+ f64.abs
+ local.get $17
+ local.set $18
+ local.get $18
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/vec2/copy (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/set (param $0 i32) (param $1 f64) (param $2 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/ceil (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/floor (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/round (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/negate (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/inverse (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/normalize (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.set $4
+ local.get $4
+ f64.const 0
+ f64.gt
+ if
+ f64.const 1
+ local.get $4
+ local.set $5
+ local.get $5
+ f64.sqrt
+ f64.div
+ local.set $4
+ end
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/dot (param $0 i32) (param $1 i32) (result f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ )
+ (func $assembly/vec2/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 i32)
+ (local $5 i32)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $3
+ local.get $0
+ i32.const 0
+ local.get $0
+ local.tee $4
+ i32.const 1
+ local.tee $5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ local.get $5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $3
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/random (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ local.get $1
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ if (result f64)
+ local.get $1
+ else
+ f64.const 1
+ end
+ local.set $1
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ f64.const 2
+ f64.mul
+ global.get $~lib/math/NativeMath.PI
+ f64.mul
+ local.set $2
+ local.get $0
+ i32.const 0
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.get $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.get $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/transformMat2 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/transformMat2d (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/rotate (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ local.set $5
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ local.set $6
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ local.set $7
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $7
+ f64.mul
+ local.get $5
+ local.get $6
+ f64.mul
+ f64.sub
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $4
+ local.get $6
+ f64.mul
+ local.get $5
+ local.get $7
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/angle (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.set $6
+ local.get $6
+ f64.sqrt
+ local.get $4
+ local.get $4
+ f64.mul
+ local.get $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.set $6
+ local.get $6
+ f64.sqrt
+ f64.mul
+ local.set $6
+ local.get $6
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ if (result f64)
+ local.get $2
+ local.get $4
+ f64.mul
+ local.get $3
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $6
+ f64.div
+ else
+ local.get $6
+ end
+ local.set $7
+ local.get $7
+ local.set $9
+ f64.const -1
+ local.set $8
+ local.get $9
+ local.get $8
+ f64.max
+ local.set $9
+ f64.const 1
+ local.set $8
+ local.get $9
+ local.get $8
+ f64.min
+ call $~lib/math/NativeMath.acos
+ )
+ (func $assembly/vec2/zero (param $0 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec2/exactEquals (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/vec2/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ local.get $4
+ f64.sub
+ local.set $6
+ local.get $6
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $2
+ local.set $6
+ local.get $6
+ f64.abs
+ local.get $4
+ local.set $6
+ local.get $6
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $5
+ f64.sub
+ local.set $6
+ local.get $6
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $3
+ local.set $6
+ local.get $6
+ f64.abs
+ local.get $5
+ local.set $6
+ local.get $6
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/vec3/copy (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/ceil (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/floor (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/round (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/scale (param $0 i32) (param $1 i32) (param $2 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/negate (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/inverse (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 1
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 0
+ local.get $4
+ local.get $3
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $5
+ local.get $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $3
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.sub
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ local.get $1
+ local.get $2
+ call $assembly/vec3/dot
+ local.set $5
+ f64.const -1
+ local.set $4
+ local.get $5
+ local.get $4
+ f64.max
+ local.set $5
+ f64.const 1
+ local.set $4
+ local.get $5
+ local.get $4
+ f64.min
+ call $~lib/math/NativeMath.acos
+ local.set $5
+ local.get $5
+ call $~lib/math/NativeMath.sin
+ local.set $4
+ f64.const 1
+ local.get $3
+ f64.sub
+ local.get $5
+ f64.mul
+ call $~lib/math/NativeMath.sin
+ local.get $4
+ f64.div
+ local.set $6
+ local.get $3
+ local.get $5
+ f64.mul
+ call $~lib/math/NativeMath.sin
+ local.get $4
+ f64.div
+ local.set $7
+ local.get $0
+ i32.const 0
+ local.get $6
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $7
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $7
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/hermite (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $5
+ local.get $5
+ f64.mul
+ local.set $6
+ local.get $6
+ f64.const 2
+ local.get $5
+ f64.mul
+ f64.const 3
+ f64.sub
+ f64.mul
+ f64.const 1
+ f64.add
+ local.set $7
+ local.get $6
+ local.get $5
+ f64.const 2
+ f64.sub
+ f64.mul
+ local.get $5
+ f64.add
+ local.set $8
+ local.get $6
+ local.get $5
+ f64.const 1
+ f64.sub
+ f64.mul
+ local.set $9
+ local.get $6
+ f64.const 3
+ f64.const 2
+ local.get $5
+ f64.mul
+ f64.sub
+ f64.mul
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $7
+ f64.mul
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $4
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $7
+ f64.mul
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $4
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $7
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $8
+ f64.mul
+ f64.add
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $9
+ f64.mul
+ f64.add
+ local.get $4
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/bezier (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ i32.const 1
+ f64.convert_i32_s
+ local.get $5
+ f64.sub
+ local.set $6
+ local.get $6
+ local.get $6
+ f64.mul
+ local.set $7
+ local.get $5
+ local.get $5
+ f64.mul
+ local.set $8
+ local.get $7
+ local.get $6
+ f64.mul
+ local.set $9
+ i32.const 3
+ f64.convert_i32_s
+ local.get $5
+ f64.mul
+ local.get $7
+ f64.mul
+ local.set $10
+ i32.const 3
+ f64.convert_i32_s
+ local.get $8
+ f64.mul
+ local.get $6
+ f64.mul
+ local.set $11
+ local.get $8
+ local.get $5
+ f64.mul
+ local.set $12
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $9
+ f64.mul
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $4
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $12
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $9
+ f64.mul
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $4
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $12
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $9
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $10
+ f64.mul
+ f64.add
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $11
+ f64.mul
+ f64.add
+ local.get $4
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $12
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/random (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $1
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ if (result f64)
+ local.get $1
+ else
+ f64.const 1
+ end
+ local.set $1
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ f64.const 2
+ f64.mul
+ global.get $~lib/math/NativeMath.PI
+ f64.mul
+ local.set $2
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ f64.const 2
+ f64.mul
+ f64.const 1
+ f64.sub
+ local.set $3
+ f64.const 1
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.sub
+ local.set $4
+ local.get $4
+ f64.sqrt
+ local.get $1
+ f64.mul
+ local.set $4
+ local.get $0
+ i32.const 0
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.get $4
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $1
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.set $6
+ local.get $6
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ if (result f64)
+ local.get $6
+ else
+ f64.const 1
+ end
+ local.set $6
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.get $6
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.get $6
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ local.get $6
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $0
+ i32.const 0
+ local.get $3
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $4
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $4
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $3
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $4
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $4
+ local.get $9
+ f64.mul
+ local.get $5
+ local.get $8
+ f64.mul
+ f64.sub
+ local.set $10
+ local.get $5
+ local.get $7
+ f64.mul
+ local.get $3
+ local.get $9
+ f64.mul
+ f64.sub
+ local.set $11
+ local.get $3
+ local.get $8
+ f64.mul
+ local.get $4
+ local.get $7
+ f64.mul
+ f64.sub
+ local.set $12
+ local.get $4
+ local.get $12
+ f64.mul
+ local.get $5
+ local.get $11
+ f64.mul
+ f64.sub
+ local.set $13
+ local.get $5
+ local.get $10
+ f64.mul
+ local.get $3
+ local.get $12
+ f64.mul
+ f64.sub
+ local.set $14
+ local.get $3
+ local.get $11
+ f64.mul
+ local.get $4
+ local.get $10
+ f64.mul
+ f64.sub
+ local.set $15
+ local.get $6
+ f64.const 2
+ f64.mul
+ local.set $16
+ local.get $10
+ local.get $16
+ f64.mul
+ local.set $10
+ local.get $11
+ local.get $16
+ f64.mul
+ local.set $11
+ local.get $12
+ local.get $16
+ f64.mul
+ local.set $12
+ local.get $13
+ f64.const 2
+ f64.mul
+ local.set $13
+ local.get $14
+ f64.const 2
+ f64.mul
+ local.set $14
+ local.get $15
+ f64.const 2
+ f64.mul
+ local.set $15
+ local.get $0
+ i32.const 0
+ local.get $7
+ local.get $10
+ f64.add
+ local.get $13
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $8
+ local.get $11
+ f64.add
+ local.get $14
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $9
+ local.get $12
+ f64.add
+ local.get $15
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (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
+ i32.load
+ 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
+ i32.load offset=12
+ call $~lib/rt/itcms/__new
+ local.set $3
+ local.get $3
+ local.get $0
+ local.get $1
+ local.tee $4
+ local.get $2
+ i32.load offset=16
+ local.tee $5
+ local.get $4
+ local.get $5
+ i32.lt_u
+ select
+ call $~lib/memory/memory.copy
+ local.get $3
+ )
+ (func $~lib/array/ensureSize (param $0 i32) (param $1 i32) (param $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ local.get $0
+ i32.load offset=8
+ local.set $3
+ local.get $1
+ local.get $3
+ 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 592
+ i32.const 11120
+ i32.const 14
+ i32.const 48
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ i32.load
+ local.set $4
+ local.get $1
+ local.get $2
+ i32.shl
+ local.set $5
+ local.get $4
+ local.get $5
+ call $~lib/rt/itcms/__renew
+ local.set $6
+ local.get $6
+ local.get $3
+ i32.add
+ i32.const 0
+ local.get $5
+ local.get $3
+ i32.sub
+ call $~lib/memory/memory.fill
+ local.get $6
+ local.get $4
+ i32.ne
+ if
+ local.get $0
+ local.get $6
+ i32.store
+ local.get $0
+ local.get $6
+ i32.store offset=4
+ local.get $0
+ local.get $6
+ i32.const 0
+ call $~lib/rt/itcms/__link
+ end
+ local.get $0
+ local.get $5
+ i32.store offset=8
+ end
+ )
+ (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#__uset (param $0 i32) (param $1 i32) (param $2 f64)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ i32.const 3
+ i32.shl
+ i32.add
+ local.get $2
+ f64.store
+ i32.const 0
+ drop
+ )
+ (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64)
+ local.get $1
+ local.get $0
+ i32.load offset=12
+ i32.ge_u
+ if
+ local.get $1
+ i32.const 0
+ i32.lt_s
+ if
+ i32.const 144
+ i32.const 11120
+ i32.const 108
+ i32.const 22
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ local.get $1
+ i32.const 1
+ i32.add
+ i32.const 3
+ call $~lib/array/ensureSize
+ local.get $0
+ local.get $1
+ i32.const 1
+ i32.add
+ call $~lib/array/Array#set:length_
+ end
+ local.get $0
+ local.get $1
+ local.get $2
+ call $~lib/array/Array#__uset
+ )
+ (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ local.get $1
+ local.get $0
+ i32.load offset=12
+ i32.ge_u
+ if
+ i32.const 144
+ i32.const 11120
+ i32.const 92
+ i32.const 42
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ i32.const 3
+ i32.shl
+ i32.add
+ f64.load
+ local.set $2
+ i32.const 0
+ drop
+ local.get $2
+ )
+ (func $assembly/vec3/angle (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.set $8
+ local.get $8
+ f64.sqrt
+ local.set $8
+ local.get $5
+ local.get $5
+ f64.mul
+ local.get $6
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $7
+ f64.mul
+ f64.add
+ local.set $9
+ local.get $9
+ f64.sqrt
+ local.set $9
+ local.get $8
+ local.get $9
+ f64.mul
+ local.set $10
+ local.get $10
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ if (result f64)
+ local.get $0
+ local.get $1
+ call $assembly/vec3/dot
+ local.get $10
+ f64.div
+ else
+ local.get $10
+ end
+ local.set $11
+ local.get $11
+ local.set $13
+ f64.const -1
+ local.set $12
+ local.get $13
+ local.get $12
+ f64.max
+ local.set $13
+ f64.const 1
+ local.set $12
+ local.get $13
+ local.get $12
+ f64.min
+ call $~lib/math/NativeMath.acos
+ )
+ (func $assembly/vec3/zero (param $0 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec3/exactEquals (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ if (result i32)
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.eq
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/vec3/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ local.get $5
+ f64.sub
+ local.set $8
+ local.get $8
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $2
+ local.set $8
+ local.get $8
+ f64.abs
+ local.get $5
+ local.set $8
+ local.get $8
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $6
+ f64.sub
+ local.set $8
+ local.get $8
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $3
+ local.set $8
+ local.get $8
+ f64.abs
+ local.get $6
+ local.set $8
+ local.get $8
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $7
+ f64.sub
+ local.set $8
+ local.get $8
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $4
+ local.set $8
+ local.get $8
+ f64.abs
+ local.get $7
+ local.set $8
+ local.get $8
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $assembly/vec4/ceil (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.ceil
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/floor (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.floor
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.min
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $4
+ local.get $3
+ f64.max
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/round (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $2
+ f64.const 0.5
+ f64.add
+ f64.floor
+ local.get $2
+ f64.copysign
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/negate (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/inverse (param $0 i32) (param $1 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 1
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 1
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/cross (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $4
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $5
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $6
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $7
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $8
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ local.set $9
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $11
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $12
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $13
+ local.get $0
+ i32.const 0
+ local.get $11
+ local.get $9
+ f64.mul
+ local.get $12
+ local.get $8
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $7
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $10
+ local.get $9
+ f64.mul
+ f64.neg
+ local.get $12
+ local.get $6
+ f64.mul
+ f64.add
+ local.get $13
+ local.get $5
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $10
+ local.get $8
+ f64.mul
+ local.get $11
+ local.get $6
+ f64.mul
+ f64.sub
+ local.get $13
+ local.get $4
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $10
+ local.get $7
+ f64.mul
+ f64.neg
+ local.get $11
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $4
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/random (param $0 i32) (param $1 f64) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 i32)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $1
+ i64.reinterpret_f64
+ i64.const 1
+ i64.shl
+ i64.const 2
+ i64.sub
+ i64.const -9007199254740994
+ i64.le_u
+ if (result f64)
+ local.get $1
+ else
+ f64.const 1
+ end
+ local.set $1
+ loop $do-continue|0
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ f64.const 2
+ f64.mul
+ f64.const 1
+ f64.sub
+ local.set $2
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ f64.const 2
+ f64.mul
+ f64.const 1
+ f64.sub
+ local.set $3
+ local.get $2
+ local.get $2
+ f64.mul
+ local.get $3
+ local.get $3
+ f64.mul
+ f64.add
+ local.set $6
+ local.get $6
+ f64.const 1
+ f64.ge
+ local.set $8
+ local.get $8
+ br_if $do-continue|0
+ end
+ loop $do-continue|1
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ f64.const 2
+ f64.mul
+ f64.const 1
+ f64.sub
+ local.set $4
+ i32.const 0
+ global.set $~argumentsLength
+ global.get $assembly/common/RANDOM
+ i32.load
+ call_indirect $0 (type $none_=>_f64)
+ f64.const 2
+ f64.mul
+ f64.const 1
+ f64.sub
+ local.set $5
+ local.get $4
+ local.get $4
+ f64.mul
+ local.get $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.set $7
+ local.get $7
+ f64.const 1
+ f64.ge
+ local.set $8
+ local.get $8
+ br_if $do-continue|1
+ end
+ f64.const 1
+ local.get $6
+ f64.sub
+ local.get $7
+ f64.div
+ local.set $9
+ local.get $9
+ f64.sqrt
+ local.set $10
+ local.get $0
+ i32.const 0
+ local.get $1
+ local.get $2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $1
+ local.get $3
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $1
+ local.get $4
+ f64.mul
+ local.get $10
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ local.get $5
+ f64.mul
+ local.get $10
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $0
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.get $2
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $2
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ local.get $6
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $2
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $9
+ local.get $3
+ f64.mul
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $4
+ f64.mul
+ f64.sub
+ local.set $10
+ local.get $9
+ local.get $4
+ f64.mul
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $5
+ f64.mul
+ f64.sub
+ local.set $11
+ local.get $9
+ local.get $5
+ f64.mul
+ local.get $6
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $3
+ f64.mul
+ f64.sub
+ local.set $12
+ local.get $6
+ f64.neg
+ local.get $3
+ f64.mul
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.sub
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.sub
+ local.set $13
+ local.get $0
+ i32.const 0
+ local.get $10
+ local.get $9
+ f64.mul
+ local.get $13
+ local.get $6
+ f64.neg
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $8
+ f64.neg
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $7
+ f64.neg
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $11
+ local.get $9
+ f64.mul
+ local.get $13
+ local.get $7
+ f64.neg
+ f64.mul
+ f64.add
+ local.get $12
+ local.get $6
+ f64.neg
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $8
+ f64.neg
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ local.get $9
+ f64.mul
+ local.get $13
+ local.get $8
+ f64.neg
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $7
+ f64.neg
+ f64.mul
+ f64.add
+ local.get $11
+ local.get $6
+ f64.neg
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/zero (param $0 i32) (result i32)
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ )
+ (func $assembly/vec4/equals (param $0 i32) (param $1 i32) (result i32)
+ (local $2 f64)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $2
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $3
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $4
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $5
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $2
+ local.get $6
+ f64.sub
+ local.set $10
+ local.get $10
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $2
+ local.set $10
+ local.get $10
+ f64.abs
+ local.get $6
+ local.set $10
+ local.get $10
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ if (result i32)
+ local.get $3
+ local.get $7
+ f64.sub
+ local.set $10
+ local.get $10
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $3
+ local.set $10
+ local.get $10
+ f64.abs
+ local.get $7
+ local.set $10
+ local.get $10
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $4
+ local.get $8
+ f64.sub
+ local.set $10
+ local.get $10
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $4
+ local.set $10
+ local.get $10
+ f64.abs
+ local.get $8
+ local.set $10
+ local.get $10
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ if (result i32)
+ local.get $5
+ local.get $9
+ f64.sub
+ local.set $10
+ local.get $10
+ f64.abs
+ global.get $assembly/common/EPSILON
+ f64.const 1
+ local.get $5
+ local.set $10
+ local.get $10
+ f64.abs
+ local.get $9
+ local.set $10
+ local.get $10
+ f64.abs
+ call $assembly/maths/Maths.max
+ f64.mul
+ f64.le
+ else
+ i32.const 0
+ end
+ )
+ (func $~lib/rt/itcms/__pin (param $0 i32) (result i32)
+ (local $1 i32)
+ local.get $0
+ if
+ local.get $0
+ i32.const 20
+ i32.sub
+ local.set $1
+ local.get $1
+ call $~lib/rt/itcms/Object#get:color
+ i32.const 3
+ i32.eq
+ if
+ i32.const 11360
+ i32.const 768
+ i32.const 337
+ i32.const 7
+ call $~lib/builtins/abort
+ unreachable
+ end
+ local.get $1
+ call $~lib/rt/itcms/Object#unlink
+ local.get $1
+ global.get $~lib/rt/itcms/pinSpace
+ i32.const 3
+ call $~lib/rt/itcms/Object#linkTo
+ end
+ local.get $0
+ )
+ (func $~lib/rt/itcms/__unpin (param $0 i32)
+ (local $1 i32)
+ local.get $0
+ i32.eqz
+ if
+ return
+ end
+ local.get $0
+ i32.const 20
+ i32.sub
+ local.set $1
+ local.get $1
+ call $~lib/rt/itcms/Object#get:color
+ i32.const 3
+ i32.ne
+ if
+ i32.const 11424
+ i32.const 768
+ i32.const 351
+ i32.const 5
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/rt/itcms/state
+ i32.const 1
+ i32.eq
+ if
+ local.get $1
+ call $~lib/rt/itcms/Object#makeGray
+ else
+ local.get $1
+ call $~lib/rt/itcms/Object#unlink
+ local.get $1
+ global.get $~lib/rt/itcms/fromSpace
+ global.get $~lib/rt/itcms/white
+ call $~lib/rt/itcms/Object#linkTo
+ end
+ )
+ (func $~lib/rt/itcms/__collect
+ (local $0 i32)
+ i32.const 0
+ drop
+ global.get $~lib/rt/itcms/state
+ i32.const 0
+ i32.gt_s
+ if
+ loop $while-continue|0
+ global.get $~lib/rt/itcms/state
+ i32.const 0
+ i32.ne
+ local.set $0
+ local.get $0
+ if
+ call $~lib/rt/itcms/step
+ drop
+ br $while-continue|0
+ end
+ end
+ end
+ call $~lib/rt/itcms/step
+ drop
+ loop $while-continue|1
+ global.get $~lib/rt/itcms/state
+ i32.const 0
+ i32.ne
+ local.set $0
+ local.get $0
+ if
+ call $~lib/rt/itcms/step
+ drop
+ br $while-continue|1
+ end
+ end
+ global.get $~lib/rt/itcms/total
+ i64.extend_i32_u
+ i64.const 200
+ i64.mul
+ i64.const 100
+ i64.div_u
+ i32.wrap_i64
+ i32.const 1024
+ i32.add
+ global.set $~lib/rt/itcms/threshold
+ i32.const 0
+ drop
+ i32.const 0
+ if (result i32)
+ i32.const 1
+ else
+ i32.const 0
+ end
+ drop
+ )
+ (func $~lib/rt/__visit_globals (param $0 i32)
+ (local $1 i32)
+ i32.const 144
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ i32.const 592
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ i32.const 704
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ i32.const 11360
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ i32.const 11424
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ global.get $assembly/common/ANGLE_ORDER
+ local.tee $1
+ if
+ local.get $1
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/quat/tmpvec3
+ local.tee $1
+ if
+ local.get $1
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/quat/xUnitVec3
+ local.tee $1
+ if
+ local.get $1
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/quat/yUnitVec3
+ local.tee $1
+ if
+ local.get $1
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/quat/temp1
+ local.tee $1
+ if
+ local.get $1
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/quat/temp2
+ local.tee $1
+ if
+ local.get $1
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/quat/matr
+ local.tee $1
+ if
+ local.get $1
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/vec2/vec
+ local.tee $1
+ if
+ local.get $1
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/vec3/vec
+ local.tee $1
+ if
+ local.get $1
+ local.get $0
+ call $~lib/rt/itcms/__visit
+ end
+ global.get $assembly/vec4/vec
+ 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
+ i32.load
+ local.tee $2
+ if
+ local.get $2
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ end
+ )
+ (func $~lib/typedarray/Int8Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView~visit
+ )
+ (func $~lib/typedarray/Uint8Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView~visit
+ )
+ (func $~lib/typedarray/Int16Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView~visit
+ )
+ (func $~lib/typedarray/Uint16Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView~visit
+ )
+ (func $~lib/typedarray/Int32Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView~visit
+ )
+ (func $~lib/typedarray/Uint32Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView~visit
+ )
+ (func $~lib/typedarray/Float32Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView~visit
+ )
+ (func $~lib/typedarray/Float64Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView~visit
+ )
+ (func $~lib/typedarray/Int64Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView~visit
+ )
+ (func $~lib/typedarray/Uint64Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView~visit
+ )
+ (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32)
+ i32.const 0
+ drop
+ local.get $0
+ i32.load
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/array/Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/array/Array#__visit
+ )
+ (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32)
+ i32.const 0
+ drop
+ local.get $0
+ i32.load
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/array/Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/array/Array#__visit
+ )
+ (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)
+ i32.const 1
+ drop
+ local.get $0
+ i32.load offset=4
+ local.set $2
+ local.get $2
+ local.get $0
+ i32.load offset=12
+ i32.const 2
+ i32.shl
+ i32.add
+ local.set $3
+ loop $while-continue|0
+ local.get $2
+ local.get $3
+ i32.lt_u
+ local.set $4
+ local.get $4
+ if
+ local.get $2
+ i32.load
+ local.set $5
+ local.get $5
+ if
+ local.get $5
+ 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
+ local.get $0
+ i32.load
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/array/Array<~lib/string/String>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/array/Array<~lib/string/String>#__visit
+ )
+ (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32)
+ i32.const 0
+ drop
+ local.get $0
+ i32.load
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/array/Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/array/Array#__visit
+ )
+ (func $~lib/array/Array<~lib/array/Array>#__visit (param $0 i32) (param $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ i32.const 1
+ drop
+ local.get $0
+ i32.load offset=4
+ local.set $2
+ local.get $2
+ local.get $0
+ i32.load offset=12
+ i32.const 2
+ i32.shl
+ i32.add
+ local.set $3
+ loop $while-continue|0
+ local.get $2
+ local.get $3
+ i32.lt_u
+ local.set $4
+ local.get $4
+ if
+ local.get $2
+ i32.load
+ local.set $5
+ local.get $5
+ if
+ local.get $5
+ 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
+ local.get $0
+ i32.load
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/array/Array<~lib/array/Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/array/Array<~lib/array/Array>#__visit
+ )
+ (func $~lib/array/Array<~lib/array/Array>#__visit (param $0 i32) (param $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ i32.const 1
+ drop
+ local.get $0
+ i32.load offset=4
+ local.set $2
+ local.get $2
+ local.get $0
+ i32.load offset=12
+ i32.const 2
+ i32.shl
+ i32.add
+ local.set $3
+ loop $while-continue|0
+ local.get $2
+ local.get $3
+ i32.lt_u
+ local.set $4
+ local.get $4
+ if
+ local.get $2
+ i32.load
+ local.set $5
+ local.get $5
+ if
+ local.get $5
+ 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
+ local.get $0
+ i32.load
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/array/Array<~lib/array/Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/array/Array<~lib/array/Array>#__visit
+ )
+ (func $~lib/array/Array<~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)
+ i32.const 1
+ drop
+ local.get $0
+ i32.load offset=4
+ local.set $2
+ local.get $2
+ local.get $0
+ i32.load offset=12
+ i32.const 2
+ i32.shl
+ i32.add
+ local.set $3
+ loop $while-continue|0
+ local.get $2
+ local.get $3
+ i32.lt_u
+ local.set $4
+ local.get $4
+ if
+ local.get $2
+ i32.load
+ local.set $5
+ local.get $5
+ if
+ local.get $5
+ 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
+ local.get $0
+ i32.load
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/array/Array<~lib/array/Array<~lib/string/String>>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__visit
+ )
+ (func $~lib/array/Array<~lib/array/Array>#__visit (param $0 i32) (param $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ i32.const 1
+ drop
+ local.get $0
+ i32.load offset=4
+ local.set $2
+ local.get $2
+ local.get $0
+ i32.load offset=12
+ i32.const 2
+ i32.shl
+ i32.add
+ local.set $3
+ loop $while-continue|0
+ local.get $2
+ local.get $3
+ i32.lt_u
+ local.set $4
+ local.get $4
+ if
+ local.get $2
+ i32.load
+ local.set $5
+ local.get $5
+ if
+ local.get $5
+ 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
+ local.get $0
+ i32.load
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/array/Array<~lib/array/Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/array/Array<~lib/array/Array>#__visit
+ )
+ (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32)
+ i32.const 0
+ drop
+ local.get $0
+ i32.load
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/array/Array~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/array/Array#__visit
+ )
+ (func $~lib/function/Function<%28%29=>f64>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28%29=>f64>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28%29=>f64>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28f64%2Cf64%29=>f64>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28f64%2Cf64%29=>f64>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28f64%2Cf64%29=>f64>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>#__visit
+ )
+ (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>#__visit
+ )
+ (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ local.get $0
+ i32.load offset=4
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/array/Array<~lib/typedarray/Float64Array>#__visit (param $0 i32) (param $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ (local $4 i32)
+ (local $5 i32)
+ i32.const 1
+ drop
+ local.get $0
+ i32.load offset=4
+ local.set $2
+ local.get $2
+ local.get $0
+ i32.load offset=12
+ i32.const 2
+ i32.shl
+ i32.add
+ local.set $3
+ loop $while-continue|0
+ local.get $2
+ local.get $3
+ i32.lt_u
+ local.set $4
+ local.get $4
+ if
+ local.get $2
+ i32.load
+ local.set $5
+ local.get $5
+ if
+ local.get $5
+ 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
+ local.get $0
+ i32.load
+ local.get $1
+ call $~lib/rt/itcms/__visit
+ )
+ (func $~lib/array/Array<~lib/typedarray/Float64Array>~visit (param $0 i32) (param $1 i32)
+ local.get $0
+ local.get $1
+ call $~lib/array/Array<~lib/typedarray/Float64Array>#__visit
+ )
+ (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32)
+ block $invalid
+ block $assembly/mat4/Fov
+ block $~lib/array/Array<~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>
+ block $assembly/imports/IArguments
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>
+ block $~lib/function/Function<%28f64%2Cf64%29=>f64>
+ block $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>
+ block $~lib/function/Function<%28%29=>f64>
+ block $~lib/array/Array
+ block $~lib/array/Array<~lib/array/Array>
+ block $~lib/array/Array<~lib/array/Array<~lib/string/String>>
+ block $~lib/array/Array<~lib/array/Array>
+ block $~lib/array/Array<~lib/array/Array>
+ block $~lib/array/Array
+ block $~lib/array/Array<~lib/string/String>
+ block $~lib/array/Array
+ block $~lib/array/Array
+ block $~lib/typedarray/Uint64Array
+ block $~lib/typedarray/Int64Array
+ block $~lib/typedarray/Float64Array
+ block $~lib/typedarray/Float32Array
+ block $~lib/typedarray/Uint32Array
+ block $~lib/typedarray/Int32Array
+ block $~lib/typedarray/Uint16Array
+ block $~lib/typedarray/Int16Array
+ block $~lib/typedarray/Uint8Array
+ block $~lib/typedarray/Int8Array
+ block $~lib/arraybuffer/ArrayBufferView
+ block $~lib/string/String
+ block $~lib/arraybuffer/ArrayBuffer
+ local.get $0
+ i32.const 8
+ i32.sub
+ i32.load
+ br_table $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $~lib/typedarray/Int8Array $~lib/typedarray/Uint8Array $~lib/typedarray/Int16Array $~lib/typedarray/Uint16Array $~lib/typedarray/Int32Array $~lib/typedarray/Uint32Array $~lib/typedarray/Float32Array $~lib/typedarray/Float64Array $~lib/typedarray/Int64Array $~lib/typedarray/Uint64Array $~lib/array/Array $~lib/array/Array $~lib/array/Array<~lib/string/String> $~lib/array/Array $~lib/array/Array<~lib/array/Array> $~lib/array/Array<~lib/array/Array> $~lib/array/Array<~lib/array/Array<~lib/string/String>> $~lib/array/Array<~lib/array/Array> $~lib/array/Array $~lib/function/Function<%28%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64> $assembly/imports/IArguments $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array> $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array> $~lib/array/Array<~lib/typedarray/Float64Array> $assembly/mat4/Fov $invalid
+ 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/typedarray/Int8Array~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/typedarray/Uint8Array~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/typedarray/Int16Array~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/typedarray/Uint16Array~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/typedarray/Int32Array~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/typedarray/Uint32Array~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/typedarray/Float32Array~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/typedarray/Float64Array~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/typedarray/Int64Array~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/typedarray/Uint64Array~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
+ 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<~lib/array/Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/array/Array<~lib/array/Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/array/Array<~lib/array/Array<~lib/string/String>>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/array/Array<~lib/array/Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/array/Array~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28%29=>f64>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28f64%2Cf64%29=>f64>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>f64>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>f64>~visit
+ return
+ end
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Ci32%2Ci32%2Ci32%2C%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cassembly/imports/IArguments%29=>void%2Cassembly/imports/IArguments%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28f64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>bool>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2Cf64%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28%29=>%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%2C~lib/typedarray/Float64Array%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/function/Function<%28~lib/typedarray/Float64Array%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%2Cf64%29=>~lib/typedarray/Float64Array>~visit
+ return
+ end
+ local.get $0
+ local.get $1
+ call $~lib/array/Array<~lib/typedarray/Float64Array>~visit
+ return
+ end
+ return
+ end
+ unreachable
+ )
+ (func $~setArgumentsLength (param $0 i32)
+ local.get $0
+ global.set $~argumentsLength
+ )
+ (func $~start
+ call $start:assembly/index
+ )
+ (func $~stack_check
+ global.get $~lib/memory/__stack_pointer
+ global.get $~lib/memory/__data_end
+ i32.lt_s
+ if
+ i32.const 28240
+ i32.const 28288
+ i32.const 1
+ i32.const 1
+ call $~lib/builtins/abort
+ unreachable
+ end
+ )
+ (func $start:assembly/vec3~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32)
+ (local $6 i32)
+ (local $7 i32)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 i32)
+ (local $11 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 $1
+ i32.eqz
+ if
+ i32.const 3
+ local.set $1
+ end
+ local.get $2
+ i32.eqz
+ if
+ i32.const 0
+ local.set $2
+ end
+ local.get $3
+ if
+ local.get $3
+ local.get $1
+ i32.mul
+ local.get $2
+ i32.add
+ f64.convert_i32_s
+ local.set $9
+ local.get $0
+ call $~lib/typedarray/Float64Array#get:length
+ f64.convert_i32_s
+ local.set $8
+ local.get $9
+ local.get $8
+ f64.min
+ i32.trunc_f64_s
+ local.set $7
+ else
+ local.get $0
+ call $~lib/typedarray/Float64Array#get:length
+ local.set $7
+ end
+ local.get $2
+ local.set $6
+ loop $for-loop|0
+ local.get $6
+ local.get $7
+ i32.lt_s
+ local.set $10
+ local.get $10
+ if
+ global.get $assembly/vec3/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 0
+ local.get $0
+ local.get $6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/vec3/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 1
+ local.get $0
+ local.get $6
+ i32.const 1
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/vec3/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 2
+ local.get $0
+ local.get $6
+ i32.const 2
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/vec3/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ global.get $assembly/vec3/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store offset=4
+ local.get $11
+ local.get $5
+ i32.const 3
+ global.set $~argumentsLength
+ local.get $4
+ i32.load
+ call_indirect $0 (type $i32_i32_i32_=>_none)
+ local.get $0
+ local.get $6
+ global.get $assembly/vec3/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $6
+ i32.const 1
+ i32.add
+ global.get $assembly/vec3/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $6
+ i32.const 2
+ i32.add
+ global.get $assembly/vec3/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ local.get $1
+ i32.add
+ local.set $6
+ br $for-loop|0
+ end
+ end
+ local.get $0
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $11
+ )
+ (func $start:assembly/vec4~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32)
+ (local $6 i32)
+ (local $7 i32)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 i32)
+ (local $11 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 $1
+ i32.eqz
+ if
+ i32.const 4
+ local.set $1
+ end
+ local.get $2
+ i32.eqz
+ if
+ i32.const 0
+ local.set $2
+ end
+ local.get $3
+ if
+ local.get $3
+ local.get $1
+ i32.mul
+ local.get $2
+ i32.add
+ f64.convert_i32_s
+ local.set $9
+ local.get $0
+ call $~lib/typedarray/Float64Array#get:length
+ f64.convert_i32_s
+ local.set $8
+ local.get $9
+ local.get $8
+ f64.min
+ i32.trunc_f64_s
+ local.set $7
+ else
+ local.get $0
+ call $~lib/typedarray/Float64Array#get:length
+ local.set $7
+ end
+ local.get $2
+ local.set $6
+ loop $for-loop|0
+ local.get $6
+ local.get $7
+ i32.lt_s
+ local.set $10
+ local.get $10
+ if
+ global.get $assembly/vec4/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 0
+ local.get $0
+ local.get $6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/vec4/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 1
+ local.get $0
+ local.get $6
+ i32.const 1
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/vec4/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 2
+ local.get $0
+ local.get $6
+ i32.const 2
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/vec4/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 3
+ local.get $0
+ local.get $6
+ i32.const 3
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/vec4/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ global.get $assembly/vec4/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store offset=4
+ local.get $11
+ local.get $5
+ i32.const 3
+ global.set $~argumentsLength
+ local.get $4
+ i32.load
+ call_indirect $0 (type $i32_i32_i32_=>_none)
+ local.get $0
+ local.get $6
+ global.get $assembly/vec4/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $6
+ i32.const 1
+ i32.add
+ global.get $assembly/vec4/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $6
+ i32.const 2
+ i32.add
+ global.get $assembly/vec4/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $6
+ i32.const 3
+ i32.add
+ global.get $assembly/vec4/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ local.get $1
+ i32.add
+ local.set $6
+ br $for-loop|0
+ end
+ end
+ local.get $0
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $11
+ )
+ (func $start:assembly/quat~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 f64)
+ (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
+ local.get $1
+ local.get $2
+ call $assembly/vec3/dot
+ local.set $3
+ local.get $3
+ f64.const -0.999999
+ f64.lt
+ if
+ global.get $assembly/quat/tmpvec3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ global.get $assembly/quat/xUnitVec3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=4
+ local.get $4
+ local.get $1
+ call $assembly/vec3/cross
+ drop
+ global.get $assembly/quat/tmpvec3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 1
+ global.set $~argumentsLength
+ global.get $assembly/vec3/len
+ i32.load
+ call_indirect $0 (type $i32_=>_f64)
+ f64.const 1e-06
+ f64.lt
+ if
+ global.get $assembly/quat/tmpvec3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ global.get $assembly/quat/yUnitVec3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=4
+ local.get $4
+ local.get $1
+ call $assembly/vec3/cross
+ drop
+ end
+ global.get $assembly/quat/tmpvec3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ global.get $assembly/quat/tmpvec3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=4
+ local.get $4
+ call $assembly/vec3/normalize
+ drop
+ local.get $0
+ global.get $assembly/quat/tmpvec3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=4
+ local.get $4
+ global.get $~lib/math/NativeMath.PI
+ call $assembly/quat/setAxisAngle
+ drop
+ local.get $0
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ return
+ else
+ local.get $3
+ f64.const 0.999999
+ f64.gt
+ if
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ return
+ else
+ global.get $assembly/quat/tmpvec3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ local.get $1
+ local.get $2
+ call $assembly/vec3/cross
+ drop
+ local.get $0
+ i32.const 0
+ global.get $assembly/quat/tmpvec3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ global.get $assembly/quat/tmpvec3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ global.get $assembly/quat/tmpvec3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ local.get $3
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $0
+ i32.const 2
+ global.set $~argumentsLength
+ global.get $assembly/quat/normalize
+ i32.load
+ call_indirect $0 (type $i32_i32_=>_i32)
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ return
+ end
+ unreachable
+ end
+ unreachable
+ )
+ (func $start:assembly/quat~anonymous|1~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32)
+ (local $6 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 $assembly/quat/temp1
+ local.set $6
+ global.get $~lib/memory/__stack_pointer
+ local.get $6
+ i32.store
+ local.get $6
+ local.get $1
+ local.get $4
+ local.get $5
+ call $assembly/quat/slerp
+ drop
+ global.get $assembly/quat/temp2
+ local.set $6
+ global.get $~lib/memory/__stack_pointer
+ local.get $6
+ i32.store
+ local.get $6
+ local.get $2
+ local.get $3
+ local.get $5
+ call $assembly/quat/slerp
+ drop
+ local.get $0
+ global.get $assembly/quat/temp1
+ local.set $6
+ global.get $~lib/memory/__stack_pointer
+ local.get $6
+ i32.store offset=4
+ local.get $6
+ global.get $assembly/quat/temp2
+ local.set $6
+ global.get $~lib/memory/__stack_pointer
+ local.get $6
+ i32.store offset=8
+ local.get $6
+ f64.const 2
+ local.get $5
+ f64.mul
+ f64.const 1
+ local.get $5
+ f64.sub
+ f64.mul
+ call $assembly/quat/slerp
+ drop
+ local.get $0
+ local.set $6
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $6
+ )
+ (func $start:assembly/quat~anonymous|2~anonymous|0 (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 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 $assembly/quat/matr
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 0
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/quat/matr
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 3
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/quat/matr
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 6
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/quat/matr
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 1
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/quat/matr
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 4
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/quat/matr
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 7
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/quat/matr
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 2
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/quat/matr
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 5
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/quat/matr
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store
+ local.get $4
+ i32.const 8
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $0
+ global.get $assembly/quat/matr
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=8
+ local.get $4
+ call $assembly/quat/fromMat3
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=4
+ local.get $4
+ i32.const 2
+ global.set $~argumentsLength
+ global.get $assembly/quat/normalize
+ i32.load
+ call_indirect $0 (type $i32_i32_=>_i32)
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $start:assembly/vec2~anonymous|0~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (result i32)
+ (local $6 i32)
+ (local $7 i32)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 i32)
+ (local $11 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 $1
+ i32.eqz
+ if
+ i32.const 2
+ local.set $1
+ end
+ local.get $2
+ i32.eqz
+ if
+ i32.const 0
+ local.set $2
+ end
+ local.get $3
+ if
+ local.get $3
+ local.get $1
+ i32.mul
+ local.get $2
+ i32.add
+ f64.convert_i32_s
+ local.set $9
+ local.get $0
+ call $~lib/typedarray/Float64Array#get:length
+ f64.convert_i32_s
+ local.set $8
+ local.get $9
+ local.get $8
+ f64.min
+ i32.trunc_f64_s
+ local.set $7
+ else
+ local.get $0
+ call $~lib/typedarray/Float64Array#get:length
+ local.set $7
+ end
+ local.get $2
+ local.set $6
+ loop $for-loop|0
+ local.get $6
+ local.get $7
+ i32.lt_s
+ local.set $10
+ local.get $10
+ if
+ global.get $assembly/vec2/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 0
+ local.get $0
+ local.get $6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/vec2/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 1
+ local.get $0
+ local.get $6
+ i32.const 1
+ i32.add
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ global.get $assembly/vec2/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ global.get $assembly/vec2/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store offset=4
+ local.get $11
+ local.get $5
+ i32.const 3
+ global.set $~argumentsLength
+ local.get $4
+ i32.load
+ call_indirect $0 (type $i32_i32_i32_=>_none)
+ local.get $0
+ local.get $6
+ global.get $assembly/vec2/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.get $6
+ i32.const 1
+ i32.add
+ global.get $assembly/vec2/vec
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ local.get $11
+ i32.store
+ local.get $11
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ local.get $1
+ i32.add
+ local.set $6
+ br $for-loop|0
+ end
+ end
+ local.get $0
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $11
+ )
+ (func $assembly/mat2/str (param $0 i32) (result i32)
+ (local $1 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 64
+ 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
+ i64.const 0
+ i64.store offset=16
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=24
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=32
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=40
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=48
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=56
+ i32.const 2752
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=56
+ local.get $1
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=60
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=48
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=52
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=44
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=32
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=36
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $1
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=28
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=16
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=20
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=12
+ 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
+ i32.const 4384
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 64
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $assembly/mat2d/str (param $0 i32) (result i32)
+ (local $1 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 96
+ 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
+ i64.const 0
+ i64.store offset=16
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=24
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=32
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=40
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=48
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=56
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=64
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=72
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=80
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=88
+ i32.const 4416
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=88
+ local.get $1
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=92
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=80
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=84
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=72
+ local.get $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=76
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=64
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=68
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=56
+ local.get $1
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=60
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=48
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=52
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $1
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=44
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=32
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=36
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $1
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=28
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=16
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=20
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=12
+ 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
+ i32.const 4384
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 96
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $assembly/mat3/str (param $0 i32) (result i32)
+ (local $1 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 144
+ 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
+ i64.const 0
+ i64.store offset=16
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=24
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=32
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=40
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=48
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=56
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=64
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=72
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=80
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=88
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=96
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=104
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=112
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=120
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=128
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=136
+ i32.const 4448
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=136
+ local.get $1
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=140
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=128
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=132
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=120
+ local.get $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=124
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=112
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=116
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=104
+ local.get $1
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=108
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=96
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=100
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=88
+ local.get $1
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=92
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=80
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=84
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=72
+ local.get $1
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=76
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=64
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=68
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=56
+ local.get $1
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=60
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=48
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=52
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $1
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=44
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=32
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=36
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $1
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=28
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=16
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=20
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=12
+ 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
+ i32.const 4384
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 144
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $assembly/mat4/str (param $0 i32) (result i32)
+ (local $1 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 256
+ 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
+ i64.const 0
+ i64.store offset=16
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=24
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=32
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=40
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=48
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=56
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=64
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=72
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=80
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=88
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=96
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=104
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=112
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=120
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=128
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=136
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=144
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=152
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=160
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=168
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=176
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=184
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=192
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=200
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=208
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=216
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=224
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=232
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=240
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=248
+ i32.const 4480
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=248
+ local.get $1
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=252
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=240
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=244
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=232
+ local.get $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=236
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=224
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=228
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=216
+ local.get $1
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=220
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=208
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=212
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=200
+ local.get $1
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=204
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=192
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=196
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=184
+ local.get $1
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=188
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=176
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=180
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=168
+ local.get $1
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=172
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=160
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=164
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=152
+ local.get $1
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=156
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=144
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=148
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=136
+ local.get $1
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=140
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=128
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=132
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=120
+ local.get $1
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=124
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=112
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=116
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=104
+ local.get $1
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=108
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=96
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=100
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=88
+ local.get $1
+ local.get $0
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=92
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=80
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=84
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=72
+ local.get $1
+ local.get $0
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=76
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=64
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=68
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=56
+ local.get $1
+ local.get $0
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=60
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=48
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=52
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $1
+ local.get $0
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=44
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=32
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=36
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $1
+ local.get $0
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=28
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=16
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=20
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $0
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=12
+ 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
+ i32.const 4384
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 256
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $assembly/quat/fromEuler (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (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
+ global.get $~lib/math/NativeMath.PI
+ f64.const 360
+ f64.div
+ local.set $5
+ local.get $1
+ local.get $5
+ f64.mul
+ local.set $1
+ local.get $3
+ local.get $5
+ f64.mul
+ local.set $3
+ local.get $2
+ local.get $5
+ f64.mul
+ local.set $2
+ local.get $1
+ call $~lib/math/NativeMath.sin
+ local.set $6
+ local.get $1
+ call $~lib/math/NativeMath.cos
+ local.set $7
+ local.get $2
+ call $~lib/math/NativeMath.sin
+ local.set $8
+ local.get $2
+ call $~lib/math/NativeMath.cos
+ local.set $9
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ local.set $10
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ local.set $11
+ local.get $4
+ i32.const 10672
+ i32.eq
+ if
+ local.get $0
+ i32.const 0
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $7
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $11
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $4
+ i32.const 10704
+ i32.eq
+ if
+ local.get $0
+ i32.const 0
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $7
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $11
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $4
+ i32.const 10736
+ i32.eq
+ if
+ local.get $0
+ i32.const 0
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $7
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $11
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $4
+ i32.const 10768
+ i32.eq
+ if
+ local.get $0
+ i32.const 0
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $7
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $11
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $4
+ i32.const 10800
+ i32.eq
+ if
+ local.get $0
+ i32.const 0
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $7
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $11
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $4
+ i32.const 112
+ i32.eq
+ if
+ local.get $0
+ i32.const 0
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ local.get $8
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $7
+ local.get $9
+ f64.mul
+ local.get $10
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $11
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $9
+ f64.mul
+ local.get $11
+ f64.mul
+ local.get $6
+ local.get $8
+ f64.mul
+ local.get $10
+ f64.mul
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ else
+ i32.const 10832
+ local.set $12
+ global.get $~lib/memory/__stack_pointer
+ local.get $12
+ i32.store
+ local.get $12
+ local.get $4
+ call $~lib/string/String.__concat
+ i32.const 10896
+ i32.const 512
+ i32.const 10
+ call $~lib/builtins/abort
+ unreachable
+ end
+ end
+ end
+ end
+ end
+ end
+ local.get $0
+ local.set $12
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $12
+ )
+ (func $assembly/quat/str (param $0 i32) (result i32)
+ (local $1 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 64
+ 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
+ i64.const 0
+ i64.store offset=16
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=24
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=32
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=40
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=48
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=56
+ i32.const 10960
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=56
+ local.get $1
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=60
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=48
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=52
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=44
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=32
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=36
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $1
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=28
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=16
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=20
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=12
+ 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
+ i32.const 4384
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 64
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $assembly/quat2/str (param $0 i32) (result i32)
+ (local $1 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 128
+ 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
+ i64.const 0
+ i64.store offset=16
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=24
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=32
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=40
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=48
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=56
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=64
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=72
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=80
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=88
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=96
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=104
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=112
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=120
+ i32.const 10992
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=120
+ local.get $1
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=124
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=112
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=116
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=104
+ local.get $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=108
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=96
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=100
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=88
+ local.get $1
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=92
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=80
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=84
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=72
+ local.get $1
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=76
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=64
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=68
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=56
+ local.get $1
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=60
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=48
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=52
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $1
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=44
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=32
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=36
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $1
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=28
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=16
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=20
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=12
+ 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
+ i32.const 4384
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 128
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $assembly/vec2/str (param $0 i32) (result i32)
+ (local $1 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 32
+ 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
+ i64.const 0
+ i64.store offset=16
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=24
+ i32.const 11024
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $1
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=28
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=16
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=20
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=12
+ 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
+ i32.const 4384
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 32
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $assembly/vec3/str (param $0 i32) (result i32)
+ (local $1 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 48
+ 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
+ i64.const 0
+ i64.store offset=16
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=24
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=32
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=40
+ i32.const 11296
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $1
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=44
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=32
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=36
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=28
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=16
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=20
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=12
+ 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
+ i32.const 4384
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 48
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $assembly/vec4/str (param $0 i32) (result i32)
+ (local $1 i32)
+ global.get $~lib/memory/__stack_pointer
+ i32.const 64
+ 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
+ i64.const 0
+ i64.store offset=16
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=24
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=32
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=40
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=48
+ global.get $~lib/memory/__stack_pointer
+ i64.const 0
+ i64.store offset=56
+ i32.const 11328
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=56
+ local.get $1
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=60
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=48
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=52
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=40
+ local.get $1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=44
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=32
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=36
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=24
+ local.get $1
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=28
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=16
+ local.get $1
+ i32.const 4352
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=20
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=8
+ local.get $1
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ i32.const 0
+ call $~lib/number/F64#toString
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=12
+ 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
+ i32.const 4384
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $1
+ call $~lib/string/String.__concat
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 64
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $~lib/arraybuffer/ArrayBufferView#constructor (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.eqz
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.const 2
+ call $~lib/rt/itcms/__new
+ local.tee $0
+ i32.store
+ end
+ local.get $0
+ i32.const 0
+ call $~lib/arraybuffer/ArrayBufferView#set:buffer
+ local.get $0
+ i32.const 0
+ call $~lib/arraybuffer/ArrayBufferView#set:dataStart
+ local.get $0
+ i32.const 0
+ call $~lib/arraybuffer/ArrayBufferView#set:byteLength
+ local.get $1
+ i32.const 1073741820
+ local.get $2
+ i32.shr_u
+ i32.gt_u
+ if
+ i32.const 592
+ i32.const 640
+ i32.const 18
+ i32.const 57
+ call $~lib/builtins/abort
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ local.get $2
+ i32.shl
+ local.tee $1
+ i32.const 0
+ call $~lib/rt/itcms/__new
+ local.tee $3
+ i32.store offset=4
+ local.get $3
+ i32.const 0
+ local.get $1
+ call $~lib/memory/memory.fill
+ local.get $0
+ local.get $3
+ call $~lib/arraybuffer/ArrayBufferView#set:buffer
+ local.get $0
+ local.get $3
+ call $~lib/arraybuffer/ArrayBufferView#set:dataStart
+ local.get $0
+ local.get $1
+ call $~lib/arraybuffer/ArrayBufferView#set:byteLength
+ local.get $0
+ 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/typedarray/Float64Array#constructor (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
+ i32.eqz
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.const 10
+ call $~lib/rt/itcms/__new
+ local.tee $0
+ i32.store
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ local.get $1
+ i32.const 3
+ call $~lib/arraybuffer/ArrayBufferView#constructor
+ local.tee $0
+ i32.store
+ local.get $0
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $assembly/vec3/create (result i32)
+ (local $0 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ global.get $assembly/common/ArrayTypeEnum.Float64ArrayT
+ i32.ne
+ if
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ 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 $assembly/vec4/create (result i32)
+ (local $0 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ global.get $assembly/common/ArrayTypeEnum.Float64ArrayT
+ i32.ne
+ if
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ 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 $assembly/vec4/clone (param $0 i32) (result 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/memory/__stack_pointer
+ i32.const 0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $assembly/vec4/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $4
+ i32.store
+ local.get $4
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ local.set $5
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $5
+ )
+ (func $assembly/vec3/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (result 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $3
+ i32.store
+ local.get $3
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $3
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $3
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ 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 $4
+ )
+ (func $assembly/quat/create (result i32)
+ (local $0 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ global.get $assembly/common/ArrayTypeEnum.Float64ArrayT
+ i32.ne
+ if
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ 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 $assembly/mat3/create (result i32)
+ (local $0 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ global.get $assembly/common/ArrayTypeEnum.Float64ArrayT
+ i32.ne
+ if
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ 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 $assembly/vec2/create (result i32)
+ (local $0 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ global.get $assembly/common/ArrayTypeEnum.Float64ArrayT
+ i32.ne
+ if
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ 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 $assembly/mat2/create (result i32)
+ (local $0 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ global.get $assembly/common/ArrayTypeEnum.Float64ArrayT
+ i32.ne
+ if
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ 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 $assembly/mat2/clone (param $0 i32) (result 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/memory/__stack_pointer
+ i32.const 0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $assembly/mat2/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $4
+ i32.store
+ local.get $4
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ local.set $5
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $5
+ )
+ (func $~lib/util/number/dtoa (param $0 f64) (result i32)
+ (local $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
+ f64.const 0
+ f64.eq
+ if
+ i32.const 2784
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ return
+ end
+ local.get $0
+ local.get $0
+ f64.sub
+ f64.const 0
+ f64.eq
+ i32.eqz
+ if
+ local.get $0
+ local.get $0
+ f64.ne
+ if
+ i32.const 2816
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ return
+ end
+ i32.const 2848
+ i32.const 2896
+ local.get $0
+ f64.const 0
+ f64.lt
+ select
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ return
+ end
+ i32.const 2928
+ local.get $0
+ call $~lib/util/number/dtoa_core
+ i32.const 1
+ i32.shl
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.const 1
+ call $~lib/rt/itcms/__new
+ local.tee $2
+ i32.store
+ local.get $2
+ i32.const 2928
+ local.get $1
+ call $~lib/memory/memory.copy
+ 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
+ )
+ (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 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
+ call $~lib/string/String#get:length
+ i32.const 1
+ i32.shl
+ local.set $2
+ local.get $1
+ 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 4320
+ local.set $6
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $6
+ return
+ end
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.const 1
+ call $~lib/rt/itcms/__new
+ local.tee $5
+ i32.store
+ local.get $5
+ local.get $0
+ local.get $2
+ call $~lib/memory/memory.copy
+ local.get $5
+ local.get $2
+ i32.add
+ local.get $1
+ local.get $3
+ call $~lib/memory/memory.copy
+ local.get $5
+ local.set $6
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $6
+ )
+ (func $~lib/rt/__newArray (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)
+ 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.shl
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.const 0
+ local.get $3
+ call $~lib/rt/__newBuffer
+ local.tee $5
+ i32.store
+ i32.const 16
+ local.get $2
+ call $~lib/rt/itcms/__new
+ local.set $6
+ local.get $6
+ local.get $5
+ 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 $0
+ i32.store offset=12
+ local.get $6
+ local.set $7
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $7
+ )
+ (func $assembly/mat2/LDU (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result 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
+ i32.const 2
+ local.get $3
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 0
+ local.get $3
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 1
+ local.get $3
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 3
+ local.get $3
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ global.get $~lib/memory/__stack_pointer
+ i32.const 3
+ i32.const 2
+ i32.const 43
+ i32.const 0
+ call $~lib/rt/__newArray
+ local.tee $4
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.load offset=4
+ local.tee $5
+ i32.store offset=4
+ local.get $4
+ i32.const 0
+ local.get $0
+ call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset
+ local.get $4
+ i32.const 1
+ local.get $1
+ call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset
+ local.get $4
+ i32.const 2
+ local.get $2
+ call $~lib/array/Array<~lib/typedarray/Float64Array>#__uset
+ local.get $4
+ local.set $6
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $6
+ )
+ (func $assembly/mat2d/create (result i32)
+ (local $0 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ global.get $assembly/common/ArrayTypeEnum.Float64ArrayT
+ i32.ne
+ if
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ 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 $assembly/mat2d/clone (param $0 i32) (result 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/memory/__stack_pointer
+ i32.const 0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 4
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 5
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $assembly/mat2d/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (result 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $6
+ i32.store
+ local.get $6
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ i32.const 4
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ i32.const 5
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $6
+ local.set $7
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $7
+ )
+ (func $assembly/mat3/clone (param $0 i32) (result 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/memory/__stack_pointer
+ i32.const 0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 4
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 5
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 6
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 7
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 8
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $assembly/mat3/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $9
+ i32.store
+ local.get $9
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 4
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 5
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 6
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 7
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ i32.const 8
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $9
+ local.set $10
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $10
+ )
+ (func $assembly/mat4/Fov#constructor (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
+ i32.eqz
+ if
+ global.get $~lib/memory/__stack_pointer
+ i32.const 32
+ i32.const 44
+ call $~lib/rt/itcms/__new
+ local.tee $0
+ i32.store
+ end
+ local.get $0
+ f64.const 0
+ call $assembly/mat4/Fov#set:upDegrees
+ local.get $0
+ f64.const 0
+ call $assembly/mat4/Fov#set:downDegrees
+ local.get $0
+ f64.const 0
+ call $assembly/mat4/Fov#set:leftDegrees
+ local.get $0
+ f64.const 0
+ call $assembly/mat4/Fov#set:rightDegrees
+ 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 $assembly/mat4/create (result i32)
+ (local $0 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 16
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ global.get $assembly/common/ArrayTypeEnum.Float64ArrayT
+ i32.ne
+ if
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 3
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 8
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 9
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 11
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 12
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 13
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 14
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 0
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 10
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 15
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ 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 $assembly/mat4/clone (param $0 i32) (result 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/memory/__stack_pointer
+ i32.const 0
+ i32.const 16
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 4
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 5
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 6
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 7
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 8
+ local.get $0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 9
+ local.get $0
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 10
+ local.get $0
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 11
+ local.get $0
+ i32.const 11
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 12
+ local.get $0
+ i32.const 12
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 13
+ local.get $0
+ i32.const 13
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 14
+ local.get $0
+ i32.const 14
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 15
+ local.get $0
+ i32.const 15
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $assembly/mat4/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (result i32)
+ (local $16 i32)
+ (local $17 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/memory/__stack_pointer
+ i32.const 0
+ i32.const 16
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $16
+ i32.store
+ local.get $16
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 4
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 5
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 6
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 7
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 8
+ local.get $8
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 9
+ local.get $9
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 10
+ local.get $10
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 11
+ local.get $11
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 12
+ local.get $12
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 13
+ local.get $13
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 14
+ local.get $14
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ i32.const 15
+ local.get $15
+ call $~lib/typedarray/Float64Array#__set
+ local.get $16
+ local.set $17
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $17
+ )
+ (func $assembly/mat4/fromQuat2 (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $2
+ i32.store
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $3
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $4
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.neg
+ local.set $5
+ local.get $1
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ local.set $6
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.set $7
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.set $8
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.set $9
+ local.get $1
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ local.set $10
+ local.get $3
+ local.get $3
+ f64.mul
+ local.get $4
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $5
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $6
+ local.get $6
+ f64.mul
+ f64.add
+ local.set $11
+ local.get $11
+ f64.const 0
+ f64.gt
+ if
+ local.get $2
+ i32.const 0
+ local.get $7
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.sub
+ f64.const 2
+ f64.mul
+ local.get $11
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 1
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.sub
+ f64.const 2
+ f64.mul
+ local.get $11
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 2
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ f64.const 2
+ f64.mul
+ local.get $11
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $2
+ i32.const 0
+ local.get $7
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $4
+ f64.mul
+ f64.sub
+ f64.const 2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 1
+ local.get $8
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $3
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $5
+ f64.mul
+ f64.sub
+ f64.const 2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 2
+ local.get $9
+ local.get $6
+ f64.mul
+ local.get $10
+ local.get $5
+ f64.mul
+ f64.add
+ local.get $7
+ local.get $4
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $3
+ f64.mul
+ f64.sub
+ f64.const 2
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/fromRotationTranslation
+ drop
+ local.get $0
+ local.set $12
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $12
+ )
+ (func $assembly/mat4/getRotation (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
+ (local $3 f64)
+ (local $4 f64)
+ (local $5 f64)
+ (local $6 f64)
+ (local $7 f64)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 f64)
+ (local $12 f64)
+ (local $13 f64)
+ (local $14 f64)
+ (local $15 f64)
+ (local $16 f64)
+ (local $17 f64)
+ (local $18 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/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $2
+ i32.store
+ local.get $2
+ local.get $1
+ call $assembly/mat4/getScaling
+ drop
+ i32.const 1
+ f64.convert_i32_s
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ local.set $3
+ i32.const 1
+ f64.convert_i32_s
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ local.set $4
+ i32.const 1
+ f64.convert_i32_s
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.div
+ local.set $5
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.set $6
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.set $7
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ local.set $8
+ local.get $1
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.set $9
+ local.get $1
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.set $10
+ local.get $1
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ local.set $11
+ local.get $1
+ i32.const 8
+ call $~lib/typedarray/Float64Array#__get
+ local.get $3
+ f64.mul
+ local.set $12
+ local.get $1
+ i32.const 9
+ call $~lib/typedarray/Float64Array#__get
+ local.get $4
+ f64.mul
+ local.set $13
+ local.get $1
+ i32.const 10
+ call $~lib/typedarray/Float64Array#__get
+ local.get $5
+ f64.mul
+ local.set $14
+ local.get $6
+ local.get $10
+ f64.add
+ local.get $14
+ f64.add
+ local.set $15
+ f64.const 0
+ local.set $16
+ local.get $15
+ f64.const 0
+ f64.gt
+ if
+ local.get $15
+ f64.const 1
+ f64.add
+ local.set $17
+ local.get $17
+ f64.sqrt
+ f64.const 2
+ f64.mul
+ local.set $16
+ local.get $0
+ i32.const 3
+ f64.const 0.25
+ local.get $16
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $11
+ local.get $13
+ f64.sub
+ local.get $16
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $12
+ local.get $8
+ f64.sub
+ local.get $16
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $7
+ local.get $9
+ f64.sub
+ local.get $16
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $6
+ local.get $10
+ f64.gt
+ if (result i32)
+ local.get $6
+ local.get $14
+ f64.gt
+ else
+ i32.const 0
+ end
+ if
+ f64.const 1
+ local.get $6
+ f64.add
+ local.get $10
+ f64.sub
+ local.get $14
+ f64.sub
+ local.set $17
+ local.get $17
+ f64.sqrt
+ f64.const 2
+ f64.mul
+ local.set $16
+ local.get $0
+ i32.const 3
+ local.get $11
+ local.get $13
+ f64.sub
+ local.get $16
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ f64.const 0.25
+ local.get $16
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $7
+ local.get $9
+ f64.add
+ local.get $16
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $12
+ local.get $8
+ f64.add
+ local.get $16
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ local.get $10
+ local.get $14
+ f64.gt
+ if
+ f64.const 1
+ local.get $10
+ f64.add
+ local.get $6
+ f64.sub
+ local.get $14
+ f64.sub
+ local.set $17
+ local.get $17
+ f64.sqrt
+ f64.const 2
+ f64.mul
+ local.set $16
+ local.get $0
+ i32.const 3
+ local.get $12
+ local.get $8
+ f64.sub
+ local.get $16
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $7
+ local.get $9
+ f64.add
+ local.get $16
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0.25
+ local.get $16
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $11
+ local.get $13
+ f64.add
+ local.get $16
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ else
+ f64.const 1
+ local.get $14
+ f64.add
+ local.get $6
+ f64.sub
+ local.get $10
+ f64.sub
+ local.set $17
+ local.get $17
+ f64.sqrt
+ f64.const 2
+ f64.mul
+ local.set $16
+ local.get $0
+ i32.const 3
+ local.get $7
+ local.get $9
+ f64.sub
+ local.get $16
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 0
+ local.get $12
+ local.get $8
+ f64.add
+ local.get $16
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $11
+ local.get $13
+ f64.add
+ local.get $16
+ f64.div
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0.25
+ local.get $16
+ f64.mul
+ call $~lib/typedarray/Float64Array#__set
+ end
+ end
+ end
+ local.get $0
+ local.set $18
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $18
+ )
+ (func $assembly/quat2/create (result i32)
+ (local $0 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $0
+ i32.store
+ global.get $assembly/common/ARRAY_TYPE
+ global.get $assembly/common/ArrayTypeEnum.Float64ArrayT
+ i32.ne
+ if
+ local.get $0
+ i32.const 0
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 4
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 5
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 6
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 7
+ f64.const 0
+ call $~lib/typedarray/Float64Array#__set
+ end
+ local.get $0
+ i32.const 3
+ f64.const 1
+ call $~lib/typedarray/Float64Array#__set
+ 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 $assembly/quat2/clone (param $0 i32) (result 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/memory/__stack_pointer
+ i32.const 0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 3
+ local.get $0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 4
+ local.get $0
+ i32.const 4
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 5
+ local.get $0
+ i32.const 5
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 6
+ local.get $0
+ i32.const 6
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 7
+ local.get $0
+ i32.const 7
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $assembly/quat2/fromValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32)
+ (local $8 i32)
+ (local $9 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/memory/__stack_pointer
+ i32.const 0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $8
+ i32.store
+ local.get $8
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 4
+ local.get $4
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 5
+ local.get $5
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 6
+ local.get $6
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ i32.const 7
+ local.get $7
+ call $~lib/typedarray/Float64Array#__set
+ local.get $8
+ local.set $9
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $9
+ )
+ (func $assembly/quat2/fromRotationTranslationValues (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32)
+ (local $7 i32)
+ (local $8 f64)
+ (local $9 f64)
+ (local $10 f64)
+ (local $11 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/memory/__stack_pointer
+ i32.const 0
+ i32.const 8
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $7
+ i32.store
+ local.get $7
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 2
+ local.get $2
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 3
+ local.get $3
+ call $~lib/typedarray/Float64Array#__set
+ local.get $4
+ f64.const 0.5
+ f64.mul
+ local.set $8
+ local.get $5
+ f64.const 0.5
+ f64.mul
+ local.set $9
+ local.get $6
+ f64.const 0.5
+ f64.mul
+ local.set $10
+ local.get $7
+ i32.const 4
+ local.get $8
+ local.get $3
+ f64.mul
+ local.get $9
+ local.get $2
+ f64.mul
+ f64.add
+ local.get $10
+ local.get $1
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 5
+ local.get $9
+ local.get $3
+ f64.mul
+ local.get $10
+ local.get $0
+ f64.mul
+ f64.add
+ local.get $8
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 6
+ local.get $10
+ local.get $3
+ f64.mul
+ local.get $8
+ local.get $1
+ f64.mul
+ f64.add
+ local.get $9
+ local.get $0
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ i32.const 7
+ local.get $8
+ f64.neg
+ local.get $0
+ f64.mul
+ local.get $9
+ local.get $1
+ f64.mul
+ f64.sub
+ local.get $10
+ local.get $2
+ f64.mul
+ f64.sub
+ call $~lib/typedarray/Float64Array#__set
+ local.get $7
+ local.set $11
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $11
+ )
+ (func $assembly/quat2/fromMat4 (param $0 i32) (param $1 i32) (result i32)
+ (local $2 i32)
+ (local $3 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
+ global.get $~lib/memory/__stack_pointer
+ call $assembly/quat/create
+ local.tee $2
+ i32.store
+ local.get $2
+ local.get $1
+ call $assembly/mat4/getRotation
+ drop
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $3
+ i32.store offset=4
+ local.get $3
+ local.get $1
+ call $assembly/mat4/getTranslation
+ drop
+ local.get $0
+ local.get $2
+ local.get $3
+ call $assembly/quat2/fromRotationTranslation
+ drop
+ local.get $0
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $assembly/vec2/clone (param $0 i32) (result 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/memory/__stack_pointer
+ i32.const 0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $assembly/vec2/fromValues (param $0 f64) (param $1 f64) (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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $2
+ i32.store
+ local.get $2
+ i32.const 0
+ local.get $0
+ call $~lib/typedarray/Float64Array#__set
+ local.get $2
+ i32.const 1
+ local.get $1
+ call $~lib/typedarray/Float64Array#__set
+ 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
+ )
+ (func $assembly/vec3/clone (param $0 i32) (result 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/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ call $~lib/typedarray/Float64Array#constructor
+ local.tee $1
+ i32.store
+ local.get $1
+ i32.const 0
+ local.get $0
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 1
+ local.get $0
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ i32.const 2
+ local.get $0
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ call $~lib/typedarray/Float64Array#__set
+ local.get $1
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $assembly/vec3/rotateX (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ i32.const 21
+ i32.const 11056
+ call $~lib/rt/__newArray
+ local.tee $5
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ i32.const 21
+ i32.const 11088
+ call $~lib/rt/__newArray
+ local.tee $6
+ i32.store offset=4
+ local.get $5
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $6
+ i32.const 0
+ local.get $5
+ i32.const 0
+ call $~lib/array/Array#__get
+ call $~lib/array/Array#__set
+ local.get $6
+ i32.const 1
+ local.get $5
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ local.get $5
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $6
+ i32.const 2
+ local.get $5
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ local.get $5
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ f64.add
+ call $~lib/array/Array#__set
+ local.get $0
+ i32.const 0
+ local.get $6
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $6
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.set $7
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $7
+ )
+ (func $assembly/vec3/rotateY (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ i32.const 21
+ i32.const 11168
+ call $~lib/rt/__newArray
+ local.tee $5
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ i32.const 21
+ i32.const 11200
+ call $~lib/rt/__newArray
+ local.tee $6
+ i32.store offset=4
+ local.get $5
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $6
+ i32.const 0
+ local.get $5
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ local.get $5
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ f64.add
+ call $~lib/array/Array#__set
+ local.get $6
+ i32.const 1
+ local.get $5
+ i32.const 1
+ call $~lib/array/Array#__get
+ call $~lib/array/Array#__set
+ local.get $6
+ i32.const 2
+ local.get $5
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ local.get $5
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $0
+ i32.const 0
+ local.get $6
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $6
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.set $7
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $7
+ )
+ (func $assembly/vec3/rotateZ (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result i32)
+ (local $4 i32)
+ (local $5 i32)
+ (local $6 i32)
+ (local $7 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
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ i32.const 21
+ i32.const 11232
+ call $~lib/rt/__newArray
+ local.tee $5
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ i32.const 0
+ i32.const 3
+ i32.const 21
+ i32.const 11264
+ call $~lib/rt/__newArray
+ local.tee $6
+ i32.store offset=4
+ local.get $5
+ i32.const 0
+ local.get $1
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 1
+ local.get $1
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $5
+ i32.const 2
+ local.get $1
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $6
+ i32.const 0
+ local.get $5
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ local.get $5
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ f64.sub
+ call $~lib/array/Array#__set
+ local.get $6
+ i32.const 1
+ local.get $5
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.sin
+ f64.mul
+ local.get $5
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $3
+ call $~lib/math/NativeMath.cos
+ f64.mul
+ f64.add
+ call $~lib/array/Array#__set
+ local.get $6
+ i32.const 2
+ local.get $5
+ i32.const 2
+ call $~lib/array/Array#__get
+ call $~lib/array/Array#__set
+ local.get $0
+ i32.const 0
+ local.get $6
+ i32.const 0
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 0
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 1
+ local.get $6
+ i32.const 1
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 1
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ i32.const 2
+ local.get $6
+ i32.const 2
+ call $~lib/array/Array#__get
+ local.get $2
+ i32.const 2
+ call $~lib/typedarray/Float64Array#__get
+ f64.add
+ call $~lib/typedarray/Float64Array#__set
+ local.get $0
+ local.set $7
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $7
+ )
+ (func $assembly/quat/fromEuler@varargs (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result 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
+ block $1of1
+ block $0of1
+ block $outOfRange
+ global.get $~argumentsLength
+ i32.const 4
+ i32.sub
+ br_table $0of1 $1of1 $outOfRange
+ end
+ unreachable
+ end
+ global.get $~lib/memory/__stack_pointer
+ global.get $assembly/common/ANGLE_ORDER
+ local.tee $4
+ i32.store
+ end
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/quat/fromEuler
+ local.set $5
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $5
+ )
+ (func $export:assembly/mat2/clone (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat2/clone
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat2/copy (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2/copy
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2/identity (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat2/identity
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/mat2/set
+ local.set $5
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $5
+ )
+ (func $export:assembly/mat2/transpose (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2/transpose
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2/invert (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2/invert
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2/adjoint (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2/adjoint
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2/determinant (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat2/determinant
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2/multiply
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2/rotate
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2/scale
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2/fromRotation (param $0 i32) (param $1 f64) (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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/mat2/fromRotation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2/fromScaling (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2/fromScaling
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2/str (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat2/str
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat2/frob (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat2/frob
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat2/LDU (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 16
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ call $~stack_check
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.store offset=12
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat2/LDU
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/mat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2/add
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2/subtract
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2/exactEquals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2/exactEquals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2/equals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2/equals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2/multiplyScalar
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat2/multiplyScalarAndAdd
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/mat2d/clone (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat2d/clone
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat2d/copy (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2d/copy
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2d/identity (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat2d/identity
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat2d/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ local.get $5
+ local.get $6
+ call $assembly/mat2d/set
+ local.set $7
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $7
+ )
+ (func $export:assembly/mat2d/invert (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2d/invert
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2d/determinant (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat2d/determinant
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat2d/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2d/multiply
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2d/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2d/rotate
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2d/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2d/scale
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2d/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2d/translate
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2d/fromRotation (param $0 i32) (param $1 f64) (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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/mat2d/fromRotation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2d/fromScaling (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2d/fromScaling
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2d/fromTranslation (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2d/fromTranslation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2d/str (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat2d/str
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat2d/frob (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat2d/frob
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat2d/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2d/add
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2d/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2d/subtract
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2d/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat2d/multiplyScalar
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat2d/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat2d/multiplyScalarAndAdd
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/mat2d/exactEquals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2d/exactEquals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat2d/equals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat2d/equals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/fromMat4 (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/fromMat4
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/clone (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat3/clone
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat3/copy (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/copy
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (result 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ local.get $5
+ local.get $6
+ local.get $7
+ local.get $8
+ local.get $9
+ call $assembly/mat3/set
+ local.set $10
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $10
+ )
+ (func $export:assembly/mat3/identity (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat3/identity
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat3/transpose (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/transpose
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/invert (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/invert
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/adjoint (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/adjoint
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/determinant (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat3/determinant
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat3/multiply
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat3/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat3/translate
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat3/rotate (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat3/rotate
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat3/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat3/scale
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat3/fromTranslation (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/fromTranslation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/fromRotation (param $0 i32) (param $1 f64) (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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/mat3/fromRotation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/fromScaling (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/fromScaling
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/fromMat2d (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/fromMat2d
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/fromQuat (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/fromQuat
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/normalFromMat4 (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/normalFromMat4
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/projection (param $0 i32) (param $1 f64) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat3/projection
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat3/str (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat3/str
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat3/frob (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat3/frob
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat3/add
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat3/subtract
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat3/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat3/multiplyScalar
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat3/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat3/multiplyScalarAndAdd
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/mat3/exactEquals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/exactEquals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat3/equals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat3/equals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/Fov#get:upDegrees (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat4/Fov#get:upDegrees
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat4/Fov#set:upDegrees (param $0 i32) (param $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/mat4/Fov#set:upDegrees
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#get:downDegrees (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat4/Fov#get:downDegrees
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat4/Fov#set:downDegrees (param $0 i32) (param $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/mat4/Fov#set:downDegrees
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#get:leftDegrees (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat4/Fov#get:leftDegrees
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat4/Fov#set:leftDegrees (param $0 i32) (param $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/mat4/Fov#set:leftDegrees
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#get:rightDegrees (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat4/Fov#get:rightDegrees
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat4/Fov#set:rightDegrees (param $0 i32) (param $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/mat4/Fov#set:rightDegrees
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ )
+ (func $export:assembly/mat4/Fov#constructor (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat4/Fov#constructor
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat4/clone (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat4/clone
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat4/copy (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/copy
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (param $9 f64) (param $10 f64) (param $11 f64) (param $12 f64) (param $13 f64) (param $14 f64) (param $15 f64) (param $16 f64) (result i32)
+ (local $17 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ local.get $5
+ local.get $6
+ local.get $7
+ local.get $8
+ local.get $9
+ local.get $10
+ local.get $11
+ local.get $12
+ local.get $13
+ local.get $14
+ local.get $15
+ local.get $16
+ call $assembly/mat4/set
+ local.set $17
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $17
+ )
+ (func $export:assembly/mat4/identity (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat4/identity
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat4/transpose (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/transpose
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/invert (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/invert
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/adjoint (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/adjoint
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/determinant (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat4/determinant
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/multiply
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat4/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/translate
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat4/scale (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/scale
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat4/rotate (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat4/rotate
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/mat4/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/rotateX
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat4/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/rotateY
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat4/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/rotateZ
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat4/fromTranslation (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/fromTranslation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/fromScaling (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/fromScaling
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/fromRotation (param $0 i32) (param $1 f64) (param $2 i32) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/fromRotation
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat4/fromXRotation (param $0 i32) (param $1 f64) (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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/mat4/fromXRotation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/fromYRotation (param $0 i32) (param $1 f64) (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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/mat4/fromYRotation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/fromZRotation (param $0 i32) (param $1 f64) (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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/mat4/fromZRotation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/fromRotationTranslation
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat4/fromQuat2 (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/fromQuat2
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/getTranslation (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/getTranslation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/getScaling (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/getScaling
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/getRotation (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/getRotation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/decompose (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 16
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ call $~stack_check
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.store offset=12
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat4/decompose
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/mat4/fromRotationTranslationScale (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 16
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ call $~stack_check
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.store offset=12
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat4/fromRotationTranslationScale
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/mat4/fromRotationTranslationScaleOrigin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
+ (local $5 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.store offset=12
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=16
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/mat4/fromRotationTranslationScaleOrigin
+ local.set $5
+ global.get $~lib/memory/__stack_pointer
+ i32.const 20
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $5
+ )
+ (func $export:assembly/mat4/fromQuat (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/fromQuat
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/frustum (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ local.get $5
+ local.get $6
+ call $assembly/mat4/frustum
+ local.set $7
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $7
+ )
+ (func $export:assembly/mat4/perspectiveNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/mat4/perspectiveNO
+ local.set $5
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $5
+ )
+ (func $export:assembly/mat4/perspectiveZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/mat4/perspectiveZO
+ local.set $5
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $5
+ )
+ (func $export:assembly/mat4/perspectiveFromFieldOfView (param $0 i32) (param $1 i32) (param $2 f64) (param $3 f64) (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat4/perspectiveFromFieldOfView
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/mat4/orthoNO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ local.get $5
+ local.get $6
+ call $assembly/mat4/orthoNO
+ local.set $7
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $7
+ )
+ (func $export:assembly/mat4/orthoZO (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ local.get $5
+ local.get $6
+ call $assembly/mat4/orthoZO
+ local.set $7
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $7
+ )
+ (func $export:assembly/mat4/lookAt (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 16
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ call $~stack_check
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.store offset=12
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat4/lookAt
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/mat4/targetTo (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 16
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ call $~stack_check
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.store offset=12
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat4/targetTo
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/mat4/str (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat4/str
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat4/frob (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/mat4/frob
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/mat4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/add
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/subtract
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat4/multiplyScalar (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/mat4/multiplyScalar
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/mat4/multiplyScalarAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/mat4/multiplyScalarAndAdd
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/mat4/exactEquals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/exactEquals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/mat4/equals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/mat4/equals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat/identity (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/quat/identity
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/quat/setAxisAngle (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/setAxisAngle
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat/getAxisAngle (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/getAxisAngle
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat/getAngle (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/getAngle
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/multiply
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/rotateX
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/rotateY
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/rotateZ
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat/calculateW (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/calculateW
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat/exp (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/exp
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat/ln (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/ln
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat/pow (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat/pow
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/quat/slerp
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/quat/random (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/quat/random
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/quat/invert (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/invert
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat/conjugate (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/conjugate
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat/fromMat3 (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/fromMat3
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat/fromEuler@varargs (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/quat/fromEuler@varargs
+ local.set $5
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $5
+ )
+ (func $export:assembly/quat/str (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/quat/str
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/quat/equals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat/equals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat2/clone (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/quat2/clone
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/quat2/fromRotationTranslation (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat2/fromRotationTranslation
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat2/fromTranslation (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/fromTranslation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat2/fromRotation (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/fromRotation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat2/fromMat4 (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/fromMat4
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat2/copy (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/copy
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat2/identity (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/quat2/identity
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/quat2/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (param $8 f64) (result i32)
+ (local $9 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ local.get $5
+ local.get $6
+ local.get $7
+ local.get $8
+ call $assembly/quat2/set
+ local.set $9
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $9
+ )
+ (func $export:assembly/quat2/getDual (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/getDual
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat2/setDual (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/setDual
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat2/getTranslation (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/getTranslation
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat2/translate (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat2/translate
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat2/rotateX (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat2/rotateX
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat2/rotateY (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat2/rotateY
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat2/rotateZ (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat2/rotateZ
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat2/rotateByQuatAppend (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat2/rotateByQuatAppend
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat2/rotateByQuatPrepend (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat2/rotateByQuatPrepend
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat2/rotateAroundAxis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/quat2/rotateAroundAxis
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/quat2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat2/add
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat2/multiply
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/quat2/scale
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/quat2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/quat2/lerp
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/quat2/invert (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/invert
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat2/conjugate (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/conjugate
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat2/normalize (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/normalize
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat2/str (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/quat2/str
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/quat2/exactEquals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/exactEquals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/quat2/equals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/quat2/equals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/clone (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec2/clone
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec2/copy (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/copy
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/set (param $0 i32) (param $1 f64) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/set
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/add
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/subtract
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/multiply
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/divide
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/ceil (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/ceil
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/floor (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/floor
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/min
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/max
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/round (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/round
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/scale (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/scale
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec2/scaleAndAdd
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec2/distance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/distance
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/squaredDistance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/squaredDistance
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/length (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec2/length
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec2/squaredLength (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec2/squaredLength
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec2/negate (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/negate
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/inverse (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/inverse
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/normalize (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/normalize
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/dot (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/dot
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/cross
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec2/lerp
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec2/random (param $0 i32) (param $1 f64) (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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/vec2/random
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/transformMat2 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/transformMat2
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/transformMat2d (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/transformMat2d
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/transformMat3
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec2/transformMat4
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec2/rotate (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec2/rotate
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec2/angle (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/angle
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/zero (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec2/zero
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec2/str (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec2/str
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec2/exactEquals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/exactEquals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec2/equals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec2/equals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/clone (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec3/clone
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec3/length (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec3/length
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec3/copy (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/copy
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec3/set
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec3/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/add
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec3/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/subtract
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec3/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/multiply
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec3/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/divide
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec3/ceil (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/ceil
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/floor (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/floor
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/min
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec3/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/max
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec3/round (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/round
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/scale (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/scale
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec3/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec3/scaleAndAdd
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec3/distance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/distance
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/squaredDistance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/squaredDistance
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/squaredLength (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec3/squaredLength
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec3/negate (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/negate
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/inverse (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/inverse
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/normalize (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/normalize
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/dot (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/dot
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/cross (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/cross
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec3/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec3/lerp
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec3/slerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec3/slerp
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec3/hermite (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32)
+ (local $6 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.store offset=12
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=16
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ local.get $5
+ call $assembly/vec3/hermite
+ local.set $6
+ global.get $~lib/memory/__stack_pointer
+ i32.const 20
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $6
+ )
+ (func $export:assembly/vec3/bezier (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 f64) (result i32)
+ (local $6 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.store offset=12
+ global.get $~lib/memory/__stack_pointer
+ local.get $4
+ i32.store offset=16
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ local.get $5
+ call $assembly/vec3/bezier
+ local.set $6
+ global.get $~lib/memory/__stack_pointer
+ i32.const 20
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $6
+ )
+ (func $export:assembly/vec3/random (param $0 i32) (param $1 f64) (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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/vec3/random
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/transformMat4
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec3/transformMat3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/transformMat3
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec3/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec3/transformQuat
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec3/rotateX (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec3/rotateX
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec3/rotateY (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec3/rotateY
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec3/rotateZ (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec3/rotateZ
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec3/angle (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/angle
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/zero (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec3/zero
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec3/str (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec3/str
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec3/exactEquals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/exactEquals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec3/equals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec3/equals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/clone (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec4/clone
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec4/copy (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/copy
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/set (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (result 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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ local.get $4
+ call $assembly/vec4/set
+ local.set $5
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $5
+ )
+ (func $export:assembly/vec4/add (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/add
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec4/subtract (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/subtract
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec4/multiply (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/multiply
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec4/divide (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/divide
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec4/ceil (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/ceil
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/floor (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/floor
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/min (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/min
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec4/max (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/max
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec4/round (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/round
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/scale (param $0 i32) (param $1 i32) (param $2 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/scale
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec4/scaleAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec4/scaleAndAdd
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec4/distance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/distance
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/squaredDistance (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/squaredDistance
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/length (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec4/length
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec4/squaredLength (param $0 i32) (result f64)
+ (local $1 f64)
+ 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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec4/squaredLength
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec4/negate (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/negate
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/inverse (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/inverse
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/normalize (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/normalize
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/dot (param $0 i32) (param $1 i32) (result f64)
+ (local $2 f64)
+ 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/dot
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/cross (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 16
+ i32.sub
+ global.set $~lib/memory/__stack_pointer
+ call $~stack_check
+ global.get $~lib/memory/__stack_pointer
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ global.get $~lib/memory/__stack_pointer
+ local.get $3
+ i32.store offset=12
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec4/cross
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 16
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec4/lerp (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64) (result 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ local.get $3
+ call $assembly/vec4/lerp
+ local.set $4
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $4
+ )
+ (func $export:assembly/vec4/random (param $0 i32) (param $1 f64) (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
+ local.get $0
+ i32.store
+ local.get $0
+ local.get $1
+ call $assembly/vec4/random
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/transformMat4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/transformMat4
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec4/transformQuat (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (local $3 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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ global.get $~lib/memory/__stack_pointer
+ local.get $2
+ i32.store offset=8
+ local.get $0
+ local.get $1
+ local.get $2
+ call $assembly/vec4/transformQuat
+ local.set $3
+ global.get $~lib/memory/__stack_pointer
+ i32.const 12
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $3
+ )
+ (func $export:assembly/vec4/zero (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec4/zero
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec4/str (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
+ local.get $0
+ i32.store
+ local.get $0
+ call $assembly/vec4/str
+ local.set $1
+ global.get $~lib/memory/__stack_pointer
+ i32.const 4
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $1
+ )
+ (func $export:assembly/vec4/exactEquals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/exactEquals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+ (func $export:assembly/vec4/equals (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
+ local.get $0
+ i32.store
+ global.get $~lib/memory/__stack_pointer
+ local.get $1
+ i32.store offset=4
+ local.get $0
+ local.get $1
+ call $assembly/vec4/equals
+ local.set $2
+ global.get $~lib/memory/__stack_pointer
+ i32.const 8
+ i32.add
+ global.set $~lib/memory/__stack_pointer
+ local.get $2
+ )
+)
diff --git a/dist/gl-matrix-min.js b/dist/gl-matrix-min.js
deleted file mode 100644
index 6b15da4f..00000000
--- a/dist/gl-matrix-min.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*!
-@fileoverview gl-matrix - High performance matrix and vector operations
-@author Brandon Jones
-@author Colin MacKenzie IV
-@version 3.3.0
-
-Copyright (c) 2015-2020, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-*/
-!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).glMatrix={})}(this,(function(t){"use strict";var n=1e-6,a="undefined"!=typeof Float32Array?Float32Array:Array,r=Math.random;var u=Math.PI/180;Math.hypot||(Math.hypot=function(){for(var t=0,n=arguments.length;n--;)t+=arguments[n]*arguments[n];return Math.sqrt(t)});var e=Object.freeze({__proto__:null,EPSILON:n,get ARRAY_TYPE(){return a},RANDOM:r,setMatrixArrayType:function(t){a=t},toRadian:function(t){return t*u},equals:function(t,a){return Math.abs(t-a)<=n*Math.max(1,Math.abs(t),Math.abs(a))}});function o(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=a[0],h=a[1],c=a[2],s=a[3];return t[0]=r*i+e*h,t[1]=u*i+o*h,t[2]=r*c+e*s,t[3]=u*c+o*s,t}function i(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t}var h=o,c=i,s=Object.freeze({__proto__:null,create:function(){var t=new a(4);return a!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},clone:function(t){var n=new a(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},fromValues:function(t,n,r,u){var e=new a(4);return e[0]=t,e[1]=n,e[2]=r,e[3]=u,e},set:function(t,n,a,r,u){return t[0]=n,t[1]=a,t[2]=r,t[3]=u,t},transpose:function(t,n){if(t===n){var a=n[1];t[1]=n[2],t[2]=a}else t[0]=n[0],t[1]=n[2],t[2]=n[1],t[3]=n[3];return t},invert:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=a*e-u*r;return o?(o=1/o,t[0]=e*o,t[1]=-r*o,t[2]=-u*o,t[3]=a*o,t):null},adjoint:function(t,n){var a=n[0];return t[0]=n[3],t[1]=-n[1],t[2]=-n[2],t[3]=a,t},determinant:function(t){return t[0]*t[3]-t[2]*t[1]},multiply:o,rotate:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(a),h=Math.cos(a);return t[0]=r*h+e*i,t[1]=u*h+o*i,t[2]=r*-i+e*h,t[3]=u*-i+o*h,t},scale:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=a[0],h=a[1];return t[0]=r*i,t[1]=u*i,t[2]=e*h,t[3]=o*h,t},fromRotation:function(t,n){var a=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=a,t[2]=-a,t[3]=r,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t},str:function(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3])},LDU:function(t,n,a,r){return t[2]=r[2]/r[0],a[0]=r[0],a[1]=r[1],a[3]=r[3]-t[2]*a[1],[t,n,a]},add:function(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t},subtract:i,exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]},equals:function(t,a){var r=t[0],u=t[1],e=t[2],o=t[3],i=a[0],h=a[1],c=a[2],s=a[3];return Math.abs(r-i)<=n*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(u-h)<=n*Math.max(1,Math.abs(u),Math.abs(h))&&Math.abs(e-c)<=n*Math.max(1,Math.abs(e),Math.abs(c))&&Math.abs(o-s)<=n*Math.max(1,Math.abs(o),Math.abs(s))},multiplyScalar:function(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t},multiplyScalarAndAdd:function(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t},mul:h,sub:c});function M(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=a[0],s=a[1],M=a[2],f=a[3],l=a[4],v=a[5];return t[0]=r*c+e*s,t[1]=u*c+o*s,t[2]=r*M+e*f,t[3]=u*M+o*f,t[4]=r*l+e*v+i,t[5]=u*l+o*v+h,t}function f(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t[4]=n[4]-a[4],t[5]=n[5]-a[5],t}var l=M,v=f,b=Object.freeze({__proto__:null,create:function(){var t=new a(6);return a!=Float32Array&&(t[1]=0,t[2]=0,t[4]=0,t[5]=0),t[0]=1,t[3]=1,t},clone:function(t){var n=new a(6);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},fromValues:function(t,n,r,u,e,o){var i=new a(6);return i[0]=t,i[1]=n,i[2]=r,i[3]=u,i[4]=e,i[5]=o,i},set:function(t,n,a,r,u,e,o){return t[0]=n,t[1]=a,t[2]=r,t[3]=u,t[4]=e,t[5]=o,t},invert:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=n[4],i=n[5],h=a*e-r*u;return h?(h=1/h,t[0]=e*h,t[1]=-r*h,t[2]=-u*h,t[3]=a*h,t[4]=(u*i-e*o)*h,t[5]=(r*o-a*i)*h,t):null},determinant:function(t){return t[0]*t[3]-t[1]*t[2]},multiply:M,rotate:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=Math.sin(a),s=Math.cos(a);return t[0]=r*s+e*c,t[1]=u*s+o*c,t[2]=r*-c+e*s,t[3]=u*-c+o*s,t[4]=i,t[5]=h,t},scale:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=a[0],s=a[1];return t[0]=r*c,t[1]=u*c,t[2]=e*s,t[3]=o*s,t[4]=i,t[5]=h,t},translate:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=a[0],s=a[1];return t[0]=r,t[1]=u,t[2]=e,t[3]=o,t[4]=r*c+e*s+i,t[5]=u*c+o*s+h,t},fromRotation:function(t,n){var a=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=a,t[2]=-a,t[3]=r,t[4]=0,t[5]=0,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t[4]=0,t[5]=0,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=n[0],t[5]=n[1],t},str:function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],1)},add:function(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t[4]=n[4]+a[4],t[5]=n[5]+a[5],t},subtract:f,multiplyScalar:function(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*a,t[5]=n[5]*a,t},multiplyScalarAndAdd:function(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t[4]=n[4]+a[4]*r,t[5]=n[5]+a[5]*r,t},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]},equals:function(t,a){var r=t[0],u=t[1],e=t[2],o=t[3],i=t[4],h=t[5],c=a[0],s=a[1],M=a[2],f=a[3],l=a[4],v=a[5];return Math.abs(r-c)<=n*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(u-s)<=n*Math.max(1,Math.abs(u),Math.abs(s))&&Math.abs(e-M)<=n*Math.max(1,Math.abs(e),Math.abs(M))&&Math.abs(o-f)<=n*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(i-l)<=n*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(h-v)<=n*Math.max(1,Math.abs(h),Math.abs(v))},mul:l,sub:v});function m(){var t=new a(9);return a!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function d(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=n[8],f=a[0],l=a[1],v=a[2],b=a[3],m=a[4],d=a[5],x=a[6],p=a[7],y=a[8];return t[0]=f*r+l*o+v*c,t[1]=f*u+l*i+v*s,t[2]=f*e+l*h+v*M,t[3]=b*r+m*o+d*c,t[4]=b*u+m*i+d*s,t[5]=b*e+m*h+d*M,t[6]=x*r+p*o+y*c,t[7]=x*u+p*i+y*s,t[8]=x*e+p*h+y*M,t}function x(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t[4]=n[4]-a[4],t[5]=n[5]-a[5],t[6]=n[6]-a[6],t[7]=n[7]-a[7],t[8]=n[8]-a[8],t}var p=d,y=x,q=Object.freeze({__proto__:null,create:m,fromMat4:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t},clone:function(t){var n=new a(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},fromValues:function(t,n,r,u,e,o,i,h,c){var s=new a(9);return s[0]=t,s[1]=n,s[2]=r,s[3]=u,s[4]=e,s[5]=o,s[6]=i,s[7]=h,s[8]=c,s},set:function(t,n,a,r,u,e,o,i,h,c){return t[0]=n,t[1]=a,t[2]=r,t[3]=u,t[4]=e,t[5]=o,t[6]=i,t[7]=h,t[8]=c,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},transpose:function(t,n){if(t===n){var a=n[1],r=n[2],u=n[5];t[1]=n[3],t[2]=n[6],t[3]=a,t[5]=n[7],t[6]=r,t[7]=u}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t},invert:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=n[4],i=n[5],h=n[6],c=n[7],s=n[8],M=s*o-i*c,f=-s*e+i*h,l=c*e-o*h,v=a*M+r*f+u*l;return v?(v=1/v,t[0]=M*v,t[1]=(-s*r+u*c)*v,t[2]=(i*r-u*o)*v,t[3]=f*v,t[4]=(s*a-u*h)*v,t[5]=(-i*a+u*e)*v,t[6]=l*v,t[7]=(-c*a+r*h)*v,t[8]=(o*a-r*e)*v,t):null},adjoint:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=n[4],i=n[5],h=n[6],c=n[7],s=n[8];return t[0]=o*s-i*c,t[1]=u*c-r*s,t[2]=r*i-u*o,t[3]=i*h-e*s,t[4]=a*s-u*h,t[5]=u*e-a*i,t[6]=e*c-o*h,t[7]=r*h-a*c,t[8]=a*o-r*e,t},determinant:function(t){var n=t[0],a=t[1],r=t[2],u=t[3],e=t[4],o=t[5],i=t[6],h=t[7],c=t[8];return n*(c*e-o*h)+a*(-c*u+o*i)+r*(h*u-e*i)},multiply:d,translate:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=n[8],f=a[0],l=a[1];return t[0]=r,t[1]=u,t[2]=e,t[3]=o,t[4]=i,t[5]=h,t[6]=f*r+l*o+c,t[7]=f*u+l*i+s,t[8]=f*e+l*h+M,t},rotate:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=n[8],f=Math.sin(a),l=Math.cos(a);return t[0]=l*r+f*o,t[1]=l*u+f*i,t[2]=l*e+f*h,t[3]=l*o-f*r,t[4]=l*i-f*u,t[5]=l*h-f*e,t[6]=c,t[7]=s,t[8]=M,t},scale:function(t,n,a){var r=a[0],u=a[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=u*n[3],t[4]=u*n[4],t[5]=u*n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},fromRotation:function(t,n){var a=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=a,t[2]=0,t[3]=-a,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromQuat:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=a+a,i=r+r,h=u+u,c=a*o,s=r*o,M=r*i,f=u*o,l=u*i,v=u*h,b=e*o,m=e*i,d=e*h;return t[0]=1-M-v,t[3]=s-d,t[6]=f+m,t[1]=s+d,t[4]=1-c-v,t[7]=l-b,t[2]=f-m,t[5]=l+b,t[8]=1-c-M,t},normalFromMat4:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=n[4],i=n[5],h=n[6],c=n[7],s=n[8],M=n[9],f=n[10],l=n[11],v=n[12],b=n[13],m=n[14],d=n[15],x=a*i-r*o,p=a*h-u*o,y=a*c-e*o,q=r*h-u*i,g=r*c-e*i,_=u*c-e*h,A=s*b-M*v,w=s*m-f*v,z=s*d-l*v,R=M*m-f*b,j=M*d-l*b,P=f*d-l*m,T=x*P-p*j+y*R+q*z-g*w+_*A;return T?(T=1/T,t[0]=(i*P-h*j+c*R)*T,t[1]=(h*z-o*P-c*w)*T,t[2]=(o*j-i*z+c*A)*T,t[3]=(u*j-r*P-e*R)*T,t[4]=(a*P-u*z+e*w)*T,t[5]=(r*z-a*j-e*A)*T,t[6]=(b*_-m*g+d*q)*T,t[7]=(m*y-v*_-d*p)*T,t[8]=(v*g-b*y+d*x)*T,t):null},projection:function(t,n,a){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/a,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},add:function(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t[4]=n[4]+a[4],t[5]=n[5]+a[5],t[6]=n[6]+a[6],t[7]=n[7]+a[7],t[8]=n[8]+a[8],t},subtract:x,multiplyScalar:function(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*a,t[5]=n[5]*a,t[6]=n[6]*a,t[7]=n[7]*a,t[8]=n[8]*a,t},multiplyScalarAndAdd:function(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t[4]=n[4]+a[4]*r,t[5]=n[5]+a[5]*r,t[6]=n[6]+a[6]*r,t[7]=n[7]+a[7]*r,t[8]=n[8]+a[8]*r,t},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},equals:function(t,a){var r=t[0],u=t[1],e=t[2],o=t[3],i=t[4],h=t[5],c=t[6],s=t[7],M=t[8],f=a[0],l=a[1],v=a[2],b=a[3],m=a[4],d=a[5],x=a[6],p=a[7],y=a[8];return Math.abs(r-f)<=n*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(u-l)<=n*Math.max(1,Math.abs(u),Math.abs(l))&&Math.abs(e-v)<=n*Math.max(1,Math.abs(e),Math.abs(v))&&Math.abs(o-b)<=n*Math.max(1,Math.abs(o),Math.abs(b))&&Math.abs(i-m)<=n*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(h-d)<=n*Math.max(1,Math.abs(h),Math.abs(d))&&Math.abs(c-x)<=n*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(s-p)<=n*Math.max(1,Math.abs(s),Math.abs(p))&&Math.abs(M-y)<=n*Math.max(1,Math.abs(M),Math.abs(y))},mul:p,sub:y});function g(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=n[8],f=n[9],l=n[10],v=n[11],b=n[12],m=n[13],d=n[14],x=n[15],p=a[0],y=a[1],q=a[2],g=a[3];return t[0]=p*r+y*i+q*M+g*b,t[1]=p*u+y*h+q*f+g*m,t[2]=p*e+y*c+q*l+g*d,t[3]=p*o+y*s+q*v+g*x,p=a[4],y=a[5],q=a[6],g=a[7],t[4]=p*r+y*i+q*M+g*b,t[5]=p*u+y*h+q*f+g*m,t[6]=p*e+y*c+q*l+g*d,t[7]=p*o+y*s+q*v+g*x,p=a[8],y=a[9],q=a[10],g=a[11],t[8]=p*r+y*i+q*M+g*b,t[9]=p*u+y*h+q*f+g*m,t[10]=p*e+y*c+q*l+g*d,t[11]=p*o+y*s+q*v+g*x,p=a[12],y=a[13],q=a[14],g=a[15],t[12]=p*r+y*i+q*M+g*b,t[13]=p*u+y*h+q*f+g*m,t[14]=p*e+y*c+q*l+g*d,t[15]=p*o+y*s+q*v+g*x,t}function A(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=r+r,h=u+u,c=e+e,s=r*i,M=r*h,f=r*c,l=u*h,v=u*c,b=e*c,m=o*i,d=o*h,x=o*c;return t[0]=1-(l+b),t[1]=M+x,t[2]=f-d,t[3]=0,t[4]=M-x,t[5]=1-(s+b),t[6]=v+m,t[7]=0,t[8]=f+d,t[9]=v-m,t[10]=1-(s+l),t[11]=0,t[12]=a[0],t[13]=a[1],t[14]=a[2],t[15]=1,t}function w(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function z(t,n){var a=n[0],r=n[1],u=n[2],e=n[4],o=n[5],i=n[6],h=n[8],c=n[9],s=n[10];return t[0]=Math.hypot(a,r,u),t[1]=Math.hypot(e,o,i),t[2]=Math.hypot(h,c,s),t}function R(t,n){var r=new a(3);z(r,n);var u=1/r[0],e=1/r[1],o=1/r[2],i=n[0]*u,h=n[1]*e,c=n[2]*o,s=n[4]*u,M=n[5]*e,f=n[6]*o,l=n[8]*u,v=n[9]*e,b=n[10]*o,m=i+M+b,d=0;return m>0?(d=2*Math.sqrt(m+1),t[3]=.25*d,t[0]=(f-v)/d,t[1]=(l-c)/d,t[2]=(h-s)/d):i>M&&i>b?(d=2*Math.sqrt(1+i-M-b),t[3]=(f-v)/d,t[0]=.25*d,t[1]=(h+s)/d,t[2]=(l+c)/d):M>b?(d=2*Math.sqrt(1+M-i-b),t[3]=(l-c)/d,t[0]=(h+s)/d,t[1]=.25*d,t[2]=(f+v)/d):(d=2*Math.sqrt(1+b-i-M),t[3]=(h-s)/d,t[0]=(l+c)/d,t[1]=(f+v)/d,t[2]=.25*d),t}function j(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t[4]=n[4]-a[4],t[5]=n[5]-a[5],t[6]=n[6]-a[6],t[7]=n[7]-a[7],t[8]=n[8]-a[8],t[9]=n[9]-a[9],t[10]=n[10]-a[10],t[11]=n[11]-a[11],t[12]=n[12]-a[12],t[13]=n[13]-a[13],t[14]=n[14]-a[14],t[15]=n[15]-a[15],t}var P=_,T=j,S=Object.freeze({__proto__:null,create:function(){var t=new a(16);return a!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},clone:function(t){var n=new a(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},fromValues:function(t,n,r,u,e,o,i,h,c,s,M,f,l,v,b,m){var d=new a(16);return d[0]=t,d[1]=n,d[2]=r,d[3]=u,d[4]=e,d[5]=o,d[6]=i,d[7]=h,d[8]=c,d[9]=s,d[10]=M,d[11]=f,d[12]=l,d[13]=v,d[14]=b,d[15]=m,d},set:function(t,n,a,r,u,e,o,i,h,c,s,M,f,l,v,b,m){return t[0]=n,t[1]=a,t[2]=r,t[3]=u,t[4]=e,t[5]=o,t[6]=i,t[7]=h,t[8]=c,t[9]=s,t[10]=M,t[11]=f,t[12]=l,t[13]=v,t[14]=b,t[15]=m,t},identity:g,transpose:function(t,n){if(t===n){var a=n[1],r=n[2],u=n[3],e=n[6],o=n[7],i=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=a,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=e,t[11]=n[14],t[12]=u,t[13]=o,t[14]=i}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t},invert:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=n[4],i=n[5],h=n[6],c=n[7],s=n[8],M=n[9],f=n[10],l=n[11],v=n[12],b=n[13],m=n[14],d=n[15],x=a*i-r*o,p=a*h-u*o,y=a*c-e*o,q=r*h-u*i,g=r*c-e*i,_=u*c-e*h,A=s*b-M*v,w=s*m-f*v,z=s*d-l*v,R=M*m-f*b,j=M*d-l*b,P=f*d-l*m,T=x*P-p*j+y*R+q*z-g*w+_*A;return T?(T=1/T,t[0]=(i*P-h*j+c*R)*T,t[1]=(u*j-r*P-e*R)*T,t[2]=(b*_-m*g+d*q)*T,t[3]=(f*g-M*_-l*q)*T,t[4]=(h*z-o*P-c*w)*T,t[5]=(a*P-u*z+e*w)*T,t[6]=(m*y-v*_-d*p)*T,t[7]=(s*_-f*y+l*p)*T,t[8]=(o*j-i*z+c*A)*T,t[9]=(r*z-a*j-e*A)*T,t[10]=(v*g-b*y+d*x)*T,t[11]=(M*y-s*g-l*x)*T,t[12]=(i*w-o*R-h*A)*T,t[13]=(a*R-r*w+u*A)*T,t[14]=(b*p-v*q-m*x)*T,t[15]=(s*q-M*p+f*x)*T,t):null},adjoint:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=n[4],i=n[5],h=n[6],c=n[7],s=n[8],M=n[9],f=n[10],l=n[11],v=n[12],b=n[13],m=n[14],d=n[15],x=a*i-r*o,p=a*h-u*o,y=a*c-e*o,q=r*h-u*i,g=r*c-e*i,_=u*c-e*h,A=s*b-M*v,w=s*m-f*v,z=s*d-l*v,R=M*m-f*b,j=M*d-l*b,P=f*d-l*m;return t[0]=i*P-h*j+c*R,t[1]=u*j-r*P-e*R,t[2]=b*_-m*g+d*q,t[3]=f*g-M*_-l*q,t[4]=h*z-o*P-c*w,t[5]=a*P-u*z+e*w,t[6]=m*y-v*_-d*p,t[7]=s*_-f*y+l*p,t[8]=o*j-i*z+c*A,t[9]=r*z-a*j-e*A,t[10]=v*g-b*y+d*x,t[11]=M*y-s*g-l*x,t[12]=i*w-o*R-h*A,t[13]=a*R-r*w+u*A,t[14]=b*p-v*q-m*x,t[15]=s*q-M*p+f*x,t},determinant:function(t){var n=t[0],a=t[1],r=t[2],u=t[3],e=t[4],o=t[5],i=t[6],h=t[7],c=t[8],s=t[9],M=t[10],f=t[11],l=t[12],v=t[13],b=t[14],m=n*o-a*e,d=n*i-r*e,x=a*i-r*o,p=c*v-s*l,y=c*b-M*l,q=s*b-M*v;return h*(n*q-a*y+r*p)-u*(e*q-o*y+i*p)+t[15]*(c*x-s*d+M*m)-f*(l*x-v*d+b*m)},multiply:_,translate:function(t,n,a){var r,u,e,o,i,h,c,s,M,f,l,v,b=a[0],m=a[1],d=a[2];return n===t?(t[12]=n[0]*b+n[4]*m+n[8]*d+n[12],t[13]=n[1]*b+n[5]*m+n[9]*d+n[13],t[14]=n[2]*b+n[6]*m+n[10]*d+n[14],t[15]=n[3]*b+n[7]*m+n[11]*d+n[15]):(r=n[0],u=n[1],e=n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=n[8],f=n[9],l=n[10],v=n[11],t[0]=r,t[1]=u,t[2]=e,t[3]=o,t[4]=i,t[5]=h,t[6]=c,t[7]=s,t[8]=M,t[9]=f,t[10]=l,t[11]=v,t[12]=r*b+i*m+M*d+n[12],t[13]=u*b+h*m+f*d+n[13],t[14]=e*b+c*m+l*d+n[14],t[15]=o*b+s*m+v*d+n[15]),t},scale:function(t,n,a){var r=a[0],u=a[1],e=a[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*u,t[5]=n[5]*u,t[6]=n[6]*u,t[7]=n[7]*u,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},rotate:function(t,a,r,u){var e,o,i,h,c,s,M,f,l,v,b,m,d,x,p,y,q,g,_,A,w,z,R,j,P=u[0],T=u[1],S=u[2],E=Math.hypot(P,T,S);return E0?(r[0]=2*(h*i+M*u+c*o-s*e)/f,r[1]=2*(c*i+M*e+s*u-h*o)/f,r[2]=2*(s*i+M*o+h*e-c*u)/f):(r[0]=2*(h*i+M*u+c*o-s*e),r[1]=2*(c*i+M*e+s*u-h*o),r[2]=2*(s*i+M*o+h*e-c*u)),A(t,n,r),t},getTranslation:w,getScaling:z,getRotation:R,decompose:function(t,n,a,r){n[0]=r[12],n[1]=r[13],n[2]=r[14];var u=r[0],e=r[1],o=r[2],i=r[4],h=r[5],c=r[6],s=r[8],M=r[9],f=r[10];a[0]=Math.hypot(u,e,o),a[1]=Math.hypot(i,h,c),a[2]=Math.hypot(s,M,f);var l=1/a[0],v=1/a[1],b=1/a[2],m=u*l,d=e*v,x=o*b,p=i*l,y=h*v,q=c*b,g=s*l,_=M*v,A=f*b,w=m+y+A,z=0;return w>0?(z=2*Math.sqrt(w+1),t[3]=.25*z,t[0]=(q-_)/z,t[1]=(g-x)/z,t[2]=(d-p)/z):m>y&&m>A?(z=2*Math.sqrt(1+m-y-A),t[3]=(q-_)/z,t[0]=.25*z,t[1]=(d+p)/z,t[2]=(g+x)/z):y>A?(z=2*Math.sqrt(1+y-m-A),t[3]=(g-x)/z,t[0]=(d+p)/z,t[1]=.25*z,t[2]=(q+_)/z):(z=2*Math.sqrt(1+A-m-y),t[3]=(d-p)/z,t[0]=(g+x)/z,t[1]=(q+_)/z,t[2]=.25*z),t},fromRotationTranslationScale:function(t,n,a,r){var u=n[0],e=n[1],o=n[2],i=n[3],h=u+u,c=e+e,s=o+o,M=u*h,f=u*c,l=u*s,v=e*c,b=e*s,m=o*s,d=i*h,x=i*c,p=i*s,y=r[0],q=r[1],g=r[2];return t[0]=(1-(v+m))*y,t[1]=(f+p)*y,t[2]=(l-x)*y,t[3]=0,t[4]=(f-p)*q,t[5]=(1-(M+m))*q,t[6]=(b+d)*q,t[7]=0,t[8]=(l+x)*g,t[9]=(b-d)*g,t[10]=(1-(M+v))*g,t[11]=0,t[12]=a[0],t[13]=a[1],t[14]=a[2],t[15]=1,t},fromRotationTranslationScaleOrigin:function(t,n,a,r,u){var e=n[0],o=n[1],i=n[2],h=n[3],c=e+e,s=o+o,M=i+i,f=e*c,l=e*s,v=e*M,b=o*s,m=o*M,d=i*M,x=h*c,p=h*s,y=h*M,q=r[0],g=r[1],_=r[2],A=u[0],w=u[1],z=u[2],R=(1-(b+d))*q,j=(l+y)*q,P=(v-p)*q,T=(l-y)*g,S=(1-(f+d))*g,E=(m+x)*g,O=(v+p)*_,D=(m-x)*_,F=(1-(f+b))*_;return t[0]=R,t[1]=j,t[2]=P,t[3]=0,t[4]=T,t[5]=S,t[6]=E,t[7]=0,t[8]=O,t[9]=D,t[10]=F,t[11]=0,t[12]=a[0]+A-(R*A+T*w+O*z),t[13]=a[1]+w-(j*A+S*w+D*z),t[14]=a[2]+z-(P*A+E*w+F*z),t[15]=1,t},fromQuat:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=a+a,i=r+r,h=u+u,c=a*o,s=r*o,M=r*i,f=u*o,l=u*i,v=u*h,b=e*o,m=e*i,d=e*h;return t[0]=1-M-v,t[1]=s+d,t[2]=f-m,t[3]=0,t[4]=s-d,t[5]=1-c-v,t[6]=l+b,t[7]=0,t[8]=f+m,t[9]=l-b,t[10]=1-c-M,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,n,a,r,u,e,o){var i=1/(a-n),h=1/(u-r),c=1/(e-o);return t[0]=2*e*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*e*h,t[6]=0,t[7]=0,t[8]=(a+n)*i,t[9]=(u+r)*h,t[10]=(o+e)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*e*2*c,t[15]=0,t},perspective:function(t,n,a,r,u){var e,o=1/Math.tan(n/2);return t[0]=o/a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=u&&u!==1/0?(e=1/(r-u),t[10]=(u+r)*e,t[14]=2*u*r*e):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,n,a,r){var u=Math.tan(n.upDegrees*Math.PI/180),e=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),i=Math.tan(n.rightDegrees*Math.PI/180),h=2/(o+i),c=2/(u+e);return t[0]=h,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(o-i)*h*.5,t[9]=(u-e)*c*.5,t[10]=r/(a-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*a/(a-r),t[15]=0,t},ortho:function(t,n,a,r,u,e,o){var i=1/(n-a),h=1/(r-u),c=1/(e-o);return t[0]=-2*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*h,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(n+a)*i,t[13]=(u+r)*h,t[14]=(o+e)*c,t[15]=1,t},lookAt:function(t,a,r,u){var e,o,i,h,c,s,M,f,l,v,b=a[0],m=a[1],d=a[2],x=u[0],p=u[1],y=u[2],q=r[0],_=r[1],A=r[2];return Math.abs(b-q)0&&(s*=l=1/Math.sqrt(l),M*=l,f*=l);var v=h*f-c*M,b=c*s-i*f,m=i*M-h*s;return(l=v*v+b*b+m*m)>0&&(v*=l=1/Math.sqrt(l),b*=l,m*=l),t[0]=v,t[1]=b,t[2]=m,t[3]=0,t[4]=M*m-f*b,t[5]=f*v-s*m,t[6]=s*b-M*v,t[7]=0,t[8]=s,t[9]=M,t[10]=f,t[11]=0,t[12]=u,t[13]=e,t[14]=o,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t[4]=n[4]+a[4],t[5]=n[5]+a[5],t[6]=n[6]+a[6],t[7]=n[7]+a[7],t[8]=n[8]+a[8],t[9]=n[9]+a[9],t[10]=n[10]+a[10],t[11]=n[11]+a[11],t[12]=n[12]+a[12],t[13]=n[13]+a[13],t[14]=n[14]+a[14],t[15]=n[15]+a[15],t},subtract:j,multiplyScalar:function(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*a,t[5]=n[5]*a,t[6]=n[6]*a,t[7]=n[7]*a,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=n[11]*a,t[12]=n[12]*a,t[13]=n[13]*a,t[14]=n[14]*a,t[15]=n[15]*a,t},multiplyScalarAndAdd:function(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t[4]=n[4]+a[4]*r,t[5]=n[5]+a[5]*r,t[6]=n[6]+a[6]*r,t[7]=n[7]+a[7]*r,t[8]=n[8]+a[8]*r,t[9]=n[9]+a[9]*r,t[10]=n[10]+a[10]*r,t[11]=n[11]+a[11]*r,t[12]=n[12]+a[12]*r,t[13]=n[13]+a[13]*r,t[14]=n[14]+a[14]*r,t[15]=n[15]+a[15]*r,t},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]},equals:function(t,a){var r=t[0],u=t[1],e=t[2],o=t[3],i=t[4],h=t[5],c=t[6],s=t[7],M=t[8],f=t[9],l=t[10],v=t[11],b=t[12],m=t[13],d=t[14],x=t[15],p=a[0],y=a[1],q=a[2],g=a[3],_=a[4],A=a[5],w=a[6],z=a[7],R=a[8],j=a[9],P=a[10],T=a[11],S=a[12],E=a[13],O=a[14],D=a[15];return Math.abs(r-p)<=n*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(u-y)<=n*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(e-q)<=n*Math.max(1,Math.abs(e),Math.abs(q))&&Math.abs(o-g)<=n*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(i-_)<=n*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(h-A)<=n*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(c-w)<=n*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(s-z)<=n*Math.max(1,Math.abs(s),Math.abs(z))&&Math.abs(M-R)<=n*Math.max(1,Math.abs(M),Math.abs(R))&&Math.abs(f-j)<=n*Math.max(1,Math.abs(f),Math.abs(j))&&Math.abs(l-P)<=n*Math.max(1,Math.abs(l),Math.abs(P))&&Math.abs(v-T)<=n*Math.max(1,Math.abs(v),Math.abs(T))&&Math.abs(b-S)<=n*Math.max(1,Math.abs(b),Math.abs(S))&&Math.abs(m-E)<=n*Math.max(1,Math.abs(m),Math.abs(E))&&Math.abs(d-O)<=n*Math.max(1,Math.abs(d),Math.abs(O))&&Math.abs(x-D)<=n*Math.max(1,Math.abs(x),Math.abs(D))},mul:P,sub:T});function E(){var t=new a(3);return a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function O(t){var n=t[0],a=t[1],r=t[2];return Math.hypot(n,a,r)}function D(t,n,r){var u=new a(3);return u[0]=t,u[1]=n,u[2]=r,u}function F(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t}function I(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t}function L(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t}function V(t,n){var a=n[0]-t[0],r=n[1]-t[1],u=n[2]-t[2];return Math.hypot(a,r,u)}function Q(t,n){var a=n[0]-t[0],r=n[1]-t[1],u=n[2]-t[2];return a*a+r*r+u*u}function Y(t){var n=t[0],a=t[1],r=t[2];return n*n+a*a+r*r}function k(t,n){var a=n[0],r=n[1],u=n[2],e=a*a+r*r+u*u;return e>0&&(e=1/Math.sqrt(e)),t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function X(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Z(t,n,a){var r=n[0],u=n[1],e=n[2],o=a[0],i=a[1],h=a[2];return t[0]=u*h-e*i,t[1]=e*o-r*h,t[2]=r*i-u*o,t}var B,N=F,C=I,U=L,W=V,G=Q,H=O,J=Y,K=(B=E(),function(t,n,a,r,u,e){var o,i;for(n||(n=3),a||(a=0),i=r?Math.min(r*n+a,t.length):t.length,o=a;o0&&(o=1/Math.sqrt(o)),t[0]=a*o,t[1]=r*o,t[2]=u*o,t[3]=e*o,t}function bt(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function mt(t,n,a,r){var u=n[0],e=n[1],o=n[2],i=n[3];return t[0]=u+r*(a[0]-u),t[1]=e+r*(a[1]-e),t[2]=o+r*(a[2]-o),t[3]=i+r*(a[3]-i),t}function dt(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function xt(t,a){var r=t[0],u=t[1],e=t[2],o=t[3],i=a[0],h=a[1],c=a[2],s=a[3];return Math.abs(r-i)<=n*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(u-h)<=n*Math.max(1,Math.abs(u),Math.abs(h))&&Math.abs(e-c)<=n*Math.max(1,Math.abs(e),Math.abs(c))&&Math.abs(o-s)<=n*Math.max(1,Math.abs(o),Math.abs(s))}var pt=ot,yt=it,qt=ht,gt=st,_t=Mt,At=ft,wt=lt,zt=function(){var t=tt();return function(n,a,r,u,e,o){var i,h;for(a||(a=4),r||(r=0),h=u?Math.min(u*a+r,n.length):n.length,i=r;i=1);do{h=(e=2*r()-1)*e+(o=2*r()-1)*o}while(h>=1);var c=Math.sqrt((1-i)/h);return t[0]=n*a,t[1]=n*u,t[2]=n*e*c,t[3]=n*o*c,t},transformMat4:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3];return t[0]=a[0]*r+a[4]*u+a[8]*e+a[12]*o,t[1]=a[1]*r+a[5]*u+a[9]*e+a[13]*o,t[2]=a[2]*r+a[6]*u+a[10]*e+a[14]*o,t[3]=a[3]*r+a[7]*u+a[11]*e+a[15]*o,t},transformQuat:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=a[0],i=a[1],h=a[2],c=a[3],s=c*r+i*e-h*u,M=c*u+h*r-o*e,f=c*e+o*u-i*r,l=-o*r-i*u-h*e;return t[0]=s*c+l*-o+M*-h-f*-i,t[1]=M*c+l*-i+f*-o-s*-h,t[2]=f*c+l*-h+s*-i-M*-o,t[3]=n[3],t},zero:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},exactEquals:dt,equals:xt,sub:pt,mul:yt,div:qt,dist:gt,sqrDist:_t,len:At,sqrLen:wt,forEach:zt});function jt(){var t=new a(4);return a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Pt(t,n,a){a*=.5;var r=Math.sin(a);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(a),t}function Tt(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=a[0],h=a[1],c=a[2],s=a[3];return t[0]=r*s+o*i+u*c-e*h,t[1]=u*s+o*h+e*i-r*c,t[2]=e*s+o*c+r*h-u*i,t[3]=o*s-r*i-u*h-e*c,t}function St(t,n,a){a*=.5;var r=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(a),h=Math.cos(a);return t[0]=r*h+o*i,t[1]=u*h+e*i,t[2]=e*h-u*i,t[3]=o*h-r*i,t}function Et(t,n,a){a*=.5;var r=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(a),h=Math.cos(a);return t[0]=r*h-e*i,t[1]=u*h+o*i,t[2]=e*h+r*i,t[3]=o*h-u*i,t}function Ot(t,n,a){a*=.5;var r=n[0],u=n[1],e=n[2],o=n[3],i=Math.sin(a),h=Math.cos(a);return t[0]=r*h+u*i,t[1]=u*h-r*i,t[2]=e*h+o*i,t[3]=o*h-e*i,t}function Dt(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=Math.sqrt(a*a+r*r+u*u),i=Math.exp(e),h=o>0?i*Math.sin(o)/o:0;return t[0]=a*h,t[1]=r*h,t[2]=u*h,t[3]=i*Math.cos(o),t}function Ft(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=Math.sqrt(a*a+r*r+u*u),i=o>0?Math.atan2(o,e)/o:0;return t[0]=a*i,t[1]=r*i,t[2]=u*i,t[3]=.5*Math.log(a*a+r*r+u*u+e*e),t}function It(t,a,r,u){var e,o,i,h,c,s=a[0],M=a[1],f=a[2],l=a[3],v=r[0],b=r[1],m=r[2],d=r[3];return(o=s*v+M*b+f*m+l*d)<0&&(o=-o,v=-v,b=-b,m=-m,d=-d),1-o>n?(e=Math.acos(o),i=Math.sin(e),h=Math.sin((1-u)*e)/i,c=Math.sin(u*e)/i):(h=1-u,c=u),t[0]=h*s+c*v,t[1]=h*M+c*b,t[2]=h*f+c*m,t[3]=h*l+c*d,t}function Lt(t,n){var a,r=n[0]+n[4]+n[8];if(r>0)a=Math.sqrt(r+1),t[3]=.5*a,a=.5/a,t[0]=(n[5]-n[7])*a,t[1]=(n[6]-n[2])*a,t[2]=(n[1]-n[3])*a;else{var u=0;n[4]>n[0]&&(u=1),n[8]>n[3*u+u]&&(u=2);var e=(u+1)%3,o=(u+2)%3;a=Math.sqrt(n[3*u+u]-n[3*e+e]-n[3*o+o]+1),t[u]=.5*a,a=.5/a,t[3]=(n[3*e+o]-n[3*o+e])*a,t[e]=(n[3*e+u]+n[3*u+e])*a,t[o]=(n[3*o+u]+n[3*u+o])*a}return t}var Vt,Qt,Yt,kt,Xt,Zt,Bt=nt,Nt=at,Ct=rt,Ut=ut,Wt=et,Gt=Tt,Ht=ct,Jt=bt,Kt=mt,$t=ft,tn=$t,nn=lt,an=nn,rn=vt,un=dt,en=xt,on=(Vt=E(),Qt=D(1,0,0),Yt=D(0,1,0),function(t,n,a){var r=X(n,a);return r<-.999999?(Z(Vt,Qt,n),H(Vt)<1e-6&&Z(Vt,Yt,n),k(Vt,Vt),Pt(t,Vt,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(Z(Vt,n,a),t[0]=Vt[0],t[1]=Vt[1],t[2]=Vt[2],t[3]=1+r,rn(t,t))}),hn=(kt=jt(),Xt=jt(),function(t,n,a,r,u,e){return It(kt,n,u,e),It(Xt,a,r,e),It(t,kt,Xt,2*e*(1-e)),t}),cn=(Zt=m(),function(t,n,a,r){return Zt[0]=a[0],Zt[3]=a[1],Zt[6]=a[2],Zt[1]=r[0],Zt[4]=r[1],Zt[7]=r[2],Zt[2]=-n[0],Zt[5]=-n[1],Zt[8]=-n[2],rn(t,Lt(t,Zt))}),sn=Object.freeze({__proto__:null,create:jt,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},setAxisAngle:Pt,getAxisAngle:function(t,a){var r=2*Math.acos(a[3]),u=Math.sin(r/2);return u>n?(t[0]=a[0]/u,t[1]=a[1]/u,t[2]=a[2]/u):(t[0]=1,t[1]=0,t[2]=0),r},getAngle:function(t,n){var a=Jt(t,n);return Math.acos(2*a*a-1)},multiply:Tt,rotateX:St,rotateY:Et,rotateZ:Ot,calculateW:function(t,n){var a=n[0],r=n[1],u=n[2];return t[0]=a,t[1]=r,t[2]=u,t[3]=Math.sqrt(Math.abs(1-a*a-r*r-u*u)),t},exp:Dt,ln:Ft,pow:function(t,n,a){return Ft(t,n),Ht(t,t,a),Dt(t,t),t},slerp:It,random:function(t){var n=r(),a=r(),u=r(),e=Math.sqrt(1-n),o=Math.sqrt(n);return t[0]=e*Math.sin(2*Math.PI*a),t[1]=e*Math.cos(2*Math.PI*a),t[2]=o*Math.sin(2*Math.PI*u),t[3]=o*Math.cos(2*Math.PI*u),t},invert:function(t,n){var a=n[0],r=n[1],u=n[2],e=n[3],o=a*a+r*r+u*u+e*e,i=o?1/o:0;return t[0]=-a*i,t[1]=-r*i,t[2]=-u*i,t[3]=e*i,t},conjugate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t},fromMat3:Lt,fromEuler:function(t,n,a,r){var u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"zyx",e=.5*Math.PI/180;n*=e,r*=e,a*=e;var o=Math.sin(n),i=Math.cos(n),h=Math.sin(a),c=Math.cos(a),s=Math.sin(r),M=Math.cos(r);switch("string"!=typeof u&&(u="zyx"),u.toLowerCase()){case"xyz":t[0]=o*c*M+i*h*s,t[1]=i*h*M-o*c*s,t[2]=i*c*s+o*h*M,t[3]=i*c*M-o*h*s;break;case"xzy":t[0]=o*c*M-i*h*s,t[1]=i*h*M-o*c*s,t[2]=i*c*s+o*h*M,t[3]=i*c*M+o*h*s;break;case"yxz":t[0]=o*c*M+i*h*s,t[1]=i*h*M-o*c*s,t[2]=i*c*s-o*h*M,t[3]=i*c*M+o*h*s;break;case"yzx":t[0]=o*c*M+i*h*s,t[1]=i*h*M+o*c*s,t[2]=i*c*s-o*h*M,t[3]=i*c*M-o*h*s;break;case"zxy":t[0]=o*c*M-i*h*s,t[1]=i*h*M+o*c*s,t[2]=i*c*s+o*h*M,t[3]=i*c*M-o*h*s;break;case"zyx":default:t[0]=o*c*M-i*h*s,t[1]=i*h*M+o*c*s,t[2]=i*c*s-o*h*M,t[3]=i*c*M+o*h*s}return t},str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},clone:Bt,fromValues:Nt,copy:Ct,set:Ut,add:Wt,mul:Gt,scale:Ht,dot:Jt,lerp:Kt,length:$t,len:tn,squaredLength:nn,sqrLen:an,normalize:rn,exactEquals:un,equals:en,rotationTo:on,sqlerp:hn,setAxes:cn});function Mn(t,n,a){var r=.5*a[0],u=.5*a[1],e=.5*a[2],o=n[0],i=n[1],h=n[2],c=n[3];return t[0]=o,t[1]=i,t[2]=h,t[3]=c,t[4]=r*c+u*h-e*i,t[5]=u*c+e*o-r*h,t[6]=e*c+r*i-u*o,t[7]=-r*o-u*i-e*h,t}function fn(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t}var ln=Ct;var vn=Ct;function bn(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=a[4],h=a[5],c=a[6],s=a[7],M=n[4],f=n[5],l=n[6],v=n[7],b=a[0],m=a[1],d=a[2],x=a[3];return t[0]=r*x+o*b+u*d-e*m,t[1]=u*x+o*m+e*b-r*d,t[2]=e*x+o*d+r*m-u*b,t[3]=o*x-r*b-u*m-e*d,t[4]=r*s+o*i+u*c-e*h+M*x+v*b+f*d-l*m,t[5]=u*s+o*h+e*i-r*c+f*x+v*m+l*b-M*d,t[6]=e*s+o*c+r*h-u*i+l*x+v*d+M*m-f*b,t[7]=o*s-r*i-u*h-e*c+v*x-M*b-f*m-l*d,t}var mn=bn;var dn=Jt;var xn=$t,pn=xn,yn=nn,qn=yn;var gn=Object.freeze({__proto__:null,create:function(){var t=new a(8);return a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0),t[3]=1,t},clone:function(t){var n=new a(8);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n},fromValues:function(t,n,r,u,e,o,i,h){var c=new a(8);return c[0]=t,c[1]=n,c[2]=r,c[3]=u,c[4]=e,c[5]=o,c[6]=i,c[7]=h,c},fromRotationTranslationValues:function(t,n,r,u,e,o,i){var h=new a(8);h[0]=t,h[1]=n,h[2]=r,h[3]=u;var c=.5*e,s=.5*o,M=.5*i;return h[4]=c*u+s*r-M*n,h[5]=s*u+M*t-c*r,h[6]=M*u+c*n-s*t,h[7]=-c*t-s*n-M*r,h},fromRotationTranslation:Mn,fromTranslation:function(t,n){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=.5*n[0],t[5]=.5*n[1],t[6]=.5*n[2],t[7]=0,t},fromRotation:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=0,t[5]=0,t[6]=0,t[7]=0,t},fromMat4:function(t,n){var r=jt();R(r,n);var u=new a(3);return w(u,n),Mn(t,r,u),t},copy:fn,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t},set:function(t,n,a,r,u,e,o,i,h){return t[0]=n,t[1]=a,t[2]=r,t[3]=u,t[4]=e,t[5]=o,t[6]=i,t[7]=h,t},getReal:ln,getDual:function(t,n){return t[0]=n[4],t[1]=n[5],t[2]=n[6],t[3]=n[7],t},setReal:vn,setDual:function(t,n){return t[4]=n[0],t[5]=n[1],t[6]=n[2],t[7]=n[3],t},getTranslation:function(t,n){var a=n[4],r=n[5],u=n[6],e=n[7],o=-n[0],i=-n[1],h=-n[2],c=n[3];return t[0]=2*(a*c+e*o+r*h-u*i),t[1]=2*(r*c+e*i+u*o-a*h),t[2]=2*(u*c+e*h+a*i-r*o),t},translate:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=.5*a[0],h=.5*a[1],c=.5*a[2],s=n[4],M=n[5],f=n[6],l=n[7];return t[0]=r,t[1]=u,t[2]=e,t[3]=o,t[4]=o*i+u*c-e*h+s,t[5]=o*h+e*i-r*c+M,t[6]=o*c+r*h-u*i+f,t[7]=-r*i-u*h-e*c+l,t},rotateX:function(t,n,a){var r=-n[0],u=-n[1],e=-n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=i*o+s*r+h*e-c*u,f=h*o+s*u+c*r-i*e,l=c*o+s*e+i*u-h*r,v=s*o-i*r-h*u-c*e;return St(t,n,a),r=t[0],u=t[1],e=t[2],o=t[3],t[4]=M*o+v*r+f*e-l*u,t[5]=f*o+v*u+l*r-M*e,t[6]=l*o+v*e+M*u-f*r,t[7]=v*o-M*r-f*u-l*e,t},rotateY:function(t,n,a){var r=-n[0],u=-n[1],e=-n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=i*o+s*r+h*e-c*u,f=h*o+s*u+c*r-i*e,l=c*o+s*e+i*u-h*r,v=s*o-i*r-h*u-c*e;return Et(t,n,a),r=t[0],u=t[1],e=t[2],o=t[3],t[4]=M*o+v*r+f*e-l*u,t[5]=f*o+v*u+l*r-M*e,t[6]=l*o+v*e+M*u-f*r,t[7]=v*o-M*r-f*u-l*e,t},rotateZ:function(t,n,a){var r=-n[0],u=-n[1],e=-n[2],o=n[3],i=n[4],h=n[5],c=n[6],s=n[7],M=i*o+s*r+h*e-c*u,f=h*o+s*u+c*r-i*e,l=c*o+s*e+i*u-h*r,v=s*o-i*r-h*u-c*e;return Ot(t,n,a),r=t[0],u=t[1],e=t[2],o=t[3],t[4]=M*o+v*r+f*e-l*u,t[5]=f*o+v*u+l*r-M*e,t[6]=l*o+v*e+M*u-f*r,t[7]=v*o-M*r-f*u-l*e,t},rotateByQuatAppend:function(t,n,a){var r=a[0],u=a[1],e=a[2],o=a[3],i=n[0],h=n[1],c=n[2],s=n[3];return t[0]=i*o+s*r+h*e-c*u,t[1]=h*o+s*u+c*r-i*e,t[2]=c*o+s*e+i*u-h*r,t[3]=s*o-i*r-h*u-c*e,i=n[4],h=n[5],c=n[6],s=n[7],t[4]=i*o+s*r+h*e-c*u,t[5]=h*o+s*u+c*r-i*e,t[6]=c*o+s*e+i*u-h*r,t[7]=s*o-i*r-h*u-c*e,t},rotateByQuatPrepend:function(t,n,a){var r=n[0],u=n[1],e=n[2],o=n[3],i=a[0],h=a[1],c=a[2],s=a[3];return t[0]=r*s+o*i+u*c-e*h,t[1]=u*s+o*h+e*i-r*c,t[2]=e*s+o*c+r*h-u*i,t[3]=o*s-r*i-u*h-e*c,i=a[4],h=a[5],c=a[6],s=a[7],t[4]=r*s+o*i+u*c-e*h,t[5]=u*s+o*h+e*i-r*c,t[6]=e*s+o*c+r*h-u*i,t[7]=o*s-r*i-u*h-e*c,t},rotateAroundAxis:function(t,a,r,u){if(Math.abs(u)0){a=Math.sqrt(a);var r=n[0]/a,u=n[1]/a,e=n[2]/a,o=n[3]/a,i=n[4],h=n[5],c=n[6],s=n[7],M=r*i+u*h+e*c+o*s;t[0]=r,t[1]=u,t[2]=e,t[3]=o,t[4]=(i-r*M)/a,t[5]=(h-u*M)/a,t[6]=(c-e*M)/a,t[7]=(s-o*M)/a}return t},str:function(t){return"quat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+")"},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]},equals:function(t,a){var r=t[0],u=t[1],e=t[2],o=t[3],i=t[4],h=t[5],c=t[6],s=t[7],M=a[0],f=a[1],l=a[2],v=a[3],b=a[4],m=a[5],d=a[6],x=a[7];return Math.abs(r-M)<=n*Math.max(1,Math.abs(r),Math.abs(M))&&Math.abs(u-f)<=n*Math.max(1,Math.abs(u),Math.abs(f))&&Math.abs(e-l)<=n*Math.max(1,Math.abs(e),Math.abs(l))&&Math.abs(o-v)<=n*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(i-b)<=n*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(h-m)<=n*Math.max(1,Math.abs(h),Math.abs(m))&&Math.abs(c-d)<=n*Math.max(1,Math.abs(c),Math.abs(d))&&Math.abs(s-x)<=n*Math.max(1,Math.abs(s),Math.abs(x))}});function _n(){var t=new a(2);return a!=Float32Array&&(t[0]=0,t[1]=0),t}function An(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t}function wn(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t}function zn(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t}function Rn(t,n){var a=n[0]-t[0],r=n[1]-t[1];return Math.hypot(a,r)}function jn(t,n){var a=n[0]-t[0],r=n[1]-t[1];return a*a+r*r}function Pn(t){var n=t[0],a=t[1];return Math.hypot(n,a)}function Tn(t){var n=t[0],a=t[1];return n*n+a*a}var Sn=Pn,En=An,On=wn,Dn=zn,Fn=Rn,In=jn,Ln=Tn,Vn=function(){var t=_n();return function(n,a,r,u,e,o){var i,h;for(a||(a=2),r||(r=0),h=u?Math.min(u*a+r,n.length):n.length,i=r;i0&&(u=1/Math.sqrt(u)),t[0]=n[0]*u,t[1]=n[1]*u,t},dot:function(t,n){return t[0]*n[0]+t[1]*n[1]},cross:function(t,n,a){var r=n[0]*a[1]-n[1]*a[0];return t[0]=t[1]=0,t[2]=r,t},lerp:function(t,n,a,r){var u=n[0],e=n[1];return t[0]=u+r*(a[0]-u),t[1]=e+r*(a[1]-e),t},random:function(t,n){n=n||1;var a=2*r()*Math.PI;return t[0]=Math.cos(a)*n,t[1]=Math.sin(a)*n,t},transformMat2:function(t,n,a){var r=n[0],u=n[1];return t[0]=a[0]*r+a[2]*u,t[1]=a[1]*r+a[3]*u,t},transformMat2d:function(t,n,a){var r=n[0],u=n[1];return t[0]=a[0]*r+a[2]*u+a[4],t[1]=a[1]*r+a[3]*u+a[5],t},transformMat3:function(t,n,a){var r=n[0],u=n[1];return t[0]=a[0]*r+a[3]*u+a[6],t[1]=a[1]*r+a[4]*u+a[7],t},transformMat4:function(t,n,a){var r=n[0],u=n[1];return t[0]=a[0]*r+a[4]*u+a[12],t[1]=a[1]*r+a[5]*u+a[13],t},rotate:function(t,n,a,r){var u=n[0]-a[0],e=n[1]-a[1],o=Math.sin(r),i=Math.cos(r);return t[0]=u*i-e*o+a[0],t[1]=u*o+e*i+a[1],t},angle:function(t,n){var a=t[0],r=t[1],u=n[0],e=n[1],o=Math.sqrt(a*a+r*r)*Math.sqrt(u*u+e*e),i=o&&(a*u+r*e)/o;return Math.acos(Math.min(Math.max(i,-1),1))},zero:function(t){return t[0]=0,t[1]=0,t},str:function(t){return"vec2("+t[0]+", "+t[1]+")"},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]},equals:function(t,a){var r=t[0],u=t[1],e=a[0],o=a[1];return Math.abs(r-e)<=n*Math.max(1,Math.abs(r),Math.abs(e))&&Math.abs(u-o)<=n*Math.max(1,Math.abs(u),Math.abs(o))},len:Sn,sub:En,mul:On,div:Dn,dist:Fn,sqrDist:In,sqrLen:Ln,forEach:Vn});t.glMatrix=e,t.mat2=s,t.mat2d=b,t.mat3=q,t.mat4=S,t.quat=sn,t.quat2=gn,t.vec2=Qn,t.vec3=$,t.vec4=Rt,Object.defineProperty(t,"__esModule",{value:!0})}));
diff --git a/dist/gl-matrix.js b/dist/gl-matrix.js
deleted file mode 100644
index bb0b858a..00000000
--- a/dist/gl-matrix.js
+++ /dev/null
@@ -1,7759 +0,0 @@
-
-/*!
-@fileoverview gl-matrix - High performance matrix and vector operations
-@author Brandon Jones
-@author Colin MacKenzie IV
-@version 3.3.0
-
-Copyright (c) 2015-2020, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-*/
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.glMatrix = {}));
-}(this, (function (exports) { 'use strict';
-
- /**
- * Common utilities
- * @module glMatrix
- */
- // Configuration Constants
- var EPSILON = 0.000001;
- var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;
- var RANDOM = Math.random;
- /**
- * Sets the type of array used when creating new vectors and matrices
- *
- * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array
- */
-
- function setMatrixArrayType(type) {
- ARRAY_TYPE = type;
- }
- var degree = Math.PI / 180;
- /**
- * Convert Degree To Radian
- *
- * @param {Number} a Angle in Degrees
- */
-
- function toRadian(a) {
- return a * degree;
- }
- /**
- * Tests whether or not the arguments have approximately the same value, within an absolute
- * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less
- * than or equal to 1.0, and a relative tolerance is used for larger values)
- *
- * @param {Number} a The first number to test.
- * @param {Number} b The second number to test.
- * @returns {Boolean} True if the numbers are approximately equal, false otherwise.
- */
-
- function equals(a, b) {
- return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));
- }
- if (!Math.hypot) Math.hypot = function () {
- var y = 0,
- i = arguments.length;
-
- while (i--) {
- y += arguments[i] * arguments[i];
- }
-
- return Math.sqrt(y);
- };
-
- var common = /*#__PURE__*/Object.freeze({
- __proto__: null,
- EPSILON: EPSILON,
- get ARRAY_TYPE () { return ARRAY_TYPE; },
- RANDOM: RANDOM,
- setMatrixArrayType: setMatrixArrayType,
- toRadian: toRadian,
- equals: equals
- });
-
- /**
- * 2x2 Matrix
- * @module mat2
- */
-
- /**
- * Creates a new identity mat2
- *
- * @returns {mat2} a new 2x2 matrix
- */
-
- function create() {
- var out = new ARRAY_TYPE(4);
-
- if (ARRAY_TYPE != Float32Array) {
- out[1] = 0;
- out[2] = 0;
- }
-
- out[0] = 1;
- out[3] = 1;
- return out;
- }
- /**
- * Creates a new mat2 initialized with values from an existing matrix
- *
- * @param {ReadonlyMat2} a matrix to clone
- * @returns {mat2} a new 2x2 matrix
- */
-
- function clone(a) {
- var out = new ARRAY_TYPE(4);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
- }
- /**
- * Copy the values from one mat2 to another
- *
- * @param {mat2} out the receiving matrix
- * @param {ReadonlyMat2} a the source matrix
- * @returns {mat2} out
- */
-
- function copy(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
- }
- /**
- * Set a mat2 to the identity matrix
- *
- * @param {mat2} out the receiving matrix
- * @returns {mat2} out
- */
-
- function identity(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
- }
- /**
- * Create a new mat2 with the given values
- *
- * @param {Number} m00 Component in column 0, row 0 position (index 0)
- * @param {Number} m01 Component in column 0, row 1 position (index 1)
- * @param {Number} m10 Component in column 1, row 0 position (index 2)
- * @param {Number} m11 Component in column 1, row 1 position (index 3)
- * @returns {mat2} out A new 2x2 matrix
- */
-
- function fromValues(m00, m01, m10, m11) {
- var out = new ARRAY_TYPE(4);
- out[0] = m00;
- out[1] = m01;
- out[2] = m10;
- out[3] = m11;
- return out;
- }
- /**
- * Set the components of a mat2 to the given values
- *
- * @param {mat2} out the receiving matrix
- * @param {Number} m00 Component in column 0, row 0 position (index 0)
- * @param {Number} m01 Component in column 0, row 1 position (index 1)
- * @param {Number} m10 Component in column 1, row 0 position (index 2)
- * @param {Number} m11 Component in column 1, row 1 position (index 3)
- * @returns {mat2} out
- */
-
- function set(out, m00, m01, m10, m11) {
- out[0] = m00;
- out[1] = m01;
- out[2] = m10;
- out[3] = m11;
- return out;
- }
- /**
- * Transpose the values of a mat2
- *
- * @param {mat2} out the receiving matrix
- * @param {ReadonlyMat2} a the source matrix
- * @returns {mat2} out
- */
-
- function transpose(out, a) {
- // If we are transposing ourselves we can skip a few steps but have to cache
- // some values
- if (out === a) {
- var a1 = a[1];
- out[1] = a[2];
- out[2] = a1;
- } else {
- out[0] = a[0];
- out[1] = a[2];
- out[2] = a[1];
- out[3] = a[3];
- }
-
- return out;
- }
- /**
- * Inverts a mat2
- *
- * @param {mat2} out the receiving matrix
- * @param {ReadonlyMat2} a the source matrix
- * @returns {mat2} out
- */
-
- function invert(out, a) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3]; // Calculate the determinant
-
- var det = a0 * a3 - a2 * a1;
-
- if (!det) {
- return null;
- }
-
- det = 1.0 / det;
- out[0] = a3 * det;
- out[1] = -a1 * det;
- out[2] = -a2 * det;
- out[3] = a0 * det;
- return out;
- }
- /**
- * Calculates the adjugate of a mat2
- *
- * @param {mat2} out the receiving matrix
- * @param {ReadonlyMat2} a the source matrix
- * @returns {mat2} out
- */
-
- function adjoint(out, a) {
- // Caching this value is nessecary if out == a
- var a0 = a[0];
- out[0] = a[3];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = a0;
- return out;
- }
- /**
- * Calculates the determinant of a mat2
- *
- * @param {ReadonlyMat2} a the source matrix
- * @returns {Number} determinant of a
- */
-
- function determinant(a) {
- return a[0] * a[3] - a[2] * a[1];
- }
- /**
- * Multiplies two mat2's
- *
- * @param {mat2} out the receiving matrix
- * @param {ReadonlyMat2} a the first operand
- * @param {ReadonlyMat2} b the second operand
- * @returns {mat2} out
- */
-
- function multiply(out, a, b) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3];
- var b0 = b[0],
- b1 = b[1],
- b2 = b[2],
- b3 = b[3];
- out[0] = a0 * b0 + a2 * b1;
- out[1] = a1 * b0 + a3 * b1;
- out[2] = a0 * b2 + a2 * b3;
- out[3] = a1 * b2 + a3 * b3;
- return out;
- }
- /**
- * Rotates a mat2 by the given angle
- *
- * @param {mat2} out the receiving matrix
- * @param {ReadonlyMat2} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2} out
- */
-
- function rotate(out, a, rad) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3];
- var s = Math.sin(rad);
- var c = Math.cos(rad);
- out[0] = a0 * c + a2 * s;
- out[1] = a1 * c + a3 * s;
- out[2] = a0 * -s + a2 * c;
- out[3] = a1 * -s + a3 * c;
- return out;
- }
- /**
- * Scales the mat2 by the dimensions in the given vec2
- *
- * @param {mat2} out the receiving matrix
- * @param {ReadonlyMat2} a the matrix to rotate
- * @param {ReadonlyVec2} v the vec2 to scale the matrix by
- * @returns {mat2} out
- **/
-
- function scale(out, a, v) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3];
- var v0 = v[0],
- v1 = v[1];
- out[0] = a0 * v0;
- out[1] = a1 * v0;
- out[2] = a2 * v1;
- out[3] = a3 * v1;
- return out;
- }
- /**
- * Creates a matrix from a given angle
- * This is equivalent to (but much faster than):
- *
- * mat2.identity(dest);
- * mat2.rotate(dest, dest, rad);
- *
- * @param {mat2} out mat2 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2} out
- */
-
- function fromRotation(out, rad) {
- var s = Math.sin(rad);
- var c = Math.cos(rad);
- out[0] = c;
- out[1] = s;
- out[2] = -s;
- out[3] = c;
- return out;
- }
- /**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat2.identity(dest);
- * mat2.scale(dest, dest, vec);
- *
- * @param {mat2} out mat2 receiving operation result
- * @param {ReadonlyVec2} v Scaling vector
- * @returns {mat2} out
- */
-
- function fromScaling(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = v[1];
- return out;
- }
- /**
- * Returns a string representation of a mat2
- *
- * @param {ReadonlyMat2} a matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
-
- function str(a) {
- return "mat2(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ")";
- }
- /**
- * Returns Frobenius norm of a mat2
- *
- * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
-
- function frob(a) {
- return Math.hypot(a[0], a[1], a[2], a[3]);
- }
- /**
- * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix
- * @param {ReadonlyMat2} L the lower triangular matrix
- * @param {ReadonlyMat2} D the diagonal matrix
- * @param {ReadonlyMat2} U the upper triangular matrix
- * @param {ReadonlyMat2} a the input matrix to factorize
- */
-
- function LDU(L, D, U, a) {
- L[2] = a[2] / a[0];
- U[0] = a[0];
- U[1] = a[1];
- U[3] = a[3] - L[2] * U[1];
- return [L, D, U];
- }
- /**
- * Adds two mat2's
- *
- * @param {mat2} out the receiving matrix
- * @param {ReadonlyMat2} a the first operand
- * @param {ReadonlyMat2} b the second operand
- * @returns {mat2} out
- */
-
- function add(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- out[3] = a[3] + b[3];
- return out;
- }
- /**
- * Subtracts matrix b from matrix a
- *
- * @param {mat2} out the receiving matrix
- * @param {ReadonlyMat2} a the first operand
- * @param {ReadonlyMat2} b the second operand
- * @returns {mat2} out
- */
-
- function subtract(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- out[2] = a[2] - b[2];
- out[3] = a[3] - b[3];
- return out;
- }
- /**
- * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
- *
- * @param {ReadonlyMat2} a The first matrix.
- * @param {ReadonlyMat2} b The second matrix.
- * @returns {Boolean} True if the matrices are equal, false otherwise.
- */
-
- function exactEquals(a, b) {
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];
- }
- /**
- * Returns whether or not the matrices have approximately the same elements in the same position.
- *
- * @param {ReadonlyMat2} a The first matrix.
- * @param {ReadonlyMat2} b The second matrix.
- * @returns {Boolean} True if the matrices are equal, false otherwise.
- */
-
- function equals$1(a, b) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3];
- var b0 = b[0],
- b1 = b[1],
- b2 = b[2],
- b3 = b[3];
- return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));
- }
- /**
- * Multiply each element of the matrix by a scalar.
- *
- * @param {mat2} out the receiving matrix
- * @param {ReadonlyMat2} a the matrix to scale
- * @param {Number} b amount to scale the matrix's elements by
- * @returns {mat2} out
- */
-
- function multiplyScalar(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- out[3] = a[3] * b;
- return out;
- }
- /**
- * Adds two mat2's after multiplying each element of the second operand by a scalar value.
- *
- * @param {mat2} out the receiving vector
- * @param {ReadonlyMat2} a the first operand
- * @param {ReadonlyMat2} b the second operand
- * @param {Number} scale the amount to scale b's elements by before adding
- * @returns {mat2} out
- */
-
- function multiplyScalarAndAdd(out, a, b, scale) {
- out[0] = a[0] + b[0] * scale;
- out[1] = a[1] + b[1] * scale;
- out[2] = a[2] + b[2] * scale;
- out[3] = a[3] + b[3] * scale;
- return out;
- }
- /**
- * Alias for {@link mat2.multiply}
- * @function
- */
-
- var mul = multiply;
- /**
- * Alias for {@link mat2.subtract}
- * @function
- */
-
- var sub = subtract;
-
- var mat2 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- create: create,
- clone: clone,
- copy: copy,
- identity: identity,
- fromValues: fromValues,
- set: set,
- transpose: transpose,
- invert: invert,
- adjoint: adjoint,
- determinant: determinant,
- multiply: multiply,
- rotate: rotate,
- scale: scale,
- fromRotation: fromRotation,
- fromScaling: fromScaling,
- str: str,
- frob: frob,
- LDU: LDU,
- add: add,
- subtract: subtract,
- exactEquals: exactEquals,
- equals: equals$1,
- multiplyScalar: multiplyScalar,
- multiplyScalarAndAdd: multiplyScalarAndAdd,
- mul: mul,
- sub: sub
- });
-
- /**
- * 2x3 Matrix
- * @module mat2d
- * @description
- * A mat2d contains six elements defined as:
- *
- * [a, b,
- * c, d,
- * tx, ty]
- *
- * This is a short form for the 3x3 matrix:
- *
- * [a, b, 0,
- * c, d, 0,
- * tx, ty, 1]
- *
- * The last column is ignored so the array is shorter and operations are faster.
- */
-
- /**
- * Creates a new identity mat2d
- *
- * @returns {mat2d} a new 2x3 matrix
- */
-
- function create$1() {
- var out = new ARRAY_TYPE(6);
-
- if (ARRAY_TYPE != Float32Array) {
- out[1] = 0;
- out[2] = 0;
- out[4] = 0;
- out[5] = 0;
- }
-
- out[0] = 1;
- out[3] = 1;
- return out;
- }
- /**
- * Creates a new mat2d initialized with values from an existing matrix
- *
- * @param {ReadonlyMat2d} a matrix to clone
- * @returns {mat2d} a new 2x3 matrix
- */
-
- function clone$1(a) {
- var out = new ARRAY_TYPE(6);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- return out;
- }
- /**
- * Copy the values from one mat2d to another
- *
- * @param {mat2d} out the receiving matrix
- * @param {ReadonlyMat2d} a the source matrix
- * @returns {mat2d} out
- */
-
- function copy$1(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- return out;
- }
- /**
- * Set a mat2d to the identity matrix
- *
- * @param {mat2d} out the receiving matrix
- * @returns {mat2d} out
- */
-
- function identity$1(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = 0;
- out[5] = 0;
- return out;
- }
- /**
- * Create a new mat2d with the given values
- *
- * @param {Number} a Component A (index 0)
- * @param {Number} b Component B (index 1)
- * @param {Number} c Component C (index 2)
- * @param {Number} d Component D (index 3)
- * @param {Number} tx Component TX (index 4)
- * @param {Number} ty Component TY (index 5)
- * @returns {mat2d} A new mat2d
- */
-
- function fromValues$1(a, b, c, d, tx, ty) {
- var out = new ARRAY_TYPE(6);
- out[0] = a;
- out[1] = b;
- out[2] = c;
- out[3] = d;
- out[4] = tx;
- out[5] = ty;
- return out;
- }
- /**
- * Set the components of a mat2d to the given values
- *
- * @param {mat2d} out the receiving matrix
- * @param {Number} a Component A (index 0)
- * @param {Number} b Component B (index 1)
- * @param {Number} c Component C (index 2)
- * @param {Number} d Component D (index 3)
- * @param {Number} tx Component TX (index 4)
- * @param {Number} ty Component TY (index 5)
- * @returns {mat2d} out
- */
-
- function set$1(out, a, b, c, d, tx, ty) {
- out[0] = a;
- out[1] = b;
- out[2] = c;
- out[3] = d;
- out[4] = tx;
- out[5] = ty;
- return out;
- }
- /**
- * Inverts a mat2d
- *
- * @param {mat2d} out the receiving matrix
- * @param {ReadonlyMat2d} a the source matrix
- * @returns {mat2d} out
- */
-
- function invert$1(out, a) {
- var aa = a[0],
- ab = a[1],
- ac = a[2],
- ad = a[3];
- var atx = a[4],
- aty = a[5];
- var det = aa * ad - ab * ac;
-
- if (!det) {
- return null;
- }
-
- det = 1.0 / det;
- out[0] = ad * det;
- out[1] = -ab * det;
- out[2] = -ac * det;
- out[3] = aa * det;
- out[4] = (ac * aty - ad * atx) * det;
- out[5] = (ab * atx - aa * aty) * det;
- return out;
- }
- /**
- * Calculates the determinant of a mat2d
- *
- * @param {ReadonlyMat2d} a the source matrix
- * @returns {Number} determinant of a
- */
-
- function determinant$1(a) {
- return a[0] * a[3] - a[1] * a[2];
- }
- /**
- * Multiplies two mat2d's
- *
- * @param {mat2d} out the receiving matrix
- * @param {ReadonlyMat2d} a the first operand
- * @param {ReadonlyMat2d} b the second operand
- * @returns {mat2d} out
- */
-
- function multiply$1(out, a, b) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3],
- a4 = a[4],
- a5 = a[5];
- var b0 = b[0],
- b1 = b[1],
- b2 = b[2],
- b3 = b[3],
- b4 = b[4],
- b5 = b[5];
- out[0] = a0 * b0 + a2 * b1;
- out[1] = a1 * b0 + a3 * b1;
- out[2] = a0 * b2 + a2 * b3;
- out[3] = a1 * b2 + a3 * b3;
- out[4] = a0 * b4 + a2 * b5 + a4;
- out[5] = a1 * b4 + a3 * b5 + a5;
- return out;
- }
- /**
- * Rotates a mat2d by the given angle
- *
- * @param {mat2d} out the receiving matrix
- * @param {ReadonlyMat2d} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2d} out
- */
-
- function rotate$1(out, a, rad) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3],
- a4 = a[4],
- a5 = a[5];
- var s = Math.sin(rad);
- var c = Math.cos(rad);
- out[0] = a0 * c + a2 * s;
- out[1] = a1 * c + a3 * s;
- out[2] = a0 * -s + a2 * c;
- out[3] = a1 * -s + a3 * c;
- out[4] = a4;
- out[5] = a5;
- return out;
- }
- /**
- * Scales the mat2d by the dimensions in the given vec2
- *
- * @param {mat2d} out the receiving matrix
- * @param {ReadonlyMat2d} a the matrix to translate
- * @param {ReadonlyVec2} v the vec2 to scale the matrix by
- * @returns {mat2d} out
- **/
-
- function scale$1(out, a, v) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3],
- a4 = a[4],
- a5 = a[5];
- var v0 = v[0],
- v1 = v[1];
- out[0] = a0 * v0;
- out[1] = a1 * v0;
- out[2] = a2 * v1;
- out[3] = a3 * v1;
- out[4] = a4;
- out[5] = a5;
- return out;
- }
- /**
- * Translates the mat2d by the dimensions in the given vec2
- *
- * @param {mat2d} out the receiving matrix
- * @param {ReadonlyMat2d} a the matrix to translate
- * @param {ReadonlyVec2} v the vec2 to translate the matrix by
- * @returns {mat2d} out
- **/
-
- function translate(out, a, v) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3],
- a4 = a[4],
- a5 = a[5];
- var v0 = v[0],
- v1 = v[1];
- out[0] = a0;
- out[1] = a1;
- out[2] = a2;
- out[3] = a3;
- out[4] = a0 * v0 + a2 * v1 + a4;
- out[5] = a1 * v0 + a3 * v1 + a5;
- return out;
- }
- /**
- * Creates a matrix from a given angle
- * This is equivalent to (but much faster than):
- *
- * mat2d.identity(dest);
- * mat2d.rotate(dest, dest, rad);
- *
- * @param {mat2d} out mat2d receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2d} out
- */
-
- function fromRotation$1(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
- out[0] = c;
- out[1] = s;
- out[2] = -s;
- out[3] = c;
- out[4] = 0;
- out[5] = 0;
- return out;
- }
- /**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat2d.identity(dest);
- * mat2d.scale(dest, dest, vec);
- *
- * @param {mat2d} out mat2d receiving operation result
- * @param {ReadonlyVec2} v Scaling vector
- * @returns {mat2d} out
- */
-
- function fromScaling$1(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = v[1];
- out[4] = 0;
- out[5] = 0;
- return out;
- }
- /**
- * Creates a matrix from a vector translation
- * This is equivalent to (but much faster than):
- *
- * mat2d.identity(dest);
- * mat2d.translate(dest, dest, vec);
- *
- * @param {mat2d} out mat2d receiving operation result
- * @param {ReadonlyVec2} v Translation vector
- * @returns {mat2d} out
- */
-
- function fromTranslation(out, v) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = v[0];
- out[5] = v[1];
- return out;
- }
- /**
- * Returns a string representation of a mat2d
- *
- * @param {ReadonlyMat2d} a matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
-
- function str$1(a) {
- return "mat2d(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ")";
- }
- /**
- * Returns Frobenius norm of a mat2d
- *
- * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
-
- function frob$1(a) {
- return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1);
- }
- /**
- * Adds two mat2d's
- *
- * @param {mat2d} out the receiving matrix
- * @param {ReadonlyMat2d} a the first operand
- * @param {ReadonlyMat2d} b the second operand
- * @returns {mat2d} out
- */
-
- function add$1(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- out[3] = a[3] + b[3];
- out[4] = a[4] + b[4];
- out[5] = a[5] + b[5];
- return out;
- }
- /**
- * Subtracts matrix b from matrix a
- *
- * @param {mat2d} out the receiving matrix
- * @param {ReadonlyMat2d} a the first operand
- * @param {ReadonlyMat2d} b the second operand
- * @returns {mat2d} out
- */
-
- function subtract$1(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- out[2] = a[2] - b[2];
- out[3] = a[3] - b[3];
- out[4] = a[4] - b[4];
- out[5] = a[5] - b[5];
- return out;
- }
- /**
- * Multiply each element of the matrix by a scalar.
- *
- * @param {mat2d} out the receiving matrix
- * @param {ReadonlyMat2d} a the matrix to scale
- * @param {Number} b amount to scale the matrix's elements by
- * @returns {mat2d} out
- */
-
- function multiplyScalar$1(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- out[3] = a[3] * b;
- out[4] = a[4] * b;
- out[5] = a[5] * b;
- return out;
- }
- /**
- * Adds two mat2d's after multiplying each element of the second operand by a scalar value.
- *
- * @param {mat2d} out the receiving vector
- * @param {ReadonlyMat2d} a the first operand
- * @param {ReadonlyMat2d} b the second operand
- * @param {Number} scale the amount to scale b's elements by before adding
- * @returns {mat2d} out
- */
-
- function multiplyScalarAndAdd$1(out, a, b, scale) {
- out[0] = a[0] + b[0] * scale;
- out[1] = a[1] + b[1] * scale;
- out[2] = a[2] + b[2] * scale;
- out[3] = a[3] + b[3] * scale;
- out[4] = a[4] + b[4] * scale;
- out[5] = a[5] + b[5] * scale;
- return out;
- }
- /**
- * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
- *
- * @param {ReadonlyMat2d} a The first matrix.
- * @param {ReadonlyMat2d} b The second matrix.
- * @returns {Boolean} True if the matrices are equal, false otherwise.
- */
-
- function exactEquals$1(a, b) {
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5];
- }
- /**
- * Returns whether or not the matrices have approximately the same elements in the same position.
- *
- * @param {ReadonlyMat2d} a The first matrix.
- * @param {ReadonlyMat2d} b The second matrix.
- * @returns {Boolean} True if the matrices are equal, false otherwise.
- */
-
- function equals$2(a, b) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3],
- a4 = a[4],
- a5 = a[5];
- var b0 = b[0],
- b1 = b[1],
- b2 = b[2],
- b3 = b[3],
- b4 = b[4],
- b5 = b[5];
- return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5));
- }
- /**
- * Alias for {@link mat2d.multiply}
- * @function
- */
-
- var mul$1 = multiply$1;
- /**
- * Alias for {@link mat2d.subtract}
- * @function
- */
-
- var sub$1 = subtract$1;
-
- var mat2d = /*#__PURE__*/Object.freeze({
- __proto__: null,
- create: create$1,
- clone: clone$1,
- copy: copy$1,
- identity: identity$1,
- fromValues: fromValues$1,
- set: set$1,
- invert: invert$1,
- determinant: determinant$1,
- multiply: multiply$1,
- rotate: rotate$1,
- scale: scale$1,
- translate: translate,
- fromRotation: fromRotation$1,
- fromScaling: fromScaling$1,
- fromTranslation: fromTranslation,
- str: str$1,
- frob: frob$1,
- add: add$1,
- subtract: subtract$1,
- multiplyScalar: multiplyScalar$1,
- multiplyScalarAndAdd: multiplyScalarAndAdd$1,
- exactEquals: exactEquals$1,
- equals: equals$2,
- mul: mul$1,
- sub: sub$1
- });
-
- /**
- * 3x3 Matrix
- * @module mat3
- */
-
- /**
- * Creates a new identity mat3
- *
- * @returns {mat3} a new 3x3 matrix
- */
-
- function create$2() {
- var out = new ARRAY_TYPE(9);
-
- if (ARRAY_TYPE != Float32Array) {
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[5] = 0;
- out[6] = 0;
- out[7] = 0;
- }
-
- out[0] = 1;
- out[4] = 1;
- out[8] = 1;
- return out;
- }
- /**
- * Copies the upper-left 3x3 values into the given mat3.
- *
- * @param {mat3} out the receiving 3x3 matrix
- * @param {ReadonlyMat4} a the source 4x4 matrix
- * @returns {mat3} out
- */
-
- function fromMat4(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[4];
- out[4] = a[5];
- out[5] = a[6];
- out[6] = a[8];
- out[7] = a[9];
- out[8] = a[10];
- return out;
- }
- /**
- * Creates a new mat3 initialized with values from an existing matrix
- *
- * @param {ReadonlyMat3} a matrix to clone
- * @returns {mat3} a new 3x3 matrix
- */
-
- function clone$2(a) {
- var out = new ARRAY_TYPE(9);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- return out;
- }
- /**
- * Copy the values from one mat3 to another
- *
- * @param {mat3} out the receiving matrix
- * @param {ReadonlyMat3} a the source matrix
- * @returns {mat3} out
- */
-
- function copy$2(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- return out;
- }
- /**
- * Create a new mat3 with the given values
- *
- * @param {Number} m00 Component in column 0, row 0 position (index 0)
- * @param {Number} m01 Component in column 0, row 1 position (index 1)
- * @param {Number} m02 Component in column 0, row 2 position (index 2)
- * @param {Number} m10 Component in column 1, row 0 position (index 3)
- * @param {Number} m11 Component in column 1, row 1 position (index 4)
- * @param {Number} m12 Component in column 1, row 2 position (index 5)
- * @param {Number} m20 Component in column 2, row 0 position (index 6)
- * @param {Number} m21 Component in column 2, row 1 position (index 7)
- * @param {Number} m22 Component in column 2, row 2 position (index 8)
- * @returns {mat3} A new mat3
- */
-
- function fromValues$2(m00, m01, m02, m10, m11, m12, m20, m21, m22) {
- var out = new ARRAY_TYPE(9);
- out[0] = m00;
- out[1] = m01;
- out[2] = m02;
- out[3] = m10;
- out[4] = m11;
- out[5] = m12;
- out[6] = m20;
- out[7] = m21;
- out[8] = m22;
- return out;
- }
- /**
- * Set the components of a mat3 to the given values
- *
- * @param {mat3} out the receiving matrix
- * @param {Number} m00 Component in column 0, row 0 position (index 0)
- * @param {Number} m01 Component in column 0, row 1 position (index 1)
- * @param {Number} m02 Component in column 0, row 2 position (index 2)
- * @param {Number} m10 Component in column 1, row 0 position (index 3)
- * @param {Number} m11 Component in column 1, row 1 position (index 4)
- * @param {Number} m12 Component in column 1, row 2 position (index 5)
- * @param {Number} m20 Component in column 2, row 0 position (index 6)
- * @param {Number} m21 Component in column 2, row 1 position (index 7)
- * @param {Number} m22 Component in column 2, row 2 position (index 8)
- * @returns {mat3} out
- */
-
- function set$2(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {
- out[0] = m00;
- out[1] = m01;
- out[2] = m02;
- out[3] = m10;
- out[4] = m11;
- out[5] = m12;
- out[6] = m20;
- out[7] = m21;
- out[8] = m22;
- return out;
- }
- /**
- * Set a mat3 to the identity matrix
- *
- * @param {mat3} out the receiving matrix
- * @returns {mat3} out
- */
-
- function identity$2(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 1;
- out[5] = 0;
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
- }
- /**
- * Transpose the values of a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {ReadonlyMat3} a the source matrix
- * @returns {mat3} out
- */
-
- function transpose$1(out, a) {
- // If we are transposing ourselves we can skip a few steps but have to cache some values
- if (out === a) {
- var a01 = a[1],
- a02 = a[2],
- a12 = a[5];
- out[1] = a[3];
- out[2] = a[6];
- out[3] = a01;
- out[5] = a[7];
- out[6] = a02;
- out[7] = a12;
- } else {
- out[0] = a[0];
- out[1] = a[3];
- out[2] = a[6];
- out[3] = a[1];
- out[4] = a[4];
- out[5] = a[7];
- out[6] = a[2];
- out[7] = a[5];
- out[8] = a[8];
- }
-
- return out;
- }
- /**
- * Inverts a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {ReadonlyMat3} a the source matrix
- * @returns {mat3} out
- */
-
- function invert$2(out, a) {
- var a00 = a[0],
- a01 = a[1],
- a02 = a[2];
- var a10 = a[3],
- a11 = a[4],
- a12 = a[5];
- var a20 = a[6],
- a21 = a[7],
- a22 = a[8];
- var b01 = a22 * a11 - a12 * a21;
- var b11 = -a22 * a10 + a12 * a20;
- var b21 = a21 * a10 - a11 * a20; // Calculate the determinant
-
- var det = a00 * b01 + a01 * b11 + a02 * b21;
-
- if (!det) {
- return null;
- }
-
- det = 1.0 / det;
- out[0] = b01 * det;
- out[1] = (-a22 * a01 + a02 * a21) * det;
- out[2] = (a12 * a01 - a02 * a11) * det;
- out[3] = b11 * det;
- out[4] = (a22 * a00 - a02 * a20) * det;
- out[5] = (-a12 * a00 + a02 * a10) * det;
- out[6] = b21 * det;
- out[7] = (-a21 * a00 + a01 * a20) * det;
- out[8] = (a11 * a00 - a01 * a10) * det;
- return out;
- }
- /**
- * Calculates the adjugate of a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {ReadonlyMat3} a the source matrix
- * @returns {mat3} out
- */
-
- function adjoint$1(out, a) {
- var a00 = a[0],
- a01 = a[1],
- a02 = a[2];
- var a10 = a[3],
- a11 = a[4],
- a12 = a[5];
- var a20 = a[6],
- a21 = a[7],
- a22 = a[8];
- out[0] = a11 * a22 - a12 * a21;
- out[1] = a02 * a21 - a01 * a22;
- out[2] = a01 * a12 - a02 * a11;
- out[3] = a12 * a20 - a10 * a22;
- out[4] = a00 * a22 - a02 * a20;
- out[5] = a02 * a10 - a00 * a12;
- out[6] = a10 * a21 - a11 * a20;
- out[7] = a01 * a20 - a00 * a21;
- out[8] = a00 * a11 - a01 * a10;
- return out;
- }
- /**
- * Calculates the determinant of a mat3
- *
- * @param {ReadonlyMat3} a the source matrix
- * @returns {Number} determinant of a
- */
-
- function determinant$2(a) {
- var a00 = a[0],
- a01 = a[1],
- a02 = a[2];
- var a10 = a[3],
- a11 = a[4],
- a12 = a[5];
- var a20 = a[6],
- a21 = a[7],
- a22 = a[8];
- return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);
- }
- /**
- * Multiplies two mat3's
- *
- * @param {mat3} out the receiving matrix
- * @param {ReadonlyMat3} a the first operand
- * @param {ReadonlyMat3} b the second operand
- * @returns {mat3} out
- */
-
- function multiply$2(out, a, b) {
- var a00 = a[0],
- a01 = a[1],
- a02 = a[2];
- var a10 = a[3],
- a11 = a[4],
- a12 = a[5];
- var a20 = a[6],
- a21 = a[7],
- a22 = a[8];
- var b00 = b[0],
- b01 = b[1],
- b02 = b[2];
- var b10 = b[3],
- b11 = b[4],
- b12 = b[5];
- var b20 = b[6],
- b21 = b[7],
- b22 = b[8];
- out[0] = b00 * a00 + b01 * a10 + b02 * a20;
- out[1] = b00 * a01 + b01 * a11 + b02 * a21;
- out[2] = b00 * a02 + b01 * a12 + b02 * a22;
- out[3] = b10 * a00 + b11 * a10 + b12 * a20;
- out[4] = b10 * a01 + b11 * a11 + b12 * a21;
- out[5] = b10 * a02 + b11 * a12 + b12 * a22;
- out[6] = b20 * a00 + b21 * a10 + b22 * a20;
- out[7] = b20 * a01 + b21 * a11 + b22 * a21;
- out[8] = b20 * a02 + b21 * a12 + b22 * a22;
- return out;
- }
- /**
- * Translate a mat3 by the given vector
- *
- * @param {mat3} out the receiving matrix
- * @param {ReadonlyMat3} a the matrix to translate
- * @param {ReadonlyVec2} v vector to translate by
- * @returns {mat3} out
- */
-
- function translate$1(out, a, v) {
- var a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a10 = a[3],
- a11 = a[4],
- a12 = a[5],
- a20 = a[6],
- a21 = a[7],
- a22 = a[8],
- x = v[0],
- y = v[1];
- out[0] = a00;
- out[1] = a01;
- out[2] = a02;
- out[3] = a10;
- out[4] = a11;
- out[5] = a12;
- out[6] = x * a00 + y * a10 + a20;
- out[7] = x * a01 + y * a11 + a21;
- out[8] = x * a02 + y * a12 + a22;
- return out;
- }
- /**
- * Rotates a mat3 by the given angle
- *
- * @param {mat3} out the receiving matrix
- * @param {ReadonlyMat3} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat3} out
- */
-
- function rotate$2(out, a, rad) {
- var a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a10 = a[3],
- a11 = a[4],
- a12 = a[5],
- a20 = a[6],
- a21 = a[7],
- a22 = a[8],
- s = Math.sin(rad),
- c = Math.cos(rad);
- out[0] = c * a00 + s * a10;
- out[1] = c * a01 + s * a11;
- out[2] = c * a02 + s * a12;
- out[3] = c * a10 - s * a00;
- out[4] = c * a11 - s * a01;
- out[5] = c * a12 - s * a02;
- out[6] = a20;
- out[7] = a21;
- out[8] = a22;
- return out;
- }
- /**
- * Scales the mat3 by the dimensions in the given vec2
- *
- * @param {mat3} out the receiving matrix
- * @param {ReadonlyMat3} a the matrix to rotate
- * @param {ReadonlyVec2} v the vec2 to scale the matrix by
- * @returns {mat3} out
- **/
-
- function scale$2(out, a, v) {
- var x = v[0],
- y = v[1];
- out[0] = x * a[0];
- out[1] = x * a[1];
- out[2] = x * a[2];
- out[3] = y * a[3];
- out[4] = y * a[4];
- out[5] = y * a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- return out;
- }
- /**
- * Creates a matrix from a vector translation
- * This is equivalent to (but much faster than):
- *
- * mat3.identity(dest);
- * mat3.translate(dest, dest, vec);
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {ReadonlyVec2} v Translation vector
- * @returns {mat3} out
- */
-
- function fromTranslation$1(out, v) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 1;
- out[5] = 0;
- out[6] = v[0];
- out[7] = v[1];
- out[8] = 1;
- return out;
- }
- /**
- * Creates a matrix from a given angle
- * This is equivalent to (but much faster than):
- *
- * mat3.identity(dest);
- * mat3.rotate(dest, dest, rad);
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat3} out
- */
-
- function fromRotation$2(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
- out[0] = c;
- out[1] = s;
- out[2] = 0;
- out[3] = -s;
- out[4] = c;
- out[5] = 0;
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
- }
- /**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat3.identity(dest);
- * mat3.scale(dest, dest, vec);
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {ReadonlyVec2} v Scaling vector
- * @returns {mat3} out
- */
-
- function fromScaling$2(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = v[1];
- out[5] = 0;
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
- }
- /**
- * Copies the values from a mat2d into a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {ReadonlyMat2d} a the matrix to copy
- * @returns {mat3} out
- **/
-
- function fromMat2d(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = 0;
- out[3] = a[2];
- out[4] = a[3];
- out[5] = 0;
- out[6] = a[4];
- out[7] = a[5];
- out[8] = 1;
- return out;
- }
- /**
- * Calculates a 3x3 matrix from the given quaternion
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {ReadonlyQuat} q Quaternion to create matrix from
- *
- * @returns {mat3} out
- */
-
- function fromQuat(out, q) {
- var x = q[0],
- y = q[1],
- z = q[2],
- w = q[3];
- var x2 = x + x;
- var y2 = y + y;
- var z2 = z + z;
- var xx = x * x2;
- var yx = y * x2;
- var yy = y * y2;
- var zx = z * x2;
- var zy = z * y2;
- var zz = z * z2;
- var wx = w * x2;
- var wy = w * y2;
- var wz = w * z2;
- out[0] = 1 - yy - zz;
- out[3] = yx - wz;
- out[6] = zx + wy;
- out[1] = yx + wz;
- out[4] = 1 - xx - zz;
- out[7] = zy - wx;
- out[2] = zx - wy;
- out[5] = zy + wx;
- out[8] = 1 - xx - yy;
- return out;
- }
- /**
- * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from
- *
- * @returns {mat3} out
- */
-
- function normalFromMat4(out, a) {
- var a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a03 = a[3];
- var a10 = a[4],
- a11 = a[5],
- a12 = a[6],
- a13 = a[7];
- var a20 = a[8],
- a21 = a[9],
- a22 = a[10],
- a23 = a[11];
- var a30 = a[12],
- a31 = a[13],
- a32 = a[14],
- a33 = a[15];
- var b00 = a00 * a11 - a01 * a10;
- var b01 = a00 * a12 - a02 * a10;
- var b02 = a00 * a13 - a03 * a10;
- var b03 = a01 * a12 - a02 * a11;
- var b04 = a01 * a13 - a03 * a11;
- var b05 = a02 * a13 - a03 * a12;
- var b06 = a20 * a31 - a21 * a30;
- var b07 = a20 * a32 - a22 * a30;
- var b08 = a20 * a33 - a23 * a30;
- var b09 = a21 * a32 - a22 * a31;
- var b10 = a21 * a33 - a23 * a31;
- var b11 = a22 * a33 - a23 * a32; // Calculate the determinant
-
- var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
-
- if (!det) {
- return null;
- }
-
- det = 1.0 / det;
- out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
- out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
- out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
- out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
- out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
- out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
- out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
- out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
- out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
- return out;
- }
- /**
- * Generates a 2D projection matrix with the given bounds
- *
- * @param {mat3} out mat3 frustum matrix will be written into
- * @param {number} width Width of your gl context
- * @param {number} height Height of gl context
- * @returns {mat3} out
- */
-
- function projection(out, width, height) {
- out[0] = 2 / width;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = -2 / height;
- out[5] = 0;
- out[6] = -1;
- out[7] = 1;
- out[8] = 1;
- return out;
- }
- /**
- * Returns a string representation of a mat3
- *
- * @param {ReadonlyMat3} a matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
-
- function str$2(a) {
- return "mat3(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ", " + a[8] + ")";
- }
- /**
- * Returns Frobenius norm of a mat3
- *
- * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
-
- function frob$2(a) {
- return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);
- }
- /**
- * Adds two mat3's
- *
- * @param {mat3} out the receiving matrix
- * @param {ReadonlyMat3} a the first operand
- * @param {ReadonlyMat3} b the second operand
- * @returns {mat3} out
- */
-
- function add$2(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- out[3] = a[3] + b[3];
- out[4] = a[4] + b[4];
- out[5] = a[5] + b[5];
- out[6] = a[6] + b[6];
- out[7] = a[7] + b[7];
- out[8] = a[8] + b[8];
- return out;
- }
- /**
- * Subtracts matrix b from matrix a
- *
- * @param {mat3} out the receiving matrix
- * @param {ReadonlyMat3} a the first operand
- * @param {ReadonlyMat3} b the second operand
- * @returns {mat3} out
- */
-
- function subtract$2(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- out[2] = a[2] - b[2];
- out[3] = a[3] - b[3];
- out[4] = a[4] - b[4];
- out[5] = a[5] - b[5];
- out[6] = a[6] - b[6];
- out[7] = a[7] - b[7];
- out[8] = a[8] - b[8];
- return out;
- }
- /**
- * Multiply each element of the matrix by a scalar.
- *
- * @param {mat3} out the receiving matrix
- * @param {ReadonlyMat3} a the matrix to scale
- * @param {Number} b amount to scale the matrix's elements by
- * @returns {mat3} out
- */
-
- function multiplyScalar$2(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- out[3] = a[3] * b;
- out[4] = a[4] * b;
- out[5] = a[5] * b;
- out[6] = a[6] * b;
- out[7] = a[7] * b;
- out[8] = a[8] * b;
- return out;
- }
- /**
- * Adds two mat3's after multiplying each element of the second operand by a scalar value.
- *
- * @param {mat3} out the receiving vector
- * @param {ReadonlyMat3} a the first operand
- * @param {ReadonlyMat3} b the second operand
- * @param {Number} scale the amount to scale b's elements by before adding
- * @returns {mat3} out
- */
-
- function multiplyScalarAndAdd$2(out, a, b, scale) {
- out[0] = a[0] + b[0] * scale;
- out[1] = a[1] + b[1] * scale;
- out[2] = a[2] + b[2] * scale;
- out[3] = a[3] + b[3] * scale;
- out[4] = a[4] + b[4] * scale;
- out[5] = a[5] + b[5] * scale;
- out[6] = a[6] + b[6] * scale;
- out[7] = a[7] + b[7] * scale;
- out[8] = a[8] + b[8] * scale;
- return out;
- }
- /**
- * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
- *
- * @param {ReadonlyMat3} a The first matrix.
- * @param {ReadonlyMat3} b The second matrix.
- * @returns {Boolean} True if the matrices are equal, false otherwise.
- */
-
- function exactEquals$2(a, b) {
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];
- }
- /**
- * Returns whether or not the matrices have approximately the same elements in the same position.
- *
- * @param {ReadonlyMat3} a The first matrix.
- * @param {ReadonlyMat3} b The second matrix.
- * @returns {Boolean} True if the matrices are equal, false otherwise.
- */
-
- function equals$3(a, b) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3],
- a4 = a[4],
- a5 = a[5],
- a6 = a[6],
- a7 = a[7],
- a8 = a[8];
- var b0 = b[0],
- b1 = b[1],
- b2 = b[2],
- b3 = b[3],
- b4 = b[4],
- b5 = b[5],
- b6 = b[6],
- b7 = b[7],
- b8 = b[8];
- return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));
- }
- /**
- * Alias for {@link mat3.multiply}
- * @function
- */
-
- var mul$2 = multiply$2;
- /**
- * Alias for {@link mat3.subtract}
- * @function
- */
-
- var sub$2 = subtract$2;
-
- var mat3 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- create: create$2,
- fromMat4: fromMat4,
- clone: clone$2,
- copy: copy$2,
- fromValues: fromValues$2,
- set: set$2,
- identity: identity$2,
- transpose: transpose$1,
- invert: invert$2,
- adjoint: adjoint$1,
- determinant: determinant$2,
- multiply: multiply$2,
- translate: translate$1,
- rotate: rotate$2,
- scale: scale$2,
- fromTranslation: fromTranslation$1,
- fromRotation: fromRotation$2,
- fromScaling: fromScaling$2,
- fromMat2d: fromMat2d,
- fromQuat: fromQuat,
- normalFromMat4: normalFromMat4,
- projection: projection,
- str: str$2,
- frob: frob$2,
- add: add$2,
- subtract: subtract$2,
- multiplyScalar: multiplyScalar$2,
- multiplyScalarAndAdd: multiplyScalarAndAdd$2,
- exactEquals: exactEquals$2,
- equals: equals$3,
- mul: mul$2,
- sub: sub$2
- });
-
- /**
- * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied.
- * @module mat4
- */
-
- /**
- * Creates a new identity mat4
- *
- * @returns {mat4} a new 4x4 matrix
- */
-
- function create$3() {
- var out = new ARRAY_TYPE(16);
-
- if (ARRAY_TYPE != Float32Array) {
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- }
-
- out[0] = 1;
- out[5] = 1;
- out[10] = 1;
- out[15] = 1;
- return out;
- }
- /**
- * Creates a new mat4 initialized with values from an existing matrix
- *
- * @param {ReadonlyMat4} a matrix to clone
- * @returns {mat4} a new 4x4 matrix
- */
-
- function clone$3(a) {
- var out = new ARRAY_TYPE(16);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- out[9] = a[9];
- out[10] = a[10];
- out[11] = a[11];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- return out;
- }
- /**
- * Copy the values from one mat4 to another
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the source matrix
- * @returns {mat4} out
- */
-
- function copy$3(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- out[9] = a[9];
- out[10] = a[10];
- out[11] = a[11];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- return out;
- }
- /**
- * Create a new mat4 with the given values
- *
- * @param {Number} m00 Component in column 0, row 0 position (index 0)
- * @param {Number} m01 Component in column 0, row 1 position (index 1)
- * @param {Number} m02 Component in column 0, row 2 position (index 2)
- * @param {Number} m03 Component in column 0, row 3 position (index 3)
- * @param {Number} m10 Component in column 1, row 0 position (index 4)
- * @param {Number} m11 Component in column 1, row 1 position (index 5)
- * @param {Number} m12 Component in column 1, row 2 position (index 6)
- * @param {Number} m13 Component in column 1, row 3 position (index 7)
- * @param {Number} m20 Component in column 2, row 0 position (index 8)
- * @param {Number} m21 Component in column 2, row 1 position (index 9)
- * @param {Number} m22 Component in column 2, row 2 position (index 10)
- * @param {Number} m23 Component in column 2, row 3 position (index 11)
- * @param {Number} m30 Component in column 3, row 0 position (index 12)
- * @param {Number} m31 Component in column 3, row 1 position (index 13)
- * @param {Number} m32 Component in column 3, row 2 position (index 14)
- * @param {Number} m33 Component in column 3, row 3 position (index 15)
- * @returns {mat4} A new mat4
- */
-
- function fromValues$3(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {
- var out = new ARRAY_TYPE(16);
- out[0] = m00;
- out[1] = m01;
- out[2] = m02;
- out[3] = m03;
- out[4] = m10;
- out[5] = m11;
- out[6] = m12;
- out[7] = m13;
- out[8] = m20;
- out[9] = m21;
- out[10] = m22;
- out[11] = m23;
- out[12] = m30;
- out[13] = m31;
- out[14] = m32;
- out[15] = m33;
- return out;
- }
- /**
- * Set the components of a mat4 to the given values
- *
- * @param {mat4} out the receiving matrix
- * @param {Number} m00 Component in column 0, row 0 position (index 0)
- * @param {Number} m01 Component in column 0, row 1 position (index 1)
- * @param {Number} m02 Component in column 0, row 2 position (index 2)
- * @param {Number} m03 Component in column 0, row 3 position (index 3)
- * @param {Number} m10 Component in column 1, row 0 position (index 4)
- * @param {Number} m11 Component in column 1, row 1 position (index 5)
- * @param {Number} m12 Component in column 1, row 2 position (index 6)
- * @param {Number} m13 Component in column 1, row 3 position (index 7)
- * @param {Number} m20 Component in column 2, row 0 position (index 8)
- * @param {Number} m21 Component in column 2, row 1 position (index 9)
- * @param {Number} m22 Component in column 2, row 2 position (index 10)
- * @param {Number} m23 Component in column 2, row 3 position (index 11)
- * @param {Number} m30 Component in column 3, row 0 position (index 12)
- * @param {Number} m31 Component in column 3, row 1 position (index 13)
- * @param {Number} m32 Component in column 3, row 2 position (index 14)
- * @param {Number} m33 Component in column 3, row 3 position (index 15)
- * @returns {mat4} out
- */
-
- function set$3(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {
- out[0] = m00;
- out[1] = m01;
- out[2] = m02;
- out[3] = m03;
- out[4] = m10;
- out[5] = m11;
- out[6] = m12;
- out[7] = m13;
- out[8] = m20;
- out[9] = m21;
- out[10] = m22;
- out[11] = m23;
- out[12] = m30;
- out[13] = m31;
- out[14] = m32;
- out[15] = m33;
- return out;
- }
- /**
- * Set a mat4 to the identity matrix
- *
- * @param {mat4} out the receiving matrix
- * @returns {mat4} out
- */
-
- function identity$3(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
- /**
- * Transpose the values of a mat4
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the source matrix
- * @returns {mat4} out
- */
-
- function transpose$2(out, a) {
- // If we are transposing ourselves we can skip a few steps but have to cache some values
- if (out === a) {
- var a01 = a[1],
- a02 = a[2],
- a03 = a[3];
- var a12 = a[6],
- a13 = a[7];
- var a23 = a[11];
- out[1] = a[4];
- out[2] = a[8];
- out[3] = a[12];
- out[4] = a01;
- out[6] = a[9];
- out[7] = a[13];
- out[8] = a02;
- out[9] = a12;
- out[11] = a[14];
- out[12] = a03;
- out[13] = a13;
- out[14] = a23;
- } else {
- out[0] = a[0];
- out[1] = a[4];
- out[2] = a[8];
- out[3] = a[12];
- out[4] = a[1];
- out[5] = a[5];
- out[6] = a[9];
- out[7] = a[13];
- out[8] = a[2];
- out[9] = a[6];
- out[10] = a[10];
- out[11] = a[14];
- out[12] = a[3];
- out[13] = a[7];
- out[14] = a[11];
- out[15] = a[15];
- }
-
- return out;
- }
- /**
- * Inverts a mat4
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the source matrix
- * @returns {mat4} out
- */
-
- function invert$3(out, a) {
- var a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a03 = a[3];
- var a10 = a[4],
- a11 = a[5],
- a12 = a[6],
- a13 = a[7];
- var a20 = a[8],
- a21 = a[9],
- a22 = a[10],
- a23 = a[11];
- var a30 = a[12],
- a31 = a[13],
- a32 = a[14],
- a33 = a[15];
- var b00 = a00 * a11 - a01 * a10;
- var b01 = a00 * a12 - a02 * a10;
- var b02 = a00 * a13 - a03 * a10;
- var b03 = a01 * a12 - a02 * a11;
- var b04 = a01 * a13 - a03 * a11;
- var b05 = a02 * a13 - a03 * a12;
- var b06 = a20 * a31 - a21 * a30;
- var b07 = a20 * a32 - a22 * a30;
- var b08 = a20 * a33 - a23 * a30;
- var b09 = a21 * a32 - a22 * a31;
- var b10 = a21 * a33 - a23 * a31;
- var b11 = a22 * a33 - a23 * a32; // Calculate the determinant
-
- var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
-
- if (!det) {
- return null;
- }
-
- det = 1.0 / det;
- out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
- out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
- out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
- out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;
- out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
- out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
- out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
- out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;
- out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
- out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
- out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
- out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;
- out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;
- out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;
- out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;
- out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;
- return out;
- }
- /**
- * Calculates the adjugate of a mat4
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the source matrix
- * @returns {mat4} out
- */
-
- function adjoint$2(out, a) {
- var a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a03 = a[3];
- var a10 = a[4],
- a11 = a[5],
- a12 = a[6],
- a13 = a[7];
- var a20 = a[8],
- a21 = a[9],
- a22 = a[10],
- a23 = a[11];
- var a30 = a[12],
- a31 = a[13],
- a32 = a[14],
- a33 = a[15];
- var b00 = a00 * a11 - a01 * a10;
- var b01 = a00 * a12 - a02 * a10;
- var b02 = a00 * a13 - a03 * a10;
- var b03 = a01 * a12 - a02 * a11;
- var b04 = a01 * a13 - a03 * a11;
- var b05 = a02 * a13 - a03 * a12;
- var b06 = a20 * a31 - a21 * a30;
- var b07 = a20 * a32 - a22 * a30;
- var b08 = a20 * a33 - a23 * a30;
- var b09 = a21 * a32 - a22 * a31;
- var b10 = a21 * a33 - a23 * a31;
- var b11 = a22 * a33 - a23 * a32;
- out[0] = a11 * b11 - a12 * b10 + a13 * b09;
- out[1] = a02 * b10 - a01 * b11 - a03 * b09;
- out[2] = a31 * b05 - a32 * b04 + a33 * b03;
- out[3] = a22 * b04 - a21 * b05 - a23 * b03;
- out[4] = a12 * b08 - a10 * b11 - a13 * b07;
- out[5] = a00 * b11 - a02 * b08 + a03 * b07;
- out[6] = a32 * b02 - a30 * b05 - a33 * b01;
- out[7] = a20 * b05 - a22 * b02 + a23 * b01;
- out[8] = a10 * b10 - a11 * b08 + a13 * b06;
- out[9] = a01 * b08 - a00 * b10 - a03 * b06;
- out[10] = a30 * b04 - a31 * b02 + a33 * b00;
- out[11] = a21 * b02 - a20 * b04 - a23 * b00;
- out[12] = a11 * b07 - a10 * b09 - a12 * b06;
- out[13] = a00 * b09 - a01 * b07 + a02 * b06;
- out[14] = a31 * b01 - a30 * b03 - a32 * b00;
- out[15] = a20 * b03 - a21 * b01 + a22 * b00;
- return out;
- }
- /**
- * Calculates the determinant of a mat4
- *
- * @param {ReadonlyMat4} a the source matrix
- * @returns {Number} determinant of a
- */
-
- function determinant$3(a) {
- var a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a03 = a[3];
- var a10 = a[4],
- a11 = a[5],
- a12 = a[6],
- a13 = a[7];
- var a20 = a[8],
- a21 = a[9],
- a22 = a[10],
- a23 = a[11];
- var a30 = a[12],
- a31 = a[13],
- a32 = a[14],
- a33 = a[15];
- var b0 = a00 * a11 - a01 * a10;
- var b1 = a00 * a12 - a02 * a10;
- var b2 = a01 * a12 - a02 * a11;
- var b3 = a20 * a31 - a21 * a30;
- var b4 = a20 * a32 - a22 * a30;
- var b5 = a21 * a32 - a22 * a31;
- var b6 = a00 * b5 - a01 * b4 + a02 * b3;
- var b7 = a10 * b5 - a11 * b4 + a12 * b3;
- var b8 = a20 * b2 - a21 * b1 + a22 * b0;
- var b9 = a30 * b2 - a31 * b1 + a32 * b0; // Calculate the determinant
-
- return a13 * b6 - a03 * b7 + a33 * b8 - a23 * b9;
- }
- /**
- * Multiplies two mat4s
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the first operand
- * @param {ReadonlyMat4} b the second operand
- * @returns {mat4} out
- */
-
- function multiply$3(out, a, b) {
- var a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a03 = a[3];
- var a10 = a[4],
- a11 = a[5],
- a12 = a[6],
- a13 = a[7];
- var a20 = a[8],
- a21 = a[9],
- a22 = a[10],
- a23 = a[11];
- var a30 = a[12],
- a31 = a[13],
- a32 = a[14],
- a33 = a[15]; // Cache only the current line of the second matrix
-
- var b0 = b[0],
- b1 = b[1],
- b2 = b[2],
- b3 = b[3];
- out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
- out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
- out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
- out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
- b0 = b[4];
- b1 = b[5];
- b2 = b[6];
- b3 = b[7];
- out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
- out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
- out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
- out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
- b0 = b[8];
- b1 = b[9];
- b2 = b[10];
- b3 = b[11];
- out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
- out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
- out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
- out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
- b0 = b[12];
- b1 = b[13];
- b2 = b[14];
- b3 = b[15];
- out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
- out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
- out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
- out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
- return out;
- }
- /**
- * Translate a mat4 by the given vector
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the matrix to translate
- * @param {ReadonlyVec3} v vector to translate by
- * @returns {mat4} out
- */
-
- function translate$2(out, a, v) {
- var x = v[0],
- y = v[1],
- z = v[2];
- var a00, a01, a02, a03;
- var a10, a11, a12, a13;
- var a20, a21, a22, a23;
-
- if (a === out) {
- out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];
- out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];
- out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];
- out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];
- } else {
- a00 = a[0];
- a01 = a[1];
- a02 = a[2];
- a03 = a[3];
- a10 = a[4];
- a11 = a[5];
- a12 = a[6];
- a13 = a[7];
- a20 = a[8];
- a21 = a[9];
- a22 = a[10];
- a23 = a[11];
- out[0] = a00;
- out[1] = a01;
- out[2] = a02;
- out[3] = a03;
- out[4] = a10;
- out[5] = a11;
- out[6] = a12;
- out[7] = a13;
- out[8] = a20;
- out[9] = a21;
- out[10] = a22;
- out[11] = a23;
- out[12] = a00 * x + a10 * y + a20 * z + a[12];
- out[13] = a01 * x + a11 * y + a21 * z + a[13];
- out[14] = a02 * x + a12 * y + a22 * z + a[14];
- out[15] = a03 * x + a13 * y + a23 * z + a[15];
- }
-
- return out;
- }
- /**
- * Scales the mat4 by the dimensions in the given vec3 not using vectorization
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the matrix to scale
- * @param {ReadonlyVec3} v the vec3 to scale the matrix by
- * @returns {mat4} out
- **/
-
- function scale$3(out, a, v) {
- var x = v[0],
- y = v[1],
- z = v[2];
- out[0] = a[0] * x;
- out[1] = a[1] * x;
- out[2] = a[2] * x;
- out[3] = a[3] * x;
- out[4] = a[4] * y;
- out[5] = a[5] * y;
- out[6] = a[6] * y;
- out[7] = a[7] * y;
- out[8] = a[8] * z;
- out[9] = a[9] * z;
- out[10] = a[10] * z;
- out[11] = a[11] * z;
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- return out;
- }
- /**
- * Rotates a mat4 by the given angle around the given axis
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @param {ReadonlyVec3} axis the axis to rotate around
- * @returns {mat4} out
- */
-
- function rotate$3(out, a, rad, axis) {
- var x = axis[0],
- y = axis[1],
- z = axis[2];
- var len = Math.hypot(x, y, z);
- var s, c, t;
- var a00, a01, a02, a03;
- var a10, a11, a12, a13;
- var a20, a21, a22, a23;
- var b00, b01, b02;
- var b10, b11, b12;
- var b20, b21, b22;
-
- if (len < EPSILON) {
- return null;
- }
-
- len = 1 / len;
- x *= len;
- y *= len;
- z *= len;
- s = Math.sin(rad);
- c = Math.cos(rad);
- t = 1 - c;
- a00 = a[0];
- a01 = a[1];
- a02 = a[2];
- a03 = a[3];
- a10 = a[4];
- a11 = a[5];
- a12 = a[6];
- a13 = a[7];
- a20 = a[8];
- a21 = a[9];
- a22 = a[10];
- a23 = a[11]; // Construct the elements of the rotation matrix
-
- b00 = x * x * t + c;
- b01 = y * x * t + z * s;
- b02 = z * x * t - y * s;
- b10 = x * y * t - z * s;
- b11 = y * y * t + c;
- b12 = z * y * t + x * s;
- b20 = x * z * t + y * s;
- b21 = y * z * t - x * s;
- b22 = z * z * t + c; // Perform rotation-specific matrix multiplication
-
- out[0] = a00 * b00 + a10 * b01 + a20 * b02;
- out[1] = a01 * b00 + a11 * b01 + a21 * b02;
- out[2] = a02 * b00 + a12 * b01 + a22 * b02;
- out[3] = a03 * b00 + a13 * b01 + a23 * b02;
- out[4] = a00 * b10 + a10 * b11 + a20 * b12;
- out[5] = a01 * b10 + a11 * b11 + a21 * b12;
- out[6] = a02 * b10 + a12 * b11 + a22 * b12;
- out[7] = a03 * b10 + a13 * b11 + a23 * b12;
- out[8] = a00 * b20 + a10 * b21 + a20 * b22;
- out[9] = a01 * b20 + a11 * b21 + a21 * b22;
- out[10] = a02 * b20 + a12 * b21 + a22 * b22;
- out[11] = a03 * b20 + a13 * b21 + a23 * b22;
-
- if (a !== out) {
- // If the source and destination differ, copy the unchanged last row
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
-
- return out;
- }
- /**
- * Rotates a matrix by the given angle around the X axis
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
-
- function rotateX(out, a, rad) {
- var s = Math.sin(rad);
- var c = Math.cos(rad);
- var a10 = a[4];
- var a11 = a[5];
- var a12 = a[6];
- var a13 = a[7];
- var a20 = a[8];
- var a21 = a[9];
- var a22 = a[10];
- var a23 = a[11];
-
- if (a !== out) {
- // If the source and destination differ, copy the unchanged rows
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- } // Perform axis-specific matrix multiplication
-
-
- out[4] = a10 * c + a20 * s;
- out[5] = a11 * c + a21 * s;
- out[6] = a12 * c + a22 * s;
- out[7] = a13 * c + a23 * s;
- out[8] = a20 * c - a10 * s;
- out[9] = a21 * c - a11 * s;
- out[10] = a22 * c - a12 * s;
- out[11] = a23 * c - a13 * s;
- return out;
- }
- /**
- * Rotates a matrix by the given angle around the Y axis
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
-
- function rotateY(out, a, rad) {
- var s = Math.sin(rad);
- var c = Math.cos(rad);
- var a00 = a[0];
- var a01 = a[1];
- var a02 = a[2];
- var a03 = a[3];
- var a20 = a[8];
- var a21 = a[9];
- var a22 = a[10];
- var a23 = a[11];
-
- if (a !== out) {
- // If the source and destination differ, copy the unchanged rows
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- } // Perform axis-specific matrix multiplication
-
-
- out[0] = a00 * c - a20 * s;
- out[1] = a01 * c - a21 * s;
- out[2] = a02 * c - a22 * s;
- out[3] = a03 * c - a23 * s;
- out[8] = a00 * s + a20 * c;
- out[9] = a01 * s + a21 * c;
- out[10] = a02 * s + a22 * c;
- out[11] = a03 * s + a23 * c;
- return out;
- }
- /**
- * Rotates a matrix by the given angle around the Z axis
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
-
- function rotateZ(out, a, rad) {
- var s = Math.sin(rad);
- var c = Math.cos(rad);
- var a00 = a[0];
- var a01 = a[1];
- var a02 = a[2];
- var a03 = a[3];
- var a10 = a[4];
- var a11 = a[5];
- var a12 = a[6];
- var a13 = a[7];
-
- if (a !== out) {
- // If the source and destination differ, copy the unchanged last row
- out[8] = a[8];
- out[9] = a[9];
- out[10] = a[10];
- out[11] = a[11];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- } // Perform axis-specific matrix multiplication
-
-
- out[0] = a00 * c + a10 * s;
- out[1] = a01 * c + a11 * s;
- out[2] = a02 * c + a12 * s;
- out[3] = a03 * c + a13 * s;
- out[4] = a10 * c - a00 * s;
- out[5] = a11 * c - a01 * s;
- out[6] = a12 * c - a02 * s;
- out[7] = a13 * c - a03 * s;
- return out;
- }
- /**
- * Creates a matrix from a vector translation
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, dest, vec);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {ReadonlyVec3} v Translation vector
- * @returns {mat4} out
- */
-
- function fromTranslation$2(out, v) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = v[0];
- out[13] = v[1];
- out[14] = v[2];
- out[15] = 1;
- return out;
- }
- /**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.scale(dest, dest, vec);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {ReadonlyVec3} v Scaling vector
- * @returns {mat4} out
- */
-
- function fromScaling$3(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = v[1];
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = v[2];
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
- /**
- * Creates a matrix from a given angle around a given axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotate(dest, dest, rad, axis);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @param {ReadonlyVec3} axis the axis to rotate around
- * @returns {mat4} out
- */
-
- function fromRotation$3(out, rad, axis) {
- var x = axis[0],
- y = axis[1],
- z = axis[2];
- var len = Math.hypot(x, y, z);
- var s, c, t;
-
- if (len < EPSILON) {
- return null;
- }
-
- len = 1 / len;
- x *= len;
- y *= len;
- z *= len;
- s = Math.sin(rad);
- c = Math.cos(rad);
- t = 1 - c; // Perform rotation-specific matrix multiplication
-
- out[0] = x * x * t + c;
- out[1] = y * x * t + z * s;
- out[2] = z * x * t - y * s;
- out[3] = 0;
- out[4] = x * y * t - z * s;
- out[5] = y * y * t + c;
- out[6] = z * y * t + x * s;
- out[7] = 0;
- out[8] = x * z * t + y * s;
- out[9] = y * z * t - x * s;
- out[10] = z * z * t + c;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
- /**
- * Creates a matrix from the given angle around the X axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotateX(dest, dest, rad);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
-
- function fromXRotation(out, rad) {
- var s = Math.sin(rad);
- var c = Math.cos(rad); // Perform axis-specific matrix multiplication
-
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = c;
- out[6] = s;
- out[7] = 0;
- out[8] = 0;
- out[9] = -s;
- out[10] = c;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
- /**
- * Creates a matrix from the given angle around the Y axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotateY(dest, dest, rad);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
-
- function fromYRotation(out, rad) {
- var s = Math.sin(rad);
- var c = Math.cos(rad); // Perform axis-specific matrix multiplication
-
- out[0] = c;
- out[1] = 0;
- out[2] = -s;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = s;
- out[9] = 0;
- out[10] = c;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
- /**
- * Creates a matrix from the given angle around the Z axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotateZ(dest, dest, rad);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
-
- function fromZRotation(out, rad) {
- var s = Math.sin(rad);
- var c = Math.cos(rad); // Perform axis-specific matrix multiplication
-
- out[0] = c;
- out[1] = s;
- out[2] = 0;
- out[3] = 0;
- out[4] = -s;
- out[5] = c;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
- /**
- * Creates a matrix from a quaternion rotation and vector translation
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, vec);
- * let quatMat = mat4.create();
- * quat4.toMat4(quat, quatMat);
- * mat4.multiply(dest, quatMat);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {quat4} q Rotation quaternion
- * @param {ReadonlyVec3} v Translation vector
- * @returns {mat4} out
- */
-
- function fromRotationTranslation(out, q, v) {
- // Quaternion math
- var x = q[0],
- y = q[1],
- z = q[2],
- w = q[3];
- var x2 = x + x;
- var y2 = y + y;
- var z2 = z + z;
- var xx = x * x2;
- var xy = x * y2;
- var xz = x * z2;
- var yy = y * y2;
- var yz = y * z2;
- var zz = z * z2;
- var wx = w * x2;
- var wy = w * y2;
- var wz = w * z2;
- out[0] = 1 - (yy + zz);
- out[1] = xy + wz;
- out[2] = xz - wy;
- out[3] = 0;
- out[4] = xy - wz;
- out[5] = 1 - (xx + zz);
- out[6] = yz + wx;
- out[7] = 0;
- out[8] = xz + wy;
- out[9] = yz - wx;
- out[10] = 1 - (xx + yy);
- out[11] = 0;
- out[12] = v[0];
- out[13] = v[1];
- out[14] = v[2];
- out[15] = 1;
- return out;
- }
- /**
- * Creates a new mat4 from a dual quat.
- *
- * @param {mat4} out Matrix
- * @param {ReadonlyQuat2} a Dual Quaternion
- * @returns {mat4} mat4 receiving operation result
- */
-
- function fromQuat2(out, a) {
- var translation = new ARRAY_TYPE(3);
- var bx = -a[0],
- by = -a[1],
- bz = -a[2],
- bw = a[3],
- ax = a[4],
- ay = a[5],
- az = a[6],
- aw = a[7];
- var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense
-
- if (magnitude > 0) {
- translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;
- translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;
- translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;
- } else {
- translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;
- translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;
- translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;
- }
-
- fromRotationTranslation(out, a, translation);
- return out;
- }
- /**
- * Returns the translation vector component of a transformation
- * matrix. If a matrix is built with fromRotationTranslation,
- * the returned vector will be the same as the translation vector
- * originally supplied.
- * @param {vec3} out Vector to receive translation component
- * @param {ReadonlyMat4} mat Matrix to be decomposed (input)
- * @return {vec3} out
- */
-
- function getTranslation(out, mat) {
- out[0] = mat[12];
- out[1] = mat[13];
- out[2] = mat[14];
- return out;
- }
- /**
- * Returns the scaling factor component of a transformation
- * matrix. If a matrix is built with fromRotationTranslationScale
- * with a normalized Quaternion paramter, the returned vector will be
- * the same as the scaling vector
- * originally supplied.
- * @param {vec3} out Vector to receive scaling factor component
- * @param {ReadonlyMat4} mat Matrix to be decomposed (input)
- * @return {vec3} out
- */
-
- function getScaling(out, mat) {
- var m11 = mat[0];
- var m12 = mat[1];
- var m13 = mat[2];
- var m21 = mat[4];
- var m22 = mat[5];
- var m23 = mat[6];
- var m31 = mat[8];
- var m32 = mat[9];
- var m33 = mat[10];
- out[0] = Math.hypot(m11, m12, m13);
- out[1] = Math.hypot(m21, m22, m23);
- out[2] = Math.hypot(m31, m32, m33);
- return out;
- }
- /**
- * Returns a quaternion representing the rotational component
- * of a transformation matrix. If a matrix is built with
- * fromRotationTranslation, the returned quaternion will be the
- * same as the quaternion originally supplied.
- * @param {quat} out Quaternion to receive the rotation component
- * @param {ReadonlyMat4} mat Matrix to be decomposed (input)
- * @return {quat} out
- */
-
- function getRotation(out, mat) {
- var scaling = new ARRAY_TYPE(3);
- getScaling(scaling, mat);
- var is1 = 1 / scaling[0];
- var is2 = 1 / scaling[1];
- var is3 = 1 / scaling[2];
- var sm11 = mat[0] * is1;
- var sm12 = mat[1] * is2;
- var sm13 = mat[2] * is3;
- var sm21 = mat[4] * is1;
- var sm22 = mat[5] * is2;
- var sm23 = mat[6] * is3;
- var sm31 = mat[8] * is1;
- var sm32 = mat[9] * is2;
- var sm33 = mat[10] * is3;
- var trace = sm11 + sm22 + sm33;
- var S = 0;
-
- if (trace > 0) {
- S = Math.sqrt(trace + 1.0) * 2;
- out[3] = 0.25 * S;
- out[0] = (sm23 - sm32) / S;
- out[1] = (sm31 - sm13) / S;
- out[2] = (sm12 - sm21) / S;
- } else if (sm11 > sm22 && sm11 > sm33) {
- S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;
- out[3] = (sm23 - sm32) / S;
- out[0] = 0.25 * S;
- out[1] = (sm12 + sm21) / S;
- out[2] = (sm31 + sm13) / S;
- } else if (sm22 > sm33) {
- S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;
- out[3] = (sm31 - sm13) / S;
- out[0] = (sm12 + sm21) / S;
- out[1] = 0.25 * S;
- out[2] = (sm23 + sm32) / S;
- } else {
- S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;
- out[3] = (sm12 - sm21) / S;
- out[0] = (sm31 + sm13) / S;
- out[1] = (sm23 + sm32) / S;
- out[2] = 0.25 * S;
- }
-
- return out;
- }
- /**
- * Decomposes a transformation matrix into its rotation, translation
- * and scale components. Returns only the rotation component
- * @param {quat} out_r Quaternion to receive the rotation component
- * @param {vec3} out_t Vector to receive the translation vector
- * @param {vec3} out_s Vector to receive the scaling factor
- * @param {ReadonlyMat4} mat Matrix to be decomposed (input)
- * @returns {quat} out_r
- */
-
- function decompose(out_r, out_t, out_s, mat) {
- out_t[0] = mat[12];
- out_t[1] = mat[13];
- out_t[2] = mat[14];
- var m11 = mat[0];
- var m12 = mat[1];
- var m13 = mat[2];
- var m21 = mat[4];
- var m22 = mat[5];
- var m23 = mat[6];
- var m31 = mat[8];
- var m32 = mat[9];
- var m33 = mat[10];
- out_s[0] = Math.hypot(m11, m12, m13);
- out_s[1] = Math.hypot(m21, m22, m23);
- out_s[2] = Math.hypot(m31, m32, m33);
- var is1 = 1 / out_s[0];
- var is2 = 1 / out_s[1];
- var is3 = 1 / out_s[2];
- var sm11 = m11 * is1;
- var sm12 = m12 * is2;
- var sm13 = m13 * is3;
- var sm21 = m21 * is1;
- var sm22 = m22 * is2;
- var sm23 = m23 * is3;
- var sm31 = m31 * is1;
- var sm32 = m32 * is2;
- var sm33 = m33 * is3;
- var trace = sm11 + sm22 + sm33;
- var S = 0;
-
- if (trace > 0) {
- S = Math.sqrt(trace + 1.0) * 2;
- out_r[3] = 0.25 * S;
- out_r[0] = (sm23 - sm32) / S;
- out_r[1] = (sm31 - sm13) / S;
- out_r[2] = (sm12 - sm21) / S;
- } else if (sm11 > sm22 && sm11 > sm33) {
- S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;
- out_r[3] = (sm23 - sm32) / S;
- out_r[0] = 0.25 * S;
- out_r[1] = (sm12 + sm21) / S;
- out_r[2] = (sm31 + sm13) / S;
- } else if (sm22 > sm33) {
- S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;
- out_r[3] = (sm31 - sm13) / S;
- out_r[0] = (sm12 + sm21) / S;
- out_r[1] = 0.25 * S;
- out_r[2] = (sm23 + sm32) / S;
- } else {
- S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;
- out_r[3] = (sm12 - sm21) / S;
- out_r[0] = (sm31 + sm13) / S;
- out_r[1] = (sm23 + sm32) / S;
- out_r[2] = 0.25 * S;
- }
-
- return out_r;
- }
- /**
- * Creates a matrix from a quaternion rotation, vector translation and vector scale
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, vec);
- * let quatMat = mat4.create();
- * quat4.toMat4(quat, quatMat);
- * mat4.multiply(dest, quatMat);
- * mat4.scale(dest, scale)
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {quat4} q Rotation quaternion
- * @param {ReadonlyVec3} v Translation vector
- * @param {ReadonlyVec3} s Scaling vector
- * @returns {mat4} out
- */
-
- function fromRotationTranslationScale(out, q, v, s) {
- // Quaternion math
- var x = q[0],
- y = q[1],
- z = q[2],
- w = q[3];
- var x2 = x + x;
- var y2 = y + y;
- var z2 = z + z;
- var xx = x * x2;
- var xy = x * y2;
- var xz = x * z2;
- var yy = y * y2;
- var yz = y * z2;
- var zz = z * z2;
- var wx = w * x2;
- var wy = w * y2;
- var wz = w * z2;
- var sx = s[0];
- var sy = s[1];
- var sz = s[2];
- out[0] = (1 - (yy + zz)) * sx;
- out[1] = (xy + wz) * sx;
- out[2] = (xz - wy) * sx;
- out[3] = 0;
- out[4] = (xy - wz) * sy;
- out[5] = (1 - (xx + zz)) * sy;
- out[6] = (yz + wx) * sy;
- out[7] = 0;
- out[8] = (xz + wy) * sz;
- out[9] = (yz - wx) * sz;
- out[10] = (1 - (xx + yy)) * sz;
- out[11] = 0;
- out[12] = v[0];
- out[13] = v[1];
- out[14] = v[2];
- out[15] = 1;
- return out;
- }
- /**
- * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, vec);
- * mat4.translate(dest, origin);
- * let quatMat = mat4.create();
- * quat4.toMat4(quat, quatMat);
- * mat4.multiply(dest, quatMat);
- * mat4.scale(dest, scale)
- * mat4.translate(dest, negativeOrigin);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {quat4} q Rotation quaternion
- * @param {ReadonlyVec3} v Translation vector
- * @param {ReadonlyVec3} s Scaling vector
- * @param {ReadonlyVec3} o The origin vector around which to scale and rotate
- * @returns {mat4} out
- */
-
- function fromRotationTranslationScaleOrigin(out, q, v, s, o) {
- // Quaternion math
- var x = q[0],
- y = q[1],
- z = q[2],
- w = q[3];
- var x2 = x + x;
- var y2 = y + y;
- var z2 = z + z;
- var xx = x * x2;
- var xy = x * y2;
- var xz = x * z2;
- var yy = y * y2;
- var yz = y * z2;
- var zz = z * z2;
- var wx = w * x2;
- var wy = w * y2;
- var wz = w * z2;
- var sx = s[0];
- var sy = s[1];
- var sz = s[2];
- var ox = o[0];
- var oy = o[1];
- var oz = o[2];
- var out0 = (1 - (yy + zz)) * sx;
- var out1 = (xy + wz) * sx;
- var out2 = (xz - wy) * sx;
- var out4 = (xy - wz) * sy;
- var out5 = (1 - (xx + zz)) * sy;
- var out6 = (yz + wx) * sy;
- var out8 = (xz + wy) * sz;
- var out9 = (yz - wx) * sz;
- var out10 = (1 - (xx + yy)) * sz;
- out[0] = out0;
- out[1] = out1;
- out[2] = out2;
- out[3] = 0;
- out[4] = out4;
- out[5] = out5;
- out[6] = out6;
- out[7] = 0;
- out[8] = out8;
- out[9] = out9;
- out[10] = out10;
- out[11] = 0;
- out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);
- out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);
- out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);
- out[15] = 1;
- return out;
- }
- /**
- * Calculates a 4x4 matrix from the given quaternion
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {ReadonlyQuat} q Quaternion to create matrix from
- *
- * @returns {mat4} out
- */
-
- function fromQuat$1(out, q) {
- var x = q[0],
- y = q[1],
- z = q[2],
- w = q[3];
- var x2 = x + x;
- var y2 = y + y;
- var z2 = z + z;
- var xx = x * x2;
- var yx = y * x2;
- var yy = y * y2;
- var zx = z * x2;
- var zy = z * y2;
- var zz = z * z2;
- var wx = w * x2;
- var wy = w * y2;
- var wz = w * z2;
- out[0] = 1 - yy - zz;
- out[1] = yx + wz;
- out[2] = zx - wy;
- out[3] = 0;
- out[4] = yx - wz;
- out[5] = 1 - xx - zz;
- out[6] = zy + wx;
- out[7] = 0;
- out[8] = zx + wy;
- out[9] = zy - wx;
- out[10] = 1 - xx - yy;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
- /**
- * Generates a frustum matrix with the given bounds
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {Number} left Left bound of the frustum
- * @param {Number} right Right bound of the frustum
- * @param {Number} bottom Bottom bound of the frustum
- * @param {Number} top Top bound of the frustum
- * @param {Number} near Near bound of the frustum
- * @param {Number} far Far bound of the frustum
- * @returns {mat4} out
- */
-
- function frustum(out, left, right, bottom, top, near, far) {
- var rl = 1 / (right - left);
- var tb = 1 / (top - bottom);
- var nf = 1 / (near - far);
- out[0] = near * 2 * rl;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = near * 2 * tb;
- out[6] = 0;
- out[7] = 0;
- out[8] = (right + left) * rl;
- out[9] = (top + bottom) * tb;
- out[10] = (far + near) * nf;
- out[11] = -1;
- out[12] = 0;
- out[13] = 0;
- out[14] = far * near * 2 * nf;
- out[15] = 0;
- return out;
- }
- /**
- * Generates a perspective projection matrix with the given bounds.
- * Passing null/undefined/no value for far will generate infinite projection matrix.
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {number} fovy Vertical field of view in radians
- * @param {number} aspect Aspect ratio. typically viewport width/height
- * @param {number} near Near bound of the frustum
- * @param {number} far Far bound of the frustum, can be null or Infinity
- * @returns {mat4} out
- */
-
- function perspective(out, fovy, aspect, near, far) {
- var f = 1.0 / Math.tan(fovy / 2),
- nf;
- out[0] = f / aspect;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = f;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[11] = -1;
- out[12] = 0;
- out[13] = 0;
- out[15] = 0;
-
- if (far != null && far !== Infinity) {
- nf = 1 / (near - far);
- out[10] = (far + near) * nf;
- out[14] = 2 * far * near * nf;
- } else {
- out[10] = -1;
- out[14] = -2 * near;
- }
-
- return out;
- }
- /**
- * Generates a perspective projection matrix with the given field of view.
- * This is primarily useful for generating projection matrices to be used
- * with the still experiemental WebVR API.
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees
- * @param {number} near Near bound of the frustum
- * @param {number} far Far bound of the frustum
- * @returns {mat4} out
- */
-
- function perspectiveFromFieldOfView(out, fov, near, far) {
- var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);
- var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);
- var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);
- var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);
- var xScale = 2.0 / (leftTan + rightTan);
- var yScale = 2.0 / (upTan + downTan);
- out[0] = xScale;
- out[1] = 0.0;
- out[2] = 0.0;
- out[3] = 0.0;
- out[4] = 0.0;
- out[5] = yScale;
- out[6] = 0.0;
- out[7] = 0.0;
- out[8] = -((leftTan - rightTan) * xScale * 0.5);
- out[9] = (upTan - downTan) * yScale * 0.5;
- out[10] = far / (near - far);
- out[11] = -1.0;
- out[12] = 0.0;
- out[13] = 0.0;
- out[14] = far * near / (near - far);
- out[15] = 0.0;
- return out;
- }
- /**
- * Generates a orthogonal projection matrix with the given bounds
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {number} left Left bound of the frustum
- * @param {number} right Right bound of the frustum
- * @param {number} bottom Bottom bound of the frustum
- * @param {number} top Top bound of the frustum
- * @param {number} near Near bound of the frustum
- * @param {number} far Far bound of the frustum
- * @returns {mat4} out
- */
-
- function ortho(out, left, right, bottom, top, near, far) {
- var lr = 1 / (left - right);
- var bt = 1 / (bottom - top);
- var nf = 1 / (near - far);
- out[0] = -2 * lr;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = -2 * bt;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 2 * nf;
- out[11] = 0;
- out[12] = (left + right) * lr;
- out[13] = (top + bottom) * bt;
- out[14] = (far + near) * nf;
- out[15] = 1;
- return out;
- }
- /**
- * Generates a look-at matrix with the given eye position, focal point, and up axis.
- * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {ReadonlyVec3} eye Position of the viewer
- * @param {ReadonlyVec3} center Point the viewer is looking at
- * @param {ReadonlyVec3} up vec3 pointing up
- * @returns {mat4} out
- */
-
- function lookAt(out, eye, center, up) {
- var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;
- var eyex = eye[0];
- var eyey = eye[1];
- var eyez = eye[2];
- var upx = up[0];
- var upy = up[1];
- var upz = up[2];
- var centerx = center[0];
- var centery = center[1];
- var centerz = center[2];
-
- if (Math.abs(eyex - centerx) < EPSILON && Math.abs(eyey - centery) < EPSILON && Math.abs(eyez - centerz) < EPSILON) {
- return identity$3(out);
- }
-
- z0 = eyex - centerx;
- z1 = eyey - centery;
- z2 = eyez - centerz;
- len = 1 / Math.hypot(z0, z1, z2);
- z0 *= len;
- z1 *= len;
- z2 *= len;
- x0 = upy * z2 - upz * z1;
- x1 = upz * z0 - upx * z2;
- x2 = upx * z1 - upy * z0;
- len = Math.hypot(x0, x1, x2);
-
- if (!len) {
- x0 = 0;
- x1 = 0;
- x2 = 0;
- } else {
- len = 1 / len;
- x0 *= len;
- x1 *= len;
- x2 *= len;
- }
-
- y0 = z1 * x2 - z2 * x1;
- y1 = z2 * x0 - z0 * x2;
- y2 = z0 * x1 - z1 * x0;
- len = Math.hypot(y0, y1, y2);
-
- if (!len) {
- y0 = 0;
- y1 = 0;
- y2 = 0;
- } else {
- len = 1 / len;
- y0 *= len;
- y1 *= len;
- y2 *= len;
- }
-
- out[0] = x0;
- out[1] = y0;
- out[2] = z0;
- out[3] = 0;
- out[4] = x1;
- out[5] = y1;
- out[6] = z1;
- out[7] = 0;
- out[8] = x2;
- out[9] = y2;
- out[10] = z2;
- out[11] = 0;
- out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);
- out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);
- out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);
- out[15] = 1;
- return out;
- }
- /**
- * Generates a matrix that makes something look at something else.
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {ReadonlyVec3} eye Position of the viewer
- * @param {ReadonlyVec3} center Point the viewer is looking at
- * @param {ReadonlyVec3} up vec3 pointing up
- * @returns {mat4} out
- */
-
- function targetTo(out, eye, target, up) {
- var eyex = eye[0],
- eyey = eye[1],
- eyez = eye[2],
- upx = up[0],
- upy = up[1],
- upz = up[2];
- var z0 = eyex - target[0],
- z1 = eyey - target[1],
- z2 = eyez - target[2];
- var len = z0 * z0 + z1 * z1 + z2 * z2;
-
- if (len > 0) {
- len = 1 / Math.sqrt(len);
- z0 *= len;
- z1 *= len;
- z2 *= len;
- }
-
- var x0 = upy * z2 - upz * z1,
- x1 = upz * z0 - upx * z2,
- x2 = upx * z1 - upy * z0;
- len = x0 * x0 + x1 * x1 + x2 * x2;
-
- if (len > 0) {
- len = 1 / Math.sqrt(len);
- x0 *= len;
- x1 *= len;
- x2 *= len;
- }
-
- out[0] = x0;
- out[1] = x1;
- out[2] = x2;
- out[3] = 0;
- out[4] = z1 * x2 - z2 * x1;
- out[5] = z2 * x0 - z0 * x2;
- out[6] = z0 * x1 - z1 * x0;
- out[7] = 0;
- out[8] = z0;
- out[9] = z1;
- out[10] = z2;
- out[11] = 0;
- out[12] = eyex;
- out[13] = eyey;
- out[14] = eyez;
- out[15] = 1;
- return out;
- }
- /**
- * Returns a string representation of a mat4
- *
- * @param {ReadonlyMat4} a matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
-
- function str$3(a) {
- return "mat4(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ", " + a[8] + ", " + a[9] + ", " + a[10] + ", " + a[11] + ", " + a[12] + ", " + a[13] + ", " + a[14] + ", " + a[15] + ")";
- }
- /**
- * Returns Frobenius norm of a mat4
- *
- * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
-
- function frob$3(a) {
- return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);
- }
- /**
- * Adds two mat4's
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the first operand
- * @param {ReadonlyMat4} b the second operand
- * @returns {mat4} out
- */
-
- function add$3(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- out[3] = a[3] + b[3];
- out[4] = a[4] + b[4];
- out[5] = a[5] + b[5];
- out[6] = a[6] + b[6];
- out[7] = a[7] + b[7];
- out[8] = a[8] + b[8];
- out[9] = a[9] + b[9];
- out[10] = a[10] + b[10];
- out[11] = a[11] + b[11];
- out[12] = a[12] + b[12];
- out[13] = a[13] + b[13];
- out[14] = a[14] + b[14];
- out[15] = a[15] + b[15];
- return out;
- }
- /**
- * Subtracts matrix b from matrix a
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the first operand
- * @param {ReadonlyMat4} b the second operand
- * @returns {mat4} out
- */
-
- function subtract$3(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- out[2] = a[2] - b[2];
- out[3] = a[3] - b[3];
- out[4] = a[4] - b[4];
- out[5] = a[5] - b[5];
- out[6] = a[6] - b[6];
- out[7] = a[7] - b[7];
- out[8] = a[8] - b[8];
- out[9] = a[9] - b[9];
- out[10] = a[10] - b[10];
- out[11] = a[11] - b[11];
- out[12] = a[12] - b[12];
- out[13] = a[13] - b[13];
- out[14] = a[14] - b[14];
- out[15] = a[15] - b[15];
- return out;
- }
- /**
- * Multiply each element of the matrix by a scalar.
- *
- * @param {mat4} out the receiving matrix
- * @param {ReadonlyMat4} a the matrix to scale
- * @param {Number} b amount to scale the matrix's elements by
- * @returns {mat4} out
- */
-
- function multiplyScalar$3(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- out[3] = a[3] * b;
- out[4] = a[4] * b;
- out[5] = a[5] * b;
- out[6] = a[6] * b;
- out[7] = a[7] * b;
- out[8] = a[8] * b;
- out[9] = a[9] * b;
- out[10] = a[10] * b;
- out[11] = a[11] * b;
- out[12] = a[12] * b;
- out[13] = a[13] * b;
- out[14] = a[14] * b;
- out[15] = a[15] * b;
- return out;
- }
- /**
- * Adds two mat4's after multiplying each element of the second operand by a scalar value.
- *
- * @param {mat4} out the receiving vector
- * @param {ReadonlyMat4} a the first operand
- * @param {ReadonlyMat4} b the second operand
- * @param {Number} scale the amount to scale b's elements by before adding
- * @returns {mat4} out
- */
-
- function multiplyScalarAndAdd$3(out, a, b, scale) {
- out[0] = a[0] + b[0] * scale;
- out[1] = a[1] + b[1] * scale;
- out[2] = a[2] + b[2] * scale;
- out[3] = a[3] + b[3] * scale;
- out[4] = a[4] + b[4] * scale;
- out[5] = a[5] + b[5] * scale;
- out[6] = a[6] + b[6] * scale;
- out[7] = a[7] + b[7] * scale;
- out[8] = a[8] + b[8] * scale;
- out[9] = a[9] + b[9] * scale;
- out[10] = a[10] + b[10] * scale;
- out[11] = a[11] + b[11] * scale;
- out[12] = a[12] + b[12] * scale;
- out[13] = a[13] + b[13] * scale;
- out[14] = a[14] + b[14] * scale;
- out[15] = a[15] + b[15] * scale;
- return out;
- }
- /**
- * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
- *
- * @param {ReadonlyMat4} a The first matrix.
- * @param {ReadonlyMat4} b The second matrix.
- * @returns {Boolean} True if the matrices are equal, false otherwise.
- */
-
- function exactEquals$3(a, b) {
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];
- }
- /**
- * Returns whether or not the matrices have approximately the same elements in the same position.
- *
- * @param {ReadonlyMat4} a The first matrix.
- * @param {ReadonlyMat4} b The second matrix.
- * @returns {Boolean} True if the matrices are equal, false otherwise.
- */
-
- function equals$4(a, b) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3];
- var a4 = a[4],
- a5 = a[5],
- a6 = a[6],
- a7 = a[7];
- var a8 = a[8],
- a9 = a[9],
- a10 = a[10],
- a11 = a[11];
- var a12 = a[12],
- a13 = a[13],
- a14 = a[14],
- a15 = a[15];
- var b0 = b[0],
- b1 = b[1],
- b2 = b[2],
- b3 = b[3];
- var b4 = b[4],
- b5 = b[5],
- b6 = b[6],
- b7 = b[7];
- var b8 = b[8],
- b9 = b[9],
- b10 = b[10],
- b11 = b[11];
- var b12 = b[12],
- b13 = b[13],
- b14 = b[14],
- b15 = b[15];
- return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));
- }
- /**
- * Alias for {@link mat4.multiply}
- * @function
- */
-
- var mul$3 = multiply$3;
- /**
- * Alias for {@link mat4.subtract}
- * @function
- */
-
- var sub$3 = subtract$3;
-
- var mat4 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- create: create$3,
- clone: clone$3,
- copy: copy$3,
- fromValues: fromValues$3,
- set: set$3,
- identity: identity$3,
- transpose: transpose$2,
- invert: invert$3,
- adjoint: adjoint$2,
- determinant: determinant$3,
- multiply: multiply$3,
- translate: translate$2,
- scale: scale$3,
- rotate: rotate$3,
- rotateX: rotateX,
- rotateY: rotateY,
- rotateZ: rotateZ,
- fromTranslation: fromTranslation$2,
- fromScaling: fromScaling$3,
- fromRotation: fromRotation$3,
- fromXRotation: fromXRotation,
- fromYRotation: fromYRotation,
- fromZRotation: fromZRotation,
- fromRotationTranslation: fromRotationTranslation,
- fromQuat2: fromQuat2,
- getTranslation: getTranslation,
- getScaling: getScaling,
- getRotation: getRotation,
- decompose: decompose,
- fromRotationTranslationScale: fromRotationTranslationScale,
- fromRotationTranslationScaleOrigin: fromRotationTranslationScaleOrigin,
- fromQuat: fromQuat$1,
- frustum: frustum,
- perspective: perspective,
- perspectiveFromFieldOfView: perspectiveFromFieldOfView,
- ortho: ortho,
- lookAt: lookAt,
- targetTo: targetTo,
- str: str$3,
- frob: frob$3,
- add: add$3,
- subtract: subtract$3,
- multiplyScalar: multiplyScalar$3,
- multiplyScalarAndAdd: multiplyScalarAndAdd$3,
- exactEquals: exactEquals$3,
- equals: equals$4,
- mul: mul$3,
- sub: sub$3
- });
-
- /**
- * 3 Dimensional Vector
- * @module vec3
- */
-
- /**
- * Creates a new, empty vec3
- *
- * @returns {vec3} a new 3D vector
- */
-
- function create$4() {
- var out = new ARRAY_TYPE(3);
-
- if (ARRAY_TYPE != Float32Array) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- }
-
- return out;
- }
- /**
- * Creates a new vec3 initialized with values from an existing vector
- *
- * @param {ReadonlyVec3} a vector to clone
- * @returns {vec3} a new 3D vector
- */
-
- function clone$4(a) {
- var out = new ARRAY_TYPE(3);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- return out;
- }
- /**
- * Calculates the length of a vec3
- *
- * @param {ReadonlyVec3} a vector to calculate length of
- * @returns {Number} length of a
- */
-
- function length(a) {
- var x = a[0];
- var y = a[1];
- var z = a[2];
- return Math.hypot(x, y, z);
- }
- /**
- * Creates a new vec3 initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @returns {vec3} a new 3D vector
- */
-
- function fromValues$4(x, y, z) {
- var out = new ARRAY_TYPE(3);
- out[0] = x;
- out[1] = y;
- out[2] = z;
- return out;
- }
- /**
- * Copy the values from one vec3 to another
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the source vector
- * @returns {vec3} out
- */
-
- function copy$4(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- return out;
- }
- /**
- * Set the components of a vec3 to the given values
- *
- * @param {vec3} out the receiving vector
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @returns {vec3} out
- */
-
- function set$4(out, x, y, z) {
- out[0] = x;
- out[1] = y;
- out[2] = z;
- return out;
- }
- /**
- * Adds two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @returns {vec3} out
- */
-
- function add$4(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- return out;
- }
- /**
- * Subtracts vector b from vector a
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @returns {vec3} out
- */
-
- function subtract$4(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- out[2] = a[2] - b[2];
- return out;
- }
- /**
- * Multiplies two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @returns {vec3} out
- */
-
- function multiply$4(out, a, b) {
- out[0] = a[0] * b[0];
- out[1] = a[1] * b[1];
- out[2] = a[2] * b[2];
- return out;
- }
- /**
- * Divides two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @returns {vec3} out
- */
-
- function divide(out, a, b) {
- out[0] = a[0] / b[0];
- out[1] = a[1] / b[1];
- out[2] = a[2] / b[2];
- return out;
- }
- /**
- * Math.ceil the components of a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a vector to ceil
- * @returns {vec3} out
- */
-
- function ceil(out, a) {
- out[0] = Math.ceil(a[0]);
- out[1] = Math.ceil(a[1]);
- out[2] = Math.ceil(a[2]);
- return out;
- }
- /**
- * Math.floor the components of a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a vector to floor
- * @returns {vec3} out
- */
-
- function floor(out, a) {
- out[0] = Math.floor(a[0]);
- out[1] = Math.floor(a[1]);
- out[2] = Math.floor(a[2]);
- return out;
- }
- /**
- * Returns the minimum of two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @returns {vec3} out
- */
-
- function min(out, a, b) {
- out[0] = Math.min(a[0], b[0]);
- out[1] = Math.min(a[1], b[1]);
- out[2] = Math.min(a[2], b[2]);
- return out;
- }
- /**
- * Returns the maximum of two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @returns {vec3} out
- */
-
- function max(out, a, b) {
- out[0] = Math.max(a[0], b[0]);
- out[1] = Math.max(a[1], b[1]);
- out[2] = Math.max(a[2], b[2]);
- return out;
- }
- /**
- * Math.round the components of a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a vector to round
- * @returns {vec3} out
- */
-
- function round(out, a) {
- out[0] = Math.round(a[0]);
- out[1] = Math.round(a[1]);
- out[2] = Math.round(a[2]);
- return out;
- }
- /**
- * Scales a vec3 by a scalar number
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {vec3} out
- */
-
- function scale$4(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- return out;
- }
- /**
- * Adds two vec3's after scaling the second operand by a scalar value
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @param {Number} scale the amount to scale b by before adding
- * @returns {vec3} out
- */
-
- function scaleAndAdd(out, a, b, scale) {
- out[0] = a[0] + b[0] * scale;
- out[1] = a[1] + b[1] * scale;
- out[2] = a[2] + b[2] * scale;
- return out;
- }
- /**
- * Calculates the euclidian distance between two vec3's
- *
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @returns {Number} distance between a and b
- */
-
- function distance(a, b) {
- var x = b[0] - a[0];
- var y = b[1] - a[1];
- var z = b[2] - a[2];
- return Math.hypot(x, y, z);
- }
- /**
- * Calculates the squared euclidian distance between two vec3's
- *
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @returns {Number} squared distance between a and b
- */
-
- function squaredDistance(a, b) {
- var x = b[0] - a[0];
- var y = b[1] - a[1];
- var z = b[2] - a[2];
- return x * x + y * y + z * z;
- }
- /**
- * Calculates the squared length of a vec3
- *
- * @param {ReadonlyVec3} a vector to calculate squared length of
- * @returns {Number} squared length of a
- */
-
- function squaredLength(a) {
- var x = a[0];
- var y = a[1];
- var z = a[2];
- return x * x + y * y + z * z;
- }
- /**
- * Negates the components of a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a vector to negate
- * @returns {vec3} out
- */
-
- function negate(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- return out;
- }
- /**
- * Returns the inverse of the components of a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a vector to invert
- * @returns {vec3} out
- */
-
- function inverse(out, a) {
- out[0] = 1.0 / a[0];
- out[1] = 1.0 / a[1];
- out[2] = 1.0 / a[2];
- return out;
- }
- /**
- * Normalize a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a vector to normalize
- * @returns {vec3} out
- */
-
- function normalize(out, a) {
- var x = a[0];
- var y = a[1];
- var z = a[2];
- var len = x * x + y * y + z * z;
-
- if (len > 0) {
- //TODO: evaluate use of glm_invsqrt here?
- len = 1 / Math.sqrt(len);
- }
-
- out[0] = a[0] * len;
- out[1] = a[1] * len;
- out[2] = a[2] * len;
- return out;
- }
- /**
- * Calculates the dot product of two vec3's
- *
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @returns {Number} dot product of a and b
- */
-
- function dot(a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
- }
- /**
- * Computes the cross product of two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @returns {vec3} out
- */
-
- function cross(out, a, b) {
- var ax = a[0],
- ay = a[1],
- az = a[2];
- var bx = b[0],
- by = b[1],
- bz = b[2];
- out[0] = ay * bz - az * by;
- out[1] = az * bx - ax * bz;
- out[2] = ax * by - ay * bx;
- return out;
- }
- /**
- * Performs a linear interpolation between two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
- * @returns {vec3} out
- */
-
- function lerp(out, a, b, t) {
- var ax = a[0];
- var ay = a[1];
- var az = a[2];
- out[0] = ax + t * (b[0] - ax);
- out[1] = ay + t * (b[1] - ay);
- out[2] = az + t * (b[2] - az);
- return out;
- }
- /**
- * Performs a spherical linear interpolation between two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
- * @returns {vec3} out
- */
-
- function slerp(out, a, b, t) {
- var angle = Math.acos(Math.min(Math.max(dot(a, b), -1), 1));
- var sinTotal = Math.sin(angle);
- var ratioA = Math.sin((1 - t) * angle) / sinTotal;
- var ratioB = Math.sin(t * angle) / sinTotal;
- out[0] = ratioA * a[0] + ratioB * b[0];
- out[1] = ratioA * a[1] + ratioB * b[1];
- out[2] = ratioA * a[2] + ratioB * b[2];
- return out;
- }
- /**
- * Performs a hermite interpolation with two control points
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @param {ReadonlyVec3} c the third operand
- * @param {ReadonlyVec3} d the fourth operand
- * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
- * @returns {vec3} out
- */
-
- function hermite(out, a, b, c, d, t) {
- var factorTimes2 = t * t;
- var factor1 = factorTimes2 * (2 * t - 3) + 1;
- var factor2 = factorTimes2 * (t - 2) + t;
- var factor3 = factorTimes2 * (t - 1);
- var factor4 = factorTimes2 * (3 - 2 * t);
- out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
- out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
- out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
- return out;
- }
- /**
- * Performs a bezier interpolation with two control points
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the first operand
- * @param {ReadonlyVec3} b the second operand
- * @param {ReadonlyVec3} c the third operand
- * @param {ReadonlyVec3} d the fourth operand
- * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
- * @returns {vec3} out
- */
-
- function bezier(out, a, b, c, d, t) {
- var inverseFactor = 1 - t;
- var inverseFactorTimesTwo = inverseFactor * inverseFactor;
- var factorTimes2 = t * t;
- var factor1 = inverseFactorTimesTwo * inverseFactor;
- var factor2 = 3 * t * inverseFactorTimesTwo;
- var factor3 = 3 * factorTimes2 * inverseFactor;
- var factor4 = factorTimes2 * t;
- out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
- out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
- out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
- return out;
- }
- /**
- * Generates a random vector with the given scale
- *
- * @param {vec3} out the receiving vector
- * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
- * @returns {vec3} out
- */
-
- function random(out, scale) {
- scale = scale || 1.0;
- var r = RANDOM() * 2.0 * Math.PI;
- var z = RANDOM() * 2.0 - 1.0;
- var zScale = Math.sqrt(1.0 - z * z) * scale;
- out[0] = Math.cos(r) * zScale;
- out[1] = Math.sin(r) * zScale;
- out[2] = z * scale;
- return out;
- }
- /**
- * Transforms the vec3 with a mat4.
- * 4th vector component is implicitly '1'
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the vector to transform
- * @param {ReadonlyMat4} m matrix to transform with
- * @returns {vec3} out
- */
-
- function transformMat4(out, a, m) {
- var x = a[0],
- y = a[1],
- z = a[2];
- var w = m[3] * x + m[7] * y + m[11] * z + m[15];
- w = w || 1.0;
- out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;
- out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;
- out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;
- return out;
- }
- /**
- * Transforms the vec3 with a mat3.
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the vector to transform
- * @param {ReadonlyMat3} m the 3x3 matrix to transform with
- * @returns {vec3} out
- */
-
- function transformMat3(out, a, m) {
- var x = a[0],
- y = a[1],
- z = a[2];
- out[0] = x * m[0] + y * m[3] + z * m[6];
- out[1] = x * m[1] + y * m[4] + z * m[7];
- out[2] = x * m[2] + y * m[5] + z * m[8];
- return out;
- }
- /**
- * Transforms the vec3 with a quat
- * Can also be used for dual quaternions. (Multiply it with the real part)
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec3} a the vector to transform
- * @param {ReadonlyQuat} q quaternion to transform with
- * @returns {vec3} out
- */
-
- function transformQuat(out, a, q) {
- // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed
- var qx = q[0],
- qy = q[1],
- qz = q[2],
- qw = q[3];
- var x = a[0],
- y = a[1],
- z = a[2]; // var qvec = [qx, qy, qz];
- // var uv = vec3.cross([], qvec, a);
-
- var uvx = qy * z - qz * y,
- uvy = qz * x - qx * z,
- uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);
-
- var uuvx = qy * uvz - qz * uvy,
- uuvy = qz * uvx - qx * uvz,
- uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);
-
- var w2 = qw * 2;
- uvx *= w2;
- uvy *= w2;
- uvz *= w2; // vec3.scale(uuv, uuv, 2);
-
- uuvx *= 2;
- uuvy *= 2;
- uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));
-
- out[0] = x + uvx + uuvx;
- out[1] = y + uvy + uuvy;
- out[2] = z + uvz + uuvz;
- return out;
- }
- /**
- * Rotate a 3D vector around the x-axis
- * @param {vec3} out The receiving vec3
- * @param {ReadonlyVec3} a The vec3 point to rotate
- * @param {ReadonlyVec3} b The origin of the rotation
- * @param {Number} rad The angle of rotation in radians
- * @returns {vec3} out
- */
-
- function rotateX$1(out, a, b, rad) {
- var p = [],
- r = []; //Translate point to the origin
-
- p[0] = a[0] - b[0];
- p[1] = a[1] - b[1];
- p[2] = a[2] - b[2]; //perform rotation
-
- r[0] = p[0];
- r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);
- r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position
-
- out[0] = r[0] + b[0];
- out[1] = r[1] + b[1];
- out[2] = r[2] + b[2];
- return out;
- }
- /**
- * Rotate a 3D vector around the y-axis
- * @param {vec3} out The receiving vec3
- * @param {ReadonlyVec3} a The vec3 point to rotate
- * @param {ReadonlyVec3} b The origin of the rotation
- * @param {Number} rad The angle of rotation in radians
- * @returns {vec3} out
- */
-
- function rotateY$1(out, a, b, rad) {
- var p = [],
- r = []; //Translate point to the origin
-
- p[0] = a[0] - b[0];
- p[1] = a[1] - b[1];
- p[2] = a[2] - b[2]; //perform rotation
-
- r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);
- r[1] = p[1];
- r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position
-
- out[0] = r[0] + b[0];
- out[1] = r[1] + b[1];
- out[2] = r[2] + b[2];
- return out;
- }
- /**
- * Rotate a 3D vector around the z-axis
- * @param {vec3} out The receiving vec3
- * @param {ReadonlyVec3} a The vec3 point to rotate
- * @param {ReadonlyVec3} b The origin of the rotation
- * @param {Number} rad The angle of rotation in radians
- * @returns {vec3} out
- */
-
- function rotateZ$1(out, a, b, rad) {
- var p = [],
- r = []; //Translate point to the origin
-
- p[0] = a[0] - b[0];
- p[1] = a[1] - b[1];
- p[2] = a[2] - b[2]; //perform rotation
-
- r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);
- r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);
- r[2] = p[2]; //translate to correct position
-
- out[0] = r[0] + b[0];
- out[1] = r[1] + b[1];
- out[2] = r[2] + b[2];
- return out;
- }
- /**
- * Get the angle between two 3D vectors
- * @param {ReadonlyVec3} a The first operand
- * @param {ReadonlyVec3} b The second operand
- * @returns {Number} The angle in radians
- */
-
- function angle(a, b) {
- var ax = a[0],
- ay = a[1],
- az = a[2],
- bx = b[0],
- by = b[1],
- bz = b[2],
- mag1 = Math.sqrt(ax * ax + ay * ay + az * az),
- mag2 = Math.sqrt(bx * bx + by * by + bz * bz),
- mag = mag1 * mag2,
- cosine = mag && dot(a, b) / mag;
- return Math.acos(Math.min(Math.max(cosine, -1), 1));
- }
- /**
- * Set the components of a vec3 to zero
- *
- * @param {vec3} out the receiving vector
- * @returns {vec3} out
- */
-
- function zero(out) {
- out[0] = 0.0;
- out[1] = 0.0;
- out[2] = 0.0;
- return out;
- }
- /**
- * Returns a string representation of a vector
- *
- * @param {ReadonlyVec3} a vector to represent as a string
- * @returns {String} string representation of the vector
- */
-
- function str$4(a) {
- return "vec3(" + a[0] + ", " + a[1] + ", " + a[2] + ")";
- }
- /**
- * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
- *
- * @param {ReadonlyVec3} a The first vector.
- * @param {ReadonlyVec3} b The second vector.
- * @returns {Boolean} True if the vectors are equal, false otherwise.
- */
-
- function exactEquals$4(a, b) {
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];
- }
- /**
- * Returns whether or not the vectors have approximately the same elements in the same position.
- *
- * @param {ReadonlyVec3} a The first vector.
- * @param {ReadonlyVec3} b The second vector.
- * @returns {Boolean} True if the vectors are equal, false otherwise.
- */
-
- function equals$5(a, b) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2];
- var b0 = b[0],
- b1 = b[1],
- b2 = b[2];
- return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));
- }
- /**
- * Alias for {@link vec3.subtract}
- * @function
- */
-
- var sub$4 = subtract$4;
- /**
- * Alias for {@link vec3.multiply}
- * @function
- */
-
- var mul$4 = multiply$4;
- /**
- * Alias for {@link vec3.divide}
- * @function
- */
-
- var div = divide;
- /**
- * Alias for {@link vec3.distance}
- * @function
- */
-
- var dist = distance;
- /**
- * Alias for {@link vec3.squaredDistance}
- * @function
- */
-
- var sqrDist = squaredDistance;
- /**
- * Alias for {@link vec3.length}
- * @function
- */
-
- var len = length;
- /**
- * Alias for {@link vec3.squaredLength}
- * @function
- */
-
- var sqrLen = squaredLength;
- /**
- * Perform some operation over an array of vec3s.
- *
- * @param {Array} a the array of vectors to iterate over
- * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed
- * @param {Number} offset Number of elements to skip at the beginning of the array
- * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array
- * @param {Function} fn Function to call for each vector in the array
- * @param {Object} [arg] additional argument to pass to fn
- * @returns {Array} a
- * @function
- */
-
- var forEach = function () {
- var vec = create$4();
- return function (a, stride, offset, count, fn, arg) {
- var i, l;
-
- if (!stride) {
- stride = 3;
- }
-
- if (!offset) {
- offset = 0;
- }
-
- if (count) {
- l = Math.min(count * stride + offset, a.length);
- } else {
- l = a.length;
- }
-
- for (i = offset; i < l; i += stride) {
- vec[0] = a[i];
- vec[1] = a[i + 1];
- vec[2] = a[i + 2];
- fn(vec, vec, arg);
- a[i] = vec[0];
- a[i + 1] = vec[1];
- a[i + 2] = vec[2];
- }
-
- return a;
- };
- }();
-
- var vec3 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- create: create$4,
- clone: clone$4,
- length: length,
- fromValues: fromValues$4,
- copy: copy$4,
- set: set$4,
- add: add$4,
- subtract: subtract$4,
- multiply: multiply$4,
- divide: divide,
- ceil: ceil,
- floor: floor,
- min: min,
- max: max,
- round: round,
- scale: scale$4,
- scaleAndAdd: scaleAndAdd,
- distance: distance,
- squaredDistance: squaredDistance,
- squaredLength: squaredLength,
- negate: negate,
- inverse: inverse,
- normalize: normalize,
- dot: dot,
- cross: cross,
- lerp: lerp,
- slerp: slerp,
- hermite: hermite,
- bezier: bezier,
- random: random,
- transformMat4: transformMat4,
- transformMat3: transformMat3,
- transformQuat: transformQuat,
- rotateX: rotateX$1,
- rotateY: rotateY$1,
- rotateZ: rotateZ$1,
- angle: angle,
- zero: zero,
- str: str$4,
- exactEquals: exactEquals$4,
- equals: equals$5,
- sub: sub$4,
- mul: mul$4,
- div: div,
- dist: dist,
- sqrDist: sqrDist,
- len: len,
- sqrLen: sqrLen,
- forEach: forEach
- });
-
- /**
- * 4 Dimensional Vector
- * @module vec4
- */
-
- /**
- * Creates a new, empty vec4
- *
- * @returns {vec4} a new 4D vector
- */
-
- function create$5() {
- var out = new ARRAY_TYPE(4);
-
- if (ARRAY_TYPE != Float32Array) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- }
-
- return out;
- }
- /**
- * Creates a new vec4 initialized with values from an existing vector
- *
- * @param {ReadonlyVec4} a vector to clone
- * @returns {vec4} a new 4D vector
- */
-
- function clone$5(a) {
- var out = new ARRAY_TYPE(4);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
- }
- /**
- * Creates a new vec4 initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {vec4} a new 4D vector
- */
-
- function fromValues$5(x, y, z, w) {
- var out = new ARRAY_TYPE(4);
- out[0] = x;
- out[1] = y;
- out[2] = z;
- out[3] = w;
- return out;
- }
- /**
- * Copy the values from one vec4 to another
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a the source vector
- * @returns {vec4} out
- */
-
- function copy$5(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
- }
- /**
- * Set the components of a vec4 to the given values
- *
- * @param {vec4} out the receiving vector
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {vec4} out
- */
-
- function set$5(out, x, y, z, w) {
- out[0] = x;
- out[1] = y;
- out[2] = z;
- out[3] = w;
- return out;
- }
- /**
- * Adds two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a the first operand
- * @param {ReadonlyVec4} b the second operand
- * @returns {vec4} out
- */
-
- function add$5(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- out[3] = a[3] + b[3];
- return out;
- }
- /**
- * Subtracts vector b from vector a
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a the first operand
- * @param {ReadonlyVec4} b the second operand
- * @returns {vec4} out
- */
-
- function subtract$5(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- out[2] = a[2] - b[2];
- out[3] = a[3] - b[3];
- return out;
- }
- /**
- * Multiplies two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a the first operand
- * @param {ReadonlyVec4} b the second operand
- * @returns {vec4} out
- */
-
- function multiply$5(out, a, b) {
- out[0] = a[0] * b[0];
- out[1] = a[1] * b[1];
- out[2] = a[2] * b[2];
- out[3] = a[3] * b[3];
- return out;
- }
- /**
- * Divides two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a the first operand
- * @param {ReadonlyVec4} b the second operand
- * @returns {vec4} out
- */
-
- function divide$1(out, a, b) {
- out[0] = a[0] / b[0];
- out[1] = a[1] / b[1];
- out[2] = a[2] / b[2];
- out[3] = a[3] / b[3];
- return out;
- }
- /**
- * Math.ceil the components of a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a vector to ceil
- * @returns {vec4} out
- */
-
- function ceil$1(out, a) {
- out[0] = Math.ceil(a[0]);
- out[1] = Math.ceil(a[1]);
- out[2] = Math.ceil(a[2]);
- out[3] = Math.ceil(a[3]);
- return out;
- }
- /**
- * Math.floor the components of a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a vector to floor
- * @returns {vec4} out
- */
-
- function floor$1(out, a) {
- out[0] = Math.floor(a[0]);
- out[1] = Math.floor(a[1]);
- out[2] = Math.floor(a[2]);
- out[3] = Math.floor(a[3]);
- return out;
- }
- /**
- * Returns the minimum of two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a the first operand
- * @param {ReadonlyVec4} b the second operand
- * @returns {vec4} out
- */
-
- function min$1(out, a, b) {
- out[0] = Math.min(a[0], b[0]);
- out[1] = Math.min(a[1], b[1]);
- out[2] = Math.min(a[2], b[2]);
- out[3] = Math.min(a[3], b[3]);
- return out;
- }
- /**
- * Returns the maximum of two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a the first operand
- * @param {ReadonlyVec4} b the second operand
- * @returns {vec4} out
- */
-
- function max$1(out, a, b) {
- out[0] = Math.max(a[0], b[0]);
- out[1] = Math.max(a[1], b[1]);
- out[2] = Math.max(a[2], b[2]);
- out[3] = Math.max(a[3], b[3]);
- return out;
- }
- /**
- * Math.round the components of a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a vector to round
- * @returns {vec4} out
- */
-
- function round$1(out, a) {
- out[0] = Math.round(a[0]);
- out[1] = Math.round(a[1]);
- out[2] = Math.round(a[2]);
- out[3] = Math.round(a[3]);
- return out;
- }
- /**
- * Scales a vec4 by a scalar number
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {vec4} out
- */
-
- function scale$5(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- out[3] = a[3] * b;
- return out;
- }
- /**
- * Adds two vec4's after scaling the second operand by a scalar value
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a the first operand
- * @param {ReadonlyVec4} b the second operand
- * @param {Number} scale the amount to scale b by before adding
- * @returns {vec4} out
- */
-
- function scaleAndAdd$1(out, a, b, scale) {
- out[0] = a[0] + b[0] * scale;
- out[1] = a[1] + b[1] * scale;
- out[2] = a[2] + b[2] * scale;
- out[3] = a[3] + b[3] * scale;
- return out;
- }
- /**
- * Calculates the euclidian distance between two vec4's
- *
- * @param {ReadonlyVec4} a the first operand
- * @param {ReadonlyVec4} b the second operand
- * @returns {Number} distance between a and b
- */
-
- function distance$1(a, b) {
- var x = b[0] - a[0];
- var y = b[1] - a[1];
- var z = b[2] - a[2];
- var w = b[3] - a[3];
- return Math.hypot(x, y, z, w);
- }
- /**
- * Calculates the squared euclidian distance between two vec4's
- *
- * @param {ReadonlyVec4} a the first operand
- * @param {ReadonlyVec4} b the second operand
- * @returns {Number} squared distance between a and b
- */
-
- function squaredDistance$1(a, b) {
- var x = b[0] - a[0];
- var y = b[1] - a[1];
- var z = b[2] - a[2];
- var w = b[3] - a[3];
- return x * x + y * y + z * z + w * w;
- }
- /**
- * Calculates the length of a vec4
- *
- * @param {ReadonlyVec4} a vector to calculate length of
- * @returns {Number} length of a
- */
-
- function length$1(a) {
- var x = a[0];
- var y = a[1];
- var z = a[2];
- var w = a[3];
- return Math.hypot(x, y, z, w);
- }
- /**
- * Calculates the squared length of a vec4
- *
- * @param {ReadonlyVec4} a vector to calculate squared length of
- * @returns {Number} squared length of a
- */
-
- function squaredLength$1(a) {
- var x = a[0];
- var y = a[1];
- var z = a[2];
- var w = a[3];
- return x * x + y * y + z * z + w * w;
- }
- /**
- * Negates the components of a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a vector to negate
- * @returns {vec4} out
- */
-
- function negate$1(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = -a[3];
- return out;
- }
- /**
- * Returns the inverse of the components of a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a vector to invert
- * @returns {vec4} out
- */
-
- function inverse$1(out, a) {
- out[0] = 1.0 / a[0];
- out[1] = 1.0 / a[1];
- out[2] = 1.0 / a[2];
- out[3] = 1.0 / a[3];
- return out;
- }
- /**
- * Normalize a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a vector to normalize
- * @returns {vec4} out
- */
-
- function normalize$1(out, a) {
- var x = a[0];
- var y = a[1];
- var z = a[2];
- var w = a[3];
- var len = x * x + y * y + z * z + w * w;
-
- if (len > 0) {
- len = 1 / Math.sqrt(len);
- }
-
- out[0] = x * len;
- out[1] = y * len;
- out[2] = z * len;
- out[3] = w * len;
- return out;
- }
- /**
- * Calculates the dot product of two vec4's
- *
- * @param {ReadonlyVec4} a the first operand
- * @param {ReadonlyVec4} b the second operand
- * @returns {Number} dot product of a and b
- */
-
- function dot$1(a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
- }
- /**
- * Returns the cross-product of three vectors in a 4-dimensional space
- *
- * @param {ReadonlyVec4} result the receiving vector
- * @param {ReadonlyVec4} U the first vector
- * @param {ReadonlyVec4} V the second vector
- * @param {ReadonlyVec4} W the third vector
- * @returns {vec4} result
- */
-
- function cross$1(out, u, v, w) {
- var A = v[0] * w[1] - v[1] * w[0],
- B = v[0] * w[2] - v[2] * w[0],
- C = v[0] * w[3] - v[3] * w[0],
- D = v[1] * w[2] - v[2] * w[1],
- E = v[1] * w[3] - v[3] * w[1],
- F = v[2] * w[3] - v[3] * w[2];
- var G = u[0];
- var H = u[1];
- var I = u[2];
- var J = u[3];
- out[0] = H * F - I * E + J * D;
- out[1] = -(G * F) + I * C - J * B;
- out[2] = G * E - H * C + J * A;
- out[3] = -(G * D) + H * B - I * A;
- return out;
- }
- /**
- * Performs a linear interpolation between two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a the first operand
- * @param {ReadonlyVec4} b the second operand
- * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
- * @returns {vec4} out
- */
-
- function lerp$1(out, a, b, t) {
- var ax = a[0];
- var ay = a[1];
- var az = a[2];
- var aw = a[3];
- out[0] = ax + t * (b[0] - ax);
- out[1] = ay + t * (b[1] - ay);
- out[2] = az + t * (b[2] - az);
- out[3] = aw + t * (b[3] - aw);
- return out;
- }
- /**
- * Generates a random vector with the given scale
- *
- * @param {vec4} out the receiving vector
- * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
- * @returns {vec4} out
- */
-
- function random$1(out, scale) {
- scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a
- // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.
- // http://projecteuclid.org/euclid.aoms/1177692644;
-
- var v1, v2, v3, v4;
- var s1, s2;
-
- do {
- v1 = RANDOM() * 2 - 1;
- v2 = RANDOM() * 2 - 1;
- s1 = v1 * v1 + v2 * v2;
- } while (s1 >= 1);
-
- do {
- v3 = RANDOM() * 2 - 1;
- v4 = RANDOM() * 2 - 1;
- s2 = v3 * v3 + v4 * v4;
- } while (s2 >= 1);
-
- var d = Math.sqrt((1 - s1) / s2);
- out[0] = scale * v1;
- out[1] = scale * v2;
- out[2] = scale * v3 * d;
- out[3] = scale * v4 * d;
- return out;
- }
- /**
- * Transforms the vec4 with a mat4.
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a the vector to transform
- * @param {ReadonlyMat4} m matrix to transform with
- * @returns {vec4} out
- */
-
- function transformMat4$1(out, a, m) {
- var x = a[0],
- y = a[1],
- z = a[2],
- w = a[3];
- out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;
- out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;
- out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;
- out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;
- return out;
- }
- /**
- * Transforms the vec4 with a quat
- *
- * @param {vec4} out the receiving vector
- * @param {ReadonlyVec4} a the vector to transform
- * @param {ReadonlyQuat} q quaternion to transform with
- * @returns {vec4} out
- */
-
- function transformQuat$1(out, a, q) {
- var x = a[0],
- y = a[1],
- z = a[2];
- var qx = q[0],
- qy = q[1],
- qz = q[2],
- qw = q[3]; // calculate quat * vec
-
- var ix = qw * x + qy * z - qz * y;
- var iy = qw * y + qz * x - qx * z;
- var iz = qw * z + qx * y - qy * x;
- var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat
-
- out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
- out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
- out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
- out[3] = a[3];
- return out;
- }
- /**
- * Set the components of a vec4 to zero
- *
- * @param {vec4} out the receiving vector
- * @returns {vec4} out
- */
-
- function zero$1(out) {
- out[0] = 0.0;
- out[1] = 0.0;
- out[2] = 0.0;
- out[3] = 0.0;
- return out;
- }
- /**
- * Returns a string representation of a vector
- *
- * @param {ReadonlyVec4} a vector to represent as a string
- * @returns {String} string representation of the vector
- */
-
- function str$5(a) {
- return "vec4(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ")";
- }
- /**
- * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
- *
- * @param {ReadonlyVec4} a The first vector.
- * @param {ReadonlyVec4} b The second vector.
- * @returns {Boolean} True if the vectors are equal, false otherwise.
- */
-
- function exactEquals$5(a, b) {
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];
- }
- /**
- * Returns whether or not the vectors have approximately the same elements in the same position.
- *
- * @param {ReadonlyVec4} a The first vector.
- * @param {ReadonlyVec4} b The second vector.
- * @returns {Boolean} True if the vectors are equal, false otherwise.
- */
-
- function equals$6(a, b) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3];
- var b0 = b[0],
- b1 = b[1],
- b2 = b[2],
- b3 = b[3];
- return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));
- }
- /**
- * Alias for {@link vec4.subtract}
- * @function
- */
-
- var sub$5 = subtract$5;
- /**
- * Alias for {@link vec4.multiply}
- * @function
- */
-
- var mul$5 = multiply$5;
- /**
- * Alias for {@link vec4.divide}
- * @function
- */
-
- var div$1 = divide$1;
- /**
- * Alias for {@link vec4.distance}
- * @function
- */
-
- var dist$1 = distance$1;
- /**
- * Alias for {@link vec4.squaredDistance}
- * @function
- */
-
- var sqrDist$1 = squaredDistance$1;
- /**
- * Alias for {@link vec4.length}
- * @function
- */
-
- var len$1 = length$1;
- /**
- * Alias for {@link vec4.squaredLength}
- * @function
- */
-
- var sqrLen$1 = squaredLength$1;
- /**
- * Perform some operation over an array of vec4s.
- *
- * @param {Array} a the array of vectors to iterate over
- * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed
- * @param {Number} offset Number of elements to skip at the beginning of the array
- * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array
- * @param {Function} fn Function to call for each vector in the array
- * @param {Object} [arg] additional argument to pass to fn
- * @returns {Array} a
- * @function
- */
-
- var forEach$1 = function () {
- var vec = create$5();
- return function (a, stride, offset, count, fn, arg) {
- var i, l;
-
- if (!stride) {
- stride = 4;
- }
-
- if (!offset) {
- offset = 0;
- }
-
- if (count) {
- l = Math.min(count * stride + offset, a.length);
- } else {
- l = a.length;
- }
-
- for (i = offset; i < l; i += stride) {
- vec[0] = a[i];
- vec[1] = a[i + 1];
- vec[2] = a[i + 2];
- vec[3] = a[i + 3];
- fn(vec, vec, arg);
- a[i] = vec[0];
- a[i + 1] = vec[1];
- a[i + 2] = vec[2];
- a[i + 3] = vec[3];
- }
-
- return a;
- };
- }();
-
- var vec4 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- create: create$5,
- clone: clone$5,
- fromValues: fromValues$5,
- copy: copy$5,
- set: set$5,
- add: add$5,
- subtract: subtract$5,
- multiply: multiply$5,
- divide: divide$1,
- ceil: ceil$1,
- floor: floor$1,
- min: min$1,
- max: max$1,
- round: round$1,
- scale: scale$5,
- scaleAndAdd: scaleAndAdd$1,
- distance: distance$1,
- squaredDistance: squaredDistance$1,
- length: length$1,
- squaredLength: squaredLength$1,
- negate: negate$1,
- inverse: inverse$1,
- normalize: normalize$1,
- dot: dot$1,
- cross: cross$1,
- lerp: lerp$1,
- random: random$1,
- transformMat4: transformMat4$1,
- transformQuat: transformQuat$1,
- zero: zero$1,
- str: str$5,
- exactEquals: exactEquals$5,
- equals: equals$6,
- sub: sub$5,
- mul: mul$5,
- div: div$1,
- dist: dist$1,
- sqrDist: sqrDist$1,
- len: len$1,
- sqrLen: sqrLen$1,
- forEach: forEach$1
- });
-
- /**
- * Quaternion in the format XYZW
- * @module quat
- */
-
- /**
- * Creates a new identity quat
- *
- * @returns {quat} a new quaternion
- */
-
- function create$6() {
- var out = new ARRAY_TYPE(4);
-
- if (ARRAY_TYPE != Float32Array) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- }
-
- out[3] = 1;
- return out;
- }
- /**
- * Set a quat to the identity quaternion
- *
- * @param {quat} out the receiving quaternion
- * @returns {quat} out
- */
-
- function identity$4(out) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
- }
- /**
- * Sets a quat from the given angle and rotation axis,
- * then returns it.
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyVec3} axis the axis around which to rotate
- * @param {Number} rad the angle in radians
- * @returns {quat} out
- **/
-
- function setAxisAngle(out, axis, rad) {
- rad = rad * 0.5;
- var s = Math.sin(rad);
- out[0] = s * axis[0];
- out[1] = s * axis[1];
- out[2] = s * axis[2];
- out[3] = Math.cos(rad);
- return out;
- }
- /**
- * Gets the rotation axis and angle for a given
- * quaternion. If a quaternion is created with
- * setAxisAngle, this method will return the same
- * values as providied in the original parameter list
- * OR functionally equivalent values.
- * Example: The quaternion formed by axis [0, 0, 1] and
- * angle -90 is the same as the quaternion formed by
- * [0, 0, 1] and 270. This method favors the latter.
- * @param {vec3} out_axis Vector receiving the axis of rotation
- * @param {ReadonlyQuat} q Quaternion to be decomposed
- * @return {Number} Angle, in radians, of the rotation
- */
-
- function getAxisAngle(out_axis, q) {
- var rad = Math.acos(q[3]) * 2.0;
- var s = Math.sin(rad / 2.0);
-
- if (s > EPSILON) {
- out_axis[0] = q[0] / s;
- out_axis[1] = q[1] / s;
- out_axis[2] = q[2] / s;
- } else {
- // If s is zero, return any axis (no rotation - axis does not matter)
- out_axis[0] = 1;
- out_axis[1] = 0;
- out_axis[2] = 0;
- }
-
- return rad;
- }
- /**
- * Gets the angular distance between two unit quaternions
- *
- * @param {ReadonlyQuat} a Origin unit quaternion
- * @param {ReadonlyQuat} b Destination unit quaternion
- * @return {Number} Angle, in radians, between the two quaternions
- */
-
- function getAngle(a, b) {
- var dotproduct = dot$2(a, b);
- return Math.acos(2 * dotproduct * dotproduct - 1);
- }
- /**
- * Multiplies two quat's
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a the first operand
- * @param {ReadonlyQuat} b the second operand
- * @returns {quat} out
- */
-
- function multiply$6(out, a, b) {
- var ax = a[0],
- ay = a[1],
- az = a[2],
- aw = a[3];
- var bx = b[0],
- by = b[1],
- bz = b[2],
- bw = b[3];
- out[0] = ax * bw + aw * bx + ay * bz - az * by;
- out[1] = ay * bw + aw * by + az * bx - ax * bz;
- out[2] = az * bw + aw * bz + ax * by - ay * bx;
- out[3] = aw * bw - ax * bx - ay * by - az * bz;
- return out;
- }
- /**
- * Rotates a quaternion by the given angle about the X axis
- *
- * @param {quat} out quat receiving operation result
- * @param {ReadonlyQuat} a quat to rotate
- * @param {number} rad angle (in radians) to rotate
- * @returns {quat} out
- */
-
- function rotateX$2(out, a, rad) {
- rad *= 0.5;
- var ax = a[0],
- ay = a[1],
- az = a[2],
- aw = a[3];
- var bx = Math.sin(rad),
- bw = Math.cos(rad);
- out[0] = ax * bw + aw * bx;
- out[1] = ay * bw + az * bx;
- out[2] = az * bw - ay * bx;
- out[3] = aw * bw - ax * bx;
- return out;
- }
- /**
- * Rotates a quaternion by the given angle about the Y axis
- *
- * @param {quat} out quat receiving operation result
- * @param {ReadonlyQuat} a quat to rotate
- * @param {number} rad angle (in radians) to rotate
- * @returns {quat} out
- */
-
- function rotateY$2(out, a, rad) {
- rad *= 0.5;
- var ax = a[0],
- ay = a[1],
- az = a[2],
- aw = a[3];
- var by = Math.sin(rad),
- bw = Math.cos(rad);
- out[0] = ax * bw - az * by;
- out[1] = ay * bw + aw * by;
- out[2] = az * bw + ax * by;
- out[3] = aw * bw - ay * by;
- return out;
- }
- /**
- * Rotates a quaternion by the given angle about the Z axis
- *
- * @param {quat} out quat receiving operation result
- * @param {ReadonlyQuat} a quat to rotate
- * @param {number} rad angle (in radians) to rotate
- * @returns {quat} out
- */
-
- function rotateZ$2(out, a, rad) {
- rad *= 0.5;
- var ax = a[0],
- ay = a[1],
- az = a[2],
- aw = a[3];
- var bz = Math.sin(rad),
- bw = Math.cos(rad);
- out[0] = ax * bw + ay * bz;
- out[1] = ay * bw - ax * bz;
- out[2] = az * bw + aw * bz;
- out[3] = aw * bw - az * bz;
- return out;
- }
- /**
- * Calculates the W component of a quat from the X, Y, and Z components.
- * Assumes that quaternion is 1 unit in length.
- * Any existing W component will be ignored.
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a quat to calculate W component of
- * @returns {quat} out
- */
-
- function calculateW(out, a) {
- var x = a[0],
- y = a[1],
- z = a[2];
- out[0] = x;
- out[1] = y;
- out[2] = z;
- out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));
- return out;
- }
- /**
- * Calculate the exponential of a unit quaternion.
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a quat to calculate the exponential of
- * @returns {quat} out
- */
-
- function exp(out, a) {
- var x = a[0],
- y = a[1],
- z = a[2],
- w = a[3];
- var r = Math.sqrt(x * x + y * y + z * z);
- var et = Math.exp(w);
- var s = r > 0 ? et * Math.sin(r) / r : 0;
- out[0] = x * s;
- out[1] = y * s;
- out[2] = z * s;
- out[3] = et * Math.cos(r);
- return out;
- }
- /**
- * Calculate the natural logarithm of a unit quaternion.
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a quat to calculate the exponential of
- * @returns {quat} out
- */
-
- function ln(out, a) {
- var x = a[0],
- y = a[1],
- z = a[2],
- w = a[3];
- var r = Math.sqrt(x * x + y * y + z * z);
- var t = r > 0 ? Math.atan2(r, w) / r : 0;
- out[0] = x * t;
- out[1] = y * t;
- out[2] = z * t;
- out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);
- return out;
- }
- /**
- * Calculate the scalar power of a unit quaternion.
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a quat to calculate the exponential of
- * @param {Number} b amount to scale the quaternion by
- * @returns {quat} out
- */
-
- function pow(out, a, b) {
- ln(out, a);
- scale$6(out, out, b);
- exp(out, out);
- return out;
- }
- /**
- * Performs a spherical linear interpolation between two quat
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a the first operand
- * @param {ReadonlyQuat} b the second operand
- * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
- * @returns {quat} out
- */
-
- function slerp$1(out, a, b, t) {
- // benchmarks:
- // http://jsperf.com/quaternion-slerp-implementations
- var ax = a[0],
- ay = a[1],
- az = a[2],
- aw = a[3];
- var bx = b[0],
- by = b[1],
- bz = b[2],
- bw = b[3];
- var omega, cosom, sinom, scale0, scale1; // calc cosine
-
- cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary)
-
- if (cosom < 0.0) {
- cosom = -cosom;
- bx = -bx;
- by = -by;
- bz = -bz;
- bw = -bw;
- } // calculate coefficients
-
-
- if (1.0 - cosom > EPSILON) {
- // standard case (slerp)
- omega = Math.acos(cosom);
- sinom = Math.sin(omega);
- scale0 = Math.sin((1.0 - t) * omega) / sinom;
- scale1 = Math.sin(t * omega) / sinom;
- } else {
- // "from" and "to" quaternions are very close
- // ... so we can do a linear interpolation
- scale0 = 1.0 - t;
- scale1 = t;
- } // calculate final values
-
-
- out[0] = scale0 * ax + scale1 * bx;
- out[1] = scale0 * ay + scale1 * by;
- out[2] = scale0 * az + scale1 * bz;
- out[3] = scale0 * aw + scale1 * bw;
- return out;
- }
- /**
- * Generates a random unit quaternion
- *
- * @param {quat} out the receiving quaternion
- * @returns {quat} out
- */
-
- function random$2(out) {
- // Implementation of http://planning.cs.uiuc.edu/node198.html
- // TODO: Calling random 3 times is probably not the fastest solution
- var u1 = RANDOM();
- var u2 = RANDOM();
- var u3 = RANDOM();
- var sqrt1MinusU1 = Math.sqrt(1 - u1);
- var sqrtU1 = Math.sqrt(u1);
- out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);
- out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);
- out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);
- out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);
- return out;
- }
- /**
- * Calculates the inverse of a quat
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a quat to calculate inverse of
- * @returns {quat} out
- */
-
- function invert$4(out, a) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3];
- var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;
- var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0
-
- out[0] = -a0 * invDot;
- out[1] = -a1 * invDot;
- out[2] = -a2 * invDot;
- out[3] = a3 * invDot;
- return out;
- }
- /**
- * Calculates the conjugate of a quat
- * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a quat to calculate conjugate of
- * @returns {quat} out
- */
-
- function conjugate(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = a[3];
- return out;
- }
- /**
- * Creates a quaternion from the given 3x3 rotation matrix.
- *
- * NOTE: The resultant quaternion is not normalized, so you should be sure
- * to renormalize the quaternion yourself where necessary.
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyMat3} m rotation matrix
- * @returns {quat} out
- * @function
- */
-
- function fromMat3(out, m) {
- // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes
- // article "Quaternion Calculus and Fast Animation".
- var fTrace = m[0] + m[4] + m[8];
- var fRoot;
-
- if (fTrace > 0.0) {
- // |w| > 1/2, may as well choose w > 1/2
- fRoot = Math.sqrt(fTrace + 1.0); // 2w
-
- out[3] = 0.5 * fRoot;
- fRoot = 0.5 / fRoot; // 1/(4w)
-
- out[0] = (m[5] - m[7]) * fRoot;
- out[1] = (m[6] - m[2]) * fRoot;
- out[2] = (m[1] - m[3]) * fRoot;
- } else {
- // |w| <= 1/2
- var i = 0;
- if (m[4] > m[0]) i = 1;
- if (m[8] > m[i * 3 + i]) i = 2;
- var j = (i + 1) % 3;
- var k = (i + 2) % 3;
- fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);
- out[i] = 0.5 * fRoot;
- fRoot = 0.5 / fRoot;
- out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;
- out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;
- out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;
- }
-
- return out;
- }
- /**
- * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion.
- *
- * @param {quat} out the receiving quaternion
- * @param {x} Angle to rotate around X axis in degrees.
- * @param {y} Angle to rotate around Y axis in degrees.
- * @param {z} Angle to rotate around Z axis in degrees.
- * @param {order} Intrinsic order for conversion, default is ZYX.
- * @returns {quat} out
- * @function
- */
-
- function fromEuler(out, x, y, z) {
- var order = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'zyx';
- var halfToRad = 0.5 * Math.PI / 180.0;
- x *= halfToRad;
- z *= halfToRad;
- y *= halfToRad;
- var sx = Math.sin(x);
- var cx = Math.cos(x);
- var sy = Math.sin(y);
- var cy = Math.cos(y);
- var sz = Math.sin(z);
- var cz = Math.cos(z);
-
- if (typeof order != 'string') {
- order = 'zyx';
- }
-
- switch (order.toLowerCase()) {
- case 'xyz':
- out[0] = sx * cy * cz + cx * sy * sz;
- out[1] = cx * sy * cz - sx * cy * sz;
- out[2] = cx * cy * sz + sx * sy * cz;
- out[3] = cx * cy * cz - sx * sy * sz;
- break;
-
- case 'xzy':
- out[0] = sx * cy * cz - cx * sy * sz;
- out[1] = cx * sy * cz - sx * cy * sz;
- out[2] = cx * cy * sz + sx * sy * cz;
- out[3] = cx * cy * cz + sx * sy * sz;
- break;
-
- case 'yxz':
- out[0] = sx * cy * cz + cx * sy * sz;
- out[1] = cx * sy * cz - sx * cy * sz;
- out[2] = cx * cy * sz - sx * sy * cz;
- out[3] = cx * cy * cz + sx * sy * sz;
- break;
-
- case 'yzx':
- out[0] = sx * cy * cz + cx * sy * sz;
- out[1] = cx * sy * cz + sx * cy * sz;
- out[2] = cx * cy * sz - sx * sy * cz;
- out[3] = cx * cy * cz - sx * sy * sz;
- break;
-
- case 'zxy':
- out[0] = sx * cy * cz - cx * sy * sz;
- out[1] = cx * sy * cz + sx * cy * sz;
- out[2] = cx * cy * sz + sx * sy * cz;
- out[3] = cx * cy * cz - sx * sy * sz;
- break;
-
- case 'zyx':
- default:
- out[0] = sx * cy * cz - cx * sy * sz;
- out[1] = cx * sy * cz + sx * cy * sz;
- out[2] = cx * cy * sz - sx * sy * cz;
- out[3] = cx * cy * cz + sx * sy * sz;
- }
-
- return out;
- }
- /**
- * Returns a string representation of a quatenion
- *
- * @param {ReadonlyQuat} a vector to represent as a string
- * @returns {String} string representation of the vector
- */
-
- function str$6(a) {
- return "quat(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ")";
- }
- /**
- * Creates a new quat initialized with values from an existing quaternion
- *
- * @param {ReadonlyQuat} a quaternion to clone
- * @returns {quat} a new quaternion
- * @function
- */
-
- var clone$6 = clone$5;
- /**
- * Creates a new quat initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {quat} a new quaternion
- * @function
- */
-
- var fromValues$6 = fromValues$5;
- /**
- * Copy the values from one quat to another
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a the source quaternion
- * @returns {quat} out
- * @function
- */
-
- var copy$6 = copy$5;
- /**
- * Set the components of a quat to the given values
- *
- * @param {quat} out the receiving quaternion
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {quat} out
- * @function
- */
-
- var set$6 = set$5;
- /**
- * Adds two quat's
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a the first operand
- * @param {ReadonlyQuat} b the second operand
- * @returns {quat} out
- * @function
- */
-
- var add$6 = add$5;
- /**
- * Alias for {@link quat.multiply}
- * @function
- */
-
- var mul$6 = multiply$6;
- /**
- * Scales a quat by a scalar number
- *
- * @param {quat} out the receiving vector
- * @param {ReadonlyQuat} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {quat} out
- * @function
- */
-
- var scale$6 = scale$5;
- /**
- * Calculates the dot product of two quat's
- *
- * @param {ReadonlyQuat} a the first operand
- * @param {ReadonlyQuat} b the second operand
- * @returns {Number} dot product of a and b
- * @function
- */
-
- var dot$2 = dot$1;
- /**
- * Performs a linear interpolation between two quat's
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a the first operand
- * @param {ReadonlyQuat} b the second operand
- * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
- * @returns {quat} out
- * @function
- */
-
- var lerp$2 = lerp$1;
- /**
- * Calculates the length of a quat
- *
- * @param {ReadonlyQuat} a vector to calculate length of
- * @returns {Number} length of a
- */
-
- var length$2 = length$1;
- /**
- * Alias for {@link quat.length}
- * @function
- */
-
- var len$2 = length$2;
- /**
- * Calculates the squared length of a quat
- *
- * @param {ReadonlyQuat} a vector to calculate squared length of
- * @returns {Number} squared length of a
- * @function
- */
-
- var squaredLength$2 = squaredLength$1;
- /**
- * Alias for {@link quat.squaredLength}
- * @function
- */
-
- var sqrLen$2 = squaredLength$2;
- /**
- * Normalize a quat
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a quaternion to normalize
- * @returns {quat} out
- * @function
- */
-
- var normalize$2 = normalize$1;
- /**
- * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)
- *
- * @param {ReadonlyQuat} a The first quaternion.
- * @param {ReadonlyQuat} b The second quaternion.
- * @returns {Boolean} True if the vectors are equal, false otherwise.
- */
-
- var exactEquals$6 = exactEquals$5;
- /**
- * Returns whether or not the quaternions have approximately the same elements in the same position.
- *
- * @param {ReadonlyQuat} a The first vector.
- * @param {ReadonlyQuat} b The second vector.
- * @returns {Boolean} True if the vectors are equal, false otherwise.
- */
-
- var equals$7 = equals$6;
- /**
- * Sets a quaternion to represent the shortest rotation from one
- * vector to another.
- *
- * Both vectors are assumed to be unit length.
- *
- * @param {quat} out the receiving quaternion.
- * @param {ReadonlyVec3} a the initial vector
- * @param {ReadonlyVec3} b the destination vector
- * @returns {quat} out
- */
-
- var rotationTo = function () {
- var tmpvec3 = create$4();
- var xUnitVec3 = fromValues$4(1, 0, 0);
- var yUnitVec3 = fromValues$4(0, 1, 0);
- return function (out, a, b) {
- var dot$1 = dot(a, b);
-
- if (dot$1 < -0.999999) {
- cross(tmpvec3, xUnitVec3, a);
- if (len(tmpvec3) < 0.000001) cross(tmpvec3, yUnitVec3, a);
- normalize(tmpvec3, tmpvec3);
- setAxisAngle(out, tmpvec3, Math.PI);
- return out;
- } else if (dot$1 > 0.999999) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
- } else {
- cross(tmpvec3, a, b);
- out[0] = tmpvec3[0];
- out[1] = tmpvec3[1];
- out[2] = tmpvec3[2];
- out[3] = 1 + dot$1;
- return normalize$2(out, out);
- }
- };
- }();
- /**
- * Performs a spherical linear interpolation with two control points
- *
- * @param {quat} out the receiving quaternion
- * @param {ReadonlyQuat} a the first operand
- * @param {ReadonlyQuat} b the second operand
- * @param {ReadonlyQuat} c the third operand
- * @param {ReadonlyQuat} d the fourth operand
- * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
- * @returns {quat} out
- */
-
- var sqlerp = function () {
- var temp1 = create$6();
- var temp2 = create$6();
- return function (out, a, b, c, d, t) {
- slerp$1(temp1, a, d, t);
- slerp$1(temp2, b, c, t);
- slerp$1(out, temp1, temp2, 2 * t * (1 - t));
- return out;
- };
- }();
- /**
- * Sets the specified quaternion with values corresponding to the given
- * axes. Each axis is a vec3 and is expected to be unit length and
- * perpendicular to all other specified axes.
- *
- * @param {ReadonlyVec3} view the vector representing the viewing direction
- * @param {ReadonlyVec3} right the vector representing the local "right" direction
- * @param {ReadonlyVec3} up the vector representing the local "up" direction
- * @returns {quat} out
- */
-
- var setAxes = function () {
- var matr = create$2();
- return function (out, view, right, up) {
- matr[0] = right[0];
- matr[3] = right[1];
- matr[6] = right[2];
- matr[1] = up[0];
- matr[4] = up[1];
- matr[7] = up[2];
- matr[2] = -view[0];
- matr[5] = -view[1];
- matr[8] = -view[2];
- return normalize$2(out, fromMat3(out, matr));
- };
- }();
-
- var quat = /*#__PURE__*/Object.freeze({
- __proto__: null,
- create: create$6,
- identity: identity$4,
- setAxisAngle: setAxisAngle,
- getAxisAngle: getAxisAngle,
- getAngle: getAngle,
- multiply: multiply$6,
- rotateX: rotateX$2,
- rotateY: rotateY$2,
- rotateZ: rotateZ$2,
- calculateW: calculateW,
- exp: exp,
- ln: ln,
- pow: pow,
- slerp: slerp$1,
- random: random$2,
- invert: invert$4,
- conjugate: conjugate,
- fromMat3: fromMat3,
- fromEuler: fromEuler,
- str: str$6,
- clone: clone$6,
- fromValues: fromValues$6,
- copy: copy$6,
- set: set$6,
- add: add$6,
- mul: mul$6,
- scale: scale$6,
- dot: dot$2,
- lerp: lerp$2,
- length: length$2,
- len: len$2,
- squaredLength: squaredLength$2,
- sqrLen: sqrLen$2,
- normalize: normalize$2,
- exactEquals: exactEquals$6,
- equals: equals$7,
- rotationTo: rotationTo,
- sqlerp: sqlerp,
- setAxes: setAxes
- });
-
- /**
- * Dual Quaternion
- * Format: [real, dual]
- * Quaternion format: XYZW
- * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.
- * @module quat2
- */
-
- /**
- * Creates a new identity dual quat
- *
- * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation]
- */
-
- function create$7() {
- var dq = new ARRAY_TYPE(8);
-
- if (ARRAY_TYPE != Float32Array) {
- dq[0] = 0;
- dq[1] = 0;
- dq[2] = 0;
- dq[4] = 0;
- dq[5] = 0;
- dq[6] = 0;
- dq[7] = 0;
- }
-
- dq[3] = 1;
- return dq;
- }
- /**
- * Creates a new quat initialized with values from an existing quaternion
- *
- * @param {ReadonlyQuat2} a dual quaternion to clone
- * @returns {quat2} new dual quaternion
- * @function
- */
-
- function clone$7(a) {
- var dq = new ARRAY_TYPE(8);
- dq[0] = a[0];
- dq[1] = a[1];
- dq[2] = a[2];
- dq[3] = a[3];
- dq[4] = a[4];
- dq[5] = a[5];
- dq[6] = a[6];
- dq[7] = a[7];
- return dq;
- }
- /**
- * Creates a new dual quat initialized with the given values
- *
- * @param {Number} x1 X component
- * @param {Number} y1 Y component
- * @param {Number} z1 Z component
- * @param {Number} w1 W component
- * @param {Number} x2 X component
- * @param {Number} y2 Y component
- * @param {Number} z2 Z component
- * @param {Number} w2 W component
- * @returns {quat2} new dual quaternion
- * @function
- */
-
- function fromValues$7(x1, y1, z1, w1, x2, y2, z2, w2) {
- var dq = new ARRAY_TYPE(8);
- dq[0] = x1;
- dq[1] = y1;
- dq[2] = z1;
- dq[3] = w1;
- dq[4] = x2;
- dq[5] = y2;
- dq[6] = z2;
- dq[7] = w2;
- return dq;
- }
- /**
- * Creates a new dual quat from the given values (quat and translation)
- *
- * @param {Number} x1 X component
- * @param {Number} y1 Y component
- * @param {Number} z1 Z component
- * @param {Number} w1 W component
- * @param {Number} x2 X component (translation)
- * @param {Number} y2 Y component (translation)
- * @param {Number} z2 Z component (translation)
- * @returns {quat2} new dual quaternion
- * @function
- */
-
- function fromRotationTranslationValues(x1, y1, z1, w1, x2, y2, z2) {
- var dq = new ARRAY_TYPE(8);
- dq[0] = x1;
- dq[1] = y1;
- dq[2] = z1;
- dq[3] = w1;
- var ax = x2 * 0.5,
- ay = y2 * 0.5,
- az = z2 * 0.5;
- dq[4] = ax * w1 + ay * z1 - az * y1;
- dq[5] = ay * w1 + az * x1 - ax * z1;
- dq[6] = az * w1 + ax * y1 - ay * x1;
- dq[7] = -ax * x1 - ay * y1 - az * z1;
- return dq;
- }
- /**
- * Creates a dual quat from a quaternion and a translation
- *
- * @param {ReadonlyQuat2} dual quaternion receiving operation result
- * @param {ReadonlyQuat} q a normalized quaternion
- * @param {ReadonlyVec3} t tranlation vector
- * @returns {quat2} dual quaternion receiving operation result
- * @function
- */
-
- function fromRotationTranslation$1(out, q, t) {
- var ax = t[0] * 0.5,
- ay = t[1] * 0.5,
- az = t[2] * 0.5,
- bx = q[0],
- by = q[1],
- bz = q[2],
- bw = q[3];
- out[0] = bx;
- out[1] = by;
- out[2] = bz;
- out[3] = bw;
- out[4] = ax * bw + ay * bz - az * by;
- out[5] = ay * bw + az * bx - ax * bz;
- out[6] = az * bw + ax * by - ay * bx;
- out[7] = -ax * bx - ay * by - az * bz;
- return out;
- }
- /**
- * Creates a dual quat from a translation
- *
- * @param {ReadonlyQuat2} dual quaternion receiving operation result
- * @param {ReadonlyVec3} t translation vector
- * @returns {quat2} dual quaternion receiving operation result
- * @function
- */
-
- function fromTranslation$3(out, t) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = t[0] * 0.5;
- out[5] = t[1] * 0.5;
- out[6] = t[2] * 0.5;
- out[7] = 0;
- return out;
- }
- /**
- * Creates a dual quat from a quaternion
- *
- * @param {ReadonlyQuat2} dual quaternion receiving operation result
- * @param {ReadonlyQuat} q the quaternion
- * @returns {quat2} dual quaternion receiving operation result
- * @function
- */
-
- function fromRotation$4(out, q) {
- out[0] = q[0];
- out[1] = q[1];
- out[2] = q[2];
- out[3] = q[3];
- out[4] = 0;
- out[5] = 0;
- out[6] = 0;
- out[7] = 0;
- return out;
- }
- /**
- * Creates a new dual quat from a matrix (4x4)
- *
- * @param {quat2} out the dual quaternion
- * @param {ReadonlyMat4} a the matrix
- * @returns {quat2} dual quat receiving operation result
- * @function
- */
-
- function fromMat4$1(out, a) {
- //TODO Optimize this
- var outer = create$6();
- getRotation(outer, a);
- var t = new ARRAY_TYPE(3);
- getTranslation(t, a);
- fromRotationTranslation$1(out, outer, t);
- return out;
- }
- /**
- * Copy the values from one dual quat to another
- *
- * @param {quat2} out the receiving dual quaternion
- * @param {ReadonlyQuat2} a the source dual quaternion
- * @returns {quat2} out
- * @function
- */
-
- function copy$7(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- return out;
- }
- /**
- * Set a dual quat to the identity dual quaternion
- *
- * @param {quat2} out the receiving quaternion
- * @returns {quat2} out
- */
-
- function identity$5(out) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = 0;
- out[5] = 0;
- out[6] = 0;
- out[7] = 0;
- return out;
- }
- /**
- * Set the components of a dual quat to the given values
- *
- * @param {quat2} out the receiving quaternion
- * @param {Number} x1 X component
- * @param {Number} y1 Y component
- * @param {Number} z1 Z component
- * @param {Number} w1 W component
- * @param {Number} x2 X component
- * @param {Number} y2 Y component
- * @param {Number} z2 Z component
- * @param {Number} w2 W component
- * @returns {quat2} out
- * @function
- */
-
- function set$7(out, x1, y1, z1, w1, x2, y2, z2, w2) {
- out[0] = x1;
- out[1] = y1;
- out[2] = z1;
- out[3] = w1;
- out[4] = x2;
- out[5] = y2;
- out[6] = z2;
- out[7] = w2;
- return out;
- }
- /**
- * Gets the real part of a dual quat
- * @param {quat} out real part
- * @param {ReadonlyQuat2} a Dual Quaternion
- * @return {quat} real part
- */
-
- var getReal = copy$6;
- /**
- * Gets the dual part of a dual quat
- * @param {quat} out dual part
- * @param {ReadonlyQuat2} a Dual Quaternion
- * @return {quat} dual part
- */
-
- function getDual(out, a) {
- out[0] = a[4];
- out[1] = a[5];
- out[2] = a[6];
- out[3] = a[7];
- return out;
- }
- /**
- * Set the real component of a dual quat to the given quaternion
- *
- * @param {quat2} out the receiving quaternion
- * @param {ReadonlyQuat} q a quaternion representing the real part
- * @returns {quat2} out
- * @function
- */
-
- var setReal = copy$6;
- /**
- * Set the dual component of a dual quat to the given quaternion
- *
- * @param {quat2} out the receiving quaternion
- * @param {ReadonlyQuat} q a quaternion representing the dual part
- * @returns {quat2} out
- * @function
- */
-
- function setDual(out, q) {
- out[4] = q[0];
- out[5] = q[1];
- out[6] = q[2];
- out[7] = q[3];
- return out;
- }
- /**
- * Gets the translation of a normalized dual quat
- * @param {vec3} out translation
- * @param {ReadonlyQuat2} a Dual Quaternion to be decomposed
- * @return {vec3} translation
- */
-
- function getTranslation$1(out, a) {
- var ax = a[4],
- ay = a[5],
- az = a[6],
- aw = a[7],
- bx = -a[0],
- by = -a[1],
- bz = -a[2],
- bw = a[3];
- out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;
- out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;
- out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;
- return out;
- }
- /**
- * Translates a dual quat by the given vector
- *
- * @param {quat2} out the receiving dual quaternion
- * @param {ReadonlyQuat2} a the dual quaternion to translate
- * @param {ReadonlyVec3} v vector to translate by
- * @returns {quat2} out
- */
-
- function translate$3(out, a, v) {
- var ax1 = a[0],
- ay1 = a[1],
- az1 = a[2],
- aw1 = a[3],
- bx1 = v[0] * 0.5,
- by1 = v[1] * 0.5,
- bz1 = v[2] * 0.5,
- ax2 = a[4],
- ay2 = a[5],
- az2 = a[6],
- aw2 = a[7];
- out[0] = ax1;
- out[1] = ay1;
- out[2] = az1;
- out[3] = aw1;
- out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2;
- out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2;
- out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2;
- out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2;
- return out;
- }
- /**
- * Rotates a dual quat around the X axis
- *
- * @param {quat2} out the receiving dual quaternion
- * @param {ReadonlyQuat2} a the dual quaternion to rotate
- * @param {number} rad how far should the rotation be
- * @returns {quat2} out
- */
-
- function rotateX$3(out, a, rad) {
- var bx = -a[0],
- by = -a[1],
- bz = -a[2],
- bw = a[3],
- ax = a[4],
- ay = a[5],
- az = a[6],
- aw = a[7],
- ax1 = ax * bw + aw * bx + ay * bz - az * by,
- ay1 = ay * bw + aw * by + az * bx - ax * bz,
- az1 = az * bw + aw * bz + ax * by - ay * bx,
- aw1 = aw * bw - ax * bx - ay * by - az * bz;
- rotateX$2(out, a, rad);
- bx = out[0];
- by = out[1];
- bz = out[2];
- bw = out[3];
- out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;
- out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;
- out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;
- out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;
- return out;
- }
- /**
- * Rotates a dual quat around the Y axis
- *
- * @param {quat2} out the receiving dual quaternion
- * @param {ReadonlyQuat2} a the dual quaternion to rotate
- * @param {number} rad how far should the rotation be
- * @returns {quat2} out
- */
-
- function rotateY$3(out, a, rad) {
- var bx = -a[0],
- by = -a[1],
- bz = -a[2],
- bw = a[3],
- ax = a[4],
- ay = a[5],
- az = a[6],
- aw = a[7],
- ax1 = ax * bw + aw * bx + ay * bz - az * by,
- ay1 = ay * bw + aw * by + az * bx - ax * bz,
- az1 = az * bw + aw * bz + ax * by - ay * bx,
- aw1 = aw * bw - ax * bx - ay * by - az * bz;
- rotateY$2(out, a, rad);
- bx = out[0];
- by = out[1];
- bz = out[2];
- bw = out[3];
- out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;
- out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;
- out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;
- out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;
- return out;
- }
- /**
- * Rotates a dual quat around the Z axis
- *
- * @param {quat2} out the receiving dual quaternion
- * @param {ReadonlyQuat2} a the dual quaternion to rotate
- * @param {number} rad how far should the rotation be
- * @returns {quat2} out
- */
-
- function rotateZ$3(out, a, rad) {
- var bx = -a[0],
- by = -a[1],
- bz = -a[2],
- bw = a[3],
- ax = a[4],
- ay = a[5],
- az = a[6],
- aw = a[7],
- ax1 = ax * bw + aw * bx + ay * bz - az * by,
- ay1 = ay * bw + aw * by + az * bx - ax * bz,
- az1 = az * bw + aw * bz + ax * by - ay * bx,
- aw1 = aw * bw - ax * bx - ay * by - az * bz;
- rotateZ$2(out, a, rad);
- bx = out[0];
- by = out[1];
- bz = out[2];
- bw = out[3];
- out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;
- out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;
- out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;
- out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;
- return out;
- }
- /**
- * Rotates a dual quat by a given quaternion (a * q)
- *
- * @param {quat2} out the receiving dual quaternion
- * @param {ReadonlyQuat2} a the dual quaternion to rotate
- * @param {ReadonlyQuat} q quaternion to rotate by
- * @returns {quat2} out
- */
-
- function rotateByQuatAppend(out, a, q) {
- var qx = q[0],
- qy = q[1],
- qz = q[2],
- qw = q[3],
- ax = a[0],
- ay = a[1],
- az = a[2],
- aw = a[3];
- out[0] = ax * qw + aw * qx + ay * qz - az * qy;
- out[1] = ay * qw + aw * qy + az * qx - ax * qz;
- out[2] = az * qw + aw * qz + ax * qy - ay * qx;
- out[3] = aw * qw - ax * qx - ay * qy - az * qz;
- ax = a[4];
- ay = a[5];
- az = a[6];
- aw = a[7];
- out[4] = ax * qw + aw * qx + ay * qz - az * qy;
- out[5] = ay * qw + aw * qy + az * qx - ax * qz;
- out[6] = az * qw + aw * qz + ax * qy - ay * qx;
- out[7] = aw * qw - ax * qx - ay * qy - az * qz;
- return out;
- }
- /**
- * Rotates a dual quat by a given quaternion (q * a)
- *
- * @param {quat2} out the receiving dual quaternion
- * @param {ReadonlyQuat} q quaternion to rotate by
- * @param {ReadonlyQuat2} a the dual quaternion to rotate
- * @returns {quat2} out
- */
-
- function rotateByQuatPrepend(out, q, a) {
- var qx = q[0],
- qy = q[1],
- qz = q[2],
- qw = q[3],
- bx = a[0],
- by = a[1],
- bz = a[2],
- bw = a[3];
- out[0] = qx * bw + qw * bx + qy * bz - qz * by;
- out[1] = qy * bw + qw * by + qz * bx - qx * bz;
- out[2] = qz * bw + qw * bz + qx * by - qy * bx;
- out[3] = qw * bw - qx * bx - qy * by - qz * bz;
- bx = a[4];
- by = a[5];
- bz = a[6];
- bw = a[7];
- out[4] = qx * bw + qw * bx + qy * bz - qz * by;
- out[5] = qy * bw + qw * by + qz * bx - qx * bz;
- out[6] = qz * bw + qw * bz + qx * by - qy * bx;
- out[7] = qw * bw - qx * bx - qy * by - qz * bz;
- return out;
- }
- /**
- * Rotates a dual quat around a given axis. Does the normalisation automatically
- *
- * @param {quat2} out the receiving dual quaternion
- * @param {ReadonlyQuat2} a the dual quaternion to rotate
- * @param {ReadonlyVec3} axis the axis to rotate around
- * @param {Number} rad how far the rotation should be
- * @returns {quat2} out
- */
-
- function rotateAroundAxis(out, a, axis, rad) {
- //Special case for rad = 0
- if (Math.abs(rad) < EPSILON) {
- return copy$7(out, a);
- }
-
- var axisLength = Math.hypot(axis[0], axis[1], axis[2]);
- rad = rad * 0.5;
- var s = Math.sin(rad);
- var bx = s * axis[0] / axisLength;
- var by = s * axis[1] / axisLength;
- var bz = s * axis[2] / axisLength;
- var bw = Math.cos(rad);
- var ax1 = a[0],
- ay1 = a[1],
- az1 = a[2],
- aw1 = a[3];
- out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;
- out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;
- out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;
- out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;
- var ax = a[4],
- ay = a[5],
- az = a[6],
- aw = a[7];
- out[4] = ax * bw + aw * bx + ay * bz - az * by;
- out[5] = ay * bw + aw * by + az * bx - ax * bz;
- out[6] = az * bw + aw * bz + ax * by - ay * bx;
- out[7] = aw * bw - ax * bx - ay * by - az * bz;
- return out;
- }
- /**
- * Adds two dual quat's
- *
- * @param {quat2} out the receiving dual quaternion
- * @param {ReadonlyQuat2} a the first operand
- * @param {ReadonlyQuat2} b the second operand
- * @returns {quat2} out
- * @function
- */
-
- function add$7(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- out[3] = a[3] + b[3];
- out[4] = a[4] + b[4];
- out[5] = a[5] + b[5];
- out[6] = a[6] + b[6];
- out[7] = a[7] + b[7];
- return out;
- }
- /**
- * Multiplies two dual quat's
- *
- * @param {quat2} out the receiving dual quaternion
- * @param {ReadonlyQuat2} a the first operand
- * @param {ReadonlyQuat2} b the second operand
- * @returns {quat2} out
- */
-
- function multiply$7(out, a, b) {
- var ax0 = a[0],
- ay0 = a[1],
- az0 = a[2],
- aw0 = a[3],
- bx1 = b[4],
- by1 = b[5],
- bz1 = b[6],
- bw1 = b[7],
- ax1 = a[4],
- ay1 = a[5],
- az1 = a[6],
- aw1 = a[7],
- bx0 = b[0],
- by0 = b[1],
- bz0 = b[2],
- bw0 = b[3];
- out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0;
- out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0;
- out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0;
- out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0;
- out[4] = ax0 * bw1 + aw0 * bx1 + ay0 * bz1 - az0 * by1 + ax1 * bw0 + aw1 * bx0 + ay1 * bz0 - az1 * by0;
- out[5] = ay0 * bw1 + aw0 * by1 + az0 * bx1 - ax0 * bz1 + ay1 * bw0 + aw1 * by0 + az1 * bx0 - ax1 * bz0;
- out[6] = az0 * bw1 + aw0 * bz1 + ax0 * by1 - ay0 * bx1 + az1 * bw0 + aw1 * bz0 + ax1 * by0 - ay1 * bx0;
- out[7] = aw0 * bw1 - ax0 * bx1 - ay0 * by1 - az0 * bz1 + aw1 * bw0 - ax1 * bx0 - ay1 * by0 - az1 * bz0;
- return out;
- }
- /**
- * Alias for {@link quat2.multiply}
- * @function
- */
-
- var mul$7 = multiply$7;
- /**
- * Scales a dual quat by a scalar number
- *
- * @param {quat2} out the receiving dual quat
- * @param {ReadonlyQuat2} a the dual quat to scale
- * @param {Number} b amount to scale the dual quat by
- * @returns {quat2} out
- * @function
- */
-
- function scale$7(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- out[3] = a[3] * b;
- out[4] = a[4] * b;
- out[5] = a[5] * b;
- out[6] = a[6] * b;
- out[7] = a[7] * b;
- return out;
- }
- /**
- * Calculates the dot product of two dual quat's (The dot product of the real parts)
- *
- * @param {ReadonlyQuat2} a the first operand
- * @param {ReadonlyQuat2} b the second operand
- * @returns {Number} dot product of a and b
- * @function
- */
-
- var dot$3 = dot$2;
- /**
- * Performs a linear interpolation between two dual quats's
- * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5)
- *
- * @param {quat2} out the receiving dual quat
- * @param {ReadonlyQuat2} a the first operand
- * @param {ReadonlyQuat2} b the second operand
- * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
- * @returns {quat2} out
- */
-
- function lerp$3(out, a, b, t) {
- var mt = 1 - t;
- if (dot$3(a, b) < 0) t = -t;
- out[0] = a[0] * mt + b[0] * t;
- out[1] = a[1] * mt + b[1] * t;
- out[2] = a[2] * mt + b[2] * t;
- out[3] = a[3] * mt + b[3] * t;
- out[4] = a[4] * mt + b[4] * t;
- out[5] = a[5] * mt + b[5] * t;
- out[6] = a[6] * mt + b[6] * t;
- out[7] = a[7] * mt + b[7] * t;
- return out;
- }
- /**
- * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper
- *
- * @param {quat2} out the receiving dual quaternion
- * @param {ReadonlyQuat2} a dual quat to calculate inverse of
- * @returns {quat2} out
- */
-
- function invert$5(out, a) {
- var sqlen = squaredLength$3(a);
- out[0] = -a[0] / sqlen;
- out[1] = -a[1] / sqlen;
- out[2] = -a[2] / sqlen;
- out[3] = a[3] / sqlen;
- out[4] = -a[4] / sqlen;
- out[5] = -a[5] / sqlen;
- out[6] = -a[6] / sqlen;
- out[7] = a[7] / sqlen;
- return out;
- }
- /**
- * Calculates the conjugate of a dual quat
- * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result.
- *
- * @param {quat2} out the receiving quaternion
- * @param {ReadonlyQuat2} a quat to calculate conjugate of
- * @returns {quat2} out
- */
-
- function conjugate$1(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = a[3];
- out[4] = -a[4];
- out[5] = -a[5];
- out[6] = -a[6];
- out[7] = a[7];
- return out;
- }
- /**
- * Calculates the length of a dual quat
- *
- * @param {ReadonlyQuat2} a dual quat to calculate length of
- * @returns {Number} length of a
- * @function
- */
-
- var length$3 = length$2;
- /**
- * Alias for {@link quat2.length}
- * @function
- */
-
- var len$3 = length$3;
- /**
- * Calculates the squared length of a dual quat
- *
- * @param {ReadonlyQuat2} a dual quat to calculate squared length of
- * @returns {Number} squared length of a
- * @function
- */
-
- var squaredLength$3 = squaredLength$2;
- /**
- * Alias for {@link quat2.squaredLength}
- * @function
- */
-
- var sqrLen$3 = squaredLength$3;
- /**
- * Normalize a dual quat
- *
- * @param {quat2} out the receiving dual quaternion
- * @param {ReadonlyQuat2} a dual quaternion to normalize
- * @returns {quat2} out
- * @function
- */
-
- function normalize$3(out, a) {
- var magnitude = squaredLength$3(a);
-
- if (magnitude > 0) {
- magnitude = Math.sqrt(magnitude);
- var a0 = a[0] / magnitude;
- var a1 = a[1] / magnitude;
- var a2 = a[2] / magnitude;
- var a3 = a[3] / magnitude;
- var b0 = a[4];
- var b1 = a[5];
- var b2 = a[6];
- var b3 = a[7];
- var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3;
- out[0] = a0;
- out[1] = a1;
- out[2] = a2;
- out[3] = a3;
- out[4] = (b0 - a0 * a_dot_b) / magnitude;
- out[5] = (b1 - a1 * a_dot_b) / magnitude;
- out[6] = (b2 - a2 * a_dot_b) / magnitude;
- out[7] = (b3 - a3 * a_dot_b) / magnitude;
- }
-
- return out;
- }
- /**
- * Returns a string representation of a dual quatenion
- *
- * @param {ReadonlyQuat2} a dual quaternion to represent as a string
- * @returns {String} string representation of the dual quat
- */
-
- function str$7(a) {
- return "quat2(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ")";
- }
- /**
- * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===)
- *
- * @param {ReadonlyQuat2} a the first dual quaternion.
- * @param {ReadonlyQuat2} b the second dual quaternion.
- * @returns {Boolean} true if the dual quaternions are equal, false otherwise.
- */
-
- function exactEquals$7(a, b) {
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7];
- }
- /**
- * Returns whether or not the dual quaternions have approximately the same elements in the same position.
- *
- * @param {ReadonlyQuat2} a the first dual quat.
- * @param {ReadonlyQuat2} b the second dual quat.
- * @returns {Boolean} true if the dual quats are equal, false otherwise.
- */
-
- function equals$8(a, b) {
- var a0 = a[0],
- a1 = a[1],
- a2 = a[2],
- a3 = a[3],
- a4 = a[4],
- a5 = a[5],
- a6 = a[6],
- a7 = a[7];
- var b0 = b[0],
- b1 = b[1],
- b2 = b[2],
- b3 = b[3],
- b4 = b[4],
- b5 = b[5],
- b6 = b[6],
- b7 = b[7];
- return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7));
- }
-
- var quat2 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- create: create$7,
- clone: clone$7,
- fromValues: fromValues$7,
- fromRotationTranslationValues: fromRotationTranslationValues,
- fromRotationTranslation: fromRotationTranslation$1,
- fromTranslation: fromTranslation$3,
- fromRotation: fromRotation$4,
- fromMat4: fromMat4$1,
- copy: copy$7,
- identity: identity$5,
- set: set$7,
- getReal: getReal,
- getDual: getDual,
- setReal: setReal,
- setDual: setDual,
- getTranslation: getTranslation$1,
- translate: translate$3,
- rotateX: rotateX$3,
- rotateY: rotateY$3,
- rotateZ: rotateZ$3,
- rotateByQuatAppend: rotateByQuatAppend,
- rotateByQuatPrepend: rotateByQuatPrepend,
- rotateAroundAxis: rotateAroundAxis,
- add: add$7,
- multiply: multiply$7,
- mul: mul$7,
- scale: scale$7,
- dot: dot$3,
- lerp: lerp$3,
- invert: invert$5,
- conjugate: conjugate$1,
- length: length$3,
- len: len$3,
- squaredLength: squaredLength$3,
- sqrLen: sqrLen$3,
- normalize: normalize$3,
- str: str$7,
- exactEquals: exactEquals$7,
- equals: equals$8
- });
-
- /**
- * 2 Dimensional Vector
- * @module vec2
- */
-
- /**
- * Creates a new, empty vec2
- *
- * @returns {vec2} a new 2D vector
- */
-
- function create$8() {
- var out = new ARRAY_TYPE(2);
-
- if (ARRAY_TYPE != Float32Array) {
- out[0] = 0;
- out[1] = 0;
- }
-
- return out;
- }
- /**
- * Creates a new vec2 initialized with values from an existing vector
- *
- * @param {ReadonlyVec2} a vector to clone
- * @returns {vec2} a new 2D vector
- */
-
- function clone$8(a) {
- var out = new ARRAY_TYPE(2);
- out[0] = a[0];
- out[1] = a[1];
- return out;
- }
- /**
- * Creates a new vec2 initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @returns {vec2} a new 2D vector
- */
-
- function fromValues$8(x, y) {
- var out = new ARRAY_TYPE(2);
- out[0] = x;
- out[1] = y;
- return out;
- }
- /**
- * Copy the values from one vec2 to another
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the source vector
- * @returns {vec2} out
- */
-
- function copy$8(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- return out;
- }
- /**
- * Set the components of a vec2 to the given values
- *
- * @param {vec2} out the receiving vector
- * @param {Number} x X component
- * @param {Number} y Y component
- * @returns {vec2} out
- */
-
- function set$8(out, x, y) {
- out[0] = x;
- out[1] = y;
- return out;
- }
- /**
- * Adds two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the first operand
- * @param {ReadonlyVec2} b the second operand
- * @returns {vec2} out
- */
-
- function add$8(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- return out;
- }
- /**
- * Subtracts vector b from vector a
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the first operand
- * @param {ReadonlyVec2} b the second operand
- * @returns {vec2} out
- */
-
- function subtract$6(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- return out;
- }
- /**
- * Multiplies two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the first operand
- * @param {ReadonlyVec2} b the second operand
- * @returns {vec2} out
- */
-
- function multiply$8(out, a, b) {
- out[0] = a[0] * b[0];
- out[1] = a[1] * b[1];
- return out;
- }
- /**
- * Divides two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the first operand
- * @param {ReadonlyVec2} b the second operand
- * @returns {vec2} out
- */
-
- function divide$2(out, a, b) {
- out[0] = a[0] / b[0];
- out[1] = a[1] / b[1];
- return out;
- }
- /**
- * Math.ceil the components of a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a vector to ceil
- * @returns {vec2} out
- */
-
- function ceil$2(out, a) {
- out[0] = Math.ceil(a[0]);
- out[1] = Math.ceil(a[1]);
- return out;
- }
- /**
- * Math.floor the components of a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a vector to floor
- * @returns {vec2} out
- */
-
- function floor$2(out, a) {
- out[0] = Math.floor(a[0]);
- out[1] = Math.floor(a[1]);
- return out;
- }
- /**
- * Returns the minimum of two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the first operand
- * @param {ReadonlyVec2} b the second operand
- * @returns {vec2} out
- */
-
- function min$2(out, a, b) {
- out[0] = Math.min(a[0], b[0]);
- out[1] = Math.min(a[1], b[1]);
- return out;
- }
- /**
- * Returns the maximum of two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the first operand
- * @param {ReadonlyVec2} b the second operand
- * @returns {vec2} out
- */
-
- function max$2(out, a, b) {
- out[0] = Math.max(a[0], b[0]);
- out[1] = Math.max(a[1], b[1]);
- return out;
- }
- /**
- * Math.round the components of a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a vector to round
- * @returns {vec2} out
- */
-
- function round$2(out, a) {
- out[0] = Math.round(a[0]);
- out[1] = Math.round(a[1]);
- return out;
- }
- /**
- * Scales a vec2 by a scalar number
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {vec2} out
- */
-
- function scale$8(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- return out;
- }
- /**
- * Adds two vec2's after scaling the second operand by a scalar value
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the first operand
- * @param {ReadonlyVec2} b the second operand
- * @param {Number} scale the amount to scale b by before adding
- * @returns {vec2} out
- */
-
- function scaleAndAdd$2(out, a, b, scale) {
- out[0] = a[0] + b[0] * scale;
- out[1] = a[1] + b[1] * scale;
- return out;
- }
- /**
- * Calculates the euclidian distance between two vec2's
- *
- * @param {ReadonlyVec2} a the first operand
- * @param {ReadonlyVec2} b the second operand
- * @returns {Number} distance between a and b
- */
-
- function distance$2(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1];
- return Math.hypot(x, y);
- }
- /**
- * Calculates the squared euclidian distance between two vec2's
- *
- * @param {ReadonlyVec2} a the first operand
- * @param {ReadonlyVec2} b the second operand
- * @returns {Number} squared distance between a and b
- */
-
- function squaredDistance$2(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1];
- return x * x + y * y;
- }
- /**
- * Calculates the length of a vec2
- *
- * @param {ReadonlyVec2} a vector to calculate length of
- * @returns {Number} length of a
- */
-
- function length$4(a) {
- var x = a[0],
- y = a[1];
- return Math.hypot(x, y);
- }
- /**
- * Calculates the squared length of a vec2
- *
- * @param {ReadonlyVec2} a vector to calculate squared length of
- * @returns {Number} squared length of a
- */
-
- function squaredLength$4(a) {
- var x = a[0],
- y = a[1];
- return x * x + y * y;
- }
- /**
- * Negates the components of a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a vector to negate
- * @returns {vec2} out
- */
-
- function negate$2(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- return out;
- }
- /**
- * Returns the inverse of the components of a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a vector to invert
- * @returns {vec2} out
- */
-
- function inverse$2(out, a) {
- out[0] = 1.0 / a[0];
- out[1] = 1.0 / a[1];
- return out;
- }
- /**
- * Normalize a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a vector to normalize
- * @returns {vec2} out
- */
-
- function normalize$4(out, a) {
- var x = a[0],
- y = a[1];
- var len = x * x + y * y;
-
- if (len > 0) {
- //TODO: evaluate use of glm_invsqrt here?
- len = 1 / Math.sqrt(len);
- }
-
- out[0] = a[0] * len;
- out[1] = a[1] * len;
- return out;
- }
- /**
- * Calculates the dot product of two vec2's
- *
- * @param {ReadonlyVec2} a the first operand
- * @param {ReadonlyVec2} b the second operand
- * @returns {Number} dot product of a and b
- */
-
- function dot$4(a, b) {
- return a[0] * b[0] + a[1] * b[1];
- }
- /**
- * Computes the cross product of two vec2's
- * Note that the cross product must by definition produce a 3D vector
- *
- * @param {vec3} out the receiving vector
- * @param {ReadonlyVec2} a the first operand
- * @param {ReadonlyVec2} b the second operand
- * @returns {vec3} out
- */
-
- function cross$2(out, a, b) {
- var z = a[0] * b[1] - a[1] * b[0];
- out[0] = out[1] = 0;
- out[2] = z;
- return out;
- }
- /**
- * Performs a linear interpolation between two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the first operand
- * @param {ReadonlyVec2} b the second operand
- * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
- * @returns {vec2} out
- */
-
- function lerp$4(out, a, b, t) {
- var ax = a[0],
- ay = a[1];
- out[0] = ax + t * (b[0] - ax);
- out[1] = ay + t * (b[1] - ay);
- return out;
- }
- /**
- * Generates a random vector with the given scale
- *
- * @param {vec2} out the receiving vector
- * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
- * @returns {vec2} out
- */
-
- function random$3(out, scale) {
- scale = scale || 1.0;
- var r = RANDOM() * 2.0 * Math.PI;
- out[0] = Math.cos(r) * scale;
- out[1] = Math.sin(r) * scale;
- return out;
- }
- /**
- * Transforms the vec2 with a mat2
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the vector to transform
- * @param {ReadonlyMat2} m matrix to transform with
- * @returns {vec2} out
- */
-
- function transformMat2(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[2] * y;
- out[1] = m[1] * x + m[3] * y;
- return out;
- }
- /**
- * Transforms the vec2 with a mat2d
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the vector to transform
- * @param {ReadonlyMat2d} m matrix to transform with
- * @returns {vec2} out
- */
-
- function transformMat2d(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[2] * y + m[4];
- out[1] = m[1] * x + m[3] * y + m[5];
- return out;
- }
- /**
- * Transforms the vec2 with a mat3
- * 3rd vector component is implicitly '1'
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the vector to transform
- * @param {ReadonlyMat3} m matrix to transform with
- * @returns {vec2} out
- */
-
- function transformMat3$1(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[3] * y + m[6];
- out[1] = m[1] * x + m[4] * y + m[7];
- return out;
- }
- /**
- * Transforms the vec2 with a mat4
- * 3rd vector component is implicitly '0'
- * 4th vector component is implicitly '1'
- *
- * @param {vec2} out the receiving vector
- * @param {ReadonlyVec2} a the vector to transform
- * @param {ReadonlyMat4} m matrix to transform with
- * @returns {vec2} out
- */
-
- function transformMat4$2(out, a, m) {
- var x = a[0];
- var y = a[1];
- out[0] = m[0] * x + m[4] * y + m[12];
- out[1] = m[1] * x + m[5] * y + m[13];
- return out;
- }
- /**
- * Rotate a 2D vector
- * @param {vec2} out The receiving vec2
- * @param {ReadonlyVec2} a The vec2 point to rotate
- * @param {ReadonlyVec2} b The origin of the rotation
- * @param {Number} rad The angle of rotation in radians
- * @returns {vec2} out
- */
-
- function rotate$4(out, a, b, rad) {
- //Translate point to the origin
- var p0 = a[0] - b[0],
- p1 = a[1] - b[1],
- sinC = Math.sin(rad),
- cosC = Math.cos(rad); //perform rotation and translate to correct position
-
- out[0] = p0 * cosC - p1 * sinC + b[0];
- out[1] = p0 * sinC + p1 * cosC + b[1];
- return out;
- }
- /**
- * Get the angle between two 2D vectors
- * @param {ReadonlyVec2} a The first operand
- * @param {ReadonlyVec2} b The second operand
- * @returns {Number} The angle in radians
- */
-
- function angle$1(a, b) {
- var x1 = a[0],
- y1 = a[1],
- x2 = b[0],
- y2 = b[1],
- // mag is the product of the magnitudes of a and b
- mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2),
- // mag &&.. short circuits if mag == 0
- cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1
-
- return Math.acos(Math.min(Math.max(cosine, -1), 1));
- }
- /**
- * Set the components of a vec2 to zero
- *
- * @param {vec2} out the receiving vector
- * @returns {vec2} out
- */
-
- function zero$2(out) {
- out[0] = 0.0;
- out[1] = 0.0;
- return out;
- }
- /**
- * Returns a string representation of a vector
- *
- * @param {ReadonlyVec2} a vector to represent as a string
- * @returns {String} string representation of the vector
- */
-
- function str$8(a) {
- return "vec2(" + a[0] + ", " + a[1] + ")";
- }
- /**
- * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)
- *
- * @param {ReadonlyVec2} a The first vector.
- * @param {ReadonlyVec2} b The second vector.
- * @returns {Boolean} True if the vectors are equal, false otherwise.
- */
-
- function exactEquals$8(a, b) {
- return a[0] === b[0] && a[1] === b[1];
- }
- /**
- * Returns whether or not the vectors have approximately the same elements in the same position.
- *
- * @param {ReadonlyVec2} a The first vector.
- * @param {ReadonlyVec2} b The second vector.
- * @returns {Boolean} True if the vectors are equal, false otherwise.
- */
-
- function equals$9(a, b) {
- var a0 = a[0],
- a1 = a[1];
- var b0 = b[0],
- b1 = b[1];
- return Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));
- }
- /**
- * Alias for {@link vec2.length}
- * @function
- */
-
- var len$4 = length$4;
- /**
- * Alias for {@link vec2.subtract}
- * @function
- */
-
- var sub$6 = subtract$6;
- /**
- * Alias for {@link vec2.multiply}
- * @function
- */
-
- var mul$8 = multiply$8;
- /**
- * Alias for {@link vec2.divide}
- * @function
- */
-
- var div$2 = divide$2;
- /**
- * Alias for {@link vec2.distance}
- * @function
- */
-
- var dist$2 = distance$2;
- /**
- * Alias for {@link vec2.squaredDistance}
- * @function
- */
-
- var sqrDist$2 = squaredDistance$2;
- /**
- * Alias for {@link vec2.squaredLength}
- * @function
- */
-
- var sqrLen$4 = squaredLength$4;
- /**
- * Perform some operation over an array of vec2s.
- *
- * @param {Array} a the array of vectors to iterate over
- * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed
- * @param {Number} offset Number of elements to skip at the beginning of the array
- * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array
- * @param {Function} fn Function to call for each vector in the array
- * @param {Object} [arg] additional argument to pass to fn
- * @returns {Array} a
- * @function
- */
-
- var forEach$2 = function () {
- var vec = create$8();
- return function (a, stride, offset, count, fn, arg) {
- var i, l;
-
- if (!stride) {
- stride = 2;
- }
-
- if (!offset) {
- offset = 0;
- }
-
- if (count) {
- l = Math.min(count * stride + offset, a.length);
- } else {
- l = a.length;
- }
-
- for (i = offset; i < l; i += stride) {
- vec[0] = a[i];
- vec[1] = a[i + 1];
- fn(vec, vec, arg);
- a[i] = vec[0];
- a[i + 1] = vec[1];
- }
-
- return a;
- };
- }();
-
- var vec2 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- create: create$8,
- clone: clone$8,
- fromValues: fromValues$8,
- copy: copy$8,
- set: set$8,
- add: add$8,
- subtract: subtract$6,
- multiply: multiply$8,
- divide: divide$2,
- ceil: ceil$2,
- floor: floor$2,
- min: min$2,
- max: max$2,
- round: round$2,
- scale: scale$8,
- scaleAndAdd: scaleAndAdd$2,
- distance: distance$2,
- squaredDistance: squaredDistance$2,
- length: length$4,
- squaredLength: squaredLength$4,
- negate: negate$2,
- inverse: inverse$2,
- normalize: normalize$4,
- dot: dot$4,
- cross: cross$2,
- lerp: lerp$4,
- random: random$3,
- transformMat2: transformMat2,
- transformMat2d: transformMat2d,
- transformMat3: transformMat3$1,
- transformMat4: transformMat4$2,
- rotate: rotate$4,
- angle: angle$1,
- zero: zero$2,
- str: str$8,
- exactEquals: exactEquals$8,
- equals: equals$9,
- len: len$4,
- sub: sub$6,
- mul: mul$8,
- div: div$2,
- dist: dist$2,
- sqrDist: sqrDist$2,
- sqrLen: sqrLen$4,
- forEach: forEach$2
- });
-
- exports.glMatrix = common;
- exports.mat2 = mat2;
- exports.mat2d = mat2d;
- exports.mat3 = mat3;
- exports.mat4 = mat4;
- exports.quat = quat;
- exports.quat2 = quat2;
- exports.vec2 = vec2;
- exports.vec3 = vec3;
- exports.vec4 = vec4;
-
- Object.defineProperty(exports, '__esModule', { value: true });
-
-})));
diff --git a/package.json b/package.json
index 5bd1b7a6..927fa8ee 100644
--- a/package.json
+++ b/package.json
@@ -28,29 +28,40 @@
],
"scripts": {
"test": "mocha --require @babel/register --recursive spec",
+ "test:as": "asp --verbose",
+ "test:ci": "asp --summary",
"doc": "jsdoc -c jsdoc.config.json",
"update-license-version": "node utils/update-license-version.js",
"build-umd": "rollup -c",
- "build-esm": "cross-env BABEL_ENV=esm babel src -d dist/esm",
- "build-cjs": "babel src -d dist/cjs",
- "build-dts": "tsc --allowJs --declaration --emitDeclarationOnly --module amd --outFile ./dist/index.d.ts ./src/index.js ./src/types.d.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts",
- "build": "del dist && npm run update-license-version && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js",
- "prepare": "npm run build"
+ "build-esm": "tsc --module es6 assembly/index.ts --outDir dist/esm",
+ "build-cjs": "tsc --module commonjs assembly/index.ts -outDir dist/cjs",
+ "build-dts": "tsc --declaration --emitDeclarationOnly --module amd --outFile ./dist/index.d.ts ./assembly/index.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts",
+ "build-loader": "tsc -p assembly/tsconfig.json && tsc -p assembly/loader/tsconfig.json && tsc -noEmit dist/loader/index.d.ts",
+ "build": "del dist && npm run update-license-version && npm run build-loader && npm run asbuild && npm run build-umd && npm run build-esm && npm run build-cjs && npm run build-dts && node ./utils/build.js",
+ "prepare": "npm run build",
+ "asbuild:untouched": "asc ./node_modules/as-bind/lib/assembly/as-bind.ts assembly/index.ts --target debug",
+ "asbuild:optimized": "asc ./node_modules/as-bind/lib/assembly/as-bind.ts assembly/index.ts --target release",
+ "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized"
},
"devDependencies": {
- "@babel/cli": "^7.8.4",
- "@babel/core": "^7.9.0",
- "@babel/preset-env": "^7.9.0",
+ "@as-pect/cli": "^6.0.0",
+ "@assemblyscript/loader": "^0.18.17",
+ "@babel/core": "7.9.0",
+ "@babel/preset-env": "^7.13.12",
"@babel/register": "^7.9.0",
+ "@rollup/plugin-replace": "^2.4.2",
+ "@rollup/plugin-typescript": "^8.2.1",
+ "@rollup/plugin-wasm": "^5.1.2",
+ "as-bind": "^0.6.1",
+ "assemblyscript": "^0.18.27",
"cross-env": "^7.0.2",
"del-cli": "^3.0.0",
"jsdoc": "^3.6.3",
"mocha": "^7.1.1",
"node-libs-browser": "^2.2.1",
"rollup": "^2.3.2",
- "rollup-plugin-babel": "^4.4.0",
"rollup-plugin-size-snapshot": "^0.11.0",
- "rollup-plugin-terser": "^5.3.0",
+ "rollup-plugin-terser": "5.3.0",
"typescript": "^3.8.3"
},
"dependencies": {}
diff --git a/rollup.config.js b/rollup.config.js
index 1f3fb1f0..61ecf589 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -1,11 +1,12 @@
-import babel from 'rollup-plugin-babel';
-import { terser } from 'rollup-plugin-terser';
import { sizeSnapshot } from 'rollup-plugin-size-snapshot';
+import { terser } from 'rollup-plugin-terser';
+import replace from '@rollup/plugin-replace';
+import typescript from '@rollup/plugin-typescript';
const version = require('./package.json').version;
const license = require('./utils/license-template');
-const input = './src/index.js';
+const input = './assembly/index.ts';
const name = 'glMatrix';
const bannerPlugin = {
@@ -21,24 +22,34 @@ ${license}
}
export default [
+ {
+ input: './assembly/loader/release.js',
+ output: { file: 'dist/gl-matrix-wasm.js', format: 'umd', name },
+ plugins: [
+ replace({ preventAssignment: true }),
+ typescript({ exclude: "**/*.spec.ts" })
+ ]
+ },
{
input,
output: { file: 'dist/gl-matrix.js', format: 'umd', name },
plugins: [
- bannerPlugin,
- babel()
+ replace({ preventAssignment: true }),
+ typescript({ exclude: "**/*.spec.ts" }),
+ bannerPlugin
]
},
{
input,
output: { file: 'dist/gl-matrix-min.js', format: 'umd', name },
plugins: [
- bannerPlugin,
- babel(),
- sizeSnapshot(),
+ replace({ preventAssignment: true }),
+ typescript({ exclude: "**/*.spec.ts" }),
terser({
output: { comments: /^!/ }
- })
+ }),
+ sizeSnapshot(),
+ bannerPlugin
]
}
];
diff --git a/tests/index.js b/tests/index.js
new file mode 100644
index 00000000..34bfdce9
--- /dev/null
+++ b/tests/index.js
@@ -0,0 +1,23 @@
+import assert from 'assert';
+import { bind } from '../loader/index.js';
+
+(async () => {
+
+ // pretier-ignore
+ const out = [1, 0,
+ 0, 1];
+
+ const mat2 = {
+ create: bind('mat2', 'create'),
+ invert: bind('mat2', 'invert')
+ }
+
+ var { value: arr, reference: ref } = await mat2.create();
+ assert.deepEqual(arr, out);
+ console.log('ok');
+ // await mat2.invert(arr, out);
+ await mat2.invert(ref, out);
+ console.log(1, -0, -0, 1]);
+ console.log(arr);
+ console.log('ok');
+})();
diff --git a/utils/build-loader.js b/utils/build-loader.js
new file mode 100644
index 00000000..9cde6663
--- /dev/null
+++ b/utils/build-loader.js
@@ -0,0 +1,44 @@
+const fs = require('fs');
+const path = require('path');
+
+const inputDir = 'assembly';
+const outputDir = 'loader';
+
+let declarations = new Set();
+
+let content;
+
+fs.readdirSync(inputDir)
+ .filter(file =>
+ file.includes('.ts') &&
+ !file.includes('import') &&
+ !file.includes('index') &&
+ !file.includes('math') &&
+ !file.includes('d.ts') &&
+ !file.includes('_tests_'))
+ .forEach(file => {
+ const fileName = file.split('.')[0];
+ let moduleName = fileName;
+ if (file.includes('common')) {
+ moduleName = 'glMatrix';
+ }
+ content = `import { ${moduleName} } from './index.js'\n\nexport const {\n`;
+ console.log(`Searching for exported functions and objects in file ${path.join(inputDir, file)}...`);
+ fs.readFileSync(path.join(inputDir, file)).toString().split('\n').forEach(line => {
+ if (line.match(/export.+(function|var).[a-zA-Z]+.+[;\{]/g) !== null) {
+ declarations.add(line.replace(/export.+(function|var).([a-zA-Z]+).+[;\{\r]/g, "$2"));
+ }
+ });
+
+ declarations.forEach((value, value2, set) => {
+ if (value != 'min' && value != 'max') {
+ content += ` ${value},\n`;
+ }
+ });
+ content += `\} = ${moduleName};\n`;
+
+ console.log(`Found ${declarations.size ?? 0} exports.`);
+
+ loader = fs.writeFileSync(path.join(outputDir, fileName + '.js'), content);
+ console.log(`Exports are being written to file ${path.join(outputDir, fileName + '.js')}\n`);
+ });
diff --git a/utils/build.js b/utils/build.js
index 5d28d06a..97543ea3 100644
--- a/utils/build.js
+++ b/utils/build.js
@@ -17,10 +17,16 @@ fs.writeFileSync('dist/package.json', JSON.stringify(pkg, null, 2));
copyFileSync('README.md', 'dist/README.md');
copyFileSync('LICENSE.md', 'dist/LICENSE.md');
-const files = fs.readdirSync('src')
- .filter(file => !file.includes('common') && !file.includes('index'))
+const files = fs.readdirSync('assembly')
+ .filter(file =>
+ !file.includes('_tests_') &&
+ !file.includes('.json') &&
+ !file.includes('import') &&
+ !file.includes('math') &&
+ !file.includes('common') && !file.includes('index'))
.forEach(file => {
- const name = file.endsWith('.js') ? file.slice(0, -3) : file;
+ const name = file.endsWith('.ts') ? file.slice(0, -3) : file;
+ file = file.slice(0, -3) + '.js';
const filePkg = {
name: `gl-matrix/${name}`,
main: `../cjs/${file}`,
diff --git a/utils/bundle-dts.js b/utils/bundle-dts.js
index c7bcd554..d553064e 100644
--- a/utils/bundle-dts.js
+++ b/utils/bundle-dts.js
@@ -2,7 +2,7 @@ const fs = require("fs");
const path = require("path");
let sourcePath = "./dist/index.d.ts";
-let sourceTypingsPath = "./src/types.d.ts";
+let sourceTypingsPath = "./assembly/index.d.ts";
let sourceTypings = fs.readFileSync(sourceTypingsPath, "utf-8");
let typings = fs.readFileSync(sourcePath, "utf-8");
let typingsLength = typings.length;
@@ -31,10 +31,21 @@ typings = typings.replace(/ *import.+from.*;/g, "");
// Replace declare module with exports
typings = typings.replace(/declare module "([^"]+?)" {/g, "export module $1 {");
+// Remove module types for global
+typings = typings.replace(/\n export type.*=.*;/g, "");
+
// Add types
typings = "\n" + sourceTypings.replace(/declare/g, "export") + "\n" + typings;
// Wrap them in a "gl-matrix module"
typings = 'declare module "gl-matrix" {\n' + typings + "\n}";
+// Place assemblyscript reference path to the top
+typings = typings.replace(/\n\n\/\/\/ /g, "");
+
+typings = `/// \n${typings}`;
+
+// Retype parameters with global types
+typings = typings.replace(/: [a-z0-9]+?\./g, ": ");
+
fs.writeFileSync(sourcePath, typings, "utf-8");