2018-04-19 17:32:23 +02:00
|
|
|
(module
|
2018-04-20 18:56:51 +02:00
|
|
|
(type $iiv (func (param i32 i32)))
|
2018-04-19 23:16:03 +02:00
|
|
|
(type $F (func (result f64)))
|
2018-04-19 17:32:23 +02:00
|
|
|
(type $v (func))
|
2018-04-22 23:13:02 +02:00
|
|
|
(type $iiFv (func (param i32 i32 f64)))
|
2018-10-11 08:49:08 +02:00
|
|
|
(import "env" "memory" (memory $0 0))
|
|
|
|
(table 1 anyfunc)
|
|
|
|
(elem (i32.const 0) $null)
|
2018-06-28 01:44:32 +02:00
|
|
|
(import "config" "BGR_ALIVE" (global $assembly/config/BGR_ALIVE i32))
|
|
|
|
(import "config" "BGR_DEAD" (global $assembly/config/BGR_DEAD i32))
|
|
|
|
(import "config" "BIT_ROT" (global $assembly/config/BIT_ROT i32))
|
2018-10-11 08:49:08 +02:00
|
|
|
(import "Math" "random" (func $~lib/bindings/Math/random (result f64)))
|
2018-04-19 17:32:23 +02:00
|
|
|
(global $assembly/index/w (mut i32) (i32.const 0))
|
|
|
|
(global $assembly/index/h (mut i32) (i32.const 0))
|
|
|
|
(global $assembly/index/s (mut i32) (i32.const 0))
|
2018-07-19 02:10:04 +02:00
|
|
|
(export "memory" (memory $0))
|
2018-10-11 08:49:08 +02:00
|
|
|
(export "table" (table $0))
|
2018-04-19 17:32:23 +02:00
|
|
|
(export "init" (func $assembly/index/init))
|
|
|
|
(export "step" (func $assembly/index/step))
|
2018-04-22 23:13:02 +02:00
|
|
|
(export "fill" (func $assembly/index/fill))
|
2018-10-11 08:49:08 +02:00
|
|
|
(func $assembly/index/init (; 1 ;) (; has Stack IR ;) (type $iiv) (param $0 i32) (param $1 i32)
|
2018-04-20 18:56:51 +02:00
|
|
|
(local $2 i32)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:29:2
|
2018-04-19 17:32:23 +02:00
|
|
|
(set_global $assembly/index/w
|
|
|
|
(get_local $0)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:30:2
|
2018-04-19 17:32:23 +02:00
|
|
|
(set_global $assembly/index/h
|
|
|
|
(get_local $1)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:31:2
|
2018-04-19 17:32:23 +02:00
|
|
|
(set_global $assembly/index/s
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:31:6
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.mul
|
|
|
|
(get_local $0)
|
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:34:2
|
2018-06-27 19:03:39 +02:00
|
|
|
(block $break|0
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:34:7
|
2018-06-27 19:03:39 +02:00
|
|
|
(set_local $0
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:34:15
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(loop $repeat|0
|
|
|
|
(br_if $break|0
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:34:18
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.ge_s
|
|
|
|
(get_local $0)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:34:22
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_global $assembly/index/h)
|
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-10-11 08:49:08 +02:00
|
|
|
;;@ assembly/index.ts:35:4
|
2018-06-27 19:03:39 +02:00
|
|
|
(block $break|1
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:35:9
|
2018-04-19 23:16:03 +02:00
|
|
|
(set_local $1
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:35:17
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(loop $repeat|1
|
|
|
|
(br_if $break|1
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:35:20
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.ge_s
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_local $1)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:35:24
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
)
|
|
|
|
(set_local $2
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:36:16
|
2018-06-27 19:03:39 +02:00
|
|
|
(if (result i32)
|
|
|
|
(f64.gt
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:36:21
|
2018-10-11 08:49:08 +02:00
|
|
|
(call $~lib/bindings/Math/random)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:36:32
|
2018-06-27 19:03:39 +02:00
|
|
|
(f64.const 0.1)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:36:38
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.and
|
2018-06-28 01:44:32 +02:00
|
|
|
(get_global $assembly/config/BGR_DEAD)
|
|
|
|
;;@ assembly/index.ts:36:49
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 16777215)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:36:62
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.or
|
2018-06-28 01:44:32 +02:00
|
|
|
(get_global $assembly/config/BGR_ALIVE)
|
|
|
|
;;@ assembly/index.ts:36:74
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const -16777216)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:2
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.store
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:13
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:14
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.add
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_global $assembly/index/s)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:18
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.mul
|
|
|
|
(get_local $0)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:22
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $1)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:32
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 2)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $2)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:35:27
|
2018-06-27 19:03:39 +02:00
|
|
|
(set_local $1
|
|
|
|
(i32.add
|
|
|
|
(get_local $1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(br $repeat|1)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:34:25
|
2018-06-27 19:03:39 +02:00
|
|
|
(set_local $0
|
|
|
|
(i32.add
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 1)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(br $repeat|0)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
|
|
|
)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-10-11 08:49:08 +02:00
|
|
|
(func $assembly/index/step (; 2 ;) (; has Stack IR ;) (type $v)
|
2018-04-19 17:32:23 +02:00
|
|
|
(local $0 i32)
|
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
(local $5 i32)
|
|
|
|
(local $6 i32)
|
|
|
|
(local $7 i32)
|
2018-06-27 19:03:39 +02:00
|
|
|
(set_local $6
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:43:12
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.sub
|
|
|
|
(get_global $assembly/index/h)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:43:16
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(set_local $7
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:44:12
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.sub
|
|
|
|
(get_global $assembly/index/w)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:44:16
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:48:2
|
2018-06-27 19:03:39 +02:00
|
|
|
(block $break|0
|
|
|
|
(loop $repeat|0
|
|
|
|
(br_if $break|0
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:48:18
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.ge_s
|
|
|
|
(get_local $0)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:48:22
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_global $assembly/index/h)
|
|
|
|
)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(set_local $4
|
|
|
|
(tee_local $2
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:49:14
|
2018-04-19 17:32:23 +02:00
|
|
|
(if (result i32)
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:49:29
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.sub
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:49:33
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $6)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
)
|
|
|
|
(set_local $5
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:50:14
|
2018-06-27 19:03:39 +02:00
|
|
|
(if (result i32)
|
|
|
|
(i32.eq
|
|
|
|
(get_local $0)
|
|
|
|
(get_local $6)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:50:25
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 0)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:50:29
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.add
|
|
|
|
(get_local $0)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:50:33
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 1)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:51:4
|
2018-06-27 19:03:39 +02:00
|
|
|
(block $break|1
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:51:9
|
2018-04-19 17:32:23 +02:00
|
|
|
(set_local $1
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:51:17
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(loop $repeat|1
|
|
|
|
(br_if $break|1
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:51:20
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.ge_s
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_local $1)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:51:24
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:57:6
|
2018-06-27 19:03:39 +02:00
|
|
|
(set_local $2
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:57:27
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.add
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:58:8
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.add
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.add
|
|
|
|
(i32.add
|
|
|
|
(i32.add
|
|
|
|
(i32.add
|
|
|
|
(i32.add
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.and
|
|
|
|
(i32.load
|
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
|
|
|
(i32.mul
|
|
|
|
(get_local $4)
|
|
|
|
(get_global $assembly/index/w)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(tee_local $2
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:52:16
|
2018-06-27 19:03:39 +02:00
|
|
|
(if (result i32)
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_local $1)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:52:31
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.sub
|
|
|
|
(get_local $1)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:52:35
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 1)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $7)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 2)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:58:25
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 1)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:58:30
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.and
|
|
|
|
(i32.load
|
|
|
|
(i32.shl
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.add
|
|
|
|
(i32.mul
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $4)
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $1)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 2)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:58:47
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:58:52
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.and
|
|
|
|
(i32.load
|
|
|
|
(i32.shl
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.add
|
|
|
|
(i32.mul
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $4)
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(tee_local $3
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:53:16
|
2018-06-27 19:03:39 +02:00
|
|
|
(if (result i32)
|
|
|
|
(i32.eq
|
|
|
|
(get_local $1)
|
|
|
|
(get_local $7)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:53:27
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 0)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:53:31
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.add
|
|
|
|
(get_local $1)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:53:35
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 2)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:58:69
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:59:8
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.and
|
|
|
|
(i32.load
|
|
|
|
(i32.shl
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.add
|
|
|
|
(i32.mul
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $0)
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-05-21 10:31:00 +02:00
|
|
|
(get_local $2)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 2)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:59:25
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:59:52
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.and
|
|
|
|
(i32.load
|
|
|
|
(i32.shl
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.add
|
|
|
|
(i32.mul
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $0)
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $3)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 2)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:59:69
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:60:8
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.and
|
|
|
|
(i32.load
|
|
|
|
(i32.shl
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.add
|
|
|
|
(i32.mul
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $5)
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $2)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 2)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:60:25
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:60:30
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.and
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.load
|
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
|
|
|
(i32.mul
|
|
|
|
(get_local $5)
|
|
|
|
(get_global $assembly/index/w)
|
2018-04-20 18:56:51 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $1)
|
2018-04-20 18:56:51 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 2)
|
2018-04-20 18:56:51 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:60:47
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:60:52
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.and
|
|
|
|
(i32.load
|
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
|
|
|
(i32.mul
|
|
|
|
(get_local $5)
|
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
|
|
|
(get_local $3)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-20 05:06:05 +02:00
|
|
|
(i32.const 2)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:60:69
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:64:6
|
2018-06-27 19:03:39 +02:00
|
|
|
(if
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:64:10
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.and
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:63:6
|
2018-06-27 19:03:39 +02:00
|
|
|
(tee_local $3
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:11:35
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.load
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:11:19
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:11:20
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.mul
|
|
|
|
(get_local $0)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:11:24
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_global $assembly/index/w)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $1)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:11:34
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:64:17
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:64:20
|
2018-06-27 19:03:39 +02:00
|
|
|
(if
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:66:12
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.eq
|
|
|
|
(i32.and
|
|
|
|
(get_local $2)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:66:30
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 14)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:66:41
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(i32.store
|
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
|
|
|
(i32.add
|
|
|
|
(get_global $assembly/index/s)
|
|
|
|
(i32.mul
|
|
|
|
(get_local $0)
|
|
|
|
(get_global $assembly/index/w)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $1)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(i32.or
|
|
|
|
(i32.shl
|
|
|
|
(select
|
|
|
|
(tee_local $2
|
|
|
|
(i32.sub
|
|
|
|
(i32.shr_u
|
|
|
|
(get_local $3)
|
|
|
|
(i32.const 24)
|
2018-04-20 05:06:05 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
(get_global $assembly/config/BIT_ROT)
|
2018-04-20 05:06:05 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 0)
|
|
|
|
(i32.gt_s
|
|
|
|
(get_local $2)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 24)
|
2018-04-20 05:06:05 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.and
|
|
|
|
(get_local $3)
|
|
|
|
(i32.const 16777215)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(i32.store
|
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
|
|
|
(i32.add
|
|
|
|
(get_global $assembly/index/s)
|
|
|
|
(i32.mul
|
|
|
|
(get_local $0)
|
|
|
|
(get_global $assembly/index/w)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:68:23
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.or
|
2018-06-28 01:44:32 +02:00
|
|
|
(get_global $assembly/config/BGR_DEAD)
|
|
|
|
;;@ assembly/index.ts:68:34
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const -16777216)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:69:13
|
2018-06-27 19:03:39 +02:00
|
|
|
(if
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:71:12
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.eq
|
|
|
|
(get_local $2)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:71:30
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 3)
|
|
|
|
)
|
|
|
|
(i32.store
|
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
|
|
|
(i32.add
|
|
|
|
(get_global $assembly/index/s)
|
|
|
|
(i32.mul
|
|
|
|
(get_local $0)
|
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $1)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:71:43
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.or
|
2018-06-28 01:44:32 +02:00
|
|
|
(get_global $assembly/config/BGR_ALIVE)
|
|
|
|
;;@ assembly/index.ts:71:55
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const -16777216)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:2
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.store
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:13
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:14
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.add
|
|
|
|
(get_global $assembly/index/s)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:18
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.mul
|
|
|
|
(get_local $0)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:22
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_global $assembly/index/w)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $1)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:32
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:24:12
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.or
|
|
|
|
(i32.shl
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:23:10
|
2018-06-27 19:03:39 +02:00
|
|
|
(select
|
|
|
|
(tee_local $2
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:23:19
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.sub
|
|
|
|
(i32.shr_u
|
|
|
|
(get_local $3)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:23:26
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 24)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:23:32
|
|
|
|
(get_global $assembly/config/BIT_ROT)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 0)
|
|
|
|
(i32.gt_s
|
|
|
|
(get_local $2)
|
|
|
|
(i32.const 0)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:24:18
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 24)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:24:24
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.and
|
|
|
|
(get_local $3)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:24:29
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 16777215)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:51:27
|
2018-06-27 19:03:39 +02:00
|
|
|
(set_local $1
|
|
|
|
(i32.add
|
|
|
|
(get_local $1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(br $repeat|1)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:48:25
|
2018-06-27 19:03:39 +02:00
|
|
|
(set_local $0
|
|
|
|
(i32.add
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $repeat|0)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-10-11 08:49:08 +02:00
|
|
|
(func $assembly/index/fill (; 3 ;) (; has Stack IR ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64)
|
2018-04-22 23:13:02 +02:00
|
|
|
(local $3 i32)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:81:2
|
2018-06-27 19:03:39 +02:00
|
|
|
(block $break|0
|
|
|
|
(loop $repeat|0
|
|
|
|
(br_if $break|0
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:81:19
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.ge_s
|
|
|
|
(get_local $3)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:81:24
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
2018-10-11 08:49:08 +02:00
|
|
|
;;@ assembly/index.ts:82:4
|
2018-06-27 19:03:39 +02:00
|
|
|
(if
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:82:8
|
2018-06-27 19:03:39 +02:00
|
|
|
(f64.lt
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:82:13
|
2018-10-11 08:49:08 +02:00
|
|
|
(call $~lib/bindings/Math/random)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $2)
|
|
|
|
)
|
|
|
|
(i32.store
|
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.add
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_global $assembly/index/s)
|
|
|
|
(i32.mul
|
|
|
|
(get_local $1)
|
|
|
|
(get_global $assembly/index/w)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $3)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 2)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:82:38
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.or
|
2018-06-28 01:44:32 +02:00
|
|
|
(get_global $assembly/config/BGR_ALIVE)
|
|
|
|
;;@ assembly/index.ts:82:50
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const -16777216)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:81:27
|
2018-06-27 19:03:39 +02:00
|
|
|
(set_local $3
|
|
|
|
(i32.add
|
|
|
|
(get_local $3)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $repeat|0)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:84:2
|
2018-06-27 19:03:39 +02:00
|
|
|
(block $break|1
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:84:7
|
2018-06-27 19:03:39 +02:00
|
|
|
(set_local $3
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:84:16
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(loop $repeat|1
|
|
|
|
(br_if $break|1
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:84:19
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.ge_s
|
|
|
|
(get_local $3)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:84:24
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_global $assembly/index/h)
|
|
|
|
)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
2018-10-11 08:49:08 +02:00
|
|
|
;;@ assembly/index.ts:85:4
|
2018-06-27 19:03:39 +02:00
|
|
|
(if
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:85:8
|
2018-06-27 19:03:39 +02:00
|
|
|
(f64.lt
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:85:13
|
2018-10-11 08:49:08 +02:00
|
|
|
(call $~lib/bindings/Math/random)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $2)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:2
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.store
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:13
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:14
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.add
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_global $assembly/index/s)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:18
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.mul
|
|
|
|
(get_local $3)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:22
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_global $assembly/index/w)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
|
|
|
)
|
2018-06-27 19:03:39 +02:00
|
|
|
(get_local $0)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:17:32
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const 2)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:85:38
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.or
|
2018-06-28 01:44:32 +02:00
|
|
|
(get_global $assembly/config/BGR_ALIVE)
|
|
|
|
;;@ assembly/index.ts:85:50
|
2018-06-27 19:03:39 +02:00
|
|
|
(i32.const -16777216)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-06-28 01:44:32 +02:00
|
|
|
;;@ assembly/index.ts:84:27
|
2018-06-27 19:03:39 +02:00
|
|
|
(set_local $3
|
|
|
|
(i32.add
|
|
|
|
(get_local $3)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $repeat|1)
|
2018-04-22 23:13:02 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-10-11 08:49:08 +02:00
|
|
|
(func $null (; 4 ;) (; has Stack IR ;) (type $v)
|
|
|
|
(nop)
|
|
|
|
)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|