3117 lines
67 KiB
Plaintext
3117 lines
67 KiB
Plaintext
(module $cubic.wasm
|
|
(type (;0;) (func (param i32 i32)))
|
|
(type (;1;) (func))
|
|
(type (;2;) (func (param f32 f32 f32 f32 i32 i32)))
|
|
(type (;3;) (func (result i32)))
|
|
(type (;4;) (func (param f32) (result f32)))
|
|
(type (;5;) (func (param f32 f32) (result f32)))
|
|
(type (;6;) (func (param f32 i32) (result f32)))
|
|
(type (;7;) (func (param f32 i32) (result i32)))
|
|
(import "__pragma" "loopbound" (func $__pragma_loopbound (type 0)))
|
|
(func $__wasm_apply_data_relocs (type 1))
|
|
(func $cubic_main (type 1)
|
|
(local f32)
|
|
i32.const 0
|
|
f32.load offset=1184
|
|
i32.const 0
|
|
f32.load offset=1188
|
|
i32.const 0
|
|
f32.load offset=1192
|
|
i32.const 0
|
|
f32.load offset=1196
|
|
i32.const 1260
|
|
i32.const 1264
|
|
call $cubic_solveCubic
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.load offset=1256
|
|
i32.const 0
|
|
i32.load offset=1260
|
|
i32.add
|
|
i32.store offset=1256
|
|
i32.const 0
|
|
f32.load offset=1200
|
|
i32.const 0
|
|
f32.load offset=1204
|
|
i32.const 0
|
|
f32.load offset=1208
|
|
i32.const 0
|
|
f32.load offset=1212
|
|
i32.const 1260
|
|
i32.const 1264
|
|
call $cubic_solveCubic
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.load offset=1256
|
|
i32.const 0
|
|
i32.load offset=1260
|
|
i32.add
|
|
i32.store offset=1256
|
|
i32.const 0
|
|
f32.load offset=1216
|
|
i32.const 0
|
|
f32.load offset=1220
|
|
i32.const 0
|
|
f32.load offset=1224
|
|
i32.const 0
|
|
f32.load offset=1228
|
|
i32.const 1260
|
|
i32.const 1264
|
|
call $cubic_solveCubic
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.load offset=1256
|
|
i32.const 0
|
|
i32.load offset=1260
|
|
i32.add
|
|
i32.store offset=1256
|
|
i32.const 0
|
|
f32.load offset=1232
|
|
i32.const 0
|
|
f32.load offset=1236
|
|
i32.const 0
|
|
f32.load offset=1240
|
|
i32.const 0
|
|
f32.load offset=1244
|
|
i32.const 1260
|
|
i32.const 1264
|
|
call $cubic_solveCubic
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.load offset=1256
|
|
i32.const 0
|
|
i32.load offset=1260
|
|
i32.add
|
|
i32.store offset=1256
|
|
i32.const 5
|
|
i32.const 5
|
|
call $__pragma_loopbound
|
|
i32.const 0
|
|
i32.const 1065353216
|
|
i32.store offset=1184
|
|
loop ;; label = @1
|
|
i32.const 5
|
|
i32.const 5
|
|
call $__pragma_loopbound
|
|
i32.const 0
|
|
i32.const 1092616192
|
|
i32.store offset=1188
|
|
loop ;; label = @2
|
|
i32.const 7
|
|
i32.const 7
|
|
call $__pragma_loopbound
|
|
i32.const 0
|
|
i32.const 1084227584
|
|
i32.store offset=1192
|
|
loop ;; label = @3
|
|
i32.const 5
|
|
i32.const 5
|
|
call $__pragma_loopbound
|
|
i32.const 0
|
|
i32.const -1082130432
|
|
i32.store offset=1196
|
|
f32.const -0x1p+0 (;=-1;)
|
|
local.set 0
|
|
loop ;; label = @4
|
|
i32.const 0
|
|
f32.load offset=1184
|
|
i32.const 0
|
|
f32.load offset=1188
|
|
i32.const 0
|
|
f32.load offset=1192
|
|
local.get 0
|
|
i32.const 1260
|
|
i32.const 1264
|
|
call $cubic_solveCubic
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.load offset=1256
|
|
i32.const 0
|
|
i32.load offset=1260
|
|
i32.add
|
|
i32.store offset=1256
|
|
i32.const 0
|
|
i32.const 0
|
|
f32.load offset=1196
|
|
f32.const -0x1p+1 (;=-2;)
|
|
f32.add
|
|
local.tee 0
|
|
f32.store offset=1196
|
|
local.get 0
|
|
f32.const -0x1.6p+3 (;=-11;)
|
|
f32.gt
|
|
br_if 0 (;@4;)
|
|
end
|
|
i32.const 0
|
|
i32.const 0
|
|
f32.load offset=1192
|
|
f32.const 0x1.8p+0 (;=1.5;)
|
|
f32.add
|
|
local.tee 0
|
|
f32.store offset=1192
|
|
local.get 0
|
|
f32.const 0x1.ep+3 (;=15;)
|
|
f32.lt
|
|
br_if 0 (;@3;)
|
|
end
|
|
i32.const 0
|
|
i32.const 0
|
|
f32.load offset=1188
|
|
f32.const -0x1p+1 (;=-2;)
|
|
f32.add
|
|
local.tee 0
|
|
f32.store offset=1188
|
|
local.get 0
|
|
f32.const 0x0p+0 (;=0;)
|
|
f32.gt
|
|
br_if 0 (;@2;)
|
|
end
|
|
i32.const 0
|
|
i32.const 0
|
|
f32.load offset=1184
|
|
f32.const 0x1p+1 (;=2;)
|
|
f32.add
|
|
local.tee 0
|
|
f32.store offset=1184
|
|
local.get 0
|
|
f32.const 0x1.4p+3 (;=10;)
|
|
f32.lt
|
|
br_if 0 (;@1;)
|
|
end)
|
|
(func $cubic_solveCubic (type 2) (param f32 f32 f32 f32 i32 i32)
|
|
(local f32)
|
|
block ;; label = @1
|
|
local.get 3
|
|
local.get 0
|
|
f32.div
|
|
f32.const 0x1.bp+4 (;=27;)
|
|
f32.mul
|
|
local.get 1
|
|
local.get 0
|
|
f32.div
|
|
local.tee 1
|
|
local.get 1
|
|
local.get 1
|
|
f32.add
|
|
f32.mul
|
|
local.get 1
|
|
f32.mul
|
|
local.get 1
|
|
f32.const -0x1.2p+3 (;=-9;)
|
|
f32.mul
|
|
local.get 2
|
|
local.get 0
|
|
f32.div
|
|
local.tee 0
|
|
f32.mul
|
|
f32.add
|
|
f32.add
|
|
f32.const 0x1.bp+5 (;=54;)
|
|
f32.div
|
|
local.tee 2
|
|
local.get 2
|
|
f32.mul
|
|
local.get 1
|
|
local.get 1
|
|
f32.mul
|
|
local.get 0
|
|
f32.const -0x1.8p+1 (;=-3;)
|
|
f32.mul
|
|
f32.add
|
|
f32.const 0x1.2p+3 (;=9;)
|
|
f32.div
|
|
local.tee 0
|
|
local.get 0
|
|
local.get 0
|
|
f32.mul
|
|
f32.mul
|
|
local.tee 3
|
|
f32.sub
|
|
local.tee 6
|
|
f32.const 0x0p+0 (;=0;)
|
|
f32.le
|
|
i32.eqz
|
|
br_if 0 (;@1;)
|
|
local.get 4
|
|
i32.const 3
|
|
i32.store
|
|
local.get 2
|
|
local.get 3
|
|
call $basicmath___ieee754_sqrtf
|
|
f32.div
|
|
call $basicmath___ieee754_acosf
|
|
local.set 2
|
|
local.get 5
|
|
local.get 0
|
|
call $basicmath___ieee754_sqrtf
|
|
f32.const -0x1p+1 (;=-2;)
|
|
f32.mul
|
|
local.get 2
|
|
f32.const 0x1.8p+1 (;=3;)
|
|
f32.div
|
|
call $basicmath___cosf
|
|
f32.mul
|
|
local.get 1
|
|
f32.const -0x1.8p+1 (;=-3;)
|
|
f32.div
|
|
local.tee 1
|
|
f32.add
|
|
f32.store
|
|
local.get 5
|
|
local.get 0
|
|
call $basicmath___ieee754_sqrtf
|
|
f32.const -0x1p+1 (;=-2;)
|
|
f32.mul
|
|
local.get 2
|
|
f32.const 0x1.91eb86p+2 (;=6.28;)
|
|
f32.add
|
|
f32.const 0x1.8p+1 (;=3;)
|
|
f32.div
|
|
call $basicmath___cosf
|
|
f32.mul
|
|
local.get 1
|
|
f32.add
|
|
f32.store offset=4
|
|
local.get 5
|
|
local.get 0
|
|
call $basicmath___ieee754_sqrtf
|
|
f32.const -0x1p+1 (;=-2;)
|
|
f32.mul
|
|
local.get 2
|
|
f32.const 0x1.91eb86p+3 (;=12.56;)
|
|
f32.add
|
|
f32.const 0x1.8p+1 (;=3;)
|
|
f32.div
|
|
call $basicmath___cosf
|
|
f32.mul
|
|
local.get 1
|
|
f32.add
|
|
f32.store offset=8
|
|
return
|
|
end
|
|
local.get 4
|
|
i32.const 1
|
|
i32.store
|
|
local.get 5
|
|
local.get 6
|
|
call $basicmath___ieee754_sqrtf
|
|
local.get 2
|
|
call $basicmath___fabsf
|
|
f32.add
|
|
f32.const 0x1.555556p-2 (;=0.333333;)
|
|
call $basicmath___ieee754_powf
|
|
local.tee 3
|
|
local.get 0
|
|
local.get 3
|
|
f32.div
|
|
f32.add
|
|
local.tee 0
|
|
local.get 0
|
|
f32.neg
|
|
local.get 2
|
|
f32.const 0x0p+0 (;=0;)
|
|
f32.lt
|
|
select
|
|
local.get 1
|
|
f32.const -0x1.8p+1 (;=-3;)
|
|
f32.div
|
|
f32.add
|
|
f32.store)
|
|
(func $__original_main (type 3) (result i32)
|
|
i32.const 0
|
|
i32.const -1054343168
|
|
i32.store offset=1188
|
|
i32.const 0
|
|
i32.const 1065353216
|
|
i32.store offset=1184
|
|
i32.const 0
|
|
i32.const 1107296256
|
|
i32.store offset=1192
|
|
i32.const 0
|
|
i32.const -1041235968
|
|
i32.store offset=1196
|
|
i32.const 0
|
|
i32.const 1065353216
|
|
i32.store offset=1200
|
|
i32.const 0
|
|
i32.const -1064304640
|
|
i32.store offset=1204
|
|
i32.const 0
|
|
i32.const 1099431936
|
|
i32.store offset=1208
|
|
i32.const 0
|
|
i32.const -1041235968
|
|
i32.store offset=1212
|
|
i32.const 0
|
|
i32.const 1065353216
|
|
i32.store offset=1216
|
|
i32.const 0
|
|
i32.const -1067450368
|
|
i32.store offset=1220
|
|
i32.const 0
|
|
i32.const 1102053376
|
|
i32.store offset=1224
|
|
i32.const 0
|
|
i32.const -1040711680
|
|
i32.store offset=1228
|
|
i32.const 0
|
|
i32.const 1065353216
|
|
i32.store offset=1232
|
|
i32.const 0
|
|
i32.const -1050987725
|
|
i32.store offset=1236
|
|
i32.const 0
|
|
i32.const 1065353216
|
|
i32.store offset=1240
|
|
i32.const 0
|
|
i32.const -1039400960
|
|
i32.store offset=1244
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.store offset=1248
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.store offset=1252
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.store offset=1256
|
|
call $cubic_main
|
|
i32.const -1
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.load offset=1256
|
|
i32.const 1051
|
|
i32.ne
|
|
select)
|
|
(func $basicmath___ieee754_acosf (type 4) (param f32) (result f32)
|
|
(local i32 i32 f32 f32)
|
|
block ;; label = @1
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
local.tee 1
|
|
i32.const 2147483647
|
|
i32.and
|
|
local.tee 2
|
|
i32.const 1065353216
|
|
i32.ne
|
|
br_if 0 (;@1;)
|
|
f32.const 0x0p+0 (;=0;)
|
|
f32.const 0x1.921fb6p+1 (;=3.14159;)
|
|
local.get 1
|
|
i32.const 0
|
|
i32.gt_s
|
|
select
|
|
return
|
|
end
|
|
block ;; label = @1
|
|
local.get 2
|
|
i32.const 1065353217
|
|
i32.lt_u
|
|
br_if 0 (;@1;)
|
|
local.get 0
|
|
local.get 0
|
|
f32.sub
|
|
local.tee 0
|
|
local.get 0
|
|
f32.div
|
|
return
|
|
end
|
|
block ;; label = @1
|
|
block ;; label = @2
|
|
local.get 2
|
|
i32.const 1056964607
|
|
i32.gt_u
|
|
br_if 0 (;@2;)
|
|
f32.const 0x1.921fb6p+0 (;=1.5708;)
|
|
local.set 3
|
|
local.get 2
|
|
i32.const 587202561
|
|
i32.lt_u
|
|
br_if 1 (;@1;)
|
|
f32.const 0x1.4442dp-24 (;=7.54979e-08;)
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
f32.mul
|
|
local.tee 3
|
|
local.get 3
|
|
local.get 3
|
|
local.get 3
|
|
local.get 3
|
|
local.get 3
|
|
f32.const 0x1.23de1p-15 (;=3.47933e-05;)
|
|
f32.mul
|
|
f32.const 0x1.9efe08p-11 (;=0.000791535;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.48228cp-5 (;=-0.0400555;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.9c155p-3 (;=0.201213;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.4d612p-2 (;=-0.325566;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.555556p-3 (;=0.166667;)
|
|
f32.add
|
|
f32.mul
|
|
local.get 3
|
|
local.get 3
|
|
local.get 3
|
|
local.get 3
|
|
f32.const 0x1.3b8c5cp-4 (;=0.0770382;)
|
|
f32.mul
|
|
f32.const -0x1.6066c2p-1 (;=-0.688284;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.02ae5ap+1 (;=2.02095;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.33a272p+1 (;=-2.40339;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1p+0 (;=1;)
|
|
f32.add
|
|
f32.div
|
|
f32.mul
|
|
f32.sub
|
|
local.get 0
|
|
f32.sub
|
|
f32.const 0x1.921fb4p+0 (;=1.5708;)
|
|
f32.add
|
|
return
|
|
end
|
|
block ;; label = @2
|
|
local.get 1
|
|
i32.const -1
|
|
i32.gt_s
|
|
br_if 0 (;@2;)
|
|
f32.const 0x1.921fb4p+1 (;=3.14159;)
|
|
local.get 0
|
|
f32.const 0x1p+0 (;=1;)
|
|
f32.add
|
|
f32.const 0x1p-1 (;=0.5;)
|
|
f32.mul
|
|
local.tee 0
|
|
call $basicmath___ieee754_sqrtf
|
|
local.tee 3
|
|
local.get 3
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
f32.const 0x1.23de1p-15 (;=3.47933e-05;)
|
|
f32.mul
|
|
f32.const 0x1.9efe08p-11 (;=0.000791535;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.48228cp-5 (;=-0.0400555;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.9c155p-3 (;=0.201213;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.4d612p-2 (;=-0.325566;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.555556p-3 (;=0.166667;)
|
|
f32.add
|
|
f32.mul
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
f32.const 0x1.3b8c5cp-4 (;=0.0770382;)
|
|
f32.mul
|
|
f32.const -0x1.6066c2p-1 (;=-0.688284;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.02ae5ap+1 (;=2.02095;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.33a272p+1 (;=-2.40339;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1p+0 (;=1;)
|
|
f32.add
|
|
f32.div
|
|
f32.mul
|
|
f32.const -0x1.4442dp-24 (;=-7.54979e-08;)
|
|
f32.add
|
|
f32.add
|
|
local.tee 0
|
|
local.get 0
|
|
f32.add
|
|
f32.sub
|
|
return
|
|
end
|
|
f32.const 0x1p+0 (;=1;)
|
|
local.get 0
|
|
f32.sub
|
|
f32.const 0x1p-1 (;=0.5;)
|
|
f32.mul
|
|
local.tee 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
f32.const 0x1.23de1p-15 (;=3.47933e-05;)
|
|
f32.mul
|
|
f32.const 0x1.9efe08p-11 (;=0.000791535;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.48228cp-5 (;=-0.0400555;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.9c155p-3 (;=0.201213;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.4d612p-2 (;=-0.325566;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.555556p-3 (;=0.166667;)
|
|
f32.add
|
|
f32.mul
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
f32.const 0x1.3b8c5cp-4 (;=0.0770382;)
|
|
f32.mul
|
|
f32.const -0x1.6066c2p-1 (;=-0.688284;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.02ae5ap+1 (;=2.02095;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.33a272p+1 (;=-2.40339;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1p+0 (;=1;)
|
|
f32.add
|
|
f32.div
|
|
local.get 0
|
|
call $basicmath___ieee754_sqrtf
|
|
local.tee 4
|
|
f32.mul
|
|
local.get 0
|
|
local.get 4
|
|
i32.reinterpret_f32
|
|
i32.const -4096
|
|
i32.and
|
|
f32.reinterpret_i32
|
|
local.tee 3
|
|
local.get 3
|
|
f32.mul
|
|
f32.sub
|
|
local.get 4
|
|
local.get 3
|
|
f32.add
|
|
f32.div
|
|
f32.add
|
|
local.get 3
|
|
f32.add
|
|
local.tee 0
|
|
local.get 0
|
|
f32.add
|
|
local.set 3
|
|
end
|
|
local.get 3)
|
|
(func $basicmath___ieee754_sqrtf (type 4) (param f32) (result f32)
|
|
(local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
|
|
block ;; label = @1
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
local.tee 1
|
|
i32.const 2139095040
|
|
i32.and
|
|
i32.const 2139095040
|
|
i32.ne
|
|
br_if 0 (;@1;)
|
|
local.get 0
|
|
local.get 0
|
|
f32.mul
|
|
local.get 0
|
|
f32.add
|
|
return
|
|
end
|
|
block ;; label = @1
|
|
block ;; label = @2
|
|
block ;; label = @3
|
|
block ;; label = @4
|
|
local.get 1
|
|
i32.const 0
|
|
i32.gt_s
|
|
br_if 0 (;@4;)
|
|
local.get 0
|
|
f32.const 0x0p+0 (;=0;)
|
|
f32.eq
|
|
br_if 3 (;@1;)
|
|
local.get 1
|
|
i32.const -1
|
|
i32.gt_s
|
|
br_if 1 (;@3;)
|
|
local.get 0
|
|
local.get 0
|
|
f32.sub
|
|
local.tee 0
|
|
local.get 0
|
|
f32.div
|
|
return
|
|
end
|
|
local.get 1
|
|
i32.const 8388607
|
|
i32.le_u
|
|
br_if 0 (;@3;)
|
|
local.get 1
|
|
i32.const 23
|
|
i32.shr_u
|
|
local.set 2
|
|
br 1 (;@2;)
|
|
end
|
|
i32.const 0
|
|
i32.const 0
|
|
call $__pragma_loopbound
|
|
i32.const 9
|
|
local.get 1
|
|
i32.clz
|
|
local.tee 3
|
|
i32.sub
|
|
local.set 2
|
|
local.get 1
|
|
i32.const 23
|
|
local.get 3
|
|
i32.const 31
|
|
i32.xor
|
|
i32.sub
|
|
i32.shl
|
|
local.set 1
|
|
end
|
|
i32.const 25
|
|
i32.const 25
|
|
call $__pragma_loopbound
|
|
local.get 2
|
|
i32.const -127
|
|
i32.add
|
|
local.tee 2
|
|
i32.const 22
|
|
i32.shl
|
|
i32.const -8388608
|
|
i32.and
|
|
i32.const 0
|
|
i32.const 33554432
|
|
i32.const 50331648
|
|
local.get 1
|
|
i32.const 8388607
|
|
i32.and
|
|
i32.const 8388608
|
|
i32.or
|
|
local.get 2
|
|
i32.const 1
|
|
i32.and
|
|
i32.shl
|
|
local.tee 3
|
|
i32.const 18874368
|
|
i32.lt_u
|
|
local.tee 1
|
|
select
|
|
local.tee 2
|
|
local.get 2
|
|
i32.const 8388608
|
|
i32.or
|
|
local.get 2
|
|
i32.const 4194304
|
|
i32.or
|
|
local.tee 2
|
|
local.get 3
|
|
i32.const 2
|
|
i32.shl
|
|
i32.const 0
|
|
i32.const -41943040
|
|
local.get 1
|
|
select
|
|
i32.add
|
|
i32.const 1
|
|
i32.shl
|
|
i32.const -67108864
|
|
i32.add
|
|
local.tee 3
|
|
i32.gt_s
|
|
local.tee 4
|
|
select
|
|
local.tee 5
|
|
local.get 5
|
|
i32.const 4194304
|
|
i32.or
|
|
local.get 5
|
|
i32.const 2097152
|
|
i32.or
|
|
local.tee 5
|
|
local.get 3
|
|
i32.const 0
|
|
local.get 2
|
|
local.get 4
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 4
|
|
i32.gt_s
|
|
local.tee 6
|
|
select
|
|
local.tee 7
|
|
local.get 7
|
|
i32.const 2097152
|
|
i32.or
|
|
local.get 7
|
|
i32.const 1048576
|
|
i32.or
|
|
local.tee 7
|
|
local.get 4
|
|
i32.const 0
|
|
local.get 5
|
|
local.get 6
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 6
|
|
i32.gt_s
|
|
local.tee 8
|
|
select
|
|
local.tee 9
|
|
local.get 9
|
|
i32.const 1048576
|
|
i32.add
|
|
local.get 9
|
|
i32.const 524288
|
|
i32.add
|
|
local.tee 9
|
|
local.get 6
|
|
i32.const 0
|
|
local.get 7
|
|
local.get 8
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 8
|
|
i32.gt_s
|
|
local.tee 10
|
|
select
|
|
local.tee 11
|
|
local.get 11
|
|
i32.const 524288
|
|
i32.add
|
|
local.get 11
|
|
i32.const 262144
|
|
i32.add
|
|
local.tee 11
|
|
local.get 8
|
|
i32.const 0
|
|
local.get 9
|
|
local.get 10
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 10
|
|
i32.gt_s
|
|
local.tee 12
|
|
select
|
|
local.tee 13
|
|
local.get 13
|
|
i32.const 262144
|
|
i32.add
|
|
local.get 13
|
|
i32.const 131072
|
|
i32.add
|
|
local.tee 13
|
|
local.get 10
|
|
i32.const 0
|
|
local.get 11
|
|
local.get 12
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 12
|
|
i32.gt_s
|
|
local.tee 14
|
|
select
|
|
local.tee 15
|
|
local.get 15
|
|
i32.const 131072
|
|
i32.add
|
|
local.get 15
|
|
i32.const 65536
|
|
i32.add
|
|
local.tee 15
|
|
local.get 12
|
|
i32.const 0
|
|
local.get 13
|
|
local.get 14
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 14
|
|
i32.gt_s
|
|
local.tee 16
|
|
select
|
|
local.tee 17
|
|
local.get 17
|
|
i32.const 65536
|
|
i32.add
|
|
local.get 17
|
|
i32.const 32768
|
|
i32.add
|
|
local.tee 17
|
|
local.get 14
|
|
i32.const 0
|
|
local.get 15
|
|
local.get 16
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 16
|
|
i32.gt_s
|
|
local.tee 18
|
|
select
|
|
local.tee 19
|
|
local.get 19
|
|
i32.const 32768
|
|
i32.add
|
|
local.get 19
|
|
i32.const 16384
|
|
i32.add
|
|
local.tee 19
|
|
local.get 16
|
|
i32.const 0
|
|
local.get 17
|
|
local.get 18
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 18
|
|
i32.gt_s
|
|
local.tee 20
|
|
select
|
|
local.tee 21
|
|
local.get 21
|
|
i32.const 16384
|
|
i32.add
|
|
local.get 21
|
|
i32.const 8192
|
|
i32.add
|
|
local.tee 21
|
|
local.get 18
|
|
i32.const 0
|
|
local.get 19
|
|
local.get 20
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 20
|
|
i32.gt_s
|
|
local.tee 22
|
|
select
|
|
local.tee 23
|
|
local.get 23
|
|
i32.const 8192
|
|
i32.add
|
|
local.get 23
|
|
i32.const 4096
|
|
i32.add
|
|
local.tee 23
|
|
local.get 20
|
|
i32.const 0
|
|
local.get 21
|
|
local.get 22
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 22
|
|
i32.gt_s
|
|
local.tee 24
|
|
select
|
|
local.tee 25
|
|
local.get 25
|
|
i32.const 4096
|
|
i32.add
|
|
local.get 25
|
|
i32.const 2048
|
|
i32.add
|
|
local.tee 25
|
|
local.get 22
|
|
i32.const 0
|
|
local.get 23
|
|
local.get 24
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 24
|
|
i32.gt_s
|
|
local.tee 26
|
|
select
|
|
local.tee 27
|
|
local.get 27
|
|
i32.const 2048
|
|
i32.add
|
|
local.get 27
|
|
i32.const 1024
|
|
i32.add
|
|
local.tee 27
|
|
local.get 24
|
|
i32.const 0
|
|
local.get 25
|
|
local.get 26
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 26
|
|
i32.gt_s
|
|
local.tee 28
|
|
select
|
|
local.tee 29
|
|
local.get 29
|
|
i32.const 1024
|
|
i32.add
|
|
local.get 29
|
|
i32.const 512
|
|
i32.add
|
|
local.tee 29
|
|
local.get 26
|
|
i32.const 0
|
|
local.get 27
|
|
local.get 28
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 28
|
|
i32.gt_s
|
|
local.tee 30
|
|
select
|
|
local.tee 31
|
|
local.get 31
|
|
i32.const 512
|
|
i32.add
|
|
local.get 31
|
|
i32.const 256
|
|
i32.add
|
|
local.tee 31
|
|
local.get 28
|
|
i32.const 0
|
|
local.get 29
|
|
local.get 30
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 30
|
|
i32.gt_s
|
|
local.tee 32
|
|
select
|
|
local.tee 33
|
|
local.get 33
|
|
i32.const 256
|
|
i32.add
|
|
local.get 33
|
|
i32.const 128
|
|
i32.add
|
|
local.tee 33
|
|
local.get 30
|
|
i32.const 0
|
|
local.get 31
|
|
local.get 32
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 32
|
|
i32.gt_s
|
|
local.tee 34
|
|
select
|
|
local.tee 35
|
|
local.get 35
|
|
i32.const 128
|
|
i32.add
|
|
local.get 35
|
|
i32.const 64
|
|
i32.add
|
|
local.tee 35
|
|
local.get 32
|
|
i32.const 0
|
|
local.get 33
|
|
local.get 34
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 34
|
|
i32.gt_s
|
|
local.tee 36
|
|
select
|
|
local.tee 37
|
|
local.get 37
|
|
i32.const 64
|
|
i32.add
|
|
local.get 37
|
|
i32.const 32
|
|
i32.add
|
|
local.tee 37
|
|
local.get 34
|
|
i32.const 0
|
|
local.get 35
|
|
local.get 36
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 36
|
|
i32.gt_s
|
|
local.tee 38
|
|
select
|
|
local.tee 39
|
|
local.get 39
|
|
i32.const 32
|
|
i32.add
|
|
local.get 39
|
|
i32.const 16
|
|
i32.add
|
|
local.tee 39
|
|
local.get 36
|
|
i32.const 0
|
|
local.get 37
|
|
local.get 38
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 38
|
|
i32.gt_s
|
|
local.tee 40
|
|
select
|
|
local.tee 41
|
|
local.get 41
|
|
i32.const 16
|
|
i32.add
|
|
local.get 41
|
|
i32.const 8
|
|
i32.add
|
|
local.tee 41
|
|
local.get 38
|
|
i32.const 0
|
|
local.get 39
|
|
local.get 40
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 40
|
|
i32.gt_s
|
|
local.tee 42
|
|
select
|
|
local.tee 43
|
|
local.get 43
|
|
i32.const 8
|
|
i32.add
|
|
local.get 43
|
|
i32.const 4
|
|
i32.add
|
|
local.tee 43
|
|
local.get 40
|
|
i32.const 0
|
|
local.get 41
|
|
local.get 42
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 42
|
|
i32.gt_s
|
|
local.tee 44
|
|
select
|
|
local.tee 45
|
|
i32.const 2
|
|
i32.add
|
|
local.tee 46
|
|
local.get 42
|
|
i32.const 0
|
|
local.get 43
|
|
local.get 44
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 44
|
|
i32.le_s
|
|
i32.const 1
|
|
i32.shl
|
|
local.get 43
|
|
local.get 42
|
|
i32.le_s
|
|
i32.const 2
|
|
i32.shl
|
|
local.get 41
|
|
local.get 40
|
|
i32.le_s
|
|
i32.const 3
|
|
i32.shl
|
|
local.get 39
|
|
local.get 38
|
|
i32.le_s
|
|
i32.const 4
|
|
i32.shl
|
|
local.get 37
|
|
local.get 36
|
|
i32.le_s
|
|
i32.const 5
|
|
i32.shl
|
|
local.get 35
|
|
local.get 34
|
|
i32.le_s
|
|
i32.const 6
|
|
i32.shl
|
|
local.get 33
|
|
local.get 32
|
|
i32.le_s
|
|
i32.const 7
|
|
i32.shl
|
|
local.get 31
|
|
local.get 30
|
|
i32.le_s
|
|
i32.const 8
|
|
i32.shl
|
|
local.get 29
|
|
local.get 28
|
|
i32.le_s
|
|
i32.const 9
|
|
i32.shl
|
|
local.get 27
|
|
local.get 26
|
|
i32.le_s
|
|
i32.const 10
|
|
i32.shl
|
|
local.get 25
|
|
local.get 24
|
|
i32.le_s
|
|
i32.const 11
|
|
i32.shl
|
|
local.get 23
|
|
local.get 22
|
|
i32.le_s
|
|
i32.const 12
|
|
i32.shl
|
|
local.get 21
|
|
local.get 20
|
|
i32.le_s
|
|
i32.const 13
|
|
i32.shl
|
|
local.get 19
|
|
local.get 18
|
|
i32.le_s
|
|
i32.const 14
|
|
i32.shl
|
|
local.get 17
|
|
local.get 16
|
|
i32.le_s
|
|
i32.const 15
|
|
i32.shl
|
|
local.get 15
|
|
local.get 14
|
|
i32.le_s
|
|
i32.const 16
|
|
i32.shl
|
|
local.get 13
|
|
local.get 12
|
|
i32.le_s
|
|
i32.const 17
|
|
i32.shl
|
|
local.get 11
|
|
local.get 10
|
|
i32.le_s
|
|
i32.const 18
|
|
i32.shl
|
|
local.get 9
|
|
local.get 8
|
|
i32.le_s
|
|
i32.const 19
|
|
i32.shl
|
|
local.get 7
|
|
local.get 6
|
|
i32.le_s
|
|
i32.const 20
|
|
i32.shl
|
|
local.get 5
|
|
local.get 4
|
|
i32.le_s
|
|
i32.const 21
|
|
i32.shl
|
|
local.get 2
|
|
local.get 3
|
|
i32.le_s
|
|
i32.const 22
|
|
i32.shl
|
|
i32.const 16777216
|
|
i32.const 25165824
|
|
local.get 1
|
|
select
|
|
i32.or
|
|
i32.or
|
|
i32.or
|
|
i32.or
|
|
i32.or
|
|
i32.or
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
i32.add
|
|
local.get 45
|
|
local.get 45
|
|
i32.const 4
|
|
i32.add
|
|
local.get 46
|
|
local.get 44
|
|
i32.gt_s
|
|
local.tee 1
|
|
select
|
|
local.tee 2
|
|
local.get 44
|
|
i32.const 0
|
|
local.get 46
|
|
local.get 1
|
|
select
|
|
i32.sub
|
|
i32.const 1
|
|
i32.shl
|
|
local.tee 1
|
|
i32.lt_s
|
|
local.tee 3
|
|
i32.add
|
|
local.tee 5
|
|
i32.const 1
|
|
i32.and
|
|
local.get 2
|
|
i32.const -1
|
|
local.get 3
|
|
select
|
|
local.get 1
|
|
i32.const -1
|
|
i32.add
|
|
i32.eq
|
|
select
|
|
local.get 5
|
|
i32.add
|
|
i32.const 1
|
|
i32.shr_u
|
|
i32.add
|
|
i32.const 1056964608
|
|
i32.add
|
|
f32.reinterpret_i32
|
|
local.set 0
|
|
end
|
|
local.get 0)
|
|
(func $basicmath___ieee754_powf (type 5) (param f32 f32) (result f32)
|
|
(local f32 i32 i32 i32 i32 i32 i32 i32 f32 f32 f32 f32 f32 f32)
|
|
f32.const 0x1p+0 (;=1;)
|
|
local.set 2
|
|
block ;; label = @1
|
|
local.get 0
|
|
f32.const 0x1p+0 (;=1;)
|
|
f32.eq
|
|
br_if 0 (;@1;)
|
|
local.get 1
|
|
i32.reinterpret_f32
|
|
local.tee 3
|
|
i32.const 2147483647
|
|
i32.and
|
|
local.tee 4
|
|
i32.eqz
|
|
br_if 0 (;@1;)
|
|
block ;; label = @2
|
|
local.get 0
|
|
f32.const -0x1p+0 (;=-1;)
|
|
f32.ne
|
|
br_if 0 (;@2;)
|
|
local.get 1
|
|
f32.abs
|
|
f32.const inf (;=inf;)
|
|
f32.ne
|
|
br_if 0 (;@2;)
|
|
local.get 3
|
|
i32.const 1073741823
|
|
i32.gt_u
|
|
br_if 1 (;@1;)
|
|
end
|
|
block ;; label = @2
|
|
block ;; label = @3
|
|
local.get 0
|
|
f32.abs
|
|
local.tee 2
|
|
i32.reinterpret_f32
|
|
local.tee 5
|
|
i32.const 2139095040
|
|
i32.gt_u
|
|
br_if 0 (;@3;)
|
|
local.get 4
|
|
i32.const 2139095041
|
|
i32.lt_u
|
|
br_if 1 (;@2;)
|
|
end
|
|
local.get 0
|
|
local.get 1
|
|
f32.add
|
|
return
|
|
end
|
|
block ;; label = @2
|
|
block ;; label = @3
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
local.tee 6
|
|
i32.const -1
|
|
i32.le_s
|
|
br_if 0 (;@3;)
|
|
i32.const 0
|
|
local.set 7
|
|
br 1 (;@2;)
|
|
end
|
|
i32.const 2
|
|
local.set 7
|
|
local.get 4
|
|
i32.const 1266679807
|
|
i32.gt_u
|
|
br_if 0 (;@2;)
|
|
block ;; label = @3
|
|
local.get 4
|
|
i32.const 1065353216
|
|
i32.ge_u
|
|
br_if 0 (;@3;)
|
|
i32.const 0
|
|
local.set 7
|
|
br 1 (;@2;)
|
|
end
|
|
i32.const 0
|
|
local.set 7
|
|
local.get 4
|
|
i32.const 150
|
|
local.get 4
|
|
i32.const 23
|
|
i32.shr_u
|
|
i32.sub
|
|
local.tee 8
|
|
i32.shr_u
|
|
local.tee 9
|
|
local.get 8
|
|
i32.shl
|
|
local.get 4
|
|
i32.ne
|
|
br_if 0 (;@2;)
|
|
i32.const 2
|
|
local.get 9
|
|
i32.const 1
|
|
i32.and
|
|
i32.sub
|
|
local.set 7
|
|
end
|
|
block ;; label = @2
|
|
block ;; label = @3
|
|
local.get 4
|
|
i32.const 1065353216
|
|
i32.eq
|
|
br_if 0 (;@3;)
|
|
local.get 4
|
|
i32.const 2139095040
|
|
i32.ne
|
|
br_if 1 (;@2;)
|
|
block ;; label = @4
|
|
local.get 5
|
|
i32.const 1065353216
|
|
i32.ne
|
|
br_if 0 (;@4;)
|
|
local.get 1
|
|
local.get 1
|
|
f32.sub
|
|
return
|
|
end
|
|
block ;; label = @4
|
|
local.get 5
|
|
i32.const 1065353217
|
|
i32.lt_u
|
|
br_if 0 (;@4;)
|
|
local.get 1
|
|
f32.const 0x0p+0 (;=0;)
|
|
local.get 3
|
|
i32.const -1
|
|
i32.gt_s
|
|
select
|
|
return
|
|
end
|
|
local.get 1
|
|
f32.neg
|
|
f32.const 0x0p+0 (;=0;)
|
|
local.get 3
|
|
i32.const 0
|
|
i32.lt_s
|
|
select
|
|
return
|
|
end
|
|
block ;; label = @3
|
|
local.get 3
|
|
i32.const -1
|
|
i32.le_s
|
|
br_if 0 (;@3;)
|
|
local.get 0
|
|
return
|
|
end
|
|
f32.const 0x1p+0 (;=1;)
|
|
local.get 0
|
|
f32.div
|
|
return
|
|
end
|
|
block ;; label = @2
|
|
local.get 3
|
|
i32.const 1073741824
|
|
i32.ne
|
|
br_if 0 (;@2;)
|
|
local.get 0
|
|
local.get 0
|
|
f32.mul
|
|
return
|
|
end
|
|
block ;; label = @2
|
|
local.get 6
|
|
i32.const 0
|
|
i32.lt_s
|
|
br_if 0 (;@2;)
|
|
local.get 3
|
|
i32.const 1056964608
|
|
i32.ne
|
|
br_if 0 (;@2;)
|
|
local.get 0
|
|
call $basicmath___ieee754_sqrtf
|
|
return
|
|
end
|
|
block ;; label = @2
|
|
block ;; label = @3
|
|
local.get 5
|
|
i32.eqz
|
|
br_if 0 (;@3;)
|
|
local.get 5
|
|
i32.const 1073741823
|
|
i32.and
|
|
i32.const 1065353216
|
|
i32.ne
|
|
br_if 1 (;@2;)
|
|
end
|
|
f32.const 0x1p+0 (;=1;)
|
|
local.get 2
|
|
f32.div
|
|
local.get 2
|
|
local.get 3
|
|
i32.const 0
|
|
i32.lt_s
|
|
select
|
|
local.set 2
|
|
local.get 6
|
|
i32.const -1
|
|
i32.gt_s
|
|
br_if 1 (;@1;)
|
|
block ;; label = @3
|
|
local.get 5
|
|
local.get 7
|
|
i32.add
|
|
i32.const 1065353216
|
|
i32.ne
|
|
br_if 0 (;@3;)
|
|
local.get 2
|
|
local.get 2
|
|
f32.sub
|
|
local.tee 0
|
|
local.get 0
|
|
f32.div
|
|
return
|
|
end
|
|
local.get 2
|
|
f32.neg
|
|
local.get 2
|
|
local.get 7
|
|
i32.const 1
|
|
i32.eq
|
|
select
|
|
return
|
|
end
|
|
block ;; label = @2
|
|
local.get 7
|
|
local.get 6
|
|
i32.const 31
|
|
i32.shr_u
|
|
i32.const -1
|
|
i32.add
|
|
local.tee 6
|
|
i32.or
|
|
br_if 0 (;@2;)
|
|
local.get 0
|
|
local.get 0
|
|
f32.sub
|
|
local.tee 0
|
|
local.get 0
|
|
f32.div
|
|
return
|
|
end
|
|
block ;; label = @2
|
|
block ;; label = @3
|
|
local.get 4
|
|
i32.const 1291845633
|
|
i32.lt_u
|
|
br_if 0 (;@3;)
|
|
block ;; label = @4
|
|
local.get 5
|
|
i32.const 1065353207
|
|
i32.gt_u
|
|
br_if 0 (;@4;)
|
|
f32.const inf (;=inf;)
|
|
f32.const 0x0p+0 (;=0;)
|
|
local.get 3
|
|
i32.const 0
|
|
i32.lt_s
|
|
select
|
|
return
|
|
end
|
|
block ;; label = @4
|
|
local.get 5
|
|
i32.const 1065353224
|
|
i32.lt_u
|
|
br_if 0 (;@4;)
|
|
f32.const inf (;=inf;)
|
|
f32.const 0x0p+0 (;=0;)
|
|
local.get 3
|
|
i32.const 0
|
|
i32.gt_s
|
|
select
|
|
return
|
|
end
|
|
local.get 0
|
|
f32.const -0x1p+0 (;=-1;)
|
|
f32.add
|
|
local.tee 0
|
|
f32.const 0x1.d94aep-18 (;=7.05261e-06;)
|
|
f32.mul
|
|
local.get 0
|
|
local.get 0
|
|
f32.mul
|
|
f32.const 0x1p-1 (;=0.5;)
|
|
local.get 0
|
|
local.get 0
|
|
f32.const -0x1p-2 (;=-0.25;)
|
|
f32.mul
|
|
f32.const 0x1.555556p-2 (;=0.333333;)
|
|
f32.add
|
|
f32.mul
|
|
f32.sub
|
|
f32.mul
|
|
f32.const -0x1.715476p+0 (;=-1.4427;)
|
|
f32.mul
|
|
f32.add
|
|
local.tee 2
|
|
local.get 2
|
|
local.get 0
|
|
f32.const 0x1.7154p+0 (;=1.44269;)
|
|
f32.mul
|
|
local.tee 10
|
|
f32.add
|
|
i32.reinterpret_f32
|
|
i32.const -4096
|
|
i32.and
|
|
f32.reinterpret_i32
|
|
local.tee 0
|
|
local.get 10
|
|
f32.sub
|
|
f32.sub
|
|
local.set 2
|
|
br 1 (;@2;)
|
|
end
|
|
local.get 2
|
|
f32.const 0x1p+24 (;=1.67772e+07;)
|
|
f32.mul
|
|
i32.reinterpret_f32
|
|
local.get 5
|
|
local.get 5
|
|
i32.const 8388608
|
|
i32.lt_u
|
|
local.tee 9
|
|
select
|
|
local.tee 5
|
|
i32.const 8388607
|
|
i32.and
|
|
local.tee 8
|
|
i32.const 1065353216
|
|
i32.or
|
|
local.set 4
|
|
i32.const -151
|
|
i32.const -127
|
|
local.get 9
|
|
select
|
|
local.get 5
|
|
i32.const 23
|
|
i32.shr_s
|
|
i32.add
|
|
local.set 9
|
|
i32.const 0
|
|
local.set 5
|
|
block ;; label = @3
|
|
local.get 8
|
|
i32.const 1885298
|
|
i32.lt_u
|
|
br_if 0 (;@3;)
|
|
block ;; label = @4
|
|
local.get 8
|
|
i32.const 6140887
|
|
i32.ge_u
|
|
br_if 0 (;@4;)
|
|
i32.const 1
|
|
local.set 5
|
|
br 1 (;@3;)
|
|
end
|
|
local.get 8
|
|
i32.const 1056964608
|
|
i32.or
|
|
local.set 4
|
|
local.get 9
|
|
i32.const 1
|
|
i32.add
|
|
local.set 9
|
|
end
|
|
local.get 5
|
|
i32.const 2
|
|
i32.shl
|
|
local.tee 8
|
|
i32.const 1032
|
|
i32.add
|
|
f32.load
|
|
local.get 4
|
|
f32.reinterpret_i32
|
|
local.tee 10
|
|
local.get 8
|
|
i32.const 1024
|
|
i32.add
|
|
f32.load
|
|
local.tee 11
|
|
f32.sub
|
|
local.tee 12
|
|
f32.const 0x1p+0 (;=1;)
|
|
local.get 11
|
|
local.get 10
|
|
f32.add
|
|
f32.div
|
|
local.tee 13
|
|
f32.mul
|
|
local.tee 2
|
|
i32.reinterpret_f32
|
|
i32.const -4096
|
|
i32.and
|
|
f32.reinterpret_i32
|
|
local.tee 0
|
|
local.get 0
|
|
local.get 0
|
|
f32.mul
|
|
local.tee 14
|
|
f32.const 0x1.8p+1 (;=3;)
|
|
f32.add
|
|
local.get 13
|
|
local.get 12
|
|
local.get 0
|
|
local.get 5
|
|
i32.const 21
|
|
i32.shl
|
|
local.get 4
|
|
i32.const 1
|
|
i32.shr_u
|
|
i32.add
|
|
i32.const 537133056
|
|
i32.add
|
|
f32.reinterpret_i32
|
|
local.tee 15
|
|
f32.mul
|
|
f32.sub
|
|
local.get 0
|
|
local.get 10
|
|
local.get 15
|
|
local.get 11
|
|
f32.sub
|
|
f32.sub
|
|
f32.mul
|
|
f32.sub
|
|
f32.mul
|
|
local.tee 10
|
|
local.get 2
|
|
local.get 0
|
|
f32.add
|
|
f32.mul
|
|
local.get 2
|
|
local.get 2
|
|
f32.mul
|
|
local.tee 0
|
|
local.get 0
|
|
f32.mul
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
f32.const 0x1.a7e284p-3 (;=0.206975;)
|
|
f32.mul
|
|
f32.const 0x1.d864aap-3 (;=0.230661;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.17460ap-2 (;=0.272728;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.555556p-2 (;=0.333333;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.b6db6ep-2 (;=0.428571;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.333334p-1 (;=0.6;)
|
|
f32.add
|
|
f32.mul
|
|
f32.add
|
|
local.tee 11
|
|
f32.add
|
|
i32.reinterpret_f32
|
|
i32.const -4096
|
|
i32.and
|
|
f32.reinterpret_i32
|
|
local.tee 0
|
|
f32.mul
|
|
local.tee 12
|
|
local.get 10
|
|
local.get 0
|
|
f32.mul
|
|
local.get 2
|
|
local.get 11
|
|
local.get 0
|
|
f32.const -0x1.8p+1 (;=-3;)
|
|
f32.add
|
|
local.get 14
|
|
f32.sub
|
|
f32.sub
|
|
f32.mul
|
|
f32.add
|
|
local.tee 2
|
|
f32.add
|
|
i32.reinterpret_f32
|
|
i32.const -4096
|
|
i32.and
|
|
f32.reinterpret_i32
|
|
local.tee 0
|
|
f32.const 0x1.3b874p-18 (;=4.70174e-06;)
|
|
f32.mul
|
|
local.get 2
|
|
local.get 0
|
|
local.get 12
|
|
f32.sub
|
|
f32.sub
|
|
f32.const 0x1.ec709ep-1 (;=0.961797;)
|
|
f32.mul
|
|
f32.add
|
|
f32.add
|
|
local.tee 2
|
|
local.get 8
|
|
i32.const 1040
|
|
i32.add
|
|
f32.load
|
|
local.tee 10
|
|
local.get 2
|
|
local.get 0
|
|
f32.const 0x1.ec7p-1 (;=0.961792;)
|
|
f32.mul
|
|
local.tee 11
|
|
f32.add
|
|
f32.add
|
|
local.get 9
|
|
f32.convert_i32_s
|
|
local.tee 2
|
|
f32.add
|
|
i32.reinterpret_f32
|
|
i32.const -4096
|
|
i32.and
|
|
f32.reinterpret_i32
|
|
local.tee 0
|
|
local.get 2
|
|
f32.sub
|
|
local.get 10
|
|
f32.sub
|
|
local.get 11
|
|
f32.sub
|
|
f32.sub
|
|
local.set 2
|
|
end
|
|
f32.const 0x1p+0 (;=1;)
|
|
f32.const -0x1p+0 (;=-1;)
|
|
local.get 7
|
|
i32.const -1
|
|
i32.add
|
|
local.get 6
|
|
i32.or
|
|
select
|
|
local.set 10
|
|
block ;; label = @2
|
|
local.get 1
|
|
local.get 3
|
|
i32.const -4096
|
|
i32.and
|
|
f32.reinterpret_i32
|
|
local.tee 11
|
|
f32.sub
|
|
local.get 0
|
|
f32.mul
|
|
local.get 2
|
|
local.get 1
|
|
f32.mul
|
|
f32.add
|
|
local.tee 2
|
|
local.get 0
|
|
local.get 11
|
|
f32.mul
|
|
local.tee 0
|
|
f32.add
|
|
local.tee 1
|
|
i32.reinterpret_f32
|
|
local.tee 4
|
|
i32.const 1124073473
|
|
i32.lt_s
|
|
br_if 0 (;@2;)
|
|
local.get 10
|
|
f32.const 0x1.93e594p+99 (;=1e+30;)
|
|
f32.mul
|
|
f32.const 0x1.93e594p+99 (;=1e+30;)
|
|
f32.mul
|
|
return
|
|
end
|
|
block ;; label = @2
|
|
block ;; label = @3
|
|
local.get 4
|
|
i32.const 1124073472
|
|
i32.ne
|
|
br_if 0 (;@3;)
|
|
block ;; label = @4
|
|
local.get 2
|
|
f32.const 0x1.715478p-25 (;=4.29957e-08;)
|
|
f32.add
|
|
local.get 1
|
|
local.get 0
|
|
f32.sub
|
|
f32.gt
|
|
br_if 0 (;@4;)
|
|
local.get 1
|
|
i32.reinterpret_f32
|
|
i32.const 2147483647
|
|
i32.and
|
|
local.set 3
|
|
br 2 (;@2;)
|
|
end
|
|
local.get 10
|
|
f32.const 0x1.93e594p+99 (;=1e+30;)
|
|
f32.mul
|
|
f32.const 0x1.93e594p+99 (;=1e+30;)
|
|
f32.mul
|
|
return
|
|
end
|
|
block ;; label = @3
|
|
local.get 1
|
|
i32.reinterpret_f32
|
|
i32.const 2147483647
|
|
i32.and
|
|
local.tee 3
|
|
i32.const 1125515265
|
|
i32.lt_u
|
|
br_if 0 (;@3;)
|
|
local.get 10
|
|
f32.const 0x1.4484cp-100 (;=1e-30;)
|
|
f32.mul
|
|
f32.const 0x1.4484cp-100 (;=1e-30;)
|
|
f32.mul
|
|
return
|
|
end
|
|
local.get 4
|
|
i32.const -1021968384
|
|
i32.ne
|
|
br_if 0 (;@2;)
|
|
local.get 2
|
|
local.get 1
|
|
local.get 0
|
|
f32.sub
|
|
f32.le
|
|
i32.eqz
|
|
br_if 0 (;@2;)
|
|
local.get 10
|
|
f32.const 0x1.4484cp-100 (;=1e-30;)
|
|
f32.mul
|
|
f32.const 0x1.4484cp-100 (;=1e-30;)
|
|
f32.mul
|
|
return
|
|
end
|
|
i32.const 0
|
|
local.set 5
|
|
block ;; label = @2
|
|
local.get 3
|
|
i32.const 1056964609
|
|
i32.lt_u
|
|
br_if 0 (;@2;)
|
|
i32.const 0
|
|
i32.const 8388608
|
|
local.get 3
|
|
i32.const 23
|
|
i32.shr_u
|
|
i32.const -126
|
|
i32.add
|
|
i32.shr_u
|
|
local.get 4
|
|
i32.add
|
|
local.tee 3
|
|
i32.const 8388607
|
|
i32.and
|
|
i32.const 8388608
|
|
i32.or
|
|
i32.const 150
|
|
local.get 3
|
|
i32.const 23
|
|
i32.shr_u
|
|
i32.const 255
|
|
i32.and
|
|
local.tee 7
|
|
i32.sub
|
|
i32.shr_u
|
|
local.tee 5
|
|
i32.sub
|
|
local.get 5
|
|
local.get 4
|
|
i32.const 0
|
|
i32.lt_s
|
|
select
|
|
local.set 5
|
|
local.get 2
|
|
local.get 0
|
|
i32.const -8388608
|
|
local.get 7
|
|
i32.const -127
|
|
i32.add
|
|
i32.shr_s
|
|
local.get 3
|
|
i32.and
|
|
f32.reinterpret_i32
|
|
f32.sub
|
|
local.tee 0
|
|
f32.add
|
|
i32.reinterpret_f32
|
|
local.set 4
|
|
end
|
|
block ;; label = @2
|
|
block ;; label = @3
|
|
local.get 5
|
|
i32.const 23
|
|
i32.shl
|
|
local.get 4
|
|
i32.const -4096
|
|
i32.and
|
|
f32.reinterpret_i32
|
|
local.tee 1
|
|
f32.const 0x1.62e4p-1 (;=0.693146;)
|
|
f32.mul
|
|
local.tee 11
|
|
local.get 2
|
|
local.get 1
|
|
local.get 0
|
|
f32.sub
|
|
f32.sub
|
|
f32.const 0x1.62e43p-1 (;=0.693147;)
|
|
f32.mul
|
|
local.get 1
|
|
f32.const 0x1.7f7d18p-20 (;=1.42861e-06;)
|
|
f32.mul
|
|
f32.add
|
|
local.tee 2
|
|
f32.add
|
|
local.tee 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
f32.mul
|
|
local.tee 1
|
|
local.get 1
|
|
local.get 1
|
|
local.get 1
|
|
local.get 1
|
|
f32.const 0x1.637698p-25 (;=4.13814e-08;)
|
|
f32.mul
|
|
f32.const -0x1.bbd41cp-20 (;=-1.65339e-06;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.1566aap-14 (;=6.61376e-05;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.6c16c2p-9 (;=-0.00277778;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.555556p-3 (;=0.166667;)
|
|
f32.add
|
|
f32.mul
|
|
f32.sub
|
|
local.tee 1
|
|
f32.mul
|
|
local.get 1
|
|
f32.const -0x1p+1 (;=-2;)
|
|
f32.add
|
|
f32.div
|
|
local.get 0
|
|
local.get 2
|
|
local.get 0
|
|
local.get 11
|
|
f32.sub
|
|
f32.sub
|
|
local.tee 1
|
|
f32.mul
|
|
local.get 1
|
|
f32.add
|
|
f32.sub
|
|
f32.sub
|
|
f32.const 0x1p+0 (;=1;)
|
|
f32.add
|
|
local.tee 0
|
|
i32.reinterpret_f32
|
|
i32.add
|
|
local.tee 4
|
|
i32.const 8388607
|
|
i32.gt_s
|
|
br_if 0 (;@3;)
|
|
local.get 0
|
|
local.get 5
|
|
call $basicmath___scalbnf
|
|
local.set 0
|
|
br 1 (;@2;)
|
|
end
|
|
local.get 4
|
|
f32.reinterpret_i32
|
|
local.set 0
|
|
end
|
|
local.get 10
|
|
local.get 0
|
|
f32.mul
|
|
local.set 2
|
|
end
|
|
local.get 2)
|
|
(func $basicmath___scalbnf (type 6) (param f32 i32) (result f32)
|
|
(local i32 i32)
|
|
block ;; label = @1
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
local.tee 2
|
|
i32.const 23
|
|
i32.shr_u
|
|
i32.const 255
|
|
i32.and
|
|
local.tee 3
|
|
i32.const 255
|
|
i32.eq
|
|
br_if 0 (;@1;)
|
|
block ;; label = @2
|
|
block ;; label = @3
|
|
local.get 3
|
|
br_if 0 (;@3;)
|
|
local.get 0
|
|
f32.const 0x0p+0 (;=0;)
|
|
f32.eq
|
|
br_if 1 (;@2;)
|
|
local.get 0
|
|
f32.const 0x1p+25 (;=3.35544e+07;)
|
|
f32.mul
|
|
local.tee 0
|
|
i32.reinterpret_f32
|
|
local.tee 2
|
|
i32.const 23
|
|
i32.shr_u
|
|
i32.const 255
|
|
i32.and
|
|
i32.const -25
|
|
i32.add
|
|
local.set 3
|
|
end
|
|
block ;; label = @3
|
|
block ;; label = @4
|
|
local.get 1
|
|
i32.const 50000
|
|
i32.gt_s
|
|
br_if 0 (;@4;)
|
|
local.get 3
|
|
local.get 1
|
|
i32.add
|
|
local.tee 3
|
|
i32.const 255
|
|
i32.lt_s
|
|
br_if 1 (;@3;)
|
|
end
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
i32.const -2147483648
|
|
i32.and
|
|
i32.const 1900671690
|
|
i32.or
|
|
f32.reinterpret_i32
|
|
f32.const 0x1.93e594p+99 (;=1e+30;)
|
|
f32.mul
|
|
return
|
|
end
|
|
block ;; label = @3
|
|
local.get 1
|
|
i32.const -50001
|
|
i32.gt_s
|
|
br_if 0 (;@3;)
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
i32.const -2147483648
|
|
i32.and
|
|
i32.const 228737632
|
|
i32.or
|
|
f32.reinterpret_i32
|
|
f32.const 0x1.4484cp-100 (;=1e-30;)
|
|
f32.mul
|
|
return
|
|
end
|
|
block ;; label = @3
|
|
local.get 3
|
|
i32.const 1
|
|
i32.lt_s
|
|
br_if 0 (;@3;)
|
|
local.get 2
|
|
i32.const -2139095041
|
|
i32.and
|
|
local.get 3
|
|
i32.const 23
|
|
i32.shl
|
|
i32.or
|
|
f32.reinterpret_i32
|
|
return
|
|
end
|
|
block ;; label = @3
|
|
local.get 3
|
|
i32.const -25
|
|
i32.gt_s
|
|
br_if 0 (;@3;)
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
i32.const -2147483648
|
|
i32.and
|
|
i32.const 228737632
|
|
i32.or
|
|
f32.reinterpret_i32
|
|
f32.const 0x1.4484cp-100 (;=1e-30;)
|
|
f32.mul
|
|
return
|
|
end
|
|
local.get 3
|
|
i32.const 23
|
|
i32.shl
|
|
i32.const 209715200
|
|
i32.add
|
|
local.get 2
|
|
i32.const -2139095041
|
|
i32.and
|
|
i32.or
|
|
f32.reinterpret_i32
|
|
f32.const 0x1p-25 (;=2.98023e-08;)
|
|
f32.mul
|
|
local.set 0
|
|
end
|
|
local.get 0
|
|
return
|
|
end
|
|
local.get 0
|
|
local.get 0
|
|
f32.add)
|
|
(func $basicmath___fabsf (type 4) (param f32) (result f32)
|
|
local.get 0
|
|
f32.abs)
|
|
(func $basicmath___ieee754_rem_pio2f (type 7) (param f32 i32) (result i32)
|
|
(local f32 i32 i32 i32 f32 f32 f32)
|
|
block ;; label = @1
|
|
local.get 0
|
|
f32.abs
|
|
local.tee 2
|
|
i32.reinterpret_f32
|
|
local.tee 3
|
|
i32.const 1061752792
|
|
i32.gt_u
|
|
br_if 0 (;@1;)
|
|
local.get 1
|
|
i32.const 0
|
|
i32.store offset=4
|
|
local.get 1
|
|
local.get 0
|
|
f32.store
|
|
i32.const 0
|
|
return
|
|
end
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
local.set 4
|
|
block ;; label = @1
|
|
local.get 3
|
|
i32.const 1075235811
|
|
i32.gt_u
|
|
br_if 0 (;@1;)
|
|
local.get 3
|
|
i32.const 2147483632
|
|
i32.and
|
|
local.set 3
|
|
block ;; label = @2
|
|
local.get 4
|
|
i32.const 1
|
|
i32.lt_s
|
|
br_if 0 (;@2;)
|
|
local.get 0
|
|
f32.const -0x1.921fp+0 (;=-1.57079;)
|
|
f32.add
|
|
local.set 0
|
|
block ;; label = @3
|
|
local.get 3
|
|
i32.const 1070141392
|
|
i32.eq
|
|
br_if 0 (;@3;)
|
|
local.get 1
|
|
local.get 0
|
|
f32.const -0x1.6a8886p-17 (;=-1.08043e-05;)
|
|
f32.add
|
|
local.tee 2
|
|
f32.store
|
|
local.get 1
|
|
local.get 0
|
|
local.get 2
|
|
f32.sub
|
|
f32.const -0x1.6a8886p-17 (;=-1.08043e-05;)
|
|
f32.add
|
|
f32.store offset=4
|
|
i32.const 1
|
|
return
|
|
end
|
|
local.get 1
|
|
local.get 0
|
|
f32.const -0x1.6a88p-17 (;=-1.08043e-05;)
|
|
f32.add
|
|
local.tee 0
|
|
f32.const -0x1.0b461p-34 (;=-6.0771e-11;)
|
|
f32.add
|
|
local.tee 2
|
|
f32.store
|
|
local.get 1
|
|
local.get 0
|
|
local.get 2
|
|
f32.sub
|
|
f32.const -0x1.0b461p-34 (;=-6.0771e-11;)
|
|
f32.add
|
|
f32.store offset=4
|
|
i32.const 1
|
|
return
|
|
end
|
|
local.get 0
|
|
f32.const 0x1.921fp+0 (;=1.57079;)
|
|
f32.add
|
|
local.set 0
|
|
block ;; label = @2
|
|
local.get 3
|
|
i32.const 1070141392
|
|
i32.eq
|
|
br_if 0 (;@2;)
|
|
local.get 1
|
|
local.get 0
|
|
f32.const 0x1.6a8886p-17 (;=1.08043e-05;)
|
|
f32.add
|
|
local.tee 2
|
|
f32.store
|
|
local.get 1
|
|
local.get 0
|
|
local.get 2
|
|
f32.sub
|
|
f32.const 0x1.6a8886p-17 (;=1.08043e-05;)
|
|
f32.add
|
|
f32.store offset=4
|
|
i32.const -1
|
|
return
|
|
end
|
|
local.get 1
|
|
local.get 0
|
|
f32.const 0x1.6a88p-17 (;=1.08043e-05;)
|
|
f32.add
|
|
local.tee 0
|
|
f32.const 0x1.0b461p-34 (;=6.0771e-11;)
|
|
f32.add
|
|
local.tee 2
|
|
f32.store
|
|
local.get 1
|
|
local.get 0
|
|
local.get 2
|
|
f32.sub
|
|
f32.const 0x1.0b461p-34 (;=6.0771e-11;)
|
|
f32.add
|
|
f32.store offset=4
|
|
i32.const -1
|
|
return
|
|
end
|
|
block ;; label = @1
|
|
block ;; label = @2
|
|
local.get 3
|
|
i32.const 1128861568
|
|
i32.gt_u
|
|
br_if 0 (;@2;)
|
|
block ;; label = @3
|
|
block ;; label = @4
|
|
local.get 2
|
|
f32.const 0x1.45f308p-1 (;=0.63662;)
|
|
f32.mul
|
|
f32.const 0x1p-1 (;=0.5;)
|
|
f32.add
|
|
local.tee 0
|
|
f32.abs
|
|
f32.const 0x1p+31 (;=2.14748e+09;)
|
|
f32.lt
|
|
i32.eqz
|
|
br_if 0 (;@4;)
|
|
local.get 0
|
|
i32.trunc_f32_s
|
|
local.set 5
|
|
br 1 (;@3;)
|
|
end
|
|
i32.const -2147483648
|
|
local.set 5
|
|
end
|
|
local.get 5
|
|
f32.convert_i32_s
|
|
local.tee 6
|
|
f32.const 0x1.6a8886p-17 (;=1.08043e-05;)
|
|
f32.mul
|
|
local.set 7
|
|
local.get 2
|
|
local.get 6
|
|
f32.const -0x1.921fp+0 (;=-1.57079;)
|
|
f32.mul
|
|
f32.add
|
|
local.set 0
|
|
block ;; label = @3
|
|
block ;; label = @4
|
|
block ;; label = @5
|
|
local.get 5
|
|
i32.const 31
|
|
i32.gt_s
|
|
br_if 0 (;@5;)
|
|
local.get 3
|
|
i32.const 2147483392
|
|
i32.and
|
|
local.get 5
|
|
i32.const 2
|
|
i32.shl
|
|
i32.const 1052
|
|
i32.add
|
|
i32.load
|
|
i32.ne
|
|
br_if 1 (;@4;)
|
|
end
|
|
local.get 1
|
|
local.get 0
|
|
local.get 7
|
|
f32.sub
|
|
local.tee 2
|
|
f32.store
|
|
local.get 3
|
|
i32.const 23
|
|
i32.shr_u
|
|
local.tee 3
|
|
local.get 2
|
|
i32.reinterpret_f32
|
|
i32.const 23
|
|
i32.shr_u
|
|
i32.const 255
|
|
i32.and
|
|
i32.sub
|
|
i32.const 9
|
|
i32.lt_s
|
|
br_if 1 (;@3;)
|
|
local.get 1
|
|
local.get 0
|
|
local.get 6
|
|
f32.const 0x1.6a88p-17 (;=1.08043e-05;)
|
|
f32.mul
|
|
local.tee 2
|
|
f32.sub
|
|
local.tee 8
|
|
local.get 6
|
|
f32.const 0x1.0b461p-34 (;=6.0771e-11;)
|
|
f32.mul
|
|
local.get 0
|
|
local.get 8
|
|
f32.sub
|
|
local.get 2
|
|
f32.sub
|
|
f32.sub
|
|
local.tee 7
|
|
f32.sub
|
|
local.tee 2
|
|
f32.store
|
|
block ;; label = @5
|
|
local.get 3
|
|
local.get 2
|
|
i32.reinterpret_f32
|
|
i32.const 23
|
|
i32.shr_u
|
|
i32.const 255
|
|
i32.and
|
|
i32.sub
|
|
i32.const 26
|
|
i32.ge_s
|
|
br_if 0 (;@5;)
|
|
local.get 8
|
|
local.set 0
|
|
br 2 (;@3;)
|
|
end
|
|
local.get 6
|
|
f32.const 0x1.1a6264p-54 (;=6.12323e-17;)
|
|
f32.mul
|
|
local.get 8
|
|
local.get 8
|
|
local.get 6
|
|
f32.const 0x1.0b46p-34 (;=6.07709e-11;)
|
|
f32.mul
|
|
local.tee 2
|
|
f32.sub
|
|
local.tee 0
|
|
f32.sub
|
|
local.get 2
|
|
f32.sub
|
|
f32.sub
|
|
local.set 7
|
|
end
|
|
local.get 1
|
|
local.get 0
|
|
local.get 7
|
|
f32.sub
|
|
local.tee 2
|
|
f32.store
|
|
end
|
|
local.get 1
|
|
local.get 0
|
|
local.get 2
|
|
f32.sub
|
|
local.get 7
|
|
f32.sub
|
|
local.tee 0
|
|
f32.store offset=4
|
|
local.get 4
|
|
i32.const -1
|
|
i32.gt_s
|
|
br_if 1 (;@1;)
|
|
local.get 1
|
|
local.get 0
|
|
f32.neg
|
|
f32.store offset=4
|
|
local.get 1
|
|
local.get 2
|
|
f32.neg
|
|
f32.store
|
|
i32.const 0
|
|
local.get 5
|
|
i32.sub
|
|
return
|
|
end
|
|
local.get 1
|
|
local.get 0
|
|
local.get 0
|
|
f32.sub
|
|
local.tee 0
|
|
f32.store
|
|
local.get 1
|
|
local.get 0
|
|
f32.store offset=4
|
|
i32.const 0
|
|
local.set 5
|
|
end
|
|
local.get 5)
|
|
(func $basicmath___cosf (type 4) (param f32) (result f32)
|
|
(local i32 i32 i32 i32 f32 f32 f32 f32)
|
|
global.get $__stack_pointer
|
|
i32.const 16
|
|
i32.sub
|
|
local.tee 1
|
|
global.set $__stack_pointer
|
|
block ;; label = @1
|
|
block ;; label = @2
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
i32.const 2147483647
|
|
i32.and
|
|
local.tee 2
|
|
i32.const 1061752792
|
|
i32.gt_u
|
|
br_if 0 (;@2;)
|
|
local.get 2
|
|
i32.const 838860799
|
|
i32.gt_u
|
|
local.set 3
|
|
block ;; label = @3
|
|
block ;; label = @4
|
|
local.get 0
|
|
f32.abs
|
|
f32.const 0x1p+31 (;=2.14748e+09;)
|
|
f32.lt
|
|
i32.eqz
|
|
br_if 0 (;@4;)
|
|
local.get 0
|
|
i32.trunc_f32_s
|
|
local.set 4
|
|
br 1 (;@3;)
|
|
end
|
|
i32.const -2147483648
|
|
local.set 4
|
|
end
|
|
block ;; label = @3
|
|
local.get 3
|
|
br_if 0 (;@3;)
|
|
local.get 4
|
|
br_if 0 (;@3;)
|
|
f32.const 0x1p+0 (;=1;)
|
|
local.set 0
|
|
br 2 (;@1;)
|
|
end
|
|
local.get 0
|
|
local.get 0
|
|
f32.mul
|
|
local.tee 5
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
f32.const -0x1.8fae9cp-37 (;=-1.13596e-11;)
|
|
f32.mul
|
|
f32.const 0x1.1ee9ecp-29 (;=2.08757e-09;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.27e4f8p-22 (;=-2.75573e-07;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.a01a02p-16 (;=2.48016e-05;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.6c16c2p-10 (;=-0.00138889;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.555556p-5 (;=0.0416667;)
|
|
f32.add
|
|
f32.mul
|
|
local.set 6
|
|
block ;; label = @3
|
|
local.get 2
|
|
i32.const 1050253721
|
|
i32.gt_u
|
|
br_if 0 (;@3;)
|
|
f32.const 0x1p+0 (;=1;)
|
|
local.get 5
|
|
f32.const 0x1p-1 (;=0.5;)
|
|
f32.mul
|
|
local.get 5
|
|
local.get 6
|
|
f32.mul
|
|
local.get 0
|
|
f32.const -0x0p+0 (;=-0;)
|
|
f32.mul
|
|
f32.add
|
|
f32.sub
|
|
f32.sub
|
|
local.set 0
|
|
br 2 (;@1;)
|
|
end
|
|
f32.const 0x1p+0 (;=1;)
|
|
f32.const 0x1.2p-2 (;=0.28125;)
|
|
local.get 2
|
|
i32.const -16777216
|
|
i32.add
|
|
f32.reinterpret_i32
|
|
local.get 2
|
|
i32.const 1061683200
|
|
i32.gt_u
|
|
select
|
|
local.tee 7
|
|
f32.sub
|
|
local.get 5
|
|
local.get 6
|
|
f32.mul
|
|
local.get 0
|
|
f32.const -0x0p+0 (;=-0;)
|
|
f32.mul
|
|
f32.add
|
|
local.get 5
|
|
f32.const 0x1p-1 (;=0.5;)
|
|
f32.mul
|
|
local.get 7
|
|
f32.sub
|
|
f32.sub
|
|
f32.add
|
|
local.set 0
|
|
br 1 (;@1;)
|
|
end
|
|
block ;; label = @2
|
|
local.get 2
|
|
i32.const 2139095040
|
|
i32.lt_u
|
|
br_if 0 (;@2;)
|
|
local.get 0
|
|
local.get 0
|
|
f32.sub
|
|
local.set 0
|
|
br 1 (;@1;)
|
|
end
|
|
local.get 0
|
|
local.get 1
|
|
i32.const 8
|
|
i32.add
|
|
call $basicmath___ieee754_rem_pio2f
|
|
local.set 2
|
|
local.get 1
|
|
f32.load offset=8
|
|
local.set 0
|
|
block ;; label = @2
|
|
block ;; label = @3
|
|
block ;; label = @4
|
|
block ;; label = @5
|
|
local.get 2
|
|
i32.const 3
|
|
i32.and
|
|
br_table 0 (;@5;) 1 (;@4;) 2 (;@3;) 3 (;@2;) 0 (;@5;)
|
|
end
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
i32.const 2147483647
|
|
i32.and
|
|
local.tee 2
|
|
i32.const 838860799
|
|
i32.gt_u
|
|
local.set 3
|
|
block ;; label = @5
|
|
block ;; label = @6
|
|
local.get 0
|
|
f32.abs
|
|
f32.const 0x1p+31 (;=2.14748e+09;)
|
|
f32.lt
|
|
i32.eqz
|
|
br_if 0 (;@6;)
|
|
local.get 0
|
|
i32.trunc_f32_s
|
|
local.set 4
|
|
br 1 (;@5;)
|
|
end
|
|
i32.const -2147483648
|
|
local.set 4
|
|
end
|
|
local.get 1
|
|
f32.load offset=12
|
|
local.set 6
|
|
block ;; label = @5
|
|
local.get 3
|
|
br_if 0 (;@5;)
|
|
local.get 4
|
|
br_if 0 (;@5;)
|
|
f32.const 0x1p+0 (;=1;)
|
|
local.set 0
|
|
br 4 (;@1;)
|
|
end
|
|
local.get 0
|
|
local.get 0
|
|
f32.mul
|
|
local.tee 5
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
f32.const -0x1.8fae9cp-37 (;=-1.13596e-11;)
|
|
f32.mul
|
|
f32.const 0x1.1ee9ecp-29 (;=2.08757e-09;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.27e4f8p-22 (;=-2.75573e-07;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.a01a02p-16 (;=2.48016e-05;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.6c16c2p-10 (;=-0.00138889;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.555556p-5 (;=0.0416667;)
|
|
f32.add
|
|
f32.mul
|
|
local.set 7
|
|
block ;; label = @5
|
|
local.get 2
|
|
i32.const 1050253721
|
|
i32.gt_u
|
|
br_if 0 (;@5;)
|
|
f32.const 0x1p+0 (;=1;)
|
|
local.get 5
|
|
f32.const 0x1p-1 (;=0.5;)
|
|
f32.mul
|
|
local.get 5
|
|
local.get 7
|
|
f32.mul
|
|
local.get 6
|
|
local.get 0
|
|
f32.mul
|
|
f32.sub
|
|
f32.sub
|
|
f32.sub
|
|
local.set 0
|
|
br 4 (;@1;)
|
|
end
|
|
f32.const 0x1p+0 (;=1;)
|
|
f32.const 0x1.2p-2 (;=0.28125;)
|
|
local.get 2
|
|
i32.const -16777216
|
|
i32.add
|
|
f32.reinterpret_i32
|
|
local.get 2
|
|
i32.const 1061683200
|
|
i32.gt_u
|
|
select
|
|
local.tee 8
|
|
f32.sub
|
|
local.get 5
|
|
local.get 7
|
|
f32.mul
|
|
local.get 6
|
|
local.get 0
|
|
f32.mul
|
|
f32.sub
|
|
local.get 5
|
|
f32.const 0x1p-1 (;=0.5;)
|
|
f32.mul
|
|
local.get 8
|
|
f32.sub
|
|
f32.sub
|
|
f32.add
|
|
local.set 0
|
|
br 3 (;@1;)
|
|
end
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
i32.const 2147483647
|
|
i32.and
|
|
i32.const 838860799
|
|
i32.gt_u
|
|
local.set 2
|
|
block ;; label = @4
|
|
block ;; label = @5
|
|
local.get 0
|
|
f32.abs
|
|
f32.const 0x1p+31 (;=2.14748e+09;)
|
|
f32.lt
|
|
i32.eqz
|
|
br_if 0 (;@5;)
|
|
local.get 0
|
|
i32.trunc_f32_s
|
|
local.set 3
|
|
br 1 (;@4;)
|
|
end
|
|
i32.const -2147483648
|
|
local.set 3
|
|
end
|
|
block ;; label = @4
|
|
block ;; label = @5
|
|
local.get 2
|
|
br_if 0 (;@5;)
|
|
local.get 3
|
|
i32.eqz
|
|
br_if 1 (;@4;)
|
|
end
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
f32.mul
|
|
local.tee 5
|
|
f32.neg
|
|
f32.mul
|
|
local.tee 6
|
|
f32.const -0x1.555556p-3 (;=-0.166667;)
|
|
f32.mul
|
|
local.get 5
|
|
local.get 1
|
|
f32.load offset=12
|
|
local.tee 7
|
|
f32.const 0x1p-1 (;=0.5;)
|
|
f32.mul
|
|
local.get 6
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
f32.const 0x1.5d93a6p-33 (;=1.58969e-10;)
|
|
f32.mul
|
|
f32.const -0x1.ae5e68p-26 (;=-2.50508e-08;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.71de36p-19 (;=2.75573e-06;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.a01a02p-13 (;=-0.000198413;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.111112p-7 (;=0.00833333;)
|
|
f32.add
|
|
f32.mul
|
|
f32.add
|
|
f32.mul
|
|
local.get 7
|
|
f32.sub
|
|
f32.add
|
|
f32.sub
|
|
local.set 0
|
|
end
|
|
local.get 0
|
|
f32.neg
|
|
local.set 0
|
|
br 2 (;@1;)
|
|
end
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
i32.const 2147483647
|
|
i32.and
|
|
local.tee 2
|
|
i32.const 838860799
|
|
i32.gt_u
|
|
local.set 3
|
|
block ;; label = @3
|
|
block ;; label = @4
|
|
local.get 0
|
|
f32.abs
|
|
f32.const 0x1p+31 (;=2.14748e+09;)
|
|
f32.lt
|
|
i32.eqz
|
|
br_if 0 (;@4;)
|
|
local.get 0
|
|
i32.trunc_f32_s
|
|
local.set 4
|
|
br 1 (;@3;)
|
|
end
|
|
i32.const -2147483648
|
|
local.set 4
|
|
end
|
|
local.get 1
|
|
f32.load offset=12
|
|
local.set 6
|
|
block ;; label = @3
|
|
block ;; label = @4
|
|
local.get 3
|
|
br_if 0 (;@4;)
|
|
f32.const 0x1p+0 (;=1;)
|
|
local.set 5
|
|
local.get 4
|
|
i32.eqz
|
|
br_if 1 (;@3;)
|
|
end
|
|
local.get 0
|
|
local.get 0
|
|
f32.mul
|
|
local.tee 5
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
f32.const -0x1.8fae9cp-37 (;=-1.13596e-11;)
|
|
f32.mul
|
|
f32.const 0x1.1ee9ecp-29 (;=2.08757e-09;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.27e4f8p-22 (;=-2.75573e-07;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.a01a02p-16 (;=2.48016e-05;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.6c16c2p-10 (;=-0.00138889;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.555556p-5 (;=0.0416667;)
|
|
f32.add
|
|
f32.mul
|
|
local.set 7
|
|
block ;; label = @4
|
|
local.get 2
|
|
i32.const 1050253721
|
|
i32.gt_u
|
|
br_if 0 (;@4;)
|
|
f32.const 0x1p+0 (;=1;)
|
|
local.get 5
|
|
f32.const 0x1p-1 (;=0.5;)
|
|
f32.mul
|
|
local.get 5
|
|
local.get 7
|
|
f32.mul
|
|
local.get 6
|
|
local.get 0
|
|
f32.mul
|
|
f32.sub
|
|
f32.sub
|
|
f32.sub
|
|
f32.neg
|
|
local.set 0
|
|
br 3 (;@1;)
|
|
end
|
|
f32.const 0x1p+0 (;=1;)
|
|
f32.const 0x1.2p-2 (;=0.28125;)
|
|
local.get 2
|
|
i32.const -16777216
|
|
i32.add
|
|
f32.reinterpret_i32
|
|
local.get 2
|
|
i32.const 1061683200
|
|
i32.gt_u
|
|
select
|
|
local.tee 8
|
|
f32.sub
|
|
local.get 5
|
|
local.get 7
|
|
f32.mul
|
|
local.get 6
|
|
local.get 0
|
|
f32.mul
|
|
f32.sub
|
|
local.get 5
|
|
f32.const 0x1p-1 (;=0.5;)
|
|
f32.mul
|
|
local.get 8
|
|
f32.sub
|
|
f32.sub
|
|
f32.add
|
|
local.set 5
|
|
end
|
|
local.get 5
|
|
f32.neg
|
|
local.set 0
|
|
br 1 (;@1;)
|
|
end
|
|
local.get 0
|
|
i32.reinterpret_f32
|
|
i32.const 2147483647
|
|
i32.and
|
|
i32.const 838860799
|
|
i32.gt_u
|
|
local.set 2
|
|
block ;; label = @2
|
|
block ;; label = @3
|
|
local.get 0
|
|
f32.abs
|
|
f32.const 0x1p+31 (;=2.14748e+09;)
|
|
f32.lt
|
|
i32.eqz
|
|
br_if 0 (;@3;)
|
|
local.get 0
|
|
i32.trunc_f32_s
|
|
local.set 3
|
|
br 1 (;@2;)
|
|
end
|
|
i32.const -2147483648
|
|
local.set 3
|
|
end
|
|
block ;; label = @2
|
|
local.get 2
|
|
br_if 0 (;@2;)
|
|
local.get 3
|
|
i32.eqz
|
|
br_if 1 (;@1;)
|
|
end
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
local.get 0
|
|
f32.mul
|
|
local.tee 5
|
|
f32.neg
|
|
f32.mul
|
|
local.tee 6
|
|
f32.const -0x1.555556p-3 (;=-0.166667;)
|
|
f32.mul
|
|
local.get 5
|
|
local.get 1
|
|
f32.load offset=12
|
|
local.tee 7
|
|
f32.const 0x1p-1 (;=0.5;)
|
|
f32.mul
|
|
local.get 6
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
local.get 5
|
|
f32.const 0x1.5d93a6p-33 (;=1.58969e-10;)
|
|
f32.mul
|
|
f32.const -0x1.ae5e68p-26 (;=-2.50508e-08;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.71de36p-19 (;=2.75573e-06;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const -0x1.a01a02p-13 (;=-0.000198413;)
|
|
f32.add
|
|
f32.mul
|
|
f32.const 0x1.111112p-7 (;=0.00833333;)
|
|
f32.add
|
|
f32.mul
|
|
f32.add
|
|
f32.mul
|
|
local.get 7
|
|
f32.sub
|
|
f32.add
|
|
f32.sub
|
|
local.set 0
|
|
end
|
|
local.get 1
|
|
i32.const 16
|
|
i32.add
|
|
global.set $__stack_pointer
|
|
local.get 0)
|
|
(table (;0;) 1 1 funcref)
|
|
(memory (;0;) 1)
|
|
(global $__stack_pointer (mut i32) (i32.const 5376))
|
|
(global (;1;) i32 (i32.const 1276))
|
|
(global (;2;) i32 (i32.const 5376))
|
|
(export "memory" (memory 0))
|
|
(export "__wasm_apply_data_relocs" (func $__wasm_apply_data_relocs))
|
|
(export "entrypoint" (func $cubic_main))
|
|
(export "main" (func $__original_main))
|
|
(export "__data_end" (global 1))
|
|
(export "__heap_base" (global 2))
|
|
(data $.rodata (i32.const 1024) "\00\00\80?\00\00\c0?\00\00\00\00\dc\cf\d15\00\00\00\00\00\c0\15?\00\00\00\00\00\00\00\00\00\0f\c9?\00\0fI@\00\cb\96@\00\0f\c9@\00S\fb@\00\cb\16A\00\ed/A\00\0fIA\001bA\00S{A\00:\8aA\00\cb\96A\00\5c\a3A\00\ed\afA\00~\bcA\00\0f\c9A\00\a0\d5A\001\e2A\00\c2\eeA\00S\fbA\00\f2\03B\00:\0aB\00\83\10B\00\cb\16B\00\14\1dB\00\5c#B\00\a5)B\00\ed/B\0066B\00~<B\00\c7BB\00\0fIB"))
|