4192 lines
68 KiB
Plaintext
Raw Normal View History

(module
(type $F (func (result f64)))
2018-04-23 15:04:04 +02:00
(type $v (func))
(type $iii (func (param i32 i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $ii (func (param i32) (result i32)))
(type $iFFFFFFFi (func (param i32 f64 f64 f64 f64 f64 f64 f64) (result i32)))
(type $iiiv (func (param i32 i32 i32)))
(type $iFv (func (param i32 f64)))
(type $iF (func (param i32) (result f64)))
2018-04-23 15:04:04 +02:00
(type $iv (func (param i32)))
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
(global $assembly/index/system (mut i32) (i32.const 0))
2018-04-23 15:04:04 +02:00
(global $~argc (mut i32) (i32.const 0))
(global $HEAP_BASE i32 (i32.const 36))
2018-04-23 15:04:04 +02:00
(global $i64toi32_i32$HIGH_BITS (mut i32) (i32.const 0))
(memory $0 1)
(data (i32.const 4) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s")
2018-04-23 15:04:04 +02:00
(export "init" (func $assembly/index/init))
(export "getBody" (func $assembly/index/getBody))
(export "step" (func $assembly/index/step))
(export "bench" (func $assembly/index/bench))
(export "memory" (memory $0))
(start $start)
(func $~lib/allocator/arena/allocate_memory (; 1 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
2018-04-23 15:04:04 +02:00
(local $wasm2asm_i32$0 i32)
(local $wasm2asm_i32$1 i32)
(local $wasm2asm_i32$2 i32)
(if
(get_local $0)
(block
(if
(i32.gt_u
(get_local $0)
(i32.const 1073741824)
)
(unreachable)
)
2018-04-23 15:04:04 +02:00
(block
(set_local $1
(get_global $~lib/allocator/arena/offset)
)
(set_local $2
(i32.and
(i32.add
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $1)
(get_local $0)
)
2018-04-23 15:04:04 +02:00
(i32.const 7)
)
2018-04-23 15:04:04 +02:00
(i32.const -8)
)
)
2018-04-23 15:04:04 +02:00
(set_local $0
(current_memory)
)
(if
2018-04-23 15:04:04 +02:00
(i32.gt_u
(get_local $2)
(i32.shl
(get_local $0)
(i32.const 16)
)
)
(block
(set_local $3
(i32.shr_u
(i32.and
(i32.add
(i32.sub
(get_local $2)
(get_local $1)
)
2018-04-23 15:04:04 +02:00
(i32.const 65535)
)
2018-04-23 15:04:04 +02:00
(i32.const -65536)
)
2018-04-23 15:04:04 +02:00
(i32.const 16)
)
)
2018-04-23 15:04:04 +02:00
(set_local $4
(get_local $3)
)
(if
(i32.lt_s
(grow_memory
(select
(get_local $0)
(get_local $4)
(i32.gt_s
(get_local $0)
(get_local $4)
)
)
)
(i32.const 0)
)
(if
(i32.lt_s
(grow_memory
(get_local $3)
)
(i32.const 0)
)
(unreachable)
)
)
)
)
)
(set_global $~lib/allocator/arena/offset
(get_local $2)
)
(return
(get_local $1)
)
)
)
2018-04-23 15:04:04 +02:00
(return
(i32.const 0)
)
)
(func $~lib/internal/arraybuffer/allocUnsafe (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
2018-04-23 15:04:04 +02:00
(block
(set_local $1
(get_local $0)
)
(set_local $1
(call $~lib/allocator/arena/allocate_memory
(i32.shl
(i32.const 1)
(i32.sub
(i32.const 32)
(i32.clz
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $1)
(i32.const 7)
)
)
)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store
(get_local $1)
(get_local $0)
)
)
(return
(get_local $1)
)
)
(func $~lib/array/Array<Body>#constructor (; 3 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
2018-04-23 15:04:04 +02:00
(local $3 i32)
(block
(if
(i32.gt_u
(get_local $1)
(i32.const 268435454)
)
(block
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 23)
(i32.const 39)
)
(unreachable)
)
)
2018-04-23 15:04:04 +02:00
(if
(get_local $0)
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(block
(block
(set_local $2
(call $~lib/allocator/arena/allocate_memory
(i32.const 8)
)
)
2018-04-23 15:04:04 +02:00
(i32.store
(get_local $2)
(i32.const 0)
)
(i32.store offset=4
(get_local $2)
(i32.const 0)
)
(set_local $0
(get_local $2)
)
)
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store
(get_local $3)
(call $~lib/internal/arraybuffer/allocUnsafe
(i32.shl
(get_local $1)
(i32.const 2)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store offset=4
(get_local $0)
(get_local $1)
)
)
2018-04-23 15:04:04 +02:00
(return
(get_local $0)
)
)
(func $assembly/index/Body#constructor (; 4 ;) (type $iFFFFFFFi) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32)
(local $8 i32)
2018-04-23 15:04:04 +02:00
(local $9 i32)
(if
(get_local $0)
2018-04-23 15:04:04 +02:00
(set_local $9
(get_local $0)
)
(block
(block
(set_local $8
(call $~lib/allocator/arena/allocate_memory
(i32.const 56)
)
)
2018-04-23 15:04:04 +02:00
(f64.store
(get_local $8)
(get_local $1)
)
(f64.store offset=8
(get_local $8)
(get_local $2)
)
(f64.store offset=16
(get_local $8)
(get_local $3)
)
(f64.store offset=24
(get_local $8)
(get_local $4)
)
(f64.store offset=32
(get_local $8)
(get_local $5)
)
(f64.store offset=40
(get_local $8)
(get_local $6)
)
(f64.store offset=48
(get_local $8)
(get_local $7)
)
)
2018-04-23 15:04:04 +02:00
(set_local $9
(get_local $8)
)
)
)
2018-04-23 15:04:04 +02:00
(return
(get_local $9)
)
)
(func $~lib/memory/set_memory (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
2018-04-23 15:04:04 +02:00
(local $i64toi32_i32$3 i32)
(local $i64toi32_i32$2 i32)
(local $4 i32)
2018-04-23 15:04:04 +02:00
(local $i64toi32_i32$5 i32)
(local $3 i32)
(local $3$hi i32)
(local $i64toi32_i32$1 i32)
(local $i64toi32_i32$4 i32)
(local $11 i32)
(local $i64toi32_i32$0 i32)
(local $wasm2asm_i32$0 i32)
(local $wasm2asm_i32$1 i32)
(if
(i32.eqz
(get_local $2)
)
(return)
)
(i32.store8
(get_local $0)
(get_local $1)
)
(i32.store8
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(i32.const 1)
)
(get_local $1)
)
(if
(i32.le_u
(get_local $2)
(i32.const 2)
)
(return)
)
(i32.store8
(i32.add
(get_local $0)
(i32.const 1)
)
(get_local $1)
)
(i32.store8
(i32.add
(get_local $0)
(i32.const 2)
)
(get_local $1)
)
(i32.store8
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(i32.const 2)
)
(get_local $1)
)
(i32.store8
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(i32.const 3)
)
(get_local $1)
)
(if
(i32.le_u
(get_local $2)
(i32.const 6)
)
(return)
)
(i32.store8
(i32.add
(get_local $0)
(i32.const 3)
)
(get_local $1)
)
(i32.store8
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(i32.const 4)
)
(get_local $1)
)
(if
(i32.le_u
(get_local $2)
(i32.const 8)
)
(return)
)
2018-04-23 15:04:04 +02:00
(set_local $4
(i32.and
(i32.sub
(i32.const 0)
(get_local $0)
)
2018-04-23 15:04:04 +02:00
(i32.const 3)
)
2018-04-23 15:04:04 +02:00
)
(set_local $0
(i32.add
(get_local $0)
(get_local $4)
)
)
(set_local $1
(i32.mul
(get_local $1)
(i32.const 16843009)
)
)
(i32.store
(get_local $0)
(get_local $1)
)
(set_local $2
(i32.and
(i32.sub
(get_local $2)
(get_local $4)
)
2018-04-23 15:04:04 +02:00
(i32.const -4)
)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
2018-04-23 15:04:04 +02:00
(get_local $2)
)
(i32.const 4)
)
(get_local $1)
)
(if
(i32.le_u
(get_local $2)
(i32.const 8)
)
(return)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 4)
)
(get_local $1)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 8)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(i32.const 12)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(i32.const 8)
)
(get_local $1)
)
(if
(i32.le_u
(get_local $2)
(i32.const 24)
)
(return)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 12)
)
(get_local $1)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 16)
)
(get_local $1)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 20)
)
(get_local $1)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 24)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(i32.const 28)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(i32.const 24)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(i32.const 20)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(i32.const 16)
)
(get_local $1)
)
2018-04-23 15:04:04 +02:00
(set_local $4
(i32.add
(i32.and
(get_local $0)
(i32.const 4)
)
(i32.const 24)
)
)
(set_local $0
(i32.add
(get_local $0)
2018-04-23 15:04:04 +02:00
(get_local $4)
)
)
(set_local $2
(i32.sub
(get_local $2)
(get_local $4)
)
)
2018-04-23 15:04:04 +02:00
(block
(block
(set_local $i64toi32_i32$0
(i32.const 0)
)
(set_local $i64toi32_i32$3
(get_local $1)
)
2018-04-23 15:04:04 +02:00
(block
(set_local $i64toi32_i32$1
(i32.const 0)
)
(set_local $i64toi32_i32$3
(get_local $1)
)
2018-04-23 15:04:04 +02:00
(set_local $i64toi32_i32$2
(i32.const 0)
)
2018-04-23 15:04:04 +02:00
(set_local $i64toi32_i32$4
(i32.const 32)
)
(set_local $i64toi32_i32$5
(i32.and
(get_local $i64toi32_i32$4)
(i32.const 31)
)
)
2018-04-23 15:04:04 +02:00
(if
(i32.le_u
(i32.const 32)
(i32.and
(get_local $i64toi32_i32$4)
(i32.const 63)
)
)
(block
(set_local $i64toi32_i32$2
(i32.shl
(get_local $i64toi32_i32$3)
(get_local $i64toi32_i32$5)
)
)
(set_local $11
(i32.const 0)
)
)
(block
(set_local $i64toi32_i32$2
(i32.or
(i32.and
(i32.sub
(i32.shl
(i32.const 1)
(get_local $i64toi32_i32$5)
)
(i32.const 1)
)
(i32.shr_u
(get_local $i64toi32_i32$3)
(i32.sub
(i32.const 32)
(get_local $i64toi32_i32$5)
)
)
)
(i32.shl
(get_local $i64toi32_i32$1)
(get_local $i64toi32_i32$5)
)
)
)
(set_local $11
(i32.shl
(get_local $i64toi32_i32$3)
(get_local $i64toi32_i32$5)
)
)
)
)
2018-04-23 15:04:04 +02:00
)
(set_local $i64toi32_i32$1
(get_local $11)
)
(set_local $i64toi32_i32$2
(i32.or
(get_local $i64toi32_i32$0)
(get_local $i64toi32_i32$2)
)
)
)
(set_local $3
(i32.or
(get_local $i64toi32_i32$3)
(get_local $i64toi32_i32$1)
)
)
(set_local $3$hi
(get_local $i64toi32_i32$2)
)
)
(loop $continue|0
(if
(i32.ge_u
(get_local $2)
(i32.const 32)
)
(block
(block
(set_local $i64toi32_i32$3
(get_local $0)
)
2018-04-23 15:04:04 +02:00
(set_local $i64toi32_i32$2
(get_local $3$hi)
)
(i32.store
(get_local $i64toi32_i32$3)
(get_local $3)
)
(i32.store offset=4 align=1
(get_local $i64toi32_i32$3)
(get_local $i64toi32_i32$2)
)
)
(block
(set_local $i64toi32_i32$3
(i32.add
(get_local $0)
(i32.const 8)
)
)
(set_local $i64toi32_i32$2
(get_local $3$hi)
)
(i32.store
(get_local $i64toi32_i32$3)
(get_local $3)
)
(i32.store offset=4 align=1
(get_local $i64toi32_i32$3)
(get_local $i64toi32_i32$2)
)
)
(block
(set_local $i64toi32_i32$3
(i32.add
(get_local $0)
(i32.const 16)
)
)
(set_local $i64toi32_i32$2
(get_local $3$hi)
)
(i32.store
(get_local $i64toi32_i32$3)
(get_local $3)
)
(i32.store offset=4 align=1
(get_local $i64toi32_i32$3)
(get_local $i64toi32_i32$2)
)
)
(block
(set_local $i64toi32_i32$3
(i32.add
(get_local $0)
(i32.const 24)
)
)
(set_local $i64toi32_i32$2
(get_local $3$hi)
)
(i32.store
(get_local $i64toi32_i32$3)
(get_local $3)
)
(i32.store offset=4 align=1
(get_local $i64toi32_i32$3)
(get_local $i64toi32_i32$2)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 32)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 32)
)
)
(br $continue|0)
)
)
)
)
(func $~lib/memory/copy_memory (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
2018-04-23 15:04:04 +02:00
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
(local $11 i32)
(local $12 i32)
(local $13 i32)
(local $14 i32)
(local $15 i32)
(local $16 i32)
(local $17 i32)
(local $18 i32)
(local $19 i32)
(local $20 i32)
(local $21 i32)
(local $22 i32)
(local $23 i32)
(local $24 i32)
(local $25 i32)
(local $26 i32)
(local $27 i32)
(local $28 i32)
(local $29 i32)
(local $30 i32)
(local $31 i32)
(local $32 i32)
(local $33 i32)
(local $34 i32)
(local $35 i32)
(local $36 i32)
(local $37 i32)
(local $38 i32)
(local $39 i32)
(local $40 i32)
(local $41 i32)
(local $42 i32)
(local $43 i32)
(local $44 i32)
(loop $continue|0
(if
2018-04-23 15:04:04 +02:00
(get_local $2)
(set_local $5
(i32.and
(get_local $1)
(i32.const 3)
)
2018-04-23 15:04:04 +02:00
)
(set_local $5
(get_local $2)
)
2018-04-23 15:04:04 +02:00
)
(if
(get_local $5)
(block
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $6
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $6)
(i32.load8_u
(get_local $3)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(br $continue|0)
)
)
)
(if
(i32.eqz
(i32.and
(get_local $0)
(i32.const 3)
)
)
(block
(loop $continue|1
(if
(i32.ge_u
(get_local $2)
(i32.const 16)
)
(block
(i32.store
(get_local $0)
(i32.load
(get_local $1)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 4)
)
(i32.load
(i32.add
(get_local $1)
(i32.const 4)
)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 8)
)
(i32.load
(i32.add
(get_local $1)
(i32.const 8)
)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 12)
)
(i32.load
(i32.add
(get_local $1)
(i32.const 12)
)
)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 16)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 16)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 16)
)
)
(br $continue|1)
)
)
)
(if
(i32.and
(get_local $2)
(i32.const 8)
)
(block
(i32.store
(get_local $0)
(i32.load
(get_local $1)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 4)
)
(i32.load
(i32.add
(get_local $1)
(i32.const 4)
)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 8)
)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 8)
)
)
)
)
(if
(i32.and
(get_local $2)
(i32.const 4)
)
(block
(i32.store
(get_local $0)
(i32.load
(get_local $1)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 4)
)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 4)
)
)
)
)
(if
(i32.and
(get_local $2)
(i32.const 2)
)
(block
(i32.store16
(get_local $0)
(i32.load16_u
(get_local $1)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 2)
)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 2)
)
)
)
)
(if
(i32.and
(get_local $2)
(i32.const 1)
)
(block
(set_local $3
(get_local $0)
)
2018-04-23 15:04:04 +02:00
(set_local $7
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(set_local $3
(get_local $1)
)
(i32.store8
(get_local $7)
(i32.load8_u
(get_local $3)
)
)
)
)
(return)
)
)
(if
(i32.ge_u
(get_local $2)
(i32.const 32)
)
(block $break|2
(block $case2|2
(block $case1|2
(block $case0|2
(block $tablify|0
(br_table $case0|2 $case1|2 $case2|2 $tablify|0
(i32.sub
(i32.and
(get_local $0)
(i32.const 3)
)
(i32.const 1)
)
)
)
(br $break|2)
)
(set_local $4
(i32.load
(get_local $1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $8
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $8)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $9
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $9)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $10
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $10)
(i32.load8_u
(get_local $3)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 3)
)
)
(loop $continue|3
(if
(i32.ge_u
(get_local $2)
(i32.const 17)
)
(block
2018-04-23 15:04:04 +02:00
(set_local $3
(i32.load
(i32.add
(get_local $1)
(i32.const 1)
)
)
)
(i32.store
(get_local $0)
(i32.or
(i32.shr_u
(get_local $4)
(i32.const 24)
)
(i32.shl
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 8)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $4
(i32.load
(i32.add
(get_local $1)
(i32.const 5)
)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 4)
)
(i32.or
(i32.shr_u
(get_local $3)
(i32.const 24)
)
(i32.shl
2018-04-23 15:04:04 +02:00
(get_local $4)
(i32.const 8)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $3
(i32.load
(i32.add
(get_local $1)
(i32.const 9)
)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 8)
)
(i32.or
(i32.shr_u
(get_local $4)
(i32.const 24)
)
(i32.shl
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 8)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $4
(i32.load
(i32.add
(get_local $1)
(i32.const 13)
)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 12)
)
(i32.or
(i32.shr_u
(get_local $3)
(i32.const 24)
)
(i32.shl
2018-04-23 15:04:04 +02:00
(get_local $4)
(i32.const 8)
)
)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 16)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 16)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 16)
)
)
(br $continue|3)
)
)
)
(br $break|2)
)
(set_local $4
(i32.load
(get_local $1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $11
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $11)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $12
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $12)
(i32.load8_u
(get_local $3)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 2)
)
)
(loop $continue|4
(if
(i32.ge_u
(get_local $2)
(i32.const 18)
)
(block
2018-04-23 15:04:04 +02:00
(set_local $3
(i32.load
(i32.add
(get_local $1)
(i32.const 2)
)
)
)
(i32.store
(get_local $0)
(i32.or
(i32.shr_u
(get_local $4)
(i32.const 16)
)
(i32.shl
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 16)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $4
(i32.load
(i32.add
(get_local $1)
(i32.const 6)
)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 4)
)
(i32.or
(i32.shr_u
(get_local $3)
(i32.const 16)
)
(i32.shl
2018-04-23 15:04:04 +02:00
(get_local $4)
(i32.const 16)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $3
(i32.load
(i32.add
(get_local $1)
(i32.const 10)
)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 8)
)
(i32.or
(i32.shr_u
(get_local $4)
(i32.const 16)
)
(i32.shl
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 16)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $4
(i32.load
(i32.add
(get_local $1)
(i32.const 14)
)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 12)
)
(i32.or
(i32.shr_u
(get_local $3)
(i32.const 16)
)
(i32.shl
2018-04-23 15:04:04 +02:00
(get_local $4)
(i32.const 16)
)
)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 16)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 16)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 16)
)
)
(br $continue|4)
)
)
)
(br $break|2)
)
(set_local $4
(i32.load
(get_local $1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $13
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $13)
(i32.load8_u
(get_local $3)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(loop $continue|5
(if
(i32.ge_u
(get_local $2)
(i32.const 19)
)
(block
2018-04-23 15:04:04 +02:00
(set_local $3
(i32.load
(i32.add
(get_local $1)
(i32.const 3)
)
)
)
(i32.store
(get_local $0)
(i32.or
(i32.shr_u
(get_local $4)
(i32.const 8)
)
(i32.shl
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 24)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $4
(i32.load
(i32.add
(get_local $1)
(i32.const 7)
)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 4)
)
(i32.or
(i32.shr_u
(get_local $3)
(i32.const 8)
)
(i32.shl
2018-04-23 15:04:04 +02:00
(get_local $4)
(i32.const 24)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $3
(i32.load
(i32.add
(get_local $1)
(i32.const 11)
)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 8)
)
(i32.or
(i32.shr_u
(get_local $4)
(i32.const 8)
)
(i32.shl
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 24)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $4
(i32.load
(i32.add
(get_local $1)
(i32.const 15)
)
)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 12)
)
(i32.or
(i32.shr_u
(get_local $3)
(i32.const 8)
)
(i32.shl
2018-04-23 15:04:04 +02:00
(get_local $4)
(i32.const 24)
)
)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 16)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 16)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 16)
)
)
(br $continue|5)
)
)
)
)
)
(if
(i32.and
(get_local $2)
(i32.const 16)
)
(block
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $14
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $14)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $15
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $15)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $16
(get_local $3)
)
2018-04-23 15:04:04 +02:00
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
(i32.const 1)
)
)
)
(i32.store8
2018-04-23 15:04:04 +02:00
(get_local $16)
(i32.load8_u
(get_local $3)
)
)
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $17
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $17)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $18
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $18)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $19
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $19)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $20
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $20)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $21
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $21)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $22
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $22)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $23
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $23)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $24
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $24)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $25
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $25)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $26
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $26)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $27
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $27)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $28
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
(i32.const 1)
)
2018-04-23 15:04:04 +02:00
)
)
(i32.store8
(get_local $28)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
(get_local $3)
(i32.const 1)
)
)
(set_local $29
(get_local $3)
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $29)
(i32.load8_u
(get_local $3)
)
)
)
)
(if
(i32.and
(get_local $2)
(i32.const 8)
)
(block
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $30
(get_local $3)
)
2018-04-23 15:04:04 +02:00
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
(i32.const 1)
)
)
)
(i32.store8
2018-04-23 15:04:04 +02:00
(get_local $30)
(i32.load8_u
(get_local $3)
)
)
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $31
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $31)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $32
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $32)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $33
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $33)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $34
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $34)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $35
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $35)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $36
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
(i32.const 1)
)
2018-04-23 15:04:04 +02:00
)
)
(i32.store8
(get_local $36)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
(get_local $3)
(i32.const 1)
)
)
(set_local $37
(get_local $3)
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $37)
(i32.load8_u
(get_local $3)
)
)
)
)
(if
(i32.and
(get_local $2)
(i32.const 4)
)
(block
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $38
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $38)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $39
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $39)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $40
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $40)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $41
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $41)
(i32.load8_u
(get_local $3)
)
)
)
)
(if
(i32.and
(get_local $2)
(i32.const 2)
)
(block
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $42
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $42)
(i32.load8_u
(get_local $3)
)
)
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $43
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $43)
(i32.load8_u
(get_local $3)
)
)
)
)
(if
(i32.and
(get_local $2)
(i32.const 1)
)
(block
(set_local $3
(get_local $0)
)
2018-04-23 15:04:04 +02:00
(set_local $44
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(set_local $3
(get_local $1)
)
(i32.store8
(get_local $44)
(i32.load8_u
(get_local $3)
)
)
)
)
)
(func $~lib/memory/move_memory (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
2018-04-23 15:04:04 +02:00
(local $i64toi32_i32$1 i32)
(local $i64toi32_i32$0 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
(local $wasm2asm_i32$0 i32)
(local $wasm2asm_i32$1 i32)
(if
(i32.eq
(get_local $0)
(get_local $1)
)
(return)
)
2018-04-23 15:04:04 +02:00
(block
(block
(set_local $3
(i32.le_u
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $1)
(get_local $2)
)
2018-04-23 15:04:04 +02:00
(get_local $0)
)
)
(if
(get_local $3)
(set_local $6
(get_local $3)
)
(set_local $6
(i32.le_u
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $1)
)
)
)
)
2018-04-23 15:04:04 +02:00
(if
(i32.and
(get_local $6)
(i32.const 1)
)
(block
(call $~lib/memory/copy_memory
(get_local $0)
(get_local $1)
(get_local $2)
)
(return)
)
)
)
(if
(i32.lt_u
(get_local $0)
(get_local $1)
)
(block
(if
(i32.eq
(i32.and
(get_local $1)
(i32.const 7)
)
(i32.and
(get_local $0)
(i32.const 7)
)
)
(block
(loop $continue|0
(if
(i32.and
(get_local $0)
(i32.const 7)
)
(block
(if
(i32.eqz
(get_local $2)
)
(return)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $7
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $7)
(i32.load8_u
(get_local $3)
)
)
(br $continue|0)
)
)
)
(loop $continue|1
(if
(i32.ge_u
(get_local $2)
(i32.const 8)
)
(block
2018-04-23 15:04:04 +02:00
(block
(set_local $i64toi32_i32$1
(get_local $0)
)
(set_local $8
(get_local $i64toi32_i32$1)
)
(block
(set_local $i64toi32_i32$1
(get_local $1)
)
(set_local $i64toi32_i32$0
(i32.load offset=4 align=1
(get_local $i64toi32_i32$1)
)
)
)
(i32.store
(get_local $8)
(i32.load
(get_local $i64toi32_i32$1)
)
)
(i32.store offset=4 align=1
(get_local $i64toi32_i32$1)
(get_local $i64toi32_i32$0)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 8)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 8)
)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 8)
)
)
(br $continue|1)
)
)
)
)
)
(loop $continue|2
(if
(get_local $2)
(block
2018-04-23 15:04:04 +02:00
(set_local $3
(get_local $0)
)
(set_local $0
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $3)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(set_local $9
(get_local $3)
2018-04-23 15:04:04 +02:00
)
(block
(set_local $3
(get_local $1)
)
(set_local $1
(i32.add
(get_local $3)
2018-04-23 15:04:04 +02:00
(i32.const 1)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store8
(get_local $9)
(i32.load8_u
(get_local $3)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(br $continue|2)
)
)
)
)
(block
(if
(i32.eq
(i32.and
(get_local $1)
(i32.const 7)
)
(i32.and
(get_local $0)
(i32.const 7)
)
)
(block
(loop $continue|3
(if
(i32.and
(i32.add
(get_local $0)
(get_local $2)
)
(i32.const 7)
)
(block
(if
(i32.eqz
(get_local $2)
)
(return)
)
2018-04-23 15:04:04 +02:00
(set_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(i32.store8
(i32.add
(get_local $0)
2018-04-23 15:04:04 +02:00
(get_local $2)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
)
(br $continue|3)
)
)
)
(loop $continue|4
(if
(i32.ge_u
(get_local $2)
(i32.const 8)
)
(block
2018-04-23 15:04:04 +02:00
(block
(set_local $2
(i32.sub
(get_local $2)
(i32.const 8)
)
)
2018-04-23 15:04:04 +02:00
(set_local $i64toi32_i32$1
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $0)
(get_local $2)
)
)
2018-04-23 15:04:04 +02:00
(set_local $10
(get_local $i64toi32_i32$1)
)
(block
(set_local $i64toi32_i32$1
(i32.add
(get_local $1)
(get_local $2)
)
)
(set_local $i64toi32_i32$0
(i32.load offset=4 align=1
(get_local $i64toi32_i32$1)
)
)
)
(i32.store
(get_local $10)
(i32.load
(get_local $i64toi32_i32$1)
)
)
(i32.store offset=4 align=1
(get_local $i64toi32_i32$1)
(get_local $i64toi32_i32$0)
)
)
(br $continue|4)
)
)
)
)
)
(loop $continue|5
(if
(get_local $2)
(block
2018-04-23 15:04:04 +02:00
(set_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(i32.store8
(i32.add
(get_local $0)
2018-04-23 15:04:04 +02:00
(get_local $2)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
)
(br $continue|5)
)
)
)
)
)
)
(func $~lib/internal/arraybuffer/reallocUnsafe (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
2018-04-23 15:04:04 +02:00
(block
(set_local $2
(i32.load
(get_local $0)
)
)
(if
2018-04-23 15:04:04 +02:00
(i32.gt_s
(get_local $1)
2018-04-23 15:04:04 +02:00
(get_local $2)
)
(block
(set_local $3
(get_local $2)
)
(if
(i32.le_s
(get_local $1)
(i32.sub
2018-04-23 15:04:04 +02:00
(i32.shl
(i32.const 1)
(i32.sub
(i32.const 32)
(i32.clz
(i32.add
(get_local $3)
(i32.const 7)
)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.const 8)
)
)
2018-04-23 15:04:04 +02:00
(block
(i32.store
(get_local $0)
2018-04-23 15:04:04 +02:00
(get_local $1)
)
(call $~lib/memory/set_memory
(i32.add
(i32.add
(get_local $0)
(i32.const 8)
)
(get_local $2)
)
(i32.const 0)
(i32.sub
(get_local $1)
(get_local $2)
)
)
)
2018-04-23 15:04:04 +02:00
(block
(set_local $3
(call $~lib/internal/arraybuffer/allocUnsafe
(get_local $1)
)
)
2018-04-23 15:04:04 +02:00
(call $~lib/memory/move_memory
(i32.add
(get_local $3)
(i32.const 8)
)
(i32.add
(get_local $0)
(i32.const 8)
)
(get_local $2)
)
(call $~lib/memory/set_memory
(i32.add
(i32.add
(get_local $3)
(i32.const 8)
)
(get_local $2)
)
(i32.const 0)
(i32.sub
(get_local $1)
(get_local $2)
)
)
(return
(get_local $3)
)
)
)
)
2018-04-23 15:04:04 +02:00
(if
(i32.lt_s
(get_local $1)
(get_local $2)
)
(i32.store
(get_local $0)
(get_local $1)
)
)
)
)
2018-04-23 15:04:04 +02:00
(return
(get_local $0)
)
)
(func $~lib/array/Array<Body>#push (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
2018-04-23 15:04:04 +02:00
(local $4 i32)
(local $2 i32)
(local $3 i32)
2018-04-23 15:04:04 +02:00
(block
(set_local $2
(i32.load offset=4
(get_local $0)
)
)
2018-04-23 15:04:04 +02:00
(set_local $3
(i32.add
(get_local $2)
(i32.const 1)
)
)
(block
2018-04-23 15:04:04 +02:00
(set_local $4
(i32.load
(get_local $0)
)
)
(if
(i32.ge_u
(get_local $2)
2018-04-23 15:04:04 +02:00
(i32.shr_u
(i32.load
(get_local $4)
)
(i32.const 2)
)
)
(block
2018-04-23 15:04:04 +02:00
(if
(i32.ge_u
(get_local $2)
(i32.const 268435454)
)
(block
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 128)
(i32.const 42)
)
(unreachable)
)
)
2018-04-23 15:04:04 +02:00
(set_local $4
(call $~lib/internal/arraybuffer/reallocUnsafe
(get_local $4)
(i32.shl
(get_local $3)
(i32.const 2)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store
(get_local $0)
(get_local $4)
)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store offset=4
(get_local $0)
(get_local $3)
)
(i32.store offset=8
(i32.add
(get_local $4)
(i32.shl
(get_local $2)
(i32.const 2)
)
)
2018-04-23 15:04:04 +02:00
(get_local $1)
)
)
2018-04-23 15:04:04 +02:00
(return
(get_local $3)
)
)
(func $~lib/array/Array<Body>#__get (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
2018-04-23 15:04:04 +02:00
(block
(set_local $2
(i32.load
(get_local $0)
)
)
(if
(i32.ge_u
(get_local $1)
(i32.shr_u
(i32.load
(get_local $2)
)
2018-04-23 15:04:04 +02:00
(i32.const 2)
)
)
2018-04-23 15:04:04 +02:00
(block
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 64)
(i32.const 37)
)
(unreachable)
)
)
)
2018-04-23 15:04:04 +02:00
(return
(i32.load offset=8
(i32.add
(get_local $2)
(i32.shl
(get_local $1)
(i32.const 2)
)
)
)
)
)
(func $assembly/index/NBodySystem#constructor (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $3 i32)
2018-04-23 15:04:04 +02:00
(local $2 i32)
(local $4 f64)
(local $5 f64)
(local $6 f64)
(local $7 f64)
(local $8 i32)
2018-04-23 15:04:04 +02:00
(local $8 i32)
(block
(set_local $3
(get_local $1)
)
2018-04-23 15:04:04 +02:00
(set_local $8
(i32.load offset=4
(get_local $3)
)
2018-04-23 15:04:04 +02:00
)
(loop $continue|0
(if
(i32.lt_s
(get_local $2)
(get_local $8)
)
(block
(set_local $3
(call $~lib/array/Array<Body>#__get
(get_local $1)
(get_local $2)
)
)
2018-04-23 15:04:04 +02:00
(set_local $4
(f64.load offset=48
(get_local $3)
)
)
(set_local $5
(f64.add
(get_local $5)
(f64.mul
(f64.load offset=24
(get_local $3)
)
(get_local $4)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $6
(f64.add
(get_local $6)
(f64.mul
(f64.load offset=32
(get_local $3)
)
(get_local $4)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $7
(f64.add
(get_local $7)
(f64.mul
(f64.load offset=40
(get_local $3)
)
(get_local $4)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(br $continue|0)
)
)
)
2018-04-23 15:04:04 +02:00
(if
(get_local $0)
2018-04-23 15:04:04 +02:00
(set_local $8
(get_local $0)
)
(block
(block
(set_local $2
(call $~lib/allocator/arena/allocate_memory
(i32.const 4)
)
)
2018-04-23 15:04:04 +02:00
(i32.store
(get_local $2)
(i32.const 0)
)
(set_local $0
(get_local $2)
)
)
2018-04-23 15:04:04 +02:00
(set_local $8
(get_local $0)
)
)
)
2018-04-23 15:04:04 +02:00
(i32.store
(get_local $8)
(get_local $1)
)
(set_local $1
(call $~lib/array/Array<Body>#__get
(i32.load
(get_local $0)
)
(i32.const 0)
)
)
2018-04-23 15:04:04 +02:00
(f64.store offset=24
(get_local $1)
(f64.div
(f64.neg
(get_local $5)
)
(f64.const 39.47841760435743)
)
)
(f64.store offset=32
(get_local $1)
(f64.div
(f64.neg
(get_local $6)
)
(f64.const 39.47841760435743)
)
)
(f64.store offset=40
(get_local $1)
(f64.div
(f64.neg
(get_local $7)
)
(f64.const 39.47841760435743)
)
)
)
2018-04-23 15:04:04 +02:00
(return
(get_local $0)
)
)
(func $assembly/index/init (; 12 ;) (type $v)
(local $0 i32)
(block
(set_global $~argc
(i32.const 0)
)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(get_global $~argc)
)
)
(unreachable)
)
)
(set_local $0
(call $~lib/array/Array<Body>#constructor
(i32.const 0)
(i32.const 0)
)
)
)
2018-04-23 15:04:04 +02:00
(drop
(call $~lib/array/Array<Body>#push
(get_local $0)
(call $assembly/index/Body#constructor
(i32.const 0)
(f64.const 0)
(f64.const 0)
(f64.const 0)
(f64.const 0)
(f64.const 0)
(f64.const 0)
(f64.const 39.47841760435743)
)
)
)
2018-04-23 15:04:04 +02:00
(drop
(call $~lib/array/Array<Body>#push
(get_local $0)
(call $assembly/index/Body#constructor
(i32.const 0)
(f64.const 4.841431442464721)
(f64.const -1.1603200440274284)
(f64.const -0.10362204447112311)
(f64.const 0.606326392995832)
(f64.const 2.81198684491626)
(f64.const -0.02521836165988763)
(f64.const 0.03769367487038949)
)
)
)
(drop
(call $~lib/array/Array<Body>#push
(get_local $0)
(call $assembly/index/Body#constructor
(i32.const 0)
(f64.const 8.34336671824458)
(f64.const 4.124798564124305)
(f64.const -0.4035234171143214)
(f64.const -1.0107743461787924)
(f64.const 1.8256623712304119)
(f64.const 0.008415761376584154)
(f64.const 0.011286326131968767)
)
)
)
(drop
(call $~lib/array/Array<Body>#push
(get_local $0)
(call $assembly/index/Body#constructor
(i32.const 0)
(f64.const 12.894369562139131)
(f64.const -15.111151401698631)
(f64.const -0.22330757889265573)
(f64.const 1.0827910064415354)
(f64.const 0.8687130181696082)
(f64.const -0.010832637401363636)
(f64.const 1.7237240570597112e-03)
)
)
)
(drop
(call $~lib/array/Array<Body>#push
(get_local $0)
(call $assembly/index/Body#constructor
(i32.const 0)
(f64.const 15.379697114850917)
(f64.const -25.919314609987964)
(f64.const 0.17925877295037118)
(f64.const 0.979090732243898)
(f64.const 0.5946989986476762)
(f64.const -0.034755955504078104)
(f64.const 2.0336868699246304e-03)
)
)
)
(set_global $assembly/index/system
(call $assembly/index/NBodySystem#constructor
(i32.const 0)
(get_local $0)
)
)
)
2018-04-23 15:04:04 +02:00
(func $assembly/index/getBody (; 13 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(block
(set_local $1
(i32.load
(get_global $assembly/index/system)
)
)
2018-04-23 15:04:04 +02:00
(if
(i32.lt_u
(get_local $0)
(i32.load offset=4
(get_local $1)
)
)
(set_local $2
(call $~lib/array/Array<Body>#__get
(get_local $1)
(get_local $0)
)
)
(set_local $2
(i32.const 0)
)
)
2018-04-23 15:04:04 +02:00
)
(return
(get_local $2)
)
)
2018-04-23 15:04:04 +02:00
(func $assembly/index/NBodySystem#advance (; 14 ;) (type $iFv) (param $0 i32) (param $1 f64)
(local $2 i32)
(local $3 f64)
2018-04-23 15:04:04 +02:00
(local $4 f64)
(local $5 i32)
(local $6 f64)
(local $7 f64)
2018-04-23 15:04:04 +02:00
(local $8 f64)
(local $9 i32)
(local $10 f64)
(local $11 f64)
(local $12 f64)
(local $13 i32)
(local $14 i32)
(local $15 f64)
(local $16 f64)
(local $17 f64)
(local $18 f64)
2018-04-23 15:04:04 +02:00
(set_local $13
(i32.load
(get_local $0)
)
)
(set_local $0
(get_local $13)
)
(set_local $14
(i32.load offset=4
2018-04-23 15:04:04 +02:00
(get_local $0)
)
)
(loop $continue|0
(if
(i32.lt_s
2018-04-23 15:04:04 +02:00
(get_local $5)
(get_local $14)
)
(block
2018-04-23 15:04:04 +02:00
(set_local $0
(call $~lib/array/Array<Body>#__get
(get_local $13)
(get_local $5)
)
)
(set_local $15
(f64.load
2018-04-23 15:04:04 +02:00
(get_local $0)
)
)
(set_local $16
(f64.load offset=8
(get_local $0)
)
)
(set_local $17
(f64.load offset=16
(get_local $0)
)
)
2018-04-23 15:04:04 +02:00
(set_local $6
(f64.load offset=24
(get_local $0)
)
)
2018-04-23 15:04:04 +02:00
(set_local $7
(f64.load offset=32
(get_local $0)
)
)
2018-04-23 15:04:04 +02:00
(set_local $8
(f64.load offset=40
(get_local $0)
)
)
(set_local $18
(f64.load offset=48
(get_local $0)
)
)
2018-04-23 15:04:04 +02:00
(set_local $9
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $5)
(i32.const 1)
)
)
(loop $continue|1
(if
(i32.lt_s
2018-04-23 15:04:04 +02:00
(get_local $9)
(get_local $14)
)
(block
2018-04-23 15:04:04 +02:00
(set_local $2
(call $~lib/array/Array<Body>#__get
(get_local $13)
(get_local $9)
)
)
(set_local $10
(f64.sub
(get_local $15)
(f64.load
(get_local $2)
)
)
)
(set_local $11
(f64.sub
(get_local $16)
(f64.load offset=8
(get_local $2)
)
)
)
(set_local $12
(f64.sub
(get_local $17)
(f64.load offset=16
(get_local $2)
)
)
)
(set_local $3
2018-04-23 15:04:04 +02:00
(f64.add
(f64.add
(f64.mul
(get_local $10)
(get_local $10)
)
2018-04-23 15:04:04 +02:00
(f64.mul
(get_local $11)
(get_local $11)
)
)
(f64.mul
(get_local $12)
(get_local $12)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $4
(f64.sqrt
(get_local $3)
)
)
(set_local $3
(f64.div
(get_local $1)
(f64.mul
2018-04-23 15:04:04 +02:00
(get_local $3)
(get_local $4)
)
)
)
(set_local $4
(f64.mul
(get_local $18)
(get_local $3)
)
)
(set_local $3
(f64.mul
(f64.load offset=48
(get_local $2)
)
2018-04-23 15:04:04 +02:00
(get_local $3)
)
)
(set_local $6
(f64.sub
(get_local $6)
(f64.mul
2018-04-23 15:04:04 +02:00
(get_local $10)
(get_local $3)
)
)
)
(set_local $7
(f64.sub
(get_local $7)
2018-04-23 15:04:04 +02:00
(f64.mul
(get_local $11)
(get_local $3)
)
)
)
(set_local $8
(f64.sub
(get_local $8)
(f64.mul
(get_local $12)
2018-04-23 15:04:04 +02:00
(get_local $3)
)
)
)
(f64.store offset=24
(get_local $2)
(f64.add
(f64.load offset=24
(get_local $2)
)
(f64.mul
(get_local $10)
2018-04-23 15:04:04 +02:00
(get_local $4)
)
)
)
(f64.store offset=32
(get_local $2)
(f64.add
(f64.load offset=32
(get_local $2)
)
(f64.mul
(get_local $11)
2018-04-23 15:04:04 +02:00
(get_local $4)
)
)
)
(f64.store offset=40
(get_local $2)
(f64.add
(f64.load offset=40
(get_local $2)
)
(f64.mul
(get_local $12)
2018-04-23 15:04:04 +02:00
(get_local $4)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $9
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $9)
(i32.const 1)
)
)
(br $continue|1)
)
)
)
(f64.store offset=24
(get_local $0)
2018-04-23 15:04:04 +02:00
(get_local $6)
)
(f64.store offset=32
(get_local $0)
2018-04-23 15:04:04 +02:00
(get_local $7)
)
(f64.store offset=40
(get_local $0)
2018-04-23 15:04:04 +02:00
(get_local $8)
)
(f64.store
(get_local $0)
(f64.add
(f64.load
(get_local $0)
)
(f64.mul
(get_local $1)
2018-04-23 15:04:04 +02:00
(get_local $6)
)
)
)
(f64.store offset=8
(get_local $0)
(f64.add
(f64.load offset=8
(get_local $0)
)
(f64.mul
(get_local $1)
2018-04-23 15:04:04 +02:00
(get_local $7)
)
)
)
(f64.store offset=16
(get_local $0)
(f64.add
(f64.load offset=16
(get_local $0)
)
(f64.mul
(get_local $1)
2018-04-23 15:04:04 +02:00
(get_local $8)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $5
(i32.add
2018-04-23 15:04:04 +02:00
(get_local $5)
(i32.const 1)
)
)
(br $continue|0)
)
)
)
)
2018-04-23 15:04:04 +02:00
(func $assembly/index/NBodySystem#energy (; 15 ;) (type $iF) (param $0 i32) (result f64)
(local $1 f64)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
2018-04-23 15:04:04 +02:00
(local $10 f64)
(local $6 f64)
(local $7 f64)
(local $8 f64)
(local $9 f64)
2018-04-23 15:04:04 +02:00
(local $11 f64)
(local $12 f64)
(local $13 f64)
(local $14 f64)
(local $15 f64)
(block
(set_local $4
(i32.load
(get_local $0)
)
)
2018-04-23 15:04:04 +02:00
(set_local $0
(get_local $4)
)
(set_local $5
(i32.load offset=4
(get_local $0)
)
2018-04-23 15:04:04 +02:00
)
(loop $continue|0
(if
(i32.lt_s
(get_local $2)
(get_local $5)
)
(block
(set_local $0
(call $~lib/array/Array<Body>#__get
(get_local $4)
(get_local $2)
)
)
2018-04-23 15:04:04 +02:00
(set_local $7
(f64.load
(get_local $0)
)
)
2018-04-23 15:04:04 +02:00
(set_local $8
(f64.load offset=8
(get_local $0)
)
)
2018-04-23 15:04:04 +02:00
(set_local $9
(f64.load offset=16
(get_local $0)
)
)
(set_local $11
(get_local $1)
2018-04-23 15:04:04 +02:00
)
(set_local $10
(f64.load offset=48
(get_local $0)
)
)
(set_local $1
(f64.load offset=24
(get_local $0)
)
)
(set_local $12
(f64.mul
2018-04-23 15:04:04 +02:00
(get_local $1)
(get_local $1)
)
)
(set_local $1
(f64.load offset=32
(get_local $0)
)
)
(set_local $13
(f64.add
(get_local $12)
(f64.mul
2018-04-23 15:04:04 +02:00
(get_local $1)
(get_local $1)
)
2018-04-23 15:04:04 +02:00
)
)
(set_local $1
(f64.load offset=40
(get_local $0)
)
)
(set_local $1
(f64.add
(get_local $11)
(f64.mul
(f64.mul
(f64.const 0.5)
(get_local $10)
)
(f64.add
2018-04-23 15:04:04 +02:00
(get_local $13)
(f64.mul
(get_local $1)
(get_local $1)
)
)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $0
(i32.add
(get_local $2)
(i32.const 1)
)
2018-04-23 15:04:04 +02:00
)
(loop $continue|1
(if
(i32.lt_s
(get_local $0)
(get_local $5)
)
(block
(set_local $3
(call $~lib/array/Array<Body>#__get
(get_local $4)
(get_local $0)
)
)
(set_local $6
(f64.sub
(get_local $7)
(f64.load
(get_local $3)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $14
(get_local $1)
2018-04-23 15:04:04 +02:00
)
(set_local $1
(f64.sub
(get_local $8)
(f64.load offset=8
(get_local $3)
)
)
)
(set_local $15
(f64.add
(f64.mul
2018-04-23 15:04:04 +02:00
(get_local $6)
(get_local $6)
)
(f64.mul
(get_local $1)
(get_local $1)
)
)
)
(set_local $1
(f64.sub
(get_local $9)
(f64.load offset=16
(get_local $3)
)
2018-04-23 15:04:04 +02:00
)
)
(set_local $1
(f64.sub
(get_local $14)
(f64.div
(f64.mul
(get_local $10)
(f64.load offset=48
(get_local $3)
)
)
(f64.sqrt
(f64.add
2018-04-23 15:04:04 +02:00
(get_local $15)
(f64.mul
2018-04-23 15:04:04 +02:00
(get_local $1)
(get_local $1)
)
)
)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(br $continue|1)
)
)
)
2018-04-23 15:04:04 +02:00
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
2018-04-23 15:04:04 +02:00
(br $continue|0)
)
)
)
)
2018-04-23 15:04:04 +02:00
(return
(get_local $1)
)
)
2018-04-23 15:04:04 +02:00
(func $assembly/index/step (; 16 ;) (type $F) (result f64)
(call $assembly/index/NBodySystem#advance
(get_global $assembly/index/system)
(f64.const 0.01)
)
2018-04-23 15:04:04 +02:00
(return
(call $assembly/index/NBodySystem#energy
(get_global $assembly/index/system)
)
)
)
2018-04-23 15:04:04 +02:00
(func $assembly/index/bench (; 17 ;) (type $iv) (param $0 i32)
(local $1 i32)
(loop $continue|0
(if
2018-04-23 15:04:04 +02:00
(i32.lt_u
(get_local $1)
(get_local $0)
)
(block
(call $assembly/index/NBodySystem#advance
(get_global $assembly/index/system)
(f64.const 0.01)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 1)
)
)
(br $continue|0)
)
)
)
)
2018-04-23 15:04:04 +02:00
(func $start (; 18 ;) (type $v)
(set_global $~lib/allocator/arena/startOffset
(i32.and
(i32.add
(get_global $HEAP_BASE)
(i32.const 7)
)
(i32.const -8)
)
)
(set_global $~lib/allocator/arena/offset
(get_global $~lib/allocator/arena/startOffset)
)
2018-04-23 15:04:04 +02:00
)
(func $__wasm_ctz_i32 (; 19 ;) (param $x i32) (result i32)
(local $1 i32)
(if
(i32.eqz
(get_local $x)
)
(set_local $1
(i32.const 32)
)
(set_local $1
(i32.sub
(i32.const 31)
(i32.clz
(i32.xor
(get_local $x)
(i32.sub
(get_local $x)
(i32.const 1)
)
)
)
)
)
)
2018-04-23 15:04:04 +02:00
(return
(get_local $1)
)
2018-04-23 15:04:04 +02:00
)
(func $__wasm_popcnt_i32 (; 20 ;) (param $x i32) (result i32)
(local $count i32)
(local $2 i32)
(block
(set_local $count
(i32.const 0)
)
2018-04-23 15:04:04 +02:00
(block $b
(loop $l
(set_local $2
(get_local $count)
)
(br_if $b
(i32.eqz
(get_local $x)
)
)
(set_local $x
(i32.and
(get_local $x)
(i32.sub
(get_local $x)
(i32.const 1)
)
)
)
(set_local $count
(i32.add
(get_local $count)
(i32.const 1)
)
)
(br $l)
)
)
)
2018-04-23 15:04:04 +02:00
(return
(get_local $2)
)
2018-04-23 15:04:04 +02:00
)
(func $__wasm_rotl_i32 (; 21 ;) (param $x i32) (param $k i32) (result i32)
(return
(i32.or
(i32.shl
(i32.and
(i32.shr_u
(i32.const -1)
(i32.and
(get_local $k)
(i32.const 31)
)
)
(get_local $x)
)
(i32.and
(get_local $k)
(i32.const 31)
)
)
(i32.shr_u
(i32.and
(i32.shl
(i32.const -1)
(i32.sub
(i32.const 32)
(i32.and
(get_local $k)
(i32.const 31)
)
)
)
(get_local $x)
)
(i32.sub
(i32.const 32)
(i32.and
(get_local $k)
(i32.const 31)
)
)
)
)
)
2018-04-23 15:04:04 +02:00
)
(func $__wasm_rotr_i32 (; 22 ;) (param $x i32) (param $k i32) (result i32)
(return
(i32.or
(i32.shr_u
(i32.and
(i32.shl
(i32.const -1)
(i32.and
(get_local $k)
(i32.const 31)
)
)
(get_local $x)
)
(i32.and
(get_local $k)
(i32.const 31)
)
)
(i32.shl
(i32.and
(i32.shr_u
(i32.const -1)
(i32.sub
(i32.const 32)
(i32.and
(get_local $k)
(i32.const 31)
)
)
)
(get_local $x)
)
(i32.sub
(i32.const 32)
(i32.and
(get_local $k)
(i32.const 31)
)
)
)
)
)
)
)