mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 07:02:13 +00:00
2052 lines
35 KiB
Plaintext
2052 lines
35 KiB
Plaintext
(module
|
|
(type $ii (func (param i32) (result i32)))
|
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
|
(type $iiiv (func (param i32 i32 i32)))
|
|
(type $iiii (func (param i32 i32 i32) (result i32)))
|
|
(type $iv (func (param i32)))
|
|
(type $v (func))
|
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
|
(memory $0 1)
|
|
(data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s\00")
|
|
(table $0 1 funcref)
|
|
(elem (i32.const 0) $null)
|
|
(global $~lib/internal/allocator/AL_BITS i32 (i32.const 3))
|
|
(global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8))
|
|
(global $~lib/internal/allocator/AL_MASK i32 (i32.const 7))
|
|
(global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824))
|
|
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
|
|
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
|
|
(global $std/allocator_arena/size i32 (i32.const 42))
|
|
(global $std/allocator_arena/ptr1 (mut i32) (i32.const 0))
|
|
(global $std/allocator_arena/ptr2 (mut i32) (i32.const 0))
|
|
(global $std/allocator_arena/i (mut i32) (i32.const 0))
|
|
(global $HEAP_BASE i32 (i32.const 56))
|
|
(export "memory" (memory $0))
|
|
(export "table" (table $0))
|
|
(start $start)
|
|
(func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $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
|
|
global.get $~lib/internal/allocator/MAX_SIZE_32
|
|
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
|
|
global.get $~lib/internal/allocator/AL_MASK
|
|
i32.add
|
|
global.get $~lib/internal/allocator/AL_MASK
|
|
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/internal/memory/memset (; 2 ;) (type $iiiv) (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/memory/memcpy (; 3 ;) (type $iiiv) (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 (; 4 ;) (type $iiiv) (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/memcmp (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
|
(local $3 i32)
|
|
local.get $0
|
|
local.get $1
|
|
i32.eq
|
|
if
|
|
i32.const 0
|
|
return
|
|
end
|
|
block $break|0
|
|
loop $continue|0
|
|
local.get $2
|
|
i32.const 0
|
|
i32.ne
|
|
local.tee $3
|
|
if (result i32)
|
|
local.get $0
|
|
i32.load8_u
|
|
local.get $1
|
|
i32.load8_u
|
|
i32.eq
|
|
else
|
|
local.get $3
|
|
end
|
|
if
|
|
block
|
|
local.get $2
|
|
i32.const 1
|
|
i32.sub
|
|
local.set $2
|
|
local.get $0
|
|
i32.const 1
|
|
i32.add
|
|
local.set $0
|
|
local.get $1
|
|
i32.const 1
|
|
i32.add
|
|
local.set $1
|
|
end
|
|
br $continue|0
|
|
end
|
|
end
|
|
end
|
|
local.get $2
|
|
if (result i32)
|
|
local.get $0
|
|
i32.load8_u
|
|
local.get $1
|
|
i32.load8_u
|
|
i32.sub
|
|
else
|
|
i32.const 0
|
|
end
|
|
)
|
|
(func $~lib/allocator/arena/__memory_free (; 6 ;) (type $iv) (param $0 i32)
|
|
nop
|
|
)
|
|
(func $~lib/allocator/arena/__memory_reset (; 7 ;) (type $v)
|
|
global.get $~lib/allocator/arena/startOffset
|
|
global.set $~lib/allocator/arena/offset
|
|
)
|
|
(func $start (; 8 ;) (type $v)
|
|
(local $0 i32)
|
|
(local $1 i32)
|
|
(local $2 i32)
|
|
global.get $HEAP_BASE
|
|
global.get $~lib/internal/allocator/AL_MASK
|
|
i32.add
|
|
global.get $~lib/internal/allocator/AL_MASK
|
|
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
|
|
block $~lib/memory/memory.allocate|inlined.0 (result i32)
|
|
global.get $std/allocator_arena/size
|
|
local.set $0
|
|
local.get $0
|
|
call $~lib/allocator/arena/__memory_allocate
|
|
br $~lib/memory/memory.allocate|inlined.0
|
|
end
|
|
global.set $std/allocator_arena/ptr1
|
|
block $~lib/memory/memory.allocate|inlined.1 (result i32)
|
|
global.get $std/allocator_arena/size
|
|
local.set $0
|
|
local.get $0
|
|
call $~lib/allocator/arena/__memory_allocate
|
|
br $~lib/memory/memory.allocate|inlined.1
|
|
end
|
|
global.set $std/allocator_arena/ptr2
|
|
global.get $std/allocator_arena/ptr1
|
|
global.get $std/allocator_arena/ptr2
|
|
i32.ne
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 7
|
|
i32.const 0
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
block $~lib/memory/memory.fill|inlined.0
|
|
global.get $std/allocator_arena/ptr1
|
|
local.set $0
|
|
i32.const 18
|
|
local.set $1
|
|
global.get $std/allocator_arena/size
|
|
local.set $2
|
|
local.get $0
|
|
local.get $1
|
|
local.get $2
|
|
call $~lib/internal/memory/memset
|
|
end
|
|
block $break|0
|
|
i32.const 0
|
|
global.set $std/allocator_arena/i
|
|
loop $repeat|0
|
|
global.get $std/allocator_arena/i
|
|
global.get $std/allocator_arena/size
|
|
i32.lt_u
|
|
i32.eqz
|
|
br_if $break|0
|
|
global.get $std/allocator_arena/ptr1
|
|
global.get $std/allocator_arena/i
|
|
i32.add
|
|
i32.load8_u
|
|
i32.const 18
|
|
i32.eq
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 12
|
|
i32.const 27
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
global.get $std/allocator_arena/i
|
|
i32.const 1
|
|
i32.add
|
|
global.set $std/allocator_arena/i
|
|
br $repeat|0
|
|
unreachable
|
|
end
|
|
unreachable
|
|
end
|
|
block $~lib/memory/memory.copy|inlined.0
|
|
global.get $std/allocator_arena/ptr2
|
|
local.set $2
|
|
global.get $std/allocator_arena/ptr1
|
|
local.set $1
|
|
global.get $std/allocator_arena/size
|
|
local.set $0
|
|
local.get $2
|
|
local.get $1
|
|
local.get $0
|
|
call $~lib/internal/memory/memmove
|
|
end
|
|
block $break|1
|
|
i32.const 0
|
|
global.set $std/allocator_arena/i
|
|
loop $repeat|1
|
|
global.get $std/allocator_arena/i
|
|
global.get $std/allocator_arena/size
|
|
i32.lt_u
|
|
i32.eqz
|
|
br_if $break|1
|
|
global.get $std/allocator_arena/ptr2
|
|
global.get $std/allocator_arena/i
|
|
i32.add
|
|
i32.load8_u
|
|
i32.const 18
|
|
i32.eq
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 16
|
|
i32.const 27
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
global.get $std/allocator_arena/i
|
|
i32.const 1
|
|
i32.add
|
|
global.set $std/allocator_arena/i
|
|
br $repeat|1
|
|
unreachable
|
|
end
|
|
unreachable
|
|
end
|
|
block $~lib/memory/memory.compare|inlined.0 (result i32)
|
|
global.get $std/allocator_arena/ptr1
|
|
local.set $0
|
|
global.get $std/allocator_arena/ptr2
|
|
local.set $1
|
|
global.get $std/allocator_arena/size
|
|
local.set $2
|
|
local.get $0
|
|
local.get $1
|
|
local.get $2
|
|
call $~lib/internal/memory/memcmp
|
|
end
|
|
i32.const 0
|
|
i32.eq
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 18
|
|
i32.const 0
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
block $~lib/memory/memory.free|inlined.0
|
|
global.get $std/allocator_arena/ptr1
|
|
local.set $2
|
|
local.get $2
|
|
call $~lib/allocator/arena/__memory_free
|
|
br $~lib/memory/memory.free|inlined.0
|
|
end
|
|
block $~lib/memory/memory.free|inlined.1
|
|
global.get $std/allocator_arena/ptr2
|
|
local.set $2
|
|
local.get $2
|
|
call $~lib/allocator/arena/__memory_free
|
|
br $~lib/memory/memory.free|inlined.1
|
|
end
|
|
block $~lib/memory/memory.reset|inlined.0
|
|
call $~lib/allocator/arena/__memory_reset
|
|
br $~lib/memory/memory.reset|inlined.0
|
|
end
|
|
block $~lib/memory/memory.allocate|inlined.2 (result i32)
|
|
global.get $std/allocator_arena/size
|
|
local.set $2
|
|
local.get $2
|
|
call $~lib/allocator/arena/__memory_allocate
|
|
br $~lib/memory/memory.allocate|inlined.2
|
|
end
|
|
global.set $std/allocator_arena/ptr1
|
|
global.get $std/allocator_arena/ptr1
|
|
global.get $HEAP_BASE
|
|
i32.const 7
|
|
i32.add
|
|
i32.const 7
|
|
i32.const -1
|
|
i32.xor
|
|
i32.and
|
|
i32.eq
|
|
i32.eqz
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 25
|
|
i32.const 0
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
)
|
|
(func $null (; 9 ;) (type $v)
|
|
)
|
|
)
|