#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double cos(double);
int fabs(double);
double sin(float);
float coef(int pc_nr, float p_ofs, float p_cut, int p_width, int p_type) {
  double width_m1 = p_width - 1;
  double width_m1_half = 0.5 * width_m1;
  double pos_u = (double)pc_nr - p_ofs;
  double pos = pos_u - width_m1_half;
  double idl = 2.0 * 3.1415926535897932384626433832795 / width_m1;
  double wc, si;
  if (fabs(pos) < 1e-8) {
    wc = 1.0;
    si = p_cut;
    return p_cut;
  }
  switch (p_type) {
  case 0:
    wc = 0.50 - 0.50 * cos(idl * pos_u);
    break;
  case 1:
    wc = 0.54 - 0.46 * cos(idl * pos_u);
    break;
  case 2:
    wc = 0.42 - 0.50 * cos(idl * pos_u) + 0.08 * cos(2.0 * idl * pos_u);
    break;
  case 3:
    wc =
        0.44959 - 0.49364 * cos(idl * pos_u) + 0.05677 * cos(2.0 * idl * pos_u);
    break;
  case 4:
    wc =
        0.42323 - 0.49755 * cos(idl * pos_u) + 0.07922 * cos(2.0 * idl * pos_u);
    break;
  case 5:
    wc = 0.35875 - 0.48829 * cos(idl * pos_u) +
         0.14128 * cos(2.0 * idl * pos_u) - 0.01168 * cos(3.0 * idl * pos_u);
    break;
  case 6:
    wc = 0.40217 - 0.49703 * cos(idl * pos_u) +
         0.09392 * cos(2.0 * idl * pos_u) - 0.00183 * cos(3.0 * idl * pos_u);
    break;
  case 7:
    wc = 0.40243 - 0.49804 * cos(idl * pos_u) +
         0.09831 * cos(2.0 * idl * pos_u) - 0.00122 * cos(3.0 * idl * pos_u);
    break;
  default:
    wc = 1.0;
    break;
  }
  pos *= 3.1415926535897932384626433832795;
  si = sin(p_cut * pos) / pos;
  return (float)(wc * si);
}


x86 assembly (clang, -O0):
<coef>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeab(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe6b(%rip),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe43(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11f1 <coef+0xc1>
movsd  0xf11(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    15c2 <coef+0x492>
mov    -0x18(%rbp),%eax
mov    %rax,-0x58(%rbp)
sub    $0x7,%rax
ja     156f <coef+0x43f>
mov    -0x58(%rbp),%rax
lea    0xee3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  0xe93(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdd7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    157c <coef+0x44c>
movsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  0xe72(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe6e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    157c <coef+0x44c>
movsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  0xe31(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe2d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xd84(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x60(%rbp),%xmm1
movsd  0xdf0(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    157c <coef+0x44c>
movsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  0xdb7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdb3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xd22(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x68(%rbp),%xmm1
movsd  0xd76(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    157c <coef+0x44c>
movsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  0xd3d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd39(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xcc0(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x70(%rbp),%xmm1
movsd  0xcfc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    157c <coef+0x44c>
movsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  0xcc3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcbf(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xc5e(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x80(%rbp),%xmm1
movsd  0xc82(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xc1d(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x78(%rbp),%xmm1
movsd  0xc49(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    157c <coef+0x44c>
movsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  0xc10(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc0c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xbc8(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x90(%rbp),%xmm1
ff
movsd  0xbc9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xb81(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xb8a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    157c <coef+0x44c>
movsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  0xb51(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb4d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xb29(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  0xb02(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xae2(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x98(%rbp),%xmm1
ff
movsd  0xabb(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    157c <coef+0x44c>
movsd  0xb69(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xb64(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  -0x38(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <sin@plt>
divsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coef>:
push   %rbx
sub    $0x30,%rsp
add    $0xffffffff,%esi
cvtsi2sd %esi,%xmm3
mov    %edx,%ebx
movss  %xmm1,0x24(%rsp)
movsd  0xeb4(%rip),%xmm1
cvtsi2sd %edi,%xmm2
movsd  %xmm3,0x18(%rsp)
mulsd  %xmm3,%xmm1
cvtss2sd %xmm0,%xmm0
subsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
addsd  %xmm2,%xmm1
movsd  %xmm1,0x28(%rsp)
movapd %xmm1,%xmm0
call   1030 <fabs@plt>
test   %eax,%eax
jle    11c8 <coef+0x98>
cmp    $0x7,%ebx
ja     11d3 <coef+0xa3>
movsd  0xe7c(%rip),%xmm1
divsd  0x18(%rsp),%xmm1
mov    %ebx,%eax
lea    0xf45(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <cos@plt>
mulsd  0xe45(%rip),%xmm0
addsd  0xf0d(%rip),%xmm0
jmp    1457 <coef+0x327>
movss  0x24(%rsp),%xmm0
jmp    1498 <coef+0x368>
movsd  0xe35(%rip),%xmm0
jmp    1457 <coef+0x327>
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <cos@plt>
mulsd  0xec9(%rip),%xmm0
addsd  0xec9(%rip),%xmm0
jmp    1457 <coef+0x327>
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm1,0x18(%rsp)
call   1050 <cos@plt>
mulsd  0xddf(%rip),%xmm0
addsd  0xe87(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0xe6c(%rip),%xmm0
jmp    1451 <coef+0x321>
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm1,0x18(%rsp)
call   1050 <cos@plt>
mulsd  0xe2a(%rip),%xmm0
addsd  0xe2a(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0xe0f(%rip),%xmm0
jmp    1451 <coef+0x321>
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm1,0x18(%rsp)
call   1050 <cos@plt>
mulsd  0xdc5(%rip),%xmm0
addsd  0xdc5(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0xdaa(%rip),%xmm0
jmp    1451 <coef+0x321>
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm1,0x18(%rsp)
call   1050 <cos@plt>
mulsd  0xd58(%rip),%xmm0
addsd  0xd58(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0xd3d(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0xce3(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0xd18(%rip),%xmm0
jmp    1451 <coef+0x321>
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm1,0x18(%rsp)
call   1050 <cos@plt>
mulsd  0xcbe(%rip),%xmm0
addsd  0xcbe(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0xca3(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0xc69(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0xc7e(%rip),%xmm0
jmp    1451 <coef+0x321>
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm1,0x18(%rsp)
call   1050 <cos@plt>
mulsd  0xc1f(%rip),%xmm0
addsd  0xc1f(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0xc04(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0xbf2(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0xbe7(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x28(%rsp),%xmm1
mulsd  0xc6d(%rip),%xmm1
movsd  %xmm1,0x28(%rsp)
movss  0x24(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <sin@plt>
divsd  0x28(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @coef(i32 %0, float %1, float %2, i32 %3, i32 %4) {
%6 = alloca float
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
store i32 %0, i32* %7
store float %1, float* %8
store float %2, float* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
%19 = load i32, i32* %10
%20 = sub nsw i32 %19, 1
%21 = sitofp i32 %20 to double
store double %21, double* %12
%22 = load double, double* %12
%23 = fmul double 5.000000e-01, %22
store double %23, double* %13
%24 = load i32, i32* %7
%25 = sitofp i32 %24 to double
%26 = load float, float* %8
%27 = fpext float %26 to double
%28 = fsub double %25, %27
store double %28, double* %14
%29 = load double, double* %14
%30 = load double, double* %13
%31 = fsub double %29, %30
store double %31, double* %15
%32 = load double, double* %12
%33 = fdiv double 0x401921FB54442D18, %32
store double %33, double* %16
%34 = load double, double* %15
%35 = call i32 @fabs(double %34)
%36 = sitofp i32 %35 to double
%37 = fcmp olt double %36, 1.000000e-08
br i1 %37, label %38, label %42
38: ; preds = %5
store double 1.000000e+00, double* %17
%39 = load float, float* %9
%40 = fpext float %39 to double
store double %40, double* %18
%41 = load float, float* %9
store float %41, float* %6
br label %162
42: ; preds = %5
%43 = load i32, i32* %11
switch i32 %43, label %146 [
i32 0, label %44
i32 1, label %50
i32 2, label %56
i32 3, label %68
i32 4, label %80
i32 5, label %92
i32 6, label %110
i32 7, label %128
]
44: ; preds = %42
%45 = load double, double* %16
%46 = load double, double* %14
%47 = fmul double %45, %46
%48 = call double @cos(double %47)
%49 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %48, double 5.000000e-01)
store double %49, double* %17
br label %147
50: ; preds = %42
%51 = load double, double* %16
%52 = load double, double* %14
%53 = fmul double %51, %52
%54 = call double @cos(double %53)
%55 = call double @llvm.fmuladd.f64(double -4.600000e-01, double %54, double 5.400000e-01)
store double %55, double* %17
br label %147
56: ; preds = %42
%57 = load double, double* %16
%58 = load double, double* %14
%59 = fmul double %57, %58
%60 = call double @cos(double %59)
%61 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %60, double 4.200000e-01)
%62 = load double, double* %16
%63 = fmul double 2.000000e+00, %62
%64 = load double, double* %14
%65 = fmul double %63, %64
%66 = call double @cos(double %65)
%67 = call double @llvm.fmuladd.f64(double 8.000000e-02, double %66, double %61)
store double %67, double* %17
br label %147
68: ; preds = %42
%69 = load double, double* %16
%70 = load double, double* %14
%71 = fmul double %69, %70
%72 = call double @cos(double %71)
%73 = call double @llvm.fmuladd.f64(double -4.936400e-01, double %72, double 4.495900e-01)
%74 = load double, double* %16
%75 = fmul double 2.000000e+00, %74
%76 = load double, double* %14
%77 = fmul double %75, %76
%78 = call double @cos(double %77)
%79 = call double @llvm.fmuladd.f64(double 5.677000e-02, double %78, double %73)
store double %79, double* %17
br label %147
80: ; preds = %42
%81 = load double, double* %16
%82 = load double, double* %14
%83 = fmul double %81, %82
%84 = call double @cos(double %83)
%85 = call double @llvm.fmuladd.f64(double -4.975500e-01, double %84, double 4.232300e-01)
%86 = load double, double* %16
%87 = fmul double 2.000000e+00, %86
%88 = load double, double* %14
%89 = fmul double %87, %88
%90 = call double @cos(double %89)
%91 = call double @llvm.fmuladd.f64(double 0x3FB447C30D306A2B, double %90, double %85)
store double %91, double* %17
br label %147
92: ; preds = %42
%93 = load double, double* %16
%94 = load double, double* %14
%95 = fmul double %93, %94
%96 = call double @cos(double %95)
%97 = call double @llvm.fmuladd.f64(double -4.882900e-01, double %96, double 3.587500e-01)
%98 = load double, double* %16
%99 = fmul double 2.000000e+00, %98
%100 = load double, double* %14
%101 = fmul double %99, %100
%102 = call double @cos(double %101)
%103 = call double @llvm.fmuladd.f64(double 1.412800e-01, double %102, double %97)
%104 = load double, double* %16
%105 = fmul double 3.000000e+00, %104
%106 = load double, double* %14
%107 = fmul double %105, %106
%108 = call double @cos(double %107)
%109 = call double @llvm.fmuladd.f64(double -1.168000e-02, double %108, double %103)
store double %109, double* %17
br label %147
110: ; preds = %42
%111 = load double, double* %16
%112 = load double, double* %14
%113 = fmul double %111, %112
%114 = call double @cos(double %113)
%115 = call double @llvm.fmuladd.f64(double -4.970300e-01, double %114, double 4.021700e-01)
%116 = load double, double* %16
%117 = fmul double 2.000000e+00, %116
%118 = load double, double* %14
%119 = fmul double %117, %118
%120 = call double @cos(double %119)
%121 = call double @llvm.fmuladd.f64(double 9.392000e-02, double %120, double %115)
%122 = load double, double* %16
%123 = fmul double 3.000000e+00, %122
%124 = load double, double* %14
%125 = fmul double %123, %124
%126 = call double @cos(double %125)
%127 = call double @llvm.fmuladd.f64(double -1.830000e-03, double %126, double %121)
store double %127, double* %17
br label %147
128: ; preds = %42
%129 = load double, double* %16
%130 = load double, double* %14
%131 = fmul double %129, %130
%132 = call double @cos(double %131)
%133 = call double @llvm.fmuladd.f64(double -4.980400e-01, double %132, double 4.024300e-01)
%134 = load double, double* %16
%135 = fmul double 2.000000e+00, %134
%136 = load double, double* %14
%137 = fmul double %135, %136
%138 = call double @cos(double %137)
%139 = call double @llvm.fmuladd.f64(double 0x3FB92AD81ADEA897, double %138, double %133)
%140 = load double, double* %16
%141 = fmul double 3.000000e+00, %140
%142 = load double, double* %14
%143 = fmul double %141, %142
%144 = call double @cos(double %143)
%145 = call double @llvm.fmuladd.f64(double -1.220000e-03, double %144, double %139)
store double %145, double* %17
br label %147
146: ; preds = %42
store double 1.000000e+00, double* %17
br label %147
147: ; preds = %146, %128, %110, %92, %80, %68, %56, %50, %44
%148 = load double, double* %15
%149 = fmul double %148, 0x400921FB54442D18
store double %149, double* %15
%150 = load float, float* %9
%151 = fpext float %150 to double
%152 = load double, double* %15
%153 = fmul double %151, %152
%154 = fptrunc double %153 to float
%155 = call double @sin(float %154)
%156 = load double, double* %15
%157 = fdiv double %155, %156
store double %157, double* %18
%158 = load double, double* %17
%159 = load double, double* %18
%160 = fmul double %158, %159
%161 = fptrunc double %160 to float
store float %161, float* %6
br label %162
162: ; preds = %147, %38
%163 = load float, float* %6
ret float %163
}

LLVM IR (-O2):
define float @coef(i32 %0, float %1, float %2, i32 %3, i32 %4) {
%6 = add nsw i32 %3, -1
%7 = sitofp i32 %6 to double
%8 = fmul double %7, 5.000000e-01
%9 = sitofp i32 %0 to double
%10 = fpext float %1 to double
%11 = fsub double %9, %10
%12 = fsub double %11, %8
%13 = fdiv double 0x401921FB54442D18, %7
%14 = tail call i32 @fabs(double %12)
%15 = icmp slt i32 %14, 1
br i1 %15, label %95, label %16
16: ; preds = %5
switch i32 %4, label %85 [
i32 0, label %17
i32 1, label %21
i32 2, label %25
i32 3, label %33
i32 4, label %41
i32 5, label %49
i32 6, label %61
i32 7, label %73
]
17: ; preds = %16
%18 = fmul double %11, %13
%19 = tail call double @cos(double %18)
%20 = tail call double @llvm.fmuladd.f64(double %19, double -5.000000e-01, double 5.000000e-01)
br label %85
21: ; preds = %16
%22 = fmul double %11, %13
%23 = tail call double @cos(double %22)
%24 = tail call double @llvm.fmuladd.f64(double %23, double -4.600000e-01, double 5.400000e-01)
br label %85
25: ; preds = %16
%26 = fmul double %11, %13
%27 = tail call double @cos(double %26)
%28 = tail call double @llvm.fmuladd.f64(double %27, double -5.000000e-01, double 4.200000e-01)
%29 = fmul double %13, 2.000000e+00
%30 = fmul double %11, %29
%31 = tail call double @cos(double %30)
%32 = tail call double @llvm.fmuladd.f64(double %31, double 8.000000e-02, double %28)
br label %85
33: ; preds = %16
%34 = fmul double %11, %13
%35 = tail call double @cos(double %34)
%36 = tail call double @llvm.fmuladd.f64(double %35, double -4.936400e-01, double 4.495900e-01)
%37 = fmul double %13, 2.000000e+00
%38 = fmul double %11, %37
%39 = tail call double @cos(double %38)
%40 = tail call double @llvm.fmuladd.f64(double %39, double 5.677000e-02, double %36)
br label %85
41: ; preds = %16
%42 = fmul double %11, %13
%43 = tail call double @cos(double %42)
%44 = tail call double @llvm.fmuladd.f64(double %43, double -4.975500e-01, double 4.232300e-01)
%45 = fmul double %13, 2.000000e+00
%46 = fmul double %11, %45
%47 = tail call double @cos(double %46)
%48 = tail call double @llvm.fmuladd.f64(double %47, double 0x3FB447C30D306A2B, double %44)
br label %85
49: ; preds = %16
%50 = fmul double %11, %13
%51 = tail call double @cos(double %50)
%52 = tail call double @llvm.fmuladd.f64(double %51, double -4.882900e-01, double 3.587500e-01)
%53 = fmul double %13, 2.000000e+00
%54 = fmul double %11, %53
%55 = tail call double @cos(double %54)
%56 = tail call double @llvm.fmuladd.f64(double %55, double 1.412800e-01, double %52)
%57 = fmul double %13, 3.000000e+00
%58 = fmul double %11, %57
%59 = tail call double @cos(double %58)
%60 = tail call double @llvm.fmuladd.f64(double %59, double -1.168000e-02, double %56)
br label %85
61: ; preds = %16
%62 = fmul double %11, %13
%63 = tail call double @cos(double %62)
%64 = tail call double @llvm.fmuladd.f64(double %63, double -4.970300e-01, double 4.021700e-01)
%65 = fmul double %13, 2.000000e+00
%66 = fmul double %11, %65
%67 = tail call double @cos(double %66)
%68 = tail call double @llvm.fmuladd.f64(double %67, double 9.392000e-02, double %64)
%69 = fmul double %13, 3.000000e+00
%70 = fmul double %11, %69
%71 = tail call double @cos(double %70)
%72 = tail call double @llvm.fmuladd.f64(double %71, double -1.830000e-03, double %68)
br label %85
73: ; preds = %16
%74 = fmul double %11, %13
%75 = tail call double @cos(double %74)
%76 = tail call double @llvm.fmuladd.f64(double %75, double -4.980400e-01, double 4.024300e-01)
%77 = fmul double %13, 2.000000e+00
%78 = fmul double %11, %77
%79 = tail call double @cos(double %78)
%80 = tail call double @llvm.fmuladd.f64(double %79, double 0x3FB92AD81ADEA897, double %76)
%81 = fmul double %13, 3.000000e+00
%82 = fmul double %11, %81
%83 = tail call double @cos(double %82)
%84 = tail call double @llvm.fmuladd.f64(double %83, double -1.220000e-03, double %80)
br label %85
85: ; preds = %16, %73, %61, %49, %41, %33, %25, %21, %17
%86 = phi double [ %84, %73 ], [ %72, %61 ], [ %60, %49 ], [ %48, %41 ], [ %40, %33 ], [ %32, %25 ], [ %24, %21 ], [ %20, %17 ], [ 1.000000e+00, %16 ]
%87 = fmul double %12, 0x400921FB54442D18
%88 = fpext float %2 to double
%89 = fmul double %87, %88
%90 = fptrunc double %89 to float
%91 = tail call double @sin(float %90)
%92 = fdiv double %91, %87
%93 = fmul double %86, %92
%94 = fptrunc double %93 to float
br label %95
95: ; preds = %5, %85
%96 = phi float [ %94, %85 ], [ %2, %5 ]
ret float %96
}