2018-01-14 02:30:20 +01:00
|
|
|
(module
|
2019-03-01 00:01:23 +01:00
|
|
|
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
|
|
|
|
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
|
|
|
(type $FUNCSIG$v (func))
|
2019-06-05 23:15:39 +02:00
|
|
|
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
|
2018-01-14 02:30:20 +01:00
|
|
|
(memory $0 1)
|
2019-06-05 23:15:39 +02:00
|
|
|
(data (i32.const 8) "\14\00\00\00\01\00\00\00\01\00\00\00\14\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s")
|
2018-10-11 08:49:08 +02:00
|
|
|
(global $memmove/dest (mut i32) (i32.const 0))
|
2018-01-14 02:30:20 +01:00
|
|
|
(export "memory" (memory $0))
|
|
|
|
(start $start)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $memmove/memmove (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
2018-01-14 02:30:20 +01:00
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
2018-06-09 14:05:33 +02:00
|
|
|
(local $5 i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.set $3
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.eq
|
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $3
|
2018-11-08 08:04:24 +01:00
|
|
|
return
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.lt_u
|
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 7
|
|
|
|
i32.and
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 7
|
|
|
|
i32.and
|
|
|
|
i32.eq
|
|
|
|
if
|
|
|
|
loop $continue|0
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 7
|
|
|
|
i32.and
|
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
if
|
2019-06-11 12:52:16 +02:00
|
|
|
local.get $2
|
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
|
|
|
local.set $2
|
|
|
|
local.get $0
|
|
|
|
local.tee $4
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.set $0
|
|
|
|
local.get $1
|
|
|
|
local.tee $5
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.set $1
|
|
|
|
local.get $4
|
|
|
|
local.get $5
|
|
|
|
i32.load8_u
|
|
|
|
i32.store8
|
|
|
|
br $continue|0
|
|
|
|
else
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $3
|
2018-11-08 08:04:24 +01:00
|
|
|
return
|
|
|
|
end
|
2019-06-11 12:52:16 +02:00
|
|
|
unreachable
|
2018-11-08 08:04:24 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
loop $continue|1
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 8
|
2019-06-11 12:52:16 +02:00
|
|
|
i32.lt_u
|
|
|
|
i32.eqz
|
2018-11-08 08:04:24 +01:00
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i64.load
|
|
|
|
i64.store
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 8
|
|
|
|
i32.sub
|
2019-02-05 17:12:10 +01:00
|
|
|
local.set $2
|
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 8
|
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
local.set $0
|
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 8
|
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
local.set $1
|
2018-11-08 08:04:24 +01:00
|
|
|
br $continue|1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
loop $continue|2
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.tee $4
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
local.set $0
|
|
|
|
local.get $1
|
|
|
|
local.tee $5
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
local.set $1
|
|
|
|
local.get $4
|
|
|
|
local.get $5
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.load8_u
|
|
|
|
i32.store8
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
2019-02-05 17:12:10 +01:00
|
|
|
local.set $2
|
2018-11-08 08:04:24 +01:00
|
|
|
br $continue|2
|
|
|
|
end
|
|
|
|
end
|
|
|
|
else
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 7
|
|
|
|
i32.and
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 7
|
|
|
|
i32.and
|
|
|
|
i32.eq
|
|
|
|
if
|
|
|
|
loop $continue|3
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.add
|
|
|
|
i32.const 7
|
|
|
|
i32.and
|
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
if
|
2019-06-11 12:52:16 +02:00
|
|
|
local.get $2
|
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
|
|
|
local.tee $2
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
local.get $1
|
|
|
|
local.get $2
|
|
|
|
i32.add
|
|
|
|
i32.load8_u
|
|
|
|
i32.store8
|
|
|
|
br $continue|3
|
|
|
|
else
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $3
|
2018-11-08 08:04:24 +01:00
|
|
|
return
|
|
|
|
end
|
2019-06-11 12:52:16 +02:00
|
|
|
unreachable
|
2018-11-08 08:04:24 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
loop $continue|4
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 8
|
2019-06-11 12:52:16 +02:00
|
|
|
i32.lt_u
|
|
|
|
i32.eqz
|
2018-11-08 08:04:24 +01:00
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 8
|
|
|
|
i32.sub
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $2
|
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.add
|
|
|
|
i64.load
|
|
|
|
i64.store
|
|
|
|
br $continue|4
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
loop $continue|5
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $2
|
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.add
|
|
|
|
i32.load8_u
|
|
|
|
i32.store8
|
|
|
|
br $continue|5
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $3
|
2018-01-14 02:30:20 +01:00
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $start:memmove (; 2 ;) (type $FUNCSIG$v)
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 8
|
|
|
|
i64.const 1229782938247303441
|
|
|
|
i64.store
|
|
|
|
i32.const 16
|
|
|
|
i64.const 2459565876494606882
|
|
|
|
i64.store
|
|
|
|
i32.const 24
|
|
|
|
i64.const 3689348814741910323
|
|
|
|
i64.store
|
|
|
|
i32.const 32
|
|
|
|
i64.const 4919131752989213764
|
|
|
|
i64.store
|
|
|
|
i32.const 9
|
|
|
|
i32.const 24
|
|
|
|
i32.const 4
|
|
|
|
call $memmove/memmove
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $memmove/dest
|
|
|
|
global.get $memmove/dest
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 9
|
|
|
|
i32.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 55
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 8
|
|
|
|
i64.load
|
|
|
|
i64.const 1229783084848853777
|
|
|
|
i64.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 56
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 8
|
|
|
|
i32.const 8
|
|
|
|
i32.const 32
|
|
|
|
call $memmove/memmove
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $memmove/dest
|
|
|
|
global.get $memmove/dest
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 8
|
|
|
|
i32.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 59
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 8
|
|
|
|
i64.load
|
|
|
|
i64.const 1229783084848853777
|
|
|
|
i64.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 60
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 16
|
|
|
|
i64.load
|
|
|
|
i64.const 2459565876494606882
|
|
|
|
i64.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 61
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 24
|
|
|
|
i64.load
|
|
|
|
i64.const 3689348814741910323
|
|
|
|
i64.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 62
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 32
|
|
|
|
i64.load
|
|
|
|
i64.const 4919131752989213764
|
|
|
|
i64.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 63
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 13
|
|
|
|
i32.const 36
|
|
|
|
i32.const 3
|
|
|
|
call $memmove/memmove
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $memmove/dest
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 8
|
|
|
|
i64.load
|
|
|
|
i64.const 4919131679688438545
|
|
|
|
i64.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 66
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 16
|
|
|
|
i32.const 24
|
|
|
|
i32.const 15
|
|
|
|
call $memmove/memmove
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $memmove/dest
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 8
|
|
|
|
i64.load
|
|
|
|
i64.const 4919131679688438545
|
|
|
|
i64.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 69
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 16
|
|
|
|
i64.load
|
|
|
|
i64.const 3689348814741910323
|
|
|
|
i64.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 70
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 24
|
|
|
|
i64.load
|
|
|
|
i64.const 3694152654344438852
|
|
|
|
i64.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 71
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 32
|
|
|
|
i64.load
|
|
|
|
i64.const 4919131752989213764
|
|
|
|
i64.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 72
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
2018-01-14 02:30:20 +01:00
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $start (; 3 ;) (type $FUNCSIG$v)
|
2019-02-21 00:11:22 +01:00
|
|
|
call $start:memmove
|
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $null (; 4 ;) (type $FUNCSIG$v)
|
2018-11-08 08:04:24 +01:00
|
|
|
nop
|
2018-09-17 01:48:35 +02:00
|
|
|
)
|
2018-01-14 02:30:20 +01:00
|
|
|
)
|