diff --git a/lib/libm/README.md b/lib/libm/README.md new file mode 100644 index 00000000..cc2cbdd9 --- /dev/null +++ b/lib/libm/README.md @@ -0,0 +1,11 @@ +# ![AS](https://avatars1.githubusercontent.com/u/28916798?s=48) libm + +AssemblyScript's math routines for double and single precision as a library. + +```ts +const libm = require("@assemblyscript/libm"); +const libmf = libm.libmf; +... +``` + +Both `libm` and `libmf` have the same general interface as JavaScript's `Math`, with `libmf` doing single precision math. diff --git a/lib/libm/assembly/libm.ts b/lib/libm/assembly/libm.ts new file mode 100644 index 00000000..5bd3249d --- /dev/null +++ b/lib/libm/assembly/libm.ts @@ -0,0 +1,144 @@ +export const E = Math.E; +export const LN10 = Math.LN10; +export const LN2 = Math.LN2; +export const LOG10E = Math.LOG10E; +export const LOG2E = Math.LOG2E; +export const PI = Math.PI; +export const SQRT1_2 = Math.SQRT1_2; +export const SQRT2 = Math.SQRT2; + +export function abs(x: f64): f64 { + return Math.abs(x); +} + +export function acos(x: f64): f64 { + return Math.acos(x); +} + +export function acosh(x: f64): f64 { + return Math.acosh(x); +} + +export function asin(x: f64): f64 { + return Math.asin(x); +} + +export function asinh(x: f64): f64 { + return Math.asinh(x); +} + +export function atan(x: f64): f64 { + return Math.atan(x); +} + +export function atanh(x: f64): f64 { + return Math.atanh(x); +} + +export function atan2(y: f64, x: f64): f64 { + return Math.atan2(y, x); +} + +export function cbrt(x: f64): f64 { + return Math.cbrt(x); +} + +export function ceil(x: f64): f64 { + return Math.ceil(x); +} + +export function clz32(x: f64): f64 { + return Math.clz32(x); +} + +export function cos(x: f64): f64 { + return Math.cos(x); +} + +export function cosh(x: f64): f64 { + return Math.cosh(x); +} + +export function exp(x: f64): f64 { + return Math.exp(x); +} + +export function expm1(x: f64): f64 { + return Math.expm1(x); +} + +export function floor(x: f64): f64 { + return Math.floor(x); +} + +export function fround(x: f64): f64 { + return Math.fround(x); +} + +export function hypot(a: f64, b: f64): f64 { + return Math.hypot(a, b); +} + +export function imul(a: f64, b: f64): f64 { + return Math.imul(a, b); +} + +export function log(x: f64): f64 { + return Math.log(x); +} + +export function log10(x: f64): f64 { + return Math.log10(x); +} + +export function log1p(x: f64): f64 { + return Math.log1p(x); +} + +export function log2(x: f64): f64 { + return Math.log2(x); +} + +export function max(a: f64, b: f64): f64 { + return Math.max(a, b); +} + +export function min(a: f64, b: f64): f64 { + return Math.min(a, b); +} + +export function pow(x: f64, y: f64): f64 { + return Math.pow(x, y); +} + +export function round(x: f64): f64 { + return Math.round(x); +} + +export function sign(x: f64): f64 { + return Math.sign(x); +} + +export function sin(x: f64): f64 { + return Math.sin(x); +} + +export function sinh(x: f64): f64 { + return Math.sinh(x); +} + +export function sqrt(x: f64): f64 { + return Math.sqrt(x); +} + +export function tan(x: f64): f64 { + return Math.tan(x); +} + +export function tanh(x: f64): f64 { + return Math.tanh(x); +} + +export function trunc(x: f64): f64 { + return Math.trunc(x); +} diff --git a/lib/libm/assembly/libmf.ts b/lib/libm/assembly/libmf.ts new file mode 100644 index 00000000..25f5e9bc --- /dev/null +++ b/lib/libm/assembly/libmf.ts @@ -0,0 +1,144 @@ +export const E = Mathf.E; +export const LN10 = Mathf.LN10; +export const LN2 = Mathf.LN2; +export const LOG10E = Mathf.LOG10E; +export const LOG2E = Mathf.LOG2E; +export const PI = Mathf.PI; +export const SQRT1_2 = Mathf.SQRT1_2; +export const SQRT2 = Mathf.SQRT2; + +export function abs(x: f32): f32 { + return Mathf.abs(x); +} + +export function acos(x: f32): f32 { + return Mathf.acos(x); +} + +export function acosh(x: f32): f32 { + return Mathf.acosh(x); +} + +export function asin(x: f32): f32 { + return Mathf.asin(x); +} + +export function asinh(x: f32): f32 { + return Mathf.asinh(x); +} + +export function atan(x: f32): f32 { + return Mathf.atan(x); +} + +export function atanh(x: f32): f32 { + return Mathf.atanh(x); +} + +export function atan2(y: f32, x: f32): f32 { + return Mathf.atan2(y, x); +} + +export function cbrt(x: f32): f32 { + return Mathf.cbrt(x); +} + +export function ceil(x: f32): f32 { + return Mathf.ceil(x); +} + +export function clz32(x: f32): f32 { + return Mathf.clz32(x); +} + +export function cos(x: f32): f32 { + return Mathf.cos(x); +} + +export function cosh(x: f32): f32 { + return Mathf.cosh(x); +} + +export function exp(x: f32): f32 { + return Mathf.exp(x); +} + +export function expm1(x: f32): f32 { + return Mathf.expm1(x); +} + +export function floor(x: f32): f32 { + return Mathf.floor(x); +} + +export function fround(x: f32): f32 { + return Mathf.fround(x); +} + +export function hypot(a: f32, b: f32): f32 { + return Mathf.hypot(a, b); +} + +export function imul(a: f32, b: f32): f32 { + return Mathf.imul(a, b); +} + +export function log(x: f32): f32 { + return Mathf.log(x); +} + +export function log10(x: f32): f32 { + return Mathf.log10(x); +} + +export function log1p(x: f32): f32 { + return Mathf.log1p(x); +} + +export function log2(x: f32): f32 { + return Mathf.log2(x); +} + +export function max(a: f32, b: f32): f32 { + return Mathf.max(a, b); +} + +export function min(a: f32, b: f32): f32 { + return Mathf.min(a, b); +} + +export function pow(x: f32, y: f32): f32 { + return Mathf.pow(x, y); +} + +export function round(x: f32): f32 { + return Mathf.round(x); +} + +export function sign(x: f32): f32 { + return Mathf.sign(x); +} + +export function sin(x: f32): f32 { + return Mathf.sin(x); +} + +export function sinh(x: f32): f32 { + return Mathf.sinh(x); +} + +export function sqrt(x: f32): f32 { + return Mathf.sqrt(x); +} + +export function tan(x: f32): f32 { + return Mathf.tan(x); +} + +export function tanh(x: f32): f32 { + return Mathf.tanh(x); +} + +export function trunc(x: f32): f32 { + return Mathf.trunc(x); +} diff --git a/lib/libm/assembly/tsconfig.json b/lib/libm/assembly/tsconfig.json new file mode 100644 index 00000000..6e52b21c --- /dev/null +++ b/lib/libm/assembly/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../../../std/assembly.json", + "include": [ + "./**/*.ts" + ] +} diff --git a/lib/libm/build/.gitignore b/lib/libm/build/.gitignore new file mode 100644 index 00000000..d873de2f --- /dev/null +++ b/lib/libm/build/.gitignore @@ -0,0 +1,2 @@ +*.wasm +*.wasm.map diff --git a/lib/libm/build/libm.wat b/lib/libm/build/libm.wat new file mode 100644 index 00000000..8b8ce0e1 --- /dev/null +++ b/lib/libm/build/libm.wat @@ -0,0 +1,3934 @@ +(module + (type $FUNCSIG$dd (func (param f64) (result f64))) + (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) + (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) + (type $FUNCSIG$v (func)) + (import "Math" "cos" (func $~lib/bindings/Math/cos (param f64) (result f64))) + (import "Math" "sin" (func $~lib/bindings/Math/sin (param f64) (result f64))) + (import "Math" "tan" (func $~lib/bindings/Math/tan (param f64) (result f64))) + (memory $0 0) + (global $assembly/libm/E f64 (f64.const 2.718281828459045)) + (global $assembly/libm/LN10 f64 (f64.const 2.302585092994046)) + (global $assembly/libm/LN2 f64 (f64.const 0.6931471805599453)) + (global $assembly/libm/LOG10E f64 (f64.const 0.4342944819032518)) + (global $assembly/libm/LOG2E f64 (f64.const 1.4426950408889634)) + (global $assembly/libm/PI f64 (f64.const 3.141592653589793)) + (global $assembly/libm/SQRT1_2 f64 (f64.const 0.7071067811865476)) + (global $assembly/libm/SQRT2 f64 (f64.const 1.4142135623730951)) + (export "memory" (memory $0)) + (export "E" (global $assembly/libm/E)) + (export "LN10" (global $assembly/libm/LN10)) + (export "LN2" (global $assembly/libm/LN2)) + (export "LOG10E" (global $assembly/libm/LOG10E)) + (export "LOG2E" (global $assembly/libm/LOG2E)) + (export "PI" (global $assembly/libm/PI)) + (export "SQRT1_2" (global $assembly/libm/SQRT1_2)) + (export "SQRT2" (global $assembly/libm/SQRT2)) + (export "abs" (func $assembly/libm/abs)) + (export "acos" (func $assembly/libm/acos)) + (export "acosh" (func $assembly/libm/acosh)) + (export "asin" (func $assembly/libm/asin)) + (export "asinh" (func $assembly/libm/asinh)) + (export "atan" (func $assembly/libm/atan)) + (export "atanh" (func $assembly/libm/atanh)) + (export "atan2" (func $assembly/libm/atan2)) + (export "cbrt" (func $assembly/libm/cbrt)) + (export "ceil" (func $assembly/libm/ceil)) + (export "clz32" (func $assembly/libm/clz32)) + (export "cos" (func $assembly/libm/cos)) + (export "cosh" (func $assembly/libm/cosh)) + (export "exp" (func $assembly/libm/exp)) + (export "expm1" (func $assembly/libm/expm1)) + (export "floor" (func $assembly/libm/floor)) + (export "fround" (func $assembly/libm/fround)) + (export "hypot" (func $assembly/libm/hypot)) + (export "imul" (func $assembly/libm/imul)) + (export "log" (func $assembly/libm/log)) + (export "log10" (func $assembly/libm/log10)) + (export "log1p" (func $assembly/libm/log1p)) + (export "log2" (func $assembly/libm/log2)) + (export "max" (func $assembly/libm/max)) + (export "min" (func $assembly/libm/min)) + (export "pow" (func $assembly/libm/pow)) + (export "round" (func $assembly/libm/round)) + (export "sign" (func $assembly/libm/sign)) + (export "sin" (func $assembly/libm/sin)) + (export "sinh" (func $assembly/libm/sinh)) + (export "sqrt" (func $assembly/libm/sqrt)) + (export "tan" (func $assembly/libm/tan)) + (export "tanh" (func $assembly/libm/tanh)) + (export "trunc" (func $assembly/libm/trunc)) + (func $assembly/libm/abs (; 3 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + f64.abs + ) + (func $~lib/math/R (; 4 ;) (type $FUNCSIG$dd) (param $0 f64) (result 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 + 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 + f64.div + ) + (func $~lib/math/NativeMath.acos (; 5 ;) (type $FUNCSIG$dd) (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 + call $~lib/math/R + f64.mul + f64.sub + f64.sub + f64.sub + return + end + local.get $3 + i32.const 31 + i32.shr_u + if + f64.const 2 + f64.const 1.5707963267948966 + f64.const 0.5 + local.get $0 + f64.const 0.5 + f64.mul + f64.add + local.tee $0 + f64.sqrt + local.tee $1 + local.get $0 + call $~lib/math/R + local.get $1 + f64.mul + f64.const 6.123233995736766e-17 + f64.sub + f64.add + f64.sub + f64.mul + return + end + f64.const 2 + f64.const 0.5 + local.get $0 + f64.const 0.5 + f64.mul + f64.sub + local.tee $1 + f64.sqrt + local.tee $4 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.tee $0 + local.get $1 + call $~lib/math/R + local.get $4 + f64.mul + local.get $1 + local.get $0 + local.get $0 + f64.mul + f64.sub + local.get $4 + local.get $0 + f64.add + f64.div + f64.add + f64.add + f64.mul + ) + (func $assembly/libm/acos (; 6 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.acos + ) + (func $~lib/math/NativeMath.log1p (; 7 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 f64) + (local $2 i32) + (local $3 i32) + (local $4 f64) + (local $5 f64) + (local $6 i64) + (local $7 f64) + i32.const 1 + local.set $3 + local.get $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $2 + i32.const 1071284858 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $2 + i32.const 31 + i32.shr_u + end + if + local.get $2 + i32.const -1074790400 + i32.ge_u + if + local.get $0 + f64.const -1 + f64.eq + if + local.get $0 + f64.const 0 + f64.div + return + end + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.div + return + end + local.get $2 + i32.const 1 + i32.shl + i32.const 2034237440 + i32.lt_u + if + local.get $0 + return + end + local.get $2 + i32.const -1076707644 + i32.le_u + if + i32.const 0 + local.set $3 + local.get $0 + local.set $1 + end + else + local.get $2 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + return + end + end + local.get $3 + if + f64.const 1 + local.get $0 + f64.add + i64.reinterpret_f64 + local.tee $6 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 614242 + i32.add + local.tee $2 + i32.const 20 + i32.shr_u + i32.const 1023 + i32.sub + local.tee $3 + i32.const 54 + i32.lt_s + if (result f64) + local.get $6 + f64.reinterpret_i64 + local.set $1 + f64.const 1 + local.get $1 + local.get $0 + f64.sub + f64.sub + local.get $0 + local.get $1 + f64.const 1 + f64.sub + f64.sub + local.get $3 + i32.const 2 + i32.ge_s + select + local.get $1 + f64.div + else + f64.const 0 + end + local.set $5 + local.get $6 + i64.const 4294967295 + i64.and + local.get $2 + i32.const 1048575 + i32.and + i32.const 1072079006 + i32.add + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + f64.reinterpret_i64 + f64.const 1 + f64.sub + local.set $1 + end + local.get $1 + f64.const 2 + local.get $1 + f64.add + f64.div + local.tee $4 + local.get $4 + f64.mul + local.tee $7 + local.get $7 + f64.mul + local.set $0 + local.get $4 + f64.const 0.5 + local.get $1 + f64.mul + local.get $1 + f64.mul + local.tee $4 + local.get $7 + f64.const 0.6666666666666735 + local.get $0 + f64.const 0.2857142874366239 + local.get $0 + f64.const 0.1818357216161805 + local.get $0 + f64.const 0.14798198605116586 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $0 + f64.const 0.3999999999940942 + local.get $0 + f64.const 0.22222198432149784 + local.get $0 + f64.const 0.15313837699209373 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.add + f64.mul + local.get $3 + f64.convert_i32_s + local.tee $0 + f64.const 1.9082149292705877e-10 + f64.mul + local.get $5 + f64.add + f64.add + local.get $4 + f64.sub + local.get $1 + f64.add + local.get $0 + f64.const 0.6931471803691238 + f64.mul + f64.add + ) + (func $~lib/math/NativeMath.log (; 8 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 i32) + (local $2 i64) + (local $3 f64) + (local $4 f64) + (local $5 i32) + (local $6 f64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $1 + i32.const 1048576 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 31 + i32.shr_u + end + if + local.get $2 + i64.const 1 + i64.shl + i64.const 0 + i64.eq + if + f64.const -1 + local.get $0 + local.get $0 + f64.mul + f64.div + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.div + return + end + i32.const -54 + local.set $5 + local.get $0 + f64.const 18014398509481984 + f64.mul + i64.reinterpret_f64 + local.tee $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $1 + else + local.get $1 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + return + else + local.get $2 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $1 + i32.const 1072693248 + i32.eq + select + if + f64.const 0 + return + end + end + end + local.get $2 + i64.const 4294967295 + i64.and + local.get $1 + i32.const 614242 + i32.add + local.tee $1 + i32.const 1048575 + i32.and + i32.const 1072079006 + i32.add + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + f64.reinterpret_i64 + f64.const 1 + f64.sub + local.tee $3 + f64.const 2 + local.get $3 + f64.add + f64.div + local.tee $4 + local.get $4 + f64.mul + local.tee $6 + local.get $6 + f64.mul + local.set $0 + local.get $4 + f64.const 0.5 + local.get $3 + f64.mul + local.get $3 + f64.mul + local.tee $4 + local.get $6 + f64.const 0.6666666666666735 + local.get $0 + f64.const 0.2857142874366239 + local.get $0 + f64.const 0.1818357216161805 + local.get $0 + f64.const 0.14798198605116586 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $0 + f64.const 0.3999999999940942 + local.get $0 + f64.const 0.22222198432149784 + local.get $0 + f64.const 0.15313837699209373 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.add + f64.mul + local.get $1 + i32.const 20 + i32.shr_s + i32.const 1023 + i32.sub + local.get $5 + i32.add + f64.convert_i32_s + local.tee $0 + f64.const 1.9082149292705877e-10 + f64.mul + f64.add + local.get $4 + f64.sub + local.get $3 + f64.add + local.get $0 + f64.const 0.6931471803691238 + f64.mul + f64.add + ) + (func $~lib/math/NativeMath.acosh (; 9 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 i64) + local.get $0 + i64.reinterpret_f64 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $1 + i64.const 1024 + i64.lt_u + if + local.get $0 + f64.const 1 + f64.sub + local.tee $0 + local.get $0 + local.get $0 + f64.mul + f64.const 2 + local.get $0 + f64.mul + f64.add + f64.sqrt + f64.add + call $~lib/math/NativeMath.log1p + return + end + local.get $1 + i64.const 1049 + i64.lt_u + if + f64.const 2 + local.get $0 + f64.mul + f64.const 1 + local.get $0 + local.get $0 + local.get $0 + f64.mul + f64.const 1 + f64.sub + f64.sqrt + f64.add + f64.div + f64.sub + call $~lib/math/NativeMath.log + return + end + local.get $0 + call $~lib/math/NativeMath.log + f64.const 0.6931471805599453 + f64.add + ) + (func $assembly/libm/acosh (; 10 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.acosh + ) + (func $~lib/math/NativeMath.asin (; 11 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 f64) + (local $2 i32) + (local $3 f64) + (local $4 i32) + local.get $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $4 + 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 $0 + f64.const 1.5707963267948966 + f64.mul + f64.const 7.52316384526264e-37 + f64.add + 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 1048576 + i32.ge_u + i32.const 0 + local.get $2 + i32.const 1045430272 + i32.lt_u + select + if + local.get $0 + return + end + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f64.mul + call $~lib/math/R + f64.mul + f64.add + return + end + f64.const 0.5 + local.get $0 + f64.abs + f64.const 0.5 + f64.mul + f64.sub + local.tee $1 + f64.sqrt + local.set $0 + local.get $1 + call $~lib/math/R + local.set $3 + local.get $2 + i32.const 1072640819 + i32.ge_u + if (result f64) + f64.const 1.5707963267948966 + f64.const 2 + local.get $0 + local.get $0 + local.get $3 + f64.mul + f64.add + f64.mul + f64.const 6.123233995736766e-17 + f64.sub + f64.sub + else + f64.const 0.7853981633974483 + f64.const 2 + local.get $0 + f64.mul + local.get $3 + f64.mul + f64.const 6.123233995736766e-17 + f64.const 2 + local.get $1 + local.get $0 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.tee $1 + local.get $1 + f64.mul + f64.sub + local.get $0 + local.get $1 + f64.add + f64.div + f64.mul + f64.sub + f64.sub + f64.const 0.7853981633974483 + f64.const 2 + local.get $1 + f64.mul + f64.sub + f64.sub + f64.sub + end + local.set $0 + local.get $4 + i32.const 31 + i32.shr_u + if + local.get $0 + f64.neg + return + end + local.get $0 + ) + (func $assembly/libm/asin (; 12 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.asin + ) + (func $~lib/math/NativeMath.asinh (; 13 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 f64) + (local $2 i64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i64.const 9223372036854775807 + i64.and + f64.reinterpret_i64 + local.set $1 + local.get $2 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $2 + i64.const 1049 + i64.ge_u + if (result f64) + local.get $1 + call $~lib/math/NativeMath.log + f64.const 0.6931471805599453 + f64.add + else + local.get $2 + i64.const 1024 + i64.ge_u + if (result f64) + f64.const 2 + local.get $1 + f64.mul + f64.const 1 + local.get $1 + local.get $1 + f64.mul + f64.const 1 + f64.add + f64.sqrt + local.get $1 + f64.add + f64.div + f64.add + call $~lib/math/NativeMath.log + else + local.get $2 + i64.const 997 + i64.ge_u + if (result f64) + local.get $1 + local.get $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.const 1 + f64.add + f64.sqrt + f64.const 1 + f64.add + f64.div + f64.add + call $~lib/math/NativeMath.log1p + else + local.get $1 + end + end + end + local.get $0 + f64.copysign + ) + (func $assembly/libm/asinh (; 14 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.asinh + ) + (func $~lib/math/NativeMath.atan (; 15 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 f64) + (local $2 i32) + (local $3 f64) + (local $4 f64) + local.get $0 + local.set $3 + local.get $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.tee $2 + 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 $3 + f64.copysign + return + end + local.get $2 + i32.const 1071382528 + i32.lt_u + if + local.get $2 + i32.const 1044381696 + i32.lt_u + if + local.get $0 + return + end + i32.const -1 + local.set $2 + else + local.get $0 + f64.abs + local.set $0 + local.get $2 + i32.const 1072889856 + i32.lt_u + if (result f64) + local.get $2 + i32.const 1072037888 + i32.lt_u + if (result f64) + i32.const 0 + local.set $2 + f64.const 2 + local.get $0 + f64.mul + f64.const 1 + f64.sub + f64.const 2 + local.get $0 + f64.add + f64.div + else + i32.const 1 + local.set $2 + local.get $0 + f64.const 1 + f64.sub + local.get $0 + f64.const 1 + f64.add + f64.div + end + else + local.get $2 + i32.const 1073971200 + i32.lt_u + if (result f64) + i32.const 2 + local.set $2 + 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 + else + i32.const 3 + local.set $2 + f64.const -1 + local.get $0 + f64.div + end + end + local.set $0 + end + local.get $0 + local.get $0 + f64.mul + local.tee $4 + local.get $4 + f64.mul + local.set $1 + local.get $0 + local.get $4 + f64.const 0.3333333333333293 + local.get $1 + f64.const 0.14285714272503466 + local.get $1 + f64.const 0.09090887133436507 + local.get $1 + f64.const 0.06661073137387531 + local.get $1 + f64.const 0.049768779946159324 + local.get $1 + 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.get $1 + f64.const -0.19999999999876483 + local.get $1 + f64.const -0.11111110405462356 + local.get $1 + f64.const -0.0769187620504483 + local.get $1 + f64.const -0.058335701337905735 + local.get $1 + f64.const -0.036531572744216916 + 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 + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $0 + local.get $1 + f64.sub + return + end + block $break|0 + block $case4|0 + block $case3|0 + block $case2|0 + block $case1|0 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $case4|0 + end + f64.const 0.4636476090008061 + local.get $1 + 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 $1 + 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 $1 + 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 $1 + 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 $3 + f64.copysign + ) + (func $assembly/libm/atan (; 16 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.atan + ) + (func $~lib/math/NativeMath.atanh (; 17 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 f64) + (local $2 i64) + (local $3 f64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i64.const 9223372036854775807 + i64.and + f64.reinterpret_i64 + local.set $1 + local.get $2 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $2 + i64.const 1022 + i64.lt_u + if (result f64) + local.get $2 + i64.const 991 + i64.ge_u + if (result f64) + f64.const 0.5 + f64.const 2 + local.get $1 + f64.mul + local.tee $3 + local.get $3 + local.get $1 + f64.mul + f64.const 1 + local.get $1 + f64.sub + f64.div + f64.add + call $~lib/math/NativeMath.log1p + f64.mul + else + local.get $1 + end + else + f64.const 0.5 + f64.const 2 + local.get $1 + f64.const 1 + local.get $1 + f64.sub + f64.div + f64.mul + call $~lib/math/NativeMath.log1p + f64.mul + end + local.get $0 + f64.copysign + ) + (func $assembly/libm/atanh (; 18 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.atanh + ) + (func $~lib/math/NativeMath.atan2 (; 19 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) + (local $6 i32) + (local $7 i32) + i32.const 1 + local.get $0 + local.get $0 + f64.ne + local.get $1 + local.get $1 + f64.ne + select + if + local.get $1 + local.get $0 + f64.add + return + end + local.get $0 + i64.reinterpret_f64 + local.tee $5 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $3 + local.get $5 + i32.wrap_i64 + local.set $6 + local.get $1 + i64.reinterpret_f64 + local.tee $5 + i32.wrap_i64 + local.tee $7 + local.get $5 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $4 + i32.const 1072693248 + i32.sub + i32.or + i32.eqz + if + local.get $0 + call $~lib/math/NativeMath.atan + return + end + local.get $4 + i32.const 30 + i32.shr_u + i32.const 2 + i32.and + local.get $3 + i32.const 31 + i32.shr_u + i32.or + local.set $2 + local.get $4 + i32.const 2147483647 + i32.and + local.set $4 + local.get $3 + i32.const 2147483647 + i32.and + local.tee $3 + local.get $6 + i32.or + i32.eqz + if + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + local.get $2 + i32.eqz + br_if $case1|0 + block $tablify|0 + local.get $2 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $tablify|0 + end + br $break|0 + end + local.get $0 + return + end + f64.const 3.141592653589793 + return + end + f64.const -3.141592653589793 + return + end + end + block $folding-inner0 + local.get $4 + local.get $7 + i32.or + i32.eqz + br_if $folding-inner0 + local.get $4 + i32.const 2146435072 + i32.eq + if + local.get $3 + i32.const 2146435072 + i32.eq + if + block $break|1 + block $case3|1 + block $case2|1 + block $case1|1 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + br_table $case1|1 $case2|1 $case3|1 $break|1 + end + f64.const 0.7853981633974483 + return + end + f64.const -0.7853981633974483 + return + end + f64.const 2.356194490192345 + return + end + f64.const -2.356194490192345 + return + end + else + block $break|2 + block $case3|2 + block $case2|2 + block $case1|2 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + br_table $case1|2 $case2|2 $case3|2 $break|2 + end + f64.const 0 + return + end + f64.const -0 + return + end + f64.const 3.141592653589793 + return + end + f64.const -3.141592653589793 + return + end + end + end + i32.const 1 + local.get $3 + i32.const 2146435072 + i32.eq + local.get $4 + i32.const 67108864 + i32.add + local.get $3 + i32.lt_u + select + br_if $folding-inner0 + local.get $3 + i32.const 67108864 + i32.add + local.get $4 + i32.lt_u + i32.const 0 + local.get $2 + i32.const 2 + i32.and + select + if (result f64) + f64.const 0 + else + local.get $0 + local.get $1 + f64.div + f64.abs + call $~lib/math/NativeMath.atan + end + local.set $0 + block $break|3 + block $case3|3 + block $case2|3 + block $case1|3 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + br_table $case1|3 $case2|3 $case3|3 $break|3 + end + local.get $0 + return + end + local.get $0 + f64.neg + return + end + f64.const 3.141592653589793 + local.get $0 + f64.const 1.2246467991473532e-16 + f64.sub + f64.sub + return + end + local.get $0 + f64.const 1.2246467991473532e-16 + f64.sub + f64.const 3.141592653589793 + f64.sub + return + end + unreachable + end + f64.const -1.5707963267948966 + f64.const 1.5707963267948966 + local.get $2 + i32.const 1 + i32.and + select + ) + (func $assembly/libm/atan2 (; 20 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + local.get $0 + local.get $1 + call $~lib/math/NativeMath.atan2 + ) + (func $~lib/math/NativeMath.cbrt (; 21 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 f64) + (local $2 i32) + (local $3 f64) + (local $4 i64) + local.get $0 + i64.reinterpret_f64 + local.tee $4 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.tee $2 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + local.get $0 + f64.add + return + end + local.get $2 + i32.const 1048576 + i32.lt_u + if (result i32) + local.get $0 + f64.const 18014398509481984 + f64.mul + i64.reinterpret_f64 + local.tee $4 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const 2147483647 + i32.and + local.tee $2 + i32.eqz + if + local.get $0 + return + end + local.get $2 + i32.const 3 + i32.div_u + i32.const 696219795 + i32.add + else + local.get $2 + i32.const 3 + i32.div_u + i32.const 715094163 + i32.add + end + local.set $2 + local.get $4 + i64.const -9223372036854775808 + i64.and + local.get $2 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + f64.reinterpret_i64 + local.tee $3 + local.get $3 + f64.mul + local.get $3 + local.get $0 + f64.div + f64.mul + local.set $1 + local.get $0 + local.get $3 + f64.const 1.87595182427177 + local.get $1 + f64.const -1.8849797954337717 + local.get $1 + f64.const 1.6214297201053545 + f64.mul + f64.add + f64.mul + f64.add + local.get $1 + local.get $1 + f64.mul + local.get $1 + f64.mul + f64.const -0.758397934778766 + local.get $1 + f64.const 0.14599619288661245 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + i64.reinterpret_f64 + i64.const 2147483648 + i64.add + i64.const -1073741824 + i64.and + f64.reinterpret_i64 + local.tee $0 + local.get $0 + f64.mul + f64.div + local.tee $1 + local.get $0 + f64.sub + f64.const 2 + local.get $0 + f64.mul + local.get $1 + f64.add + f64.div + local.set $1 + local.get $0 + local.get $0 + local.get $1 + f64.mul + f64.add + ) + (func $assembly/libm/cbrt (; 22 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.cbrt + ) + (func $assembly/libm/ceil (; 23 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + f64.ceil + ) + (func $~lib/math/NativeMath.clz32 (; 24 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.ne + if + f64.const 32 + return + end + local.get $0 + f64.const 4294967296 + local.get $0 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + i32.clz + f64.convert_i32_s + ) + (func $assembly/libm/clz32 (; 25 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.clz32 + ) + (func $assembly/libm/cos (; 26 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/bindings/Math/cos + ) + (func $~lib/math/NativeMath.expm1 (; 27 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 i32) + (local $4 f64) + (local $5 i32) + (local $6 i32) + (local $7 f64) + (local $8 i64) + local.get $0 + i64.reinterpret_f64 + local.tee $8 + i64.const 63 + i64.shr_u + i32.wrap_i64 + local.set $6 + local.get $8 + i64.const 32 + i64.shr_u + i64.const 2147483647 + i64.and + i32.wrap_i64 + local.tee $5 + i32.const 1078159482 + i32.ge_u + if + local.get $0 + local.get $0 + f64.ne + if + local.get $0 + return + end + local.get $6 + if + f64.const -1 + return + end + local.get $0 + f64.const 709.782712893384 + f64.gt + if + local.get $0 + f64.const 8988465674311579538646525e283 + f64.mul + return + end + end + local.get $5 + i32.const 1071001154 + i32.gt_u + if + local.get $0 + i32.const 1 + local.get $6 + i32.const 1 + i32.shl + i32.sub + f64.const 1.4426950408889634 + local.get $0 + f64.mul + f64.const 0.5 + local.get $0 + f64.copysign + f64.add + i32.trunc_f64_s + local.get $5 + i32.const 1072734898 + i32.lt_u + select + local.tee $3 + f64.convert_i32_s + local.tee $1 + f64.const 0.6931471803691238 + f64.mul + f64.sub + local.tee $0 + local.get $0 + local.get $1 + f64.const 1.9082149292705877e-10 + f64.mul + local.tee $1 + f64.sub + local.tee $0 + f64.sub + local.get $1 + f64.sub + local.set $7 + else + local.get $5 + i32.const 1016070144 + i32.lt_u + if + local.get $0 + return + end + end + local.get $0 + f64.const 0.5 + local.get $0 + f64.mul + local.tee $2 + f64.mul + local.tee $4 + local.get $4 + f64.mul + local.set $1 + f64.const 3 + f64.const 1 + local.get $4 + f64.const -0.03333333333333313 + f64.mul + f64.add + local.get $1 + f64.const 1.5873015872548146e-03 + local.get $4 + f64.const -7.93650757867488e-05 + f64.mul + f64.add + local.get $1 + f64.const 4.008217827329362e-06 + local.get $4 + f64.const -2.0109921818362437e-07 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + local.tee $1 + local.get $2 + f64.mul + f64.sub + local.set $2 + local.get $4 + local.get $1 + local.get $2 + f64.sub + f64.const 6 + local.get $0 + local.get $2 + f64.mul + f64.sub + f64.div + f64.mul + local.set $1 + local.get $3 + i32.eqz + if + local.get $0 + local.get $0 + local.get $1 + f64.mul + local.get $4 + f64.sub + f64.sub + return + end + local.get $0 + local.get $1 + local.get $7 + f64.sub + f64.mul + local.get $7 + f64.sub + local.get $4 + f64.sub + local.set $2 + local.get $3 + i32.const -1 + i32.eq + if + f64.const 0.5 + local.get $0 + local.get $2 + f64.sub + f64.mul + f64.const 0.5 + f64.sub + return + end + local.get $3 + i32.const 1 + i32.eq + if + local.get $0 + f64.const -0.25 + f64.lt + if + f64.const -2 + local.get $2 + local.get $0 + f64.const 0.5 + f64.add + f64.sub + f64.mul + return + end + f64.const 1 + f64.const 2 + local.get $0 + local.get $2 + f64.sub + f64.mul + f64.add + return + end + local.get $3 + i64.extend_i32_s + i64.const 1023 + i64.add + i64.const 52 + i64.shl + f64.reinterpret_i64 + local.set $1 + i32.const 1 + local.get $3 + i32.const 56 + i32.gt_s + local.get $3 + i32.const 0 + i32.lt_s + select + if + local.get $0 + local.get $2 + f64.sub + f64.const 1 + f64.add + local.set $0 + local.get $3 + i32.const 1024 + i32.eq + if (result f64) + local.get $0 + f64.const 2 + f64.mul + f64.const 8988465674311579538646525e283 + f64.mul + else + local.get $0 + local.get $1 + f64.mul + end + f64.const 1 + f64.sub + return + end + local.get $0 + f64.const 1 + i64.const 1023 + local.get $3 + i64.extend_i32_s + i64.sub + i64.const 52 + i64.shl + f64.reinterpret_i64 + local.tee $0 + f64.sub + local.get $2 + f64.sub + f64.const 1 + local.get $2 + local.get $0 + f64.add + f64.sub + local.get $3 + i32.const 20 + i32.lt_s + select + f64.add + local.get $1 + f64.mul + ) + (func $~lib/math/NativeMath.scalbn (; 28 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + local.get $1 + i32.const 1023 + i32.gt_s + if (result f64) + local.get $0 + f64.const 8988465674311579538646525e283 + f64.mul + local.set $0 + local.get $1 + i32.const 1023 + i32.sub + local.tee $1 + i32.const 1023 + i32.gt_s + if (result f64) + local.get $1 + i32.const 1023 + i32.sub + local.tee $1 + i32.const 1023 + local.get $1 + i32.const 1023 + i32.lt_s + select + local.set $1 + local.get $0 + f64.const 8988465674311579538646525e283 + f64.mul + else + local.get $0 + end + else + local.get $1 + i32.const -1022 + i32.lt_s + if (result f64) + local.get $0 + f64.const 2.004168360008973e-292 + f64.mul + local.set $0 + local.get $1 + i32.const 969 + i32.add + local.tee $1 + i32.const -1022 + i32.lt_s + if (result f64) + local.get $1 + i32.const 969 + i32.add + local.tee $1 + i32.const -1022 + local.get $1 + i32.const -1022 + i32.gt_s + select + local.set $1 + local.get $0 + f64.const 2.004168360008973e-292 + f64.mul + else + local.get $0 + end + else + local.get $0 + end + end + local.get $1 + i64.extend_i32_s + i64.const 1023 + i64.add + i64.const 52 + i64.shl + f64.reinterpret_i64 + f64.mul + ) + (func $~lib/math/NativeMath.exp (; 29 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 i32) + (local $2 f64) + (local $3 i32) + (local $4 f64) + (local $5 f64) + (local $6 i32) + (local $7 f64) + local.get $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $1 + i32.const 31 + i32.shr_u + local.set $6 + local.get $1 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1082532651 + i32.ge_u + if + local.get $0 + local.get $0 + f64.ne + if + local.get $0 + return + end + local.get $0 + f64.const 709.782712893384 + f64.gt + if + local.get $0 + f64.const 8988465674311579538646525e283 + f64.mul + return + end + local.get $0 + f64.const -745.1332191019411 + f64.lt + if + f64.const 0 + return + end + end + i32.const 0 + local.set $1 + local.get $3 + i32.const 1071001154 + i32.gt_u + if + local.get $0 + local.get $3 + i32.const 1072734898 + i32.ge_u + if (result i32) + f64.const 1.4426950408889634 + local.get $0 + f64.mul + f64.const 0.5 + local.get $0 + f64.copysign + f64.add + i32.trunc_f64_s + else + i32.const 1 + local.get $6 + i32.const 1 + i32.shl + i32.sub + end + local.tee $1 + f64.convert_i32_s + local.tee $0 + f64.const 0.6931471803691238 + f64.mul + f64.sub + local.tee $4 + local.get $0 + f64.const 1.9082149292705877e-10 + f64.mul + local.tee $7 + f64.sub + local.set $0 + else + local.get $3 + i32.const 1043333120 + i32.le_u + if + f64.const 1 + local.get $0 + f64.add + return + end + local.get $0 + local.set $4 + end + local.get $0 + local.get $0 + f64.mul + local.tee $2 + local.get $2 + f64.mul + local.set $5 + f64.const 1 + local.get $0 + local.get $0 + local.get $2 + f64.const 0.16666666666666602 + f64.mul + local.get $5 + f64.const -2.7777777777015593e-03 + local.get $2 + f64.const 6.613756321437934e-05 + f64.mul + f64.add + local.get $5 + f64.const -1.6533902205465252e-06 + local.get $2 + f64.const 4.1381367970572385e-08 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.sub + local.tee $0 + f64.mul + f64.const 2 + local.get $0 + f64.sub + f64.div + local.get $7 + f64.sub + local.get $4 + f64.add + f64.add + local.set $0 + local.get $1 + i32.eqz + if + local.get $0 + return + end + local.get $0 + local.get $1 + call $~lib/math/NativeMath.scalbn + ) + (func $~lib/math/NativeMath.cosh (; 30 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 i32) + (local $2 i64) + local.get $0 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $2 + f64.reinterpret_i64 + local.set $0 + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $1 + i32.const 1072049730 + i32.lt_u + if + local.get $1 + i32.const 1045430272 + i32.lt_u + if + f64.const 1 + return + end + f64.const 1 + local.get $0 + call $~lib/math/NativeMath.expm1 + local.tee $0 + local.get $0 + f64.mul + f64.const 2 + f64.const 2 + local.get $0 + f64.mul + f64.add + f64.div + f64.add + return + end + local.get $1 + i32.const 1082535490 + i32.lt_u + if + f64.const 0.5 + local.get $0 + call $~lib/math/NativeMath.exp + local.tee $0 + f64.const 1 + local.get $0 + f64.div + f64.add + f64.mul + return + end + local.get $0 + f64.const 1416.0996898839683 + f64.sub + call $~lib/math/NativeMath.exp + f64.const 2247116418577894884661631e283 + f64.mul + f64.const 2247116418577894884661631e283 + f64.mul + ) + (func $assembly/libm/cosh (; 31 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.cosh + ) + (func $assembly/libm/exp (; 32 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.exp + ) + (func $assembly/libm/expm1 (; 33 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.expm1 + ) + (func $assembly/libm/floor (; 34 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + f64.floor + ) + (func $assembly/libm/fround (; 35 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + f32.demote_f64 + f64.promote_f32 + ) + (func $~lib/math/NativeMath.hypot (; 36 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (local $2 i64) + (local $3 f64) + (local $4 i64) + (local $5 i32) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 i32) + (local $10 f64) + (local $11 i64) + local.get $0 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $4 + local.get $1 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $2 + i64.lt_u + if + local.get $4 + local.set $11 + local.get $2 + local.set $4 + local.get $11 + local.set $2 + end + local.get $4 + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $5 + local.get $2 + f64.reinterpret_i64 + local.set $1 + local.get $2 + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $9 + i32.const 2047 + i32.eq + if + local.get $1 + return + end + local.get $4 + f64.reinterpret_i64 + local.set $0 + i32.const 1 + local.get $2 + i64.const 0 + i64.eq + local.get $5 + i32.const 2047 + i32.eq + select + if + local.get $0 + return + end + local.get $5 + local.get $9 + i32.sub + i32.const 64 + i32.gt_s + if + local.get $0 + local.get $1 + f64.add + return + end + f64.const 1 + local.set $6 + local.get $5 + i32.const 1533 + i32.gt_s + if (result f64) + f64.const 5260135901548373507240989e186 + local.set $6 + 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 $9 + i32.const 573 + i32.lt_s + if (result f64) + f64.const 1.90109156629516e-211 + local.set $6 + 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.tee $0 + local.get $0 + local.get $0 + f64.const 134217729 + f64.mul + local.tee $3 + f64.sub + local.get $3 + f64.add + local.tee $7 + f64.sub + local.set $10 + local.get $1 + local.get $1 + local.get $1 + f64.const 134217729 + f64.mul + local.tee $3 + f64.sub + local.get $3 + f64.add + local.tee $8 + f64.sub + local.set $3 + local.get $6 + local.get $8 + local.get $8 + f64.mul + local.get $1 + local.get $1 + f64.mul + local.tee $1 + f64.sub + f64.const 2 + local.get $8 + f64.mul + local.get $3 + f64.add + local.get $3 + f64.mul + f64.add + local.get $7 + local.get $7 + f64.mul + local.get $0 + local.get $0 + f64.mul + local.tee $0 + f64.sub + f64.const 2 + local.get $7 + f64.mul + local.get $10 + f64.add + local.get $10 + f64.mul + f64.add + f64.add + local.get $1 + f64.add + local.get $0 + f64.add + f64.sqrt + f64.mul + ) + (func $assembly/libm/hypot (; 37 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + local.get $0 + local.get $1 + call $~lib/math/NativeMath.hypot + ) + (func $~lib/math/NativeMath.imul (; 38 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (local $2 f64) + local.get $0 + local.get $1 + f64.add + local.tee $2 + local.get $2 + f64.sub + f64.const 0 + f64.ne + if + f64.const 0 + return + end + local.get $0 + f64.const 4294967296 + local.get $0 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + local.get $1 + f64.const 4294967296 + local.get $1 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + i32.mul + f64.convert_i32_s + ) + (func $assembly/libm/imul (; 39 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + local.get $0 + local.get $1 + call $~lib/math/NativeMath.imul + ) + (func $assembly/libm/log (; 40 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.log + ) + (func $~lib/math/NativeMath.log10 (; 41 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 f64) + (local $2 i32) + (local $3 i64) + (local $4 f64) + (local $5 i32) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $0 + i64.reinterpret_f64 + local.tee $3 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $2 + i32.const 1048576 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $2 + i32.const 31 + i32.shr_u + end + if + local.get $3 + i64.const 1 + i64.shl + i64.const 0 + i64.eq + if + f64.const -1 + local.get $0 + local.get $0 + f64.mul + f64.div + return + end + local.get $2 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.div + return + end + i32.const -54 + local.set $5 + local.get $0 + f64.const 18014398509481984 + f64.mul + i64.reinterpret_f64 + local.tee $3 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $2 + else + local.get $2 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + return + else + local.get $3 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $2 + i32.const 1072693248 + i32.eq + select + if + f64.const 0 + return + end + end + end + local.get $3 + i64.const 4294967295 + i64.and + local.get $2 + i32.const 614242 + i32.add + local.tee $2 + i32.const 1048575 + i32.and + i32.const 1072079006 + i32.add + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + f64.reinterpret_i64 + f64.const 1 + f64.sub + local.tee $1 + f64.const 2 + local.get $1 + f64.add + f64.div + local.tee $6 + local.get $6 + f64.mul + local.tee $7 + local.get $7 + f64.mul + local.set $0 + local.get $2 + i32.const 20 + i32.shr_u + i32.const 1023 + i32.sub + local.get $5 + i32.add + f64.convert_i32_s + local.tee $4 + f64.const 0.30102999566361177 + f64.mul + local.set $8 + local.get $4 + f64.const 3.694239077158931e-13 + f64.mul + local.get $1 + local.get $1 + f64.const 0.5 + local.get $1 + f64.mul + local.get $1 + f64.mul + local.tee $1 + f64.sub + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.tee $4 + f64.sub + local.get $1 + f64.sub + local.get $6 + local.get $1 + local.get $7 + f64.const 0.6666666666666735 + local.get $0 + f64.const 0.2857142874366239 + local.get $0 + f64.const 0.1818357216161805 + local.get $0 + f64.const 0.14798198605116586 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $0 + f64.const 0.3999999999940942 + local.get $0 + f64.const 0.22222198432149784 + local.get $0 + f64.const 0.15313837699209373 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.add + f64.mul + f64.add + local.tee $0 + local.get $4 + f64.add + f64.const 2.5082946711645275e-11 + f64.mul + f64.add + local.get $0 + f64.const 0.4342944818781689 + f64.mul + f64.add + local.get $8 + local.get $8 + local.get $4 + f64.const 0.4342944818781689 + f64.mul + local.tee $0 + f64.add + local.tee $1 + f64.sub + local.get $0 + f64.add + f64.add + local.get $1 + f64.add + ) + (func $assembly/libm/log10 (; 42 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.log10 + ) + (func $assembly/libm/log1p (; 43 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.log1p + ) + (func $~lib/math/NativeMath.log2 (; 44 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 f64) + (local $2 i32) + (local $3 i64) + (local $4 f64) + (local $5 f64) + (local $6 i32) + (local $7 f64) + local.get $0 + i64.reinterpret_f64 + local.tee $3 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $2 + i32.const 1048576 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $2 + i32.const 31 + i32.shr_u + end + if + local.get $3 + i64.const 1 + i64.shl + i64.const 0 + i64.eq + if + f64.const -1 + local.get $0 + local.get $0 + f64.mul + f64.div + return + end + local.get $2 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.div + return + end + i32.const -54 + local.set $6 + local.get $0 + f64.const 18014398509481984 + f64.mul + i64.reinterpret_f64 + local.tee $3 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $2 + else + local.get $2 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + return + else + local.get $3 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $2 + i32.const 1072693248 + i32.eq + select + if + f64.const 0 + return + end + end + end + local.get $3 + i64.const 4294967295 + i64.and + local.get $2 + i32.const 614242 + i32.add + local.tee $2 + i32.const 1048575 + i32.and + i32.const 1072079006 + i32.add + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + f64.reinterpret_i64 + f64.const 1 + f64.sub + local.tee $1 + f64.const 2 + local.get $1 + f64.add + f64.div + local.tee $4 + local.get $4 + f64.mul + local.tee $5 + local.get $5 + f64.mul + local.set $0 + local.get $1 + local.get $1 + f64.const 0.5 + local.get $1 + f64.mul + local.get $1 + f64.mul + local.tee $1 + f64.sub + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.tee $7 + f64.sub + local.get $1 + f64.sub + local.get $4 + local.get $1 + local.get $5 + f64.const 0.6666666666666735 + local.get $0 + f64.const 0.2857142874366239 + local.get $0 + f64.const 0.1818357216161805 + local.get $0 + f64.const 0.14798198605116586 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $0 + f64.const 0.3999999999940942 + local.get $0 + f64.const 0.22222198432149784 + local.get $0 + f64.const 0.15313837699209373 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.add + f64.mul + f64.add + local.set $0 + local.get $2 + i32.const 20 + i32.shr_u + i32.const 1023 + i32.sub + local.get $6 + i32.add + f64.convert_i32_s + local.tee $4 + local.get $7 + f64.const 1.4426950407214463 + f64.mul + local.tee $5 + f64.add + local.set $1 + local.get $0 + local.get $7 + f64.add + f64.const 1.6751713164886512e-10 + f64.mul + local.get $0 + f64.const 1.4426950407214463 + f64.mul + f64.add + local.get $4 + local.get $1 + f64.sub + local.get $5 + f64.add + f64.add + local.get $1 + f64.add + ) + (func $assembly/libm/log2 (; 45 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.log2 + ) + (func $assembly/libm/max (; 46 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + local.get $0 + local.get $1 + f64.max + ) + (func $assembly/libm/min (; 47 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + local.get $0 + local.get $1 + f64.min + ) + (func $~lib/math/NativeMath.pow (; 48 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (local $2 f64) + (local $3 f64) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 f64) + (local $8 i32) + (local $9 i32) + (local $10 f64) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 f64) + (local $15 f64) + (local $16 i64) + (local $17 i32) + (local $18 f64) + (local $19 i32) + (local $20 f64) + local.get $0 + i64.reinterpret_f64 + local.tee $16 + i32.wrap_i64 + local.set $19 + local.get $16 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $17 + i32.const 2147483647 + i32.and + local.set $4 + local.get $1 + i64.reinterpret_f64 + local.tee $16 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $9 + i32.const 2147483647 + i32.and + local.set $8 + local.get $8 + local.get $16 + i32.wrap_i64 + local.tee $6 + i32.or + i32.eqz + if + f64.const 1 + return + end + i32.const 1 + local.get $8 + i32.const 2146435072 + i32.gt_s + local.get $4 + i32.const 2146435072 + i32.gt_s + if (result i32) + i32.const 1 + else + local.get $19 + i32.const 0 + i32.ne + i32.const 0 + local.get $4 + i32.const 2146435072 + i32.eq + select + end + select + if (result i32) + i32.const 1 + else + local.get $6 + i32.const 0 + i32.ne + i32.const 0 + local.get $8 + i32.const 2146435072 + i32.eq + select + end + if + local.get $0 + local.get $1 + f64.add + return + end + local.get $17 + i32.const 0 + i32.lt_s + if + local.get $8 + i32.const 1128267776 + i32.ge_s + if (result i32) + i32.const 2 + else + local.get $8 + i32.const 1072693248 + i32.ge_s + if (result i32) + local.get $6 + local.get $8 + local.get $8 + i32.const 20 + i32.shr_s + i32.const 1023 + i32.sub + local.tee $12 + i32.const 20 + i32.gt_s + local.tee $13 + select + local.tee $5 + local.get $5 + i32.const 52 + i32.const 20 + local.get $13 + select + local.get $12 + i32.sub + local.tee $13 + i32.shr_s + local.tee $5 + local.get $13 + i32.shl + i32.eq + if (result i32) + i32.const 2 + local.get $5 + i32.const 1 + i32.and + i32.sub + else + i32.const 0 + end + else + i32.const 0 + end + end + local.set $11 + end + local.get $6 + i32.eqz + if + local.get $8 + i32.const 2146435072 + i32.eq + if + local.get $4 + i32.const 1072693248 + i32.sub + local.get $19 + i32.or + if + local.get $4 + i32.const 1072693248 + i32.ge_s + if + local.get $9 + i32.const 0 + i32.lt_s + if + f64.const 0 + local.set $1 + end + local.get $1 + return + else + f64.const 0 + local.get $1 + f64.neg + local.get $9 + i32.const 0 + i32.ge_s + select + return + end + unreachable + else + f64.const nan:0x8000000000000 + return + end + unreachable + end + local.get $8 + i32.const 1072693248 + i32.eq + if + local.get $9 + i32.const 0 + i32.ge_s + if + local.get $0 + return + end + f64.const 1 + local.get $0 + f64.div + return + end + local.get $9 + i32.const 1073741824 + i32.eq + if + local.get $0 + local.get $0 + f64.mul + return + end + local.get $9 + i32.const 1071644672 + i32.eq + if + local.get $17 + i32.const 0 + i32.ge_s + if + local.get $0 + f64.sqrt + return + end + end + end + local.get $0 + f64.abs + local.set $3 + local.get $19 + i32.eqz + if + i32.const 1 + local.get $4 + i32.const 1072693248 + i32.eq + local.get $4 + i32.const 2146435072 + i32.eq + i32.const 1 + local.get $4 + select + select + if + f64.const 1 + local.get $3 + f64.div + local.get $3 + local.get $9 + i32.const 0 + i32.lt_s + select + local.set $3 + local.get $17 + i32.const 0 + i32.lt_s + if (result f64) + local.get $4 + i32.const 1072693248 + i32.sub + local.get $11 + i32.or + if (result f64) + local.get $3 + f64.neg + local.get $3 + local.get $11 + i32.const 1 + i32.eq + select + else + local.get $3 + local.get $3 + f64.sub + local.tee $0 + local.get $0 + f64.div + end + else + local.get $3 + end + return + end + end + f64.const 1 + local.set $7 + local.get $17 + i32.const 0 + i32.lt_s + if + local.get $11 + i32.eqz + if + local.get $0 + local.get $0 + f64.sub + local.tee $0 + local.get $0 + f64.div + return + end + f64.const -1 + f64.const 1 + local.get $11 + i32.const 1 + i32.eq + select + local.set $7 + end + local.get $8 + i32.const 1105199104 + i32.gt_s + if (result f64) + local.get $8 + i32.const 1139802112 + i32.gt_s + if + local.get $4 + i32.const 1072693247 + i32.le_s + if + f64.const inf + f64.const 0 + local.get $9 + i32.const 0 + i32.lt_s + select + return + end + local.get $4 + i32.const 1072693248 + i32.ge_s + if + f64.const inf + f64.const 0 + local.get $9 + i32.const 0 + i32.gt_s + select + return + end + end + local.get $4 + i32.const 1072693247 + i32.lt_s + if + local.get $9 + i32.const 0 + i32.lt_s + if (result f64) + local.get $7 + f64.const 1.e+300 + f64.mul + f64.const 1.e+300 + f64.mul + else + local.get $7 + f64.const 1e-300 + f64.mul + f64.const 1e-300 + f64.mul + end + return + end + local.get $4 + i32.const 1072693248 + i32.gt_s + if + local.get $9 + i32.const 0 + i32.gt_s + if (result f64) + local.get $7 + f64.const 1.e+300 + f64.mul + f64.const 1.e+300 + f64.mul + else + local.get $7 + f64.const 1e-300 + f64.mul + f64.const 1e-300 + f64.mul + end + return + end + local.get $3 + f64.const 1 + f64.sub + local.tee $2 + local.get $2 + f64.mul + f64.const 0.5 + local.get $2 + f64.const 0.3333333333333333 + local.get $2 + f64.const 0.25 + f64.mul + f64.sub + f64.mul + f64.sub + f64.mul + local.set $0 + f64.const 1.4426950216293335 + local.get $2 + f64.mul + local.tee $3 + local.get $2 + f64.const 1.9259629911266175e-08 + f64.mul + local.get $0 + f64.const 1.4426950408889634 + f64.mul + f64.sub + local.tee $0 + f64.add + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $10 + local.get $0 + local.get $10 + local.get $3 + f64.sub + f64.sub + else + i32.const 0 + local.set $6 + local.get $4 + i32.const 1048576 + i32.lt_s + if (result i32) + local.get $3 + f64.const 9007199254740992 + f64.mul + local.tee $3 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $4 + i32.const -53 + else + i32.const 0 + end + local.get $4 + i32.const 20 + i32.shr_s + i32.const 1023 + i32.sub + i32.add + local.set $6 + local.get $4 + i32.const 1048575 + i32.and + local.tee $5 + i32.const 1072693248 + i32.or + local.set $4 + local.get $5 + i32.const 235662 + i32.le_s + if (result i32) + i32.const 0 + else + local.get $5 + i32.const 767610 + i32.lt_s + if (result i32) + i32.const 1 + else + local.get $6 + i32.const 1 + i32.add + local.set $6 + local.get $4 + i32.const -1048576 + i32.add + local.set $4 + i32.const 0 + end + end + local.set $5 + local.get $3 + i64.reinterpret_f64 + i64.const 4294967295 + i64.and + local.get $4 + i64.extend_i32_s + i64.const 32 + i64.shl + i64.or + f64.reinterpret_i64 + local.tee $3 + f64.const 1.5 + f64.const 1 + local.get $5 + select + local.tee $0 + f64.sub + local.tee $10 + f64.const 1 + local.get $3 + local.get $0 + f64.add + f64.div + local.tee $2 + f64.mul + local.tee $18 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $14 + local.get $3 + local.get $4 + i32.const 1 + i32.shr_s + i32.const 536870912 + i32.or + i32.const 524288 + i32.add + local.get $5 + i32.const 18 + i32.shl + i32.add + i64.extend_i32_s + i64.const 32 + i64.shl + f64.reinterpret_i64 + local.tee $3 + local.get $0 + f64.sub + f64.sub + local.set $0 + f64.const 0.9617967009544373 + local.get $14 + f64.const 3 + local.get $14 + local.get $14 + f64.mul + local.tee $20 + f64.add + local.get $18 + local.get $18 + f64.mul + local.tee $15 + local.get $15 + f64.mul + f64.const 0.5999999999999946 + local.get $15 + f64.const 0.4285714285785502 + local.get $15 + f64.const 0.33333332981837743 + local.get $15 + f64.const 0.272728123808534 + local.get $15 + f64.const 0.23066074577556175 + local.get $15 + f64.const 0.20697501780033842 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $2 + local.get $10 + local.get $14 + local.get $3 + f64.mul + f64.sub + local.get $14 + local.get $0 + f64.mul + f64.sub + f64.mul + local.tee $2 + local.get $14 + local.get $18 + f64.add + f64.mul + f64.add + local.tee $0 + f64.add + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.tee $10 + f64.mul + local.tee $3 + local.get $2 + local.get $10 + f64.mul + local.get $0 + local.get $10 + f64.const 3 + f64.sub + local.get $20 + f64.sub + f64.sub + local.get $18 + f64.mul + f64.add + local.tee $0 + f64.add + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.tee $2 + f64.mul + local.tee $20 + f64.const -7.028461650952758e-09 + local.get $2 + f64.mul + local.get $0 + local.get $2 + local.get $3 + f64.sub + f64.sub + f64.const 0.9617966939259756 + f64.mul + f64.add + f64.const 1.350039202129749e-08 + f64.const 0 + local.get $5 + select + f64.add + local.tee $2 + f64.add + f64.const 0.5849624872207642 + f64.const 0 + local.get $5 + select + local.tee $3 + f64.add + local.get $6 + f64.convert_i32_s + local.tee $0 + f64.add + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $10 + local.get $2 + local.get $10 + local.get $0 + f64.sub + local.get $3 + f64.sub + local.get $20 + f64.sub + f64.sub + end + local.set $3 + local.get $1 + local.get $1 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.tee $0 + f64.sub + local.get $10 + f64.mul + local.get $1 + local.get $3 + f64.mul + f64.add + local.tee $1 + local.get $0 + local.get $10 + f64.mul + local.tee $2 + f64.add + local.tee $0 + i64.reinterpret_f64 + local.tee $16 + i32.wrap_i64 + local.set $5 + block $folding-inner1 + block $folding-inner0 + local.get $16 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $12 + i32.const 1083179008 + i32.ge_s + if + local.get $12 + i32.const 1083179008 + i32.sub + local.get $5 + i32.or + br_if $folding-inner0 + local.get $1 + f64.const 8.008566259537294e-17 + f64.add + local.get $0 + local.get $2 + f64.sub + f64.gt + br_if $folding-inner0 + else + local.get $12 + i32.const 2147483647 + i32.and + i32.const 1083231232 + i32.ge_s + if + local.get $12 + i32.const -1064252416 + i32.sub + local.get $5 + i32.or + br_if $folding-inner1 + local.get $1 + local.get $0 + local.get $2 + f64.sub + f64.le + br_if $folding-inner1 + end + end + local.get $12 + i32.const 2147483647 + i32.and + local.tee $13 + i32.const 20 + i32.shr_s + i32.const 1023 + i32.sub + local.set $5 + i32.const 0 + local.set $6 + local.get $13 + i32.const 1071644672 + i32.gt_s + if + i32.const 1048576 + local.get $5 + i32.const 1 + i32.add + i32.shr_s + local.get $12 + i32.add + local.tee $13 + i32.const 2147483647 + i32.and + i32.const 20 + i32.shr_s + i32.const 1023 + i32.sub + local.set $5 + i32.const 1048575 + local.get $5 + i32.shr_s + i32.const -1 + i32.xor + local.get $13 + i32.and + i64.extend_i32_s + i64.const 32 + i64.shl + f64.reinterpret_i64 + local.set $0 + local.get $13 + i32.const 1048575 + i32.and + i32.const 1048576 + i32.or + i32.const 20 + local.get $5 + i32.sub + i32.shr_s + local.set $6 + i32.const 0 + local.get $6 + i32.sub + local.get $6 + local.get $12 + i32.const 0 + i32.lt_s + select + local.set $6 + local.get $2 + local.get $0 + f64.sub + local.set $2 + end + local.get $1 + local.get $2 + f64.add + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.tee $0 + f64.const 0.6931471824645996 + f64.mul + local.tee $3 + local.get $1 + local.get $0 + local.get $2 + f64.sub + f64.sub + f64.const 0.6931471805599453 + f64.mul + local.get $0 + f64.const -1.904654299957768e-09 + f64.mul + f64.add + local.tee $1 + f64.add + local.tee $2 + local.get $2 + f64.mul + local.set $0 + local.get $7 + f64.const 1 + local.get $2 + local.get $2 + local.get $0 + f64.const 0.16666666666666602 + local.get $0 + f64.const -2.7777777777015593e-03 + local.get $0 + f64.const 6.613756321437934e-05 + local.get $0 + f64.const -1.6533902205465252e-06 + local.get $0 + f64.const 4.1381367970572385e-08 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.sub + local.tee $0 + f64.mul + local.get $0 + f64.const 2 + f64.sub + f64.div + local.get $1 + local.get $2 + local.get $3 + f64.sub + f64.sub + local.tee $0 + local.get $2 + local.get $0 + f64.mul + f64.add + f64.sub + local.get $2 + f64.sub + f64.sub + local.tee $0 + i64.reinterpret_f64 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.get $6 + i32.const 20 + i32.shl + i32.add + local.tee $5 + i32.const 20 + i32.shr_s + i32.const 0 + i32.le_s + if (result f64) + local.get $0 + local.get $6 + call $~lib/math/NativeMath.scalbn + else + local.get $0 + i64.reinterpret_f64 + i64.const 4294967295 + i64.and + local.get $5 + i64.extend_i32_s + i64.const 32 + i64.shl + i64.or + f64.reinterpret_i64 + end + f64.mul + return + end + local.get $7 + f64.const 1.e+300 + f64.mul + f64.const 1.e+300 + f64.mul + return + end + local.get $7 + f64.const 1e-300 + f64.mul + f64.const 1e-300 + f64.mul + ) + (func $assembly/libm/pow (; 49 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + local.get $0 + local.get $1 + call $~lib/math/NativeMath.pow + ) + (func $assembly/libm/round (; 50 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + f64.const 0.5 + f64.add + f64.floor + local.get $0 + f64.copysign + ) + (func $assembly/libm/sign (; 51 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + f64.const 0 + f64.gt + if + f64.const 1 + local.set $0 + else + local.get $0 + f64.const 0 + f64.lt + if + f64.const -1 + local.set $0 + end + end + local.get $0 + ) + (func $assembly/libm/sin (; 52 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/bindings/Math/sin + ) + (func $~lib/math/NativeMath.sinh (; 53 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 i32) + (local $4 i64) + local.get $0 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $4 + f64.reinterpret_i64 + local.set $1 + f64.const 0.5 + local.get $0 + f64.copysign + local.set $2 + local.get $4 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $3 + i32.const 1082535490 + i32.lt_u + if + local.get $1 + call $~lib/math/NativeMath.expm1 + local.set $1 + local.get $3 + i32.const 1072693248 + i32.lt_u + if + local.get $3 + i32.const 1045430272 + i32.lt_u + if + local.get $0 + return + end + local.get $2 + f64.const 2 + local.get $1 + f64.mul + local.get $1 + local.get $1 + f64.mul + local.get $1 + f64.const 1 + f64.add + f64.div + f64.sub + f64.mul + return + end + local.get $2 + local.get $1 + local.get $1 + local.get $1 + f64.const 1 + f64.add + f64.div + f64.add + f64.mul + return + end + f64.const 2 + local.get $2 + f64.mul + local.get $1 + f64.const 1416.0996898839683 + f64.sub + call $~lib/math/NativeMath.exp + f64.const 2247116418577894884661631e283 + f64.mul + f64.const 2247116418577894884661631e283 + f64.mul + f64.mul + ) + (func $assembly/libm/sinh (; 54 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.sinh + ) + (func $assembly/libm/sqrt (; 55 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + f64.sqrt + ) + (func $assembly/libm/tan (; 56 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/bindings/Math/tan + ) + (func $~lib/math/NativeMath.tanh (; 57 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 f64) + (local $2 i32) + (local $3 i64) + local.get $0 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $3 + f64.reinterpret_i64 + local.set $1 + local.get $3 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $2 + i32.const 1071748074 + i32.gt_u + if + local.get $2 + i32.const 1077149696 + i32.gt_u + if (result f64) + f64.const 1 + f64.const 0 + local.get $1 + f64.div + f64.sub + else + f64.const 1 + f64.const 2 + f64.const 2 + local.get $1 + f64.mul + call $~lib/math/NativeMath.expm1 + f64.const 2 + f64.add + f64.div + f64.sub + end + local.set $1 + else + local.get $2 + i32.const 1070618798 + i32.gt_u + if + f64.const 2 + local.get $1 + f64.mul + call $~lib/math/NativeMath.expm1 + local.tee $1 + local.get $1 + f64.const 2 + f64.add + f64.div + local.set $1 + else + local.get $2 + i32.const 1048576 + i32.ge_u + if + f64.const -2 + local.get $1 + f64.mul + call $~lib/math/NativeMath.expm1 + local.tee $1 + f64.neg + local.get $1 + f64.const 2 + f64.add + f64.div + local.set $1 + end + end + end + local.get $1 + local.get $0 + f64.copysign + ) + (func $assembly/libm/tanh (; 58 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.tanh + ) + (func $assembly/libm/trunc (; 59 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + f64.trunc + ) + (func $null (; 60 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/lib/libm/build/libmf.wat b/lib/libm/build/libmf.wat new file mode 100644 index 00000000..6841cb6a --- /dev/null +++ b/lib/libm/build/libmf.wat @@ -0,0 +1,4763 @@ +(module + (type $FUNCSIG$ff (func (param f32) (result f32))) + (type $FUNCSIG$fff (func (param f32 f32) (result f32))) + (type $FUNCSIG$ffi (func (param f32 i32) (result f32))) + (type $FUNCSIG$v (func)) + (memory $0 1) + (data (i32.const 8) " \00\00\00\01\00\00\00\00\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") + (data (i32.const 56) "\10\00\00\00\01\00\00\00\03\00\00\00\10\00\00\00\18\00\00\00\18\00\00\00 \00\00\00\04") + (global $assembly/libmf/E f32 (f32.const 2.7182817459106445)) + (global $assembly/libmf/LN10 f32 (f32.const 2.3025851249694824)) + (global $assembly/libmf/LN2 f32 (f32.const 0.6931471824645996)) + (global $assembly/libmf/LOG10E f32 (f32.const 0.4342944920063019)) + (global $assembly/libmf/LOG2E f32 (f32.const 1.4426950216293335)) + (global $assembly/libmf/PI f32 (f32.const 3.1415927410125732)) + (global $assembly/libmf/SQRT1_2 f32 (f32.const 0.7071067690849304)) + (global $assembly/libmf/SQRT2 f32 (f32.const 1.4142135381698608)) + (global $~lib/math/rempio2f_y (mut f64) (f64.const 0)) + (export "memory" (memory $0)) + (export "E" (global $assembly/libmf/E)) + (export "LN10" (global $assembly/libmf/LN10)) + (export "LN2" (global $assembly/libmf/LN2)) + (export "LOG10E" (global $assembly/libmf/LOG10E)) + (export "LOG2E" (global $assembly/libmf/LOG2E)) + (export "PI" (global $assembly/libmf/PI)) + (export "SQRT1_2" (global $assembly/libmf/SQRT1_2)) + (export "SQRT2" (global $assembly/libmf/SQRT2)) + (export "abs" (func $assembly/libmf/abs)) + (export "acos" (func $assembly/libmf/acos)) + (export "acosh" (func $assembly/libmf/acosh)) + (export "asin" (func $assembly/libmf/asin)) + (export "asinh" (func $assembly/libmf/asinh)) + (export "atan" (func $assembly/libmf/atan)) + (export "atanh" (func $assembly/libmf/atanh)) + (export "atan2" (func $assembly/libmf/atan2)) + (export "cbrt" (func $assembly/libmf/cbrt)) + (export "ceil" (func $assembly/libmf/ceil)) + (export "clz32" (func $assembly/libmf/clz32)) + (export "cos" (func $assembly/libmf/cos)) + (export "cosh" (func $assembly/libmf/cosh)) + (export "exp" (func $assembly/libmf/exp)) + (export "expm1" (func $assembly/libmf/expm1)) + (export "floor" (func $assembly/libmf/floor)) + (export "fround" (func $assembly/libmf/fround)) + (export "hypot" (func $assembly/libmf/hypot)) + (export "imul" (func $assembly/libmf/imul)) + (export "log" (func $assembly/libmf/log)) + (export "log10" (func $assembly/libmf/log10)) + (export "log1p" (func $assembly/libmf/log1p)) + (export "log2" (func $assembly/libmf/log2)) + (export "max" (func $assembly/libmf/max)) + (export "min" (func $assembly/libmf/min)) + (export "pow" (func $assembly/libmf/pow)) + (export "round" (func $assembly/libmf/round)) + (export "sign" (func $assembly/libmf/sign)) + (export "sin" (func $assembly/libmf/sin)) + (export "sinh" (func $assembly/libmf/sinh)) + (export "sqrt" (func $assembly/libmf/sqrt)) + (export "tan" (func $assembly/libmf/tan)) + (export "tanh" (func $assembly/libmf/tanh)) + (export "trunc" (func $assembly/libmf/trunc)) + (func $assembly/libmf/abs (; 0 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.abs + ) + (func $~lib/math/NativeMathf.acos (; 1 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $3 + i32.const 2147483647 + i32.and + local.tee $2 + i32.const 1065353216 + i32.ge_u + if + local.get $2 + i32.const 1065353216 + i32.eq + if + local.get $3 + i32.const 31 + i32.shr_u + if + f32.const 3.141592502593994 + return + end + f32.const 0 + return + end + f32.const 0 + local.get $0 + local.get $0 + f32.sub + f32.div + return + end + local.get $2 + i32.const 1056964608 + i32.lt_u + if + local.get $2 + i32.const 847249408 + i32.le_u + if + f32.const 1.570796251296997 + return + end + f32.const 1.570796251296997 + local.get $0 + f32.const 7.549789415861596e-08 + local.get $0 + local.get $0 + local.get $0 + f32.mul + local.tee $0 + f32.const 0.16666586697101593 + local.get $0 + f32.const -0.04274342209100723 + local.get $0 + f32.const -0.008656363002955914 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.const 1 + local.get $0 + f32.const -0.7066296339035034 + f32.mul + f32.add + f32.div + f32.mul + f32.sub + f32.sub + f32.sub + return + end + local.get $3 + i32.const 31 + i32.shr_u + if + f32.const 0.5 + local.get $0 + f32.const 0.5 + f32.mul + f32.add + local.tee $0 + f32.const 0.16666586697101593 + local.get $0 + f32.const -0.04274342209100723 + local.get $0 + f32.const -0.008656363002955914 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.const 1 + local.get $0 + f32.const -0.7066296339035034 + f32.mul + f32.add + f32.div + local.set $1 + f32.const 2 + f32.const 1.570796251296997 + local.get $0 + f32.sqrt + local.tee $0 + local.get $1 + local.get $0 + f32.mul + f32.const 7.549789415861596e-08 + f32.sub + f32.add + f32.sub + f32.mul + return + end + f32.const 2 + f32.const 0.5 + local.get $0 + f32.const 0.5 + f32.mul + f32.sub + local.tee $0 + f32.sqrt + local.tee $4 + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $1 + local.get $0 + f32.const 0.16666586697101593 + local.get $0 + f32.const -0.04274342209100723 + local.get $0 + f32.const -0.008656363002955914 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.const 1 + local.get $0 + f32.const -0.7066296339035034 + f32.mul + f32.add + f32.div + local.get $4 + f32.mul + local.get $0 + local.get $1 + local.get $1 + f32.mul + f32.sub + local.get $4 + local.get $1 + f32.add + f32.div + f32.add + f32.add + f32.mul + ) + (func $assembly/libmf/acos (; 2 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.acos + ) + (func $~lib/math/NativeMathf.log1p (; 3 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + i32.const 1 + local.set $3 + local.get $0 + i32.reinterpret_f32 + local.tee $2 + i32.const 1054086096 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $2 + i32.const 31 + i32.shr_u + end + if + local.get $2 + i32.const -1082130432 + i32.ge_u + if + local.get $0 + f32.const -1 + f32.eq + if + local.get $0 + f32.const 0 + f32.div + return + end + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.div + return + end + local.get $2 + i32.const 1 + i32.shl + i32.const 1728053248 + i32.lt_u + if + local.get $0 + return + end + local.get $2 + i32.const -1097468391 + i32.le_u + if + i32.const 0 + local.set $3 + local.get $0 + local.set $1 + end + else + local.get $2 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + return + end + end + local.get $3 + if + f32.const 1 + local.get $0 + f32.add + local.tee $1 + i32.reinterpret_f32 + i32.const 4913933 + i32.add + local.tee $2 + i32.const 23 + i32.shr_u + i32.const 127 + i32.sub + local.tee $3 + i32.const 25 + i32.lt_s + if (result f32) + f32.const 1 + local.get $1 + local.get $0 + f32.sub + f32.sub + local.get $0 + local.get $1 + f32.const 1 + f32.sub + f32.sub + local.get $3 + i32.const 2 + i32.ge_s + select + local.get $1 + f32.div + else + f32.const 0 + end + local.set $5 + local.get $2 + i32.const 8388607 + i32.and + i32.const 1060439283 + i32.add + f32.reinterpret_i32 + f32.const 1 + f32.sub + local.set $1 + end + local.get $1 + f32.const 2 + local.get $1 + f32.add + f32.div + local.tee $4 + local.get $4 + f32.mul + local.tee $6 + local.get $6 + f32.mul + local.set $0 + local.get $4 + f32.const 0.5 + local.get $1 + f32.mul + local.get $1 + f32.mul + local.tee $4 + local.get $6 + f32.const 0.6666666269302368 + local.get $0 + f32.const 0.2849878668785095 + f32.mul + f32.add + f32.mul + local.get $0 + f32.const 0.40000972151756287 + local.get $0 + f32.const 0.24279078841209412 + f32.mul + f32.add + f32.mul + f32.add + f32.add + f32.mul + local.get $3 + f32.convert_i32_s + local.tee $0 + f32.const 9.05800061445916e-06 + f32.mul + local.get $5 + f32.add + f32.add + local.get $4 + f32.sub + local.get $1 + f32.add + local.get $0 + f32.const 0.6931381225585938 + f32.mul + f32.add + ) + (func $~lib/math/NativeMathf.log (; 4 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + (local $4 i32) + (local $5 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $1 + i32.const 8388608 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 31 + i32.shr_u + end + if + local.get $1 + i32.const 1 + i32.shl + i32.eqz + if + f32.const -1 + local.get $0 + local.get $0 + f32.mul + f32.div + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.div + return + end + i32.const -25 + local.set $4 + local.get $0 + f32.const 33554432 + f32.mul + i32.reinterpret_f32 + local.set $1 + else + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + return + else + local.get $1 + i32.const 1065353216 + i32.eq + if + f32.const 0 + return + end + end + end + local.get $1 + i32.const 4913933 + i32.add + local.tee $1 + i32.const 8388607 + i32.and + i32.const 1060439283 + i32.add + f32.reinterpret_i32 + f32.const 1 + f32.sub + local.tee $0 + f32.const 2 + local.get $0 + f32.add + f32.div + local.tee $3 + local.get $3 + f32.mul + local.tee $5 + local.get $5 + f32.mul + local.set $2 + local.get $3 + f32.const 0.5 + local.get $0 + f32.mul + local.get $0 + f32.mul + local.tee $3 + local.get $5 + f32.const 0.6666666269302368 + local.get $2 + f32.const 0.2849878668785095 + f32.mul + f32.add + f32.mul + local.get $2 + f32.const 0.40000972151756287 + local.get $2 + f32.const 0.24279078841209412 + f32.mul + f32.add + f32.mul + f32.add + f32.add + f32.mul + local.get $1 + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + local.get $4 + i32.add + f32.convert_i32_s + local.tee $2 + f32.const 9.05800061445916e-06 + f32.mul + f32.add + local.get $3 + f32.sub + local.get $0 + f32.add + local.get $2 + f32.const 0.6931381225585938 + f32.mul + f32.add + ) + (func $~lib/math/NativeMathf.acosh (; 5 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + f32.const 1 + f32.sub + local.tee $0 + local.get $0 + local.get $0 + f32.const 2 + f32.add + f32.mul + f32.sqrt + f32.add + call $~lib/math/NativeMathf.log1p + return + end + local.get $1 + i32.const 1166016512 + i32.lt_u + if + f32.const 2 + local.get $0 + f32.mul + f32.const 1 + local.get $0 + local.get $0 + local.get $0 + f32.mul + f32.const 1 + f32.sub + f32.sqrt + f32.add + f32.div + f32.sub + call $~lib/math/NativeMathf.log + return + end + local.get $0 + call $~lib/math/NativeMathf.log + f32.const 0.6931471824645996 + f32.add + ) + (func $assembly/libmf/acosh (; 6 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.acosh + ) + (func $~lib/math/NativeMathf.asin (; 7 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + (local $4 f64) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1065353216 + i32.ge_u + if + local.get $1 + i32.const 1065353216 + i32.eq + if + local.get $0 + f32.const 1.5707963705062866 + f32.mul + f32.const 7.52316384526264e-37 + f32.add + return + end + f32.const 0 + local.get $0 + local.get $0 + f32.sub + f32.div + return + end + local.get $1 + i32.const 1056964608 + i32.lt_u + if + local.get $1 + i32.const 8388608 + i32.ge_u + i32.const 0 + local.get $1 + i32.const 964689920 + i32.lt_u + select + if + local.get $0 + return + end + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f32.mul + local.tee $0 + f32.const 0.16666586697101593 + local.get $0 + f32.const -0.04274342209100723 + local.get $0 + f32.const -0.008656363002955914 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.const 1 + local.get $0 + f32.const -0.7066296339035034 + f32.mul + f32.add + f32.div + f32.mul + f32.add + return + end + f32.const 0.5 + local.get $0 + f32.abs + f32.const 0.5 + f32.mul + f32.sub + local.tee $2 + f32.const 0.16666586697101593 + local.get $2 + f32.const -0.04274342209100723 + local.get $2 + f32.const -0.008656363002955914 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.const 1 + local.get $2 + f32.const -0.7066296339035034 + f32.mul + f32.add + f32.div + local.set $3 + f64.const 1.5707963705062866 + f64.const 2 + local.get $2 + f64.promote_f32 + f64.sqrt + local.tee $4 + local.get $4 + local.get $3 + f64.promote_f32 + f64.mul + f64.add + f64.mul + f64.sub + f32.demote_f64 + local.get $0 + f32.copysign + ) + (func $assembly/libmf/asin (; 8 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.asin + ) + (func $~lib/math/NativeMathf.asinh (; 9 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $2 + f32.reinterpret_i32 + local.set $1 + local.get $2 + i32.const 1166016512 + i32.ge_u + if (result f32) + local.get $1 + call $~lib/math/NativeMathf.log + f32.const 0.6931471824645996 + f32.add + else + local.get $2 + i32.const 1073741824 + i32.ge_u + if (result f32) + f32.const 2 + local.get $1 + f32.mul + f32.const 1 + local.get $1 + local.get $1 + f32.mul + f32.const 1 + f32.add + f32.sqrt + local.get $1 + f32.add + f32.div + f32.add + call $~lib/math/NativeMathf.log + else + local.get $2 + i32.const 964689920 + i32.ge_u + if (result f32) + local.get $1 + local.get $1 + local.get $1 + f32.mul + local.tee $1 + local.get $1 + f32.const 1 + f32.add + f32.sqrt + f32.const 1 + f32.add + f32.div + f32.add + call $~lib/math/NativeMathf.log1p + else + local.get $1 + end + end + end + local.get $0 + f32.copysign + ) + (func $assembly/libmf/asinh (; 10 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.asinh + ) + (func $~lib/math/NativeMathf.atan (; 11 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + (local $4 f32) + local.get $0 + local.set $3 + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1283457024 + i32.ge_u + if + local.get $0 + local.get $0 + f32.ne + if + local.get $0 + return + end + f32.const 1.570796251296997 + local.get $3 + f32.copysign + return + end + local.get $1 + i32.const 1054867456 + i32.lt_u + if + local.get $1 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + i32.const -1 + local.set $1 + else + local.get $0 + f32.abs + local.set $0 + local.get $1 + i32.const 1066926080 + i32.lt_u + if (result f32) + local.get $1 + i32.const 1060110336 + i32.lt_u + if (result f32) + i32.const 0 + local.set $1 + f32.const 2 + local.get $0 + f32.mul + f32.const 1 + f32.sub + f32.const 2 + local.get $0 + f32.add + f32.div + else + i32.const 1 + local.set $1 + local.get $0 + f32.const 1 + f32.sub + local.get $0 + f32.const 1 + f32.add + f32.div + end + else + local.get $1 + i32.const 1075576832 + i32.lt_u + if (result f32) + i32.const 2 + local.set $1 + local.get $0 + f32.const 1.5 + f32.sub + f32.const 1 + f32.const 1.5 + local.get $0 + f32.mul + f32.add + f32.div + else + i32.const 3 + local.set $1 + f32.const -1 + local.get $0 + f32.div + end + end + local.set $0 + end + local.get $0 + local.get $0 + f32.mul + local.tee $4 + local.get $4 + f32.mul + local.set $2 + local.get $0 + local.get $4 + f32.const 0.333333283662796 + local.get $2 + f32.const 0.14253635704517365 + local.get $2 + f32.const 0.06168760731816292 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + local.get $2 + f32.const -0.19999158382415771 + local.get $2 + f32.const -0.106480173766613 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + local.set $2 + local.get $1 + i32.const 0 + i32.lt_s + if + local.get $0 + local.get $2 + f32.sub + return + end + block $break|0 + block $case4|0 + block $case3|0 + block $case2|0 + block $case1|0 + local.get $1 + if + local.get $1 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $case4|0 + end + f32.const 0.46364760398864746 + local.get $2 + f32.const 5.01215824399992e-09 + f32.sub + local.get $0 + f32.sub + f32.sub + local.set $0 + br $break|0 + end + f32.const 0.7853981256484985 + local.get $2 + f32.const 3.774894707930798e-08 + f32.sub + local.get $0 + f32.sub + f32.sub + local.set $0 + br $break|0 + end + f32.const 0.9827936887741089 + local.get $2 + f32.const 3.447321716976148e-08 + f32.sub + local.get $0 + f32.sub + f32.sub + local.set $0 + br $break|0 + end + f32.const 1.570796251296997 + local.get $2 + f32.const 7.549789415861596e-08 + f32.sub + local.get $0 + f32.sub + f32.sub + local.set $0 + br $break|0 + end + unreachable + end + local.get $0 + local.get $3 + f32.copysign + ) + (func $assembly/libmf/atan (; 12 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.atan + ) + (func $~lib/math/NativeMathf.atanh (; 13 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $2 + f32.reinterpret_i32 + local.set $1 + local.get $2 + i32.const 1056964608 + i32.lt_u + if (result f32) + local.get $2 + i32.const 796917760 + i32.ge_u + if (result f32) + f32.const 0.5 + f32.const 2 + local.get $1 + f32.mul + f32.const 1 + local.get $1 + f32.const 1 + local.get $1 + f32.sub + f32.div + f32.add + f32.mul + call $~lib/math/NativeMathf.log1p + f32.mul + else + local.get $1 + end + else + f32.const 0.5 + f32.const 2 + local.get $1 + f32.const 1 + local.get $1 + f32.sub + f32.div + f32.mul + call $~lib/math/NativeMathf.log1p + f32.mul + end + local.get $0 + f32.copysign + ) + (func $assembly/libmf/atanh (; 14 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.atanh + ) + (func $~lib/math/NativeMathf.atan2 (; 15 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 + local.get $0 + local.get $0 + f32.ne + local.get $1 + local.get $1 + f32.ne + select + if + local.get $1 + local.get $0 + f32.add + return + end + local.get $0 + i32.reinterpret_f32 + local.set $3 + local.get $1 + i32.reinterpret_f32 + local.tee $4 + i32.const 1065353216 + i32.eq + if + local.get $0 + call $~lib/math/NativeMathf.atan + return + end + local.get $4 + i32.const 30 + i32.shr_u + i32.const 2 + i32.and + local.get $3 + i32.const 31 + i32.shr_u + i32.or + local.set $2 + local.get $4 + i32.const 2147483647 + i32.and + local.set $4 + local.get $3 + i32.const 2147483647 + i32.and + local.tee $3 + i32.eqz + if + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + local.get $2 + i32.eqz + br_if $case1|0 + block $tablify|0 + local.get $2 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $tablify|0 + end + br $break|0 + end + local.get $0 + return + end + f32.const 3.1415927410125732 + return + end + f32.const -3.1415927410125732 + return + end + end + block $folding-inner0 + local.get $4 + i32.eqz + br_if $folding-inner0 + local.get $4 + i32.const 2139095040 + i32.eq + if + local.get $3 + i32.const 2139095040 + i32.eq + if + block $break|1 + block $case3|1 + block $case2|1 + block $case1|1 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + br_table $case1|1 $case2|1 $case3|1 $break|1 + end + f32.const 0.7853981852531433 + return + end + f32.const -0.7853981852531433 + return + end + f32.const 2.356194496154785 + return + end + f32.const -2.356194496154785 + return + end + else + block $break|2 + block $case3|2 + block $case2|2 + block $case1|2 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + br_table $case1|2 $case2|2 $case3|2 $break|2 + end + f32.const 0 + return + end + f32.const 0 + return + end + f32.const 3.1415927410125732 + return + end + f32.const -3.1415927410125732 + return + end + end + end + i32.const 1 + local.get $3 + i32.const 2139095040 + i32.eq + local.get $4 + i32.const 218103808 + i32.add + local.get $3 + i32.lt_u + select + br_if $folding-inner0 + local.get $3 + i32.const 218103808 + i32.add + local.get $4 + i32.lt_u + i32.const 0 + local.get $2 + i32.const 2 + i32.and + select + if (result f32) + f32.const 0 + else + local.get $0 + local.get $1 + f32.div + f32.abs + call $~lib/math/NativeMathf.atan + end + local.set $0 + block $break|3 + block $case3|3 + block $case2|3 + block $case1|3 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + br_table $case1|3 $case2|3 $case3|3 $break|3 + end + local.get $0 + return + end + local.get $0 + f32.neg + return + end + f32.const 3.1415927410125732 + local.get $0 + f32.const -8.742277657347586e-08 + f32.sub + f32.sub + return + end + local.get $0 + f32.const -8.742277657347586e-08 + f32.sub + f32.const 3.1415927410125732 + f32.sub + return + end + unreachable + end + f32.const -1.5707963705062866 + f32.const 1.5707963705062866 + local.get $2 + i32.const 1 + i32.and + select + ) + (func $assembly/libmf/atan2 (; 16 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.atan2 + ) + (func $~lib/math/NativeMathf.cbrt (; 17 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f64) + (local $2 f64) + (local $3 i32) + (local $4 f64) + (local $5 i32) + (local $6 f64) + local.get $0 + i32.reinterpret_f32 + local.tee $5 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.add + return + end + local.get $3 + i32.const 8388608 + i32.lt_u + if (result i32) + local.get $3 + i32.eqz + if + local.get $0 + return + end + local.get $0 + f32.const 16777216 + f32.mul + i32.reinterpret_f32 + local.tee $5 + i32.const 2147483647 + i32.and + i32.const 3 + i32.div_u + i32.const 642849266 + i32.add + else + local.get $3 + i32.const 3 + i32.div_u + i32.const 709958130 + i32.add + end + local.get $5 + i32.const -2147483648 + i32.and + i32.or + f32.reinterpret_i32 + f64.promote_f32 + local.tee $1 + local.get $1 + f64.mul + local.get $1 + f64.mul + local.set $2 + local.get $1 + local.get $0 + f64.promote_f32 + local.tee $1 + local.get $1 + f64.add + local.tee $6 + local.get $2 + f64.add + f64.mul + local.get $1 + local.get $2 + f64.add + local.get $2 + f64.add + f64.div + local.tee $2 + local.get $2 + f64.mul + local.get $2 + f64.mul + local.set $4 + local.get $2 + local.get $6 + local.get $4 + f64.add + f64.mul + local.get $1 + local.get $4 + f64.add + local.get $4 + f64.add + f64.div + f32.demote_f64 + ) + (func $assembly/libmf/cbrt (; 18 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.cbrt + ) + (func $assembly/libmf/ceil (; 19 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.ceil + ) + (func $~lib/math/NativeMathf.clz32 (; 20 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.ne + if + f32.const 32 + return + end + local.get $0 + f32.const 4294967296 + local.get $0 + f32.const 2.3283064365386963e-10 + f32.mul + f32.floor + f32.mul + f32.sub + i64.trunc_f32_s + i32.wrap_i64 + i32.clz + f32.convert_i32_s + ) + (func $assembly/libmf/clz32 (; 21 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.clz32 + ) + (func $~lib/math/NativeMathf.cos (; 22 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f64) + (local $2 f64) + (local $3 i32) + (local $4 i64) + (local $5 i32) + (local $6 i32) + (local $7 f64) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 i64) + local.get $0 + i32.reinterpret_f32 + local.tee $3 + i32.const 31 + i32.shr_u + local.set $6 + block $folding-inner1 + block $folding-inner0 + local.get $3 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1061752794 + i32.le_u + if + local.get $3 + i32.const 964689920 + i32.lt_u + if + f32.const 1 + return + end + local.get $0 + f64.promote_f32 + local.tee $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + br $folding-inner0 + end + local.get $3 + i32.const 1081824209 + i32.le_u + if + local.get $3 + i32.const 1075235811 + i32.gt_u + if + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 3.141592653589793 + f64.add + local.get $1 + f64.const 3.141592653589793 + f64.sub + local.get $6 + select + local.tee $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + f32.neg + return + else + local.get $6 + if (result f64) + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.add + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + else + f64.const 1.5707963267948966 + local.get $0 + f64.promote_f32 + f64.sub + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + end + local.set $7 + br $folding-inner1 + end + unreachable + end + local.get $3 + i32.const 1088565717 + i32.le_u + if + local.get $3 + i32.const 1085271519 + i32.gt_u + if + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 6.283185307179586 + f64.add + local.get $1 + f64.const 6.283185307179586 + f64.sub + local.get $6 + select + local.tee $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + br $folding-inner0 + else + local.get $6 + if (result f64) + local.get $0 + f32.neg + f64.promote_f32 + f64.const 4.71238898038469 + f64.sub + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + else + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.sub + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + end + local.set $7 + br $folding-inner1 + end + unreachable + end + local.get $3 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + return + end + block $~lib/math/rempio2f|inlined.0 (result i32) + local.get $3 + i32.const 1305022427 + i32.lt_u + if + local.get $0 + f64.promote_f32 + local.tee $2 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $1 + local.get $2 + local.get $1 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $1 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $1 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.0 + end + i32.const 76 + i32.load + local.get $3 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.tee $5 + i32.const 6 + i32.shr_s + local.tee $9 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $10 + i32.const 76 + i32.load + local.get $9 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + i64.load + local.set $4 + local.get $5 + i32.const 63 + i32.and + local.tee $5 + i32.const 32 + i32.gt_s + if (result i64) + local.get $4 + local.get $5 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + i32.const 76 + i32.load + local.get $9 + i32.const 2 + i32.add + i32.const 3 + i32.shl + i32.add + i64.load + i64.const 96 + local.get $5 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + else + local.get $4 + i64.const 32 + local.get $5 + i64.extend_i32_s + i64.sub + i64.shr_u + end + local.set $8 + f64.const 8.515303950216386e-20 + local.get $0 + f64.promote_f32 + f64.copysign + local.get $3 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.tee $11 + local.get $4 + i64.const 64 + local.get $5 + i64.extend_i32_s + local.tee $4 + i64.sub + i64.shr_u + local.get $10 + local.get $4 + i64.shl + i64.or + i64.mul + local.get $8 + local.get $11 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $4 + i64.const 2 + i64.shl + local.tee $8 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + i32.const 0 + local.get $4 + i64.const 62 + i64.shr_u + local.get $8 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.tee $3 + i32.sub + local.get $3 + local.get $6 + select + end + local.set $3 + global.get $~lib/math/rempio2f_y + local.set $1 + local.get $3 + i32.const 1 + i32.and + if (result f32) + local.get $1 + local.get $1 + local.get $1 + f64.mul + local.tee $2 + local.get $1 + f64.mul + local.tee $1 + f64.const -0.16666666641626524 + local.get $2 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $1 + local.get $2 + local.get $2 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $2 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + else + local.get $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + end + local.set $0 + local.get $0 + f32.neg + local.get $0 + local.get $3 + i32.const 1 + i32.add + i32.const 2 + i32.and + select + return + end + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return + end + local.get $2 + local.get $7 + f64.const -0.16666666641626524 + local.get $1 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $7 + local.get $1 + local.get $1 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $1 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + ) + (func $assembly/libmf/cos (; 23 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.cos + ) + (func $~lib/math/NativeMathf.expm1 (; 24 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + (local $4 f32) + (local $5 i32) + (local $6 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $1 + i32.const 31 + i32.shr_u + local.set $5 + local.get $1 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1100331076 + i32.ge_u + if + local.get $1 + i32.const 2139095040 + i32.gt_u + if + local.get $0 + return + end + local.get $5 + if + f32.const -1 + return + end + local.get $0 + f32.const 88.7216796875 + f32.gt + if + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + return + end + end + local.get $1 + i32.const 1051816472 + i32.gt_u + if + local.get $0 + i32.const 1 + local.get $5 + i32.const 1 + i32.shl + i32.sub + f32.const 1.4426950216293335 + local.get $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.copysign + f32.add + i32.trunc_f32_s + local.get $1 + i32.const 1065686418 + i32.lt_u + select + local.tee $1 + f32.convert_i32_s + local.tee $0 + f32.const 0.6931381225585938 + f32.mul + f32.sub + local.tee $2 + local.get $2 + local.get $0 + f32.const 9.05800061445916e-06 + f32.mul + local.tee $2 + f32.sub + local.tee $0 + f32.sub + local.get $2 + f32.sub + local.set $4 + else + local.get $1 + i32.const 855638016 + i32.lt_u + if (result i32) + local.get $0 + return + else + i32.const 0 + end + local.set $1 + end + f32.const 3 + f32.const 1 + local.get $0 + f32.const 0.5 + local.get $0 + f32.mul + local.tee $3 + f32.mul + local.tee $2 + f32.const -0.03333321213722229 + local.get $2 + f32.const 1.5807170420885086e-03 + f32.mul + f32.add + f32.mul + f32.add + local.tee $6 + local.get $3 + f32.mul + f32.sub + local.set $3 + local.get $2 + local.get $6 + local.get $3 + f32.sub + f32.const 6 + local.get $0 + local.get $3 + f32.mul + f32.sub + f32.div + f32.mul + local.set $3 + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + local.get $3 + f32.mul + local.get $2 + f32.sub + f32.sub + return + end + local.get $0 + local.get $3 + local.get $4 + f32.sub + f32.mul + local.get $4 + f32.sub + local.get $2 + f32.sub + local.set $2 + local.get $1 + i32.const -1 + i32.eq + if + f32.const 0.5 + local.get $0 + local.get $2 + f32.sub + f32.mul + f32.const 0.5 + f32.sub + return + end + local.get $1 + i32.const 1 + i32.eq + if + local.get $0 + f32.const -0.25 + f32.lt + if + f32.const -2 + local.get $2 + local.get $0 + f32.const 0.5 + f32.add + f32.sub + f32.mul + return + end + f32.const 1 + f32.const 2 + local.get $0 + local.get $2 + f32.sub + f32.mul + f32.add + return + end + local.get $1 + i32.const 127 + i32.add + i32.const 23 + i32.shl + f32.reinterpret_i32 + local.set $4 + i32.const 1 + local.get $1 + i32.const 56 + i32.gt_s + local.get $1 + i32.const 0 + i32.lt_s + select + if + local.get $0 + local.get $2 + f32.sub + f32.const 1 + f32.add + local.set $0 + local.get $1 + i32.const 128 + i32.eq + if (result f32) + local.get $0 + f32.const 2 + f32.mul + f32.const 1701411834604692317316873e14 + f32.mul + else + local.get $0 + local.get $4 + f32.mul + end + f32.const 1 + f32.sub + return + end + i32.const 127 + local.get $1 + i32.sub + i32.const 23 + i32.shl + f32.reinterpret_i32 + local.set $3 + local.get $0 + f32.const 1 + local.get $3 + f32.sub + local.get $2 + f32.sub + f32.const 1 + local.get $2 + local.get $3 + f32.add + f32.sub + local.get $1 + i32.const 20 + i32.lt_s + select + f32.add + local.get $4 + f32.mul + ) + (func $~lib/math/NativeMathf.scalbn (; 25 ;) (type $FUNCSIG$ffi) (param $0 f32) (param $1 i32) (result f32) + local.get $1 + i32.const 127 + i32.gt_s + if (result f32) + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + local.set $0 + local.get $1 + i32.const 127 + i32.sub + local.tee $1 + i32.const 127 + i32.gt_s + if (result f32) + local.get $1 + i32.const 127 + i32.sub + local.tee $1 + i32.const 127 + local.get $1 + i32.const 127 + i32.lt_s + select + local.set $1 + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + else + local.get $0 + end + else + local.get $1 + i32.const -126 + i32.lt_s + if (result f32) + local.get $0 + f32.const 1.9721522630525295e-31 + f32.mul + local.set $0 + local.get $1 + i32.const 102 + i32.add + local.tee $1 + i32.const -126 + i32.lt_s + if (result f32) + local.get $1 + i32.const 102 + i32.add + local.tee $1 + i32.const -126 + local.get $1 + i32.const -126 + i32.gt_s + select + local.set $1 + local.get $0 + f32.const 1.9721522630525295e-31 + f32.mul + else + local.get $0 + end + else + local.get $0 + end + end + local.get $1 + i32.const 127 + i32.add + i32.const 23 + i32.shl + f32.reinterpret_i32 + f32.mul + ) + (func $~lib/math/NativeMathf.exp (; 26 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + (local $4 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $1 + i32.const 31 + i32.shr_u + local.set $2 + local.get $1 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1118743632 + i32.ge_u + if + local.get $1 + i32.const 1118925336 + i32.ge_u + if + local.get $2 + if + local.get $1 + i32.const 1120924085 + i32.ge_u + if + f32.const 0 + return + end + else + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + return + end + end + end + local.get $1 + i32.const 1051816472 + i32.gt_u + if + local.get $0 + local.get $1 + i32.const 1065686418 + i32.gt_u + if (result i32) + f32.const 1.4426950216293335 + local.get $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.copysign + f32.add + i32.trunc_f32_s + else + i32.const 1 + local.get $2 + i32.const 1 + i32.shl + i32.sub + end + local.tee $1 + f32.convert_i32_s + local.tee $0 + f32.const 0.693145751953125 + f32.mul + f32.sub + local.tee $3 + local.get $0 + f32.const 1.428606765330187e-06 + f32.mul + local.tee $4 + f32.sub + local.set $0 + else + local.get $1 + i32.const 956301312 + i32.gt_u + if (result f32) + i32.const 0 + local.set $1 + local.get $0 + else + f32.const 1 + local.get $0 + f32.add + return + end + local.set $3 + end + f32.const 1 + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f32.mul + local.tee $0 + f32.const 0.16666625440120697 + local.get $0 + f32.const -2.7667332906275988e-03 + f32.mul + f32.add + f32.mul + f32.sub + local.tee $0 + f32.mul + f32.const 2 + local.get $0 + f32.sub + f32.div + local.get $4 + f32.sub + local.get $3 + f32.add + f32.add + local.set $0 + local.get $1 + i32.eqz + if + local.get $0 + return + end + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.scalbn + ) + (func $~lib/math/NativeMathf.cosh (; 27 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + f32.reinterpret_i32 + local.set $0 + local.get $1 + i32.const 1060205079 + i32.lt_u + if + local.get $1 + i32.const 964689920 + i32.lt_u + if + f32.const 1 + return + end + f32.const 1 + local.get $0 + call $~lib/math/NativeMathf.expm1 + local.tee $0 + local.get $0 + f32.mul + f32.const 2 + f32.const 2 + local.get $0 + f32.mul + f32.add + f32.div + f32.add + return + end + local.get $1 + i32.const 1118925335 + i32.lt_u + if + f32.const 0.5 + local.get $0 + call $~lib/math/NativeMathf.exp + local.tee $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.div + f32.add + return + end + local.get $0 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 + f32.mul + ) + (func $assembly/libmf/cosh (; 28 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.cosh + ) + (func $assembly/libmf/exp (; 29 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.exp + ) + (func $assembly/libmf/expm1 (; 30 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.expm1 + ) + (func $assembly/libmf/floor (; 31 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.floor + ) + (func $assembly/libmf/fround (; 32 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + ) + (func $~lib/math/NativeMathf.hypot (; 33 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + (local $5 f64) + (local $6 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $3 + local.get $1 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $2 + i32.lt_u + if + local.get $3 + local.set $6 + local.get $2 + local.set $3 + local.get $6 + local.set $2 + end + local.get $3 + f32.reinterpret_i32 + local.set $0 + local.get $2 + f32.reinterpret_i32 + local.set $1 + local.get $2 + i32.const 2139095040 + i32.eq + if + local.get $1 + return + end + i32.const 1 + local.get $3 + local.get $2 + i32.sub + i32.const 209715200 + i32.ge_u + i32.const 1 + local.get $2 + i32.eqz + local.get $3 + i32.const 2139095040 + i32.ge_u + select + select + if + local.get $0 + local.get $1 + f32.add + return + end + f32.const 1 + local.set $4 + local.get $3 + i32.const 1568669696 + i32.ge_u + if (result f32) + f32.const 1237940039285380274899124e3 + local.set $4 + local.get $1 + f32.const 8.077935669463161e-28 + f32.mul + local.set $1 + local.get $0 + f32.const 8.077935669463161e-28 + f32.mul + else + local.get $2 + i32.const 562036736 + i32.lt_u + if (result f32) + f32.const 8.077935669463161e-28 + local.set $4 + local.get $1 + f32.const 1237940039285380274899124e3 + f32.mul + local.set $1 + local.get $0 + f32.const 1237940039285380274899124e3 + f32.mul + else + local.get $0 + end + end + local.set $0 + local.get $4 + local.get $0 + f64.promote_f32 + local.tee $5 + local.get $5 + f64.mul + local.get $1 + f64.promote_f32 + local.tee $5 + local.get $5 + f64.mul + f64.add + f32.demote_f64 + f32.sqrt + f32.mul + ) + (func $assembly/libmf/hypot (; 34 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.hypot + ) + (func $assembly/libmf/imul (; 35 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 f64) + (local $3 f32) + block $~lib/math/NativeMathf.imul|inlined.0 (result f32) + f32.const 0 + local.get $0 + local.get $1 + f32.add + local.tee $3 + local.get $3 + f32.sub + f32.const 0 + f32.ne + br_if $~lib/math/NativeMathf.imul|inlined.0 + drop + local.get $0 + f64.promote_f32 + local.tee $2 + f64.const 4294967296 + local.get $2 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + local.get $1 + f64.promote_f32 + local.tee $2 + f64.const 4294967296 + local.get $2 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + i32.mul + f32.convert_i32_s + end + ) + (func $assembly/libmf/log (; 36 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.log + ) + (func $~lib/math/NativeMathf.log10 (; 37 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 i32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + (local $7 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $1 + i32.const 8388608 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 31 + i32.shr_u + end + if + local.get $1 + i32.const 1 + i32.shl + i32.eqz + if + f32.const -1 + local.get $0 + local.get $0 + f32.mul + f32.div + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.div + return + end + i32.const -25 + local.set $3 + local.get $0 + f32.const 33554432 + f32.mul + i32.reinterpret_f32 + local.set $1 + else + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + return + else + local.get $1 + i32.const 1065353216 + i32.eq + if + f32.const 0 + return + end + end + end + local.get $1 + i32.const 4913933 + i32.add + local.tee $1 + i32.const 8388607 + i32.and + i32.const 1060439283 + i32.add + f32.reinterpret_i32 + f32.const 1 + f32.sub + local.tee $0 + f32.const 2 + local.get $0 + f32.add + f32.div + local.tee $4 + local.get $4 + f32.mul + local.tee $5 + local.get $5 + f32.mul + local.set $2 + local.get $1 + i32.const 23 + i32.shr_u + i32.const 127 + i32.sub + local.get $3 + i32.add + f32.convert_i32_s + local.tee $7 + f32.const 7.903415166765626e-07 + f32.mul + local.get $0 + local.get $0 + f32.const 0.5 + local.get $0 + f32.mul + local.get $0 + f32.mul + local.tee $0 + f32.sub + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $6 + f32.sub + local.get $0 + f32.sub + local.get $4 + local.get $0 + local.get $5 + f32.const 0.6666666269302368 + local.get $2 + f32.const 0.2849878668785095 + f32.mul + f32.add + f32.mul + local.get $2 + f32.const 0.40000972151756287 + local.get $2 + f32.const 0.24279078841209412 + f32.mul + f32.add + f32.mul + f32.add + f32.add + f32.mul + f32.add + local.tee $0 + local.get $6 + f32.add + f32.const -3.168997136526741e-05 + f32.mul + f32.add + local.get $0 + f32.const 0.434326171875 + f32.mul + f32.add + local.get $6 + f32.const 0.434326171875 + f32.mul + f32.add + local.get $7 + f32.const 0.3010292053222656 + f32.mul + f32.add + ) + (func $assembly/libmf/log10 (; 38 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.log10 + ) + (func $assembly/libmf/log1p (; 39 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.log1p + ) + (func $~lib/math/NativeMathf.log2 (; 40 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 i32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $1 + i32.const 8388608 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 31 + i32.shr_u + end + if + local.get $1 + i32.const 1 + i32.shl + i32.eqz + if + f32.const -1 + local.get $0 + local.get $0 + f32.mul + f32.div + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.div + return + end + i32.const -25 + local.set $3 + local.get $0 + f32.const 33554432 + f32.mul + i32.reinterpret_f32 + local.set $1 + else + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + return + else + local.get $1 + i32.const 1065353216 + i32.eq + if + f32.const 0 + return + end + end + end + local.get $1 + i32.const 4913933 + i32.add + local.tee $1 + i32.const 8388607 + i32.and + i32.const 1060439283 + i32.add + f32.reinterpret_i32 + f32.const 1 + f32.sub + local.tee $0 + f32.const 2 + local.get $0 + f32.add + f32.div + local.tee $4 + local.get $4 + f32.mul + local.tee $5 + local.get $5 + f32.mul + local.set $2 + local.get $0 + local.get $0 + f32.const 0.5 + local.get $0 + f32.mul + local.get $0 + f32.mul + local.tee $0 + f32.sub + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $6 + f32.sub + local.get $0 + f32.sub + local.get $4 + local.get $0 + local.get $5 + f32.const 0.6666666269302368 + local.get $2 + f32.const 0.2849878668785095 + f32.mul + f32.add + f32.mul + local.get $2 + f32.const 0.40000972151756287 + local.get $2 + f32.const 0.24279078841209412 + f32.mul + f32.add + f32.mul + f32.add + f32.add + f32.mul + f32.add + local.tee $0 + local.get $6 + f32.add + f32.const -1.7605285393074155e-04 + f32.mul + local.get $0 + f32.const 1.44287109375 + f32.mul + f32.add + local.get $6 + f32.const 1.44287109375 + f32.mul + f32.add + local.get $1 + i32.const 23 + i32.shr_u + i32.const 127 + i32.sub + local.get $3 + i32.add + f32.convert_i32_s + f32.add + ) + (func $assembly/libmf/log2 (; 41 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.log2 + ) + (func $assembly/libmf/max (; 42 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + f32.max + ) + (func $assembly/libmf/min (; 43 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + f32.min + ) + (func $~lib/math/NativeMathf.pow (; 44 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 f32) + (local $3 f32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 f32) + (local $8 i32) + (local $9 f32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 f32) + (local $14 f32) + (local $15 f32) + (local $16 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $8 + i32.const 2147483647 + i32.and + local.set $5 + local.get $1 + i32.reinterpret_f32 + local.tee $11 + i32.const 2147483647 + i32.and + local.tee $10 + i32.eqz + if + f32.const 1 + return + end + i32.const 1 + local.get $10 + i32.const 2139095040 + i32.gt_s + local.get $5 + i32.const 2139095040 + i32.gt_s + select + if + local.get $0 + local.get $1 + f32.add + return + end + local.get $8 + i32.const 0 + i32.lt_s + if + local.get $10 + i32.const 1266679808 + i32.ge_s + if (result i32) + i32.const 2 + else + local.get $10 + i32.const 1065353216 + i32.ge_s + if (result i32) + local.get $10 + i32.const 150 + local.get $10 + i32.const 23 + i32.shr_s + i32.sub + local.tee $12 + i32.shr_s + local.tee $6 + local.get $12 + i32.shl + local.get $10 + i32.eq + if (result i32) + i32.const 2 + local.get $6 + i32.const 1 + i32.and + i32.sub + else + i32.const 0 + end + else + i32.const 0 + end + end + local.set $4 + end + local.get $10 + i32.const 2139095040 + i32.eq + if + local.get $5 + i32.const 1065353216 + i32.eq + if + f32.const nan:0x400000 + return + else + local.get $5 + i32.const 1065353216 + i32.gt_s + if + local.get $11 + i32.const 0 + i32.lt_s + if + f32.const 0 + local.set $1 + end + local.get $1 + return + else + f32.const 0 + local.get $1 + f32.neg + local.get $11 + i32.const 0 + i32.ge_s + select + return + end + unreachable + end + unreachable + end + local.get $10 + i32.const 1065353216 + i32.eq + if + local.get $11 + i32.const 0 + i32.lt_s + if + f32.const 1 + local.get $0 + f32.div + local.set $0 + end + local.get $0 + return + end + local.get $11 + i32.const 1073741824 + i32.eq + if + local.get $0 + local.get $0 + f32.mul + return + end + local.get $11 + i32.const 1056964608 + i32.eq + if + local.get $8 + i32.const 0 + i32.ge_s + if + local.get $0 + f32.sqrt + return + end + end + local.get $0 + f32.abs + local.set $3 + i32.const 1 + local.get $5 + i32.const 1065353216 + i32.eq + i32.const 1 + local.get $5 + i32.eqz + local.get $5 + i32.const 2139095040 + i32.eq + select + select + if + f32.const 1 + local.get $3 + f32.div + local.get $3 + local.get $11 + i32.const 0 + i32.lt_s + select + local.set $3 + local.get $8 + i32.const 0 + i32.lt_s + if (result f32) + local.get $5 + i32.const 1065353216 + i32.sub + local.get $4 + i32.or + if (result f32) + local.get $3 + f32.neg + local.get $3 + local.get $4 + i32.const 1 + i32.eq + select + else + local.get $3 + local.get $3 + f32.sub + local.tee $0 + local.get $0 + f32.div + end + else + local.get $3 + end + return + end + f32.const 1 + local.set $7 + local.get $8 + i32.const 0 + i32.lt_s + if + local.get $4 + i32.eqz + if + local.get $0 + local.get $0 + f32.sub + local.tee $0 + local.get $0 + f32.div + return + end + f32.const -1 + f32.const 1 + local.get $4 + i32.const 1 + i32.eq + select + local.set $7 + end + local.get $10 + i32.const 1291845632 + i32.gt_s + if (result f32) + local.get $5 + i32.const 1065353208 + i32.lt_s + if + local.get $11 + i32.const 0 + i32.lt_s + if (result f32) + local.get $7 + f32.const 1000000015047466219876688e6 + f32.mul + f32.const 1000000015047466219876688e6 + f32.mul + else + local.get $7 + f32.const 1.0000000031710769e-30 + f32.mul + f32.const 1.0000000031710769e-30 + f32.mul + end + return + end + local.get $5 + i32.const 1065353223 + i32.gt_s + if + local.get $11 + i32.const 0 + i32.gt_s + if (result f32) + local.get $7 + f32.const 1000000015047466219876688e6 + f32.mul + f32.const 1000000015047466219876688e6 + f32.mul + else + local.get $7 + f32.const 1.0000000031710769e-30 + f32.mul + f32.const 1.0000000031710769e-30 + f32.mul + end + return + end + local.get $3 + f32.const 1 + f32.sub + local.tee $2 + local.get $2 + f32.mul + f32.const 0.5 + local.get $2 + f32.const 0.3333333432674408 + local.get $2 + f32.const 0.25 + f32.mul + f32.sub + f32.mul + f32.sub + f32.mul + local.set $0 + f32.const 1.44268798828125 + local.get $2 + f32.mul + local.tee $3 + local.get $2 + f32.const 7.052607543300837e-06 + f32.mul + local.get $0 + f32.const 1.4426950216293335 + f32.mul + f32.sub + local.tee $0 + f32.add + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $9 + local.get $0 + local.get $9 + local.get $3 + f32.sub + f32.sub + else + i32.const 0 + local.set $4 + local.get $5 + i32.const 8388608 + i32.lt_s + if (result i32) + local.get $3 + f32.const 16777216 + f32.mul + i32.reinterpret_f32 + local.set $5 + i32.const -24 + else + i32.const 0 + end + local.get $5 + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + i32.add + local.set $4 + local.get $5 + i32.const 8388607 + i32.and + local.tee $6 + i32.const 1065353216 + i32.or + local.set $5 + local.get $6 + i32.const 1885297 + i32.le_s + if (result i32) + i32.const 0 + else + local.get $6 + i32.const 6140887 + i32.lt_s + if (result i32) + i32.const 1 + else + local.get $4 + i32.const 1 + i32.add + local.set $4 + local.get $5 + i32.const 8388608 + i32.sub + local.set $5 + i32.const 0 + end + end + local.set $6 + local.get $5 + f32.reinterpret_i32 + local.tee $3 + f32.const 1.5 + f32.const 1 + local.get $6 + select + local.tee $0 + f32.sub + local.tee $9 + f32.const 1 + local.get $3 + local.get $0 + f32.add + f32.div + local.tee $2 + f32.mul + local.tee $15 + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $13 + local.get $3 + local.get $5 + i32.const 1 + i32.shr_s + i32.const -4096 + i32.and + i32.const 536870912 + i32.or + i32.const 4194304 + i32.add + local.get $6 + i32.const 21 + i32.shl + i32.add + f32.reinterpret_i32 + local.tee $3 + local.get $0 + f32.sub + f32.sub + local.set $0 + f32.const 0.9619140625 + local.get $13 + f32.const 3 + local.get $13 + local.get $13 + f32.mul + local.tee $16 + f32.add + local.get $15 + local.get $15 + f32.mul + local.tee $14 + local.get $14 + f32.mul + f32.const 0.6000000238418579 + local.get $14 + f32.const 0.4285714328289032 + local.get $14 + f32.const 0.3333333432674408 + local.get $14 + f32.const 0.2727281153202057 + local.get $14 + f32.const 0.23066075146198273 + local.get $14 + f32.const 0.20697501301765442 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + local.get $2 + local.get $9 + local.get $13 + local.get $3 + f32.mul + f32.sub + local.get $13 + local.get $0 + f32.mul + f32.sub + f32.mul + local.tee $2 + local.get $13 + local.get $15 + f32.add + f32.mul + f32.add + local.tee $0 + f32.add + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $9 + f32.mul + local.tee $3 + local.get $2 + local.get $9 + f32.mul + local.get $0 + local.get $9 + f32.const 3 + f32.sub + local.get $16 + f32.sub + f32.sub + local.get $15 + f32.mul + f32.add + local.tee $0 + f32.add + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $2 + f32.mul + local.tee $16 + f32.const -1.1736857413779944e-04 + local.get $2 + f32.mul + local.get $0 + local.get $2 + local.get $3 + f32.sub + f32.sub + f32.const 0.9617967009544373 + f32.mul + f32.add + f32.const 1.5632208487659227e-06 + f32.const 0 + local.get $6 + select + f32.add + local.tee $2 + f32.add + f32.const 0.5849609375 + f32.const 0 + local.get $6 + select + local.tee $3 + f32.add + local.get $4 + f32.convert_i32_s + local.tee $0 + f32.add + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $9 + local.get $2 + local.get $9 + local.get $0 + f32.sub + local.get $3 + f32.sub + local.get $16 + f32.sub + f32.sub + end + local.set $3 + block $folding-inner1 + block $folding-inner0 + local.get $1 + local.get $1 + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $0 + f32.sub + local.get $9 + f32.mul + local.get $1 + local.get $3 + f32.mul + f32.add + local.tee $1 + local.get $0 + local.get $9 + f32.mul + local.tee $2 + f32.add + local.tee $0 + i32.reinterpret_f32 + local.tee $8 + i32.const 1124073472 + i32.gt_s + br_if $folding-inner0 + local.get $8 + i32.const 1124073472 + i32.eq + if + local.get $1 + f32.const 4.299566569443414e-08 + f32.add + local.get $0 + local.get $2 + f32.sub + f32.gt + br_if $folding-inner0 + else + local.get $8 + i32.const 2147483647 + i32.and + i32.const 1125515264 + i32.gt_s + if + br $folding-inner1 + else + local.get $8 + i32.const -1021968384 + i32.eq + if + local.get $1 + local.get $0 + local.get $2 + f32.sub + f32.le + br_if $folding-inner1 + end + end + end + local.get $8 + i32.const 2147483647 + i32.and + local.tee $12 + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + local.set $6 + i32.const 0 + local.set $4 + local.get $12 + i32.const 1056964608 + i32.gt_s + if + i32.const 8388608 + local.get $6 + i32.const 1 + i32.add + i32.shr_s + local.get $8 + i32.add + local.tee $12 + i32.const 2147483647 + i32.and + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + local.set $6 + i32.const 8388607 + local.get $6 + i32.shr_s + i32.const -1 + i32.xor + local.get $12 + i32.and + f32.reinterpret_i32 + local.set $0 + local.get $12 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i32.const 23 + local.get $6 + i32.sub + i32.shr_s + local.set $4 + i32.const 0 + local.get $4 + i32.sub + local.get $4 + local.get $8 + i32.const 0 + i32.lt_s + select + local.set $4 + local.get $2 + local.get $0 + f32.sub + local.set $2 + end + local.get $1 + local.get $2 + f32.add + i32.reinterpret_f32 + i32.const -32768 + i32.and + f32.reinterpret_i32 + local.tee $0 + f32.const 0.693145751953125 + f32.mul + local.tee $3 + local.get $1 + local.get $0 + local.get $2 + f32.sub + f32.sub + f32.const 0.6931471824645996 + f32.mul + local.get $0 + f32.const 1.4286065379565116e-06 + f32.mul + f32.add + local.tee $1 + f32.add + local.tee $2 + local.get $2 + f32.mul + local.set $0 + local.get $7 + f32.const 1 + local.get $2 + local.get $2 + local.get $0 + f32.const 0.1666666716337204 + local.get $0 + f32.const -2.7777778450399637e-03 + local.get $0 + f32.const 6.61375597701408e-05 + local.get $0 + f32.const -1.6533901998627698e-06 + local.get $0 + f32.const 4.138136944220605e-08 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.sub + local.tee $0 + f32.mul + local.get $0 + f32.const 2 + f32.sub + f32.div + local.get $1 + local.get $2 + local.get $3 + f32.sub + f32.sub + local.tee $0 + local.get $2 + local.get $0 + f32.mul + f32.add + f32.sub + local.get $2 + f32.sub + f32.sub + local.tee $0 + i32.reinterpret_f32 + local.get $4 + i32.const 23 + i32.shl + i32.add + local.tee $6 + i32.const 23 + i32.shr_s + i32.const 0 + i32.le_s + if (result f32) + local.get $0 + local.get $4 + call $~lib/math/NativeMathf.scalbn + else + local.get $6 + f32.reinterpret_i32 + end + f32.mul + return + end + local.get $7 + f32.const 1000000015047466219876688e6 + f32.mul + f32.const 1000000015047466219876688e6 + f32.mul + return + end + local.get $7 + f32.const 1.0000000031710769e-30 + f32.mul + f32.const 1.0000000031710769e-30 + f32.mul + ) + (func $assembly/libmf/pow (; 45 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.pow + ) + (func $assembly/libmf/round (; 46 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.const 0.5 + f32.add + f32.floor + local.get $0 + f32.copysign + ) + (func $assembly/libmf/sign (; 47 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.const 0 + f32.gt + if + f32.const 1 + local.set $0 + else + local.get $0 + f32.const 0 + f32.lt + if + f32.const -1 + local.set $0 + end + end + local.get $0 + ) + (func $~lib/math/NativeMathf.sin (; 48 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f64) + (local $2 f64) + (local $3 i32) + (local $4 i64) + (local $5 f64) + (local $6 i32) + (local $7 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 i64) + local.get $0 + i32.reinterpret_f32 + local.tee $3 + i32.const 31 + i32.shr_u + local.set $7 + block $folding-inner0 + local.get $3 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1061752794 + i32.le_u + if + local.get $3 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + local.get $0 + f64.promote_f32 + local.tee $1 + local.get $1 + f64.mul + local.tee $2 + local.get $1 + f64.mul + local.set $5 + br $folding-inner0 + end + local.get $3 + i32.const 1081824209 + i32.le_u + if + local.get $3 + i32.const 1075235811 + i32.le_u + if + local.get $7 + if (result f32) + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.add + local.tee $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + f32.neg + else + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.sub + local.tee $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + end + return + end + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 3.141592653589793 + f64.add + local.get $1 + f64.const 3.141592653589793 + f64.sub + local.get $7 + select + f64.neg + local.tee $1 + local.get $1 + f64.mul + local.tee $2 + local.get $1 + f64.mul + local.set $5 + br $folding-inner0 + end + local.get $3 + i32.const 1088565717 + i32.le_u + if + local.get $3 + i32.const 1085271519 + i32.le_u + if + local.get $7 + if (result f32) + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.add + local.tee $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + else + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.sub + local.tee $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + f32.neg + end + return + end + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 6.283185307179586 + f64.add + local.get $1 + f64.const 6.283185307179586 + f64.sub + local.get $7 + select + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + local.set $5 + local.get $2 + local.get $5 + f64.const -0.16666666641626524 + local.get $1 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $5 + local.get $1 + local.get $1 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $1 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return + end + local.get $3 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + return + end + block $~lib/math/rempio2f|inlined.1 (result i32) + local.get $3 + i32.const 1305022427 + i32.lt_u + if + local.get $0 + f64.promote_f32 + local.tee $2 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $1 + local.get $2 + local.get $1 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $1 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $1 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.1 + end + i32.const 76 + i32.load + local.get $3 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.tee $6 + i32.const 6 + i32.shr_s + local.tee $9 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $10 + i32.const 76 + i32.load + local.get $9 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + i64.load + local.set $4 + local.get $6 + i32.const 63 + i32.and + local.tee $6 + i32.const 32 + i32.gt_s + if (result i64) + local.get $4 + local.get $6 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + i32.const 76 + i32.load + local.get $9 + i32.const 2 + i32.add + i32.const 3 + i32.shl + i32.add + i64.load + i64.const 96 + local.get $6 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + else + local.get $4 + i64.const 32 + local.get $6 + i64.extend_i32_s + i64.sub + i64.shr_u + end + local.set $8 + f64.const 8.515303950216386e-20 + local.get $0 + f64.promote_f32 + f64.copysign + local.get $3 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.tee $11 + local.get $4 + i64.const 64 + local.get $6 + i64.extend_i32_s + local.tee $4 + i64.sub + i64.shr_u + local.get $10 + local.get $4 + i64.shl + i64.or + i64.mul + local.get $8 + local.get $11 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $4 + i64.const 2 + i64.shl + local.tee $8 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + i32.const 0 + local.get $4 + i64.const 62 + i64.shr_u + local.get $8 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.tee $3 + i32.sub + local.get $3 + local.get $7 + select + end + local.set $3 + global.get $~lib/math/rempio2f_y + local.set $1 + local.get $3 + i32.const 1 + i32.and + if (result f32) + local.get $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + else + local.get $1 + local.get $1 + local.get $1 + f64.mul + local.tee $2 + local.get $1 + f64.mul + local.tee $1 + f64.const -0.16666666641626524 + local.get $2 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $1 + local.get $2 + local.get $2 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $2 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + end + local.set $0 + local.get $0 + f32.neg + local.get $0 + local.get $3 + i32.const 2 + i32.and + select + return + end + local.get $1 + local.get $5 + f64.const -0.16666666641626524 + local.get $2 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $5 + local.get $2 + local.get $2 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $2 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + ) + (func $assembly/libmf/sin (; 49 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.sin + ) + (func $~lib/math/NativeMathf.sinh (; 50 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + (local $3 f32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $2 + f32.reinterpret_i32 + local.set $1 + f32.const 0.5 + local.get $0 + f32.copysign + local.set $3 + local.get $2 + i32.const 1118925335 + i32.lt_u + if + local.get $1 + call $~lib/math/NativeMathf.expm1 + local.set $1 + local.get $2 + i32.const 1065353216 + i32.lt_u + if + local.get $2 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + local.get $3 + f32.const 2 + local.get $1 + f32.mul + local.get $1 + local.get $1 + f32.mul + local.get $1 + f32.const 1 + f32.add + f32.div + f32.sub + f32.mul + return + end + local.get $3 + local.get $1 + local.get $1 + local.get $1 + f32.const 1 + f32.add + f32.div + f32.add + f32.mul + return + end + f32.const 2 + local.get $3 + f32.mul + local.get $1 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 + f32.mul + f32.mul + ) + (func $assembly/libmf/sinh (; 51 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.sinh + ) + (func $assembly/libmf/sqrt (; 52 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.sqrt + ) + (func $~lib/math/NativeMathf.tan (; 53 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 i32) + (local $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 i64) + local.get $0 + i32.reinterpret_f32 + local.tee $4 + i32.const 31 + i32.shr_u + local.set $7 + block $folding-inner1 + block $folding-inner0 + local.get $4 + i32.const 2147483647 + i32.and + local.tee $4 + i32.const 1061752794 + i32.le_u + if + local.get $4 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + local.get $0 + f64.promote_f32 + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + local.set $3 + br $folding-inner0 + end + local.get $4 + i32.const 1081824209 + i32.le_u + if + local.get $4 + i32.const 1075235811 + i32.le_u + if + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 1.5707963267948966 + f64.add + local.get $1 + f64.const 1.5707963267948966 + f64.sub + local.get $7 + select + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + local.set $3 + br $folding-inner1 + else + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 3.141592653589793 + f64.add + local.get $1 + f64.const 3.141592653589793 + f64.sub + local.get $7 + select + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + local.set $3 + br $folding-inner0 + end + unreachable + end + local.get $4 + i32.const 1088565717 + i32.le_u + if + local.get $4 + i32.const 1085271519 + i32.le_u + if + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 4.71238898038469 + f64.add + local.get $1 + f64.const 4.71238898038469 + f64.sub + local.get $7 + select + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + local.set $3 + br $folding-inner1 + else + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 6.283185307179586 + f64.add + local.get $1 + f64.const 6.283185307179586 + f64.sub + local.get $7 + select + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + local.set $3 + br $folding-inner0 + end + unreachable + end + local.get $4 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + return + end + block $~lib/math/rempio2f|inlined.2 (result i32) + local.get $4 + i32.const 1305022427 + i32.lt_u + if + local.get $0 + f64.promote_f32 + local.tee $2 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $1 + local.get $2 + local.get $1 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $1 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $1 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.2 + end + i32.const 76 + i32.load + local.get $4 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.tee $6 + i32.const 6 + i32.shr_s + local.tee $9 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $10 + i32.const 76 + i32.load + local.get $9 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + i64.load + local.set $5 + local.get $6 + i32.const 63 + i32.and + local.tee $6 + i32.const 32 + i32.gt_s + if (result i64) + local.get $5 + local.get $6 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + i32.const 76 + i32.load + local.get $9 + i32.const 2 + i32.add + i32.const 3 + i32.shl + i32.add + i64.load + i64.const 96 + local.get $6 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + else + local.get $5 + i64.const 32 + local.get $6 + i64.extend_i32_s + i64.sub + i64.shr_u + end + local.set $8 + f64.const 8.515303950216386e-20 + local.get $0 + f64.promote_f32 + f64.copysign + local.get $4 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.tee $11 + local.get $5 + i64.const 64 + local.get $6 + i64.extend_i32_s + local.tee $5 + i64.sub + i64.shr_u + local.get $10 + local.get $5 + i64.shl + i64.or + i64.mul + local.get $8 + local.get $11 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $5 + i64.const 2 + i64.shl + local.tee $8 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + i32.const 0 + local.get $5 + i64.const 62 + i64.shr_u + local.get $8 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.tee $4 + i32.sub + local.get $4 + local.get $7 + select + end + local.set $4 + global.get $~lib/math/rempio2f_y + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + local.set $3 + local.get $2 + local.get $3 + f64.const 0.3333313950307914 + local.get $1 + f64.const 0.13339200271297674 + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + local.get $1 + local.get $1 + f64.mul + local.tee $2 + f64.mul + f64.const 0.05338123784456704 + local.get $1 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.get $2 + f64.const 0.002974357433599673 + local.get $1 + f64.const 0.009465647849436732 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + local.set $1 + f64.const -1 + local.get $1 + f64.div + local.get $1 + local.get $4 + i32.const 1 + i32.and + select + f32.demote_f64 + return + end + local.get $2 + local.get $3 + f64.const 0.3333313950307914 + local.get $1 + f64.const 0.13339200271297674 + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + local.get $1 + local.get $1 + f64.mul + local.tee $2 + f64.mul + f64.const 0.05338123784456704 + local.get $1 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.get $2 + f64.const 0.002974357433599673 + local.get $1 + f64.const 0.009465647849436732 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return + end + f64.const -1 + local.get $2 + local.get $3 + f64.const 0.3333313950307914 + local.get $1 + f64.const 0.13339200271297674 + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + local.get $1 + local.get $1 + f64.mul + local.tee $2 + f64.mul + f64.const 0.05338123784456704 + local.get $1 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.get $2 + f64.const 0.002974357433599673 + local.get $1 + f64.const 0.009465647849436732 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.div + f32.demote_f64 + ) + (func $assembly/libmf/tan (; 54 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.tan + ) + (func $~lib/math/NativeMathf.tanh (; 55 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $2 + f32.reinterpret_i32 + local.set $1 + local.get $2 + i32.const 1057791828 + i32.gt_u + if + local.get $2 + i32.const 1092616192 + i32.gt_u + if (result f32) + f32.const 1 + f32.const 0 + local.get $1 + f32.div + f32.add + else + f32.const 1 + f32.const 2 + f32.const 2 + local.get $1 + f32.mul + call $~lib/math/NativeMathf.expm1 + f32.const 2 + f32.add + f32.div + f32.sub + end + local.set $1 + else + local.get $2 + i32.const 1048757624 + i32.gt_u + if + f32.const 2 + local.get $1 + f32.mul + call $~lib/math/NativeMathf.expm1 + local.tee $1 + local.get $1 + f32.const 2 + f32.add + f32.div + local.set $1 + else + local.get $2 + i32.const 8388608 + i32.ge_u + if + f32.const -2 + local.get $1 + f32.mul + call $~lib/math/NativeMathf.expm1 + local.tee $1 + f32.neg + local.get $1 + f32.const 2 + f32.add + f32.div + local.set $1 + end + end + end + local.get $1 + local.get $0 + f32.copysign + ) + (func $assembly/libmf/tanh (; 56 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.tanh + ) + (func $assembly/libmf/trunc (; 57 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.trunc + ) + (func $null (; 58 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/lib/libm/index.d.ts b/lib/libm/index.d.ts new file mode 100644 index 00000000..84cb74c8 --- /dev/null +++ b/lib/libm/index.d.ts @@ -0,0 +1,2 @@ +declare const libm: typeof Math & { libm: typeof Math, libmf: typeof Math }; +export = libm; diff --git a/lib/libm/index.js b/lib/libm/index.js new file mode 100644 index 00000000..8fb0769c --- /dev/null +++ b/lib/libm/index.js @@ -0,0 +1,7 @@ +const fs = require("fs"); +const libm = new WebAssembly.Instance(new WebAssembly.Module(fs.readFileSync("./build/libm.wasm")), { Math }).exports; +const libmf = new WebAssembly.Instance(new WebAssembly.Module(fs.readFileSync("./build/libmf.wasm")), {}).exports; +module.exports = Object.create(libm, { + libm: { value: libm, enumerable: true }, + libmf: { value: libmf, enumerable: true } +}); diff --git a/lib/libm/package.json b/lib/libm/package.json new file mode 100644 index 00000000..36309ebc --- /dev/null +++ b/lib/libm/package.json @@ -0,0 +1,23 @@ +{ + "name": "@assemblyscript/libm", + "version": "1.0.0", + "license": "Apache-2.0", + "main": "index.js", + "types": "index.d.ts", + "scripts": { + "asbuild": "npm run asbuild:libm && npm run asbuild:libmf", + "asbuild:libm": "asc assembly/libm.ts -O3 -b build/libm.wasm -t build/libm.wat --runtime none --validate", + "asbuild:libmf": "asc assembly/libmf.ts -O3 -b build/libmf.wasm -t build/libmf.wat --runtime none --validate" + }, + "files": [ + "package.json", + "index.d.ts", + "index.js", + "build/*.wasm", + "README.md" + ], + "dependencies": {}, + "devDependencies": { + "assemblyscript": "AssemblyScript/assemblyscript" + } +} diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 9352aa51..ccbd9e6b 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -366,14 +366,14 @@ export class Array extends ArrayBufferView { return newLength; } - slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Array { + slice(start: i32 = 0, end: i32 = i32.MAX_VALUE): Array { var length = this.length_; - begin = begin < 0 ? max(begin + length, 0) : min(begin, length); + start = start < 0 ? max(start + length, 0) : min(start, length); end = end < 0 ? max(end + length, 0) : min(end , length); - length = max(end - begin, 0); + length = max(end - start, 0); var slice = changetype>(__allocArray(length, alignof(), idof>())); // retains var sliceBase = slice.dataStart; - var thisBase = this.dataStart + (begin << alignof()); + var thisBase = this.dataStart + (start << alignof()); if (isManaged()) { let off = 0; let end = length << alignof(); diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index ef00a17c..65a266a8 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -1351,7 +1351,7 @@ interface IMath { acos(x: T): T; /** Returns the hyperbolic arc-cosine of `x`. */ acosh(x: T): T; - /** Returns the arcsine (in radians) of `x` */ + /** Returns the arcsine (in radians) of `x`. */ asin(x: T): T; /** Returns the hyperbolic arcsine of `x`. */ asinh(x: T): T; @@ -1378,7 +1378,7 @@ interface IMath { /** Returns the largest integer less than or equal to `x`. */ floor(x: T): T; /** Returns the nearest 32-bit single precision float representation of `x`. */ - fround(x: T): f32; + fround(x: T): T; /** Returns the square root of the sum of squares of its arguments. */ hypot(value1: T, value2: T): T; // TODO: rest /** Returns the result of the C-like 32-bit multiplication of `a` and `b`. */ @@ -1403,7 +1403,7 @@ interface IMath { round(x: T): T; /** Returns the sign of `x`, indicating whether the number is positive, negative or zero. */ sign(x: T): T; - /** Returns whether the sign bit of `x` is set */ + /** Returns whether the sign bit of `x` is set. */ signbit(x: T): bool; /** Returns the sine of `x`. */ sin(x: T): T; diff --git a/std/assembly/math.ts b/std/assembly/math.ts index 58a39bed..62bc20fd 100644 --- a/std/assembly/math.ts +++ b/std/assembly/math.ts @@ -404,8 +404,7 @@ export namespace NativeMath { } export function cos(x: f64): f64 { // TODO - unreachable(); - return 0; + return JSMath.cos(x); } export function cosh(x: f64): f64 { // see: musl/src/math/cosh.c @@ -544,7 +543,7 @@ export namespace NativeMath { // @ts-ignore: decorator @inline - export function fround(x: f64): f32 { + export function fround(x: f64): f64 { return x; } @@ -1065,8 +1064,7 @@ export namespace NativeMath { } export function sin(x: f64): f64 { // TODO - unreachable(); - return 0; + return JSMath.sin(x); } export function sinh(x: f64): f64 { // see: musl/src/math/sinh.c @@ -1094,8 +1092,7 @@ export namespace NativeMath { } export function tan(x: f64): f64 { // TODO - unreachable(); - return 0; + return JSMath.tan(x); } export function tanh(x: f64): f64 { // see: musl/src/math/tanh.c @@ -1703,7 +1700,7 @@ export namespace NativeMathf { export function clz32(x: f32): f32 { if (!isFinite(x)) return 32; - return builtin_clz( + return builtin_clz( (x - 4294967296 * builtin_floor(x * (1.0 / 4294967296))) ); } @@ -1931,7 +1928,7 @@ export namespace NativeMathf { */ if (!isFinite(x + y)) return 0; const inv32 = 1.0 / 4294967296; - return ( + return ( (x - 4294967296 * builtin_floor(x * inv32)) * (y - 4294967296 * builtin_floor(y * inv32)) ); diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 45ad2b5a..3e7f06c7 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -10,10 +10,16 @@ import { idof } from "./builtins"; @lazy static readonly MAX_LENGTH: i32 = BLOCK_MAXSIZE >>> alignof(); - // TODO Add and handle second argument - static fromCharCode(code: i32): string { - var out = __alloc(2, idof()); - store(out, code); + static fromCharCode(unit: i32, surr: i32 = -1): string { + var out: usize; + if (~surr) { + out = __alloc(4, idof()); + store(out, unit); + store(out, surr, 2); + } else { + out = __alloc(2, idof()); + store(out, unit); + } return changetype(out); // retains } @@ -74,15 +80,15 @@ import { idof } from "./builtins"; return out; } - endsWith(searchString: String, endPosition: i32 = String.MAX_LENGTH): bool { + endsWith(search: String, end: i32 = String.MAX_LENGTH): bool { assert(this !== null); - if (searchString === null) return false; - var end = min(max(endPosition, 0), this.length); - var searchLength: isize = searchString.length; - var start: isize = end - searchLength; - if (start < 0) return false; + if (search === null) return false; + end = min(max(end, 0), this.length); + var searchLength = search.length; + var searchStart = end - searchLength; + if (searchStart < 0) return false; // @ts-ignore: string <-> String - return !compareImpl(this, start, searchString, 0, searchLength); + return !compareImpl(this, searchStart, search, 0, searchLength); } @operator("==") private static __eq(left: String | null, right: String | null): bool { @@ -132,54 +138,48 @@ import { idof } from "./builtins"; return !this.__gt(left, right); } - @inline includes(searchString: String, position: i32 = 0): bool { - return this.indexOf(searchString, position) != -1; + includes(search: String, start: i32 = 0): bool { + return this.indexOf(search, start) != -1; } - indexOf(searchString: String, fromIndex: i32 = 0): i32 { - assert(this !== null); - if (searchString === null) searchString = changetype("null"); - var searchLen: isize = searchString.length; + indexOf(search: String, start: i32 = 0): i32 { + var searchLen = search.length; if (!searchLen) return 0; - var len: isize = this.length; + var len = this.length; if (!len) return -1; - var start = min(max(fromIndex, 0), len); - len -= searchLen; - for (let k: isize = start; k <= len; ++k) { + var searchStart = min(max(start, 0), len); + for (len -= searchLen; searchStart <= len; ++searchStart) { // @ts-ignore: string <-> String - if (!compareImpl(this, k, searchString, 0, searchLen)) return k; + if (!compareImpl(this, searchStart, search, 0, searchLen)) return searchStart; } return -1; } - lastIndexOf(searchString: String, fromIndex: i32 = i32.MAX_VALUE): i32 { - assert(this !== null); - if (searchString === null) searchString = changetype("null"); - var len: isize = this.length; - var searchLen: isize = searchString.length; - if (!searchLen) return len; + lastIndexOf(search: String, start: i32 = i32.MAX_VALUE): i32 { + var searchLen = search.length; + if (!searchLen) return this.length; + var len = this.length; if (!len) return -1; - var start = min(max(fromIndex, 0), len - searchLen); - for (let k = start; k >= 0; --k) { + var searchStart = min(max(start, 0), len - searchLen); + for (; searchStart >= 0; --searchStart) { // @ts-ignore: string <-> String - if (!compareImpl(this, k, searchString, 0, searchLen)) return k; + if (!compareImpl(this, searchStart, search, 0, searchLen)) return searchStart; } return -1; } - startsWith(searchString: String, position: i32 = 0): bool { + startsWith(search: String, start: i32 = 0): bool { assert(this !== null); - if (searchString === null) searchString = changetype("null"); - var pos: isize = position; - var len: isize = this.length; - var start = min(max(pos, 0), len); - var searchLength: isize = searchString.length; - if (searchLength + start > len) return false; + if (search === null) search = changetype("null"); + var len = this.length; + var searchStart = min(max(start, 0), len); + var searchLength = search.length; + if (searchLength + searchStart > len) return false; // @ts-ignore: string <-> String - return !compareImpl(this, start, searchString, 0, searchLength); + return !compareImpl(this, searchStart, search, 0, searchLength); } - substr(start: i32, length: i32 = i32.MAX_VALUE): String { + substr(start: i32, length: i32 = i32.MAX_VALUE): String { // legacy assert(this !== null); var intStart: isize = start; var end: isize = length; @@ -284,11 +284,11 @@ import { idof } from "./builtins"; return changetype(out); // retains } - padStart(targetLength: i32, padString: string = " "): String { + padStart(length: i32, pad: string = " "): String { assert(this !== null); var thisSize = this.length << 1; - var targetSize = targetLength << 1; - var padSize = padString.length << 1; + var targetSize = length << 1; + var padSize = pad.length << 1; if (targetSize < thisSize || !padSize) return this; var prependSize = targetSize - thisSize; var out = __alloc(targetSize, idof()); @@ -296,20 +296,20 @@ import { idof } from "./builtins"; let repeatCount = (prependSize - 2) / padSize; let restBase = repeatCount * padSize; let restSize = prependSize - restBase; - memory.repeat(out, changetype(padString), padSize, repeatCount); - memory.copy(out + restBase, changetype(padString), restSize); + memory.repeat(out, changetype(pad), padSize, repeatCount); + memory.copy(out + restBase, changetype(pad), restSize); } else { - memory.copy(out, changetype(padString), prependSize); + memory.copy(out, changetype(pad), prependSize); } memory.copy(out + prependSize, changetype(this), thisSize); return changetype(out); // retains } - padEnd(targetLength: i32, padString: string = " "): String { + padEnd(length: i32, pad: string = " "): String { assert(this !== null); var thisSize = this.length << 1; - var targetSize = targetLength << 1; - var padSize = padString.length << 1; + var targetSize = length << 1; + var padSize = pad.length << 1; if (targetSize < thisSize || !padSize) return this; var appendSize = targetSize - thisSize; var out = __alloc(targetSize, idof()); @@ -318,10 +318,10 @@ import { idof } from "./builtins"; let repeatCount = (appendSize - 2) / padSize; let restBase = repeatCount * padSize; let restSize = appendSize - restBase; - memory.repeat(out + thisSize, changetype(padString), padSize, repeatCount); - memory.copy(out + thisSize + restBase, changetype(padString), restSize); + memory.repeat(out + thisSize, changetype(pad), padSize, repeatCount); + memory.copy(out + thisSize + restBase, changetype(pad), restSize); } else { - memory.copy(out + thisSize, changetype(padString), appendSize); + memory.copy(out + thisSize, changetype(pad), appendSize); } return changetype(out); // retains } @@ -342,14 +342,14 @@ import { idof } from "./builtins"; return changetype(out); // retains } - slice(beginIndex: i32, endIndex: i32 = i32.MAX_VALUE): String { + slice(start: i32, end: i32 = i32.MAX_VALUE): String { var len = this.length; - var begin = beginIndex < 0 ? max(beginIndex + len, 0) : min(beginIndex, len); - var end = endIndex < 0 ? max(endIndex + len, 0) : min(endIndex, len); - len = end - begin; + start = start < 0 ? max(start + len, 0) : min(start, len); + end = end < 0 ? max(end + len, 0) : min(end, len); + len = end - start; if (len <= 0) return changetype(""); var out = __alloc(len << 1, idof()); - memory.copy(out, changetype(this) + (begin << 1), len << 1); + memory.copy(out, changetype(this) + (start << 1), len << 1); return changetype(out); // retains } diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 256392dd..d2c34e06 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -145,7 +145,7 @@ if i32.const 0 i32.const 256 - i32.const 171 + i32.const 172 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 811facaf..07739465 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -253,7 +253,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $1 call $~lib/rt/stub/__retain drop @@ -264,7 +263,7 @@ if i32.const 0 i32.const 256 - i32.const 171 + i32.const 172 i32.const 4 call $~lib/builtins/abort unreachable @@ -290,12 +289,10 @@ end local.set $1 end - local.get $2 - local.set $5 local.get $0 call $~lib/string/String#get:length - local.set $6 - local.get $5 + local.set $5 + local.get $2 local.tee $3 i32.const 0 local.tee $4 @@ -304,20 +301,20 @@ i32.gt_s select local.tee $3 - local.get $6 + local.get $5 local.tee $4 local.get $3 local.get $4 i32.lt_s select - local.set $7 + local.set $6 local.get $1 call $~lib/string/String#get:length - local.set $8 - local.get $8 + local.set $7 local.get $7 - i32.add local.get $6 + i32.add + local.get $5 i32.gt_s if i32.const 0 @@ -328,10 +325,10 @@ return end local.get $0 - local.get $7 + local.get $6 local.get $1 i32.const 0 - local.get $8 + local.get $7 call $~lib/util/string/compareImpl i32.eqz local.set $3 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 90a5d8f4..36b34767 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -4417,7 +4417,7 @@ if i32.const 0 i32.const 3160 - i32.const 1021 + i32.const 1020 i32.const 4 call $~lib/builtins/abort unreachable @@ -5970,7 +5970,7 @@ if i32.const 3936 i32.const 3160 - i32.const 1030 + i32.const 1029 i32.const 24 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index ddd4b833..14b783f1 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -7105,7 +7105,7 @@ if i32.const 0 i32.const 3160 - i32.const 1021 + i32.const 1020 i32.const 4 call $~lib/builtins/abort unreachable @@ -9460,7 +9460,7 @@ if i32.const 3936 i32.const 3160 - i32.const 1030 + i32.const 1029 i32.const 24 call $~lib/builtins/abort unreachable @@ -11392,7 +11392,7 @@ if i32.const 0 i32.const 4360 - i32.const 40 + i32.const 46 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 7dcc3971..70ca683d 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -3,65 +3,125 @@ (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) - (type $FUNCSIG$fd (func (param f64) (result f32))) + (type $FUNCSIG$ff (func (param f32) (result f32))) + (type $FUNCSIG$if (func (param f32) (result i32))) + (type $FUNCSIG$fff (func (param f32 f32) (result f32))) + (type $FUNCSIG$ffi (func (param f32 i32) (result f32))) (type $FUNCSIG$v (func)) - (memory $0 0) - (global $std/libm/E f64 (f64.const 2.718281828459045)) - (global $std/libm/LN10 f64 (f64.const 2.302585092994046)) - (global $std/libm/LN2 f64 (f64.const 0.6931471805599453)) - (global $std/libm/LOG10E f64 (f64.const 0.4342944819032518)) - (global $std/libm/LOG2E f64 (f64.const 1.4426950408889634)) - (global $std/libm/PI f64 (f64.const 3.141592653589793)) - (global $std/libm/SQRT1_2 f64 (f64.const 0.7071067811865476)) - (global $std/libm/SQRT2 f64 (f64.const 1.4142135623730951)) + (type $FUNCSIG$ji (func (param i32) (result i64))) + (import "Math" "cos" (func $~lib/bindings/Math/cos (param f64) (result f64))) + (import "Math" "sin" (func $~lib/bindings/Math/sin (param f64) (result f64))) + (import "Math" "tan" (func $~lib/bindings/Math/tan (param f64) (result f64))) + (memory $0 1) + (data (i32.const 8) " \00\00\00\01\00\00\00\00\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") + (data (i32.const 56) "\10\00\00\00\01\00\00\00\03\00\00\00\10\00\00\00\18\00\00\00\18\00\00\00 \00\00\00\04") + (global $../../lib/libm/assembly/libm/E f64 (f64.const 2.718281828459045)) + (global $../../lib/libm/assembly/libm/LN10 f64 (f64.const 2.302585092994046)) + (global $../../lib/libm/assembly/libm/LN2 f64 (f64.const 0.6931471805599453)) + (global $../../lib/libm/assembly/libm/LOG10E f64 (f64.const 0.4342944819032518)) + (global $../../lib/libm/assembly/libm/LOG2E f64 (f64.const 1.4426950408889634)) + (global $../../lib/libm/assembly/libm/PI f64 (f64.const 3.141592653589793)) + (global $../../lib/libm/assembly/libm/SQRT1_2 f64 (f64.const 0.7071067811865476)) + (global $../../lib/libm/assembly/libm/SQRT2 f64 (f64.const 1.4142135623730951)) + (global $../../lib/libm/assembly/libmf/E f32 (f32.const 2.7182817459106445)) + (global $../../lib/libm/assembly/libmf/LN10 f32 (f32.const 2.3025851249694824)) + (global $../../lib/libm/assembly/libmf/LN2 f32 (f32.const 0.6931471824645996)) + (global $../../lib/libm/assembly/libmf/LOG10E f32 (f32.const 0.4342944920063019)) + (global $../../lib/libm/assembly/libmf/LOG2E f32 (f32.const 1.4426950216293335)) + (global $../../lib/libm/assembly/libmf/PI f32 (f32.const 3.1415927410125732)) + (global $../../lib/libm/assembly/libmf/SQRT1_2 f32 (f32.const 0.7071067690849304)) + (global $../../lib/libm/assembly/libmf/SQRT2 f32 (f32.const 1.4142135381698608)) + (global $~lib/math/rempio2f_y (mut f64) (f64.const 0)) (export "memory" (memory $0)) - (export "E" (global $std/libm/E)) - (export "LN10" (global $std/libm/LN10)) - (export "LN2" (global $std/libm/LN2)) - (export "LOG10E" (global $std/libm/LOG10E)) - (export "LOG2E" (global $std/libm/LOG2E)) - (export "PI" (global $std/libm/PI)) - (export "SQRT1_2" (global $std/libm/SQRT1_2)) - (export "SQRT2" (global $std/libm/SQRT2)) - (export "abs" (func $std/libm/abs)) - (export "acos" (func $std/libm/acos)) - (export "acosh" (func $std/libm/acosh)) - (export "asin" (func $std/libm/asin)) - (export "asinh" (func $std/libm/asinh)) - (export "atan" (func $std/libm/atan)) - (export "atanh" (func $std/libm/atanh)) - (export "atan2" (func $std/libm/atan2)) - (export "cbrt" (func $std/libm/cbrt)) - (export "ceil" (func $std/libm/ceil)) - (export "clz32" (func $std/libm/clz32)) - (export "cos" (func $std/libm/cos)) - (export "cosh" (func $std/libm/cosh)) - (export "exp" (func $std/libm/exp)) - (export "expm1" (func $std/libm/expm1)) - (export "floor" (func $std/libm/floor)) - (export "fround" (func $std/libm/fround)) - (export "hypot" (func $std/libm/hypot)) - (export "imul" (func $std/libm/imul)) - (export "log" (func $std/libm/log)) - (export "log10" (func $std/libm/log10)) - (export "log1p" (func $std/libm/log1p)) - (export "log2" (func $std/libm/log2)) - (export "max" (func $std/libm/max)) - (export "min" (func $std/libm/min)) - (export "pow" (func $std/libm/pow)) - (export "round" (func $std/libm/round)) - (export "sign" (func $std/libm/sign)) - (export "sin" (func $std/libm/cos)) - (export "sinh" (func $std/libm/sinh)) - (export "sqrt" (func $std/libm/sqrt)) - (export "tan" (func $std/libm/cos)) - (export "tanh" (func $std/libm/tanh)) - (export "trunc" (func $std/libm/trunc)) - (func $std/libm/abs (; 0 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (export "libm.E" (global $../../lib/libm/assembly/libm/E)) + (export "libm.LN10" (global $../../lib/libm/assembly/libm/LN10)) + (export "libm.LN2" (global $../../lib/libm/assembly/libm/LN2)) + (export "libm.LOG10E" (global $../../lib/libm/assembly/libm/LOG10E)) + (export "libm.LOG2E" (global $../../lib/libm/assembly/libm/LOG2E)) + (export "libm.PI" (global $../../lib/libm/assembly/libm/PI)) + (export "libm.SQRT1_2" (global $../../lib/libm/assembly/libm/SQRT1_2)) + (export "libm.SQRT2" (global $../../lib/libm/assembly/libm/SQRT2)) + (export "libm.abs" (func $../../lib/libm/assembly/libm/abs)) + (export "libm.acos" (func $../../lib/libm/assembly/libm/acos)) + (export "libm.acosh" (func $../../lib/libm/assembly/libm/acosh)) + (export "libm.asin" (func $../../lib/libm/assembly/libm/asin)) + (export "libm.asinh" (func $../../lib/libm/assembly/libm/asinh)) + (export "libm.atan" (func $../../lib/libm/assembly/libm/atan)) + (export "libm.atanh" (func $../../lib/libm/assembly/libm/atanh)) + (export "libm.atan2" (func $../../lib/libm/assembly/libm/atan2)) + (export "libm.cbrt" (func $../../lib/libm/assembly/libm/cbrt)) + (export "libm.ceil" (func $../../lib/libm/assembly/libm/ceil)) + (export "libm.clz32" (func $../../lib/libm/assembly/libm/clz32)) + (export "libm.cos" (func $../../lib/libm/assembly/libm/cos)) + (export "libm.cosh" (func $../../lib/libm/assembly/libm/cosh)) + (export "libm.exp" (func $../../lib/libm/assembly/libm/exp)) + (export "libm.expm1" (func $../../lib/libm/assembly/libm/expm1)) + (export "libm.floor" (func $../../lib/libm/assembly/libm/floor)) + (export "libm.fround" (func $../../lib/libm/assembly/libm/fround)) + (export "libm.hypot" (func $../../lib/libm/assembly/libm/hypot)) + (export "libm.imul" (func $../../lib/libm/assembly/libm/imul)) + (export "libm.log" (func $../../lib/libm/assembly/libm/log)) + (export "libm.log10" (func $../../lib/libm/assembly/libm/log10)) + (export "libm.log1p" (func $../../lib/libm/assembly/libm/log1p)) + (export "libm.log2" (func $../../lib/libm/assembly/libm/log2)) + (export "libm.max" (func $../../lib/libm/assembly/libm/max)) + (export "libm.min" (func $../../lib/libm/assembly/libm/min)) + (export "libm.pow" (func $../../lib/libm/assembly/libm/pow)) + (export "libm.round" (func $../../lib/libm/assembly/libm/round)) + (export "libm.sign" (func $../../lib/libm/assembly/libm/sign)) + (export "libm.sin" (func $../../lib/libm/assembly/libm/sin)) + (export "libm.sinh" (func $../../lib/libm/assembly/libm/sinh)) + (export "libm.sqrt" (func $../../lib/libm/assembly/libm/sqrt)) + (export "libm.tan" (func $../../lib/libm/assembly/libm/tan)) + (export "libm.tanh" (func $../../lib/libm/assembly/libm/tanh)) + (export "libm.trunc" (func $../../lib/libm/assembly/libm/trunc)) + (export "libmf.E" (global $../../lib/libm/assembly/libmf/E)) + (export "libmf.LN10" (global $../../lib/libm/assembly/libmf/LN10)) + (export "libmf.LN2" (global $../../lib/libm/assembly/libmf/LN2)) + (export "libmf.LOG10E" (global $../../lib/libm/assembly/libmf/LOG10E)) + (export "libmf.LOG2E" (global $../../lib/libm/assembly/libmf/LOG2E)) + (export "libmf.PI" (global $../../lib/libm/assembly/libmf/PI)) + (export "libmf.SQRT1_2" (global $../../lib/libm/assembly/libmf/SQRT1_2)) + (export "libmf.SQRT2" (global $../../lib/libm/assembly/libmf/SQRT2)) + (export "libmf.abs" (func $../../lib/libm/assembly/libmf/abs)) + (export "libmf.acos" (func $../../lib/libm/assembly/libmf/acos)) + (export "libmf.acosh" (func $../../lib/libm/assembly/libmf/acosh)) + (export "libmf.asin" (func $../../lib/libm/assembly/libmf/asin)) + (export "libmf.asinh" (func $../../lib/libm/assembly/libmf/asinh)) + (export "libmf.atan" (func $../../lib/libm/assembly/libmf/atan)) + (export "libmf.atanh" (func $../../lib/libm/assembly/libmf/atanh)) + (export "libmf.atan2" (func $../../lib/libm/assembly/libmf/atan2)) + (export "libmf.cbrt" (func $../../lib/libm/assembly/libmf/cbrt)) + (export "libmf.ceil" (func $../../lib/libm/assembly/libmf/ceil)) + (export "libmf.clz32" (func $../../lib/libm/assembly/libmf/clz32)) + (export "libmf.cos" (func $../../lib/libm/assembly/libmf/cos)) + (export "libmf.cosh" (func $../../lib/libm/assembly/libmf/cosh)) + (export "libmf.exp" (func $../../lib/libm/assembly/libmf/exp)) + (export "libmf.expm1" (func $../../lib/libm/assembly/libmf/expm1)) + (export "libmf.floor" (func $../../lib/libm/assembly/libmf/floor)) + (export "libmf.fround" (func $../../lib/libm/assembly/libmf/fround)) + (export "libmf.hypot" (func $../../lib/libm/assembly/libmf/hypot)) + (export "libmf.imul" (func $../../lib/libm/assembly/libmf/imul)) + (export "libmf.log" (func $../../lib/libm/assembly/libmf/log)) + (export "libmf.log10" (func $../../lib/libm/assembly/libmf/log10)) + (export "libmf.log1p" (func $../../lib/libm/assembly/libmf/log1p)) + (export "libmf.log2" (func $../../lib/libm/assembly/libmf/log2)) + (export "libmf.max" (func $../../lib/libm/assembly/libmf/max)) + (export "libmf.min" (func $../../lib/libm/assembly/libmf/min)) + (export "libmf.pow" (func $../../lib/libm/assembly/libmf/pow)) + (export "libmf.round" (func $../../lib/libm/assembly/libmf/round)) + (export "libmf.sign" (func $../../lib/libm/assembly/libmf/sign)) + (export "libmf.sin" (func $../../lib/libm/assembly/libmf/sin)) + (export "libmf.sinh" (func $../../lib/libm/assembly/libmf/sinh)) + (export "libmf.sqrt" (func $../../lib/libm/assembly/libmf/sqrt)) + (export "libmf.tan" (func $../../lib/libm/assembly/libmf/tan)) + (export "libmf.tanh" (func $../../lib/libm/assembly/libmf/tanh)) + (export "libmf.trunc" (func $../../lib/libm/assembly/libmf/trunc)) + (func $../../lib/libm/assembly/libm/abs (; 3 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 f64.abs ) - (func $~lib/math/R (; 1 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/R (; 4 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 f64.const 0.16666666666666666 local.get $0 @@ -104,7 +164,7 @@ f64.add f64.div ) - (func $~lib/math/NativeMath.acos (; 2 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.acos (; 5 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -228,11 +288,11 @@ f64.add f64.mul ) - (func $std/libm/acos (; 3 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/acos (; 6 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.acos ) - (func $~lib/math/NativeMath.log1p (; 4 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log1p (; 7 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -431,7 +491,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.log (; 5 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log (; 8 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) (local $3 f64) @@ -602,7 +662,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.acosh (; 6 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.acosh (; 9 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) local.get $0 i64.reinterpret_f64 @@ -656,11 +716,11 @@ f64.const 0.6931471805599453 f64.add ) - (func $std/libm/acosh (; 7 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/acosh (; 10 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.acosh ) - (func $~lib/math/NativeMath.asin (; 8 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asin (; 11 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -798,11 +858,11 @@ end local.get $0 ) - (func $std/libm/asin (; 9 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/asin (; 12 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.asin ) - (func $~lib/math/NativeMath.asinh (; 10 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asinh (; 13 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) local.get $0 @@ -872,16 +932,16 @@ local.get $0 f64.copysign ) - (func $std/libm/asinh (; 11 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/asinh (; 14 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.asinh ) - (func $~lib/builtins/isNaN (; 12 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 15 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/math/NativeMath.atan (; 13 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atan (; 16 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1106,11 +1166,11 @@ local.get $3 f64.copysign ) - (func $std/libm/atan (; 14 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/atan (; 17 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.atan ) - (func $~lib/math/NativeMath.atanh (; 15 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atanh (; 18 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 f64) @@ -1167,11 +1227,11 @@ local.get $0 f64.copysign ) - (func $std/libm/atanh (; 16 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/atanh (; 19 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.atanh ) - (func $~lib/math/NativeMath.atan2 (; 17 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.atan2 (; 20 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1419,12 +1479,12 @@ i32.and select ) - (func $std/libm/atan2 (; 18 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/atan2 (; 21 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 ) - (func $~lib/math/NativeMath.cbrt (; 19 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cbrt (; 22 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1546,22 +1606,22 @@ f64.mul f64.add ) - (func $std/libm/cbrt (; 20 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cbrt (; 23 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cbrt ) - (func $std/libm/ceil (; 21 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/ceil (; 24 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 f64.ceil ) - (func $~lib/builtins/isFinite (; 22 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 25 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/math/NativeMath.clz32 (; 23 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.clz32 (; 26 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/builtins/isFinite i32.eqz @@ -1582,14 +1642,15 @@ i32.clz f64.convert_i32_s ) - (func $std/libm/clz32 (; 24 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/clz32 (; 27 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.clz32 ) - (func $std/libm/cos (; 25 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) - unreachable + (func $../../lib/libm/assembly/libm/cos (; 28 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/bindings/Math/cos ) - (func $~lib/math/NativeMath.expm1 (; 26 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 29 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1861,7 +1922,7 @@ local.get $4 f64.mul ) - (func $~lib/math/NativeMath.scalbn (; 27 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 30 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -1938,7 +1999,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.exp (; 28 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 31 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -2090,7 +2151,7 @@ local.get $1 call $~lib/math/NativeMath.scalbn ) - (func $~lib/math/NativeMath.cosh (; 29 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cosh (; 32 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) local.get $0 @@ -2154,27 +2215,28 @@ f64.const 2247116418577894884661631e283 f64.mul ) - (func $std/libm/cosh (; 30 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cosh (; 33 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cosh ) - (func $std/libm/exp (; 31 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/exp (; 34 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.exp ) - (func $std/libm/expm1 (; 32 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/expm1 (; 35 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.expm1 ) - (func $std/libm/floor (; 33 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/floor (; 36 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 f64.floor ) - (func $std/libm/fround (; 34 ;) (type $FUNCSIG$fd) (param $0 f64) (result f32) + (func $../../lib/libm/assembly/libm/fround (; 37 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 f32.demote_f64 + f64.promote_f32 ) - (func $~lib/math/NativeMath.hypot (; 35 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 38 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 f64) (local $4 i64) @@ -2347,12 +2409,12 @@ f64.sqrt f64.mul ) - (func $std/libm/hypot (; 36 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/hypot (; 39 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot ) - (func $~lib/math/NativeMath.imul (; 37 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.imul (; 40 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.add @@ -2385,16 +2447,16 @@ i32.mul f64.convert_i32_s ) - (func $std/libm/imul (; 38 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/imul (; 41 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.imul ) - (func $std/libm/log (; 39 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log (; 42 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log ) - (func $~lib/math/NativeMath.log10 (; 40 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 43 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -2598,15 +2660,15 @@ local.get $1 f64.add ) - (func $std/libm/log10 (; 41 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log10 (; 44 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log10 ) - (func $std/libm/log1p (; 42 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log1p (; 45 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log1p ) - (func $~lib/math/NativeMath.log2 (; 43 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 46 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -2803,21 +2865,21 @@ local.get $1 f64.add ) - (func $std/libm/log2 (; 44 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log2 (; 47 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log2 ) - (func $std/libm/max (; 45 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/max (; 48 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.max ) - (func $std/libm/min (; 46 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/min (; 49 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.min ) - (func $~lib/math/NativeMath.pow (; 47 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 50 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -3729,12 +3791,12 @@ f64.const 1e-300 f64.mul ) - (func $std/libm/pow (; 48 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/pow (; 51 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.pow ) - (func $std/libm/round (; 49 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/round (; 52 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 f64.const 0.5 f64.add @@ -3742,7 +3804,7 @@ local.get $0 f64.copysign ) - (func $std/libm/sign (; 50 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sign (; 53 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 f64.abs f64.const 0 @@ -3755,7 +3817,11 @@ end local.get $0 ) - (func $~lib/math/NativeMath.sinh (; 51 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sin (; 54 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/bindings/Math/sin + ) + (func $~lib/math/NativeMath.sinh (; 55 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 i32) @@ -3832,15 +3898,19 @@ f64.mul f64.mul ) - (func $std/libm/sinh (; 52 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sinh (; 56 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sinh ) - (func $std/libm/sqrt (; 53 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sqrt (; 57 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 f64.sqrt ) - (func $~lib/math/NativeMath.tanh (; 54 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tan (; 58 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/bindings/Math/tan + ) + (func $~lib/math/NativeMath.tanh (; 59 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -3919,15 +3989,4115 @@ local.get $0 f64.copysign ) - (func $std/libm/tanh (; 55 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tanh (; 60 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tanh ) - (func $std/libm/trunc (; 56 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/trunc (; 61 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 f64.trunc ) - (func $null (; 57 ;) (type $FUNCSIG$v) + (func $../../lib/libm/assembly/libmf/abs (; 62 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.abs + ) + (func $~lib/math/Rf (; 63 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.const 0.16666586697101593 + local.get $0 + f32.const -0.04274342209100723 + local.get $0 + f32.const -0.008656363002955914 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.const 1 + local.get $0 + f32.const -0.7066296339035034 + f32.mul + f32.add + f32.div + ) + (func $~lib/math/NativeMathf.acos (; 64 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $3 + i32.const 2147483647 + i32.and + local.tee $2 + i32.const 1065353216 + i32.ge_u + if + local.get $2 + i32.const 1065353216 + i32.eq + if + local.get $3 + i32.const 31 + i32.shr_u + if + f32.const 3.141592502593994 + return + end + f32.const 0 + return + end + f32.const 0 + local.get $0 + local.get $0 + f32.sub + f32.div + return + end + local.get $2 + i32.const 1056964608 + i32.lt_u + if + local.get $2 + i32.const 847249408 + i32.le_u + if + f32.const 1.570796251296997 + return + end + f32.const 1.570796251296997 + local.get $0 + f32.const 7.549789415861596e-08 + local.get $0 + local.get $0 + local.get $0 + f32.mul + call $~lib/math/Rf + f32.mul + f32.sub + f32.sub + f32.sub + return + end + local.get $3 + i32.const 31 + i32.shr_u + if + f32.const 2 + f32.const 1.570796251296997 + f32.const 0.5 + local.get $0 + f32.const 0.5 + f32.mul + f32.add + local.tee $0 + f32.sqrt + local.tee $1 + local.get $0 + call $~lib/math/Rf + local.get $1 + f32.mul + f32.const 7.549789415861596e-08 + f32.sub + f32.add + f32.sub + f32.mul + return + end + f32.const 2 + f32.const 0.5 + local.get $0 + f32.const 0.5 + f32.mul + f32.sub + local.tee $1 + f32.sqrt + local.tee $4 + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $0 + local.get $1 + call $~lib/math/Rf + local.get $4 + f32.mul + local.get $1 + local.get $0 + local.get $0 + f32.mul + f32.sub + local.get $4 + local.get $0 + f32.add + f32.div + f32.add + f32.add + f32.mul + ) + (func $../../lib/libm/assembly/libmf/acos (; 65 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.acos + ) + (func $~lib/math/NativeMathf.log1p (; 66 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + i32.const 1 + local.set $3 + local.get $0 + i32.reinterpret_f32 + local.tee $2 + i32.const 1054086096 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $2 + i32.const 31 + i32.shr_u + end + if + local.get $2 + i32.const -1082130432 + i32.ge_u + if + local.get $0 + f32.const -1 + f32.eq + if + local.get $0 + f32.const 0 + f32.div + return + end + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.div + return + end + local.get $2 + i32.const 1 + i32.shl + i32.const 1728053248 + i32.lt_u + if + local.get $0 + return + end + local.get $2 + i32.const -1097468391 + i32.le_u + if + i32.const 0 + local.set $3 + local.get $0 + local.set $1 + end + else + local.get $2 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + return + end + end + local.get $3 + if + f32.const 1 + local.get $0 + f32.add + local.tee $1 + i32.reinterpret_f32 + i32.const 4913933 + i32.add + local.tee $2 + i32.const 23 + i32.shr_u + i32.const 127 + i32.sub + local.tee $3 + i32.const 25 + i32.lt_s + if (result f32) + f32.const 1 + local.get $1 + local.get $0 + f32.sub + f32.sub + local.get $0 + local.get $1 + f32.const 1 + f32.sub + f32.sub + local.get $3 + i32.const 2 + i32.ge_s + select + local.get $1 + f32.div + else + f32.const 0 + end + local.set $5 + local.get $2 + i32.const 8388607 + i32.and + i32.const 1060439283 + i32.add + f32.reinterpret_i32 + f32.const 1 + f32.sub + local.set $1 + end + local.get $1 + f32.const 2 + local.get $1 + f32.add + f32.div + local.tee $4 + local.get $4 + f32.mul + local.tee $6 + local.get $6 + f32.mul + local.set $0 + local.get $4 + f32.const 0.5 + local.get $1 + f32.mul + local.get $1 + f32.mul + local.tee $4 + local.get $6 + f32.const 0.6666666269302368 + local.get $0 + f32.const 0.2849878668785095 + f32.mul + f32.add + f32.mul + local.get $0 + f32.const 0.40000972151756287 + local.get $0 + f32.const 0.24279078841209412 + f32.mul + f32.add + f32.mul + f32.add + f32.add + f32.mul + local.get $3 + f32.convert_i32_s + local.tee $0 + f32.const 9.05800061445916e-06 + f32.mul + local.get $5 + f32.add + f32.add + local.get $4 + f32.sub + local.get $1 + f32.add + local.get $0 + f32.const 0.6931381225585938 + f32.mul + f32.add + ) + (func $~lib/math/NativeMathf.log (; 67 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + (local $4 i32) + (local $5 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $1 + i32.const 8388608 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 31 + i32.shr_u + end + if + local.get $1 + i32.const 1 + i32.shl + i32.eqz + if + f32.const -1 + local.get $0 + local.get $0 + f32.mul + f32.div + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.div + return + end + i32.const -25 + local.set $4 + local.get $0 + f32.const 33554432 + f32.mul + i32.reinterpret_f32 + local.set $1 + else + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + return + else + local.get $1 + i32.const 1065353216 + i32.eq + if + f32.const 0 + return + end + end + end + local.get $1 + i32.const 4913933 + i32.add + local.tee $1 + i32.const 8388607 + i32.and + i32.const 1060439283 + i32.add + f32.reinterpret_i32 + f32.const 1 + f32.sub + local.tee $0 + f32.const 2 + local.get $0 + f32.add + f32.div + local.tee $3 + local.get $3 + f32.mul + local.tee $5 + local.get $5 + f32.mul + local.set $2 + local.get $3 + f32.const 0.5 + local.get $0 + f32.mul + local.get $0 + f32.mul + local.tee $3 + local.get $5 + f32.const 0.6666666269302368 + local.get $2 + f32.const 0.2849878668785095 + f32.mul + f32.add + f32.mul + local.get $2 + f32.const 0.40000972151756287 + local.get $2 + f32.const 0.24279078841209412 + f32.mul + f32.add + f32.mul + f32.add + f32.add + f32.mul + local.get $1 + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + local.get $4 + i32.add + f32.convert_i32_s + local.tee $2 + f32.const 9.05800061445916e-06 + f32.mul + f32.add + local.get $3 + f32.sub + local.get $0 + f32.add + local.get $2 + f32.const 0.6931381225585938 + f32.mul + f32.add + ) + (func $~lib/math/NativeMathf.acosh (; 68 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + f32.const 1 + f32.sub + local.tee $0 + local.get $0 + local.get $0 + f32.const 2 + f32.add + f32.mul + f32.sqrt + f32.add + call $~lib/math/NativeMathf.log1p + return + end + local.get $1 + i32.const 1166016512 + i32.lt_u + if + f32.const 2 + local.get $0 + f32.mul + f32.const 1 + local.get $0 + local.get $0 + local.get $0 + f32.mul + f32.const 1 + f32.sub + f32.sqrt + f32.add + f32.div + f32.sub + call $~lib/math/NativeMathf.log + return + end + local.get $0 + call $~lib/math/NativeMathf.log + f32.const 0.6931471824645996 + f32.add + ) + (func $../../lib/libm/assembly/libmf/acosh (; 69 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.acosh + ) + (func $~lib/math/NativeMathf.asin (; 70 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f64) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1065353216 + i32.ge_u + if + local.get $1 + i32.const 1065353216 + i32.eq + if + local.get $0 + f32.const 1.5707963705062866 + f32.mul + f32.const 7.52316384526264e-37 + f32.add + return + end + f32.const 0 + local.get $0 + local.get $0 + f32.sub + f32.div + return + end + local.get $1 + i32.const 1056964608 + i32.lt_u + if + local.get $1 + i32.const 8388608 + i32.ge_u + i32.const 0 + local.get $1 + i32.const 964689920 + i32.lt_u + select + if + local.get $0 + return + end + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f32.mul + call $~lib/math/Rf + f32.mul + f32.add + return + end + f64.const 1.5707963705062866 + f64.const 2 + f32.const 0.5 + local.get $0 + f32.abs + f32.const 0.5 + f32.mul + f32.sub + local.tee $2 + f64.promote_f32 + f64.sqrt + local.tee $3 + local.get $3 + local.get $2 + call $~lib/math/Rf + f64.promote_f32 + f64.mul + f64.add + f64.mul + f64.sub + f32.demote_f64 + local.get $0 + f32.copysign + ) + (func $../../lib/libm/assembly/libmf/asin (; 71 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.asin + ) + (func $~lib/math/NativeMathf.asinh (; 72 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $2 + f32.reinterpret_i32 + local.set $1 + local.get $2 + i32.const 1166016512 + i32.ge_u + if (result f32) + local.get $1 + call $~lib/math/NativeMathf.log + f32.const 0.6931471824645996 + f32.add + else + local.get $2 + i32.const 1073741824 + i32.ge_u + if (result f32) + f32.const 2 + local.get $1 + f32.mul + f32.const 1 + local.get $1 + local.get $1 + f32.mul + f32.const 1 + f32.add + f32.sqrt + local.get $1 + f32.add + f32.div + f32.add + call $~lib/math/NativeMathf.log + else + local.get $2 + i32.const 964689920 + i32.ge_u + if (result f32) + local.get $1 + local.get $1 + local.get $1 + f32.mul + local.tee $1 + local.get $1 + f32.const 1 + f32.add + f32.sqrt + f32.const 1 + f32.add + f32.div + f32.add + call $~lib/math/NativeMathf.log1p + else + local.get $1 + end + end + end + local.get $0 + f32.copysign + ) + (func $../../lib/libm/assembly/libmf/asinh (; 73 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.asinh + ) + (func $~lib/builtins/isNaN (; 74 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.ne + ) + (func $~lib/math/NativeMathf.atan (; 75 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + (local $4 f32) + local.get $0 + local.set $4 + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1283457024 + i32.ge_u + if + local.get $0 + call $~lib/builtins/isNaN + if + local.get $0 + return + end + f32.const 1.570796251296997 + local.get $4 + f32.copysign + return + end + local.get $1 + i32.const 1054867456 + i32.lt_u + if + local.get $1 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + i32.const -1 + local.set $1 + else + local.get $0 + f32.abs + local.set $0 + local.get $1 + i32.const 1066926080 + i32.lt_u + if (result f32) + local.get $1 + i32.const 1060110336 + i32.lt_u + if (result f32) + i32.const 0 + local.set $1 + f32.const 2 + local.get $0 + f32.mul + f32.const 1 + f32.sub + f32.const 2 + local.get $0 + f32.add + f32.div + else + i32.const 1 + local.set $1 + local.get $0 + f32.const 1 + f32.sub + local.get $0 + f32.const 1 + f32.add + f32.div + end + else + local.get $1 + i32.const 1075576832 + i32.lt_u + if (result f32) + i32.const 2 + local.set $1 + local.get $0 + f32.const 1.5 + f32.sub + f32.const 1 + f32.const 1.5 + local.get $0 + f32.mul + f32.add + f32.div + else + i32.const 3 + local.set $1 + f32.const -1 + local.get $0 + f32.div + end + end + local.set $0 + end + local.get $0 + local.get $0 + f32.mul + local.tee $2 + local.get $2 + f32.mul + local.set $3 + local.get $0 + local.get $2 + f32.const 0.333333283662796 + local.get $3 + f32.const 0.14253635704517365 + local.get $3 + f32.const 0.06168760731816292 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + local.get $3 + f32.const -0.19999158382415771 + local.get $3 + f32.const -0.106480173766613 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + local.set $2 + local.get $1 + i32.const 0 + i32.lt_s + if + local.get $0 + local.get $2 + f32.sub + return + end + block $break|0 + block $case4|0 + block $case3|0 + block $case2|0 + block $case1|0 + local.get $1 + if + block $tablify|0 + local.get $1 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $tablify|0 + end + br $case4|0 + end + f32.const 0.46364760398864746 + local.get $2 + f32.const 5.01215824399992e-09 + f32.sub + local.get $0 + f32.sub + f32.sub + local.set $0 + br $break|0 + end + f32.const 0.7853981256484985 + local.get $2 + f32.const 3.774894707930798e-08 + f32.sub + local.get $0 + f32.sub + f32.sub + local.set $0 + br $break|0 + end + f32.const 0.9827936887741089 + local.get $2 + f32.const 3.447321716976148e-08 + f32.sub + local.get $0 + f32.sub + f32.sub + local.set $0 + br $break|0 + end + f32.const 1.570796251296997 + local.get $2 + f32.const 7.549789415861596e-08 + f32.sub + local.get $0 + f32.sub + f32.sub + local.set $0 + br $break|0 + end + unreachable + end + local.get $0 + local.get $4 + f32.copysign + ) + (func $../../lib/libm/assembly/libmf/atan (; 76 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.atan + ) + (func $~lib/math/NativeMathf.atanh (; 77 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $2 + f32.reinterpret_i32 + local.set $1 + local.get $2 + i32.const 1056964608 + i32.lt_u + if (result f32) + local.get $2 + i32.const 796917760 + i32.ge_u + if (result f32) + f32.const 0.5 + f32.const 2 + local.get $1 + f32.mul + f32.const 1 + local.get $1 + f32.const 1 + local.get $1 + f32.sub + f32.div + f32.add + f32.mul + call $~lib/math/NativeMathf.log1p + f32.mul + else + local.get $1 + end + else + f32.const 0.5 + f32.const 2 + local.get $1 + f32.const 1 + local.get $1 + f32.sub + f32.div + f32.mul + call $~lib/math/NativeMathf.log1p + f32.mul + end + local.get $0 + f32.copysign + ) + (func $../../lib/libm/assembly/libmf/atanh (; 78 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.atanh + ) + (func $~lib/math/NativeMathf.atan2 (; 79 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + call $~lib/builtins/isNaN + if (result i32) + i32.const 1 + else + local.get $0 + call $~lib/builtins/isNaN + end + if + local.get $1 + local.get $0 + f32.add + return + end + local.get $0 + i32.reinterpret_f32 + local.set $3 + local.get $1 + i32.reinterpret_f32 + local.tee $4 + i32.const 1065353216 + i32.eq + if + local.get $0 + call $~lib/math/NativeMathf.atan + return + end + local.get $4 + i32.const 30 + i32.shr_u + i32.const 2 + i32.and + local.get $3 + i32.const 31 + i32.shr_u + i32.or + local.set $2 + local.get $4 + i32.const 2147483647 + i32.and + local.set $4 + local.get $3 + i32.const 2147483647 + i32.and + local.tee $3 + i32.eqz + if + block $break|0 + block $case3|0 + block $case2|0 + local.get $2 + i32.eqz + local.get $2 + i32.const 1 + i32.eq + i32.or + i32.eqz + if + local.get $2 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $2 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + local.get $0 + return + end + f32.const 3.1415927410125732 + return + end + f32.const -3.1415927410125732 + return + end + end + block $folding-inner0 + local.get $4 + i32.eqz + br_if $folding-inner0 + local.get $4 + i32.const 2139095040 + i32.eq + if + local.get $3 + i32.const 2139095040 + i32.eq + if + block $break|1 + block $case3|1 + block $case2|1 + block $case1|1 + local.get $2 + if + block $tablify|0 + local.get $2 + i32.const 1 + i32.sub + br_table $case1|1 $case2|1 $case3|1 $tablify|0 + end + br $break|1 + end + f32.const 0.7853981852531433 + return + end + f32.const -0.7853981852531433 + return + end + f32.const 2.356194496154785 + return + end + f32.const -2.356194496154785 + return + end + else + block $break|2 + block $case3|2 + block $case2|2 + block $case1|2 + local.get $2 + if + block $tablify|00 + local.get $2 + i32.const 1 + i32.sub + br_table $case1|2 $case2|2 $case3|2 $tablify|00 + end + br $break|2 + end + f32.const 0 + return + end + f32.const 0 + return + end + f32.const 3.1415927410125732 + return + end + f32.const -3.1415927410125732 + return + end + end + end + i32.const 1 + local.get $3 + i32.const 2139095040 + i32.eq + local.get $4 + i32.const 218103808 + i32.add + local.get $3 + i32.lt_u + select + br_if $folding-inner0 + local.get $3 + i32.const 218103808 + i32.add + local.get $4 + i32.lt_u + i32.const 0 + local.get $2 + i32.const 2 + i32.and + select + if (result f32) + f32.const 0 + else + local.get $0 + local.get $1 + f32.div + f32.abs + call $~lib/math/NativeMathf.atan + end + local.set $0 + block $break|3 + block $case3|3 + block $case2|3 + block $case1|3 + local.get $2 + if + block $tablify|01 + local.get $2 + i32.const 1 + i32.sub + br_table $case1|3 $case2|3 $case3|3 $tablify|01 + end + br $break|3 + end + local.get $0 + return + end + local.get $0 + f32.neg + return + end + f32.const 3.1415927410125732 + local.get $0 + f32.const -8.742277657347586e-08 + f32.sub + f32.sub + return + end + local.get $0 + f32.const -8.742277657347586e-08 + f32.sub + f32.const 3.1415927410125732 + f32.sub + return + end + unreachable + end + f32.const -1.5707963705062866 + f32.const 1.5707963705062866 + local.get $2 + i32.const 1 + i32.and + select + ) + (func $../../lib/libm/assembly/libmf/atan2 (; 80 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.atan2 + ) + (func $~lib/math/NativeMathf.cbrt (; 81 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f64) + (local $2 f64) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.reinterpret_f32 + local.tee $4 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.add + return + end + local.get $3 + i32.const 8388608 + i32.lt_u + if (result i32) + local.get $3 + i32.eqz + if + local.get $0 + return + end + local.get $0 + f32.const 16777216 + f32.mul + i32.reinterpret_f32 + local.tee $4 + i32.const 2147483647 + i32.and + i32.const 3 + i32.div_u + i32.const 642849266 + i32.add + else + local.get $3 + i32.const 3 + i32.div_u + i32.const 709958130 + i32.add + end + local.get $4 + i32.const -2147483648 + i32.and + i32.or + f32.reinterpret_i32 + f64.promote_f32 + local.tee $1 + local.get $1 + f64.mul + local.get $1 + f64.mul + local.set $2 + local.get $1 + local.get $0 + f64.promote_f32 + local.get $0 + f64.promote_f32 + f64.add + local.get $2 + f64.add + f64.mul + local.get $0 + f64.promote_f32 + local.get $2 + f64.add + local.get $2 + f64.add + f64.div + local.tee $1 + local.get $1 + f64.mul + local.get $1 + f64.mul + local.set $2 + local.get $1 + local.get $0 + f64.promote_f32 + local.get $0 + f64.promote_f32 + f64.add + local.get $2 + f64.add + f64.mul + local.get $0 + f64.promote_f32 + local.get $2 + f64.add + local.get $2 + f64.add + f64.div + f32.demote_f64 + ) + (func $../../lib/libm/assembly/libmf/cbrt (; 82 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.cbrt + ) + (func $../../lib/libm/assembly/libmf/ceil (; 83 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.ceil + ) + (func $~lib/builtins/isFinite (; 84 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.eq + ) + (func $~lib/math/NativeMathf.clz32 (; 85 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/builtins/isFinite + i32.eqz + if + f32.const 32 + return + end + local.get $0 + f32.const 4294967296 + local.get $0 + f32.const 2.3283064365386963e-10 + f32.mul + f32.floor + f32.mul + f32.sub + i64.trunc_f32_s + i32.wrap_i64 + i32.clz + f32.convert_i32_s + ) + (func $../../lib/libm/assembly/libmf/clz32 (; 86 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.clz32 + ) + (func $~lib/array/Array#__unchecked_get (; 87 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) + i32.const 76 + i32.load + local.get $0 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/math/NativeMathf.cos (; 88 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f64) + (local $2 i32) + (local $3 f64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i64) + local.get $0 + i32.reinterpret_f32 + local.tee $2 + i32.const 31 + i32.shr_u + local.set $8 + local.get $2 + i32.const 2147483647 + i32.and + local.tee $2 + i32.const 1061752794 + i32.le_u + if + local.get $2 + i32.const 964689920 + i32.lt_u + if + f32.const 1 + return + end + local.get $0 + f64.promote_f32 + local.tee $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $3 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $3 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $3 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return + end + local.get $2 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + return + end + block $~lib/math/rempio2f|inlined.0 (result i32) + local.get $2 + i32.const 1305022427 + i32.lt_u + if + local.get $0 + f64.promote_f32 + local.get $0 + f64.promote_f32 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.tee $1 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $1 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $1 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.0 + end + local.get $2 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.tee $4 + i32.const 6 + i32.shr_s + local.tee $7 + call $~lib/array/Array#__unchecked_get + local.set $9 + local.get $7 + i32.const 1 + i32.add + call $~lib/array/Array#__unchecked_get + local.set $5 + local.get $4 + i32.const 63 + i32.and + local.tee $4 + i32.const 32 + i32.gt_s + if (result i64) + local.get $5 + local.get $4 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + local.get $7 + i32.const 2 + i32.add + call $~lib/array/Array#__unchecked_get + i64.const 96 + local.get $4 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + else + local.get $5 + i64.const 32 + local.get $4 + i64.extend_i32_s + i64.sub + i64.shr_u + end + local.set $6 + f64.const 8.515303950216386e-20 + local.get $0 + f64.promote_f32 + f64.copysign + local.get $2 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.tee $10 + local.get $9 + local.get $4 + i64.extend_i32_s + i64.shl + local.get $5 + i64.const 64 + local.get $4 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + i64.mul + local.get $6 + local.get $10 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $5 + i64.const 2 + i64.shl + local.tee $6 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + i32.const 0 + local.get $5 + i64.const 62 + i64.shr_u + local.get $6 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.tee $2 + i32.sub + local.get $2 + local.get $8 + select + end + local.set $2 + global.get $~lib/math/rempio2f_y + local.set $1 + local.get $2 + i32.const 1 + i32.and + if (result f32) + local.get $1 + local.get $1 + local.get $1 + f64.mul + local.tee $3 + local.get $1 + f64.mul + local.tee $1 + f64.const -0.16666666641626524 + local.get $3 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $1 + local.get $3 + local.get $3 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $3 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + else + local.get $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $3 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $3 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $3 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + end + local.set $0 + local.get $2 + i32.const 1 + i32.add + i32.const 2 + i32.and + if + local.get $0 + f32.neg + local.set $0 + end + local.get $0 + ) + (func $../../lib/libm/assembly/libmf/cos (; 89 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.cos + ) + (func $~lib/math/NativeMathf.expm1 (; 90 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + (local $4 f32) + (local $5 i32) + (local $6 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $1 + i32.const 31 + i32.shr_u + local.set $5 + local.get $1 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1100331076 + i32.ge_u + if + local.get $1 + i32.const 2139095040 + i32.gt_u + if + local.get $0 + return + end + local.get $5 + if + f32.const -1 + return + end + local.get $0 + f32.const 88.7216796875 + f32.gt + if + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + return + end + end + local.get $1 + i32.const 1051816472 + i32.gt_u + if + local.get $0 + i32.const 1 + local.get $5 + i32.const 1 + i32.shl + i32.sub + f32.const 1.4426950216293335 + local.get $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.copysign + f32.add + i32.trunc_f32_s + local.get $1 + i32.const 1065686418 + i32.lt_u + select + local.tee $1 + f32.convert_i32_s + local.tee $0 + f32.const 0.6931381225585938 + f32.mul + f32.sub + local.tee $2 + local.get $2 + local.get $0 + f32.const 9.05800061445916e-06 + f32.mul + local.tee $2 + f32.sub + local.tee $0 + f32.sub + local.get $2 + f32.sub + local.set $4 + else + local.get $1 + i32.const 855638016 + i32.lt_u + if (result i32) + local.get $0 + return + else + i32.const 0 + end + local.set $1 + end + f32.const 3 + f32.const 1 + local.get $0 + f32.const 0.5 + local.get $0 + f32.mul + local.tee $3 + f32.mul + local.tee $2 + f32.const -0.03333321213722229 + local.get $2 + f32.const 1.5807170420885086e-03 + f32.mul + f32.add + f32.mul + f32.add + local.tee $6 + local.get $3 + f32.mul + f32.sub + local.set $3 + local.get $2 + local.get $6 + local.get $3 + f32.sub + f32.const 6 + local.get $0 + local.get $3 + f32.mul + f32.sub + f32.div + f32.mul + local.set $3 + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + local.get $3 + f32.mul + local.get $2 + f32.sub + f32.sub + return + end + local.get $0 + local.get $3 + local.get $4 + f32.sub + f32.mul + local.get $4 + f32.sub + local.get $2 + f32.sub + local.set $2 + local.get $1 + i32.const -1 + i32.eq + if + f32.const 0.5 + local.get $0 + local.get $2 + f32.sub + f32.mul + f32.const 0.5 + f32.sub + return + end + local.get $1 + i32.const 1 + i32.eq + if + local.get $0 + f32.const -0.25 + f32.lt + if + f32.const -2 + local.get $2 + local.get $0 + f32.const 0.5 + f32.add + f32.sub + f32.mul + return + end + f32.const 1 + f32.const 2 + local.get $0 + local.get $2 + f32.sub + f32.mul + f32.add + return + end + local.get $1 + i32.const 127 + i32.add + i32.const 23 + i32.shl + f32.reinterpret_i32 + local.set $4 + i32.const 1 + local.get $1 + i32.const 56 + i32.gt_s + local.get $1 + i32.const 0 + i32.lt_s + select + if + local.get $0 + local.get $2 + f32.sub + f32.const 1 + f32.add + local.set $0 + local.get $0 + f32.const 2 + f32.mul + f32.const 1701411834604692317316873e14 + f32.mul + local.get $0 + local.get $4 + f32.mul + local.get $1 + i32.const 128 + i32.eq + select + f32.const 1 + f32.sub + return + end + i32.const 127 + local.get $1 + i32.sub + i32.const 23 + i32.shl + f32.reinterpret_i32 + local.set $3 + local.get $0 + f32.const 1 + local.get $3 + f32.sub + local.get $2 + f32.sub + f32.const 1 + local.get $2 + local.get $3 + f32.add + f32.sub + local.get $1 + i32.const 20 + i32.lt_s + select + f32.add + local.get $4 + f32.mul + ) + (func $~lib/math/NativeMathf.scalbn (; 91 ;) (type $FUNCSIG$ffi) (param $0 f32) (param $1 i32) (result f32) + local.get $1 + i32.const 127 + i32.gt_s + if (result f32) + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + local.set $0 + local.get $1 + i32.const 127 + i32.sub + local.tee $1 + i32.const 127 + i32.gt_s + if (result f32) + local.get $1 + i32.const 127 + i32.sub + local.tee $1 + i32.const 127 + local.get $1 + i32.const 127 + i32.lt_s + select + local.set $1 + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + else + local.get $0 + end + else + local.get $1 + i32.const -126 + i32.lt_s + if (result f32) + local.get $0 + f32.const 1.9721522630525295e-31 + f32.mul + local.set $0 + local.get $1 + i32.const 102 + i32.add + local.tee $1 + i32.const -126 + i32.lt_s + if (result f32) + local.get $1 + i32.const 102 + i32.add + local.tee $1 + i32.const -126 + local.get $1 + i32.const -126 + i32.gt_s + select + local.set $1 + local.get $0 + f32.const 1.9721522630525295e-31 + f32.mul + else + local.get $0 + end + else + local.get $0 + end + end + local.get $1 + i32.const 127 + i32.add + i32.const 23 + i32.shl + f32.reinterpret_i32 + f32.mul + ) + (func $~lib/math/NativeMathf.exp (; 92 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + (local $4 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $1 + i32.const 31 + i32.shr_u + local.set $2 + local.get $1 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1118743632 + i32.ge_u + if + local.get $1 + i32.const 1118925336 + i32.ge_u + if + local.get $2 + if + local.get $1 + i32.const 1120924085 + i32.ge_u + if + f32.const 0 + return + end + else + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + return + end + end + end + local.get $1 + i32.const 1051816472 + i32.gt_u + if + local.get $0 + local.get $1 + i32.const 1065686418 + i32.gt_u + if (result i32) + f32.const 1.4426950216293335 + local.get $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.copysign + f32.add + i32.trunc_f32_s + else + i32.const 1 + local.get $2 + i32.const 1 + i32.shl + i32.sub + end + local.tee $1 + f32.convert_i32_s + f32.const 0.693145751953125 + f32.mul + f32.sub + local.tee $3 + local.get $1 + f32.convert_i32_s + f32.const 1.428606765330187e-06 + f32.mul + local.tee $4 + f32.sub + local.set $0 + else + local.get $1 + i32.const 956301312 + i32.gt_u + if (result f32) + i32.const 0 + local.set $1 + local.get $0 + else + f32.const 1 + local.get $0 + f32.add + return + end + local.set $3 + end + f32.const 1 + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f32.mul + local.tee $0 + f32.const 0.16666625440120697 + local.get $0 + f32.const -2.7667332906275988e-03 + f32.mul + f32.add + f32.mul + f32.sub + local.tee $0 + f32.mul + f32.const 2 + local.get $0 + f32.sub + f32.div + local.get $4 + f32.sub + local.get $3 + f32.add + f32.add + local.set $0 + local.get $1 + i32.eqz + if + local.get $0 + return + end + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.scalbn + ) + (func $~lib/math/NativeMathf.cosh (; 93 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + f32.reinterpret_i32 + local.set $0 + local.get $1 + i32.const 1060205079 + i32.lt_u + if + local.get $1 + i32.const 964689920 + i32.lt_u + if + f32.const 1 + return + end + f32.const 1 + local.get $0 + call $~lib/math/NativeMathf.expm1 + local.tee $0 + local.get $0 + f32.mul + f32.const 2 + f32.const 2 + local.get $0 + f32.mul + f32.add + f32.div + f32.add + return + end + local.get $1 + i32.const 1118925335 + i32.lt_u + if + f32.const 0.5 + local.get $0 + call $~lib/math/NativeMathf.exp + local.tee $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.div + f32.add + return + end + local.get $0 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 + f32.mul + ) + (func $../../lib/libm/assembly/libmf/cosh (; 94 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.cosh + ) + (func $../../lib/libm/assembly/libmf/exp (; 95 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.exp + ) + (func $../../lib/libm/assembly/libmf/expm1 (; 96 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.expm1 + ) + (func $../../lib/libm/assembly/libmf/floor (; 97 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.floor + ) + (func $../../lib/libm/assembly/libmf/fround (; 98 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + ) + (func $~lib/math/NativeMathf.hypot (; 99 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + (local $5 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $3 + local.get $1 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $2 + i32.lt_u + if + local.get $3 + local.set $5 + local.get $2 + local.set $3 + local.get $5 + local.set $2 + end + local.get $3 + f32.reinterpret_i32 + local.set $0 + local.get $2 + f32.reinterpret_i32 + local.set $1 + local.get $2 + i32.const 2139095040 + i32.eq + if + local.get $1 + return + end + i32.const 1 + local.get $3 + local.get $2 + i32.sub + i32.const 209715200 + i32.ge_u + i32.const 1 + local.get $2 + i32.eqz + local.get $3 + i32.const 2139095040 + i32.ge_u + select + select + if + local.get $0 + local.get $1 + f32.add + return + end + f32.const 1 + local.set $4 + local.get $3 + i32.const 1568669696 + i32.ge_u + if (result f32) + f32.const 1237940039285380274899124e3 + local.set $4 + local.get $1 + f32.const 8.077935669463161e-28 + f32.mul + local.set $1 + local.get $0 + f32.const 8.077935669463161e-28 + f32.mul + else + local.get $2 + i32.const 562036736 + i32.lt_u + if (result f32) + f32.const 8.077935669463161e-28 + local.set $4 + local.get $1 + f32.const 1237940039285380274899124e3 + f32.mul + local.set $1 + local.get $0 + f32.const 1237940039285380274899124e3 + f32.mul + else + local.get $0 + end + end + local.set $0 + local.get $4 + local.get $0 + f64.promote_f32 + local.get $0 + f64.promote_f32 + f64.mul + local.get $1 + f64.promote_f32 + local.get $1 + f64.promote_f32 + f64.mul + f64.add + f32.demote_f64 + f32.sqrt + f32.mul + ) + (func $../../lib/libm/assembly/libmf/hypot (; 100 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.hypot + ) + (func $../../lib/libm/assembly/libmf/imul (; 101 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + block $~lib/math/NativeMathf.imul|inlined.0 (result f32) + f32.const 0 + local.get $0 + local.get $1 + f32.add + call $~lib/builtins/isFinite + i32.eqz + br_if $~lib/math/NativeMathf.imul|inlined.0 + drop + local.get $0 + f64.promote_f32 + f64.const 4294967296 + local.get $0 + f64.promote_f32 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + local.get $1 + f64.promote_f32 + f64.const 4294967296 + local.get $1 + f64.promote_f32 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + i32.mul + f32.convert_i32_s + end + ) + (func $../../lib/libm/assembly/libmf/log (; 102 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.log + ) + (func $~lib/math/NativeMathf.log10 (; 103 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 i32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + (local $7 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $1 + i32.const 8388608 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 31 + i32.shr_u + end + if + local.get $1 + i32.const 1 + i32.shl + i32.eqz + if + f32.const -1 + local.get $0 + local.get $0 + f32.mul + f32.div + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.div + return + end + i32.const -25 + local.set $3 + local.get $0 + f32.const 33554432 + f32.mul + i32.reinterpret_f32 + local.set $1 + else + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + return + else + local.get $1 + i32.const 1065353216 + i32.eq + if + f32.const 0 + return + end + end + end + local.get $1 + i32.const 4913933 + i32.add + local.tee $1 + i32.const 8388607 + i32.and + i32.const 1060439283 + i32.add + f32.reinterpret_i32 + f32.const 1 + f32.sub + local.tee $0 + f32.const 2 + local.get $0 + f32.add + f32.div + local.tee $4 + local.get $4 + f32.mul + local.tee $5 + local.get $5 + f32.mul + local.set $2 + local.get $1 + i32.const 23 + i32.shr_u + i32.const 127 + i32.sub + local.get $3 + i32.add + f32.convert_i32_s + local.tee $7 + f32.const 7.903415166765626e-07 + f32.mul + local.get $0 + local.get $0 + f32.const 0.5 + local.get $0 + f32.mul + local.get $0 + f32.mul + local.tee $0 + f32.sub + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $6 + f32.sub + local.get $0 + f32.sub + local.get $4 + local.get $0 + local.get $5 + f32.const 0.6666666269302368 + local.get $2 + f32.const 0.2849878668785095 + f32.mul + f32.add + f32.mul + local.get $2 + f32.const 0.40000972151756287 + local.get $2 + f32.const 0.24279078841209412 + f32.mul + f32.add + f32.mul + f32.add + f32.add + f32.mul + f32.add + local.tee $0 + local.get $6 + f32.add + f32.const -3.168997136526741e-05 + f32.mul + f32.add + local.get $0 + f32.const 0.434326171875 + f32.mul + f32.add + local.get $6 + f32.const 0.434326171875 + f32.mul + f32.add + local.get $7 + f32.const 0.3010292053222656 + f32.mul + f32.add + ) + (func $../../lib/libm/assembly/libmf/log10 (; 104 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.log10 + ) + (func $../../lib/libm/assembly/libmf/log1p (; 105 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.log1p + ) + (func $~lib/math/NativeMathf.log2 (; 106 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 i32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $1 + i32.const 8388608 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 31 + i32.shr_u + end + if + local.get $1 + i32.const 1 + i32.shl + i32.eqz + if + f32.const -1 + local.get $0 + local.get $0 + f32.mul + f32.div + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.div + return + end + i32.const -25 + local.set $3 + local.get $0 + f32.const 33554432 + f32.mul + i32.reinterpret_f32 + local.set $1 + else + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + return + else + local.get $1 + i32.const 1065353216 + i32.eq + if + f32.const 0 + return + end + end + end + local.get $1 + i32.const 4913933 + i32.add + local.tee $1 + i32.const 8388607 + i32.and + i32.const 1060439283 + i32.add + f32.reinterpret_i32 + f32.const 1 + f32.sub + local.tee $0 + f32.const 2 + local.get $0 + f32.add + f32.div + local.tee $4 + local.get $4 + f32.mul + local.tee $5 + local.get $5 + f32.mul + local.set $2 + local.get $0 + local.get $0 + f32.const 0.5 + local.get $0 + f32.mul + local.get $0 + f32.mul + local.tee $0 + f32.sub + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $6 + f32.sub + local.get $0 + f32.sub + local.get $4 + local.get $0 + local.get $5 + f32.const 0.6666666269302368 + local.get $2 + f32.const 0.2849878668785095 + f32.mul + f32.add + f32.mul + local.get $2 + f32.const 0.40000972151756287 + local.get $2 + f32.const 0.24279078841209412 + f32.mul + f32.add + f32.mul + f32.add + f32.add + f32.mul + f32.add + local.tee $0 + local.get $6 + f32.add + f32.const -1.7605285393074155e-04 + f32.mul + local.get $0 + f32.const 1.44287109375 + f32.mul + f32.add + local.get $6 + f32.const 1.44287109375 + f32.mul + f32.add + local.get $1 + i32.const 23 + i32.shr_u + i32.const 127 + i32.sub + local.get $3 + i32.add + f32.convert_i32_s + f32.add + ) + (func $../../lib/libm/assembly/libmf/log2 (; 107 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.log2 + ) + (func $../../lib/libm/assembly/libmf/max (; 108 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + f32.max + ) + (func $../../lib/libm/assembly/libmf/min (; 109 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + f32.min + ) + (func $~lib/math/NativeMathf.pow (; 110 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 f32) + (local $3 f32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 f32) + (local $8 i32) + (local $9 f32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 f32) + (local $14 f32) + (local $15 f32) + (local $16 f32) + local.get $0 + i32.reinterpret_f32 + local.tee $8 + i32.const 2147483647 + i32.and + local.set $5 + local.get $1 + i32.reinterpret_f32 + local.tee $11 + i32.const 2147483647 + i32.and + local.tee $10 + i32.eqz + if + f32.const 1 + return + end + i32.const 1 + local.get $10 + i32.const 2139095040 + i32.gt_s + local.get $5 + i32.const 2139095040 + i32.gt_s + select + if + local.get $0 + local.get $1 + f32.add + return + end + local.get $8 + i32.const 0 + i32.lt_s + if + local.get $10 + i32.const 1266679808 + i32.ge_s + if (result i32) + i32.const 2 + else + local.get $10 + i32.const 1065353216 + i32.ge_s + if (result i32) + local.get $10 + i32.const 150 + local.get $10 + i32.const 23 + i32.shr_s + i32.sub + local.tee $12 + i32.shr_s + local.tee $6 + local.get $12 + i32.shl + local.get $10 + i32.eq + if (result i32) + i32.const 2 + local.get $6 + i32.const 1 + i32.and + i32.sub + else + i32.const 0 + end + else + i32.const 0 + end + end + local.set $4 + end + local.get $10 + i32.const 2139095040 + i32.eq + if + local.get $5 + i32.const 1065353216 + i32.eq + if + f32.const nan:0x400000 + return + else + local.get $5 + i32.const 1065353216 + i32.gt_s + if + local.get $11 + i32.const 0 + i32.lt_s + if + f32.const 0 + local.set $1 + end + local.get $1 + return + else + f32.const 0 + local.get $1 + f32.neg + local.get $11 + i32.const 0 + i32.ge_s + select + return + end + unreachable + end + unreachable + end + local.get $10 + i32.const 1065353216 + i32.eq + if + local.get $11 + i32.const 0 + i32.lt_s + if + f32.const 1 + local.get $0 + f32.div + local.set $0 + end + local.get $0 + return + end + local.get $11 + i32.const 1073741824 + i32.eq + if + local.get $0 + local.get $0 + f32.mul + return + end + local.get $11 + i32.const 1056964608 + i32.eq + if + local.get $8 + i32.const 0 + i32.ge_s + if + local.get $0 + f32.sqrt + return + end + end + local.get $0 + f32.abs + local.set $3 + i32.const 1 + local.get $5 + i32.const 1065353216 + i32.eq + i32.const 1 + local.get $5 + i32.eqz + local.get $5 + i32.const 2139095040 + i32.eq + select + select + if + f32.const 1 + local.get $3 + f32.div + local.get $3 + local.get $11 + i32.const 0 + i32.lt_s + select + local.set $3 + local.get $8 + i32.const 0 + i32.lt_s + if (result f32) + local.get $5 + i32.const 1065353216 + i32.sub + local.get $4 + i32.or + if (result f32) + local.get $3 + f32.neg + local.get $3 + local.get $4 + i32.const 1 + i32.eq + select + else + local.get $3 + local.get $3 + f32.sub + local.tee $0 + local.get $0 + f32.div + end + else + local.get $3 + end + return + end + f32.const 1 + local.set $7 + local.get $8 + i32.const 0 + i32.lt_s + if + local.get $4 + i32.eqz + if + local.get $0 + local.get $0 + f32.sub + local.tee $0 + local.get $0 + f32.div + return + end + f32.const -1 + f32.const 1 + local.get $4 + i32.const 1 + i32.eq + select + local.set $7 + end + local.get $10 + i32.const 1291845632 + i32.gt_s + if (result f32) + local.get $5 + i32.const 1065353208 + i32.lt_s + if + local.get $7 + f32.const 1000000015047466219876688e6 + f32.mul + f32.const 1000000015047466219876688e6 + f32.mul + local.get $7 + f32.const 1.0000000031710769e-30 + f32.mul + f32.const 1.0000000031710769e-30 + f32.mul + local.get $11 + i32.const 0 + i32.lt_s + select + return + end + local.get $5 + i32.const 1065353223 + i32.gt_s + if + local.get $7 + f32.const 1000000015047466219876688e6 + f32.mul + f32.const 1000000015047466219876688e6 + f32.mul + local.get $7 + f32.const 1.0000000031710769e-30 + f32.mul + f32.const 1.0000000031710769e-30 + f32.mul + local.get $11 + i32.const 0 + i32.gt_s + select + return + end + local.get $3 + f32.const 1 + f32.sub + local.tee $2 + local.get $2 + f32.mul + f32.const 0.5 + local.get $2 + f32.const 0.3333333432674408 + local.get $2 + f32.const 0.25 + f32.mul + f32.sub + f32.mul + f32.sub + f32.mul + local.set $0 + f32.const 1.44268798828125 + local.get $2 + f32.mul + local.tee $3 + local.get $2 + f32.const 7.052607543300837e-06 + f32.mul + local.get $0 + f32.const 1.4426950216293335 + f32.mul + f32.sub + local.tee $0 + f32.add + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $9 + local.get $0 + local.get $9 + local.get $3 + f32.sub + f32.sub + else + i32.const 0 + local.set $4 + local.get $5 + i32.const 8388608 + i32.lt_s + if (result i32) + local.get $3 + f32.const 16777216 + f32.mul + i32.reinterpret_f32 + local.set $5 + i32.const -24 + else + i32.const 0 + end + local.get $5 + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + i32.add + local.set $4 + local.get $5 + i32.const 8388607 + i32.and + local.tee $6 + i32.const 1065353216 + i32.or + local.set $5 + local.get $6 + i32.const 1885297 + i32.le_s + if (result i32) + i32.const 0 + else + local.get $6 + i32.const 6140887 + i32.lt_s + if (result i32) + i32.const 1 + else + local.get $4 + i32.const 1 + i32.add + local.set $4 + local.get $5 + i32.const 8388608 + i32.sub + local.set $5 + i32.const 0 + end + end + local.set $6 + local.get $5 + f32.reinterpret_i32 + local.tee $3 + f32.const 1.5 + f32.const 1 + local.get $6 + select + local.tee $0 + f32.sub + local.tee $9 + f32.const 1 + local.get $3 + local.get $0 + f32.add + f32.div + local.tee $2 + f32.mul + local.tee $15 + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $13 + local.get $3 + local.get $5 + i32.const 1 + i32.shr_s + i32.const -4096 + i32.and + i32.const 536870912 + i32.or + i32.const 4194304 + i32.add + local.get $6 + i32.const 21 + i32.shl + i32.add + f32.reinterpret_i32 + local.tee $3 + local.get $0 + f32.sub + f32.sub + local.set $0 + f32.const 0.9619140625 + local.get $13 + f32.const 3 + local.get $13 + local.get $13 + f32.mul + local.tee $16 + f32.add + local.get $15 + local.get $15 + f32.mul + local.tee $14 + local.get $14 + f32.mul + f32.const 0.6000000238418579 + local.get $14 + f32.const 0.4285714328289032 + local.get $14 + f32.const 0.3333333432674408 + local.get $14 + f32.const 0.2727281153202057 + local.get $14 + f32.const 0.23066075146198273 + local.get $14 + f32.const 0.20697501301765442 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + local.get $2 + local.get $9 + local.get $13 + local.get $3 + f32.mul + f32.sub + local.get $13 + local.get $0 + f32.mul + f32.sub + f32.mul + local.tee $2 + local.get $13 + local.get $15 + f32.add + f32.mul + f32.add + local.tee $0 + f32.add + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $9 + f32.mul + local.tee $3 + local.get $2 + local.get $9 + f32.mul + local.get $0 + local.get $9 + f32.const 3 + f32.sub + local.get $16 + f32.sub + f32.sub + local.get $15 + f32.mul + f32.add + local.tee $0 + f32.add + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $2 + f32.mul + local.tee $16 + f32.const -1.1736857413779944e-04 + local.get $2 + f32.mul + local.get $0 + local.get $2 + local.get $3 + f32.sub + f32.sub + f32.const 0.9617967009544373 + f32.mul + f32.add + f32.const 1.5632208487659227e-06 + f32.const 0 + local.get $6 + select + f32.add + local.tee $2 + f32.add + f32.const 0.5849609375 + f32.const 0 + local.get $6 + select + local.tee $3 + f32.add + local.get $4 + f32.convert_i32_s + local.tee $0 + f32.add + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $9 + local.get $2 + local.get $9 + local.get $0 + f32.sub + local.get $3 + f32.sub + local.get $16 + f32.sub + f32.sub + end + local.set $3 + block $folding-inner1 + block $folding-inner0 + local.get $1 + local.get $1 + i32.reinterpret_f32 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $0 + f32.sub + local.get $9 + f32.mul + local.get $1 + local.get $3 + f32.mul + f32.add + local.tee $1 + local.get $0 + local.get $9 + f32.mul + local.tee $2 + f32.add + local.tee $0 + i32.reinterpret_f32 + local.tee $8 + i32.const 1124073472 + i32.gt_s + br_if $folding-inner0 + local.get $8 + i32.const 1124073472 + i32.eq + if + local.get $1 + f32.const 4.299566569443414e-08 + f32.add + local.get $0 + local.get $2 + f32.sub + f32.gt + br_if $folding-inner0 + else + local.get $8 + i32.const 2147483647 + i32.and + i32.const 1125515264 + i32.gt_s + if + br $folding-inner1 + else + local.get $8 + i32.const -1021968384 + i32.eq + if + local.get $1 + local.get $0 + local.get $2 + f32.sub + f32.le + br_if $folding-inner1 + end + end + end + local.get $8 + i32.const 2147483647 + i32.and + local.tee $12 + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + local.set $6 + i32.const 0 + local.set $4 + local.get $12 + i32.const 1056964608 + i32.gt_s + if + i32.const 8388608 + local.get $6 + i32.const 1 + i32.add + i32.shr_s + local.get $8 + i32.add + local.tee $12 + i32.const 2147483647 + i32.and + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + local.set $6 + i32.const 8388607 + local.get $6 + i32.shr_s + i32.const -1 + i32.xor + local.get $12 + i32.and + f32.reinterpret_i32 + local.set $0 + local.get $12 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i32.const 23 + local.get $6 + i32.sub + i32.shr_s + local.set $4 + i32.const 0 + local.get $4 + i32.sub + local.get $4 + local.get $8 + i32.const 0 + i32.lt_s + select + local.set $4 + local.get $2 + local.get $0 + f32.sub + local.set $2 + end + local.get $1 + local.get $2 + f32.add + i32.reinterpret_f32 + i32.const -32768 + i32.and + f32.reinterpret_i32 + local.tee $0 + f32.const 0.693145751953125 + f32.mul + local.tee $3 + local.get $1 + local.get $0 + local.get $2 + f32.sub + f32.sub + f32.const 0.6931471824645996 + f32.mul + local.get $0 + f32.const 1.4286065379565116e-06 + f32.mul + f32.add + local.tee $1 + f32.add + local.tee $2 + local.get $2 + f32.mul + local.set $0 + local.get $7 + f32.const 1 + local.get $2 + local.get $2 + local.get $0 + f32.const 0.1666666716337204 + local.get $0 + f32.const -2.7777778450399637e-03 + local.get $0 + f32.const 6.61375597701408e-05 + local.get $0 + f32.const -1.6533901998627698e-06 + local.get $0 + f32.const 4.138136944220605e-08 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.sub + local.tee $0 + f32.mul + local.get $0 + f32.const 2 + f32.sub + f32.div + local.get $1 + local.get $2 + local.get $3 + f32.sub + f32.sub + local.tee $0 + local.get $2 + local.get $0 + f32.mul + f32.add + f32.sub + local.get $2 + f32.sub + f32.sub + local.tee $0 + i32.reinterpret_f32 + local.get $4 + i32.const 23 + i32.shl + i32.add + local.tee $6 + i32.const 23 + i32.shr_s + i32.const 0 + i32.le_s + if (result f32) + local.get $0 + local.get $4 + call $~lib/math/NativeMathf.scalbn + else + local.get $6 + f32.reinterpret_i32 + end + f32.mul + return + end + local.get $7 + f32.const 1000000015047466219876688e6 + f32.mul + f32.const 1000000015047466219876688e6 + f32.mul + return + end + local.get $7 + f32.const 1.0000000031710769e-30 + f32.mul + f32.const 1.0000000031710769e-30 + f32.mul + ) + (func $../../lib/libm/assembly/libmf/pow (; 111 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.pow + ) + (func $../../lib/libm/assembly/libmf/round (; 112 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.const 0.5 + f32.add + f32.floor + local.get $0 + f32.copysign + ) + (func $../../lib/libm/assembly/libmf/sign (; 113 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.abs + f32.const 0 + f32.gt + if + f32.const 1 + local.get $0 + f32.copysign + local.set $0 + end + local.get $0 + ) + (func $~lib/math/NativeMathf.sin (; 114 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f64) + (local $2 i32) + (local $3 f64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 f64) + (local $8 i32) + (local $9 i32) + (local $10 i64) + (local $11 i64) + local.get $0 + i32.reinterpret_f32 + local.tee $2 + i32.const 31 + i32.shr_u + local.set $9 + local.get $2 + i32.const 2147483647 + i32.and + local.tee $2 + i32.const 1061752794 + i32.le_u + if + local.get $2 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + local.get $0 + f64.promote_f32 + local.tee $3 + local.get $3 + f64.mul + local.tee $1 + local.get $3 + f64.mul + local.set $7 + local.get $3 + local.get $7 + f64.const -0.16666666641626524 + local.get $1 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $7 + local.get $1 + local.get $1 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $1 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return + end + local.get $2 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + return + end + block $~lib/math/rempio2f|inlined.1 (result i32) + local.get $2 + i32.const 1305022427 + i32.lt_u + if + local.get $0 + f64.promote_f32 + local.get $0 + f64.promote_f32 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.tee $1 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $1 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $1 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.1 + end + local.get $2 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.tee $4 + i32.const 6 + i32.shr_s + local.tee $8 + call $~lib/array/Array#__unchecked_get + local.set $10 + local.get $8 + i32.const 1 + i32.add + call $~lib/array/Array#__unchecked_get + local.set $5 + local.get $4 + i32.const 63 + i32.and + local.tee $4 + i32.const 32 + i32.gt_s + if (result i64) + local.get $5 + local.get $4 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + local.get $8 + i32.const 2 + i32.add + call $~lib/array/Array#__unchecked_get + i64.const 96 + local.get $4 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + else + local.get $5 + i64.const 32 + local.get $4 + i64.extend_i32_s + i64.sub + i64.shr_u + end + local.set $6 + f64.const 8.515303950216386e-20 + local.get $0 + f64.promote_f32 + f64.copysign + local.get $2 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.tee $11 + local.get $10 + local.get $4 + i64.extend_i32_s + i64.shl + local.get $5 + i64.const 64 + local.get $4 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + i64.mul + local.get $6 + local.get $11 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $5 + i64.const 2 + i64.shl + local.tee $6 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + i32.const 0 + local.get $5 + i64.const 62 + i64.shr_u + local.get $6 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.tee $2 + i32.sub + local.get $2 + local.get $9 + select + end + local.set $2 + global.get $~lib/math/rempio2f_y + local.set $1 + local.get $2 + i32.const 1 + i32.and + if (result f32) + local.get $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $3 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $3 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $3 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + else + local.get $1 + local.get $1 + local.get $1 + f64.mul + local.tee $3 + local.get $1 + f64.mul + local.tee $1 + f64.const -0.16666666641626524 + local.get $3 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $1 + local.get $3 + local.get $3 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $3 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + end + local.set $0 + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + f32.neg + local.set $0 + end + local.get $0 + ) + (func $../../lib/libm/assembly/libmf/sin (; 115 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.sin + ) + (func $~lib/math/NativeMathf.sinh (; 116 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + (local $3 f32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $2 + f32.reinterpret_i32 + local.set $1 + f32.const 0.5 + local.get $0 + f32.copysign + local.set $3 + local.get $2 + i32.const 1118925335 + i32.lt_u + if + local.get $1 + call $~lib/math/NativeMathf.expm1 + local.set $1 + local.get $2 + i32.const 1065353216 + i32.lt_u + if + local.get $2 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + local.get $3 + f32.const 2 + local.get $1 + f32.mul + local.get $1 + local.get $1 + f32.mul + local.get $1 + f32.const 1 + f32.add + f32.div + f32.sub + f32.mul + return + end + local.get $3 + local.get $1 + local.get $1 + local.get $1 + f32.const 1 + f32.add + f32.div + f32.add + f32.mul + return + end + f32.const 2 + local.get $3 + f32.mul + local.get $1 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 + f32.mul + f32.mul + ) + (func $../../lib/libm/assembly/libmf/sinh (; 117 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.sinh + ) + (func $../../lib/libm/assembly/libmf/sqrt (; 118 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.sqrt + ) + (func $~lib/math/NativeMathf.tan (; 119 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f64) + (local $2 i32) + (local $3 f64) + (local $4 i32) + (local $5 f64) + (local $6 i64) + (local $7 i64) + (local $8 i32) + (local $9 i32) + (local $10 i64) + (local $11 i64) + local.get $0 + i32.reinterpret_f32 + local.tee $2 + i32.const 31 + i32.shr_u + local.set $9 + local.get $2 + i32.const 2147483647 + i32.and + local.tee $2 + i32.const 1061752794 + i32.le_u + if + local.get $2 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + local.get $0 + f64.promote_f32 + local.tee $3 + local.get $3 + f64.mul + local.tee $1 + local.get $3 + f64.mul + local.set $5 + local.get $3 + local.get $5 + f64.const 0.3333313950307914 + local.get $1 + f64.const 0.13339200271297674 + f64.mul + f64.add + f64.mul + f64.add + local.get $5 + local.get $1 + local.get $1 + f64.mul + local.tee $3 + f64.mul + f64.const 0.05338123784456704 + local.get $1 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.get $3 + f64.const 0.002974357433599673 + local.get $1 + f64.const 0.009465647849436732 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return + end + local.get $2 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + return + end + block $~lib/math/rempio2f|inlined.2 (result i32) + local.get $2 + i32.const 1305022427 + i32.lt_u + if + local.get $0 + f64.promote_f32 + local.get $0 + f64.promote_f32 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.tee $1 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $1 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $1 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.2 + end + local.get $2 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.tee $4 + i32.const 6 + i32.shr_s + local.tee $8 + call $~lib/array/Array#__unchecked_get + local.set $10 + local.get $8 + i32.const 1 + i32.add + call $~lib/array/Array#__unchecked_get + local.set $6 + local.get $4 + i32.const 63 + i32.and + local.tee $4 + i32.const 32 + i32.gt_s + if (result i64) + local.get $6 + local.get $4 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + local.get $8 + i32.const 2 + i32.add + call $~lib/array/Array#__unchecked_get + i64.const 96 + local.get $4 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + else + local.get $6 + i64.const 32 + local.get $4 + i64.extend_i32_s + i64.sub + i64.shr_u + end + local.set $7 + f64.const 8.515303950216386e-20 + local.get $0 + f64.promote_f32 + f64.copysign + local.get $2 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.tee $11 + local.get $10 + local.get $4 + i64.extend_i32_s + i64.shl + local.get $6 + i64.const 64 + local.get $4 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + i64.mul + local.get $7 + local.get $11 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $6 + i64.const 2 + i64.shl + local.tee $7 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + i32.const 0 + local.get $6 + i64.const 62 + i64.shr_u + local.get $7 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.tee $2 + i32.sub + local.get $2 + local.get $9 + select + end + local.set $2 + global.get $~lib/math/rempio2f_y + local.tee $3 + local.get $3 + f64.mul + local.tee $1 + local.get $3 + f64.mul + local.set $5 + local.get $3 + local.get $5 + f64.const 0.3333313950307914 + local.get $1 + f64.const 0.13339200271297674 + f64.mul + f64.add + f64.mul + f64.add + local.get $5 + local.get $1 + local.get $1 + f64.mul + local.tee $3 + f64.mul + f64.const 0.05338123784456704 + local.get $1 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.get $3 + f64.const 0.002974357433599673 + local.get $1 + f64.const 0.009465647849436732 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + local.set $1 + local.get $2 + i32.const 1 + i32.and + if + f64.const -1 + local.get $1 + f64.div + local.set $1 + end + local.get $1 + f32.demote_f64 + ) + (func $../../lib/libm/assembly/libmf/tan (; 120 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.tan + ) + (func $~lib/math/NativeMathf.tanh (; 121 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $2 + f32.reinterpret_i32 + local.set $1 + local.get $2 + i32.const 1057791828 + i32.gt_u + if + local.get $2 + i32.const 1092616192 + i32.gt_u + if (result f32) + f32.const 1 + f32.const 0 + local.get $1 + f32.div + f32.add + else + f32.const 1 + f32.const 2 + f32.const 2 + local.get $1 + f32.mul + call $~lib/math/NativeMathf.expm1 + f32.const 2 + f32.add + f32.div + f32.sub + end + local.set $1 + else + local.get $2 + i32.const 1048757624 + i32.gt_u + if + f32.const 2 + local.get $1 + f32.mul + call $~lib/math/NativeMathf.expm1 + local.tee $1 + local.get $1 + f32.const 2 + f32.add + f32.div + local.set $1 + else + local.get $2 + i32.const 8388608 + i32.ge_u + if + f32.const -2 + local.get $1 + f32.mul + call $~lib/math/NativeMathf.expm1 + local.tee $1 + f32.neg + local.get $1 + f32.const 2 + f32.add + f32.div + local.set $1 + end + end + end + local.get $1 + local.get $0 + f32.copysign + ) + (func $../../lib/libm/assembly/libmf/tanh (; 122 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.tanh + ) + (func $../../lib/libm/assembly/libmf/trunc (; 123 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + f32.trunc + ) + (func $null (; 124 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/libm.ts b/tests/compiler/std/libm.ts index 6b1c62b6..4f3e58bf 100644 --- a/tests/compiler/std/libm.ts +++ b/tests/compiler/std/libm.ts @@ -1,144 +1,3 @@ -export const E = Math.E; -export const LN10 = Math.LN10; -export const LN2 = Math.LN2; -export const LOG10E = Math.LOG10E; -export const LOG2E = Math.LOG2E; -export const PI = Math.PI; -export const SQRT1_2 = Math.SQRT1_2; -export const SQRT2 = Math.SQRT2; - -export function abs(x: f64): f64 { - return Math.abs(x); -} - -export function acos(x: f64): f64 { - return Math.acos(x); -} - -export function acosh(x: f64): f64 { - return Math.acosh(x); -} - -export function asin(x: f64): f64 { - return Math.asin(x); -} - -export function asinh(x: f64): f64 { - return Math.asinh(x); -} - -export function atan(x: f64): f64 { - return Math.atan(x); -} - -export function atanh(x: f64): f64 { - return Math.atanh(x); -} - -export function atan2(y: f64, x: f64): f64 { - return Math.atan2(y, x); -} - -export function cbrt(x: f64): f64 { - return Math.cbrt(x); -} - -export function ceil(x: f64): f64 { - return Math.ceil(x); -} - -export function clz32(x: f64): f64 { - return Math.clz32(x); -} - -export function cos(x: f64): f64 { - return Math.cos(x); -} - -export function cosh(x: f64): f64 { - return Math.cosh(x); -} - -export function exp(x: f64): f64 { - return Math.exp(x); -} - -export function expm1(x: f64): f64 { - return Math.expm1(x); -} - -export function floor(x: f64): f64 { - return Math.floor(x); -} - -export function fround(x: f64): f32 { - return Math.fround(x); -} - -export function hypot(a: f64, b: f64): f64 { - return Math.hypot(a, b); -} - -export function imul(a: f64, b: f64): f64 { - return Math.imul(a, b); -} - -export function log(x: f64): f64 { - return Math.log(x); -} - -export function log10(x: f64): f64 { - return Math.log10(x); -} - -export function log1p(x: f64): f64 { - return Math.log1p(x); -} - -export function log2(x: f64): f64 { - return Math.log2(x); -} - -export function max(a: f64, b: f64): f64 { - return Math.max(a, b); -} - -export function min(a: f64, b: f64): f64 { - return Math.min(a, b); -} - -export function pow(x: f64, y: f64): f64 { - return Math.pow(x, y); -} - -export function round(x: f64): f64 { - return Math.round(x); -} - -export function sign(x: f64): f64 { - return Math.sign(x); -} - -export function sin(x: f64): f64 { - return Math.sin(x); -} - -export function sinh(x: f64): f64 { - return Math.sinh(x); -} - -export function sqrt(x: f64): f64 { - return Math.sqrt(x); -} - -export function tan(x: f64): f64 { - return Math.tan(x); -} - -export function tanh(x: f64): f64 { - return Math.tanh(x); -} - -export function trunc(x: f64): f64 { - return Math.trunc(x); -} +import * as libm from "../../../lib/libm/assembly/libm"; +import * as libmf from "../../../lib/libm/assembly/libmf"; +export { libm, libmf }; diff --git a/tests/compiler/std/libm.untouched.wat b/tests/compiler/std/libm.untouched.wat index cdc5d88c..506fb349 100644 --- a/tests/compiler/std/libm.untouched.wat +++ b/tests/compiler/std/libm.untouched.wat @@ -3,79 +3,148 @@ (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) - (type $FUNCSIG$fd (func (param f64) (result f32))) + (type $FUNCSIG$ff (func (param f32) (result f32))) + (type $FUNCSIG$if (func (param f32) (result i32))) + (type $FUNCSIG$fff (func (param f32 f32) (result f32))) + (type $FUNCSIG$jii (func (param i32 i32) (result i64))) + (type $FUNCSIG$ffi (func (param f32 i32) (result f32))) (type $FUNCSIG$v (func)) - (memory $0 0) + (import "Math" "cos" (func $~lib/bindings/Math/cos (param f64) (result f64))) + (import "Math" "sin" (func $~lib/bindings/Math/sin (param f64) (result f64))) + (import "Math" "tan" (func $~lib/bindings/Math/tan (param f64) (result f64))) + (memory $0 1) + (data (i32.const 8) " \00\00\00\01\00\00\00\00\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") + (data (i32.const 56) "\10\00\00\00\01\00\00\00\03\00\00\00\10\00\00\00\18\00\00\00\18\00\00\00 \00\00\00\04\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/math/NativeMath.E f64 (f64.const 2.718281828459045)) - (global $std/libm/E f64 (f64.const 2.718281828459045)) + (global $../../lib/libm/assembly/libm/E f64 (f64.const 2.718281828459045)) (global $~lib/math/NativeMath.LN10 f64 (f64.const 2.302585092994046)) - (global $std/libm/LN10 f64 (f64.const 2.302585092994046)) + (global $../../lib/libm/assembly/libm/LN10 f64 (f64.const 2.302585092994046)) (global $~lib/math/NativeMath.LN2 f64 (f64.const 0.6931471805599453)) - (global $std/libm/LN2 f64 (f64.const 0.6931471805599453)) + (global $../../lib/libm/assembly/libm/LN2 f64 (f64.const 0.6931471805599453)) (global $~lib/math/NativeMath.LOG10E f64 (f64.const 0.4342944819032518)) - (global $std/libm/LOG10E f64 (f64.const 0.4342944819032518)) + (global $../../lib/libm/assembly/libm/LOG10E f64 (f64.const 0.4342944819032518)) (global $~lib/math/NativeMath.LOG2E f64 (f64.const 1.4426950408889634)) - (global $std/libm/LOG2E f64 (f64.const 1.4426950408889634)) + (global $../../lib/libm/assembly/libm/LOG2E f64 (f64.const 1.4426950408889634)) (global $~lib/math/NativeMath.PI f64 (f64.const 3.141592653589793)) - (global $std/libm/PI f64 (f64.const 3.141592653589793)) + (global $../../lib/libm/assembly/libm/PI f64 (f64.const 3.141592653589793)) (global $~lib/math/NativeMath.SQRT1_2 f64 (f64.const 0.7071067811865476)) - (global $std/libm/SQRT1_2 f64 (f64.const 0.7071067811865476)) + (global $../../lib/libm/assembly/libm/SQRT1_2 f64 (f64.const 0.7071067811865476)) (global $~lib/math/NativeMath.SQRT2 f64 (f64.const 1.4142135623730951)) - (global $std/libm/SQRT2 f64 (f64.const 1.4142135623730951)) + (global $../../lib/libm/assembly/libm/SQRT2 f64 (f64.const 1.4142135623730951)) + (global $~lib/math/NativeMathf.E f32 (f32.const 2.7182817459106445)) + (global $../../lib/libm/assembly/libmf/E f32 (f32.const 2.7182817459106445)) + (global $~lib/math/NativeMathf.LN10 f32 (f32.const 2.3025851249694824)) + (global $../../lib/libm/assembly/libmf/LN10 f32 (f32.const 2.3025851249694824)) + (global $~lib/math/NativeMathf.LN2 f32 (f32.const 0.6931471824645996)) + (global $../../lib/libm/assembly/libmf/LN2 f32 (f32.const 0.6931471824645996)) + (global $~lib/math/NativeMathf.LOG10E f32 (f32.const 0.4342944920063019)) + (global $../../lib/libm/assembly/libmf/LOG10E f32 (f32.const 0.4342944920063019)) + (global $~lib/math/NativeMathf.LOG2E f32 (f32.const 1.4426950216293335)) + (global $../../lib/libm/assembly/libmf/LOG2E f32 (f32.const 1.4426950216293335)) + (global $~lib/math/NativeMathf.PI f32 (f32.const 3.1415927410125732)) + (global $../../lib/libm/assembly/libmf/PI f32 (f32.const 3.1415927410125732)) + (global $~lib/math/NativeMathf.SQRT1_2 f32 (f32.const 0.7071067690849304)) + (global $../../lib/libm/assembly/libmf/SQRT1_2 f32 (f32.const 0.7071067690849304)) + (global $~lib/math/NativeMathf.SQRT2 f32 (f32.const 1.4142135381698608)) + (global $../../lib/libm/assembly/libmf/SQRT2 f32 (f32.const 1.4142135381698608)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/math/rempio2f_y (mut f64) (f64.const 0)) + (global $~lib/math/PIO2_TABLE i32 (i32.const 72)) (export "memory" (memory $0)) - (export "E" (global $std/libm/E)) - (export "LN10" (global $std/libm/LN10)) - (export "LN2" (global $std/libm/LN2)) - (export "LOG10E" (global $std/libm/LOG10E)) - (export "LOG2E" (global $std/libm/LOG2E)) - (export "PI" (global $std/libm/PI)) - (export "SQRT1_2" (global $std/libm/SQRT1_2)) - (export "SQRT2" (global $std/libm/SQRT2)) - (export "abs" (func $std/libm/abs)) - (export "acos" (func $std/libm/acos)) - (export "acosh" (func $std/libm/acosh)) - (export "asin" (func $std/libm/asin)) - (export "asinh" (func $std/libm/asinh)) - (export "atan" (func $std/libm/atan)) - (export "atanh" (func $std/libm/atanh)) - (export "atan2" (func $std/libm/atan2)) - (export "cbrt" (func $std/libm/cbrt)) - (export "ceil" (func $std/libm/ceil)) - (export "clz32" (func $std/libm/clz32)) - (export "cos" (func $std/libm/cos)) - (export "cosh" (func $std/libm/cosh)) - (export "exp" (func $std/libm/exp)) - (export "expm1" (func $std/libm/expm1)) - (export "floor" (func $std/libm/floor)) - (export "fround" (func $std/libm/fround)) - (export "hypot" (func $std/libm/hypot)) - (export "imul" (func $std/libm/imul)) - (export "log" (func $std/libm/log)) - (export "log10" (func $std/libm/log10)) - (export "log1p" (func $std/libm/log1p)) - (export "log2" (func $std/libm/log2)) - (export "max" (func $std/libm/max)) - (export "min" (func $std/libm/min)) - (export "pow" (func $std/libm/pow)) - (export "round" (func $std/libm/round)) - (export "sign" (func $std/libm/sign)) - (export "sin" (func $std/libm/sin)) - (export "sinh" (func $std/libm/sinh)) - (export "sqrt" (func $std/libm/sqrt)) - (export "tan" (func $std/libm/tan)) - (export "tanh" (func $std/libm/tanh)) - (export "trunc" (func $std/libm/trunc)) - (func $std/libm/abs (; 0 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (export "libm.E" (global $../../lib/libm/assembly/libm/E)) + (export "libm.LN10" (global $../../lib/libm/assembly/libm/LN10)) + (export "libm.LN2" (global $../../lib/libm/assembly/libm/LN2)) + (export "libm.LOG10E" (global $../../lib/libm/assembly/libm/LOG10E)) + (export "libm.LOG2E" (global $../../lib/libm/assembly/libm/LOG2E)) + (export "libm.PI" (global $../../lib/libm/assembly/libm/PI)) + (export "libm.SQRT1_2" (global $../../lib/libm/assembly/libm/SQRT1_2)) + (export "libm.SQRT2" (global $../../lib/libm/assembly/libm/SQRT2)) + (export "libm.abs" (func $../../lib/libm/assembly/libm/abs)) + (export "libm.acos" (func $../../lib/libm/assembly/libm/acos)) + (export "libm.acosh" (func $../../lib/libm/assembly/libm/acosh)) + (export "libm.asin" (func $../../lib/libm/assembly/libm/asin)) + (export "libm.asinh" (func $../../lib/libm/assembly/libm/asinh)) + (export "libm.atan" (func $../../lib/libm/assembly/libm/atan)) + (export "libm.atanh" (func $../../lib/libm/assembly/libm/atanh)) + (export "libm.atan2" (func $../../lib/libm/assembly/libm/atan2)) + (export "libm.cbrt" (func $../../lib/libm/assembly/libm/cbrt)) + (export "libm.ceil" (func $../../lib/libm/assembly/libm/ceil)) + (export "libm.clz32" (func $../../lib/libm/assembly/libm/clz32)) + (export "libm.cos" (func $../../lib/libm/assembly/libm/cos)) + (export "libm.cosh" (func $../../lib/libm/assembly/libm/cosh)) + (export "libm.exp" (func $../../lib/libm/assembly/libm/exp)) + (export "libm.expm1" (func $../../lib/libm/assembly/libm/expm1)) + (export "libm.floor" (func $../../lib/libm/assembly/libm/floor)) + (export "libm.fround" (func $../../lib/libm/assembly/libm/fround)) + (export "libm.hypot" (func $../../lib/libm/assembly/libm/hypot)) + (export "libm.imul" (func $../../lib/libm/assembly/libm/imul)) + (export "libm.log" (func $../../lib/libm/assembly/libm/log)) + (export "libm.log10" (func $../../lib/libm/assembly/libm/log10)) + (export "libm.log1p" (func $../../lib/libm/assembly/libm/log1p)) + (export "libm.log2" (func $../../lib/libm/assembly/libm/log2)) + (export "libm.max" (func $../../lib/libm/assembly/libm/max)) + (export "libm.min" (func $../../lib/libm/assembly/libm/min)) + (export "libm.pow" (func $../../lib/libm/assembly/libm/pow)) + (export "libm.round" (func $../../lib/libm/assembly/libm/round)) + (export "libm.sign" (func $../../lib/libm/assembly/libm/sign)) + (export "libm.sin" (func $../../lib/libm/assembly/libm/sin)) + (export "libm.sinh" (func $../../lib/libm/assembly/libm/sinh)) + (export "libm.sqrt" (func $../../lib/libm/assembly/libm/sqrt)) + (export "libm.tan" (func $../../lib/libm/assembly/libm/tan)) + (export "libm.tanh" (func $../../lib/libm/assembly/libm/tanh)) + (export "libm.trunc" (func $../../lib/libm/assembly/libm/trunc)) + (export "libmf.E" (global $../../lib/libm/assembly/libmf/E)) + (export "libmf.LN10" (global $../../lib/libm/assembly/libmf/LN10)) + (export "libmf.LN2" (global $../../lib/libm/assembly/libmf/LN2)) + (export "libmf.LOG10E" (global $../../lib/libm/assembly/libmf/LOG10E)) + (export "libmf.LOG2E" (global $../../lib/libm/assembly/libmf/LOG2E)) + (export "libmf.PI" (global $../../lib/libm/assembly/libmf/PI)) + (export "libmf.SQRT1_2" (global $../../lib/libm/assembly/libmf/SQRT1_2)) + (export "libmf.SQRT2" (global $../../lib/libm/assembly/libmf/SQRT2)) + (export "libmf.abs" (func $../../lib/libm/assembly/libmf/abs)) + (export "libmf.acos" (func $../../lib/libm/assembly/libmf/acos)) + (export "libmf.acosh" (func $../../lib/libm/assembly/libmf/acosh)) + (export "libmf.asin" (func $../../lib/libm/assembly/libmf/asin)) + (export "libmf.asinh" (func $../../lib/libm/assembly/libmf/asinh)) + (export "libmf.atan" (func $../../lib/libm/assembly/libmf/atan)) + (export "libmf.atanh" (func $../../lib/libm/assembly/libmf/atanh)) + (export "libmf.atan2" (func $../../lib/libm/assembly/libmf/atan2)) + (export "libmf.cbrt" (func $../../lib/libm/assembly/libmf/cbrt)) + (export "libmf.ceil" (func $../../lib/libm/assembly/libmf/ceil)) + (export "libmf.clz32" (func $../../lib/libm/assembly/libmf/clz32)) + (export "libmf.cos" (func $../../lib/libm/assembly/libmf/cos)) + (export "libmf.cosh" (func $../../lib/libm/assembly/libmf/cosh)) + (export "libmf.exp" (func $../../lib/libm/assembly/libmf/exp)) + (export "libmf.expm1" (func $../../lib/libm/assembly/libmf/expm1)) + (export "libmf.floor" (func $../../lib/libm/assembly/libmf/floor)) + (export "libmf.fround" (func $../../lib/libm/assembly/libmf/fround)) + (export "libmf.hypot" (func $../../lib/libm/assembly/libmf/hypot)) + (export "libmf.imul" (func $../../lib/libm/assembly/libmf/imul)) + (export "libmf.log" (func $../../lib/libm/assembly/libmf/log)) + (export "libmf.log10" (func $../../lib/libm/assembly/libmf/log10)) + (export "libmf.log1p" (func $../../lib/libm/assembly/libmf/log1p)) + (export "libmf.log2" (func $../../lib/libm/assembly/libmf/log2)) + (export "libmf.max" (func $../../lib/libm/assembly/libmf/max)) + (export "libmf.min" (func $../../lib/libm/assembly/libmf/min)) + (export "libmf.pow" (func $../../lib/libm/assembly/libmf/pow)) + (export "libmf.round" (func $../../lib/libm/assembly/libmf/round)) + (export "libmf.sign" (func $../../lib/libm/assembly/libmf/sign)) + (export "libmf.sin" (func $../../lib/libm/assembly/libmf/sin)) + (export "libmf.sinh" (func $../../lib/libm/assembly/libmf/sinh)) + (export "libmf.sqrt" (func $../../lib/libm/assembly/libmf/sqrt)) + (export "libmf.tan" (func $../../lib/libm/assembly/libmf/tan)) + (export "libmf.tanh" (func $../../lib/libm/assembly/libmf/tanh)) + (export "libmf.trunc" (func $../../lib/libm/assembly/libmf/trunc)) + (func $../../lib/libm/assembly/libm/abs (; 3 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) local.get $0 local.set $1 local.get $1 f64.abs ) - (func $~lib/math/R (; 1 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/R (; 4 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) local.get $0 @@ -124,7 +193,7 @@ local.get $2 f64.div ) - (func $~lib/math/NativeMath.acos (; 2 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.acos (; 5 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -276,11 +345,11 @@ f64.add f64.mul ) - (func $std/libm/acos (; 3 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/acos (; 6 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.acos ) - (func $~lib/math/NativeMath.log1p (; 4 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log1p (; 7 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 i32) @@ -522,7 +591,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.log (; 5 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log (; 8 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 i32) @@ -732,7 +801,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.acosh (; 6 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.acosh (; 9 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) local.get $0 i64.reinterpret_f64 @@ -792,11 +861,11 @@ f64.const 0.6931471805599453 f64.add ) - (func $std/libm/acosh (; 7 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/acosh (; 10 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.acosh ) - (func $~lib/math/NativeMath.asin (; 8 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asin (; 11 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -955,11 +1024,11 @@ end local.get $0 ) - (func $std/libm/asin (; 9 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/asin (; 12 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.asin ) - (func $~lib/math/NativeMath.asinh (; 10 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asinh (; 13 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 f64) @@ -1035,16 +1104,16 @@ local.get $0 f64.copysign ) - (func $std/libm/asinh (; 11 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/asinh (; 14 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.asinh ) - (func $~lib/builtins/isNaN (; 12 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 15 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/math/NativeMath.atan (; 13 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atan (; 16 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) (local $2 f64) (local $3 f64) @@ -1317,11 +1386,11 @@ local.get $2 f64.copysign ) - (func $std/libm/atan (; 14 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/atan (; 17 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.atan ) - (func $~lib/math/NativeMath.atanh (; 15 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atanh (; 18 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1389,11 +1458,11 @@ local.get $0 f64.copysign ) - (func $std/libm/atanh (; 16 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/atanh (; 19 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.atanh ) - (func $~lib/math/NativeMath.atan2 (; 17 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.atan2 (; 20 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -1733,12 +1802,12 @@ unreachable f64.const 0 ) - (func $std/libm/atan2 (; 18 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/atan2 (; 21 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 ) - (func $~lib/math/NativeMath.cbrt (; 19 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cbrt (; 22 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 f64) @@ -1882,25 +1951,25 @@ local.set $3 local.get $3 ) - (func $std/libm/cbrt (; 20 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cbrt (; 23 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cbrt ) - (func $std/libm/ceil (; 21 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/ceil (; 24 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) local.get $0 local.set $1 local.get $1 f64.ceil ) - (func $~lib/builtins/isFinite (; 22 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 25 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/math/NativeMath.clz32 (; 23 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.clz32 (; 26 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/builtins/isFinite i32.eqz @@ -1923,19 +1992,19 @@ i32.clz f64.convert_i32_s ) - (func $std/libm/clz32 (; 24 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/clz32 (; 27 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.clz32 ) - (func $~lib/math/NativeMath.cos (; 25 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) - unreachable - f64.const 0 + (func $~lib/math/NativeMath.cos (; 28 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/bindings/Math/cos ) - (func $std/libm/cos (; 26 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cos (; 29 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cos ) - (func $~lib/math/NativeMath.expm1 (; 27 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 30 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 i32) @@ -2247,7 +2316,7 @@ local.get $14 f64.mul ) - (func $~lib/math/NativeMath.scalbn (; 28 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 31 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (local $3 i32) (local $4 i32) @@ -2338,7 +2407,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.exp (; 29 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 32 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) @@ -2503,7 +2572,7 @@ local.get $5 call $~lib/math/NativeMath.scalbn ) - (func $~lib/math/NativeMath.cosh (; 30 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cosh (; 33 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 f64) @@ -2594,33 +2663,34 @@ local.set $3 local.get $3 ) - (func $std/libm/cosh (; 31 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cosh (; 34 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cosh ) - (func $std/libm/exp (; 32 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/exp (; 35 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.exp ) - (func $std/libm/expm1 (; 33 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/expm1 (; 36 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.expm1 ) - (func $std/libm/floor (; 34 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/floor (; 37 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) local.get $0 local.set $1 local.get $1 f64.floor ) - (func $std/libm/fround (; 35 ;) (type $FUNCSIG$fd) (param $0 f64) (result f32) + (func $../../lib/libm/assembly/libm/fround (; 38 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) local.get $0 local.set $1 local.get $1 f32.demote_f64 + f64.promote_f32 ) - (func $~lib/math/NativeMath.hypot (; 36 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 39 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -2815,12 +2885,12 @@ f64.sqrt f64.mul ) - (func $std/libm/hypot (; 37 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/hypot (; 40 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot ) - (func $~lib/math/NativeMath.imul (; 38 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.imul (; 41 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.add @@ -2853,16 +2923,16 @@ i32.mul f64.convert_i32_s ) - (func $std/libm/imul (; 39 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/imul (; 42 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.imul ) - (func $std/libm/log (; 40 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log (; 43 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log ) - (func $~lib/math/NativeMath.log10 (; 41 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 44 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 i32) @@ -3122,15 +3192,15 @@ local.get $8 f64.add ) - (func $std/libm/log10 (; 42 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log10 (; 45 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log10 ) - (func $std/libm/log1p (; 43 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log1p (; 46 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log1p ) - (func $~lib/math/NativeMath.log2 (; 44 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 47 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 i32) @@ -3383,11 +3453,11 @@ local.get $14 f64.add ) - (func $std/libm/log2 (; 45 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log2 (; 48 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log2 ) - (func $std/libm/max (; 46 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/max (; 49 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) local.get $0 @@ -3398,7 +3468,7 @@ local.get $2 f64.max ) - (func $std/libm/min (; 47 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/min (; 50 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) local.get $0 @@ -3409,7 +3479,7 @@ local.get $2 f64.min ) - (func $~lib/math/NativeMath.pow (; 48 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 51 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -4490,12 +4560,12 @@ local.get $16 f64.mul ) - (func $std/libm/pow (; 49 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/pow (; 52 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.pow ) - (func $std/libm/round (; 50 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/round (; 53 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) local.get $0 local.set $1 @@ -4506,7 +4576,7 @@ local.get $1 f64.copysign ) - (func $std/libm/sign (; 51 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sign (; 54 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) block $~lib/math/NativeMath.sign|inlined.0 (result f64) local.get $0 @@ -4529,15 +4599,15 @@ br $~lib/math/NativeMath.sign|inlined.0 end ) - (func $~lib/math/NativeMath.sin (; 52 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) - unreachable - f64.const 0 + (func $~lib/math/NativeMath.sin (; 55 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/bindings/Math/sin ) - (func $std/libm/sin (; 53 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sin (; 56 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sin ) - (func $~lib/math/NativeMath.sinh (; 54 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 57 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 f64) (local $3 i32) @@ -4637,26 +4707,26 @@ local.set $4 local.get $4 ) - (func $std/libm/sinh (; 55 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sinh (; 58 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sinh ) - (func $std/libm/sqrt (; 56 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sqrt (; 59 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) local.get $0 local.set $1 local.get $1 f64.sqrt ) - (func $~lib/math/NativeMath.tan (; 57 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) - unreachable - f64.const 0 + (func $~lib/math/NativeMath.tan (; 60 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + local.get $0 + call $~lib/bindings/Math/tan ) - (func $std/libm/tan (; 58 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tan (; 61 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tan ) - (func $~lib/math/NativeMath.tanh (; 59 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 62 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 f64) (local $3 i32) @@ -4748,17 +4818,5949 @@ local.get $0 f64.copysign ) - (func $std/libm/tanh (; 60 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tanh (; 63 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tanh ) - (func $std/libm/trunc (; 61 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/trunc (; 64 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) local.get $0 local.set $1 local.get $1 f64.trunc ) - (func $null (; 62 ;) (type $FUNCSIG$v) + (func $../../lib/libm/assembly/libmf/abs (; 65 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + local.get $0 + local.set $1 + local.get $1 + f32.abs + ) + (func $~lib/math/Rf (; 66 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 f32) + local.get $0 + f32.const 0.16666586697101593 + local.get $0 + f32.const -0.04274342209100723 + local.get $0 + f32.const -0.008656363002955914 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + local.set $1 + f32.const 1 + local.get $0 + f32.const -0.7066296339035034 + f32.mul + f32.add + local.set $2 + local.get $1 + local.get $2 + f32.div + ) + (func $~lib/math/NativeMathf.acos (; 67 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + (local $7 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 2147483647 + i32.and + local.set $2 + local.get $2 + i32.const 1065353216 + i32.ge_u + if + local.get $2 + i32.const 1065353216 + i32.eq + if + local.get $1 + i32.const 31 + i32.shr_u + if + f32.const 2 + f32.const 1.570796251296997 + f32.mul + f32.const 7.52316384526264e-37 + f32.add + return + end + f32.const 0 + return + end + f32.const 0 + local.get $0 + local.get $0 + f32.sub + f32.div + return + end + local.get $2 + i32.const 1056964608 + i32.lt_u + if + local.get $2 + i32.const 847249408 + i32.le_u + if + f32.const 1.570796251296997 + f32.const 7.52316384526264e-37 + f32.add + return + end + f32.const 1.570796251296997 + local.get $0 + f32.const 7.549789415861596e-08 + local.get $0 + local.get $0 + local.get $0 + f32.mul + call $~lib/math/Rf + f32.mul + f32.sub + f32.sub + f32.sub + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + f32.const 0.5 + local.get $0 + f32.const 0.5 + f32.mul + f32.add + local.set $3 + local.get $3 + f32.sqrt + local.set $5 + local.get $3 + call $~lib/math/Rf + local.get $5 + f32.mul + f32.const 7.549789415861596e-08 + f32.sub + local.set $4 + f32.const 2 + f32.const 1.570796251296997 + local.get $5 + local.get $4 + f32.add + f32.sub + f32.mul + return + end + f32.const 0.5 + local.get $0 + f32.const 0.5 + f32.mul + f32.sub + local.set $3 + local.get $3 + f32.sqrt + local.set $5 + local.get $5 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $6 + local.get $3 + local.get $6 + local.get $6 + f32.mul + f32.sub + local.get $5 + local.get $6 + f32.add + f32.div + local.set $7 + local.get $3 + call $~lib/math/Rf + local.get $5 + f32.mul + local.get $7 + f32.add + local.set $4 + f32.const 2 + local.get $6 + local.get $4 + f32.add + f32.mul + ) + (func $../../lib/libm/assembly/libmf/acos (; 68 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.acos + ) + (func $~lib/math/NativeMathf.log1p (; 69 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + (local $4 i32) + (local $5 f32) + (local $6 i32) + (local $7 f32) + (local $8 f32) + (local $9 f32) + (local $10 f32) + (local $11 f32) + (local $12 f32) + (local $13 f32) + (local $14 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + f32.const 0 + local.set $2 + f32.const 0 + local.set $3 + i32.const 1 + local.set $4 + local.get $1 + i32.const 1054086096 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 31 + i32.shr_u + end + if + local.get $1 + i32.const -1082130432 + i32.ge_u + if + local.get $0 + f32.const -1 + f32.eq + if + local.get $0 + f32.const 0 + f32.div + return + end + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.div + return + end + local.get $1 + i32.const 1 + i32.shl + i32.const 1728053248 + i32.lt_u + if + local.get $0 + return + end + local.get $1 + i32.const -1097468391 + i32.le_u + if + i32.const 0 + local.set $4 + f32.const 0 + local.set $2 + local.get $0 + local.set $3 + end + else + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + return + end + end + local.get $4 + if + f32.const 1 + local.get $0 + f32.add + local.set $5 + local.get $5 + i32.reinterpret_f32 + local.set $6 + local.get $6 + i32.const 1065353216 + i32.const 1060439283 + i32.sub + i32.add + local.set $6 + local.get $6 + i32.const 23 + i32.shr_u + i32.const 127 + i32.sub + local.set $4 + local.get $4 + i32.const 25 + i32.lt_s + if + local.get $4 + i32.const 2 + i32.ge_s + if (result f32) + f32.const 1 + local.get $5 + local.get $0 + f32.sub + f32.sub + else + local.get $0 + local.get $5 + f32.const 1 + f32.sub + f32.sub + end + local.set $2 + local.get $2 + local.get $5 + f32.div + local.set $2 + else + f32.const 0 + local.set $2 + end + local.get $6 + i32.const 8388607 + i32.and + i32.const 1060439283 + i32.add + local.set $6 + local.get $6 + f32.reinterpret_i32 + f32.const 1 + f32.sub + local.set $3 + end + local.get $3 + f32.const 2 + local.get $3 + f32.add + f32.div + local.set $7 + local.get $7 + local.get $7 + f32.mul + local.set $8 + local.get $8 + local.get $8 + f32.mul + local.set $9 + local.get $9 + f32.const 0.40000972151756287 + local.get $9 + f32.const 0.24279078841209412 + f32.mul + f32.add + f32.mul + local.set $10 + local.get $8 + f32.const 0.6666666269302368 + local.get $9 + f32.const 0.2849878668785095 + f32.mul + f32.add + f32.mul + local.set $11 + local.get $11 + local.get $10 + f32.add + local.set $12 + f32.const 0.5 + local.get $3 + f32.mul + local.get $3 + f32.mul + local.set $13 + local.get $4 + f32.convert_i32_s + local.set $14 + local.get $7 + local.get $13 + local.get $12 + f32.add + f32.mul + local.get $14 + f32.const 9.05800061445916e-06 + f32.mul + local.get $2 + f32.add + f32.add + local.get $13 + f32.sub + local.get $3 + f32.add + local.get $14 + f32.const 0.6931381225585938 + f32.mul + f32.add + ) + (func $~lib/math/NativeMathf.log (; 70 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + (local $7 f32) + (local $8 f32) + (local $9 f32) + (local $10 f32) + (local $11 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + i32.const 0 + local.set $2 + local.get $1 + i32.const 8388608 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 31 + i32.shr_u + end + if + local.get $1 + i32.const 1 + i32.shl + i32.const 0 + i32.eq + if + f32.const -1 + local.get $0 + local.get $0 + f32.mul + f32.div + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.div + return + end + local.get $2 + i32.const 25 + i32.sub + local.set $2 + local.get $0 + f32.const 33554432 + f32.mul + local.set $0 + local.get $0 + i32.reinterpret_f32 + local.set $1 + else + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + return + else + local.get $1 + i32.const 1065353216 + i32.eq + if + f32.const 0 + return + end + end + end + local.get $1 + i32.const 1065353216 + i32.const 1060439283 + i32.sub + i32.add + local.set $1 + local.get $2 + local.get $1 + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + i32.add + local.set $2 + local.get $1 + i32.const 8388607 + i32.and + i32.const 1060439283 + i32.add + local.set $1 + local.get $1 + f32.reinterpret_i32 + local.set $0 + local.get $0 + f32.const 1 + f32.sub + local.set $3 + local.get $3 + f32.const 2 + local.get $3 + f32.add + f32.div + local.set $4 + local.get $4 + local.get $4 + f32.mul + local.set $5 + local.get $5 + local.get $5 + f32.mul + local.set $6 + local.get $6 + f32.const 0.40000972151756287 + local.get $6 + f32.const 0.24279078841209412 + f32.mul + f32.add + f32.mul + local.set $7 + local.get $5 + f32.const 0.6666666269302368 + local.get $6 + f32.const 0.2849878668785095 + f32.mul + f32.add + f32.mul + local.set $8 + local.get $8 + local.get $7 + f32.add + local.set $9 + f32.const 0.5 + local.get $3 + f32.mul + local.get $3 + f32.mul + local.set $10 + local.get $2 + f32.convert_i32_s + local.set $11 + local.get $4 + local.get $10 + local.get $9 + f32.add + f32.mul + local.get $11 + f32.const 9.05800061445916e-06 + f32.mul + f32.add + local.get $10 + f32.sub + local.get $3 + f32.add + local.get $11 + f32.const 0.6931381225585938 + f32.mul + f32.add + ) + (func $~lib/math/NativeMathf.acosh (; 71 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 2147483647 + i32.and + local.set $2 + local.get $2 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + f32.const 1 + f32.sub + local.set $3 + local.get $3 + local.get $3 + local.get $3 + f32.const 2 + f32.add + f32.mul + f32.sqrt + f32.add + call $~lib/math/NativeMathf.log1p + return + end + local.get $2 + i32.const 1166016512 + i32.lt_u + if + f32.const 2 + local.get $0 + f32.mul + f32.const 1 + local.get $0 + local.get $0 + local.get $0 + f32.mul + f32.const 1 + f32.sub + f32.sqrt + f32.add + f32.div + f32.sub + call $~lib/math/NativeMathf.log + return + end + local.get $0 + call $~lib/math/NativeMathf.log + f32.const 0.6931471824645996 + f32.add + ) + (func $../../lib/libm/assembly/libmf/acosh (; 72 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.acosh + ) + (func $~lib/math/NativeMathf.asin (; 73 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) + (local $3 f32) + (local $4 f64) + local.get $0 + local.set $1 + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.set $2 + local.get $2 + i32.const 1065353216 + i32.ge_u + if + local.get $2 + i32.const 1065353216 + i32.eq + if + local.get $0 + f32.const 1.5707963705062866 + f32.mul + f32.const 7.52316384526264e-37 + f32.add + return + end + f32.const 0 + local.get $0 + local.get $0 + f32.sub + f32.div + return + end + local.get $2 + i32.const 1056964608 + i32.lt_u + if + local.get $2 + i32.const 964689920 + i32.lt_u + if (result i32) + local.get $2 + i32.const 8388608 + i32.ge_u + else + i32.const 0 + end + if + local.get $0 + return + end + local.get $0 + local.get $0 + local.get $0 + local.get $0 + f32.mul + call $~lib/math/Rf + f32.mul + f32.add + return + end + f32.const 0.5 + local.get $0 + f32.abs + f32.const 0.5 + f32.mul + f32.sub + local.set $3 + local.get $3 + f64.promote_f32 + f64.sqrt + local.set $4 + f32.const 1.5707963705062866 + f64.promote_f32 + f32.const 2 + f64.promote_f32 + local.get $4 + local.get $4 + local.get $3 + call $~lib/math/Rf + f64.promote_f32 + f64.mul + f64.add + f64.mul + f64.sub + f32.demote_f64 + local.set $0 + local.get $0 + local.get $1 + f32.copysign + ) + (func $../../lib/libm/assembly/libmf/asin (; 74 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.asin + ) + (func $~lib/math/NativeMathf.asinh (; 75 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.set $1 + local.get $1 + f32.reinterpret_i32 + local.set $2 + local.get $1 + i32.const 1166016512 + i32.ge_u + if + local.get $2 + call $~lib/math/NativeMathf.log + f32.const 0.6931471824645996 + f32.add + local.set $2 + else + local.get $1 + i32.const 1073741824 + i32.ge_u + if + f32.const 2 + local.get $2 + f32.mul + f32.const 1 + local.get $2 + local.get $2 + f32.mul + f32.const 1 + f32.add + f32.sqrt + local.get $2 + f32.add + f32.div + f32.add + call $~lib/math/NativeMathf.log + local.set $2 + else + local.get $1 + i32.const 964689920 + i32.ge_u + if + local.get $2 + local.get $2 + local.get $2 + f32.mul + local.get $2 + local.get $2 + f32.mul + f32.const 1 + f32.add + f32.sqrt + f32.const 1 + f32.add + f32.div + f32.add + call $~lib/math/NativeMathf.log1p + local.set $2 + end + end + end + local.get $2 + local.get $0 + f32.copysign + ) + (func $../../lib/libm/assembly/libmf/asinh (; 76 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.asinh + ) + (func $~lib/builtins/isNaN (; 77 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.ne + ) + (func $~lib/math/NativeMathf.atan (; 78 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + (local $4 i32) + (local $5 f32) + (local $6 f32) + (local $7 f32) + (local $8 f32) + (local $9 i32) + local.get $0 + i32.reinterpret_f32 + 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 1283457024 + i32.ge_u + if + local.get $0 + call $~lib/builtins/isNaN + if + local.get $0 + return + end + f32.const 1.570796251296997 + f32.const 7.52316384526264e-37 + f32.add + local.set $3 + local.get $3 + local.get $2 + f32.copysign + return + end + local.get $1 + i32.const 1054867456 + i32.lt_u + if + local.get $1 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + i32.const -1 + local.set $4 + else + local.get $0 + f32.abs + local.set $0 + local.get $1 + i32.const 1066926080 + i32.lt_u + if + local.get $1 + i32.const 1060110336 + i32.lt_u + if + i32.const 0 + local.set $4 + f32.const 2 + local.get $0 + f32.mul + f32.const 1 + f32.sub + f32.const 2 + local.get $0 + f32.add + f32.div + local.set $0 + else + i32.const 1 + local.set $4 + local.get $0 + f32.const 1 + f32.sub + local.get $0 + f32.const 1 + f32.add + f32.div + local.set $0 + end + else + local.get $1 + i32.const 1075576832 + i32.lt_u + if + i32.const 2 + local.set $4 + local.get $0 + f32.const 1.5 + f32.sub + f32.const 1 + f32.const 1.5 + local.get $0 + f32.mul + f32.add + f32.div + local.set $0 + else + i32.const 3 + local.set $4 + f32.const -1 + local.get $0 + f32.div + local.set $0 + end + end + end + local.get $0 + local.get $0 + f32.mul + local.set $3 + local.get $3 + local.get $3 + f32.mul + local.set $5 + local.get $3 + f32.const 0.333333283662796 + local.get $5 + f32.const 0.14253635704517365 + local.get $5 + f32.const 0.06168760731816292 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + local.set $6 + local.get $5 + f32.const -0.19999158382415771 + local.get $5 + f32.const -0.106480173766613 + f32.mul + f32.add + f32.mul + local.set $7 + local.get $0 + local.get $6 + local.get $7 + f32.add + f32.mul + local.set $8 + local.get $4 + i32.const 0 + i32.lt_s + if + local.get $0 + local.get $8 + f32.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 + block + f32.const 0.46364760398864746 + local.get $8 + f32.const 5.01215824399992e-09 + f32.sub + local.get $0 + f32.sub + f32.sub + local.set $3 + br $break|0 + unreachable + end + unreachable + end + block + f32.const 0.7853981256484985 + local.get $8 + f32.const 3.774894707930798e-08 + f32.sub + local.get $0 + f32.sub + f32.sub + local.set $3 + br $break|0 + unreachable + end + unreachable + end + block + f32.const 0.9827936887741089 + local.get $8 + f32.const 3.447321716976148e-08 + f32.sub + local.get $0 + f32.sub + f32.sub + local.set $3 + br $break|0 + unreachable + end + unreachable + end + block + f32.const 1.570796251296997 + local.get $8 + f32.const 7.549789415861596e-08 + f32.sub + local.get $0 + f32.sub + f32.sub + local.set $3 + br $break|0 + unreachable + end + unreachable + end + unreachable + end + local.get $3 + local.get $2 + f32.copysign + ) + (func $../../lib/libm/assembly/libmf/atan (; 79 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.atan + ) + (func $~lib/math/NativeMathf.atanh (; 80 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 2147483647 + i32.and + local.set $1 + local.get $1 + f32.reinterpret_i32 + local.set $2 + local.get $1 + i32.const 1056964608 + i32.lt_u + if + local.get $1 + i32.const 796917760 + i32.ge_u + if + f32.const 0.5 + f32.const 2 + local.get $2 + f32.mul + f32.const 1 + local.get $2 + f32.const 1 + local.get $2 + f32.sub + f32.div + f32.add + f32.mul + call $~lib/math/NativeMathf.log1p + f32.mul + local.set $2 + end + else + f32.const 0.5 + f32.const 2 + local.get $2 + f32.const 1 + local.get $2 + f32.sub + f32.div + f32.mul + call $~lib/math/NativeMathf.log1p + f32.mul + local.set $2 + end + local.get $2 + local.get $0 + f32.copysign + ) + (func $../../lib/libm/assembly/libmf/atanh (; 81 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.atanh + ) + (func $~lib/math/NativeMathf.atan2 (; 82 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f32) + local.get $1 + call $~lib/builtins/isNaN + if (result i32) + i32.const 1 + else + local.get $0 + call $~lib/builtins/isNaN + end + if + local.get $1 + local.get $0 + f32.add + return + end + local.get $1 + i32.reinterpret_f32 + local.set $2 + local.get $0 + i32.reinterpret_f32 + local.set $3 + local.get $2 + i32.const 1065353216 + i32.eq + if + local.get $0 + call $~lib/math/NativeMathf.atan + return + end + local.get $3 + i32.const 31 + i32.shr_u + i32.const 1 + i32.and + local.get $2 + i32.const 30 + i32.shr_u + i32.const 2 + i32.and + i32.or + local.set $4 + local.get $2 + i32.const 2147483647 + i32.and + local.set $2 + local.get $3 + i32.const 2147483647 + i32.and + local.set $3 + local.get $3 + i32.const 0 + i32.eq + if + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + local.get $4 + local.set $5 + local.get $5 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $5 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $5 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $5 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + end + local.get $0 + return + end + f32.const 3.1415927410125732 + return + end + f32.const 3.1415927410125732 + f32.neg + return + end + end + local.get $2 + i32.const 0 + i32.eq + if + local.get $4 + i32.const 1 + i32.and + if (result f32) + f32.const 3.1415927410125732 + f32.neg + f32.const 2 + f32.div + else + f32.const 3.1415927410125732 + f32.const 2 + f32.div + end + return + end + local.get $2 + i32.const 2139095040 + i32.eq + if + local.get $3 + i32.const 2139095040 + i32.eq + if + block $break|1 + block $case3|1 + block $case2|1 + block $case1|1 + block $case0|1 + local.get $4 + local.set $5 + local.get $5 + i32.const 0 + i32.eq + br_if $case0|1 + local.get $5 + i32.const 1 + i32.eq + br_if $case1|1 + local.get $5 + i32.const 2 + i32.eq + br_if $case2|1 + local.get $5 + i32.const 3 + i32.eq + br_if $case3|1 + br $break|1 + end + f32.const 3.1415927410125732 + f32.const 4 + f32.div + return + end + f32.const 3.1415927410125732 + f32.neg + f32.const 4 + f32.div + return + end + f32.const 3 + f32.const 3.1415927410125732 + f32.mul + f32.const 4 + f32.div + return + end + f32.const -3 + f32.const 3.1415927410125732 + f32.mul + f32.const 4 + f32.div + return + end + else + block $break|2 + block $case3|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $4 + local.set $5 + local.get $5 + i32.const 0 + i32.eq + br_if $case0|2 + local.get $5 + i32.const 1 + i32.eq + br_if $case1|2 + local.get $5 + i32.const 2 + i32.eq + br_if $case2|2 + local.get $5 + i32.const 3 + i32.eq + br_if $case3|2 + br $break|2 + end + f32.const 0 + return + end + f32.const 0 + return + end + f32.const 3.1415927410125732 + return + end + f32.const 3.1415927410125732 + f32.neg + return + end + end + end + local.get $2 + i32.const 218103808 + i32.add + local.get $3 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $3 + i32.const 2139095040 + i32.eq + end + if + local.get $4 + i32.const 1 + i32.and + if (result f32) + f32.const 3.1415927410125732 + f32.neg + f32.const 2 + f32.div + else + f32.const 3.1415927410125732 + f32.const 2 + f32.div + end + return + end + local.get $4 + i32.const 2 + i32.and + if (result i32) + local.get $3 + i32.const 218103808 + i32.add + local.get $2 + i32.lt_u + else + i32.const 0 + end + if + f32.const 0 + local.set $6 + else + local.get $0 + local.get $1 + f32.div + f32.abs + call $~lib/math/NativeMathf.atan + local.set $6 + end + block $break|3 + block $case3|3 + block $case2|3 + block $case1|3 + block $case0|3 + local.get $4 + local.set $5 + local.get $5 + i32.const 0 + i32.eq + br_if $case0|3 + local.get $5 + i32.const 1 + i32.eq + br_if $case1|3 + local.get $5 + i32.const 2 + i32.eq + br_if $case2|3 + local.get $5 + i32.const 3 + i32.eq + br_if $case3|3 + br $break|3 + end + local.get $6 + return + end + local.get $6 + f32.neg + return + end + f32.const 3.1415927410125732 + local.get $6 + f32.const -8.742277657347586e-08 + f32.sub + f32.sub + return + end + local.get $6 + f32.const -8.742277657347586e-08 + f32.sub + f32.const 3.1415927410125732 + f32.sub + return + end + unreachable + f32.const 0 + ) + (func $../../lib/libm/assembly/libmf/atan2 (; 83 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.atan2 + ) + (func $~lib/math/NativeMathf.cbrt (; 84 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 2147483647 + i32.and + local.set $2 + local.get $2 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.add + return + end + local.get $2 + i32.const 8388608 + i32.lt_u + if + local.get $2 + i32.const 0 + i32.eq + if + local.get $0 + return + end + local.get $0 + f32.const 16777216 + f32.mul + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 2147483647 + i32.and + local.set $2 + local.get $2 + i32.const 3 + i32.div_u + i32.const 642849266 + i32.add + local.set $2 + else + local.get $2 + i32.const 3 + i32.div_u + i32.const 709958130 + i32.add + local.set $2 + end + local.get $1 + i32.const -2147483648 + i32.and + local.set $1 + local.get $1 + local.get $2 + i32.or + local.set $1 + local.get $1 + f32.reinterpret_i32 + f64.promote_f32 + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.get $3 + f64.mul + local.set $4 + local.get $3 + local.get $0 + f64.promote_f32 + local.get $0 + f64.promote_f32 + f64.add + local.get $4 + f64.add + f64.mul + local.get $0 + f64.promote_f32 + local.get $4 + f64.add + local.get $4 + f64.add + f64.div + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.get $3 + f64.mul + local.set $4 + local.get $3 + local.get $0 + f64.promote_f32 + local.get $0 + f64.promote_f32 + f64.add + local.get $4 + f64.add + f64.mul + local.get $0 + f64.promote_f32 + local.get $4 + f64.add + local.get $4 + f64.add + f64.div + local.set $3 + local.get $3 + f32.demote_f64 + ) + (func $../../lib/libm/assembly/libmf/cbrt (; 85 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.cbrt + ) + (func $../../lib/libm/assembly/libmf/ceil (; 86 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + local.get $0 + local.set $1 + local.get $1 + f32.ceil + ) + (func $~lib/builtins/isFinite (; 87 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.eq + ) + (func $~lib/math/NativeMathf.clz32 (; 88 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/builtins/isFinite + i32.eqz + if + f32.const 32 + return + end + local.get $0 + f32.const 4294967296 + local.get $0 + f32.const 1 + f32.const 4294967296 + f32.div + f32.mul + f32.floor + f32.mul + f32.sub + i64.trunc_f32_s + i32.wrap_i64 + i32.clz + f32.convert_i32_s + ) + (func $../../lib/libm/assembly/libmf/clz32 (; 89 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.clz32 + ) + (func $~lib/array/Array#__unchecked_get (; 90 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/math/NativeMathf.cos (; 91 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 i32) + (local $12 f32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i64) + (local $17 i64) + (local $18 i64) + (local $19 i64) + (local $20 i64) + (local $21 i64) + (local $22 i64) + (local $23 i32) + (local $24 i32) + (local $25 f64) + (local $26 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 31 + i32.shr_u + local.set $2 + local.get $1 + i32.const 2147483647 + i32.and + local.set $1 + local.get $1 + i32.const 1061752794 + i32.le_u + if + local.get $1 + i32.const 964689920 + i32.lt_u + if + f32.const 1 + return + end + block $~lib/math/cos_kernf|inlined.0 (result f32) + local.get $0 + f64.promote_f32 + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $4 + local.get $4 + local.get $4 + f64.mul + local.set $5 + f64.const -0.001388676377460993 + local.get $4 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + local.set $6 + f32.const 1 + f64.promote_f32 + local.get $4 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $5 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $5 + local.get $4 + f64.mul + local.get $6 + f64.mul + f64.add + f32.demote_f64 + end + return + end + local.get $1 + i32.const 1081824209 + i32.le_u + if + local.get $1 + i32.const 1075235811 + i32.gt_u + if + block $~lib/math/cos_kernf|inlined.1 (result f32) + local.get $2 + if (result f64) + local.get $0 + f64.promote_f32 + f64.const 3.141592653589793 + f64.add + else + local.get $0 + f64.promote_f32 + f64.const 3.141592653589793 + f64.sub + end + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $6 + local.get $6 + local.get $6 + f64.mul + local.set $5 + f64.const -0.001388676377460993 + local.get $6 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + local.set $4 + f32.const 1 + f64.promote_f32 + local.get $6 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $5 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $5 + local.get $6 + f64.mul + local.get $4 + f64.mul + f64.add + f32.demote_f64 + end + f32.neg + return + else + local.get $2 + if (result f32) + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.add + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $4 + local.get $4 + local.get $4 + f64.mul + local.set $5 + f64.const -1.9839334836096632e-04 + local.get $4 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + local.set $6 + local.get $4 + local.get $3 + f64.mul + local.set $7 + local.get $3 + local.get $7 + f64.const -0.16666666641626524 + local.get $4 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + local.get $6 + f64.mul + f64.add + f32.demote_f64 + else + f64.const 1.5707963267948966 + local.get $0 + f64.promote_f32 + f64.sub + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $7 + local.get $7 + local.get $7 + f64.mul + local.set $6 + f64.const -1.9839334836096632e-04 + local.get $7 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + local.set $5 + local.get $7 + local.get $3 + f64.mul + local.set $4 + local.get $3 + local.get $4 + f64.const -0.16666666641626524 + local.get $7 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $4 + local.get $6 + f64.mul + local.get $5 + f64.mul + f64.add + f32.demote_f64 + end + return + end + unreachable + unreachable + end + local.get $1 + i32.const 1088565717 + i32.le_u + if + local.get $1 + i32.const 1085271519 + i32.gt_u + if + block $~lib/math/cos_kernf|inlined.2 (result f32) + local.get $2 + if (result f64) + local.get $0 + f64.promote_f32 + f64.const 6.283185307179586 + f64.add + else + local.get $0 + f64.promote_f32 + f64.const 6.283185307179586 + f64.sub + end + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $4 + local.get $4 + local.get $4 + f64.mul + local.set $5 + f64.const -0.001388676377460993 + local.get $4 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + local.set $6 + f32.const 1 + f64.promote_f32 + local.get $4 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $5 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $5 + local.get $4 + f64.mul + local.get $6 + f64.mul + f64.add + f32.demote_f64 + end + return + else + local.get $2 + if (result f32) + local.get $0 + f32.neg + f64.promote_f32 + f64.const 4.71238898038469 + f64.sub + local.set $7 + local.get $7 + local.get $7 + f64.mul + local.set $6 + local.get $6 + local.get $6 + f64.mul + local.set $5 + f64.const -1.9839334836096632e-04 + local.get $6 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + local.set $4 + local.get $6 + local.get $7 + f64.mul + local.set $3 + local.get $7 + local.get $3 + f64.const -0.16666666641626524 + local.get $6 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + local.get $5 + f64.mul + local.get $4 + f64.mul + f64.add + f32.demote_f64 + else + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.sub + local.set $7 + local.get $7 + local.get $7 + f64.mul + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $4 + f64.const -1.9839334836096632e-04 + local.get $3 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + local.set $5 + local.get $3 + local.get $7 + f64.mul + local.set $6 + local.get $7 + local.get $6 + f64.const -0.16666666641626524 + local.get $3 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $6 + local.get $4 + f64.mul + local.get $5 + f64.mul + f64.add + f32.demote_f64 + end + return + end + unreachable + unreachable + end + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + return + end + block $~lib/math/rempio2f|inlined.0 (result i32) + local.get $0 + local.set $10 + local.get $1 + local.set $9 + local.get $2 + local.set $8 + local.get $9 + i32.const 1305022427 + i32.lt_u + if + local.get $10 + f64.promote_f32 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $6 + local.get $10 + f64.promote_f32 + local.get $6 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $6 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $6 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.0 + end + block $~lib/math/pio2_large_quot|inlined.0 (result i32) + local.get $10 + local.set $12 + local.get $9 + local.set $11 + local.get $11 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.set $13 + local.get $13 + i32.const 6 + i32.shr_s + local.set $14 + local.get $13 + i32.const 63 + i32.and + local.set $15 + i32.const 72 + local.get $14 + i32.const 0 + i32.add + call $~lib/array/Array#__unchecked_get + local.set $16 + i32.const 72 + local.get $14 + i32.const 1 + i32.add + call $~lib/array/Array#__unchecked_get + local.set $17 + local.get $15 + i32.const 32 + i32.gt_s + if + i32.const 72 + local.get $14 + i32.const 2 + i32.add + call $~lib/array/Array#__unchecked_get + local.set $19 + local.get $19 + i64.const 96 + local.get $15 + i64.extend_i32_s + i64.sub + i64.shr_u + local.set $18 + local.get $18 + local.get $17 + local.get $15 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + i64.or + local.set $18 + else + local.get $17 + i64.const 32 + local.get $15 + i64.extend_i32_s + i64.sub + i64.shr_u + local.set $18 + end + local.get $17 + i64.const 64 + local.get $15 + i64.extend_i32_s + i64.sub + i64.shr_u + local.get $16 + local.get $15 + i64.extend_i32_s + i64.shl + i64.or + local.set $19 + local.get $11 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.set $20 + local.get $20 + local.get $19 + i64.mul + local.get $20 + local.get $18 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $21 + local.get $21 + i64.const 2 + i64.shl + local.set $22 + local.get $21 + i64.const 62 + i64.shr_u + local.get $22 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.set $23 + f64.const 8.515303950216386e-20 + local.get $12 + f64.promote_f32 + f64.copysign + local.get $22 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + local.get $23 + end + local.set $23 + i32.const 0 + local.get $23 + i32.sub + local.get $23 + local.get $8 + select + end + local.set $24 + global.get $~lib/math/rempio2f_y + local.set $25 + local.get $24 + i32.const 1 + i32.and + if (result f32) + local.get $25 + local.set $7 + local.get $7 + local.get $7 + f64.mul + local.set $6 + local.get $6 + local.get $6 + f64.mul + local.set $5 + f64.const -1.9839334836096632e-04 + local.get $6 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + local.set $4 + local.get $6 + local.get $7 + f64.mul + local.set $3 + local.get $7 + local.get $3 + f64.const -0.16666666641626524 + local.get $6 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + local.get $5 + f64.mul + local.get $4 + f64.mul + f64.add + f32.demote_f64 + else + local.get $25 + local.set $7 + local.get $7 + local.get $7 + f64.mul + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $4 + f64.const -0.001388676377460993 + local.get $3 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + local.set $5 + f32.const 1 + f64.promote_f32 + local.get $3 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $4 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $4 + local.get $3 + f64.mul + local.get $5 + f64.mul + f64.add + f32.demote_f64 + end + local.set $26 + local.get $24 + i32.const 1 + i32.add + i32.const 2 + i32.and + if (result f32) + local.get $26 + f32.neg + else + local.get $26 + end + ) + (func $../../lib/libm/assembly/libmf/cos (; 92 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.cos + ) + (func $~lib/math/NativeMathf.expm1 (; 93 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + (local $5 f32) + (local $6 i32) + (local $7 f32) + (local $8 f32) + (local $9 f32) + (local $10 f32) + (local $11 f32) + (local $12 f32) + (local $13 f32) + (local $14 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 2147483647 + i32.and + local.set $2 + local.get $1 + i32.const 31 + i32.shr_u + local.set $3 + local.get $2 + i32.const 1100331076 + i32.ge_u + if + local.get $2 + i32.const 2139095040 + i32.gt_u + if + local.get $0 + return + end + local.get $3 + if + f32.const -1 + return + end + local.get $0 + f32.const 88.7216796875 + f32.gt + if + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + local.set $0 + local.get $0 + return + end + end + f32.const 0 + local.set $4 + local.get $2 + i32.const 1051816472 + i32.gt_u + if + i32.const 1 + local.get $3 + i32.const 1 + i32.shl + i32.sub + f32.const 1.4426950216293335 + local.get $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.copysign + f32.add + i32.trunc_f32_s + local.get $2 + i32.const 1065686418 + i32.lt_u + select + local.set $6 + local.get $6 + f32.convert_i32_s + local.set $5 + local.get $0 + local.get $5 + f32.const 0.6931381225585938 + f32.mul + f32.sub + local.set $7 + local.get $5 + f32.const 9.05800061445916e-06 + f32.mul + local.set $8 + local.get $7 + local.get $8 + f32.sub + local.set $0 + local.get $7 + local.get $0 + f32.sub + local.get $8 + f32.sub + local.set $4 + else + local.get $2 + i32.const 855638016 + i32.lt_u + if + local.get $0 + return + else + i32.const 0 + local.set $6 + end + end + f32.const 0.5 + local.get $0 + f32.mul + local.set $9 + local.get $0 + local.get $9 + f32.mul + local.set $10 + f32.const 1 + local.get $10 + f32.const -0.03333321213722229 + local.get $10 + f32.const 1.5807170420885086e-03 + f32.mul + f32.add + f32.mul + f32.add + local.set $11 + f32.const 3 + local.get $11 + local.get $9 + f32.mul + f32.sub + local.set $5 + local.get $10 + local.get $11 + local.get $5 + f32.sub + f32.const 6 + local.get $0 + local.get $5 + f32.mul + f32.sub + f32.div + f32.mul + local.set $12 + local.get $6 + i32.const 0 + i32.eq + if + local.get $0 + local.get $0 + local.get $12 + f32.mul + local.get $10 + f32.sub + f32.sub + return + end + local.get $0 + local.get $12 + local.get $4 + f32.sub + f32.mul + local.get $4 + f32.sub + local.set $12 + local.get $12 + local.get $10 + f32.sub + local.set $12 + local.get $6 + i32.const -1 + i32.eq + if + f32.const 0.5 + local.get $0 + local.get $12 + f32.sub + f32.mul + f32.const 0.5 + f32.sub + return + end + local.get $6 + i32.const 1 + i32.eq + if + local.get $0 + f32.const -0.25 + f32.lt + if + f32.const -2 + local.get $12 + local.get $0 + f32.const 0.5 + f32.add + f32.sub + f32.mul + return + end + f32.const 1 + f32.const 2 + local.get $0 + local.get $12 + f32.sub + f32.mul + f32.add + return + end + i32.const 127 + local.get $6 + i32.add + i32.const 23 + i32.shl + local.set $1 + local.get $1 + f32.reinterpret_i32 + local.set $13 + local.get $6 + i32.const 0 + i32.lt_s + if (result i32) + i32.const 1 + else + local.get $6 + i32.const 56 + i32.gt_s + end + if + local.get $0 + local.get $12 + f32.sub + f32.const 1 + f32.add + local.set $14 + local.get $6 + i32.const 128 + i32.eq + if + local.get $14 + f32.const 2 + f32.mul + f32.const 1701411834604692317316873e14 + f32.mul + local.set $14 + else + local.get $14 + local.get $13 + f32.mul + local.set $14 + end + local.get $14 + f32.const 1 + f32.sub + return + end + i32.const 127 + local.get $6 + i32.sub + i32.const 23 + i32.shl + local.set $1 + local.get $1 + f32.reinterpret_i32 + local.set $14 + local.get $6 + i32.const 20 + i32.lt_s + if + f32.const 1 + local.get $14 + f32.sub + local.get $12 + f32.sub + local.set $14 + else + f32.const 1 + local.get $12 + local.get $14 + f32.add + f32.sub + local.set $14 + end + local.get $0 + local.get $14 + f32.add + local.get $13 + f32.mul + ) + (func $~lib/math/NativeMathf.scalbn (; 94 ;) (type $FUNCSIG$ffi) (param $0 f32) (param $1 i32) (result f32) + (local $2 f32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.set $2 + local.get $1 + i32.const 127 + i32.gt_s + if + local.get $2 + f32.const 1701411834604692317316873e14 + f32.mul + local.set $2 + local.get $1 + i32.const 127 + i32.sub + local.set $1 + local.get $1 + i32.const 127 + i32.gt_s + if + local.get $2 + f32.const 1701411834604692317316873e14 + f32.mul + local.set $2 + local.get $1 + i32.const 127 + i32.sub + local.tee $3 + i32.const 127 + local.tee $4 + local.get $3 + local.get $4 + i32.lt_s + select + local.set $1 + end + else + local.get $1 + i32.const -126 + i32.lt_s + if + local.get $2 + f32.const 1.1754943508222875e-38 + f32.const 16777216 + f32.mul + f32.mul + local.set $2 + local.get $1 + i32.const 126 + i32.const 24 + i32.sub + i32.add + local.set $1 + local.get $1 + i32.const -126 + i32.lt_s + if + local.get $2 + f32.const 1.1754943508222875e-38 + f32.const 16777216 + f32.mul + f32.mul + local.set $2 + local.get $1 + i32.const 126 + i32.add + i32.const 24 + i32.sub + local.tee $3 + i32.const -126 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_s + select + local.set $1 + end + end + end + local.get $2 + i32.const 127 + local.get $1 + i32.add + i32.const 23 + i32.shl + f32.reinterpret_i32 + f32.mul + ) + (func $~lib/math/NativeMathf.exp (; 95 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + (local $4 f32) + (local $5 i32) + (local $6 f32) + (local $7 f32) + (local $8 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 31 + i32.shr_u + local.set $2 + local.get $1 + i32.const 2147483647 + i32.and + local.set $1 + local.get $1 + i32.const 1118743632 + i32.ge_u + if + local.get $1 + i32.const 1118925336 + i32.ge_u + if + local.get $2 + i32.eqz + if + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + return + else + local.get $1 + i32.const 1120924085 + i32.ge_u + if + f32.const 0 + return + end + end + end + end + local.get $1 + i32.const 1051816472 + i32.gt_u + if + local.get $1 + i32.const 1065686418 + i32.gt_u + if + f32.const 1.4426950216293335 + local.get $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.copysign + f32.add + i32.trunc_f32_s + local.set $5 + else + i32.const 1 + local.get $2 + i32.const 1 + i32.shl + i32.sub + local.set $5 + end + local.get $0 + local.get $5 + f32.convert_i32_s + f32.const 0.693145751953125 + f32.mul + f32.sub + local.set $3 + local.get $5 + f32.convert_i32_s + f32.const 1.428606765330187e-06 + f32.mul + local.set $4 + local.get $3 + local.get $4 + f32.sub + local.set $0 + else + local.get $1 + i32.const 956301312 + i32.gt_u + if + i32.const 0 + local.set $5 + local.get $0 + local.set $3 + f32.const 0 + local.set $4 + else + f32.const 1 + local.get $0 + f32.add + return + end + end + local.get $0 + local.get $0 + f32.mul + local.set $6 + local.get $0 + local.get $6 + f32.const 0.16666625440120697 + local.get $6 + f32.const -2.7667332906275988e-03 + f32.mul + f32.add + f32.mul + f32.sub + local.set $7 + f32.const 1 + local.get $0 + local.get $7 + f32.mul + f32.const 2 + local.get $7 + f32.sub + f32.div + local.get $4 + f32.sub + local.get $3 + f32.add + f32.add + local.set $8 + local.get $5 + i32.const 0 + i32.eq + if + local.get $8 + return + end + local.get $8 + local.get $5 + call $~lib/math/NativeMathf.scalbn + ) + (func $~lib/math/NativeMathf.cosh (; 96 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 2147483647 + i32.and + local.set $1 + local.get $1 + f32.reinterpret_i32 + local.set $0 + local.get $1 + i32.const 1060205079 + i32.lt_u + if + local.get $1 + i32.const 964689920 + i32.lt_u + if + f32.const 1 + return + end + local.get $0 + call $~lib/math/NativeMathf.expm1 + local.set $2 + f32.const 1 + local.get $2 + local.get $2 + f32.mul + f32.const 2 + f32.const 2 + local.get $2 + f32.mul + f32.add + f32.div + f32.add + return + end + local.get $1 + i32.const 1118925335 + i32.lt_u + if + local.get $0 + call $~lib/math/NativeMathf.exp + local.set $2 + f32.const 0.5 + local.get $2 + f32.mul + f32.const 0.5 + local.get $2 + f32.div + f32.add + return + end + block $~lib/math/expo2f|inlined.0 (result f32) + local.get $0 + local.set $2 + i32.const 127 + i32.const 235 + i32.const 1 + i32.shr_u + i32.add + i32.const 23 + i32.shl + f32.reinterpret_i32 + local.set $3 + local.get $2 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + local.get $3 + f32.mul + local.get $3 + f32.mul + end + ) + (func $../../lib/libm/assembly/libmf/cosh (; 97 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.cosh + ) + (func $../../lib/libm/assembly/libmf/exp (; 98 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.exp + ) + (func $../../lib/libm/assembly/libmf/expm1 (; 99 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.expm1 + ) + (func $../../lib/libm/assembly/libmf/floor (; 100 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + local.get $0 + local.set $1 + local.get $1 + f32.floor + ) + (func $../../lib/libm/assembly/libmf/fround (; 101 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + local.get $0 + local.set $1 + local.get $1 + ) + (func $~lib/math/NativeMathf.hypot (; 102 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f32) + local.get $0 + i32.reinterpret_f32 + local.set $2 + local.get $1 + i32.reinterpret_f32 + local.set $3 + local.get $2 + i32.const 2147483647 + i32.and + local.set $2 + local.get $3 + i32.const 2147483647 + i32.and + local.set $3 + local.get $2 + local.get $3 + i32.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 + f32.reinterpret_i32 + local.set $0 + local.get $3 + f32.reinterpret_i32 + local.set $1 + local.get $3 + i32.const 2139095040 + i32.eq + if + local.get $1 + return + end + local.get $2 + i32.const 2139095040 + i32.ge_u + if (result i32) + i32.const 1 + else + local.get $3 + i32.const 0 + i32.eq + end + if (result i32) + i32.const 1 + else + local.get $2 + local.get $3 + i32.sub + i32.const 209715200 + i32.ge_u + end + if + local.get $0 + local.get $1 + f32.add + return + end + f32.const 1 + local.set $5 + local.get $2 + i32.const 1568669696 + i32.ge_u + if + f32.const 1237940039285380274899124e3 + local.set $5 + local.get $0 + f32.const 8.077935669463161e-28 + f32.mul + local.set $0 + local.get $1 + f32.const 8.077935669463161e-28 + f32.mul + local.set $1 + else + local.get $3 + i32.const 562036736 + i32.lt_u + if + f32.const 8.077935669463161e-28 + local.set $5 + local.get $0 + f32.const 1237940039285380274899124e3 + f32.mul + local.set $0 + local.get $1 + f32.const 1237940039285380274899124e3 + f32.mul + local.set $1 + end + end + local.get $5 + local.get $0 + f64.promote_f32 + local.get $0 + f64.promote_f32 + f64.mul + local.get $1 + f64.promote_f32 + local.get $1 + f64.promote_f32 + f64.mul + f64.add + f32.demote_f64 + f32.sqrt + f32.mul + ) + (func $../../lib/libm/assembly/libmf/hypot (; 103 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.hypot + ) + (func $../../lib/libm/assembly/libmf/imul (; 104 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 f32) + (local $3 f32) + block $~lib/math/NativeMathf.imul|inlined.0 (result f32) + local.get $0 + local.set $3 + local.get $1 + local.set $2 + local.get $3 + local.get $2 + f32.add + call $~lib/builtins/isFinite + i32.eqz + if + f32.const 0 + br $~lib/math/NativeMathf.imul|inlined.0 + end + local.get $3 + f64.promote_f32 + f32.const 4294967296 + f64.promote_f32 + local.get $3 + f64.promote_f32 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + local.get $2 + f64.promote_f32 + f32.const 4294967296 + f64.promote_f32 + local.get $2 + f64.promote_f32 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + i32.mul + f32.convert_i32_s + end + ) + (func $../../lib/libm/assembly/libmf/log (; 105 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.log + ) + (func $~lib/math/NativeMathf.log10 (; 106 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + (local $7 f32) + (local $8 f32) + (local $9 f32) + (local $10 f32) + (local $11 f32) + (local $12 f32) + (local $13 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + i32.const 0 + local.set $2 + local.get $1 + i32.const 8388608 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 31 + i32.shr_u + end + if + local.get $1 + i32.const 1 + i32.shl + i32.const 0 + i32.eq + if + f32.const -1 + local.get $0 + local.get $0 + f32.mul + f32.div + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.div + return + end + local.get $2 + i32.const 25 + i32.sub + local.set $2 + local.get $0 + f32.const 33554432 + f32.mul + local.set $0 + local.get $0 + i32.reinterpret_f32 + local.set $1 + else + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + return + else + local.get $1 + i32.const 1065353216 + i32.eq + if + f32.const 0 + return + end + end + end + local.get $1 + i32.const 1065353216 + i32.const 1060439283 + i32.sub + i32.add + local.set $1 + local.get $2 + local.get $1 + i32.const 23 + i32.shr_u + i32.const 127 + i32.sub + i32.add + local.set $2 + local.get $1 + i32.const 8388607 + i32.and + i32.const 1060439283 + i32.add + local.set $1 + local.get $1 + f32.reinterpret_i32 + local.set $0 + local.get $0 + f32.const 1 + f32.sub + local.set $3 + local.get $3 + f32.const 2 + local.get $3 + f32.add + f32.div + local.set $4 + local.get $4 + local.get $4 + f32.mul + local.set $5 + local.get $5 + local.get $5 + f32.mul + local.set $6 + local.get $6 + f32.const 0.40000972151756287 + local.get $6 + f32.const 0.24279078841209412 + f32.mul + f32.add + f32.mul + local.set $7 + local.get $5 + f32.const 0.6666666269302368 + local.get $6 + f32.const 0.2849878668785095 + f32.mul + f32.add + f32.mul + local.set $8 + local.get $8 + local.get $7 + f32.add + local.set $9 + f32.const 0.5 + local.get $3 + f32.mul + local.get $3 + f32.mul + local.set $10 + local.get $3 + local.get $10 + f32.sub + local.set $11 + local.get $11 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const -4096 + i32.and + local.set $1 + local.get $1 + f32.reinterpret_i32 + local.set $11 + local.get $3 + local.get $11 + f32.sub + local.get $10 + f32.sub + local.get $4 + local.get $10 + local.get $9 + f32.add + f32.mul + f32.add + local.set $12 + local.get $2 + f32.convert_i32_s + local.set $13 + local.get $13 + f32.const 7.903415166765626e-07 + f32.mul + local.get $12 + local.get $11 + f32.add + f32.const -3.168997136526741e-05 + f32.mul + f32.add + local.get $12 + f32.const 0.434326171875 + f32.mul + f32.add + local.get $11 + f32.const 0.434326171875 + f32.mul + f32.add + local.get $13 + f32.const 0.3010292053222656 + f32.mul + f32.add + ) + (func $../../lib/libm/assembly/libmf/log10 (; 107 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.log10 + ) + (func $../../lib/libm/assembly/libmf/log1p (; 108 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.log1p + ) + (func $~lib/math/NativeMathf.log2 (; 109 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + (local $7 f32) + (local $8 f32) + (local $9 f32) + (local $10 f32) + (local $11 f32) + (local $12 i32) + (local $13 f32) + (local $14 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + i32.const 0 + local.set $2 + local.get $1 + i32.const 8388608 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 31 + i32.shr_u + end + if + local.get $1 + i32.const 1 + i32.shl + i32.const 0 + i32.eq + if + f32.const -1 + local.get $0 + local.get $0 + f32.mul + f32.div + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.div + return + end + local.get $2 + i32.const 25 + i32.sub + local.set $2 + local.get $0 + f32.const 33554432 + f32.mul + local.set $0 + local.get $0 + i32.reinterpret_f32 + local.set $1 + else + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + return + else + local.get $1 + i32.const 1065353216 + i32.eq + if + f32.const 0 + return + end + end + end + local.get $1 + i32.const 1065353216 + i32.const 1060439283 + i32.sub + i32.add + local.set $1 + local.get $2 + local.get $1 + i32.const 23 + i32.shr_u + i32.const 127 + i32.sub + i32.add + local.set $2 + local.get $1 + i32.const 8388607 + i32.and + i32.const 1060439283 + i32.add + local.set $1 + local.get $1 + f32.reinterpret_i32 + local.set $0 + local.get $0 + f32.const 1 + f32.sub + local.set $3 + local.get $3 + f32.const 2 + local.get $3 + f32.add + f32.div + local.set $4 + local.get $4 + local.get $4 + f32.mul + local.set $5 + local.get $5 + local.get $5 + f32.mul + local.set $6 + local.get $6 + f32.const 0.40000972151756287 + local.get $6 + f32.const 0.24279078841209412 + f32.mul + f32.add + f32.mul + local.set $7 + local.get $5 + f32.const 0.6666666269302368 + local.get $6 + f32.const 0.2849878668785095 + f32.mul + f32.add + f32.mul + local.set $8 + local.get $8 + local.get $7 + f32.add + local.set $9 + f32.const 0.5 + local.get $3 + f32.mul + local.get $3 + f32.mul + local.set $10 + local.get $3 + local.get $10 + f32.sub + local.set $11 + local.get $11 + i32.reinterpret_f32 + local.set $12 + local.get $12 + i32.const -4096 + i32.and + local.set $12 + local.get $12 + f32.reinterpret_i32 + local.set $11 + local.get $3 + local.get $11 + f32.sub + local.get $10 + f32.sub + local.get $4 + local.get $10 + local.get $9 + f32.add + f32.mul + f32.add + local.set $13 + local.get $2 + f32.convert_i32_s + local.set $14 + local.get $13 + local.get $11 + f32.add + f32.const -1.7605285393074155e-04 + f32.mul + local.get $13 + f32.const 1.44287109375 + f32.mul + f32.add + local.get $11 + f32.const 1.44287109375 + f32.mul + f32.add + local.get $14 + f32.add + ) + (func $../../lib/libm/assembly/libmf/log2 (; 110 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.log2 + ) + (func $../../lib/libm/assembly/libmf/max (; 111 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 f32) + (local $3 f32) + local.get $0 + local.set $3 + local.get $1 + local.set $2 + local.get $3 + local.get $2 + f32.max + ) + (func $../../lib/libm/assembly/libmf/min (; 112 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 f32) + (local $3 f32) + local.get $0 + local.set $3 + local.get $1 + local.set $2 + local.get $3 + local.get $2 + f32.min + ) + (func $~lib/math/NativeMathf.pow (; 113 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (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 f32) + (local $11 f32) + (local $12 f32) + (local $13 f32) + (local $14 f32) + (local $15 f32) + (local $16 f32) + (local $17 f32) + (local $18 f32) + (local $19 f32) + (local $20 f32) + (local $21 f32) + (local $22 f32) + (local $23 f32) + (local $24 i32) + (local $25 i32) + (local $26 f32) + (local $27 f32) + (local $28 f32) + (local $29 f32) + (local $30 f32) + (local $31 f32) + (local $32 f32) + (local $33 f32) + (local $34 f32) + (local $35 f32) + (local $36 i32) + local.get $0 + i32.reinterpret_f32 + local.set $2 + local.get $1 + i32.reinterpret_f32 + local.set $3 + local.get $2 + i32.const 2147483647 + i32.and + local.set $4 + local.get $3 + i32.const 2147483647 + i32.and + local.set $5 + local.get $5 + i32.const 0 + i32.eq + if + f32.const 1 + return + end + local.get $4 + i32.const 2139095040 + i32.gt_s + if (result i32) + i32.const 1 + else + local.get $5 + i32.const 2139095040 + i32.gt_s + end + if + local.get $0 + local.get $1 + f32.add + return + end + i32.const 0 + local.set $6 + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $5 + i32.const 1266679808 + i32.ge_s + if + i32.const 2 + local.set $6 + else + local.get $5 + i32.const 1065353216 + i32.ge_s + if + local.get $5 + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + local.set $8 + i32.const 23 + local.get $8 + i32.sub + local.set $9 + local.get $5 + local.get $9 + i32.shr_s + local.set $7 + local.get $7 + local.get $9 + i32.shl + local.get $5 + i32.eq + if + i32.const 2 + local.get $7 + i32.const 1 + i32.and + i32.sub + local.set $6 + end + end + end + end + local.get $5 + i32.const 2139095040 + i32.eq + if + local.get $4 + i32.const 1065353216 + i32.eq + if + f32.const nan:0x400000 + return + else + local.get $4 + i32.const 1065353216 + i32.gt_s + if + local.get $3 + i32.const 0 + i32.ge_s + if (result f32) + local.get $1 + else + f32.const 0 + end + return + else + local.get $3 + i32.const 0 + i32.ge_s + if (result f32) + f32.const 0 + else + local.get $1 + f32.neg + end + return + end + unreachable + end + unreachable + unreachable + end + local.get $5 + i32.const 1065353216 + i32.eq + if + local.get $3 + i32.const 0 + i32.ge_s + if (result f32) + local.get $0 + else + f32.const 1 + local.get $0 + f32.div + end + return + end + local.get $3 + i32.const 1073741824 + i32.eq + if + local.get $0 + local.get $0 + f32.mul + return + end + local.get $3 + i32.const 1056964608 + i32.eq + if + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $0 + f32.sqrt + return + end + end + local.get $0 + f32.abs + local.set $10 + local.get $4 + i32.const 2139095040 + i32.eq + if (result i32) + i32.const 1 + else + local.get $4 + i32.const 0 + i32.eq + end + if (result i32) + i32.const 1 + else + local.get $4 + i32.const 1065353216 + i32.eq + end + if + local.get $10 + local.set $11 + local.get $3 + i32.const 0 + i32.lt_s + if + f32.const 1 + local.get $11 + f32.div + local.set $11 + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $4 + i32.const 1065353216 + i32.sub + local.get $6 + i32.or + i32.const 0 + i32.eq + if + local.get $11 + local.get $11 + f32.sub + local.set $12 + local.get $12 + local.get $12 + f32.div + local.set $11 + else + local.get $6 + i32.const 1 + i32.eq + if + local.get $11 + f32.neg + local.set $11 + end + end + end + local.get $11 + return + end + f32.const 1 + local.set $13 + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $6 + i32.const 0 + i32.eq + if + local.get $0 + local.get $0 + f32.sub + local.set $12 + local.get $12 + local.get $12 + f32.div + return + end + local.get $6 + i32.const 1 + i32.eq + if + f32.const -1 + local.set $13 + end + end + local.get $5 + i32.const 1291845632 + i32.gt_s + if + local.get $4 + i32.const 1065353208 + i32.lt_s + if + local.get $3 + i32.const 0 + i32.lt_s + if (result f32) + local.get $13 + f32.const 1000000015047466219876688e6 + f32.mul + f32.const 1000000015047466219876688e6 + f32.mul + else + local.get $13 + f32.const 1.0000000031710769e-30 + f32.mul + f32.const 1.0000000031710769e-30 + f32.mul + end + return + end + local.get $4 + i32.const 1065353223 + i32.gt_s + if + local.get $3 + i32.const 0 + i32.gt_s + if (result f32) + local.get $13 + f32.const 1000000015047466219876688e6 + f32.mul + f32.const 1000000015047466219876688e6 + f32.mul + else + local.get $13 + f32.const 1.0000000031710769e-30 + f32.mul + f32.const 1.0000000031710769e-30 + f32.mul + end + return + end + local.get $10 + f32.const 1 + f32.sub + local.set $18 + local.get $18 + local.get $18 + f32.mul + f32.const 0.5 + local.get $18 + f32.const 0.3333333432674408 + local.get $18 + f32.const 0.25 + f32.mul + f32.sub + f32.mul + f32.sub + f32.mul + local.set $21 + f32.const 1.44268798828125 + local.get $18 + f32.mul + local.set $19 + local.get $18 + f32.const 7.052607543300837e-06 + f32.mul + local.get $21 + f32.const 1.4426950216293335 + f32.mul + f32.sub + local.set $20 + local.get $19 + local.get $20 + f32.add + local.set $14 + local.get $14 + i32.reinterpret_f32 + local.set $25 + local.get $25 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $14 + local.get $20 + local.get $14 + local.get $19 + f32.sub + f32.sub + local.set $15 + else + i32.const 0 + local.set $24 + local.get $4 + i32.const 8388608 + i32.lt_s + if + local.get $10 + f32.const 16777216 + f32.mul + local.set $10 + local.get $24 + i32.const 24 + i32.sub + local.set $24 + local.get $10 + i32.reinterpret_f32 + local.set $4 + end + local.get $24 + local.get $4 + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + i32.add + local.set $24 + local.get $4 + i32.const 8388607 + i32.and + local.set $7 + local.get $7 + i32.const 1065353216 + i32.or + local.set $4 + local.get $7 + i32.const 1885297 + i32.le_s + if + i32.const 0 + local.set $8 + else + local.get $7 + i32.const 6140887 + i32.lt_s + if + i32.const 1 + local.set $8 + else + i32.const 0 + local.set $8 + local.get $24 + i32.const 1 + i32.add + local.set $24 + local.get $4 + i32.const 8388608 + i32.sub + local.set $4 + end + end + local.get $4 + f32.reinterpret_i32 + local.set $10 + f32.const 1.5 + f32.const 1 + local.get $8 + select + local.set $30 + local.get $10 + local.get $30 + f32.sub + local.set $19 + f32.const 1 + local.get $10 + local.get $30 + f32.add + f32.div + local.set $20 + local.get $19 + local.get $20 + f32.mul + local.set $17 + local.get $17 + local.set $26 + local.get $26 + i32.reinterpret_f32 + local.set $25 + local.get $25 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $26 + local.get $4 + i32.const 1 + i32.shr_s + i32.const -4096 + i32.and + i32.const 536870912 + i32.or + local.set $25 + local.get $25 + i32.const 4194304 + i32.add + local.get $8 + i32.const 21 + i32.shl + i32.add + f32.reinterpret_i32 + local.set $28 + local.get $10 + local.get $28 + local.get $30 + f32.sub + f32.sub + local.set $29 + local.get $20 + local.get $19 + local.get $26 + local.get $28 + f32.mul + f32.sub + local.get $26 + local.get $29 + f32.mul + f32.sub + f32.mul + local.set $27 + local.get $17 + local.get $17 + f32.mul + local.set $12 + local.get $12 + local.get $12 + f32.mul + f32.const 0.6000000238418579 + local.get $12 + f32.const 0.4285714328289032 + local.get $12 + f32.const 0.3333333432674408 + local.get $12 + f32.const 0.2727281153202057 + local.get $12 + f32.const 0.23066075146198273 + local.get $12 + f32.const 0.20697501301765442 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + local.set $16 + local.get $16 + local.get $27 + local.get $26 + local.get $17 + f32.add + f32.mul + f32.add + local.set $16 + local.get $26 + local.get $26 + f32.mul + local.set $12 + f32.const 3 + local.get $12 + f32.add + local.get $16 + f32.add + local.set $28 + local.get $28 + i32.reinterpret_f32 + local.set $25 + local.get $25 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $28 + local.get $16 + local.get $28 + f32.const 3 + f32.sub + local.get $12 + f32.sub + f32.sub + local.set $29 + local.get $26 + local.get $28 + f32.mul + local.set $19 + local.get $27 + local.get $28 + f32.mul + local.get $29 + local.get $17 + f32.mul + f32.add + local.set $20 + local.get $19 + local.get $20 + f32.add + local.set $22 + local.get $22 + i32.reinterpret_f32 + local.set $25 + local.get $25 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $22 + local.get $20 + local.get $22 + local.get $19 + f32.sub + f32.sub + local.set $23 + f32.const 0.9619140625 + local.get $22 + f32.mul + local.set $31 + f32.const 1.5632208487659227e-06 + f32.const 0 + local.get $8 + select + local.set $32 + f32.const -1.1736857413779944e-04 + local.get $22 + f32.mul + local.get $23 + f32.const 0.9617967009544373 + f32.mul + f32.add + local.get $32 + f32.add + local.set $33 + local.get $24 + f32.convert_i32_s + local.set $18 + f32.const 0.5849609375 + f32.const 0 + local.get $8 + select + local.set $34 + local.get $31 + local.get $33 + f32.add + local.get $34 + f32.add + local.get $18 + f32.add + local.set $14 + local.get $14 + i32.reinterpret_f32 + local.set $25 + local.get $25 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $14 + local.get $33 + local.get $14 + local.get $18 + f32.sub + local.get $34 + f32.sub + local.get $31 + f32.sub + f32.sub + local.set $15 + end + local.get $1 + i32.reinterpret_f32 + local.set $25 + local.get $25 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.set $35 + local.get $1 + local.get $35 + f32.sub + local.get $14 + f32.mul + local.get $1 + local.get $15 + f32.mul + f32.add + local.set $23 + local.get $35 + local.get $14 + f32.mul + local.set $22 + local.get $23 + local.get $22 + f32.add + local.set $11 + local.get $11 + i32.reinterpret_f32 + local.set $7 + local.get $7 + i32.const 1124073472 + i32.gt_s + if + local.get $13 + f32.const 1000000015047466219876688e6 + f32.mul + f32.const 1000000015047466219876688e6 + f32.mul + return + else + local.get $7 + i32.const 1124073472 + i32.eq + if + local.get $23 + f32.const 4.299566569443414e-08 + f32.add + local.get $11 + local.get $22 + f32.sub + f32.gt + if + local.get $13 + f32.const 1000000015047466219876688e6 + f32.mul + f32.const 1000000015047466219876688e6 + f32.mul + return + end + else + local.get $7 + i32.const 2147483647 + i32.and + i32.const 1125515264 + i32.gt_s + if + local.get $13 + f32.const 1.0000000031710769e-30 + f32.mul + f32.const 1.0000000031710769e-30 + f32.mul + return + else + local.get $7 + i32.const -1021968384 + i32.eq + if + local.get $23 + local.get $11 + local.get $22 + f32.sub + f32.le + if + local.get $13 + f32.const 1.0000000031710769e-30 + f32.mul + f32.const 1.0000000031710769e-30 + f32.mul + return + end + end + end + end + end + local.get $7 + i32.const 2147483647 + i32.and + local.set $36 + local.get $36 + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + local.set $8 + i32.const 0 + local.set $24 + local.get $36 + i32.const 1056964608 + i32.gt_s + if + local.get $7 + i32.const 8388608 + local.get $8 + i32.const 1 + i32.add + i32.shr_s + i32.add + local.set $24 + local.get $24 + i32.const 2147483647 + i32.and + i32.const 23 + i32.shr_s + i32.const 127 + i32.sub + local.set $8 + local.get $24 + i32.const 8388607 + local.get $8 + i32.shr_s + i32.const -1 + i32.xor + i32.and + f32.reinterpret_i32 + local.set $18 + local.get $24 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i32.const 23 + local.get $8 + i32.sub + i32.shr_s + local.set $24 + local.get $7 + i32.const 0 + i32.lt_s + if + i32.const 0 + local.get $24 + i32.sub + local.set $24 + end + local.get $22 + local.get $18 + f32.sub + local.set $22 + end + local.get $23 + local.get $22 + f32.add + local.set $18 + local.get $18 + i32.reinterpret_f32 + local.set $25 + local.get $25 + i32.const -32768 + i32.and + f32.reinterpret_i32 + local.set $18 + local.get $18 + f32.const 0.693145751953125 + f32.mul + local.set $19 + local.get $23 + local.get $18 + local.get $22 + f32.sub + f32.sub + f32.const 0.6931471824645996 + f32.mul + local.get $18 + f32.const 1.4286065379565116e-06 + f32.mul + f32.add + local.set $20 + local.get $19 + local.get $20 + f32.add + local.set $11 + local.get $20 + local.get $11 + local.get $19 + f32.sub + f32.sub + local.set $21 + local.get $11 + local.get $11 + f32.mul + local.set $18 + local.get $11 + local.get $18 + f32.const 0.1666666716337204 + local.get $18 + f32.const -2.7777778450399637e-03 + local.get $18 + f32.const 6.61375597701408e-05 + local.get $18 + f32.const -1.6533901998627698e-06 + local.get $18 + f32.const 4.138136944220605e-08 + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.add + f32.mul + f32.sub + local.set $14 + local.get $11 + local.get $14 + f32.mul + local.get $14 + f32.const 2 + f32.sub + f32.div + local.get $21 + local.get $11 + local.get $21 + f32.mul + f32.add + f32.sub + local.set $16 + f32.const 1 + local.get $16 + local.get $11 + f32.sub + f32.sub + local.set $11 + local.get $11 + i32.reinterpret_f32 + local.set $7 + local.get $7 + local.get $24 + i32.const 23 + i32.shl + i32.add + local.set $7 + local.get $7 + i32.const 23 + i32.shr_s + i32.const 0 + i32.le_s + if + local.get $11 + local.get $24 + call $~lib/math/NativeMathf.scalbn + local.set $11 + else + local.get $7 + f32.reinterpret_i32 + local.set $11 + end + local.get $13 + local.get $11 + f32.mul + ) + (func $../../lib/libm/assembly/libmf/pow (; 114 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.pow + ) + (func $../../lib/libm/assembly/libmf/round (; 115 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + local.get $0 + local.set $1 + local.get $1 + f32.const 0.5 + f32.add + f32.floor + local.get $1 + f32.copysign + ) + (func $../../lib/libm/assembly/libmf/sign (; 116 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + block $~lib/math/NativeMathf.sign|inlined.0 (result f32) + local.get $0 + local.set $1 + local.get $1 + f32.const 0 + f32.gt + if (result f32) + f32.const 1 + else + local.get $1 + f32.const 0 + f32.lt + if (result f32) + f32.const -1 + else + local.get $1 + end + end + br $~lib/math/NativeMathf.sign|inlined.0 + end + ) + (func $~lib/math/NativeMathf.sin (; 117 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 i32) + (local $12 f32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i64) + (local $17 i64) + (local $18 i64) + (local $19 i64) + (local $20 i64) + (local $21 i64) + (local $22 i64) + (local $23 i32) + (local $24 i32) + (local $25 f64) + (local $26 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 31 + i32.shr_u + local.set $2 + local.get $1 + i32.const 2147483647 + i32.and + local.set $1 + local.get $1 + i32.const 1061752794 + i32.le_u + if + local.get $1 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + block $~lib/math/sin_kernf|inlined.5 (result f32) + local.get $0 + f64.promote_f32 + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $4 + local.get $4 + local.get $4 + f64.mul + local.set $5 + f64.const -1.9839334836096632e-04 + local.get $4 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + local.set $6 + local.get $4 + local.get $3 + f64.mul + local.set $7 + local.get $3 + local.get $7 + f64.const -0.16666666641626524 + local.get $4 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + local.get $6 + f64.mul + f64.add + f32.demote_f64 + end + return + end + local.get $1 + i32.const 1081824209 + i32.le_u + if + local.get $1 + i32.const 1075235811 + i32.le_u + if + local.get $2 + if (result f32) + block $~lib/math/cos_kernf|inlined.4 (result f32) + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.add + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $7 + local.get $7 + local.get $7 + f64.mul + local.set $6 + f64.const -0.001388676377460993 + local.get $7 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + local.set $5 + f32.const 1 + f64.promote_f32 + local.get $7 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $6 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $6 + local.get $7 + f64.mul + local.get $5 + f64.mul + f64.add + f32.demote_f64 + end + f32.neg + else + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.sub + local.set $4 + local.get $4 + local.get $4 + f64.mul + local.set $5 + local.get $5 + local.get $5 + f64.mul + local.set $6 + f64.const -0.001388676377460993 + local.get $5 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + local.set $7 + f32.const 1 + f64.promote_f32 + local.get $5 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $6 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $6 + local.get $5 + f64.mul + local.get $7 + f64.mul + f64.add + f32.demote_f64 + end + return + end + block $~lib/math/sin_kernf|inlined.6 (result f32) + local.get $2 + if (result f64) + local.get $0 + f64.promote_f32 + f64.const 3.141592653589793 + f64.add + else + local.get $0 + f64.promote_f32 + f64.const 3.141592653589793 + f64.sub + end + f64.neg + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $7 + local.get $7 + local.get $7 + f64.mul + local.set $6 + f64.const -1.9839334836096632e-04 + local.get $7 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + local.set $5 + local.get $7 + local.get $3 + f64.mul + local.set $4 + local.get $3 + local.get $4 + f64.const -0.16666666641626524 + local.get $7 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $4 + local.get $6 + f64.mul + local.get $5 + f64.mul + f64.add + f32.demote_f64 + end + return + end + local.get $1 + i32.const 1088565717 + i32.le_u + if + local.get $1 + i32.const 1085271519 + i32.le_u + if + local.get $2 + if (result f32) + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.add + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $4 + local.get $4 + local.get $4 + f64.mul + local.set $5 + f64.const -0.001388676377460993 + local.get $4 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + local.set $6 + f32.const 1 + f64.promote_f32 + local.get $4 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $5 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $5 + local.get $4 + f64.mul + local.get $6 + f64.mul + f64.add + f32.demote_f64 + else + block $~lib/math/cos_kernf|inlined.7 (result f32) + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.sub + local.set $7 + local.get $7 + local.get $7 + f64.mul + local.set $6 + local.get $6 + local.get $6 + f64.mul + local.set $5 + f64.const -0.001388676377460993 + local.get $6 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + local.set $4 + f32.const 1 + f64.promote_f32 + local.get $6 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $5 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $5 + local.get $6 + f64.mul + local.get $4 + f64.mul + f64.add + f32.demote_f64 + end + f32.neg + end + return + end + block $~lib/math/sin_kernf|inlined.7 (result f32) + local.get $2 + if (result f64) + local.get $0 + f64.promote_f32 + f64.const 6.283185307179586 + f64.add + else + local.get $0 + f64.promote_f32 + f64.const 6.283185307179586 + f64.sub + end + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $4 + local.get $4 + local.get $4 + f64.mul + local.set $5 + f64.const -1.9839334836096632e-04 + local.get $4 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + local.set $6 + local.get $4 + local.get $3 + f64.mul + local.set $7 + local.get $3 + local.get $7 + f64.const -0.16666666641626524 + local.get $4 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $7 + local.get $5 + f64.mul + local.get $6 + f64.mul + f64.add + f32.demote_f64 + end + return + end + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + return + end + block $~lib/math/rempio2f|inlined.1 (result i32) + local.get $0 + local.set $10 + local.get $1 + local.set $9 + local.get $2 + local.set $8 + local.get $9 + i32.const 1305022427 + i32.lt_u + if + local.get $10 + f64.promote_f32 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $7 + local.get $10 + f64.promote_f32 + local.get $7 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $7 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $7 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.1 + end + block $~lib/math/pio2_large_quot|inlined.1 (result i32) + local.get $10 + local.set $12 + local.get $9 + local.set $11 + local.get $11 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.set $13 + local.get $13 + i32.const 6 + i32.shr_s + local.set $14 + local.get $13 + i32.const 63 + i32.and + local.set $15 + i32.const 72 + local.get $14 + i32.const 0 + i32.add + call $~lib/array/Array#__unchecked_get + local.set $16 + i32.const 72 + local.get $14 + i32.const 1 + i32.add + call $~lib/array/Array#__unchecked_get + local.set $17 + local.get $15 + i32.const 32 + i32.gt_s + if + i32.const 72 + local.get $14 + i32.const 2 + i32.add + call $~lib/array/Array#__unchecked_get + local.set $19 + local.get $19 + i64.const 96 + local.get $15 + i64.extend_i32_s + i64.sub + i64.shr_u + local.set $18 + local.get $18 + local.get $17 + local.get $15 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + i64.or + local.set $18 + else + local.get $17 + i64.const 32 + local.get $15 + i64.extend_i32_s + i64.sub + i64.shr_u + local.set $18 + end + local.get $17 + i64.const 64 + local.get $15 + i64.extend_i32_s + i64.sub + i64.shr_u + local.get $16 + local.get $15 + i64.extend_i32_s + i64.shl + i64.or + local.set $19 + local.get $11 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.set $20 + local.get $20 + local.get $19 + i64.mul + local.get $20 + local.get $18 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $21 + local.get $21 + i64.const 2 + i64.shl + local.set $22 + local.get $21 + i64.const 62 + i64.shr_u + local.get $22 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.set $23 + f64.const 8.515303950216386e-20 + local.get $12 + f64.promote_f32 + f64.copysign + local.get $22 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + local.get $23 + end + local.set $23 + i32.const 0 + local.get $23 + i32.sub + local.get $23 + local.get $8 + select + end + local.set $24 + global.get $~lib/math/rempio2f_y + local.set $25 + local.get $24 + i32.const 1 + i32.and + if (result f32) + local.get $25 + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $7 + local.get $7 + local.get $7 + f64.mul + local.set $6 + f64.const -0.001388676377460993 + local.get $7 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + local.set $5 + f32.const 1 + f64.promote_f32 + local.get $7 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $6 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $6 + local.get $7 + f64.mul + local.get $5 + f64.mul + f64.add + f32.demote_f64 + else + local.get $25 + local.set $4 + local.get $4 + local.get $4 + f64.mul + local.set $5 + local.get $5 + local.get $5 + f64.mul + local.set $6 + f64.const -1.9839334836096632e-04 + local.get $5 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + local.set $7 + local.get $5 + local.get $4 + f64.mul + local.set $3 + local.get $4 + local.get $3 + f64.const -0.16666666641626524 + local.get $5 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + local.get $6 + f64.mul + local.get $7 + f64.mul + f64.add + f32.demote_f64 + end + local.set $26 + local.get $24 + i32.const 2 + i32.and + if (result f32) + local.get $26 + f32.neg + else + local.get $26 + end + ) + (func $../../lib/libm/assembly/libmf/sin (; 118 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.sin + ) + (func $~lib/math/NativeMathf.sinh (; 119 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + (local $4 f32) + (local $5 f32) + (local $6 f32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.set $1 + local.get $1 + f32.reinterpret_i32 + local.set $2 + f32.const 0.5 + local.get $0 + f32.copysign + local.set $4 + local.get $1 + i32.const 1118925335 + i32.lt_u + if + local.get $2 + call $~lib/math/NativeMathf.expm1 + local.set $3 + local.get $1 + i32.const 1065353216 + i32.lt_u + if + local.get $1 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + local.get $4 + f32.const 2 + local.get $3 + f32.mul + local.get $3 + local.get $3 + f32.mul + local.get $3 + f32.const 1 + f32.add + f32.div + f32.sub + f32.mul + return + end + local.get $4 + local.get $3 + local.get $3 + local.get $3 + f32.const 1 + f32.add + f32.div + f32.add + f32.mul + return + end + f32.const 2 + local.get $4 + f32.mul + block $~lib/math/expo2f|inlined.1 (result f32) + local.get $2 + local.set $5 + i32.const 127 + i32.const 235 + i32.const 1 + i32.shr_u + i32.add + i32.const 23 + i32.shl + f32.reinterpret_i32 + local.set $6 + local.get $5 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + local.get $6 + f32.mul + local.get $6 + f32.mul + end + f32.mul + local.set $3 + local.get $3 + ) + (func $../../lib/libm/assembly/libmf/sinh (; 120 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.sinh + ) + (func $../../lib/libm/assembly/libmf/sqrt (; 121 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + local.get $0 + local.set $1 + local.get $1 + f32.sqrt + ) + (func $~lib/math/NativeMathf.tan (; 122 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (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 $9 f64) + (local $10 f64) + (local $11 i32) + (local $12 f32) + (local $13 i32) + (local $14 f32) + (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 i64) + (local $24 i64) + (local $25 i32) + (local $26 i32) + (local $27 f64) + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 31 + i32.shr_u + local.set $2 + local.get $1 + i32.const 2147483647 + i32.and + local.set $1 + local.get $1 + i32.const 1061752794 + i32.le_u + if + local.get $1 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + block $~lib/math/tan_kernf|inlined.0 (result f32) + local.get $0 + f64.promote_f32 + local.set $4 + i32.const 0 + local.set $3 + local.get $4 + local.get $4 + f64.mul + local.set $5 + f64.const 0.002974357433599673 + local.get $5 + f64.const 0.009465647849436732 + f64.mul + f64.add + local.set $6 + f64.const 0.05338123784456704 + local.get $5 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.set $7 + local.get $5 + local.get $5 + f64.mul + local.set $8 + local.get $5 + local.get $4 + f64.mul + local.set $9 + f64.const 0.3333313950307914 + local.get $5 + f64.const 0.13339200271297674 + f64.mul + f64.add + local.set $10 + local.get $4 + local.get $9 + local.get $10 + f64.mul + f64.add + local.get $9 + local.get $8 + f64.mul + local.get $7 + local.get $8 + local.get $6 + f64.mul + f64.add + f64.mul + f64.add + local.set $6 + local.get $3 + if (result f64) + f32.const -1 + f64.promote_f32 + local.get $6 + f64.div + else + local.get $6 + end + f32.demote_f64 + end + return + end + local.get $1 + i32.const 1081824209 + i32.le_u + if + local.get $1 + i32.const 1075235811 + i32.le_u + if + block $~lib/math/tan_kernf|inlined.1 (result f32) + local.get $2 + if (result f64) + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.add + else + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.sub + end + local.set $4 + i32.const 1 + local.set $3 + local.get $4 + local.get $4 + f64.mul + local.set $10 + f64.const 0.002974357433599673 + local.get $10 + f64.const 0.009465647849436732 + f64.mul + f64.add + local.set $9 + f64.const 0.05338123784456704 + local.get $10 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.set $8 + local.get $10 + local.get $10 + f64.mul + local.set $7 + local.get $10 + local.get $4 + f64.mul + local.set $6 + f64.const 0.3333313950307914 + local.get $10 + f64.const 0.13339200271297674 + f64.mul + f64.add + local.set $5 + local.get $4 + local.get $6 + local.get $5 + f64.mul + f64.add + local.get $6 + local.get $7 + f64.mul + local.get $8 + local.get $7 + local.get $9 + f64.mul + f64.add + f64.mul + f64.add + local.set $9 + local.get $3 + if (result f64) + f32.const -1 + f64.promote_f32 + local.get $9 + f64.div + else + local.get $9 + end + f32.demote_f64 + end + return + else + block $~lib/math/tan_kernf|inlined.2 (result f32) + local.get $2 + if (result f64) + local.get $0 + f64.promote_f32 + f64.const 3.141592653589793 + f64.add + else + local.get $0 + f64.promote_f32 + f64.const 3.141592653589793 + f64.sub + end + local.set $4 + i32.const 0 + local.set $3 + local.get $4 + local.get $4 + f64.mul + local.set $5 + f64.const 0.002974357433599673 + local.get $5 + f64.const 0.009465647849436732 + f64.mul + f64.add + local.set $6 + f64.const 0.05338123784456704 + local.get $5 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.set $7 + local.get $5 + local.get $5 + f64.mul + local.set $8 + local.get $5 + local.get $4 + f64.mul + local.set $9 + f64.const 0.3333313950307914 + local.get $5 + f64.const 0.13339200271297674 + f64.mul + f64.add + local.set $10 + local.get $4 + local.get $9 + local.get $10 + f64.mul + f64.add + local.get $9 + local.get $8 + f64.mul + local.get $7 + local.get $8 + local.get $6 + f64.mul + f64.add + f64.mul + f64.add + local.set $6 + local.get $3 + if (result f64) + f32.const -1 + f64.promote_f32 + local.get $6 + f64.div + else + local.get $6 + end + f32.demote_f64 + end + return + end + unreachable + unreachable + end + local.get $1 + i32.const 1088565717 + i32.le_u + if + local.get $1 + i32.const 1085271519 + i32.le_u + if + block $~lib/math/tan_kernf|inlined.3 (result f32) + local.get $2 + if (result f64) + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.add + else + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.sub + end + local.set $4 + i32.const 1 + local.set $3 + local.get $4 + local.get $4 + f64.mul + local.set $10 + f64.const 0.002974357433599673 + local.get $10 + f64.const 0.009465647849436732 + f64.mul + f64.add + local.set $9 + f64.const 0.05338123784456704 + local.get $10 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.set $8 + local.get $10 + local.get $10 + f64.mul + local.set $7 + local.get $10 + local.get $4 + f64.mul + local.set $6 + f64.const 0.3333313950307914 + local.get $10 + f64.const 0.13339200271297674 + f64.mul + f64.add + local.set $5 + local.get $4 + local.get $6 + local.get $5 + f64.mul + f64.add + local.get $6 + local.get $7 + f64.mul + local.get $8 + local.get $7 + local.get $9 + f64.mul + f64.add + f64.mul + f64.add + local.set $9 + local.get $3 + if (result f64) + f32.const -1 + f64.promote_f32 + local.get $9 + f64.div + else + local.get $9 + end + f32.demote_f64 + end + return + else + block $~lib/math/tan_kernf|inlined.4 (result f32) + local.get $2 + if (result f64) + local.get $0 + f64.promote_f32 + f64.const 6.283185307179586 + f64.add + else + local.get $0 + f64.promote_f32 + f64.const 6.283185307179586 + f64.sub + end + local.set $4 + i32.const 0 + local.set $3 + local.get $4 + local.get $4 + f64.mul + local.set $5 + f64.const 0.002974357433599673 + local.get $5 + f64.const 0.009465647849436732 + f64.mul + f64.add + local.set $6 + f64.const 0.05338123784456704 + local.get $5 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.set $7 + local.get $5 + local.get $5 + f64.mul + local.set $8 + local.get $5 + local.get $4 + f64.mul + local.set $9 + f64.const 0.3333313950307914 + local.get $5 + f64.const 0.13339200271297674 + f64.mul + f64.add + local.set $10 + local.get $4 + local.get $9 + local.get $10 + f64.mul + f64.add + local.get $9 + local.get $8 + f64.mul + local.get $7 + local.get $8 + local.get $6 + f64.mul + f64.add + f64.mul + f64.add + local.set $6 + local.get $3 + if (result f64) + f32.const -1 + f64.promote_f32 + local.get $6 + f64.div + else + local.get $6 + end + f32.demote_f64 + end + return + end + unreachable + unreachable + end + local.get $1 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + return + end + block $~lib/math/rempio2f|inlined.2 (result i32) + local.get $0 + local.set $12 + local.get $1 + local.set $11 + local.get $2 + local.set $3 + local.get $11 + i32.const 1305022427 + i32.lt_u + if + local.get $12 + f64.promote_f32 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $10 + local.get $12 + f64.promote_f32 + local.get $10 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $10 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $10 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.2 + end + block $~lib/math/pio2_large_quot|inlined.2 (result i32) + local.get $12 + local.set $14 + local.get $11 + local.set $13 + local.get $13 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.set $15 + local.get $15 + i32.const 6 + i32.shr_s + local.set $16 + local.get $15 + i32.const 63 + i32.and + local.set $17 + i32.const 72 + local.get $16 + i32.const 0 + i32.add + call $~lib/array/Array#__unchecked_get + local.set $18 + i32.const 72 + local.get $16 + i32.const 1 + i32.add + call $~lib/array/Array#__unchecked_get + local.set $19 + local.get $17 + i32.const 32 + i32.gt_s + if + i32.const 72 + local.get $16 + i32.const 2 + i32.add + call $~lib/array/Array#__unchecked_get + local.set $21 + local.get $21 + i64.const 96 + local.get $17 + i64.extend_i32_s + i64.sub + i64.shr_u + local.set $20 + local.get $20 + local.get $19 + local.get $17 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + i64.or + local.set $20 + else + local.get $19 + i64.const 32 + local.get $17 + i64.extend_i32_s + i64.sub + i64.shr_u + local.set $20 + end + local.get $19 + i64.const 64 + local.get $17 + i64.extend_i32_s + i64.sub + i64.shr_u + local.get $18 + local.get $17 + i64.extend_i32_s + i64.shl + i64.or + local.set $21 + local.get $13 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.set $22 + local.get $22 + local.get $21 + i64.mul + local.get $22 + local.get $20 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $23 + local.get $23 + i64.const 2 + i64.shl + local.set $24 + local.get $23 + i64.const 62 + i64.shr_u + local.get $24 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.set $25 + f64.const 8.515303950216386e-20 + local.get $14 + f64.promote_f32 + f64.copysign + local.get $24 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + local.get $25 + end + local.set $25 + i32.const 0 + local.get $25 + i32.sub + local.get $25 + local.get $3 + select + end + local.set $26 + global.get $~lib/math/rempio2f_y + local.set $27 + block $~lib/math/tan_kernf|inlined.5 (result f32) + local.get $27 + local.set $4 + local.get $26 + i32.const 1 + i32.and + local.set $13 + local.get $4 + local.get $4 + f64.mul + local.set $10 + f64.const 0.002974357433599673 + local.get $10 + f64.const 0.009465647849436732 + f64.mul + f64.add + local.set $9 + f64.const 0.05338123784456704 + local.get $10 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.set $8 + local.get $10 + local.get $10 + f64.mul + local.set $7 + local.get $10 + local.get $4 + f64.mul + local.set $6 + f64.const 0.3333313950307914 + local.get $10 + f64.const 0.13339200271297674 + f64.mul + f64.add + local.set $5 + local.get $4 + local.get $6 + local.get $5 + f64.mul + f64.add + local.get $6 + local.get $7 + f64.mul + local.get $8 + local.get $7 + local.get $9 + f64.mul + f64.add + f64.mul + f64.add + local.set $9 + local.get $13 + if (result f64) + f32.const -1 + f64.promote_f32 + local.get $9 + f64.div + else + local.get $9 + end + f32.demote_f64 + end + ) + (func $../../lib/libm/assembly/libmf/tan (; 123 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.tan + ) + (func $~lib/math/NativeMathf.tanh (; 124 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) + (local $3 f32) + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 2147483647 + i32.and + local.set $1 + local.get $1 + f32.reinterpret_i32 + local.set $2 + local.get $1 + i32.const 1057791828 + i32.gt_u + if + local.get $1 + i32.const 1092616192 + i32.gt_u + if + f32.const 1 + f32.const 0 + local.get $2 + f32.div + f32.add + local.set $3 + else + f32.const 2 + local.get $2 + f32.mul + call $~lib/math/NativeMathf.expm1 + local.set $3 + f32.const 1 + f32.const 2 + local.get $3 + f32.const 2 + f32.add + f32.div + f32.sub + local.set $3 + end + else + local.get $1 + i32.const 1048757624 + i32.gt_u + if + f32.const 2 + local.get $2 + f32.mul + call $~lib/math/NativeMathf.expm1 + local.set $3 + local.get $3 + local.get $3 + f32.const 2 + f32.add + f32.div + local.set $3 + else + local.get $1 + i32.const 8388608 + i32.ge_u + if + f32.const -2 + local.get $2 + f32.mul + call $~lib/math/NativeMathf.expm1 + local.set $3 + local.get $3 + f32.neg + local.get $3 + f32.const 2 + f32.add + f32.div + local.set $3 + else + local.get $2 + local.set $3 + end + end + end + local.get $3 + local.get $0 + f32.copysign + ) + (func $../../lib/libm/assembly/libmf/tanh (; 125 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.tanh + ) + (func $../../lib/libm/assembly/libmf/trunc (; 126 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (local $1 f32) + local.get $0 + local.set $1 + local.get $1 + f32.trunc + ) + (func $null (; 127 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 6424aa1a..8905543d 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -8056,7 +8056,7 @@ if i32.const 0 i32.const 144 - i32.const 1021 + i32.const 1020 i32.const 4 call $~lib/builtins/abort unreachable @@ -8087,7 +8087,7 @@ if i32.const 184 i32.const 144 - i32.const 1030 + i32.const 1029 i32.const 24 call $~lib/builtins/abort unreachable @@ -8134,7 +8134,7 @@ if i32.const 184 i32.const 144 - i32.const 2312 + i32.const 2309 i32.const 24 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 3e60efd3..b866048e 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -10211,7 +10211,7 @@ if i32.const 0 i32.const 144 - i32.const 1021 + i32.const 1020 i32.const 4 call $~lib/builtins/abort unreachable @@ -10243,7 +10243,7 @@ if i32.const 184 i32.const 144 - i32.const 1030 + i32.const 1029 i32.const 24 call $~lib/builtins/abort unreachable @@ -10300,7 +10300,7 @@ if i32.const 184 i32.const 144 - i32.const 2312 + i32.const 2309 i32.const 24 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 7377b6e6..c262311a 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -185,6 +185,7 @@ (global $~lib/rt/pure/CUR (mut i32) (i32.const 0)) (global $~lib/rt/pure/END (mut i32) (i32.const 0)) (global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (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)) @@ -1689,18 +1690,52 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/string/String.fromCharCode (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 2 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - i32.store16 + (func $~lib/string/String.fromCharCode (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $1 + i32.const -1 + i32.xor + if + i32.const 4 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + i32.store16 + local.get $2 + local.get $1 + i32.store16 offset=2 + else + i32.const 2 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + i32.store16 + end + local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/compareImpl (; 28 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/string/String.fromCharCode|trampoline (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const -1 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/string/String.fromCharCode + ) + (func $~lib/util/string/compareImpl (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1752,7 +1787,7 @@ call $~lib/rt/pure/__release local.get $5 ) - (func $~lib/string/String.__eq (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 call $~lib/rt/pure/__retain @@ -1809,7 +1844,7 @@ call $~lib/rt/pure/__release i32.const 0 ) - (func $~lib/string/String.fromCodePoint (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1818,7 +1853,7 @@ if i32.const 0 i32.const 456 - i32.const 21 + i32.const 27 i32.const 4 call $~lib/builtins/abort unreachable @@ -1864,7 +1899,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#startsWith (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1876,7 +1911,7 @@ if i32.const 0 i32.const 456 - i32.const 171 + i32.const 172 i32.const 4 call $~lib/builtins/abort unreachable @@ -1914,7 +1949,7 @@ call $~lib/rt/pure/__release local.get $0 ) - (func $~lib/string/String#endsWith (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#endsWith (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 576 @@ -1925,7 +1960,7 @@ if i32.const 0 i32.const 456 - i32.const 78 + i32.const 84 i32.const 4 call $~lib/builtins/abort unreachable @@ -1962,42 +1997,13 @@ call $~lib/rt/pure/__release local.get $0 ) - (func $~lib/string/String#indexOf (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $1 call $~lib/rt/pure/__retain drop - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 456 - i32.const 140 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - block (result i32) - local.get $1 - i32.eqz - if - local.get $1 - i32.const 552 - i32.ne - if - i32.const 552 - call $~lib/rt/pure/__retain - drop - local.get $1 - call $~lib/rt/pure/__release - end - i32.const 552 - local.set $1 - end - local.get $1 - end + local.get $1 call $~lib/string/String#get:length local.tee $4 i32.eqz @@ -2017,10 +2023,6 @@ i32.const -1 return end - local.get $3 - local.get $4 - i32.sub - local.set $5 local.get $2 i32.const 0 local.get $2 @@ -2034,10 +2036,14 @@ i32.lt_s select local.set $2 + local.get $3 + local.get $4 + i32.sub + local.set $3 loop $repeat|0 block $break|0 local.get $2 - local.get $5 + local.get $3 i32.gt_s br_if $break|0 local.get $0 @@ -2064,7 +2070,7 @@ call $~lib/rt/pure/__release i32.const -1 ) - (func $~lib/memory/memory.repeat (; 34 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -2089,7 +2095,7 @@ end end ) - (func $~lib/string/String#padStart (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2191,7 +2197,7 @@ call $~lib/rt/pure/__release local.get $0 ) - (func $~lib/string/String#padEnd (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2294,52 +2300,28 @@ call $~lib/rt/pure/__release local.get $0 ) - (func $~lib/string/String#lastIndexOf (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 call $~lib/rt/pure/__retain drop - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 456 - i32.const 156 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.eqz - if - local.get $1 - i32.const 552 - i32.ne - if - i32.const 552 - call $~lib/rt/pure/__retain - drop - local.get $1 - call $~lib/rt/pure/__release - end - i32.const 552 - local.set $1 - end - local.get $0 - call $~lib/string/String#get:length - local.set $3 local.get $1 call $~lib/string/String#get:length local.tee $4 i32.eqz if + local.get $0 + call $~lib/string/String#get:length + local.set $0 local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $0 return end - local.get $3 + local.get $0 + call $~lib/string/String#get:length + local.tee $3 i32.eqz if local.get $1 @@ -2364,11 +2346,10 @@ select local.set $2 loop $repeat|0 - block $break|0 - local.get $2 - i32.const 0 - i32.lt_s - br_if $break|0 + local.get $2 + i32.const 0 + i32.ge_s + if local.get $0 local.get $2 local.get $1 @@ -2393,7 +2374,7 @@ call $~lib/rt/pure/__release i32.const -1 ) - (func $~lib/util/string/isWhiteSpaceOrLineTerminator (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/string/isWhiteSpaceOrLineTerminator (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block $case10|0 block $case9|0 local.get $0 @@ -2443,7 +2424,7 @@ end i32.const 0 ) - (func $~lib/util/string/parse (; 39 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/util/string/parse (; 40 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2691,7 +2672,7 @@ call $~lib/rt/pure/__release f64.const nan:0x8000000000000 ) - (func $~lib/string/parseInt (; 40 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseInt (; 41 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 f64) local.get $0 call $~lib/rt/pure/__retain @@ -2703,7 +2684,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/string/parseFloat (; 41 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 42 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2895,7 +2876,7 @@ call $~lib/rt/pure/__release f64.const nan:0x8000000000000 ) - (func $~lib/string/String#concat (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2958,7 +2939,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__concat (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 call $~lib/rt/pure/__retain @@ -2979,7 +2960,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__ne (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 call $~lib/rt/pure/__retain @@ -2998,7 +2979,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__gt (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3069,7 +3050,7 @@ call $~lib/rt/pure/__release i32.const 0 ) - (func $~lib/string/String.__lt (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3139,7 +3120,7 @@ call $~lib/rt/pure/__release i32.const 0 ) - (func $~lib/string/String.__gte (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 call $~lib/rt/pure/__retain @@ -3158,7 +3139,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__lte (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.__lte (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 120 call $~lib/rt/pure/__retain @@ -3177,7 +3158,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/string/String#repeat (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3248,7 +3229,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#slice (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 call $~lib/string/String#get:length @@ -3323,7 +3304,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/rt/__allocArray (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/rt/__allocArray (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3351,7 +3332,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/rt/tlsf/reallocateBlock (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3465,7 +3446,7 @@ call $~lib/rt/tlsf/insertBlock local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if @@ -3501,7 +3482,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -3712,7 +3693,7 @@ end end ) - (func $~lib/array/ensureSize (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 56 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3767,7 +3748,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 56 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#push (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3807,7 +3788,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/string/String#split (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#split (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4029,7 +4010,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/array/Array<~lib/string/String>#__get (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -4065,7 +4046,7 @@ i32.load call $~lib/rt/pure/__retain ) - (func $~lib/util/number/decimalCount32 (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -4113,7 +4094,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 60 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 61 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $continue|0 local.get $1 @@ -4139,7 +4120,7 @@ br_if $continue|0 end ) - (func $~lib/util/number/itoa32 (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4182,7 +4163,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/utoa32 (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -4206,7 +4187,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/decimalCount64 (; 63 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 64 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) i32.const 11 i32.const 12 local.get $0 @@ -4254,7 +4235,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 64 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 65 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $continue|0 local.get $1 @@ -4283,7 +4264,7 @@ br_if $continue|0 end ) - (func $~lib/util/number/utoa64 (; 65 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 66 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4327,7 +4308,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa64 (; 66 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 67 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4394,7 +4375,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/genDigits (; 67 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 68 ;) (type $FUNCSIG$iijijiji) (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 i32) (local $9 i64) @@ -4795,7 +4776,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -5046,7 +5027,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 69 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 70 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -5334,7 +5315,7 @@ local.get $10 i32.add ) - (func $~lib/string/String#substring (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 71 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5421,7 +5402,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/dtoa (; 71 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 72 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5477,7 +5458,7 @@ call $~lib/rt/tlsf/__free local.get $2 ) - (func $start:std/string (; 72 ;) (type $FUNCSIG$v) + (func $start:std/string (; 73 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5634,12 +5615,12 @@ i32.const -1 i32.const 0 global.get $std/string/str - local.tee $1 + local.tee $0 call $~lib/string/String#get:length i32.ge_u br_if $__inlined_func$~lib/string/String#charCodeAt drop - local.get $1 + local.get $0 i32.load16_u end i32.const 104 @@ -5689,8 +5670,10 @@ call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $~lib/argc i32.const 0 - call $~lib/string/String.fromCharCode + call $~lib/string/String.fromCharCode|trampoline local.tee $5 i32.const 384 call $~lib/string/String.__eq @@ -5703,8 +5686,10 @@ call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $~lib/argc i32.const 54 - call $~lib/string/String.fromCharCode + call $~lib/string/String.fromCharCode|trampoline local.tee $6 i32.const 432 call $~lib/string/String.__eq @@ -5717,8 +5702,10 @@ call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $~lib/argc i32.const 65590 - call $~lib/string/String.fromCharCode + call $~lib/string/String.fromCharCode|trampoline local.tee $7 i32.const 432 call $~lib/string/String.__eq @@ -5794,15 +5781,18 @@ unreachable end global.get $std/string/str + local.set $0 i32.const 608 call $~lib/rt/pure/__retain - local.tee $1 + drop + local.get $0 + i32.const 608 i32.const 0 call $~lib/string/String#indexOf i32.const -1 i32.ne local.set $0 - local.get $1 + i32.const 608 call $~lib/rt/pure/__release local.get $0 i32.eqz @@ -6548,9 +6538,9 @@ i32.const 408 i32.const 1432 call $~lib/string/String.__concat - local.tee $0 - call $~lib/rt/pure/__retain local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -6562,7 +6552,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 408 call $~lib/string/String.__ne i32.eqz @@ -6574,10 +6564,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release i32.const 120 i32.const 120 call $~lib/string/String.__eq @@ -6919,10 +6909,10 @@ end i32.const 65377 call $~lib/string/String.fromCodePoint - local.tee $1 + local.tee $0 i32.const 55296 call $~lib/string/String.fromCodePoint - local.tee $0 + local.tee $1 i32.const 56322 call $~lib/string/String.fromCodePoint local.tee $2 @@ -6940,10 +6930,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $3 @@ -7098,14 +7088,14 @@ unreachable end global.get $std/string/str - local.tee $1 + local.tee $0 i32.const 2032 i32.ne if i32.const 2032 call $~lib/rt/pure/__retain drop - local.get $1 + local.get $0 call $~lib/rt/pure/__release end i32.const 2032 @@ -7225,28 +7215,28 @@ i32.const 120 i32.const 0 call $~lib/string/String#split - local.set $1 + local.set $0 i32.const 0 call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.load offset=12 i32.const 1 i32.eq if - local.get $1 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $2 i32.const 120 call $~lib/string/String.__eq - local.set $0 + local.set $1 local.get $2 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.eqz if i32.const 0 @@ -7259,10 +7249,10 @@ i32.const 120 i32.const 120 call $~lib/string/String#split - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.load offset=12 if i32.const 0 @@ -7276,7 +7266,7 @@ i32.const 920 call $~lib/string/String#split local.set $2 - local.get $0 + local.get $1 call $~lib/rt/pure/__release local.get $2 i32.load offset=12 @@ -7286,17 +7276,17 @@ local.get $2 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 120 call $~lib/string/String.__eq - local.set $0 - local.get $1 + local.set $1 + local.get $0 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.eqz if i32.const 0 @@ -7309,28 +7299,28 @@ i32.const 2408 i32.const 2440 call $~lib/string/String#split - local.set $1 + local.set $0 local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.load offset=12 i32.const 1 i32.eq if - local.get $1 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $2 i32.const 2408 call $~lib/string/String.__eq - local.set $0 + local.set $1 local.get $2 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.eqz if i32.const 0 @@ -7343,59 +7333,59 @@ i32.const 2408 i32.const 920 call $~lib/string/String#split - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 - local.tee $1 + call $~lib/rt/pure/__release + local.get $1 + local.tee $0 i32.load offset=12 i32.const 3 i32.eq if - local.get $1 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $2 i32.const 408 call $~lib/string/String.__eq - local.set $0 + local.set $1 local.get $2 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 if - local.get $1 + local.get $0 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $2 i32.const 1432 call $~lib/string/String.__eq - local.set $0 + local.set $1 local.get $2 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 if - local.get $1 + local.get $0 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $2 i32.const 2464 call $~lib/string/String.__eq - local.set $0 + local.set $1 local.get $2 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.eqz if i32.const 0 @@ -7405,11 +7395,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release i32.const 0 call $~lib/util/number/itoa32 - local.tee $1 + local.tee $0 i32.const 1040 call $~lib/string/String.__eq i32.eqz @@ -7423,7 +7413,7 @@ end i32.const 1 call $~lib/util/number/itoa32 - local.tee $0 + local.tee $1 i32.const 1064 call $~lib/string/String.__eq i32.eqz @@ -8695,11 +8685,11 @@ call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release - local.get $13 + local.get $11 call $~lib/rt/pure/__release local.get $12 call $~lib/rt/pure/__release - local.get $11 + local.get $13 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release @@ -8759,10 +8749,10 @@ call $~lib/rt/pure/__release local.get $40 call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $41 @@ -8942,11 +8932,11 @@ local.get $128 call $~lib/rt/pure/__release ) - (func $std/string/getString (; 73 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 74 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str call $~lib/rt/pure/__retain ) - (func $std/string/main (; 74 ;) (type $FUNCSIG$v) + (func $std/string/main (; 75 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -8955,7 +8945,7 @@ global.set $~lib/started end ) - (func $~lib/rt/pure/markGray (; 75 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/markGray (; 76 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -8979,7 +8969,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 76 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 77 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -8992,7 +8982,7 @@ i32.const 4 call $~lib/rt/__visit_members ) - (func $~lib/rt/pure/scan (; 77 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/scan (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -9026,7 +9016,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 79 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -9059,7 +9049,7 @@ call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__visit (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 80 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.const 6652 i32.lt_u @@ -9169,7 +9159,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 80 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 81 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -9200,7 +9190,7 @@ end end ) - (func $~lib/rt/__visit_members (; 81 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$5 @@ -9229,7 +9219,7 @@ call $~lib/rt/pure/__visit end ) - (func $null (; 82 ;) (type $FUNCSIG$v) + (func $null (; 83 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 640e247a..47f6e9b0 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -193,6 +193,7 @@ (global $~lib/rt/pure/END (mut i32) (i32.const 0)) (global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/string/String.MAX_LENGTH i32 (i32.const 536870904)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) @@ -3367,19 +3368,53 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/string/String.fromCharCode (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 2 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $1 - local.get $0 - i32.store16 + (func $~lib/string/String.fromCharCode (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $1 + i32.const -1 + i32.xor + if + i32.const 4 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $2 + local.get $0 + i32.store16 + local.get $2 + local.get $1 + i32.store16 offset=2 + else + i32.const 2 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $2 + local.get $0 + i32.store16 + end + local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/compareImpl (; 30 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $~lib/string/String.fromCharCode|trampoline (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const -1 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/string/String.fromCharCode + ) + (func $~lib/util/string/compareImpl (; 31 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -3443,7 +3478,7 @@ call $~lib/rt/pure/__release local.get $8 ) - (func $~lib/string/String.__eq (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3516,7 +3551,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.fromCodePoint (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3528,7 +3563,7 @@ if i32.const 0 i32.const 456 - i32.const 21 + i32.const 27 i32.const 4 call $~lib/builtins/abort unreachable @@ -3579,13 +3614,12 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#startsWith (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#startsWith (; 34 ;) (type $FUNCSIG$iiii) (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.get $1 call $~lib/rt/pure/__retain drop @@ -3596,7 +3630,7 @@ if i32.const 0 i32.const 456 - i32.const 171 + i32.const 172 i32.const 4 call $~lib/builtins/abort unreachable @@ -3622,12 +3656,10 @@ end local.set $1 end - local.get $2 - local.set $5 local.get $0 call $~lib/string/String#get:length - local.set $6 - local.get $5 + local.set $5 + local.get $2 local.tee $3 i32.const 0 local.tee $4 @@ -3636,20 +3668,20 @@ i32.gt_s select local.tee $3 - local.get $6 + local.get $5 local.tee $4 local.get $3 local.get $4 i32.lt_s select - local.set $7 + local.set $6 local.get $1 call $~lib/string/String#get:length - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.add - local.get $6 + local.get $5 i32.gt_s if i32.const 0 @@ -3660,10 +3692,10 @@ return end local.get $0 - local.get $7 + local.get $6 local.get $1 i32.const 0 - local.get $8 + local.get $7 call $~lib/util/string/compareImpl i32.eqz local.set $3 @@ -3671,12 +3703,11 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/string/String#endsWith (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#endsWith (; 35 ;) (type $FUNCSIG$iiii) (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.get $1 call $~lib/rt/pure/__retain drop @@ -3687,7 +3718,7 @@ if i32.const 0 i32.const 456 - i32.const 78 + i32.const 84 i32.const 4 call $~lib/builtins/abort unreachable @@ -3719,15 +3750,15 @@ local.get $4 i32.lt_s select - local.set $5 + local.set $2 local.get $1 call $~lib/string/String#get:length - local.set $6 + local.set $5 + local.get $2 local.get $5 - local.get $6 i32.sub - local.set $7 - local.get $7 + local.set $6 + local.get $6 i32.const 0 i32.lt_s if @@ -3739,10 +3770,10 @@ return end local.get $0 - local.get $7 + local.get $6 local.get $1 i32.const 0 - local.get $6 + local.get $5 call $~lib/util/string/compareImpl i32.eqz local.set $3 @@ -3750,7 +3781,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/string/String#indexOf (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3759,125 +3790,106 @@ local.get $1 call $~lib/rt/pure/__retain drop - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 456 - i32.const 140 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - i32.eq - if - block (result i32) - i32.const 552 - local.tee $3 - local.get $1 - local.tee $4 - i32.ne - if - local.get $3 - call $~lib/rt/pure/__retain - drop - local.get $4 - call $~lib/rt/pure/__release - end - local.get $3 - end - local.set $1 - end local.get $1 call $~lib/string/String#get:length - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.eqz if i32.const 0 - local.set $3 + local.set $4 local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $4 return end local.get $0 call $~lib/string/String#get:length - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.eqz if i32.const -1 - local.set $3 + local.set $4 local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $4 return end local.get $2 - local.tee $3 - i32.const 0 local.tee $4 - local.get $3 + i32.const 0 + local.tee $6 local.get $4 + local.get $6 i32.gt_s select - local.tee $3 - local.get $6 local.tee $4 - local.get $3 + local.get $5 + local.tee $6 local.get $4 + local.get $6 i32.lt_s select local.set $7 - local.get $6 - local.get $5 - i32.sub - local.set $6 block $break|0 - local.get $7 - local.set $3 + local.get $5 + local.get $3 + i32.sub + local.set $5 loop $repeat|0 - local.get $3 - local.get $6 + local.get $7 + local.get $5 i32.le_s i32.eqz br_if $break|0 local.get $0 - local.get $3 + local.get $7 local.get $1 i32.const 0 - local.get $5 + local.get $3 call $~lib/util/string/compareImpl i32.eqz if - local.get $3 + local.get $7 local.set $4 local.get $1 call $~lib/rt/pure/__release local.get $4 return end - local.get $3 + local.get $7 i32.const 1 i32.add - local.set $3 + local.set $7 br $repeat|0 unreachable end unreachable end i32.const -1 + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/string/String#includes (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $1 + call $~lib/rt/pure/__retain + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/string/String#indexOf + i32.const -1 + i32.ne local.set $3 local.get $1 call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/memory/memory.repeat (; 36 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 38 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) i32.const 0 @@ -3907,7 +3919,7 @@ end end ) - (func $~lib/string/String#padStart (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4019,7 +4031,7 @@ call $~lib/rt/pure/__release local.get $10 ) - (func $~lib/string/String#padEnd (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4135,7 +4147,7 @@ call $~lib/rt/pure/__release local.get $10 ) - (func $~lib/string/String#lastIndexOf (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4144,123 +4156,89 @@ local.get $1 call $~lib/rt/pure/__retain drop - local.get $0 - i32.const 0 - i32.ne + local.get $1 + call $~lib/string/String#get:length + local.set $3 + local.get $3 i32.eqz if - i32.const 0 - i32.const 456 - i32.const 156 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - i32.eq - if - block (result i32) - i32.const 552 - local.tee $3 - local.get $1 - local.tee $4 - i32.ne - if - local.get $3 - call $~lib/rt/pure/__retain - drop - local.get $4 - call $~lib/rt/pure/__release - end - local.get $3 - end - local.set $1 + local.get $0 + call $~lib/string/String#get:length + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + return end local.get $0 call $~lib/string/String#get:length local.set $5 - local.get $1 - call $~lib/string/String#get:length - local.set $6 - local.get $6 - i32.eqz - if - local.get $5 - local.set $3 - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - return - end local.get $5 i32.eqz if i32.const -1 - local.set $3 + local.set $4 local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $4 return end local.get $2 - local.tee $3 - i32.const 0 local.tee $4 - local.get $3 + i32.const 0 + local.tee $6 local.get $4 + local.get $6 i32.gt_s select - local.tee $3 - local.get $5 - local.get $6 - i32.sub local.tee $4 + local.get $5 local.get $3 + i32.sub + local.tee $6 local.get $4 + local.get $6 i32.lt_s select local.set $7 block $break|0 - local.get $7 - local.set $3 loop $repeat|0 - local.get $3 + local.get $7 i32.const 0 i32.ge_s i32.eqz br_if $break|0 local.get $0 - local.get $3 + local.get $7 local.get $1 i32.const 0 - local.get $6 + local.get $3 call $~lib/util/string/compareImpl i32.eqz if - local.get $3 + local.get $7 local.set $4 local.get $1 call $~lib/rt/pure/__release local.get $4 return end - local.get $3 + local.get $7 i32.const 1 i32.sub - local.set $3 + local.set $7 br $repeat|0 unreachable end unreachable end i32.const -1 - local.set $3 + local.set $4 local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $4 ) - (func $~lib/util/string/isWhiteSpaceOrLineTerminator (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/string/isWhiteSpaceOrLineTerminator (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block $break|0 block $case10|0 @@ -4337,7 +4315,7 @@ unreachable unreachable ) - (func $~lib/util/string/parse (; 41 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/util/string/parse (; 43 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 f64) (local $4 i32) @@ -4674,7 +4652,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/string/parseInt (; 42 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/string/parseInt (; 44 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) (local $2 f64) local.get $0 call $~lib/rt/pure/__retain @@ -4687,7 +4665,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/parseFloat (; 43 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 45 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4917,7 +4895,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String#concat (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4995,7 +4973,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__concat (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 call $~lib/rt/pure/__retain @@ -5018,7 +4996,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__ne (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 call $~lib/rt/pure/__retain @@ -5037,7 +5015,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__gt (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5127,7 +5105,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__lt (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5217,7 +5195,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__gte (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 call $~lib/rt/pure/__retain @@ -5236,7 +5214,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__lte (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lte (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 call $~lib/rt/pure/__retain @@ -5255,7 +5233,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String#repeat (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5335,13 +5313,11 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#slice (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 54 ;) (type $FUNCSIG$iiii) (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.get $0 call $~lib/string/String#get:length local.set $3 @@ -5369,7 +5345,7 @@ i32.lt_s select end - local.set $6 + local.set $1 local.get $2 i32.const 0 i32.lt_s @@ -5394,9 +5370,9 @@ i32.lt_s select end - local.set $7 - local.get $7 - local.get $6 + local.set $2 + local.get $2 + local.get $1 i32.sub local.set $3 local.get $3 @@ -5412,10 +5388,10 @@ i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $0 + local.set $6 local.get $6 + local.get $0 + local.get $1 i32.const 1 i32.shl i32.add @@ -5423,10 +5399,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $8 + local.get $6 call $~lib/rt/pure/__retain ) - (func $~lib/rt/__allocArray (; 53 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -5464,7 +5440,7 @@ end local.get $4 ) - (func $~lib/rt/tlsf/reallocateBlock (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5597,7 +5573,7 @@ call $~lib/rt/tlsf/insertBlock local.get $8 ) - (func $~lib/rt/tlsf/__realloc (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if @@ -5637,7 +5613,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 58 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5900,7 +5876,7 @@ end end ) - (func $~lib/array/ensureSize (; 57 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 59 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5963,7 +5939,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#push (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6012,7 +5988,7 @@ call $~lib/rt/pure/__release local.get $5 ) - (func $~lib/string/String#split (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6333,11 +6309,11 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/array/Array<~lib/string/String>#get:length (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#get:length (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -6347,7 +6323,7 @@ i32.load call $~lib/rt/pure/__retain ) - (func $~lib/array/Array<~lib/string/String>#__get (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -6378,7 +6354,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $~lib/util/number/decimalCount32 (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 65 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -6447,7 +6423,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 64 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6588,7 +6564,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 65 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 67 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6645,7 +6621,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/utoa32 (; 66 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6682,7 +6658,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/decimalCount64 (; 67 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 69 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -6751,7 +6727,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 68 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 70 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -6877,7 +6853,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 69 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 71 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6946,7 +6922,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa64 (; 70 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 72 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7037,19 +7013,19 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/builtins/isFinite (; 71 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 73 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 72 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 74 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/array/Array#__unchecked_get (; 73 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 75 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -7058,7 +7034,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__unchecked_get (; 74 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -7067,7 +7043,7 @@ i32.add i32.load16_s ) - (func $~lib/util/number/genDigits (; 75 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 77 ;) (type $FUNCSIG$iijijiji) (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) @@ -7623,7 +7599,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7953,7 +7929,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 77 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 79 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8391,7 +8367,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8510,7 +8486,7 @@ local.get $10 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/dtoa (; 79 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 81 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8569,7 +8545,7 @@ call $~lib/rt/tlsf/__free local.get $3 ) - (func $start:std/string (; 80 ;) (type $FUNCSIG$v) + (func $start:std/string (; 82 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8780,9 +8756,14 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - call $~lib/string/String.fromCharCode - local.tee $0 + block (result i32) + i32.const 1 + global.set $~lib/argc + i32.const 0 + i32.const 0 + call $~lib/string/String.fromCharCode|trampoline + local.tee $0 + end i32.const 384 call $~lib/string/String.__eq i32.eqz @@ -8794,9 +8775,14 @@ call $~lib/builtins/abort unreachable end - i32.const 54 - call $~lib/string/String.fromCharCode - local.tee $1 + block (result i32) + i32.const 1 + global.set $~lib/argc + i32.const 54 + i32.const 0 + call $~lib/string/String.fromCharCode|trampoline + local.tee $1 + end i32.const 432 call $~lib/string/String.__eq i32.eqz @@ -8808,11 +8794,16 @@ call $~lib/builtins/abort unreachable end - i32.const 65536 - i32.const 54 - i32.add - call $~lib/string/String.fromCharCode - local.tee $2 + block (result i32) + i32.const 1 + global.set $~lib/argc + i32.const 65536 + i32.const 54 + i32.add + i32.const 0 + call $~lib/string/String.fromCharCode|trampoline + local.tee $2 + end i32.const 432 call $~lib/string/String.__eq i32.eqz @@ -8890,27 +8881,10 @@ call $~lib/builtins/abort unreachable end - block $~lib/string/String#includes|inlined.0 (result i32) - global.get $std/string/str - local.set $7 - i32.const 608 - call $~lib/rt/pure/__retain - local.set $6 - i32.const 0 - local.set $8 - local.get $7 - local.get $6 - local.get $8 - call $~lib/string/String#indexOf - i32.const -1 - i32.ne - local.set $9 - local.get $6 - call $~lib/rt/pure/__release - local.get $9 - end + global.get $std/string/str + i32.const 608 i32.const 0 - i32.ne + call $~lib/string/String#includes i32.eqz if i32.const 0 @@ -8924,7 +8898,7 @@ i32.const 0 i32.const 632 call $~lib/string/String#padStart - local.tee $8 + local.tee $6 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -8956,7 +8930,7 @@ i32.const 3 i32.const 632 call $~lib/string/String#padStart - local.tee $6 + local.tee $8 i32.const 656 call $~lib/string/String.__eq i32.eqz @@ -12176,11 +12150,11 @@ local.get $128 call $~lib/rt/pure/__release ) - (func $std/string/getString (; 81 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 83 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str call $~lib/rt/pure/__retain ) - (func $std/string/main (; 82 ;) (type $FUNCSIG$v) + (func $std/string/main (; 84 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -12189,10 +12163,10 @@ global.set $~lib/started end ) - (func $start (; 83 ;) (type $FUNCSIG$v) + (func $start (; 85 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $~lib/rt/pure/markGray (; 84 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/markGray (; 86 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -12219,7 +12193,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 85 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 87 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -12236,7 +12210,7 @@ i32.const 4 call $~lib/rt/__visit_members ) - (func $~lib/rt/pure/scan (; 86 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/scan (; 88 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -12273,7 +12247,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 87 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 89 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -12311,7 +12285,7 @@ call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__visit (; 88 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 90 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -12465,7 +12439,7 @@ end end ) - (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 89 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12501,19 +12475,19 @@ end end ) - (func $~lib/array/Array#__visit_impl (; 90 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit_impl (; 92 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/array/Array#__visit_impl (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit_impl (; 93 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/array/Array#__visit_impl (; 92 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit_impl (; 94 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/array/Array#__visit_impl (; 93 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit_impl (; 95 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/rt/__visit_members (; 94 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $block$4$break block @@ -12663,6 +12637,6 @@ end unreachable ) - (func $null (; 95 ;) (type $FUNCSIG$v) + (func $null (; 97 ;) (type $FUNCSIG$v) ) )