2017-12-02 18:37:59 +01:00
|
|
|
(module
|
2019-02-07 15:26:26 +01:00
|
|
|
(type $iiii_ (func (param i32 i32 i32 i32)))
|
|
|
|
(type $_ (func))
|
2018-11-08 08:04:24 +01:00
|
|
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
2018-10-11 08:49:08 +02:00
|
|
|
(memory $0 1)
|
|
|
|
(data (i32.const 8) "\05\00\00\00d\00o\00.\00t\00s\00")
|
2019-02-05 17:12:10 +01:00
|
|
|
(table $0 1 funcref)
|
2018-10-11 08:49:08 +02:00
|
|
|
(elem (i32.const 0) $null)
|
2017-12-30 05:11:58 +01:00
|
|
|
(global $do/n (mut i32) (i32.const 10))
|
|
|
|
(global $do/m (mut i32) (i32.const 0))
|
|
|
|
(global $do/o (mut i32) (i32.const 0))
|
2019-02-21 00:11:22 +01:00
|
|
|
(global $~lib/memory/HEAP_BASE i32 (i32.const 24))
|
2017-12-02 18:37:59 +01:00
|
|
|
(export "memory" (memory $0))
|
2018-10-11 08:49:08 +02:00
|
|
|
(export "table" (table $0))
|
2017-12-30 05:11:58 +01:00
|
|
|
(start $start)
|
2019-02-21 00:11:22 +01:00
|
|
|
(func $start:do (; 1 ;) (type $_)
|
2017-12-30 05:11:58 +01:00
|
|
|
(local $0 i32)
|
2018-11-08 08:04:24 +01:00
|
|
|
block $break|0
|
|
|
|
loop $continue|0
|
|
|
|
block
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/n
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $do/n
|
|
|
|
global.get $do/m
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $do/m
|
2018-11-08 08:04:24 +01:00
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/n
|
2018-11-08 08:04:24 +01:00
|
|
|
br_if $continue|0
|
|
|
|
end
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/n
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 8
|
|
|
|
i32.const 7
|
|
|
|
i32.const 0
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/m
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 10
|
|
|
|
i32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 8
|
|
|
|
i32.const 8
|
|
|
|
i32.const 0
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 10
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $do/n
|
2018-11-08 08:04:24 +01:00
|
|
|
block $break|1
|
|
|
|
loop $continue|1
|
|
|
|
nop
|
|
|
|
block (result i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/n
|
|
|
|
local.tee $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $do/n
|
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
end
|
|
|
|
br_if $continue|1
|
|
|
|
end
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/n
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const -1
|
|
|
|
i32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 8
|
|
|
|
i32.const 12
|
|
|
|
i32.const 0
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
i32.const 10
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $do/n
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 0
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $do/m
|
2018-11-08 08:04:24 +01:00
|
|
|
block $break|2
|
|
|
|
loop $continue|2
|
|
|
|
block
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/n
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $do/n
|
|
|
|
global.get $do/m
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $do/m
|
2018-11-08 08:04:24 +01:00
|
|
|
block $break|3
|
|
|
|
loop $continue|3
|
|
|
|
block
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/n
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $do/n
|
|
|
|
global.get $do/o
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $do/o
|
2018-11-08 08:04:24 +01:00
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/n
|
2018-11-08 08:04:24 +01:00
|
|
|
br_if $continue|3
|
|
|
|
end
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/n
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 8
|
|
|
|
i32.const 24
|
|
|
|
i32.const 2
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/o
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 9
|
|
|
|
i32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 8
|
|
|
|
i32.const 25
|
|
|
|
i32.const 2
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/n
|
2018-11-08 08:04:24 +01:00
|
|
|
br_if $continue|2
|
|
|
|
end
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/n
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 8
|
|
|
|
i32.const 27
|
|
|
|
i32.const 0
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/m
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 8
|
|
|
|
i32.const 28
|
|
|
|
i32.const 0
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $do/o
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 9
|
|
|
|
i32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 8
|
|
|
|
i32.const 29
|
|
|
|
i32.const 0
|
|
|
|
call $~lib/env/abort
|
|
|
|
unreachable
|
|
|
|
end
|
2017-12-02 18:37:59 +01:00
|
|
|
)
|
2019-02-21 00:11:22 +01:00
|
|
|
(func $start (; 2 ;) (type $_)
|
|
|
|
call $start:do
|
|
|
|
)
|
|
|
|
(func $null (; 3 ;) (type $_)
|
2018-09-17 01:48:35 +02:00
|
|
|
)
|
2017-12-02 18:37:59 +01:00
|
|
|
)
|