2017-12-03 23:04:33 +01:00
|
|
|
(module
|
|
|
|
(type $v (func))
|
|
|
|
(global $builtins/i (mut i32) (i32.const 0))
|
|
|
|
(global $builtins/I (mut i64) (i64.const 0))
|
|
|
|
(global $builtins/f (mut f32) (f32.const 0))
|
|
|
|
(global $builtins/b (mut i32) (i32.const 0))
|
|
|
|
(global $builtins/F (mut f64) (f64.const 0))
|
|
|
|
(global $builtins/s (mut i32) (i32.const 0))
|
|
|
|
(memory $0 1)
|
|
|
|
(data (i32.const 4) "\08\00\00\00")
|
|
|
|
(export "memory" (memory $0))
|
|
|
|
(start $start)
|
|
|
|
(func $start (; 0 ;) (type $v)
|
2017-12-05 22:47:20 +01: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)
|
|
|
|
(local $8 i32)
|
|
|
|
(local $9 i32)
|
|
|
|
(local $10 i64)
|
|
|
|
(local $11 i64)
|
|
|
|
(local $12 i64)
|
|
|
|
(local $13 i64)
|
|
|
|
(local $14 i64)
|
|
|
|
(local $15 i64)
|
|
|
|
(local $16 f32)
|
|
|
|
(local $17 f32)
|
|
|
|
(local $18 f32)
|
|
|
|
(local $19 f32)
|
|
|
|
(local $20 f64)
|
|
|
|
(local $21 f64)
|
|
|
|
(local $22 f64)
|
|
|
|
(local $23 f64)
|
|
|
|
(local $24 f32)
|
|
|
|
(local $25 f64)
|
|
|
|
(local $26 f32)
|
|
|
|
(local $27 f32)
|
|
|
|
(local $28 f64)
|
|
|
|
(local $29 f64)
|
|
|
|
(local $30 f32)
|
|
|
|
(local $31 f64)
|
2017-12-03 23:04:33 +01:00
|
|
|
(drop
|
|
|
|
(i32.clz
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.ctz
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.popcnt
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.rotl
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.rotr
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
|
|
|
(tee_local $0
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
|
|
|
(i32.const 42)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $0)
|
|
|
|
(i32.lt_s
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(tee_local $1
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(tee_local $2
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(i32.gt_s
|
|
|
|
(get_local $1)
|
|
|
|
(get_local $2)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(tee_local $3
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(tee_local $4
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(i32.lt_s
|
|
|
|
(get_local $3)
|
|
|
|
(get_local $4)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.clz
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.ctz
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.popcnt
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.rotl
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.rotr
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(set_global $builtins/i
|
|
|
|
(select
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
|
|
|
(tee_local $5
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
|
|
|
(i32.const 42)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $5)
|
|
|
|
(i32.lt_s
|
|
|
|
(get_local $5)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eq
|
|
|
|
(get_global $builtins/i)
|
|
|
|
(i32.const 42)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(select
|
|
|
|
(tee_local $6
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(tee_local $7
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(i32.gt_s
|
|
|
|
(get_local $6)
|
|
|
|
(get_local $7)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eq
|
|
|
|
(get_global $builtins/i)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(select
|
|
|
|
(tee_local $8
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(tee_local $9
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(i32.lt_s
|
|
|
|
(get_local $8)
|
|
|
|
(get_local $9)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eq
|
|
|
|
(get_global $builtins/i)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
(drop
|
|
|
|
(i64.clz
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i64.ctz
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i64.popcnt
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i64.rotl
|
|
|
|
(i64.const 1)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i64.rotr
|
|
|
|
(i64.const 1)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(i64.sub
|
|
|
|
(i64.const 0)
|
|
|
|
(tee_local $10
|
|
|
|
(i64.sub
|
|
|
|
(i64.const 0)
|
|
|
|
(i64.const 42)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $10)
|
|
|
|
(i64.lt_s
|
|
|
|
(get_local $10)
|
|
|
|
(i64.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.clz
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.ctz
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.popcnt
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.rotl
|
|
|
|
(i64.const 1)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.rotr
|
|
|
|
(i64.const 1)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(set_global $builtins/I
|
|
|
|
(select
|
|
|
|
(i64.sub
|
|
|
|
(i64.const 0)
|
|
|
|
(tee_local $11
|
|
|
|
(i64.sub
|
|
|
|
(i64.const 0)
|
|
|
|
(i64.const 42)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $11)
|
|
|
|
(i64.lt_s
|
|
|
|
(get_local $11)
|
|
|
|
(i64.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i64.eq
|
|
|
|
(get_global $builtins/I)
|
|
|
|
(i64.const 42)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(select
|
|
|
|
(tee_local $12
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
(tee_local $13
|
|
|
|
(i64.const 2)
|
|
|
|
)
|
|
|
|
(i64.gt_s
|
|
|
|
(get_local $12)
|
|
|
|
(get_local $13)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i64.eq
|
|
|
|
(get_global $builtins/I)
|
|
|
|
(i64.const 2)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(select
|
|
|
|
(tee_local $14
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
(tee_local $15
|
|
|
|
(i64.const 2)
|
|
|
|
)
|
|
|
|
(i64.lt_s
|
|
|
|
(get_local $14)
|
|
|
|
(get_local $15)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eq
|
|
|
|
(get_global $builtins/i)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
(drop
|
|
|
|
(f32.const nan:0x400000)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.abs
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.ceil
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.copysign
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.floor
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.max
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.min
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.nearest
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.sqrt
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.trunc
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.ne
|
2017-12-05 22:47:20 +01:00
|
|
|
(tee_local $16
|
2017-12-03 23:04:33 +01:00
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(get_local $16)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(f32.ne
|
|
|
|
(f32.abs
|
2017-12-05 22:47:20 +01:00
|
|
|
(tee_local $17
|
2017-12-04 14:49:24 +01:00
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
(i32.const 0)
|
|
|
|
(f32.eq
|
2017-12-05 22:47:20 +01:00
|
|
|
(get_local $17)
|
|
|
|
(get_local $17)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.const nan:0x400000)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.abs
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.ceil
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.copysign
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.floor
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.max
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.min
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.nearest
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.sqrt
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.trunc
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/b
|
|
|
|
(f32.ne
|
2017-12-05 22:47:20 +01:00
|
|
|
(tee_local $18
|
2017-12-03 23:04:33 +01:00
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(get_local $18)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/b
|
|
|
|
(select
|
|
|
|
(f32.ne
|
|
|
|
(f32.abs
|
2017-12-05 22:47:20 +01:00
|
|
|
(tee_local $19
|
2017-12-04 14:49:24 +01:00
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
(i32.const 0)
|
|
|
|
(f32.eq
|
2017-12-05 22:47:20 +01:00
|
|
|
(get_local $19)
|
|
|
|
(get_local $19)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.abs
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.ceil
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.copysign
|
|
|
|
(f64.const 1.25)
|
|
|
|
(f64.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.floor
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.max
|
|
|
|
(f64.const 1.25)
|
|
|
|
(f64.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.min
|
|
|
|
(f64.const 1.25)
|
|
|
|
(f64.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.nearest
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.sqrt
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.trunc
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.ne
|
2017-12-05 22:47:20 +01:00
|
|
|
(tee_local $20
|
2017-12-03 23:04:33 +01:00
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(get_local $20)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(f64.ne
|
|
|
|
(f64.abs
|
2017-12-05 22:47:20 +01:00
|
|
|
(tee_local $21
|
2017-12-04 14:49:24 +01:00
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
(i32.const 0)
|
|
|
|
(f64.eq
|
2017-12-05 22:47:20 +01:00
|
|
|
(get_local $21)
|
|
|
|
(get_local $21)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.abs
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.ceil
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.copysign
|
|
|
|
(f64.const 1.25)
|
|
|
|
(f64.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.floor
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.max
|
|
|
|
(f64.const 1.25)
|
|
|
|
(f64.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.min
|
|
|
|
(f64.const 1.25)
|
|
|
|
(f64.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.nearest
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.sqrt
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.trunc
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/b
|
|
|
|
(f64.ne
|
2017-12-05 22:47:20 +01:00
|
|
|
(tee_local $22
|
2017-12-03 23:04:33 +01:00
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(get_local $22)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/b
|
|
|
|
(select
|
|
|
|
(f64.ne
|
|
|
|
(f64.abs
|
2017-12-05 22:47:20 +01:00
|
|
|
(tee_local $23
|
2017-12-04 14:49:24 +01:00
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
(i32.const 0)
|
|
|
|
(f64.eq
|
2017-12-05 22:47:20 +01:00
|
|
|
(get_local $23)
|
|
|
|
(get_local $23)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 22:47:08 +01:00
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(i32.store
|
|
|
|
(i32.const 8)
|
|
|
|
(get_global $builtins/i)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.store
|
|
|
|
(i32.const 8)
|
|
|
|
(i32.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 22:47:08 +01:00
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(i64.store
|
|
|
|
(i32.const 8)
|
|
|
|
(get_global $builtins/I)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(i64.store
|
|
|
|
(i32.const 8)
|
|
|
|
(i64.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 22:47:08 +01:00
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f32.store
|
|
|
|
(i32.const 8)
|
|
|
|
(get_global $builtins/f)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(f32.store
|
|
|
|
(i32.const 8)
|
|
|
|
(f32.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 22:47:08 +01:00
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f64.store
|
|
|
|
(i32.const 8)
|
|
|
|
(get_global $builtins/F)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(f64.store
|
|
|
|
(i32.const 8)
|
|
|
|
(f64.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 22:47:08 +01:00
|
|
|
(drop
|
|
|
|
(i32.reinterpret/f32
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.reinterpret/i32
|
|
|
|
(i32.const 25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i64.reinterpret/f64
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.reinterpret/i64
|
|
|
|
(i64.const 25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.reinterpret/f32
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.reinterpret/i32
|
|
|
|
(i32.const 25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.reinterpret/f64
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.reinterpret/i64
|
|
|
|
(i64.const 25)
|
|
|
|
)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
(drop
|
|
|
|
(current_memory)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(grow_memory
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/s
|
|
|
|
(current_memory)
|
|
|
|
)
|
|
|
|
(set_global $builtins/s
|
|
|
|
(grow_memory
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 22:47:08 +01:00
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(i32.const 10)
|
|
|
|
(i32.const 20)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(i64.const 100)
|
|
|
|
(i64.const 200)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(f64.const 12.5)
|
|
|
|
(f64.const 25)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(select
|
|
|
|
(i32.const 10)
|
|
|
|
(i32.const 20)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(select
|
|
|
|
(i64.const 100)
|
|
|
|
(i64.const 200)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(select
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(select
|
|
|
|
(f64.const 12.5)
|
|
|
|
(f64.const 25)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
(if
|
|
|
|
(i32.const 0)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2017-12-04 02:00:48 +01:00
|
|
|
(drop
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
(if
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.eqz
|
|
|
|
(f64.ne
|
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(f32.ne
|
2017-12-05 22:47:20 +01:00
|
|
|
(tee_local $24
|
2017-12-04 14:49:24 +01:00
|
|
|
(f32.const nan:0x400000)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(get_local $24)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.eqz
|
|
|
|
(f64.ne
|
|
|
|
(tee_local $25
|
|
|
|
(f64.const nan:0x8000000000000)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(get_local $25)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eqz
|
|
|
|
(select
|
|
|
|
(f32.ne
|
|
|
|
(f32.abs
|
|
|
|
(tee_local $26
|
|
|
|
(f32.const nan:0x400000)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
|
|
|
(i32.const 0)
|
|
|
|
(f32.eq
|
|
|
|
(get_local $26)
|
|
|
|
(get_local $26)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.eqz
|
|
|
|
(i32.eqz
|
|
|
|
(select
|
|
|
|
(f32.ne
|
|
|
|
(f32.abs
|
|
|
|
(tee_local $27
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
(f32.const inf)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.const 0)
|
|
|
|
(f32.eq
|
|
|
|
(get_local $27)
|
|
|
|
(get_local $27)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eqz
|
|
|
|
(select
|
|
|
|
(f64.ne
|
|
|
|
(f64.abs
|
|
|
|
(tee_local $28
|
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
(i32.const 0)
|
|
|
|
(f64.eq
|
|
|
|
(get_local $28)
|
|
|
|
(get_local $28)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eqz
|
|
|
|
(select
|
|
|
|
(f64.ne
|
|
|
|
(f64.abs
|
|
|
|
(tee_local $29
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
(i32.const 0)
|
|
|
|
(f64.eq
|
|
|
|
(get_local $29)
|
|
|
|
(get_local $29)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(select
|
|
|
|
(f32.ne
|
|
|
|
(f32.abs
|
|
|
|
(tee_local $30
|
|
|
|
(f32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
|
|
|
(i32.const 0)
|
|
|
|
(f32.eq
|
|
|
|
(get_local $30)
|
|
|
|
(get_local $30)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(select
|
|
|
|
(f64.ne
|
|
|
|
(f64.abs
|
2017-12-05 22:47:20 +01:00
|
|
|
(tee_local $31
|
2017-12-04 14:49:24 +01:00
|
|
|
(f64.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
(i32.const 0)
|
|
|
|
(f64.eq
|
2017-12-05 22:47:20 +01:00
|
|
|
(get_local $31)
|
|
|
|
(get_local $31)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(;
|
|
|
|
[program.elements]
|
|
|
|
clz
|
|
|
|
ctz
|
|
|
|
popcnt
|
|
|
|
rotl
|
|
|
|
rotr
|
|
|
|
abs
|
|
|
|
ceil
|
|
|
|
copysign
|
|
|
|
floor
|
|
|
|
max
|
|
|
|
min
|
|
|
|
nearest
|
|
|
|
sqrt
|
|
|
|
trunc
|
|
|
|
current_memory
|
|
|
|
grow_memory
|
|
|
|
unreachable
|
2017-12-04 22:47:08 +01:00
|
|
|
load
|
|
|
|
store
|
|
|
|
reinterpret
|
|
|
|
select
|
|
|
|
sizeof
|
2017-12-03 23:04:33 +01:00
|
|
|
isNaN
|
|
|
|
isFinite
|
|
|
|
assert
|
|
|
|
builtins/b
|
|
|
|
builtins/i
|
|
|
|
builtins/I
|
|
|
|
builtins/f
|
|
|
|
builtins/F
|
|
|
|
builtins/s
|
|
|
|
[program.exports]
|
|
|
|
|
|
|
|
;)
|