double fourtoo(data, ex)
float data[];
double ex;
{
  register int k;
  double fivesm, sixsm;
  sixsm = data[1] / 2.0;
  fivesm = 0.0;
  for (k = 1; k < 11; k++) {
    sixsm += (double)(data[(k * 2) + 1] * cos((double)k * ex));
    fivesm += (double)(data[(k * 2) + 2] * sin((double)k * ex));
  }
  sixsm = sixsm + fivesm;
  return (sixsm);
}


x86 assembly (clang, -O0):
<fourtoo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeba(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0xb,-0x14(%rbp)
jge    1204 <fourtoo+0xe4>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm2
movsd  -0x38(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115e <fourtoo+0x3e>
movsd  -0x28(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fourtoo>:
push   %rbx
sub    $0x40,%rsp
movsd  %xmm0,0x18(%rsp)
mov    %rdi,%rbx
movss  0x4(%rdi),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xec1(%rip),%xmm1
movapd %xmm1,0x30(%rsp)
movss  0xc(%rdi),%xmm1
movapd %xmm1,(%rsp)
call   1040 <cos@plt>
movaps %xmm0,0x20(%rsp)
movss  0x10(%rbx),%xmm0
unpcklps (%rsp),%xmm0
cvtps2pd %xmm0,%xmm0
movaps %xmm0,(%rsp)
movsd  0x18(%rsp),%xmm0
call   1030 <sin@plt>
unpcklpd 0x20(%rsp),%xmm0
mulpd  (%rsp),%xmm0
xorpd  %xmm1,%xmm1
unpcklpd 0x30(%rsp),%xmm1
addpd  %xmm1,%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x14(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movss  0x18(%rbx),%xmm0
unpcklps (%rsp),%xmm0
cvtps2pd %xmm0,%xmm0
movaps %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
unpcklpd 0x20(%rsp),%xmm0
mulpd  (%rsp),%xmm0
addpd  0x30(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0xe17(%rip),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x1c(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movss  0x20(%rbx),%xmm0
unpcklps (%rsp),%xmm0
cvtps2pd %xmm0,%xmm0
movaps %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
unpcklpd 0x20(%rsp),%xmm0
mulpd  (%rsp),%xmm0
addpd  0x30(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0xdc5(%rip),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x24(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movss  0x28(%rbx),%xmm0
unpcklps (%rsp),%xmm0
cvtps2pd %xmm0,%xmm0
movaps %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
unpcklpd 0x20(%rsp),%xmm0
mulpd  (%rsp),%xmm0
addpd  0x30(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0xd73(%rip),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x2c(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movss  0x30(%rbx),%xmm0
unpcklps (%rsp),%xmm0
cvtps2pd %xmm0,%xmm0
movaps %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
unpcklpd 0x20(%rsp),%xmm0
mulpd  (%rsp),%xmm0
addpd  0x30(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0xd21(%rip),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x34(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movss  0x38(%rbx),%xmm0
unpcklps (%rsp),%xmm0
cvtps2pd %xmm0,%xmm0
movaps %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
unpcklpd 0x20(%rsp),%xmm0
mulpd  (%rsp),%xmm0
addpd  0x30(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0xccf(%rip),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x3c(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movss  0x40(%rbx),%xmm0
unpcklps (%rsp),%xmm0
cvtps2pd %xmm0,%xmm0
movaps %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
unpcklpd 0x20(%rsp),%xmm0
mulpd  (%rsp),%xmm0
addpd  0x30(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0xc7d(%rip),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x44(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movss  0x48(%rbx),%xmm0
unpcklps (%rsp),%xmm0
cvtps2pd %xmm0,%xmm0
movaps %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
unpcklpd 0x20(%rsp),%xmm0
mulpd  (%rsp),%xmm0
addpd  0x30(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0xc2b(%rip),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x4c(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movss  0x50(%rbx),%xmm0
unpcklps (%rsp),%xmm0
cvtps2pd %xmm0,%xmm0
movaps %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
unpcklpd 0x20(%rsp),%xmm0
mulpd  (%rsp),%xmm0
addpd  0x30(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0xbd3(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
movss  0x54(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movss  0x58(%rbx),%xmm0
unpcklps (%rsp),%xmm0
cvtps2pd %xmm0,%xmm0
movaps %xmm0,(%rsp)
movsd  0x18(%rsp),%xmm0
call   1030 <sin@plt>
unpcklpd 0x20(%rsp),%xmm0
mulpd  (%rsp),%xmm0
addpd  0x30(%rsp),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @fourtoo(float* %0, double %1) {
%3 = alloca float*
%4 = alloca double
%5 = alloca i32
%6 = alloca double
%7 = alloca double
store float* %0, float** %3
store double %1, double* %4
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i64 1
%10 = load float, float* %9
%11 = fpext float %10 to double
%12 = fdiv double %11, 2.000000e+00
store double %12, double* %7
store double 0.000000e+00, double* %6
store i32 1, i32* %5
br label %13
13: ; preds = %47, %2
%14 = load i32, i32* %5
%15 = icmp slt i32 %14, 11
br i1 %15, label %16, label %50
16: ; preds = %13
%17 = load float*, float** %3
%18 = load i32, i32* %5
%19 = mul nsw i32 %18, 2
%20 = add nsw i32 %19, 1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds float, float* %17, i64 %21
%23 = load float, float* %22
%24 = fpext float %23 to double
%25 = load i32, i32* %5
%26 = sitofp i32 %25 to double
%27 = load double, double* %4
%28 = fmul double %26, %27
%29 = call double @cos(double %28)
%30 = load double, double* %7
%31 = call double @llvm.fmuladd.f64(double %24, double %29, double %30)
store double %31, double* %7
%32 = load float*, float** %3
%33 = load i32, i32* %5
%34 = mul nsw i32 %33, 2
%35 = add nsw i32 %34, 2
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds float, float* %32, i64 %36
%38 = load float, float* %37
%39 = fpext float %38 to double
%40 = load i32, i32* %5
%41 = sitofp i32 %40 to double
%42 = load double, double* %4
%43 = fmul double %41, %42
%44 = call double @sin(double %43)
%45 = load double, double* %6
%46 = call double @llvm.fmuladd.f64(double %39, double %44, double %45)
store double %46, double* %6
br label %47
47: ; preds = %16
%48 = load i32, i32* %5
%49 = add nsw i32 %48, 1
store i32 %49, i32* %5
br label %13
50: ; preds = %13
%51 = load double, double* %7
%52 = load double, double* %6
%53 = fadd double %51, %52
store double %53, double* %7
%54 = load double, double* %7
ret double %54
}

LLVM IR (-O2):
define double @fourtoo(float* nocapture %0, double %1) {
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fmul double %5, 5.000000e-01
%7 = getelementptr inbounds float, float* %0, i64 3
%8 = load float, float* %7
%9 = tail call double @cos(double %1)
%10 = getelementptr inbounds float, float* %0, i64 4
%11 = load float, float* %10
%12 = insertelement <2 x float> poison, float %11, i64 0
%13 = insertelement <2 x float> %12, float %8, i64 1
%14 = fpext <2 x float> %13 to <2 x double>
%15 = tail call double @sin(double %1)
%16 = insertelement <2 x double> poison, double %15, i64 0
%17 = insertelement <2 x double> %16, double %9, i64 1
%18 = insertelement <2 x double> <double 0.000000e+00, double poison>, double %6, i64 1
%19 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %14, <2 x double> %17, <2 x double> %18)
%20 = getelementptr inbounds float, float* %0, i64 5
%21 = load float, float* %20
%22 = fmul double %1, 2.000000e+00
%23 = tail call double @cos(double %22)
%24 = getelementptr inbounds float, float* %0, i64 6
%25 = load float, float* %24
%26 = insertelement <2 x float> poison, float %25, i64 0
%27 = insertelement <2 x float> %26, float %21, i64 1
%28 = fpext <2 x float> %27 to <2 x double>
%29 = tail call double @sin(double %22)
%30 = insertelement <2 x double> poison, double %29, i64 0
%31 = insertelement <2 x double> %30, double %23, i64 1
%32 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %28, <2 x double> %31, <2 x double> %19)
%33 = getelementptr inbounds float, float* %0, i64 7
%34 = load float, float* %33
%35 = fmul double %1, 3.000000e+00
%36 = tail call double @cos(double %35)
%37 = getelementptr inbounds float, float* %0, i64 8
%38 = load float, float* %37
%39 = insertelement <2 x float> poison, float %38, i64 0
%40 = insertelement <2 x float> %39, float %34, i64 1
%41 = fpext <2 x float> %40 to <2 x double>
%42 = tail call double @sin(double %35)
%43 = insertelement <2 x double> poison, double %42, i64 0
%44 = insertelement <2 x double> %43, double %36, i64 1
%45 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %41, <2 x double> %44, <2 x double> %32)
%46 = getelementptr inbounds float, float* %0, i64 9
%47 = load float, float* %46
%48 = fmul double %1, 4.000000e+00
%49 = tail call double @cos(double %48)
%50 = getelementptr inbounds float, float* %0, i64 10
%51 = load float, float* %50
%52 = insertelement <2 x float> poison, float %51, i64 0
%53 = insertelement <2 x float> %52, float %47, i64 1
%54 = fpext <2 x float> %53 to <2 x double>
%55 = tail call double @sin(double %48)
%56 = insertelement <2 x double> poison, double %55, i64 0
%57 = insertelement <2 x double> %56, double %49, i64 1
%58 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %54, <2 x double> %57, <2 x double> %45)
%59 = getelementptr inbounds float, float* %0, i64 11
%60 = load float, float* %59
%61 = fmul double %1, 5.000000e+00
%62 = tail call double @cos(double %61)
%63 = getelementptr inbounds float, float* %0, i64 12
%64 = load float, float* %63
%65 = insertelement <2 x float> poison, float %64, i64 0
%66 = insertelement <2 x float> %65, float %60, i64 1
%67 = fpext <2 x float> %66 to <2 x double>
%68 = tail call double @sin(double %61)
%69 = insertelement <2 x double> poison, double %68, i64 0
%70 = insertelement <2 x double> %69, double %62, i64 1
%71 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %67, <2 x double> %70, <2 x double> %58)
%72 = getelementptr inbounds float, float* %0, i64 13
%73 = load float, float* %72
%74 = fmul double %1, 6.000000e+00
%75 = tail call double @cos(double %74)
%76 = getelementptr inbounds float, float* %0, i64 14
%77 = load float, float* %76
%78 = insertelement <2 x float> poison, float %77, i64 0
%79 = insertelement <2 x float> %78, float %73, i64 1
%80 = fpext <2 x float> %79 to <2 x double>
%81 = tail call double @sin(double %74)
%82 = insertelement <2 x double> poison, double %81, i64 0
%83 = insertelement <2 x double> %82, double %75, i64 1
%84 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %80, <2 x double> %83, <2 x double> %71)
%85 = getelementptr inbounds float, float* %0, i64 15
%86 = load float, float* %85
%87 = fmul double %1, 7.000000e+00
%88 = tail call double @cos(double %87)
%89 = getelementptr inbounds float, float* %0, i64 16
%90 = load float, float* %89
%91 = insertelement <2 x float> poison, float %90, i64 0
%92 = insertelement <2 x float> %91, float %86, i64 1
%93 = fpext <2 x float> %92 to <2 x double>
%94 = tail call double @sin(double %87)
%95 = insertelement <2 x double> poison, double %94, i64 0
%96 = insertelement <2 x double> %95, double %88, i64 1
%97 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %93, <2 x double> %96, <2 x double> %84)
%98 = getelementptr inbounds float, float* %0, i64 17
%99 = load float, float* %98
%100 = fmul double %1, 8.000000e+00
%101 = tail call double @cos(double %100)
%102 = getelementptr inbounds float, float* %0, i64 18
%103 = load float, float* %102
%104 = insertelement <2 x float> poison, float %103, i64 0
%105 = insertelement <2 x float> %104, float %99, i64 1
%106 = fpext <2 x float> %105 to <2 x double>
%107 = tail call double @sin(double %100)
%108 = insertelement <2 x double> poison, double %107, i64 0
%109 = insertelement <2 x double> %108, double %101, i64 1
%110 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %106, <2 x double> %109, <2 x double> %97)
%111 = getelementptr inbounds float, float* %0, i64 19
%112 = load float, float* %111
%113 = fmul double %1, 9.000000e+00
%114 = tail call double @cos(double %113)
%115 = getelementptr inbounds float, float* %0, i64 20
%116 = load float, float* %115
%117 = insertelement <2 x float> poison, float %116, i64 0
%118 = insertelement <2 x float> %117, float %112, i64 1
%119 = fpext <2 x float> %118 to <2 x double>
%120 = tail call double @sin(double %113)
%121 = insertelement <2 x double> poison, double %120, i64 0
%122 = insertelement <2 x double> %121, double %114, i64 1
%123 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %119, <2 x double> %122, <2 x double> %110)
%124 = getelementptr inbounds float, float* %0, i64 21
%125 = load float, float* %124
%126 = fmul double %1, 1.000000e+01
%127 = tail call double @cos(double %126)
%128 = getelementptr inbounds float, float* %0, i64 22
%129 = load float, float* %128
%130 = insertelement <2 x float> poison, float %129, i64 0
%131 = insertelement <2 x float> %130, float %125, i64 1
%132 = fpext <2 x float> %131 to <2 x double>
%133 = tail call double @sin(double %126)
%134 = insertelement <2 x double> poison, double %133, i64 0
%135 = insertelement <2 x double> %134, double %127, i64 1
%136 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %132, <2 x double> %135, <2 x double> %123)
%137 = shufflevector <2 x double> %136, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%138 = fadd <2 x double> %136, %137
%139 = extractelement <2 x double> %138, i64 0
ret double %139
}