(module $cosf.wasm (type (;0;) (func (param i32 i32))) (type (;1;) (func)) (type (;2;) (func (result i32))) (type (;3;) (func (param f32 i32) (result i32))) (type (;4;) (func (param f32) (result f32))) (import "__pragma" "loopbound" (func $__pragma_loopbound (type 0))) (func $__wasm_apply_data_relocs (type 1)) (func $cosf_main (type 1) (local f32) i32.const 100 i32.const 100 call $__pragma_loopbound f32.const 0x0p+0 (;=0;) local.set 0 loop ;; label = @1 i32.const 0 local.get 0 call $basicmath___cosf i32.const 0 f32.load offset=1152 f32.add f32.store offset=1152 local.get 0 f32.const 0x1.99999ap-4 (;=0.1;) f32.add local.tee 0 f32.const 0x1.4p+3 (;=10;) f32.lt br_if 0 (;@1;) end) (func $__original_main (type 2) (result i32) (local f32 i32) i32.const 0 i32.const 0 i32.store offset=1152 call $cosf_main block ;; label = @1 block ;; label = @2 i32.const 0 f32.load offset=1152 local.tee 0 f32.abs f32.const 0x1p+31 (;=2.14748e+09;) f32.lt i32.eqz br_if 0 (;@2;) local.get 0 i32.trunc_f32_s local.set 1 br 1 (;@1;) end i32.const -2147483648 local.set 1 end i32.const -1 i32.const 0 local.get 1 i32.const -4 i32.ne select) (func $basicmath___ieee754_rem_pio2f (type 3) (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 1020 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 5264)) (global (;1;) i32 (i32.const 1156)) (global (;2;) i32 (i32.const 5264)) (export "memory" (memory 0)) (export "__wasm_apply_data_relocs" (func $__wasm_apply_data_relocs)) (export "entrypoint" (func $cosf_main)) (export "main" (func $__original_main)) (export "__data_end" (global 1)) (export "__heap_base" (global 2)) (data $.rodata (i32.const 1024) "\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~