import * as env from 'env'; function asmFunc(imports) { var Math_imul = Math.imul; var Math_fround = Math.fround; var Math_abs = Math.abs; var Math_clz32 = Math.clz32; var Math_min = Math.min; var Math_max = Math.max; var Math_floor = Math.floor; var Math_ceil = Math.ceil; var Math_trunc = Math.trunc; var Math_sqrt = Math.sqrt; var env = imports.env; var setTempRet0 = env.setTempRet0; var i64toi32_i32$HIGH_BITS = 0; function test8(x) { x = x | 0; return x << 24 >> 24 | 0; } function test16(x) { x = x | 0; return x << 16 >> 16 | 0; } function test8_i64(x, x$hi) { x = x | 0; x$hi = x$hi | 0; var i64toi32_i32$2 = 0, i64toi32_i32$1 = 0; i64toi32_i32$2 = x << 24 >> 24; i64toi32_i32$1 = i64toi32_i32$2 >> 31 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; } function test16_i64(x, x$hi) { x = x | 0; x$hi = x$hi | 0; var i64toi32_i32$2 = 0, i64toi32_i32$1 = 0; i64toi32_i32$2 = x << 16 >> 16; i64toi32_i32$1 = i64toi32_i32$2 >> 31 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; } function test32_i64(x, x$hi) { x = x | 0; x$hi = x$hi | 0; var i64toi32_i32$2 = 0, i64toi32_i32$1 = 0; i64toi32_i32$2 = x; i64toi32_i32$1 = i64toi32_i32$2 >> 31 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; } function legalstub$test8_i64($0, $1) { $0 = $0 | 0; $1 = $1 | 0; var i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $12 = 0, $13 = 0, $4 = 0, $4$hi = 0, $7$hi = 0, $2 = 0, $2$hi = 0; i64toi32_i32$0 = 0; $4 = $0; $4$hi = i64toi32_i32$0; i64toi32_i32$0 = 0; i64toi32_i32$2 = $1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; $12 = 0; } else { i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0; $12 = i64toi32_i32$2 << i64toi32_i32$4 | 0; } $7$hi = i64toi32_i32$1; i64toi32_i32$1 = $4$hi; i64toi32_i32$0 = $4; i64toi32_i32$2 = $7$hi; i64toi32_i32$3 = $12; i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; i64toi32_i32$2 = test8_i64(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; $2 = i64toi32_i32$2; $2$hi = i64toi32_i32$0; i64toi32_i32$1 = i64toi32_i32$2; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { i64toi32_i32$2 = 0; $13 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; } else { i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $13 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0; } setTempRet0($13 | 0); i64toi32_i32$2 = $2$hi; return $2 | 0; } function legalstub$test16_i64($0, $1) { $0 = $0 | 0; $1 = $1 | 0; var i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $12 = 0, $13 = 0, $4 = 0, $4$hi = 0, $7$hi = 0, $2 = 0, $2$hi = 0; i64toi32_i32$0 = 0; $4 = $0; $4$hi = i64toi32_i32$0; i64toi32_i32$0 = 0; i64toi32_i32$2 = $1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; $12 = 0; } else { i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0; $12 = i64toi32_i32$2 << i64toi32_i32$4 | 0; } $7$hi = i64toi32_i32$1; i64toi32_i32$1 = $4$hi; i64toi32_i32$0 = $4; i64toi32_i32$2 = $7$hi; i64toi32_i32$3 = $12; i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; i64toi32_i32$2 = test16_i64(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; $2 = i64toi32_i32$2; $2$hi = i64toi32_i32$0; i64toi32_i32$1 = i64toi32_i32$2; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { i64toi32_i32$2 = 0; $13 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; } else { i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $13 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0; } setTempRet0($13 | 0); i64toi32_i32$2 = $2$hi; return $2 | 0; } function legalstub$test32_i64($0, $1) { $0 = $0 | 0; $1 = $1 | 0; var i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $12 = 0, $13 = 0, $4 = 0, $4$hi = 0, $7$hi = 0, $2 = 0, $2$hi = 0; i64toi32_i32$0 = 0; $4 = $0; $4$hi = i64toi32_i32$0; i64toi32_i32$0 = 0; i64toi32_i32$2 = $1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; $12 = 0; } else { i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0; $12 = i64toi32_i32$2 << i64toi32_i32$4 | 0; } $7$hi = i64toi32_i32$1; i64toi32_i32$1 = $4$hi; i64toi32_i32$0 = $4; i64toi32_i32$2 = $7$hi; i64toi32_i32$3 = $12; i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; i64toi32_i32$2 = test32_i64(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; $2 = i64toi32_i32$2; $2$hi = i64toi32_i32$0; i64toi32_i32$1 = i64toi32_i32$2; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { i64toi32_i32$2 = 0; $13 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; } else { i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $13 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0; } setTempRet0($13 | 0); i64toi32_i32$2 = $2$hi; return $2 | 0; } return { "test8": test8, "test16": test16, "test8_i64": legalstub$test8_i64, "test16_i64": legalstub$test16_i64, "test32_i64": legalstub$test32_i64 }; } var retasmFunc = asmFunc({ "env": env, }); export var test8 = retasmFunc.test8; export var test16 = retasmFunc.test16; export var test8_i64 = retasmFunc.test8_i64; export var test16_i64 = retasmFunc.test16_i64; export var test32_i64 = retasmFunc.test32_i64;