-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathget-token.wat
68 lines (68 loc) · 1.79 KB
/
get-token.wat
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
(module
(;(type $t0 (func (param i32)))
(type $t1 (func (result i32)))
(type $t2 (func))
(type $t3 (func (param i32) (result i32)))
(func $_initialize (export "_initialize") (type $t2)
nop);)
(func $get_token (export "get_token") (;(type $t0);) (param $p0 i32)
(local $l1 i32) (local $l2 i32) (local $l3 i32)
loop $L0
local.get $l1
i32.const 3
i32.mul
i32.const 1024
i32.add
local.tee $l2
i32.load8_s
local.tee $l3
if $I1
local.get $l1
i32.const 1024
i32.add
local.get $l2
i32.load8_s offset=2
local.get $l3
i32.const 9025
i32.mul
local.get $l2
i32.load8_s offset=1
i32.const 95
i32.mul
i32.add
i32.add
i32.const 291872
i32.sub
local.get $p0
i32.div_s
i32.const 32
i32.add
i32.store8
local.get $l1
i32.const 1
i32.add
local.set $l1
br $L0
end
end)
(;(func $stackSave (export "stackSave") (type $t1) (result i32)
global.get $g0)
(func $stackRestore (export "stackRestore") (type $t0) (param $p0 i32)
local.get $p0
global.set $g0)
(func $stackAlloc (export "stackAlloc") (type $t3) (param $p0 i32) (result i32)
global.get $g0
local.get $p0
i32.sub
i32.const -16
i32.and
local.tee $p0
global.set $g0
local.get $p0)
(func $__errno_location (export "__errno_location") (type $t1) (result i32)
i32.const 2048)
(table $__indirect_function_table (export "__indirect_function_table") 2 2 funcref);)
(memory $memory (export "memory") 1 (;256 256;))
;;(global $g0 (mut i32) (i32.const 67600))
(global $e (export "e") i32 (i32.const 1024))
(;(elem $e0 (i32.const 1) func $_initialize);))