blob: e3f1960b735c35d4771345fbb76d79f1212ac7e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
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 legalstub$popcnt64($0, $1) {
var $2 = 0, $3 = 0, $4 = 0;
$2 = $1;
while (1) {
if ($0 | $2) {
$1 = $0;
$0 = $1 & $1 - 1;
$2 = $2 - !$1 & $2;
$3 = $3 + 1 | 0;
$4 = $3 ? $4 : $4 + 1 | 0;
continue;
}
break;
};
i64toi32_i32$HIGH_BITS = $4;
setTempRet0(i64toi32_i32$HIGH_BITS | 0);
return $3;
}
function legalstub$ctz64($0, $1) {
var $2 = 0, $3 = 0, $4 = 0, $5 = 0;
__inlined_func$__wasm_ctz_i64$1 : {
if ($0 | $1) {
$2 = $1 - 1 | 0;
$3 = $2 + 1 | 0;
$4 = $2;
$2 = $0 - 1 | 0;
$5 = Math_clz32($0 ^ $2) + 32 | 0;
$0 = Math_clz32($1 ^ (($2 | 0) != -1 ? $3 : $4));
$0 = ($0 | 0) == 32 ? $5 : $0;
$1 = 63 - $0 | 0;
i64toi32_i32$HIGH_BITS = 0 - ($0 >>> 0 > 63) | 0;
$0 = $1;
break __inlined_func$__wasm_ctz_i64$1;
}
i64toi32_i32$HIGH_BITS = 0;
$0 = 64;
}
setTempRet0(i64toi32_i32$HIGH_BITS | 0);
return $0;
}
return {
"a": legalstub$popcnt64,
"b": legalstub$ctz64
};
}
var retasmFunc = asmFunc({
"env": env,
});
export var a = retasmFunc.a;
export var b = retasmFunc.b;
|