import { setTempRet0 } from 'env'; function asmFunc(global, env, buffer) { "almost asm"; var HEAP8 = new global.Int8Array(buffer); var HEAP16 = new global.Int16Array(buffer); var HEAP32 = new global.Int32Array(buffer); var HEAPU8 = new global.Uint8Array(buffer); var HEAPU16 = new global.Uint16Array(buffer); var HEAPU32 = new global.Uint32Array(buffer); var HEAPF32 = new global.Float32Array(buffer); var HEAPF64 = new global.Float64Array(buffer); var Math_imul = global.Math.imul; var Math_fround = global.Math.fround; var Math_abs = global.Math.abs; var Math_clz32 = global.Math.clz32; var Math_min = global.Math.min; var Math_max = global.Math.max; var Math_floor = global.Math.floor; var Math_ceil = global.Math.ceil; var Math_sqrt = global.Math.sqrt; var abort = env.abort; var nan = global.NaN; var infinity = global.Infinity; var setTempRet0 = env.setTempRet0; var i64toi32_i32$HIGH_BITS = 0; function $0($0_1, $1) { $0_1 = $0_1 | 0; $1 = $1 | 0; var $2_1 = 0, $3_1 = 0, $4_1 = 0; $4_1 = 0; $3_1 = 0; if (($0_1 | 0) == ($3_1 | 0) & ($1 | 0) == ($4_1 | 0) | 0) { { $2_1 = 1; $3_1 = 0; } } else { { $3_1 = $0_1; $4_1 = 1; $2_1 = ($3_1 >>> 0 < $4_1 >>> 0) + 0 | 0; $2_1 = $1 - $2_1 | 0; $2_1 = $0($3_1 - $4_1 | 0 | 0, $2_1 | 0) | 0; $3_1 = i64toi32_i32$HIGH_BITS; $4_1 = $2_1; $2_1 = $3_1; $2_1 = __wasm_i64_mul($0_1 | 0, $1 | 0, $4_1 | 0, $2_1 | 0) | 0; $3_1 = i64toi32_i32$HIGH_BITS; } } i64toi32_i32$HIGH_BITS = $3_1; return $2_1 | 0; } function fac_rec_named($0_1, $1) { $0_1 = $0_1 | 0; $1 = $1 | 0; var $2_1 = 0, $3_1 = 0, $4_1 = 0; $4_1 = 0; $3_1 = 0; if (($0_1 | 0) == ($3_1 | 0) & ($1 | 0) == ($4_1 | 0) | 0) { { $2_1 = 1; $3_1 = 0; } } else { { $3_1 = $0_1; $4_1 = 1; $2_1 = ($3_1 >>> 0 < $4_1 >>> 0) + 0 | 0; $2_1 = $1 - $2_1 | 0; $2_1 = fac_rec_named($3_1 - $4_1 | 0 | 0, $2_1 | 0) | 0; $3_1 = i64toi32_i32$HIGH_BITS; $4_1 = $2_1; $2_1 = $3_1; $2_1 = __wasm_i64_mul($0_1 | 0, $1 | 0, $4_1 | 0, $2_1 | 0) | 0; $3_1 = i64toi32_i32$HIGH_BITS; } } i64toi32_i32$HIGH_BITS = $3_1; return $2_1 | 0; } function $2($0_1, $1) { $0_1 = $0_1 | 0; $1 = $1 | 0; var $2_1 = 0, $3_1 = 0, $4_1 = 0, $5 = 0, $6 = 0, $7 = 0; $4_1 = $0_1; $0_1 = $1; $1 = 0; $7 = 1; $5 = $1; block : { loop_in : while (1) { $1 = $0_1; $2_1 = $4_1; $6 = 0; $3_1 = 0; if (($2_1 | 0) == ($3_1 | 0) & ($1 | 0) == ($6 | 0) | 0) { break block } else { { $2_1 = $0_1; $1 = $5; $1 = __wasm_i64_mul($4_1 | 0, $2_1 | 0, $7 | 0, $1 | 0) | 0; $2_1 = i64toi32_i32$HIGH_BITS; $7 = $1; $5 = $2_1; $2_1 = $0_1; $3_1 = $4_1; $1 = 0; $6 = 1; $0_1 = ($3_1 >>> 0 < $6 >>> 0) + $1 | 0; $0_1 = $2_1 - $0_1 | 0; $4_1 = $3_1 - $6 | 0; } } continue loop_in; }; } $0_1 = $5; $3_1 = $7; i64toi32_i32$HIGH_BITS = $0_1; return $3_1 | 0; } function $3($0_1, $1) { $0_1 = $0_1 | 0; $1 = $1 | 0; var $2_1 = 0, $3_1 = 0, $4_1 = 0, $5 = 0, $6 = 0, $7 = 0; $4_1 = $0_1; $0_1 = $1; $1 = 0; $7 = 1; $5 = $1; done : { loop : while (1) { $1 = $0_1; $2_1 = $4_1; $6 = 0; $3_1 = 0; if (($2_1 | 0) == ($3_1 | 0) & ($1 | 0) == ($6 | 0) | 0) { break done } else { { $2_1 = $0_1; $1 = $5; $1 = __wasm_i64_mul($4_1 | 0, $2_1 | 0, $7 | 0, $1 | 0) | 0; $2_1 = i64toi32_i32$HIGH_BITS; $7 = $1; $5 = $2_1; $2_1 = $0_1; $3_1 = $4_1; $1 = 0; $6 = 1; $0_1 = ($3_1 >>> 0 < $6 >>> 0) + $1 | 0; $0_1 = $2_1 - $0_1 | 0; $4_1 = $3_1 - $6 | 0; } } continue loop; }; } $0_1 = $5; $3_1 = $7; i64toi32_i32$HIGH_BITS = $0_1; return $3_1 | 0; } function $4($0_1, $1) { $0_1 = $0_1 | 0; $1 = $1 | 0; var $2_1 = 0, $3_1 = 0, $4_1 = 0, $5 = 0, $6 = 0, $7 = 0; $3_1 = 0; $7 = 1; $5 = $3_1; $3_1 = $1; $2_1 = $0_1; $4_1 = 0; $6 = 2; if (($3_1 | 0) < ($4_1 | 0)) { $2_1 = 1 } else { if (($3_1 | 0) <= ($4_1 | 0)) { if ($2_1 >>> 0 >= $6 >>> 0) { $2_1 = 0 } else { $2_1 = 1 } } else { $2_1 = 0 } } block : { if ($2_1) { break block } loop_in : while (1) { $2_1 = $5; $3_1 = $1; $3_1 = __wasm_i64_mul($7 | 0, $2_1 | 0, $0_1 | 0, $3_1 | 0) | 0; $2_1 = i64toi32_i32$HIGH_BITS; $7 = $3_1; $5 = $2_1; $2_1 = $1; $3_1 = -1; $4_1 = -1; $0_1 = $0_1 + $4_1 | 0; $3_1 = $2_1 + $3_1 | 0; if ($0_1 >>> 0 < $4_1 >>> 0) { $3_1 = $3_1 + 1 | 0 } $1 = $3_1; $2_1 = $0_1; $6 = 0; $4_1 = 1; if (($3_1 | 0) > ($6 | 0)) { $2_1 = 1 } else { if (($3_1 | 0) >= ($6 | 0)) { if ($2_1 >>> 0 <= $4_1 >>> 0) { $2_1 = 0 } else { $2_1 = 1 } } else { $2_1 = 0 } } if ($2_1) { continue loop_in } break loop_in; }; } $2_1 = $5; $3_1 = $7; i64toi32_i32$HIGH_BITS = $2_1; return $3_1 | 0; } function legalstub$0($0_1, $1) { $0_1 = $0_1 | 0; $1 = $1 | 0; var $2_1 = 0, $3_1 = 0, $4_1 = 0, $5 = 0, $6 = 0; $3_1 = 0; $5 = $0_1; $6 = $3_1; $3_1 = 0; $4_1 = 32; $2_1 = $4_1 & 31 | 0; if (32 >>> 0 <= ($4_1 & 63 | 0) >>> 0) { { $0_1 = $1 << $2_1 | 0; $4_1 = 0; } } else { { $0_1 = ((1 << $2_1 | 0) - 1 | 0) & ($1 >>> (32 - $2_1 | 0) | 0) | 0 | ($3_1 << $2_1 | 0) | 0; $4_1 = $1 << $2_1 | 0; } } $1 = $0_1; $0_1 = $6; $3_1 = $5; $1 = $0_1 | $1 | 0; $1 = $0($3_1 | $4_1 | 0 | 0, $1 | 0) | 0; $3_1 = i64toi32_i32$HIGH_BITS; $6 = $1; $5 = $3_1; $0_1 = $1; $4_1 = 32; $2_1 = $4_1 & 31 | 0; if (32 >>> 0 <= ($4_1 & 63 | 0) >>> 0) { $0_1 = $3_1 >>> $2_1 | 0 } else { $0_1 = (((1 << $2_1 | 0) - 1 | 0) & $3_1 | 0) << (32 - $2_1 | 0) | 0 | ($0_1 >>> $2_1 | 0) | 0 } setTempRet0($0_1 | 0); return $6 | 0; } function legalstub$fac_rec_named($0_1, $1) { $0_1 = $0_1 | 0; $1 = $1 | 0; var $2_1 = 0, $3_1 = 0, $4_1 = 0, $5 = 0, $6 = 0; $3_1 = 0; $5 = $0_1; $6 = $3_1; $3_1 = 0; $4_1 = 32; $2_1 = $4_1 & 31 | 0; if (32 >>> 0 <= ($4_1 & 63 | 0) >>> 0) { { $0_1 = $1 << $2_1 | 0; $4_1 = 0; } } else { { $0_1 = ((1 << $2_1 | 0) - 1 | 0) & ($1 >>> (32 - $2_1 | 0) | 0) | 0 | ($3_1 << $2_1 | 0) | 0; $4_1 = $1 << $2_1 | 0; } } $1 = $0_1; $0_1 = $6; $3_1 = $5; $1 = $0_1 | $1 | 0; $1 = fac_rec_named($3_1 | $4_1 | 0 | 0, $1 | 0) | 0; $3_1 = i64toi32_i32$HIGH_BITS; $6 = $1; $5 = $3_1; $0_1 = $1; $4_1 = 32; $2_1 = $4_1 & 31 | 0; if (32 >>> 0 <= ($4_1 & 63 | 0) >>> 0) { $0_1 = $3_1 >>> $2_1 | 0 } else { $0_1 = (((1 << $2_1 | 0) - 1 | 0) & $3_1 | 0) << (32 - $2_1 | 0) | 0 | ($0_1 >>> $2_1 | 0) | 0 } setTempRet0($0_1 | 0); return $6 | 0; } function legalstub$2($0_1, $1) { $0_1 = $0_1 | 0; $1 = $1 | 0; var $2_1 = 0, $3_1 = 0, $4_1 = 0, $5 = 0, $6 = 0; $3_1 = 0; $5 = $0_1; $6 = $3_1; $3_1 = 0; $4_1 = 32; $2_1 = $4_1 & 31 | 0; if (32 >>> 0 <= ($4_1 & 63 | 0) >>> 0) { { $0_1 = $1 << $2_1 | 0; $4_1 = 0; } } else { { $0_1 = ((1 << $2_1 | 0) - 1 | 0) & ($1 >>> (32 - $2_1 | 0) | 0) | 0 | ($3_1 << $2_1 | 0) | 0; $4_1 = $1 << $2_1 | 0; } } $1 = $0_1; $0_1 = $6; $3_1 = $5; $1 = $0_1 | $1 | 0; $1 = $2($3_1 | $4_1 | 0 | 0, $1 | 0) | 0; $3_1 = i64toi32_i32$HIGH_BITS; $6 = $1; $5 = $3_1; $0_1 = $1; $4_1 = 32; $2_1 = $4_1 & 31 | 0; if (32 >>> 0 <= ($4_1 & 63 | 0) >>> 0) { $0_1 = $3_1 >>> $2_1 | 0 } else { $0_1 = (((1 << $2_1 | 0) - 1 | 0) & $3_1 | 0) << (32 - $2_1 | 0) | 0 | ($0_1 >>> $2_1 | 0) | 0 } setTempRet0($0_1 | 0); return $6 | 0; } function legalstub$3($0_1, $1) { $0_1 = $0_1 | 0; $1 = $1 | 0; var $2_1 = 0, $3_1 = 0, $4_1 = 0, $5 = 0, $6 = 0; $3_1 = 0; $5 = $0_1; $6 = $3_1; $3_1 = 0; $4_1 = 32; $2_1 = $4_1 & 31 | 0; if (32 >>> 0 <= ($4_1 & 63 | 0) >>> 0) { { $0_1 = $1 << $2_1 | 0; $4_1 = 0; } } else { { $0_1 = ((1 << $2_1 | 0) - 1 | 0) & ($1 >>> (32 - $2_1 | 0) | 0) | 0 | ($3_1 << $2_1 | 0) | 0; $4_1 = $1 << $2_1 | 0; } } $1 = $0_1; $0_1 = $6; $3_1 = $5; $1 = $0_1 | $1 | 0; $1 = $3($3_1 | $4_1 | 0 | 0, $1 | 0) | 0; $3_1 = i64toi32_i32$HIGH_BITS; $6 = $1; $5 = $3_1; $0_1 = $1; $4_1 = 32; $2_1 = $4_1 & 31 | 0; if (32 >>> 0 <= ($4_1 & 63 | 0) >>> 0) { $0_1 = $3_1 >>> $2_1 | 0 } else { $0_1 = (((1 << $2_1 | 0) - 1 | 0) & $3_1 | 0) << (32 - $2_1 | 0) | 0 | ($0_1 >>> $2_1 | 0) | 0 } setTempRet0($0_1 | 0); return $6 | 0; } function legalstub$4($0_1, $1) { $0_1 = $0_1 | 0; $1 = $1 | 0; var $2_1 = 0, $3_1 = 0, $4_1 = 0, $5 = 0, $6 = 0; $3_1 = 0; $5 = $0_1; $6 = $3_1; $3_1 = 0; $4_1 = 32; $2_1 = $4_1 & 31 | 0; if (32 >>> 0 <= ($4_1 & 63 | 0) >>> 0) { { $0_1 = $1 << $2_1 | 0; $4_1 = 0; } } else { { $0_1 = ((1 << $2_1 | 0) - 1 | 0) & ($1 >>> (32 - $2_1 | 0) | 0) | 0 | ($3_1 << $2_1 | 0) | 0; $4_1 = $1 << $2_1 | 0; } } $1 = $0_1; $0_1 = $6; $3_1 = $5; $1 = $0_1 | $1 | 0; $1 = $4($3_1 | $4_1 | 0 | 0, $1 | 0) | 0; $3_1 = i64toi32_i32$HIGH_BITS; $6 = $1; $5 = $3_1; $0_1 = $1; $4_1 = 32; $2_1 = $4_1 & 31 | 0; if (32 >>> 0 <= ($4_1 & 63 | 0) >>> 0) { $0_1 = $3_1 >>> $2_1 | 0 } else { $0_1 = (((1 << $2_1 | 0) - 1 | 0) & $3_1 | 0) << (32 - $2_1 | 0) | 0 | ($0_1 >>> $2_1 | 0) | 0 } setTempRet0($0_1 | 0); return $6 | 0; } function _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE($0_1, $1, $2_1, $3_1) { $0_1 = $0_1 | 0; $1 = $1 | 0; $2_1 = $2_1 | 0; $3_1 = $3_1 | 0; var $4_1 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0; $5 = $2_1; $9 = $5 >>> 16 | 0; $10 = $0_1 >>> 16 | 0; $11 = Math_imul($9, $10); $8 = $5; $6 = $0_1; $7 = 32; $4_1 = $7 & 31 | 0; if (32 >>> 0 <= ($7 & 63 | 0) >>> 0) { $1 = $1 >>> $4_1 | 0 } else { $1 = (((1 << $4_1 | 0) - 1 | 0) & $1 | 0) << (32 - $4_1 | 0) | 0 | ($6 >>> $4_1 | 0) | 0 } $6 = $11 + Math_imul($8, $1) | 0; $1 = $2_1; $7 = 32; $4_1 = $7 & 31 | 0; if (32 >>> 0 <= ($7 & 63 | 0) >>> 0) { $1 = $3_1 >>> $4_1 | 0 } else { $1 = (((1 << $4_1 | 0) - 1 | 0) & $3_1 | 0) << (32 - $4_1 | 0) | 0 | ($1 >>> $4_1 | 0) | 0 } $1 = $6 + Math_imul($1, $0_1) | 0; $5 = $5 & 65535 | 0; $0_1 = $0_1 & 65535 | 0; $8 = Math_imul($5, $0_1); $5 = ($8 >>> 16 | 0) + Math_imul($5, $10) | 0; $1 = $1 + ($5 >>> 16 | 0) | 0; $5 = ($5 & 65535 | 0) + Math_imul($9, $0_1) | 0; $6 = 0; $3_1 = $1 + ($5 >>> 16 | 0) | 0; $7 = 32; $4_1 = $7 & 31 | 0; if (32 >>> 0 <= ($7 & 63 | 0) >>> 0) { { $1 = $3_1 << $4_1 | 0; $6 = 0; } } else { { $1 = ((1 << $4_1 | 0) - 1 | 0) & ($3_1 >>> (32 - $4_1 | 0) | 0) | 0 | ($6 << $4_1 | 0) | 0; $6 = $3_1 << $4_1 | 0; } } $0_1 = $1; $1 = 0; $2_1 = $1; $1 = $0_1; $3_1 = $2_1; $7 = $5 << 16 | 0 | ($8 & 65535 | 0) | 0; $3_1 = $1 | $3_1 | 0; $6 = $6 | $7 | 0; i64toi32_i32$HIGH_BITS = $3_1; return $6 | 0; } function __wasm_i64_mul($0_1, $1, $2_1, $3_1) { $0_1 = $0_1 | 0; $1 = $1 | 0; $2_1 = $2_1 | 0; $3_1 = $3_1 | 0; $3_1 = _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE($0_1 | 0, $1 | 0, $2_1 | 0, $3_1 | 0) | 0; $1 = i64toi32_i32$HIGH_BITS; i64toi32_i32$HIGH_BITS = $1; return $3_1 | 0; } var FUNCTION_TABLE = []; return { "fac_rec": legalstub$0, "fac_rec_named": legalstub$fac_rec_named, "fac_iter": legalstub$2, "fac_iter_named": legalstub$3, "fac_opt": legalstub$4 }; } var memasmFunc = new ArrayBuffer(65536); var retasmFunc = asmFunc({Math,Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,NaN,Infinity}, {abort:function() { throw new Error('abort'); },setTempRet0},memasmFunc); export var fac_rec = retasmFunc.fac_rec; export var fac_rec_named = retasmFunc.fac_rec_named; export var fac_iter = retasmFunc.fac_iter; export var fac_iter_named = retasmFunc.fac_iter_named; export var fac_opt = retasmFunc.fac_opt;