2018-01-02 23:01:06 +01:00
|
|
|
(module
|
|
|
|
(type $FFF (func (param f64 f64) (result f64)))
|
2018-02-04 07:51:40 +01:00
|
|
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
2018-01-03 18:33:27 +01:00
|
|
|
(type $fff (func (param f32 f32) (result f32)))
|
2018-01-02 23:01:06 +01:00
|
|
|
(type $v (func))
|
2018-02-04 07:51:40 +01:00
|
|
|
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
2018-02-14 09:18:43 +01:00
|
|
|
(global $HEAP_BASE i32 (i32.const 24))
|
2018-01-02 23:01:06 +01:00
|
|
|
(memory $0 1)
|
2018-02-14 09:18:43 +01:00
|
|
|
(data (i32.const 4) "\07\00\00\00f\00m\00o\00d\00.\00t\00s\00")
|
2018-01-02 23:01:06 +01:00
|
|
|
(export "fmod" (func $fmod/fmod))
|
2018-01-03 18:33:27 +01:00
|
|
|
(export "fmodf" (func $fmod/fmodf))
|
2018-01-02 23:01:06 +01:00
|
|
|
(export "memory" (memory $0))
|
|
|
|
(start $start)
|
2018-02-04 07:51:40 +01:00
|
|
|
(func $fmod/fmod (; 1 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
2018-01-02 23:01:06 +01:00
|
|
|
(local $2 i64)
|
|
|
|
(local $3 i64)
|
|
|
|
(local $4 i32)
|
|
|
|
(local $5 i32)
|
|
|
|
(local $6 i32)
|
|
|
|
(local $7 f64)
|
|
|
|
(local $8 i32)
|
|
|
|
(local $9 i64)
|
2018-01-18 23:34:12 +01:00
|
|
|
(set_local $2
|
|
|
|
(i64.reinterpret/f64
|
|
|
|
(get_local $0)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
(set_local $3
|
|
|
|
(i64.reinterpret/f64
|
|
|
|
(get_local $1)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
(set_local $4
|
|
|
|
(i32.wrap/i64
|
|
|
|
(i64.and
|
|
|
|
(i64.shr_u
|
|
|
|
(get_local $2)
|
|
|
|
(i64.const 52)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
(i64.const 2047)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
(set_local $5
|
|
|
|
(i32.wrap/i64
|
|
|
|
(i64.and
|
|
|
|
(i64.shr_u
|
|
|
|
(get_local $3)
|
|
|
|
(i64.const 52)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
(i64.const 2047)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
(set_local $6
|
|
|
|
(i32.wrap/i64
|
|
|
|
(i64.shr_u
|
|
|
|
(get_local $2)
|
|
|
|
(i64.const 63)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
2018-01-10 23:19:14 +01:00
|
|
|
(i32.and
|
|
|
|
(if (result i32)
|
2018-01-12 15:36:17 +01:00
|
|
|
(i32.ne
|
2018-01-02 23:01:06 +01:00
|
|
|
(tee_local $8
|
2018-01-10 23:19:14 +01:00
|
|
|
(i32.and
|
|
|
|
(if (result i32)
|
2018-01-12 15:36:17 +01:00
|
|
|
(i32.ne
|
2018-01-10 23:19:14 +01:00
|
|
|
(tee_local $8
|
|
|
|
(i64.eq
|
|
|
|
(i64.shl
|
|
|
|
(get_local $3)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
(i64.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-01-12 15:36:17 +01:00
|
|
|
(i32.const 0)
|
2018-01-10 23:19:14 +01:00
|
|
|
)
|
2018-01-12 15:36:17 +01:00
|
|
|
(get_local $8)
|
2018-01-10 23:19:14 +01:00
|
|
|
(f64.ne
|
|
|
|
(tee_local $7
|
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
(get_local $7)
|
|
|
|
)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
2018-01-10 23:19:14 +01:00
|
|
|
(i32.const 1)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
)
|
2018-01-12 15:36:17 +01:00
|
|
|
(i32.const 0)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
2018-01-12 15:36:17 +01:00
|
|
|
(get_local $8)
|
2018-01-10 23:19:14 +01:00
|
|
|
(i32.eq
|
|
|
|
(get_local $4)
|
|
|
|
(i32.const 2047)
|
|
|
|
)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
2018-01-10 23:19:14 +01:00
|
|
|
(i32.const 1)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
(return
|
|
|
|
(f64.div
|
|
|
|
(f64.mul
|
|
|
|
(get_local $0)
|
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
(f64.mul
|
|
|
|
(get_local $0)
|
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i64.le_u
|
|
|
|
(i64.shl
|
|
|
|
(get_local $2)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
(i64.shl
|
|
|
|
(get_local $3)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(if
|
|
|
|
(i64.eq
|
|
|
|
(i64.shl
|
|
|
|
(get_local $2)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
(i64.shl
|
|
|
|
(get_local $3)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(return
|
|
|
|
(f64.mul
|
|
|
|
(f64.const 0)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(return
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(get_local $4)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(block $break|0
|
2018-01-18 23:34:12 +01:00
|
|
|
(set_local $9
|
|
|
|
(i64.shl
|
|
|
|
(get_local $2)
|
|
|
|
(i64.const 12)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(loop $continue|0
|
|
|
|
(if
|
|
|
|
(i64.eqz
|
|
|
|
(i64.shr_u
|
|
|
|
(get_local $9)
|
|
|
|
(i64.const 63)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
2018-01-02 23:20:57 +01:00
|
|
|
(set_local $4
|
|
|
|
(i32.sub
|
|
|
|
(get_local $4)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-01-02 23:01:06 +01:00
|
|
|
(set_local $9
|
|
|
|
(i64.shl
|
|
|
|
(get_local $9)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i64.shl
|
|
|
|
(get_local $2)
|
2018-01-10 13:09:05 +01:00
|
|
|
(i64.extend_u/i32
|
|
|
|
(i32.add
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
2018-01-02 23:01:06 +01:00
|
|
|
(get_local $4)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
(i32.const 1)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(set_local $2
|
|
|
|
(i64.and
|
|
|
|
(get_local $2)
|
|
|
|
(i64.shr_u
|
2018-02-14 09:18:43 +01:00
|
|
|
(i64.const -1)
|
2018-01-02 23:01:06 +01:00
|
|
|
(i64.const 12)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i64.or
|
|
|
|
(get_local $2)
|
|
|
|
(i64.shl
|
|
|
|
(i64.const 1)
|
|
|
|
(i64.const 52)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(get_local $5)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(block $break|1
|
|
|
|
(set_local $9
|
|
|
|
(i64.shl
|
|
|
|
(get_local $3)
|
|
|
|
(i64.const 12)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(loop $continue|1
|
|
|
|
(if
|
|
|
|
(i64.eqz
|
|
|
|
(i64.shr_u
|
|
|
|
(get_local $9)
|
|
|
|
(i64.const 63)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
2018-01-02 23:20:57 +01:00
|
|
|
(set_local $5
|
|
|
|
(i32.sub
|
|
|
|
(get_local $5)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-01-02 23:01:06 +01:00
|
|
|
(set_local $9
|
|
|
|
(i64.shl
|
|
|
|
(get_local $9)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $3
|
|
|
|
(i64.shl
|
|
|
|
(get_local $3)
|
2018-01-10 13:09:05 +01:00
|
|
|
(i64.extend_u/i32
|
|
|
|
(i32.add
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
2018-01-02 23:01:06 +01:00
|
|
|
(get_local $5)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
(i32.const 1)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(set_local $3
|
|
|
|
(i64.and
|
|
|
|
(get_local $3)
|
|
|
|
(i64.shr_u
|
2018-02-14 09:18:43 +01:00
|
|
|
(i64.const -1)
|
2018-01-02 23:01:06 +01:00
|
|
|
(i64.const 12)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $3
|
|
|
|
(i64.or
|
|
|
|
(get_local $3)
|
|
|
|
(i64.shl
|
|
|
|
(i64.const 1)
|
|
|
|
(i64.const 52)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block $break|2
|
|
|
|
(nop)
|
|
|
|
(loop $continue|2
|
|
|
|
(if
|
|
|
|
(i32.gt_s
|
|
|
|
(get_local $4)
|
|
|
|
(get_local $5)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(block
|
|
|
|
(set_local $9
|
|
|
|
(i64.sub
|
|
|
|
(get_local $2)
|
|
|
|
(get_local $3)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i64.eqz
|
|
|
|
(i64.shr_u
|
|
|
|
(get_local $9)
|
|
|
|
(i64.const 63)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(if
|
|
|
|
(i64.eqz
|
|
|
|
(get_local $9)
|
|
|
|
)
|
|
|
|
(return
|
|
|
|
(f64.mul
|
|
|
|
(f64.const 0)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(get_local $9)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i64.shl
|
|
|
|
(get_local $2)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
(set_local $4
|
|
|
|
(i32.sub
|
|
|
|
(get_local $4)
|
|
|
|
(i32.const 1)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|2)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $9
|
|
|
|
(i64.sub
|
|
|
|
(get_local $2)
|
|
|
|
(get_local $3)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i64.eqz
|
|
|
|
(i64.shr_u
|
|
|
|
(get_local $9)
|
|
|
|
(i64.const 63)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(if
|
|
|
|
(i64.eqz
|
|
|
|
(get_local $9)
|
|
|
|
)
|
|
|
|
(return
|
|
|
|
(f64.mul
|
|
|
|
(f64.const 0)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(get_local $9)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block $break|3
|
|
|
|
(nop)
|
|
|
|
(loop $continue|3
|
|
|
|
(if
|
|
|
|
(i64.eqz
|
|
|
|
(i64.shr_u
|
|
|
|
(get_local $2)
|
|
|
|
(i64.const 52)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
2018-01-02 23:20:57 +01:00
|
|
|
(set_local $4
|
|
|
|
(i32.sub
|
|
|
|
(get_local $4)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-01-02 23:01:06 +01:00
|
|
|
(set_local $2
|
|
|
|
(i64.shl
|
|
|
|
(get_local $2)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|3)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.gt_s
|
|
|
|
(get_local $4)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(set_local $2
|
|
|
|
(i64.sub
|
|
|
|
(get_local $2)
|
|
|
|
(i64.shl
|
|
|
|
(i64.const 1)
|
|
|
|
(i64.const 52)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i64.or
|
|
|
|
(get_local $2)
|
|
|
|
(i64.shl
|
|
|
|
(i64.extend_u/i32
|
|
|
|
(get_local $4)
|
|
|
|
)
|
|
|
|
(i64.const 52)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i64.shr_u
|
|
|
|
(get_local $2)
|
2018-01-10 13:09:05 +01:00
|
|
|
(i64.extend_u/i32
|
|
|
|
(i32.add
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
2018-01-02 23:01:06 +01:00
|
|
|
(get_local $4)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
(i32.const 1)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i64.or
|
|
|
|
(get_local $2)
|
|
|
|
(i64.shl
|
|
|
|
(i64.extend_u/i32
|
|
|
|
(get_local $6)
|
|
|
|
)
|
|
|
|
(i64.const 63)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(return
|
|
|
|
(f64.reinterpret/i64
|
|
|
|
(get_local $2)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(func $fmod/fmodf (; 2 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
2018-01-03 18:33:27 +01:00
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
(local $5 i32)
|
|
|
|
(local $6 i32)
|
|
|
|
(local $7 f32)
|
|
|
|
(local $8 i32)
|
|
|
|
(local $9 i32)
|
2018-01-18 23:34:12 +01:00
|
|
|
(set_local $2
|
|
|
|
(i32.reinterpret/f32
|
|
|
|
(get_local $0)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
(set_local $3
|
|
|
|
(i32.reinterpret/f32
|
|
|
|
(get_local $1)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
(set_local $4
|
|
|
|
(i32.and
|
|
|
|
(i32.shr_u
|
|
|
|
(get_local $2)
|
|
|
|
(i32.const 23)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
(i32.const 255)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
(set_local $5
|
|
|
|
(i32.and
|
|
|
|
(i32.shr_u
|
|
|
|
(get_local $3)
|
|
|
|
(i32.const 23)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
(i32.const 255)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
|
|
|
)
|
2018-01-18 23:34:12 +01:00
|
|
|
(set_local $6
|
|
|
|
(i32.and
|
|
|
|
(get_local $2)
|
|
|
|
(i32.const -2147483648)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
2018-01-10 23:19:14 +01:00
|
|
|
(i32.and
|
|
|
|
(if (result i32)
|
2018-01-12 15:36:17 +01:00
|
|
|
(i32.ne
|
2018-01-03 18:33:27 +01:00
|
|
|
(tee_local $8
|
2018-01-10 23:19:14 +01:00
|
|
|
(i32.and
|
|
|
|
(if (result i32)
|
2018-01-12 15:36:17 +01:00
|
|
|
(i32.ne
|
2018-01-10 23:19:14 +01:00
|
|
|
(tee_local $8
|
|
|
|
(i32.eq
|
|
|
|
(i32.shl
|
|
|
|
(get_local $3)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-01-12 15:36:17 +01:00
|
|
|
(i32.const 0)
|
2018-01-10 23:19:14 +01:00
|
|
|
)
|
2018-01-12 15:36:17 +01:00
|
|
|
(get_local $8)
|
2018-01-10 23:19:14 +01:00
|
|
|
(f32.ne
|
|
|
|
(tee_local $7
|
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
(get_local $7)
|
|
|
|
)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
2018-01-10 23:19:14 +01:00
|
|
|
(i32.const 1)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
|
|
|
)
|
2018-01-12 15:36:17 +01:00
|
|
|
(i32.const 0)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
2018-01-12 15:36:17 +01:00
|
|
|
(get_local $8)
|
2018-01-10 23:19:14 +01:00
|
|
|
(i32.eq
|
|
|
|
(get_local $4)
|
|
|
|
(i32.const 255)
|
|
|
|
)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
2018-01-10 23:19:14 +01:00
|
|
|
(i32.const 1)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
|
|
|
(return
|
|
|
|
(f32.div
|
|
|
|
(f32.mul
|
|
|
|
(get_local $0)
|
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
(f32.mul
|
|
|
|
(get_local $0)
|
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.le_u
|
|
|
|
(i32.shl
|
|
|
|
(get_local $2)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(i32.shl
|
|
|
|
(get_local $3)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(if
|
|
|
|
(i32.eq
|
|
|
|
(i32.shl
|
|
|
|
(get_local $2)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(i32.shl
|
|
|
|
(get_local $3)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(return
|
|
|
|
(f32.mul
|
|
|
|
(f32.const 0)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(return
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(get_local $4)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(block $break|0
|
2018-01-18 23:34:12 +01:00
|
|
|
(set_local $9
|
|
|
|
(i32.shl
|
|
|
|
(get_local $2)
|
|
|
|
(i32.const 9)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(loop $continue|0
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.shr_u
|
|
|
|
(get_local $9)
|
|
|
|
(i32.const 31)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(set_local $4
|
|
|
|
(i32.sub
|
|
|
|
(get_local $4)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $9
|
|
|
|
(i32.shl
|
|
|
|
(get_local $9)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i32.shl
|
|
|
|
(get_local $2)
|
|
|
|
(i32.add
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
|
|
|
(get_local $4)
|
|
|
|
)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(set_local $2
|
|
|
|
(i32.and
|
|
|
|
(get_local $2)
|
|
|
|
(i32.shr_u
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const -1)
|
2018-01-03 18:33:27 +01:00
|
|
|
(i32.const 9)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i32.or
|
|
|
|
(get_local $2)
|
|
|
|
(i32.shl
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 23)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(get_local $5)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(block $break|1
|
|
|
|
(set_local $9
|
|
|
|
(i32.shl
|
|
|
|
(get_local $3)
|
|
|
|
(i32.const 9)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(loop $continue|1
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.shr_u
|
|
|
|
(get_local $9)
|
|
|
|
(i32.const 31)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(set_local $5
|
|
|
|
(i32.sub
|
|
|
|
(get_local $5)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $9
|
|
|
|
(i32.shl
|
|
|
|
(get_local $9)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $3
|
|
|
|
(i32.shl
|
|
|
|
(get_local $3)
|
|
|
|
(i32.add
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
|
|
|
(get_local $5)
|
|
|
|
)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(set_local $3
|
|
|
|
(i32.and
|
|
|
|
(get_local $3)
|
|
|
|
(i32.shr_u
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const -1)
|
2018-01-03 18:33:27 +01:00
|
|
|
(i32.const 9)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $3
|
|
|
|
(i32.or
|
|
|
|
(get_local $3)
|
|
|
|
(i32.shl
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 23)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block $break|2
|
|
|
|
(nop)
|
|
|
|
(loop $continue|2
|
|
|
|
(if
|
|
|
|
(i32.gt_s
|
|
|
|
(get_local $4)
|
|
|
|
(get_local $5)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(block
|
|
|
|
(set_local $9
|
|
|
|
(i32.sub
|
|
|
|
(get_local $2)
|
|
|
|
(get_local $3)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.shr_u
|
|
|
|
(get_local $9)
|
|
|
|
(i32.const 31)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(get_local $9)
|
|
|
|
)
|
|
|
|
(return
|
|
|
|
(f32.mul
|
|
|
|
(f32.const 0)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(get_local $9)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i32.shl
|
|
|
|
(get_local $2)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $4
|
|
|
|
(i32.sub
|
|
|
|
(get_local $4)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|2)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $9
|
|
|
|
(i32.sub
|
|
|
|
(get_local $2)
|
|
|
|
(get_local $3)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.shr_u
|
|
|
|
(get_local $9)
|
|
|
|
(i32.const 31)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(get_local $9)
|
|
|
|
)
|
|
|
|
(return
|
|
|
|
(f32.mul
|
|
|
|
(f32.const 0)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(get_local $9)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block $break|3
|
|
|
|
(nop)
|
|
|
|
(loop $continue|3
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.shr_u
|
|
|
|
(get_local $2)
|
|
|
|
(i32.const 23)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(set_local $4
|
|
|
|
(i32.sub
|
|
|
|
(get_local $4)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i32.shl
|
|
|
|
(get_local $2)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|3)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.gt_s
|
|
|
|
(get_local $4)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(block
|
|
|
|
(set_local $2
|
|
|
|
(i32.sub
|
|
|
|
(get_local $2)
|
|
|
|
(i32.shl
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 23)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i32.or
|
|
|
|
(get_local $2)
|
|
|
|
(i32.shl
|
|
|
|
(get_local $4)
|
|
|
|
(i32.const 23)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i32.shr_u
|
|
|
|
(get_local $2)
|
|
|
|
(i32.add
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
|
|
|
(get_local $4)
|
|
|
|
)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $2
|
|
|
|
(i32.or
|
|
|
|
(get_local $2)
|
|
|
|
(get_local $6)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(return
|
|
|
|
(f32.reinterpret/i32
|
|
|
|
(get_local $2)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(func $start (; 3 ;) (type $v)
|
2018-01-02 23:01:06 +01:00
|
|
|
(local $0 f64)
|
2018-01-03 18:33:27 +01:00
|
|
|
(local $1 f32)
|
2018-01-02 23:01:06 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(f64.ne
|
|
|
|
(tee_local $0
|
|
|
|
(call $fmod/fmod
|
|
|
|
(f64.const 1)
|
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 65)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(f64.eq
|
|
|
|
(call $fmod/fmod
|
|
|
|
(f64.const 1.5)
|
|
|
|
(f64.const 1)
|
|
|
|
)
|
|
|
|
(f64.const 0.5)
|
|
|
|
)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 66)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(f64.lt
|
|
|
|
(f64.sub
|
|
|
|
(call $fmod/fmod
|
|
|
|
(f64.const 9.2)
|
|
|
|
(f64.const 2)
|
|
|
|
)
|
|
|
|
(f64.const 1.2)
|
|
|
|
)
|
|
|
|
(f64.const 2.220446049250313e-16)
|
|
|
|
)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 67)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(f64.lt
|
|
|
|
(f64.sub
|
|
|
|
(call $fmod/fmod
|
|
|
|
(f64.const 9.2)
|
|
|
|
(f64.const 3.7)
|
|
|
|
)
|
|
|
|
(f64.const 1.8)
|
|
|
|
)
|
|
|
|
(f64.const 2.220446049250313e-16)
|
|
|
|
)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 68)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
2018-01-03 18:33:27 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(f32.ne
|
|
|
|
(tee_local $1
|
|
|
|
(call $fmod/fmodf
|
|
|
|
(f32.const 1)
|
|
|
|
(f32.const nan:0x400000)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 134)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(f32.eq
|
|
|
|
(call $fmod/fmodf
|
|
|
|
(f32.const 1.5)
|
|
|
|
(f32.const 1)
|
|
|
|
)
|
|
|
|
(f32.const 0.5)
|
|
|
|
)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 135)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(f32.lt
|
|
|
|
(f32.sub
|
|
|
|
(call $fmod/fmodf
|
|
|
|
(f32.const 9.199999809265137)
|
|
|
|
(f32.const 2)
|
|
|
|
)
|
|
|
|
(f32.const 1.2000000476837158)
|
|
|
|
)
|
|
|
|
(f32.const 1.1920928955078125e-07)
|
|
|
|
)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 136)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(f32.lt
|
|
|
|
(f32.sub
|
|
|
|
(call $fmod/fmodf
|
|
|
|
(f32.const 9.199999809265137)
|
|
|
|
(f32.const 3.700000047683716)
|
|
|
|
)
|
|
|
|
(f32.const 1.7999999523162842)
|
|
|
|
)
|
|
|
|
(f32.const 1.1920928955078125e-07)
|
|
|
|
)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
|
|
|
(call $abort
|
|
|
|
(i32.const 0)
|
2018-02-14 09:18:43 +01:00
|
|
|
(i32.const 4)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 137)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-03 18:33:27 +01:00
|
|
|
)
|
2018-01-02 23:01:06 +01:00
|
|
|
)
|
|
|
|
)
|