mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 15:12:12 +00:00
* Also fixes infinite parser loops * Also implements command line option forwarding to node.js
2541 lines
46 KiB
Plaintext
2541 lines
46 KiB
Plaintext
(module
|
|
(type $FUNCSIG$v (func))
|
|
(type $FUNCSIG$vi (func (param i32)))
|
|
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
|
(type $FUNCSIG$vii (func (param i32 i32)))
|
|
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
|
|
(type $FUNCSIG$viii (func (param i32 i32 i32)))
|
|
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
|
(type $FUNCSIG$i (func (result i32)))
|
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
|
(memory $0 1)
|
|
(data (i32.const 8) "\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
|
|
(data (i32.const 32) "\00\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00")
|
|
(data (i32.const 56) "\00\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00")
|
|
(data (i32.const 104) "\00\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00")
|
|
(table $0 7 funcref)
|
|
(elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~gc $~lib/array/Array<std/gc-array/Foo>~gc $~lib/collector/itcm/__gc_mark $std/gc-array/Foo~gc $~lib/string/String~gc $~lib/internal/arraybuffer/__gc)
|
|
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
|
|
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
|
|
(global $~lib/collector/itcm/state (mut i32) (i32.const 0))
|
|
(global $~lib/collector/itcm/white (mut i32) (i32.const 0))
|
|
(global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0))
|
|
(global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0))
|
|
(global $~lib/collector/itcm/iter (mut i32) (i32.const 0))
|
|
(global $std/gc-array/arr (mut i32) (i32.const 48))
|
|
(global $~lib/argc (mut i32) (i32.const 0))
|
|
(global $~lib/started (mut i32) (i32.const 0))
|
|
(global $~lib/memory/HEAP_BASE i32 (i32.const 180))
|
|
(export "memory" (memory $0))
|
|
(export "table" (table $0))
|
|
(export "main" (func $std/gc-array/main))
|
|
(func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v)
|
|
global.get $~lib/memory/HEAP_BASE
|
|
i32.const 7
|
|
i32.add
|
|
i32.const 7
|
|
i32.const -1
|
|
i32.xor
|
|
i32.and
|
|
global.set $~lib/allocator/arena/startOffset
|
|
global.get $~lib/allocator/arena/startOffset
|
|
global.set $~lib/allocator/arena/offset
|
|
)
|
|
(func $~lib/arraybuffer/ArrayBuffer~gc (; 2 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
local.get $0
|
|
i32.eqz
|
|
if
|
|
return
|
|
end
|
|
local.get $0
|
|
call $~lib/collector/itcm/__gc_mark
|
|
)
|
|
(func $~lib/collector/itcm/ManagedObject#get:color (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
|
local.get $0
|
|
i32.load
|
|
i32.const 3
|
|
i32.and
|
|
)
|
|
(func $~lib/collector/itcm/ManagedObject#get:next (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
|
local.get $0
|
|
i32.load
|
|
i32.const 3
|
|
i32.const -1
|
|
i32.xor
|
|
i32.and
|
|
)
|
|
(func $~lib/collector/itcm/ManagedObject#set:next (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
|
local.get $0
|
|
local.get $1
|
|
local.get $0
|
|
i32.load
|
|
i32.const 3
|
|
i32.and
|
|
i32.or
|
|
i32.store
|
|
)
|
|
(func $~lib/collector/itcm/ManagedObject#unlink (; 6 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
(local $1 i32)
|
|
(local $2 i32)
|
|
local.get $0
|
|
call $~lib/collector/itcm/ManagedObject#get:next
|
|
local.set $1
|
|
local.get $0
|
|
i32.load offset=4
|
|
local.set $2
|
|
local.get $1
|
|
local.get $2
|
|
i32.store offset=4
|
|
local.get $2
|
|
local.get $1
|
|
call $~lib/collector/itcm/ManagedObject#set:next
|
|
)
|
|
(func $~lib/collector/itcm/ManagedObjectList#push (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
|
(local $2 i32)
|
|
local.get $0
|
|
i32.load offset=4
|
|
local.set $2
|
|
local.get $1
|
|
local.get $0
|
|
call $~lib/collector/itcm/ManagedObject#set:next
|
|
local.get $1
|
|
local.get $2
|
|
i32.store offset=4
|
|
local.get $2
|
|
local.get $1
|
|
call $~lib/collector/itcm/ManagedObject#set:next
|
|
local.get $0
|
|
local.get $1
|
|
i32.store offset=4
|
|
)
|
|
(func $~lib/collector/itcm/ManagedObject#makeGray (; 8 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
local.get $0
|
|
global.get $~lib/collector/itcm/iter
|
|
i32.eq
|
|
if
|
|
local.get $0
|
|
i32.load offset=4
|
|
global.set $~lib/collector/itcm/iter
|
|
end
|
|
local.get $0
|
|
call $~lib/collector/itcm/ManagedObject#unlink
|
|
global.get $~lib/collector/itcm/toSpace
|
|
local.get $0
|
|
call $~lib/collector/itcm/ManagedObjectList#push
|
|
local.get $0
|
|
local.get $0
|
|
i32.load
|
|
i32.const 3
|
|
i32.const -1
|
|
i32.xor
|
|
i32.and
|
|
i32.const 2
|
|
i32.or
|
|
i32.store
|
|
)
|
|
(func $~lib/collector/itcm/__gc_mark (; 9 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
(local $1 i32)
|
|
local.get $0
|
|
if
|
|
block $~lib/collector/itcm/refToObj|inlined.0 (result i32)
|
|
local.get $0
|
|
local.set $1
|
|
local.get $1
|
|
i32.const 16
|
|
i32.sub
|
|
end
|
|
local.set $1
|
|
local.get $1
|
|
call $~lib/collector/itcm/ManagedObject#get:color
|
|
global.get $~lib/collector/itcm/white
|
|
i32.eq
|
|
if
|
|
local.get $1
|
|
call $~lib/collector/itcm/ManagedObject#makeGray
|
|
end
|
|
end
|
|
)
|
|
(func $~lib/array/Array<std/gc-array/Foo>~gc (; 10 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
(local $1 i32)
|
|
(local $2 i32)
|
|
(local $3 i32)
|
|
local.get $0
|
|
i32.load
|
|
local.set $1
|
|
local.get $1
|
|
call $~lib/collector/itcm/__gc_mark
|
|
i32.const 0
|
|
local.set $2
|
|
local.get $0
|
|
i32.load offset=4
|
|
i32.const 2
|
|
i32.shl
|
|
local.set $3
|
|
block $break|0
|
|
loop $continue|0
|
|
local.get $2
|
|
local.get $3
|
|
i32.lt_u
|
|
if
|
|
block
|
|
local.get $1
|
|
local.get $2
|
|
i32.add
|
|
i32.load offset=8
|
|
call $~lib/collector/itcm/__gc_mark
|
|
local.get $2
|
|
i32.const 4
|
|
i32.add
|
|
local.set $2
|
|
end
|
|
br $continue|0
|
|
end
|
|
end
|
|
end
|
|
)
|
|
(func $~lib/allocator/arena/__memory_allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
|
(local $1 i32)
|
|
(local $2 i32)
|
|
(local $3 i32)
|
|
(local $4 i32)
|
|
(local $5 i32)
|
|
(local $6 i32)
|
|
local.get $0
|
|
i32.const 1073741824
|
|
i32.gt_u
|
|
if
|
|
unreachable
|
|
end
|
|
global.get $~lib/allocator/arena/offset
|
|
local.set $1
|
|
local.get $1
|
|
local.get $0
|
|
local.tee $2
|
|
i32.const 1
|
|
local.tee $3
|
|
local.get $2
|
|
local.get $3
|
|
i32.gt_u
|
|
select
|
|
i32.add
|
|
i32.const 7
|
|
i32.add
|
|
i32.const 7
|
|
i32.const -1
|
|
i32.xor
|
|
i32.and
|
|
local.set $4
|
|
current_memory
|
|
local.set $5
|
|
local.get $4
|
|
local.get $5
|
|
i32.const 16
|
|
i32.shl
|
|
i32.gt_u
|
|
if
|
|
local.get $4
|
|
local.get $1
|
|
i32.sub
|
|
i32.const 65535
|
|
i32.add
|
|
i32.const 65535
|
|
i32.const -1
|
|
i32.xor
|
|
i32.and
|
|
i32.const 16
|
|
i32.shr_u
|
|
local.set $2
|
|
local.get $5
|
|
local.tee $3
|
|
local.get $2
|
|
local.tee $6
|
|
local.get $3
|
|
local.get $6
|
|
i32.gt_s
|
|
select
|
|
local.set $3
|
|
local.get $3
|
|
grow_memory
|
|
i32.const 0
|
|
i32.lt_s
|
|
if
|
|
local.get $2
|
|
grow_memory
|
|
i32.const 0
|
|
i32.lt_s
|
|
if
|
|
unreachable
|
|
end
|
|
end
|
|
end
|
|
local.get $4
|
|
global.set $~lib/allocator/arena/offset
|
|
local.get $1
|
|
)
|
|
(func $~lib/collector/itcm/ManagedObjectList#clear (; 12 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
local.get $0
|
|
local.get $0
|
|
i32.store
|
|
local.get $0
|
|
local.get $0
|
|
i32.store offset=4
|
|
)
|
|
(func $~lib/collector/itcm/ManagedObject#set:color (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
|
local.get $0
|
|
local.get $0
|
|
i32.load
|
|
i32.const 3
|
|
i32.const -1
|
|
i32.xor
|
|
i32.and
|
|
local.get $1
|
|
i32.or
|
|
i32.store
|
|
)
|
|
(func $~lib/allocator/arena/__memory_free (; 14 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
nop
|
|
)
|
|
(func $~lib/collector/itcm/step (; 15 ;) (type $FUNCSIG$v)
|
|
(local $0 i32)
|
|
(local $1 i32)
|
|
block $break|0
|
|
block $case3|0
|
|
block $case2|0
|
|
block $case1|0
|
|
block $case0|0
|
|
global.get $~lib/collector/itcm/state
|
|
local.set $1
|
|
local.get $1
|
|
i32.const 0
|
|
i32.eq
|
|
br_if $case0|0
|
|
local.get $1
|
|
i32.const 1
|
|
i32.eq
|
|
br_if $case1|0
|
|
local.get $1
|
|
i32.const 2
|
|
i32.eq
|
|
br_if $case2|0
|
|
local.get $1
|
|
i32.const 3
|
|
i32.eq
|
|
br_if $case3|0
|
|
br $break|0
|
|
end
|
|
block
|
|
block $~lib/memory/memory.allocate|inlined.0 (result i32)
|
|
i32.const 16
|
|
local.set $1
|
|
local.get $1
|
|
call $~lib/allocator/arena/__memory_allocate
|
|
br $~lib/memory/memory.allocate|inlined.0
|
|
end
|
|
global.set $~lib/collector/itcm/fromSpace
|
|
global.get $~lib/collector/itcm/fromSpace
|
|
i32.const -1
|
|
i32.store offset=8
|
|
global.get $~lib/collector/itcm/fromSpace
|
|
call $~lib/collector/itcm/ManagedObjectList#clear
|
|
block $~lib/memory/memory.allocate|inlined.1 (result i32)
|
|
i32.const 16
|
|
local.set $1
|
|
local.get $1
|
|
call $~lib/allocator/arena/__memory_allocate
|
|
br $~lib/memory/memory.allocate|inlined.1
|
|
end
|
|
global.set $~lib/collector/itcm/toSpace
|
|
global.get $~lib/collector/itcm/toSpace
|
|
i32.const -1
|
|
i32.store offset=8
|
|
global.get $~lib/collector/itcm/toSpace
|
|
call $~lib/collector/itcm/ManagedObjectList#clear
|
|
global.get $~lib/collector/itcm/toSpace
|
|
global.set $~lib/collector/itcm/iter
|
|
i32.const 1
|
|
global.set $~lib/collector/itcm/state
|
|
end
|
|
end
|
|
block
|
|
i32.const 3
|
|
call $~iterateRoots
|
|
i32.const 2
|
|
global.set $~lib/collector/itcm/state
|
|
br $break|0
|
|
unreachable
|
|
end
|
|
unreachable
|
|
end
|
|
block
|
|
global.get $~lib/collector/itcm/iter
|
|
call $~lib/collector/itcm/ManagedObject#get:next
|
|
local.set $0
|
|
local.get $0
|
|
global.get $~lib/collector/itcm/toSpace
|
|
i32.ne
|
|
if
|
|
local.get $0
|
|
global.set $~lib/collector/itcm/iter
|
|
local.get $0
|
|
global.get $~lib/collector/itcm/white
|
|
i32.eqz
|
|
call $~lib/collector/itcm/ManagedObject#set:color
|
|
i32.const 1
|
|
global.set $~lib/argc
|
|
block $~lib/collector/itcm/objToRef|inlined.0 (result i32)
|
|
local.get $0
|
|
local.set $1
|
|
local.get $1
|
|
i32.const 16
|
|
i32.add
|
|
end
|
|
local.get $0
|
|
i32.load offset=8
|
|
call_indirect (type $FUNCSIG$vi)
|
|
else
|
|
i32.const 3
|
|
call $~iterateRoots
|
|
global.get $~lib/collector/itcm/iter
|
|
call $~lib/collector/itcm/ManagedObject#get:next
|
|
local.set $0
|
|
local.get $0
|
|
global.get $~lib/collector/itcm/toSpace
|
|
i32.eq
|
|
if
|
|
global.get $~lib/collector/itcm/fromSpace
|
|
local.set $1
|
|
global.get $~lib/collector/itcm/toSpace
|
|
global.set $~lib/collector/itcm/fromSpace
|
|
local.get $1
|
|
global.set $~lib/collector/itcm/toSpace
|
|
global.get $~lib/collector/itcm/white
|
|
i32.eqz
|
|
global.set $~lib/collector/itcm/white
|
|
local.get $1
|
|
call $~lib/collector/itcm/ManagedObject#get:next
|
|
global.set $~lib/collector/itcm/iter
|
|
i32.const 3
|
|
global.set $~lib/collector/itcm/state
|
|
end
|
|
end
|
|
br $break|0
|
|
unreachable
|
|
end
|
|
unreachable
|
|
end
|
|
block
|
|
global.get $~lib/collector/itcm/iter
|
|
local.set $0
|
|
local.get $0
|
|
global.get $~lib/collector/itcm/toSpace
|
|
i32.ne
|
|
if
|
|
local.get $0
|
|
call $~lib/collector/itcm/ManagedObject#get:next
|
|
global.set $~lib/collector/itcm/iter
|
|
local.get $0
|
|
global.get $~lib/memory/HEAP_BASE
|
|
i32.ge_u
|
|
if
|
|
block $~lib/memory/memory.free|inlined.0
|
|
local.get $0
|
|
local.set $1
|
|
local.get $1
|
|
call $~lib/allocator/arena/__memory_free
|
|
br $~lib/memory/memory.free|inlined.0
|
|
end
|
|
end
|
|
else
|
|
global.get $~lib/collector/itcm/toSpace
|
|
call $~lib/collector/itcm/ManagedObjectList#clear
|
|
i32.const 1
|
|
global.set $~lib/collector/itcm/state
|
|
end
|
|
br $break|0
|
|
unreachable
|
|
end
|
|
unreachable
|
|
end
|
|
)
|
|
(func $~lib/collector/itcm/__gc_collect (; 16 ;) (type $FUNCSIG$v)
|
|
(local $0 i32)
|
|
block $break|0
|
|
block $case1|0
|
|
block $case0|0
|
|
global.get $~lib/collector/itcm/state
|
|
local.set $0
|
|
local.get $0
|
|
i32.const 0
|
|
i32.eq
|
|
br_if $case0|0
|
|
local.get $0
|
|
i32.const 1
|
|
i32.eq
|
|
br_if $case1|0
|
|
br $break|0
|
|
end
|
|
end
|
|
call $~lib/collector/itcm/step
|
|
end
|
|
block $break|1
|
|
loop $continue|1
|
|
global.get $~lib/collector/itcm/state
|
|
i32.const 1
|
|
i32.ne
|
|
if
|
|
call $~lib/collector/itcm/step
|
|
br $continue|1
|
|
end
|
|
end
|
|
end
|
|
)
|
|
(func $~lib/gc/gc.collect (; 17 ;) (type $FUNCSIG$v)
|
|
call $~lib/collector/itcm/__gc_collect
|
|
return
|
|
)
|
|
(func $~lib/collector/itcm/__gc_allocate (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
|
(local $2 i32)
|
|
(local $3 i32)
|
|
local.get $0
|
|
i32.const 1073741824
|
|
i32.const 16
|
|
i32.sub
|
|
i32.gt_u
|
|
if
|
|
unreachable
|
|
end
|
|
call $~lib/collector/itcm/step
|
|
block $~lib/memory/memory.allocate|inlined.2 (result i32)
|
|
i32.const 16
|
|
local.get $0
|
|
i32.add
|
|
local.set $2
|
|
local.get $2
|
|
call $~lib/allocator/arena/__memory_allocate
|
|
br $~lib/memory/memory.allocate|inlined.2
|
|
end
|
|
local.set $3
|
|
local.get $3
|
|
local.get $1
|
|
i32.store offset=8
|
|
local.get $3
|
|
global.get $~lib/collector/itcm/white
|
|
call $~lib/collector/itcm/ManagedObject#set:color
|
|
global.get $~lib/collector/itcm/fromSpace
|
|
local.get $3
|
|
call $~lib/collector/itcm/ManagedObjectList#push
|
|
block $~lib/collector/itcm/objToRef|inlined.1 (result i32)
|
|
local.get $3
|
|
local.set $2
|
|
local.get $2
|
|
i32.const 16
|
|
i32.add
|
|
end
|
|
)
|
|
(func $std/gc-array/Foo~gc (; 19 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
local.get $0
|
|
i32.eqz
|
|
if
|
|
return
|
|
end
|
|
local.get $0
|
|
call $~lib/collector/itcm/__gc_mark
|
|
)
|
|
(func $~lib/string/String~gc (; 20 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
local.get $0
|
|
i32.eqz
|
|
if
|
|
return
|
|
end
|
|
local.get $0
|
|
call $~lib/collector/itcm/__gc_mark
|
|
)
|
|
(func $~lib/internal/arraybuffer/computeSize (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
|
i32.const 1
|
|
i32.const 32
|
|
local.get $0
|
|
i32.const 8
|
|
i32.add
|
|
i32.const 1
|
|
i32.sub
|
|
i32.clz
|
|
i32.sub
|
|
i32.shl
|
|
)
|
|
(func $~lib/internal/arraybuffer/__gc (; 22 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
nop
|
|
)
|
|
(func $~lib/internal/arraybuffer/allocateUnsafe (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
|
(local $1 i32)
|
|
local.get $0
|
|
i32.const 1073741816
|
|
i32.le_u
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 120
|
|
i32.const 26
|
|
i32.const 2
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
local.get $0
|
|
call $~lib/internal/arraybuffer/computeSize
|
|
i32.const 6
|
|
call $~lib/collector/itcm/__gc_allocate
|
|
local.set $1
|
|
local.get $1
|
|
local.get $0
|
|
i32.store
|
|
local.get $1
|
|
)
|
|
(func $~lib/internal/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
|
(local $3 i32)
|
|
(local $4 i32)
|
|
(local $5 i32)
|
|
block $break|0
|
|
loop $continue|0
|
|
local.get $2
|
|
if (result i32)
|
|
local.get $1
|
|
i32.const 3
|
|
i32.and
|
|
else
|
|
local.get $2
|
|
end
|
|
if
|
|
block
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
local.get $2
|
|
i32.const 1
|
|
i32.sub
|
|
local.set $2
|
|
end
|
|
br $continue|0
|
|
end
|
|
end
|
|
end
|
|
local.get $0
|
|
i32.const 3
|
|
i32.and
|
|
i32.const 0
|
|
i32.eq
|
|
if
|
|
block $break|1
|
|
loop $continue|1
|
|
local.get $2
|
|
i32.const 16
|
|
i32.ge_u
|
|
if
|
|
block
|
|
local.get $0
|
|
local.get $1
|
|
i32.load
|
|
i32.store
|
|
local.get $0
|
|
i32.const 4
|
|
i32.add
|
|
local.get $1
|
|
i32.const 4
|
|
i32.add
|
|
i32.load
|
|
i32.store
|
|
local.get $0
|
|
i32.const 8
|
|
i32.add
|
|
local.get $1
|
|
i32.const 8
|
|
i32.add
|
|
i32.load
|
|
i32.store
|
|
local.get $0
|
|
i32.const 12
|
|
i32.add
|
|
local.get $1
|
|
i32.const 12
|
|
i32.add
|
|
i32.load
|
|
i32.store
|
|
local.get $1
|
|
i32.const 16
|
|
i32.add
|
|
local.set $1
|
|
local.get $0
|
|
i32.const 16
|
|
i32.add
|
|
local.set $0
|
|
local.get $2
|
|
i32.const 16
|
|
i32.sub
|
|
local.set $2
|
|
end
|
|
br $continue|1
|
|
end
|
|
end
|
|
end
|
|
local.get $2
|
|
i32.const 8
|
|
i32.and
|
|
if
|
|
local.get $0
|
|
local.get $1
|
|
i32.load
|
|
i32.store
|
|
local.get $0
|
|
i32.const 4
|
|
i32.add
|
|
local.get $1
|
|
i32.const 4
|
|
i32.add
|
|
i32.load
|
|
i32.store
|
|
local.get $0
|
|
i32.const 8
|
|
i32.add
|
|
local.set $0
|
|
local.get $1
|
|
i32.const 8
|
|
i32.add
|
|
local.set $1
|
|
end
|
|
local.get $2
|
|
i32.const 4
|
|
i32.and
|
|
if
|
|
local.get $0
|
|
local.get $1
|
|
i32.load
|
|
i32.store
|
|
local.get $0
|
|
i32.const 4
|
|
i32.add
|
|
local.set $0
|
|
local.get $1
|
|
i32.const 4
|
|
i32.add
|
|
local.set $1
|
|
end
|
|
local.get $2
|
|
i32.const 2
|
|
i32.and
|
|
if
|
|
local.get $0
|
|
local.get $1
|
|
i32.load16_u
|
|
i32.store16
|
|
local.get $0
|
|
i32.const 2
|
|
i32.add
|
|
local.set $0
|
|
local.get $1
|
|
i32.const 2
|
|
i32.add
|
|
local.set $1
|
|
end
|
|
local.get $2
|
|
i32.const 1
|
|
i32.and
|
|
if
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
end
|
|
return
|
|
end
|
|
local.get $2
|
|
i32.const 32
|
|
i32.ge_u
|
|
if
|
|
block $break|2
|
|
block $case2|2
|
|
block $case1|2
|
|
block $case0|2
|
|
local.get $0
|
|
i32.const 3
|
|
i32.and
|
|
local.set $5
|
|
local.get $5
|
|
i32.const 1
|
|
i32.eq
|
|
br_if $case0|2
|
|
local.get $5
|
|
i32.const 2
|
|
i32.eq
|
|
br_if $case1|2
|
|
local.get $5
|
|
i32.const 3
|
|
i32.eq
|
|
br_if $case2|2
|
|
br $break|2
|
|
end
|
|
block
|
|
local.get $1
|
|
i32.load
|
|
local.set $3
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
local.get $2
|
|
i32.const 3
|
|
i32.sub
|
|
local.set $2
|
|
block $break|3
|
|
loop $continue|3
|
|
local.get $2
|
|
i32.const 17
|
|
i32.ge_u
|
|
if
|
|
block
|
|
local.get $1
|
|
i32.const 1
|
|
i32.add
|
|
i32.load
|
|
local.set $4
|
|
local.get $0
|
|
local.get $3
|
|
i32.const 24
|
|
i32.shr_u
|
|
local.get $4
|
|
i32.const 8
|
|
i32.shl
|
|
i32.or
|
|
i32.store
|
|
local.get $1
|
|
i32.const 5
|
|
i32.add
|
|
i32.load
|
|
local.set $3
|
|
local.get $0
|
|
i32.const 4
|
|
i32.add
|
|
local.get $4
|
|
i32.const 24
|
|
i32.shr_u
|
|
local.get $3
|
|
i32.const 8
|
|
i32.shl
|
|
i32.or
|
|
i32.store
|
|
local.get $1
|
|
i32.const 9
|
|
i32.add
|
|
i32.load
|
|
local.set $4
|
|
local.get $0
|
|
i32.const 8
|
|
i32.add
|
|
local.get $3
|
|
i32.const 24
|
|
i32.shr_u
|
|
local.get $4
|
|
i32.const 8
|
|
i32.shl
|
|
i32.or
|
|
i32.store
|
|
local.get $1
|
|
i32.const 13
|
|
i32.add
|
|
i32.load
|
|
local.set $3
|
|
local.get $0
|
|
i32.const 12
|
|
i32.add
|
|
local.get $4
|
|
i32.const 24
|
|
i32.shr_u
|
|
local.get $3
|
|
i32.const 8
|
|
i32.shl
|
|
i32.or
|
|
i32.store
|
|
local.get $1
|
|
i32.const 16
|
|
i32.add
|
|
local.set $1
|
|
local.get $0
|
|
i32.const 16
|
|
i32.add
|
|
local.set $0
|
|
local.get $2
|
|
i32.const 16
|
|
i32.sub
|
|
local.set $2
|
|
end
|
|
br $continue|3
|
|
end
|
|
end
|
|
end
|
|
br $break|2
|
|
unreachable
|
|
end
|
|
unreachable
|
|
end
|
|
block
|
|
local.get $1
|
|
i32.load
|
|
local.set $3
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
local.get $2
|
|
i32.const 2
|
|
i32.sub
|
|
local.set $2
|
|
block $break|4
|
|
loop $continue|4
|
|
local.get $2
|
|
i32.const 18
|
|
i32.ge_u
|
|
if
|
|
block
|
|
local.get $1
|
|
i32.const 2
|
|
i32.add
|
|
i32.load
|
|
local.set $4
|
|
local.get $0
|
|
local.get $3
|
|
i32.const 16
|
|
i32.shr_u
|
|
local.get $4
|
|
i32.const 16
|
|
i32.shl
|
|
i32.or
|
|
i32.store
|
|
local.get $1
|
|
i32.const 6
|
|
i32.add
|
|
i32.load
|
|
local.set $3
|
|
local.get $0
|
|
i32.const 4
|
|
i32.add
|
|
local.get $4
|
|
i32.const 16
|
|
i32.shr_u
|
|
local.get $3
|
|
i32.const 16
|
|
i32.shl
|
|
i32.or
|
|
i32.store
|
|
local.get $1
|
|
i32.const 10
|
|
i32.add
|
|
i32.load
|
|
local.set $4
|
|
local.get $0
|
|
i32.const 8
|
|
i32.add
|
|
local.get $3
|
|
i32.const 16
|
|
i32.shr_u
|
|
local.get $4
|
|
i32.const 16
|
|
i32.shl
|
|
i32.or
|
|
i32.store
|
|
local.get $1
|
|
i32.const 14
|
|
i32.add
|
|
i32.load
|
|
local.set $3
|
|
local.get $0
|
|
i32.const 12
|
|
i32.add
|
|
local.get $4
|
|
i32.const 16
|
|
i32.shr_u
|
|
local.get $3
|
|
i32.const 16
|
|
i32.shl
|
|
i32.or
|
|
i32.store
|
|
local.get $1
|
|
i32.const 16
|
|
i32.add
|
|
local.set $1
|
|
local.get $0
|
|
i32.const 16
|
|
i32.add
|
|
local.set $0
|
|
local.get $2
|
|
i32.const 16
|
|
i32.sub
|
|
local.set $2
|
|
end
|
|
br $continue|4
|
|
end
|
|
end
|
|
end
|
|
br $break|2
|
|
unreachable
|
|
end
|
|
unreachable
|
|
end
|
|
block
|
|
local.get $1
|
|
i32.load
|
|
local.set $3
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
local.get $2
|
|
i32.const 1
|
|
i32.sub
|
|
local.set $2
|
|
block $break|5
|
|
loop $continue|5
|
|
local.get $2
|
|
i32.const 19
|
|
i32.ge_u
|
|
if
|
|
block
|
|
local.get $1
|
|
i32.const 3
|
|
i32.add
|
|
i32.load
|
|
local.set $4
|
|
local.get $0
|
|
local.get $3
|
|
i32.const 8
|
|
i32.shr_u
|
|
local.get $4
|
|
i32.const 24
|
|
i32.shl
|
|
i32.or
|
|
i32.store
|
|
local.get $1
|
|
i32.const 7
|
|
i32.add
|
|
i32.load
|
|
local.set $3
|
|
local.get $0
|
|
i32.const 4
|
|
i32.add
|
|
local.get $4
|
|
i32.const 8
|
|
i32.shr_u
|
|
local.get $3
|
|
i32.const 24
|
|
i32.shl
|
|
i32.or
|
|
i32.store
|
|
local.get $1
|
|
i32.const 11
|
|
i32.add
|
|
i32.load
|
|
local.set $4
|
|
local.get $0
|
|
i32.const 8
|
|
i32.add
|
|
local.get $3
|
|
i32.const 8
|
|
i32.shr_u
|
|
local.get $4
|
|
i32.const 24
|
|
i32.shl
|
|
i32.or
|
|
i32.store
|
|
local.get $1
|
|
i32.const 15
|
|
i32.add
|
|
i32.load
|
|
local.set $3
|
|
local.get $0
|
|
i32.const 12
|
|
i32.add
|
|
local.get $4
|
|
i32.const 8
|
|
i32.shr_u
|
|
local.get $3
|
|
i32.const 24
|
|
i32.shl
|
|
i32.or
|
|
i32.store
|
|
local.get $1
|
|
i32.const 16
|
|
i32.add
|
|
local.set $1
|
|
local.get $0
|
|
i32.const 16
|
|
i32.add
|
|
local.set $0
|
|
local.get $2
|
|
i32.const 16
|
|
i32.sub
|
|
local.set $2
|
|
end
|
|
br $continue|5
|
|
end
|
|
end
|
|
end
|
|
br $break|2
|
|
unreachable
|
|
end
|
|
unreachable
|
|
end
|
|
end
|
|
local.get $2
|
|
i32.const 16
|
|
i32.and
|
|
if
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
end
|
|
local.get $2
|
|
i32.const 8
|
|
i32.and
|
|
if
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
end
|
|
local.get $2
|
|
i32.const 4
|
|
i32.and
|
|
if
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
end
|
|
local.get $2
|
|
i32.const 2
|
|
i32.and
|
|
if
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
end
|
|
local.get $2
|
|
i32.const 1
|
|
i32.and
|
|
if
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $5
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $5
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $5
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
end
|
|
)
|
|
(func $~lib/internal/memory/memmove (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
|
(local $3 i32)
|
|
local.get $0
|
|
local.get $1
|
|
i32.eq
|
|
if
|
|
return
|
|
end
|
|
local.get $1
|
|
local.get $2
|
|
i32.add
|
|
local.get $0
|
|
i32.le_u
|
|
local.tee $3
|
|
if (result i32)
|
|
local.get $3
|
|
else
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
local.get $1
|
|
i32.le_u
|
|
end
|
|
if
|
|
local.get $0
|
|
local.get $1
|
|
local.get $2
|
|
call $~lib/internal/memory/memcpy
|
|
return
|
|
end
|
|
local.get $0
|
|
local.get $1
|
|
i32.lt_u
|
|
if
|
|
local.get $1
|
|
i32.const 7
|
|
i32.and
|
|
local.get $0
|
|
i32.const 7
|
|
i32.and
|
|
i32.eq
|
|
if
|
|
block $break|0
|
|
loop $continue|0
|
|
local.get $0
|
|
i32.const 7
|
|
i32.and
|
|
if
|
|
block
|
|
local.get $2
|
|
i32.eqz
|
|
if
|
|
return
|
|
end
|
|
local.get $2
|
|
i32.const 1
|
|
i32.sub
|
|
local.set $2
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $3
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $3
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $3
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $3
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
end
|
|
br $continue|0
|
|
end
|
|
end
|
|
end
|
|
block $break|1
|
|
loop $continue|1
|
|
local.get $2
|
|
i32.const 8
|
|
i32.ge_u
|
|
if
|
|
block
|
|
local.get $0
|
|
local.get $1
|
|
i64.load
|
|
i64.store
|
|
local.get $2
|
|
i32.const 8
|
|
i32.sub
|
|
local.set $2
|
|
local.get $0
|
|
i32.const 8
|
|
i32.add
|
|
local.set $0
|
|
local.get $1
|
|
i32.const 8
|
|
i32.add
|
|
local.set $1
|
|
end
|
|
br $continue|1
|
|
end
|
|
end
|
|
end
|
|
end
|
|
block $break|2
|
|
loop $continue|2
|
|
local.get $2
|
|
if
|
|
block
|
|
block (result i32)
|
|
local.get $0
|
|
local.tee $3
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $3
|
|
end
|
|
block (result i32)
|
|
local.get $1
|
|
local.tee $3
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
local.get $3
|
|
end
|
|
i32.load8_u
|
|
i32.store8
|
|
local.get $2
|
|
i32.const 1
|
|
i32.sub
|
|
local.set $2
|
|
end
|
|
br $continue|2
|
|
end
|
|
end
|
|
end
|
|
else
|
|
local.get $1
|
|
i32.const 7
|
|
i32.and
|
|
local.get $0
|
|
i32.const 7
|
|
i32.and
|
|
i32.eq
|
|
if
|
|
block $break|3
|
|
loop $continue|3
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
i32.const 7
|
|
i32.and
|
|
if
|
|
block
|
|
local.get $2
|
|
i32.eqz
|
|
if
|
|
return
|
|
end
|
|
local.get $0
|
|
local.get $2
|
|
i32.const 1
|
|
i32.sub
|
|
local.tee $2
|
|
i32.add
|
|
local.get $1
|
|
local.get $2
|
|
i32.add
|
|
i32.load8_u
|
|
i32.store8
|
|
end
|
|
br $continue|3
|
|
end
|
|
end
|
|
end
|
|
block $break|4
|
|
loop $continue|4
|
|
local.get $2
|
|
i32.const 8
|
|
i32.ge_u
|
|
if
|
|
block
|
|
local.get $2
|
|
i32.const 8
|
|
i32.sub
|
|
local.set $2
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
local.get $1
|
|
local.get $2
|
|
i32.add
|
|
i64.load
|
|
i64.store
|
|
end
|
|
br $continue|4
|
|
end
|
|
end
|
|
end
|
|
end
|
|
block $break|5
|
|
loop $continue|5
|
|
local.get $2
|
|
if
|
|
local.get $0
|
|
local.get $2
|
|
i32.const 1
|
|
i32.sub
|
|
local.tee $2
|
|
i32.add
|
|
local.get $1
|
|
local.get $2
|
|
i32.add
|
|
i32.load8_u
|
|
i32.store8
|
|
br $continue|5
|
|
end
|
|
end
|
|
end
|
|
end
|
|
)
|
|
(func $~lib/internal/memory/memset (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
|
(local $3 i32)
|
|
(local $4 i32)
|
|
(local $5 i64)
|
|
local.get $2
|
|
i32.eqz
|
|
if
|
|
return
|
|
end
|
|
local.get $0
|
|
local.get $1
|
|
i32.store8
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
i32.const 1
|
|
i32.sub
|
|
local.get $1
|
|
i32.store8
|
|
local.get $2
|
|
i32.const 2
|
|
i32.le_u
|
|
if
|
|
return
|
|
end
|
|
local.get $0
|
|
i32.const 1
|
|
i32.add
|
|
local.get $1
|
|
i32.store8
|
|
local.get $0
|
|
i32.const 2
|
|
i32.add
|
|
local.get $1
|
|
i32.store8
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
i32.const 2
|
|
i32.sub
|
|
local.get $1
|
|
i32.store8
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
i32.const 3
|
|
i32.sub
|
|
local.get $1
|
|
i32.store8
|
|
local.get $2
|
|
i32.const 6
|
|
i32.le_u
|
|
if
|
|
return
|
|
end
|
|
local.get $0
|
|
i32.const 3
|
|
i32.add
|
|
local.get $1
|
|
i32.store8
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
i32.const 4
|
|
i32.sub
|
|
local.get $1
|
|
i32.store8
|
|
local.get $2
|
|
i32.const 8
|
|
i32.le_u
|
|
if
|
|
return
|
|
end
|
|
i32.const 0
|
|
local.get $0
|
|
i32.sub
|
|
i32.const 3
|
|
i32.and
|
|
local.set $3
|
|
local.get $0
|
|
local.get $3
|
|
i32.add
|
|
local.set $0
|
|
local.get $2
|
|
local.get $3
|
|
i32.sub
|
|
local.set $2
|
|
local.get $2
|
|
i32.const -4
|
|
i32.and
|
|
local.set $2
|
|
i32.const -1
|
|
i32.const 255
|
|
i32.div_u
|
|
local.get $1
|
|
i32.const 255
|
|
i32.and
|
|
i32.mul
|
|
local.set $4
|
|
local.get $0
|
|
local.get $4
|
|
i32.store
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
i32.const 4
|
|
i32.sub
|
|
local.get $4
|
|
i32.store
|
|
local.get $2
|
|
i32.const 8
|
|
i32.le_u
|
|
if
|
|
return
|
|
end
|
|
local.get $0
|
|
i32.const 4
|
|
i32.add
|
|
local.get $4
|
|
i32.store
|
|
local.get $0
|
|
i32.const 8
|
|
i32.add
|
|
local.get $4
|
|
i32.store
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
i32.const 12
|
|
i32.sub
|
|
local.get $4
|
|
i32.store
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
i32.const 8
|
|
i32.sub
|
|
local.get $4
|
|
i32.store
|
|
local.get $2
|
|
i32.const 24
|
|
i32.le_u
|
|
if
|
|
return
|
|
end
|
|
local.get $0
|
|
i32.const 12
|
|
i32.add
|
|
local.get $4
|
|
i32.store
|
|
local.get $0
|
|
i32.const 16
|
|
i32.add
|
|
local.get $4
|
|
i32.store
|
|
local.get $0
|
|
i32.const 20
|
|
i32.add
|
|
local.get $4
|
|
i32.store
|
|
local.get $0
|
|
i32.const 24
|
|
i32.add
|
|
local.get $4
|
|
i32.store
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
i32.const 28
|
|
i32.sub
|
|
local.get $4
|
|
i32.store
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
i32.const 24
|
|
i32.sub
|
|
local.get $4
|
|
i32.store
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
i32.const 20
|
|
i32.sub
|
|
local.get $4
|
|
i32.store
|
|
local.get $0
|
|
local.get $2
|
|
i32.add
|
|
i32.const 16
|
|
i32.sub
|
|
local.get $4
|
|
i32.store
|
|
i32.const 24
|
|
local.get $0
|
|
i32.const 4
|
|
i32.and
|
|
i32.add
|
|
local.set $3
|
|
local.get $0
|
|
local.get $3
|
|
i32.add
|
|
local.set $0
|
|
local.get $2
|
|
local.get $3
|
|
i32.sub
|
|
local.set $2
|
|
local.get $4
|
|
i64.extend_i32_u
|
|
local.get $4
|
|
i64.extend_i32_u
|
|
i64.const 32
|
|
i64.shl
|
|
i64.or
|
|
local.set $5
|
|
block $break|0
|
|
loop $continue|0
|
|
local.get $2
|
|
i32.const 32
|
|
i32.ge_u
|
|
if
|
|
block
|
|
local.get $0
|
|
local.get $5
|
|
i64.store
|
|
local.get $0
|
|
i32.const 8
|
|
i32.add
|
|
local.get $5
|
|
i64.store
|
|
local.get $0
|
|
i32.const 16
|
|
i32.add
|
|
local.get $5
|
|
i64.store
|
|
local.get $0
|
|
i32.const 24
|
|
i32.add
|
|
local.get $5
|
|
i64.store
|
|
local.get $2
|
|
i32.const 32
|
|
i32.sub
|
|
local.set $2
|
|
local.get $0
|
|
i32.const 32
|
|
i32.add
|
|
local.set $0
|
|
end
|
|
br $continue|0
|
|
end
|
|
end
|
|
end
|
|
)
|
|
(func $~lib/internal/arraybuffer/reallocateUnsafe (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
|
(local $2 i32)
|
|
(local $3 i32)
|
|
(local $4 i32)
|
|
(local $5 i32)
|
|
(local $6 i32)
|
|
local.get $0
|
|
i32.load
|
|
local.set $2
|
|
local.get $1
|
|
local.get $2
|
|
i32.gt_s
|
|
if
|
|
local.get $1
|
|
i32.const 1073741816
|
|
i32.le_s
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 120
|
|
i32.const 40
|
|
i32.const 4
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
local.get $1
|
|
local.get $2
|
|
call $~lib/internal/arraybuffer/computeSize
|
|
i32.const 8
|
|
i32.sub
|
|
i32.le_s
|
|
if
|
|
local.get $0
|
|
local.get $1
|
|
i32.store
|
|
else
|
|
local.get $1
|
|
call $~lib/internal/arraybuffer/allocateUnsafe
|
|
local.set $3
|
|
block $~lib/memory/memory.copy|inlined.0
|
|
local.get $3
|
|
i32.const 8
|
|
i32.add
|
|
local.set $4
|
|
local.get $0
|
|
i32.const 8
|
|
i32.add
|
|
local.set $5
|
|
local.get $2
|
|
local.set $6
|
|
local.get $4
|
|
local.get $5
|
|
local.get $6
|
|
call $~lib/internal/memory/memmove
|
|
end
|
|
local.get $3
|
|
local.set $0
|
|
end
|
|
block $~lib/memory/memory.fill|inlined.0
|
|
local.get $0
|
|
i32.const 8
|
|
i32.add
|
|
local.get $2
|
|
i32.add
|
|
local.set $3
|
|
i32.const 0
|
|
local.set $6
|
|
local.get $1
|
|
local.get $2
|
|
i32.sub
|
|
local.set $5
|
|
local.get $3
|
|
local.get $6
|
|
local.get $5
|
|
call $~lib/internal/memory/memset
|
|
end
|
|
else
|
|
local.get $1
|
|
local.get $2
|
|
i32.lt_s
|
|
if
|
|
local.get $1
|
|
i32.const 0
|
|
i32.ge_s
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 120
|
|
i32.const 62
|
|
i32.const 4
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
local.get $0
|
|
local.get $1
|
|
i32.store
|
|
end
|
|
end
|
|
local.get $0
|
|
)
|
|
(func $~lib/collector/itcm/__gc_link (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
|
(local $2 i32)
|
|
(local $3 i32)
|
|
block $~lib/collector/itcm/refToObj|inlined.1 (result i32)
|
|
local.get $0
|
|
local.set $2
|
|
local.get $2
|
|
i32.const 16
|
|
i32.sub
|
|
end
|
|
local.set $3
|
|
local.get $3
|
|
call $~lib/collector/itcm/ManagedObject#get:color
|
|
global.get $~lib/collector/itcm/white
|
|
i32.eqz
|
|
i32.eq
|
|
local.tee $2
|
|
if (result i32)
|
|
block $~lib/collector/itcm/refToObj|inlined.3 (result i32)
|
|
local.get $1
|
|
local.set $2
|
|
local.get $2
|
|
i32.const 16
|
|
i32.sub
|
|
end
|
|
call $~lib/collector/itcm/ManagedObject#get:color
|
|
global.get $~lib/collector/itcm/white
|
|
i32.eq
|
|
else
|
|
local.get $2
|
|
end
|
|
if
|
|
local.get $3
|
|
call $~lib/collector/itcm/ManagedObject#makeGray
|
|
end
|
|
)
|
|
(func $~lib/array/Array<std/gc-array/Foo>#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
|
(local $3 i32)
|
|
(local $4 i32)
|
|
(local $5 i32)
|
|
(local $6 i32)
|
|
(local $7 i32)
|
|
(local $8 i32)
|
|
local.get $0
|
|
i32.load
|
|
local.set $3
|
|
local.get $3
|
|
i32.load
|
|
i32.const 2
|
|
i32.shr_u
|
|
local.set $4
|
|
local.get $1
|
|
local.get $4
|
|
i32.ge_u
|
|
if
|
|
local.get $1
|
|
i32.const 268435454
|
|
i32.ge_u
|
|
if
|
|
i32.const 0
|
|
i32.const 72
|
|
i32.const 107
|
|
i32.const 41
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
local.get $3
|
|
local.get $1
|
|
i32.const 1
|
|
i32.add
|
|
i32.const 2
|
|
i32.shl
|
|
call $~lib/internal/arraybuffer/reallocateUnsafe
|
|
local.set $3
|
|
local.get $0
|
|
local.get $3
|
|
i32.store
|
|
local.get $0
|
|
local.get $1
|
|
i32.const 1
|
|
i32.add
|
|
i32.store offset=4
|
|
end
|
|
block $~lib/internal/arraybuffer/STORE<std/gc-array/Foo,std/gc-array/Foo>|inlined.0
|
|
local.get $3
|
|
local.set $5
|
|
local.get $1
|
|
local.set $6
|
|
local.get $2
|
|
local.set $7
|
|
i32.const 0
|
|
local.set $8
|
|
local.get $5
|
|
local.get $6
|
|
i32.const 2
|
|
i32.shl
|
|
i32.add
|
|
local.get $8
|
|
i32.add
|
|
local.get $7
|
|
i32.store offset=8
|
|
end
|
|
local.get $0
|
|
local.get $2
|
|
call $~lib/collector/itcm/__gc_link
|
|
)
|
|
(func $start:std/gc-array (; 30 ;) (type $FUNCSIG$v)
|
|
(local $0 i32)
|
|
(local $1 i32)
|
|
(local $2 i32)
|
|
call $start:~lib/allocator/arena
|
|
call $~lib/gc/gc.collect
|
|
global.get $std/gc-array/arr
|
|
i32.const 0
|
|
block (result i32)
|
|
i32.const 0
|
|
i32.const 4
|
|
call $~lib/collector/itcm/__gc_allocate
|
|
local.set $0
|
|
local.get $0
|
|
end
|
|
call $~lib/array/Array<std/gc-array/Foo>#__set
|
|
call $~lib/gc/gc.collect
|
|
global.get $std/gc-array/arr
|
|
i32.const 1
|
|
block (result i32)
|
|
i32.const 0
|
|
i32.const 4
|
|
call $~lib/collector/itcm/__gc_allocate
|
|
local.set $1
|
|
local.get $1
|
|
end
|
|
call $~lib/array/Array<std/gc-array/Foo>#__set
|
|
call $~lib/gc/gc.collect
|
|
global.get $std/gc-array/arr
|
|
i32.const 0
|
|
block (result i32)
|
|
i32.const 0
|
|
i32.const 4
|
|
call $~lib/collector/itcm/__gc_allocate
|
|
local.set $2
|
|
local.get $2
|
|
end
|
|
call $~lib/array/Array<std/gc-array/Foo>#__set
|
|
call $~lib/gc/gc.collect
|
|
)
|
|
(func $std/gc-array/main (; 31 ;) (type $FUNCSIG$i) (result i32)
|
|
global.get $~lib/started
|
|
i32.eqz
|
|
if
|
|
call $start
|
|
i32.const 1
|
|
global.set $~lib/started
|
|
end
|
|
i32.const 0
|
|
)
|
|
(func $start (; 32 ;) (type $FUNCSIG$v)
|
|
call $start:std/gc-array
|
|
)
|
|
(func $null (; 33 ;) (type $FUNCSIG$v)
|
|
)
|
|
(func $~iterateRoots (; 34 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
global.get $std/gc-array/arr
|
|
local.get $0
|
|
call_indirect (type $FUNCSIG$vi)
|
|
)
|
|
)
|