2018-01-05 01:55:59 +01:00
|
|
|
(module
|
2018-02-04 07:51:40 +01:00
|
|
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
2018-01-05 01:55:59 +01:00
|
|
|
(type $v (func))
|
2018-05-21 18:48:29 +02:00
|
|
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
2018-01-05 01:55:59 +01:00
|
|
|
(global $comma/a (mut i32) (i32.const 0))
|
|
|
|
(global $comma/b (mut i32) (i32.const 0))
|
|
|
|
(memory $0 1)
|
2018-05-14 16:55:55 +02:00
|
|
|
(data (i32.const 8) "\08\00\00\00c\00o\00m\00m\00a\00.\00t\00s")
|
2018-01-05 01:55:59 +01:00
|
|
|
(export "memory" (memory $0))
|
|
|
|
(start $start)
|
2018-02-04 07:51:40 +01:00
|
|
|
(func $start (; 1 ;) (type $v)
|
2018-01-05 01:55:59 +01:00
|
|
|
(local $0 i32)
|
|
|
|
(set_global $comma/b
|
|
|
|
(block (result i32)
|
|
|
|
(set_global $comma/a
|
|
|
|
(i32.add
|
|
|
|
(tee_local $0
|
|
|
|
(get_global $comma/a)
|
|
|
|
)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $comma/a)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 4)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-05 01:55:59 +01:00
|
|
|
)
|
|
|
|
(if
|
|
|
|
(get_global $comma/b)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 5)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-05 01:55:59 +01:00
|
|
|
)
|
|
|
|
(set_global $comma/a
|
|
|
|
(i32.add
|
|
|
|
(get_global $comma/a)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $comma/b
|
|
|
|
(get_global $comma/a)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $comma/a)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 8)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-05 01:55:59 +01:00
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $comma/b)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 9)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-05 01:55:59 +01:00
|
|
|
)
|
|
|
|
(set_global $comma/a
|
|
|
|
(block (result i32)
|
|
|
|
(set_global $comma/b
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(get_global $comma/b)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $comma/b
|
|
|
|
(block (result i32)
|
|
|
|
(set_global $comma/a
|
|
|
|
(i32.add
|
|
|
|
(get_global $comma/a)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_global $comma/a)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $comma/a)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 14)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-05 01:55:59 +01:00
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $comma/b)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 15)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-05 01:55:59 +01:00
|
|
|
)
|
|
|
|
(set_global $comma/a
|
|
|
|
(block (result i32)
|
|
|
|
(set_global $comma/a
|
|
|
|
(i32.add
|
|
|
|
(get_global $comma/a)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $comma/b
|
|
|
|
(get_global $comma/a)
|
|
|
|
)
|
|
|
|
(get_global $comma/b)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $comma/a)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 18)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-05 01:55:59 +01:00
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $comma/b)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 19)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-05 01:55:59 +01:00
|
|
|
)
|
|
|
|
(set_local $0
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(loop $continue|0
|
|
|
|
(if
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.lt_s
|
2018-01-05 01:55:59 +01:00
|
|
|
(get_local $0)
|
|
|
|
(get_global $comma/a)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(set_global $comma/a
|
|
|
|
(i32.sub
|
|
|
|
(get_global $comma/a)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $0
|
|
|
|
(i32.add
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 22)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-05 01:55:59 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|