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-04-25 22:39:51 +02:00
|
|
|
(import "env" "BGR_ALIVE" (global $assembly/index/BGR_ALIVE i32))
|
|
|
|
(import "env" "BGR_DEAD" (global $assembly/index/BGR_DEAD i32))
|
2018-04-22 23:13:02 +02:00
|
|
|
(import "env" "BIT_ROT" (global $assembly/index/BIT_ROT i32))
|
2018-04-19 23:16:03 +02:00
|
|
|
(import "JSMath" "random" (func $~lib/math/JSMath.random (result f64)))
|
2018-04-19 17:32:23 +02:00
|
|
|
(import "env" "memory" (memory $0 1))
|
|
|
|
(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))
|
|
|
|
(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-04-19 17:32:23 +02:00
|
|
|
(export "memory" (memory $0))
|
2018-04-20 18:56:51 +02:00
|
|
|
(func $assembly/index/init (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
|
|
|
(local $2 i32)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:33:2
|
2018-04-19 17:32:23 +02:00
|
|
|
(set_global $assembly/index/w
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:33:6
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_local $0)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:34:2
|
2018-04-19 17:32:23 +02:00
|
|
|
(set_global $assembly/index/h
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:34:6
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_local $1)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:35:2
|
2018-04-19 17:32:23 +02:00
|
|
|
(set_global $assembly/index/s
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:35:6
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.mul
|
|
|
|
(get_local $0)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:35:14
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:38:7
|
2018-04-19 23:16:03 +02:00
|
|
|
(set_local $0
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:38:15
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(loop $continue|0
|
|
|
|
(if
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:38:18
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.lt_s
|
|
|
|
(get_local $0)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:38:22
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_global $assembly/index/h)
|
|
|
|
)
|
|
|
|
(block
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:39:9
|
2018-04-19 23:16:03 +02:00
|
|
|
(set_local $1
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:39:17
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(loop $continue|1
|
|
|
|
(if
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:39:20
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.lt_s
|
|
|
|
(get_local $1)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:39:24
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
|
|
|
(block
|
2018-04-20 18:56:51 +02:00
|
|
|
(set_local $2
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:40:16
|
2018-04-19 23:16:03 +02:00
|
|
|
(if (result i32)
|
|
|
|
(f64.gt
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:40:21
|
2018-04-19 23:16:03 +02:00
|
|
|
(call $~lib/math/JSMath.random)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:40:32
|
2018-04-20 18:56:51 +02:00
|
|
|
(f64.const 0.1)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:40:38
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.and
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_global $assembly/index/BGR_DEAD)
|
|
|
|
;;@ assembly/index.ts:40:49
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.const 16777215)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:40:62
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.or
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_global $assembly/index/BGR_ALIVE)
|
|
|
|
;;@ assembly/index.ts:40:74
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.const -16777216)
|
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:2
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.store
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:13
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:14
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.add
|
|
|
|
(get_global $assembly/index/s)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:18
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.mul
|
|
|
|
(get_local $0)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:22
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:26
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_local $1)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:32
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:35
|
2018-04-20 18:56:51 +02:00
|
|
|
(get_local $2)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:39:27
|
2018-04-19 23:16:03 +02:00
|
|
|
(set_local $1
|
|
|
|
(i32.add
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:39:29
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_local $1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:38:25
|
2018-04-19 23:16:03 +02:00
|
|
|
(set_local $0
|
|
|
|
(i32.add
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:38:27
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_local $0)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
(func $assembly/index/step (; 2 ;) (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-04-19 23:16:03 +02:00
|
|
|
(local $8 i32)
|
2018-04-25 22:39:51 +02:00
|
|
|
(set_local $7
|
|
|
|
;;@ assembly/index.ts:47:12
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.sub
|
|
|
|
(get_global $assembly/index/h)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:47:16
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
(set_local $8
|
|
|
|
;;@ assembly/index.ts:48:12
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.sub
|
|
|
|
(get_global $assembly/index/w)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:48:16
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(loop $continue|0
|
|
|
|
(if
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:52:18
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.lt_s
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
|
|
|
;;@ assembly/index.ts:52:22
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/h)
|
|
|
|
)
|
|
|
|
(block
|
2018-04-25 22:39:51 +02:00
|
|
|
(set_local $4
|
|
|
|
;;@ assembly/index.ts:53:14
|
2018-04-19 17:32:23 +02:00
|
|
|
(if (result i32)
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
|
|
|
;;@ assembly/index.ts:53:29
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.sub
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
|
|
|
;;@ assembly/index.ts:53:33
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:53:23
|
|
|
|
(get_local $7)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
(set_local $5
|
|
|
|
;;@ assembly/index.ts:54:14
|
2018-04-19 17:32:23 +02:00
|
|
|
(if (result i32)
|
|
|
|
(i32.eq
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
|
|
|
;;@ assembly/index.ts:54:19
|
|
|
|
(get_local $7)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:54:25
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.const 0)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:54:29
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.add
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
|
|
|
;;@ assembly/index.ts:54:33
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:55:9
|
2018-04-19 17:32:23 +02:00
|
|
|
(set_local $1
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:55:17
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(loop $continue|1
|
|
|
|
(if
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:55:20
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.lt_s
|
|
|
|
(get_local $1)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:55:24
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
|
|
|
(block
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:61:6
|
|
|
|
(set_local $2
|
|
|
|
;;@ assembly/index.ts:61:27
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.add
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:62:8
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.add
|
|
|
|
(i32.add
|
|
|
|
(i32.add
|
|
|
|
(i32.add
|
|
|
|
(i32.add
|
|
|
|
(i32.add
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.and
|
|
|
|
(i32.load
|
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
|
|
|
(i32.mul
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $4)
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-20 18:56:51 +02:00
|
|
|
(tee_local $3
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:56:16
|
2018-04-19 23:16:03 +02:00
|
|
|
(if (result i32)
|
|
|
|
(get_local $1)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:56:31
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.sub
|
|
|
|
(get_local $1)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:56:35
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:56:25
|
|
|
|
(get_local $8)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(i32.const 2)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:62:25
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:62:30
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.and
|
|
|
|
(i32.load
|
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
|
|
|
(i32.mul
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $4)
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_local $1)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:62:47
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:62:52
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.and
|
|
|
|
(i32.load
|
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
|
|
|
(i32.mul
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $4)
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
(tee_local $2
|
|
|
|
;;@ assembly/index.ts:57:16
|
2018-04-19 23:16:03 +02:00
|
|
|
(if (result i32)
|
|
|
|
(i32.eq
|
|
|
|
(get_local $1)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:57:21
|
|
|
|
(get_local $8)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:57:27
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 0)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:57:31
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.add
|
|
|
|
(get_local $1)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:57:35
|
2018-04-19 23:16:03 +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-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:62:69
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:63: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-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-20 18:56:51 +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-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:63:25
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:63: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-04-19 23:16:03 +02:00
|
|
|
(get_local $0)
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-25 22:39:51 +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-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:63:69
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:64: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-04-25 22:39:51 +02:00
|
|
|
(get_local $5)
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-20 18:56:51 +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-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:64:25
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:64: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-04-25 22:39:51 +02:00
|
|
|
(get_local $5)
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-19 23:16:03 +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-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:64:47
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:64: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-04-25 22:39:51 +02:00
|
|
|
(get_local $5)
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-25 22:39:51 +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-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:64:69
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:68:6
|
2018-04-19 17:32:23 +02:00
|
|
|
(if
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:68:10
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.and
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:67:6
|
2018-04-20 18:56:51 +02:00
|
|
|
(tee_local $3
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:15:9
|
2018-04-20 18:56:51 +02:00
|
|
|
(i32.load
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:15:19
|
2018-04-20 18:56:51 +02:00
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:15:20
|
2018-04-20 18:56:51 +02:00
|
|
|
(i32.mul
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
|
|
|
;;@ assembly/index.ts:15:24
|
2018-04-20 18:56:51 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:15:28
|
2018-04-20 18:56:51 +02:00
|
|
|
(get_local $1)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:15:34
|
2018-04-20 18:56:51 +02:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:68:17
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 1)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:70:8
|
2018-04-19 23:16:03 +02:00
|
|
|
(if
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:70:12
|
2018-04-20 05:06:05 +02:00
|
|
|
(i32.eq
|
|
|
|
(i32.and
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:70:13
|
|
|
|
(get_local $2)
|
|
|
|
;;@ assembly/index.ts:70:30
|
2018-04-20 05:06:05 +02:00
|
|
|
(i32.const 14)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:70:41
|
2018-04-20 05:06:05 +02:00
|
|
|
(i32.const 2)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.store
|
|
|
|
(i32.shl
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.add
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.add
|
|
|
|
(get_global $assembly/index/s)
|
|
|
|
(i32.mul
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(i32.or
|
|
|
|
(i32.shl
|
2018-04-25 22:39:51 +02:00
|
|
|
(select
|
|
|
|
(tee_local $2
|
|
|
|
(i32.sub
|
|
|
|
(i32.shr_u
|
|
|
|
(get_local $3)
|
|
|
|
(i32.const 24)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_global $assembly/index/BIT_ROT)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
)
|
|
|
|
(i32.const 0)
|
|
|
|
(i32.gt_s
|
|
|
|
(get_local $2)
|
|
|
|
(i32.const 0)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 24)
|
|
|
|
)
|
|
|
|
(i32.and
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $3)
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 16777215)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-20 05:06:05 +02:00
|
|
|
(i32.store
|
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
|
|
|
(i32.add
|
|
|
|
(get_global $assembly/index/s)
|
|
|
|
(i32.mul
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
2018-04-20 05:06:05 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:72:23
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.or
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_global $assembly/index/BGR_DEAD)
|
|
|
|
;;@ assembly/index.ts:72:34
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.const -16777216)
|
|
|
|
)
|
2018-04-20 05:06:05 +02:00
|
|
|
)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:75:8
|
2018-04-19 17:32:23 +02:00
|
|
|
(if
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:75:12
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.eq
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $2)
|
|
|
|
;;@ assembly/index.ts:75:30
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.const 3)
|
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.store
|
|
|
|
(i32.shl
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.add
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.add
|
|
|
|
(get_global $assembly/index/s)
|
|
|
|
(i32.mul
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:75:43
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.or
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_global $assembly/index/BGR_ALIVE)
|
|
|
|
;;@ assembly/index.ts:75:55
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.const -16777216)
|
|
|
|
)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:2
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.store
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:13
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:14
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.add
|
|
|
|
(get_global $assembly/index/s)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:18
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.mul
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $0)
|
|
|
|
;;@ assembly/index.ts:21:22
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:26
|
2018-04-19 23:16:03 +02:00
|
|
|
(get_local $1)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:32
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:28:12
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.or
|
|
|
|
(i32.shl
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:27:10
|
|
|
|
(select
|
|
|
|
(tee_local $2
|
|
|
|
;;@ assembly/index.ts:27:19
|
|
|
|
(i32.sub
|
|
|
|
(i32.shr_u
|
|
|
|
;;@ assembly/index.ts:27:20
|
|
|
|
(get_local $3)
|
|
|
|
;;@ assembly/index.ts:27:26
|
|
|
|
(i32.const 24)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:27:32
|
|
|
|
(get_global $assembly/index/BIT_ROT)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
)
|
|
|
|
;;@ assembly/index.ts:27:41
|
|
|
|
(i32.const 0)
|
|
|
|
(i32.gt_s
|
|
|
|
(get_local $2)
|
|
|
|
(i32.const 0)
|
2018-04-19 23:16:03 +02:00
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:28:18
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 24)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:28:24
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.and
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:28:25
|
2018-04-20 05:06:05 +02:00
|
|
|
(get_local $3)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:28:29
|
2018-04-19 23:16:03 +02:00
|
|
|
(i32.const 16777215)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:55:27
|
2018-04-19 17:32:23 +02:00
|
|
|
(set_local $1
|
|
|
|
(i32.add
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:55:29
|
2018-04-19 17:32:23 +02:00
|
|
|
(get_local $1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:52:25
|
|
|
|
(set_local $0
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.add
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:52:27
|
|
|
|
(get_local $0)
|
2018-04-19 17:32:23 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-22 23:13:02 +02:00
|
|
|
(func $assembly/index/fill (; 3 ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64)
|
|
|
|
(local $3 i32)
|
|
|
|
(loop $continue|0
|
|
|
|
(if
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:85:19
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.lt_s
|
|
|
|
(get_local $3)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:85:24
|
2018-04-22 23:13:02 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
|
|
|
(block
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:86:4
|
2018-04-22 23:13:02 +02:00
|
|
|
(if
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:86:8
|
2018-04-22 23:13:02 +02:00
|
|
|
(f64.lt
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:86:13
|
2018-04-22 23:13:02 +02:00
|
|
|
(call $~lib/math/JSMath.random)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:86:24
|
2018-04-22 23:13:02 +02:00
|
|
|
(get_local $2)
|
|
|
|
)
|
|
|
|
(i32.store
|
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
|
|
|
(i32.add
|
|
|
|
(get_global $assembly/index/s)
|
|
|
|
(i32.mul
|
|
|
|
(get_local $1)
|
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $3)
|
|
|
|
)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:86:38
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.or
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_global $assembly/index/BGR_ALIVE)
|
|
|
|
;;@ assembly/index.ts:86:50
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.const -16777216)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:85:27
|
2018-04-22 23:13:02 +02:00
|
|
|
(set_local $3
|
|
|
|
(i32.add
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:85:29
|
2018-04-22 23:13:02 +02:00
|
|
|
(get_local $3)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:88:7
|
|
|
|
(set_local $1
|
|
|
|
;;@ assembly/index.ts:88:16
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(loop $continue|1
|
|
|
|
(if
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:88:19
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.lt_s
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $1)
|
|
|
|
;;@ assembly/index.ts:88:24
|
2018-04-22 23:13:02 +02:00
|
|
|
(get_global $assembly/index/h)
|
|
|
|
)
|
|
|
|
(block
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:89:4
|
2018-04-22 23:13:02 +02:00
|
|
|
(if
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:89:8
|
2018-04-22 23:13:02 +02:00
|
|
|
(f64.lt
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:89:13
|
2018-04-22 23:13:02 +02:00
|
|
|
(call $~lib/math/JSMath.random)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:89:24
|
2018-04-22 23:13:02 +02:00
|
|
|
(get_local $2)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:2
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.store
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:13
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.shl
|
|
|
|
(i32.add
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:14
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.add
|
|
|
|
(get_global $assembly/index/s)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:18
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.mul
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_local $1)
|
|
|
|
;;@ assembly/index.ts:21:22
|
2018-04-22 23:13:02 +02:00
|
|
|
(get_global $assembly/index/w)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:26
|
2018-04-22 23:13:02 +02:00
|
|
|
(get_local $0)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:21:32
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:89:38
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.or
|
2018-04-25 22:39:51 +02:00
|
|
|
(get_global $assembly/index/BGR_ALIVE)
|
|
|
|
;;@ assembly/index.ts:89:50
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.const -16777216)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:88:27
|
|
|
|
(set_local $1
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.add
|
2018-04-25 22:39:51 +02:00
|
|
|
;;@ assembly/index.ts:88:29
|
|
|
|
(get_local $1)
|
2018-04-22 23:13:02 +02:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-04-19 17:32:23 +02:00
|
|
|
)
|