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


x86 assembly (clang, -O0):
<fourierHalf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xebf(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    11e8 <fourierHalf+0xc8>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%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
movslq -0x14(%rbp),%rcx
movsd  0x58(%rax,%rcx,8),%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    1159 <fourierHalf+0x39>
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):
<fourierHalf>:
push   %rbx
sub    $0x40,%rsp
movsd  %xmm0,0x10(%rsp)
mov    %rdi,%rbx
movsd  (%rdi),%xmm1
mulsd  0xec6(%rip),%xmm1
movapd %xmm1,0x30(%rsp)
movsd  0x8(%rdi),%xmm1
movapd %xmm1,(%rsp)
call   1040 <cos@plt>
movaps %xmm0,0x20(%rsp)
movsd  0x60(%rbx),%xmm0
unpcklpd (%rsp),%xmm0
movaps %xmm0,(%rsp)
movsd  0x10(%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  0x10(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movsd  0x68(%rbx),%xmm0
unpcklpd (%rsp),%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,0x30(%rsp)
movsd  0xe20(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x18(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movsd  0x70(%rbx),%xmm0
unpcklpd (%rsp),%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,0x30(%rsp)
movsd  0xdd0(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movsd  0x78(%rbx),%xmm0
unpcklpd (%rsp),%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,0x30(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0xd7a(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x28(%rbx),%xmm1
movaps %xmm1,(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movsd  0x80(%rbx),%xmm0
unpcklpd (%rsp),%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,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @fourierHalf([11 x double]* %0, double %1) {
%3 = alloca [11 x double]*
%4 = alloca double
%5 = alloca i32
%6 = alloca double
%7 = alloca double
store [11 x double]* %0, [11 x double]** %3
store double %1, double* %4
%8 = load [11 x double]*, [11 x double]** %3
%9 = getelementptr inbounds [11 x double], [11 x double]* %8, i64 0
%10 = getelementptr inbounds [11 x double], [11 x double]* %9, i64 0, i64 0
%11 = load double, double* %10
%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 = %43, %2
%14 = load i32, i32* %5
%15 = icmp slt i32 %14, 6
br i1 %15, label %16, label %46
16: ; preds = %13
%17 = load [11 x double]*, [11 x double]** %3
%18 = getelementptr inbounds [11 x double], [11 x double]* %17, i64 0
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [11 x double], [11 x double]* %18, i64 0, i64 %20
%22 = load double, double* %21
%23 = load i32, i32* %5
%24 = sitofp i32 %23 to double
%25 = load double, double* %4
%26 = fmul double %24, %25
%27 = call double @cos(double %26)
%28 = load double, double* %7
%29 = call double @llvm.fmuladd.f64(double %22, double %27, double %28)
store double %29, double* %7
%30 = load [11 x double]*, [11 x double]** %3
%31 = getelementptr inbounds [11 x double], [11 x double]* %30, i64 1
%32 = load i32, i32* %5
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [11 x double], [11 x double]* %31, i64 0, i64 %33
%35 = load double, double* %34
%36 = load i32, i32* %5
%37 = sitofp i32 %36 to double
%38 = load double, double* %4
%39 = fmul double %37, %38
%40 = call double @sin(double %39)
%41 = load double, double* %6
%42 = call double @llvm.fmuladd.f64(double %35, double %40, double %41)
store double %42, double* %6
br label %43
43: ; preds = %16
%44 = load i32, i32* %5
%45 = add nsw i32 %44, 1
store i32 %45, i32* %5
br label %13
46: ; preds = %13
%47 = load double, double* %7
%48 = load double, double* %6
%49 = fadd double %47, %48
store double %49, double* %7
%50 = load double, double* %7
ret double %50
}

LLVM IR (-O2):
define double @fourierHalf([11 x double]* nocapture %0, double %1) {
%3 = getelementptr inbounds [11 x double], [11 x double]* %0, i64 0, i64 0
%4 = load double, double* %3
%5 = fmul double %4, 5.000000e-01
%6 = getelementptr inbounds [11 x double], [11 x double]* %0, i64 0, i64 1
%7 = load double, double* %6
%8 = tail call double @cos(double %1)
%9 = getelementptr inbounds [11 x double], [11 x double]* %0, i64 1, i64 1
%10 = load double, double* %9
%11 = tail call double @sin(double %1)
%12 = insertelement <2 x double> poison, double %10, i64 0
%13 = insertelement <2 x double> %12, double %7, i64 1
%14 = insertelement <2 x double> poison, double %11, i64 0
%15 = insertelement <2 x double> %14, double %8, i64 1
%16 = insertelement <2 x double> <double 0.000000e+00, double poison>, double %5, i64 1
%17 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %13, <2 x double> %15, <2 x double> %16)
%18 = getelementptr inbounds [11 x double], [11 x double]* %0, i64 0, i64 2
%19 = load double, double* %18
%20 = fmul double %1, 2.000000e+00
%21 = tail call double @cos(double %20)
%22 = getelementptr inbounds [11 x double], [11 x double]* %0, i64 1, i64 2
%23 = load double, double* %22
%24 = tail call double @sin(double %20)
%25 = insertelement <2 x double> poison, double %23, i64 0
%26 = insertelement <2 x double> %25, double %19, i64 1
%27 = insertelement <2 x double> poison, double %24, i64 0
%28 = insertelement <2 x double> %27, double %21, i64 1
%29 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> %28, <2 x double> %17)
%30 = getelementptr inbounds [11 x double], [11 x double]* %0, i64 0, i64 3
%31 = load double, double* %30
%32 = fmul double %1, 3.000000e+00
%33 = tail call double @cos(double %32)
%34 = getelementptr inbounds [11 x double], [11 x double]* %0, i64 1, i64 3
%35 = load double, double* %34
%36 = tail call double @sin(double %32)
%37 = insertelement <2 x double> poison, double %35, i64 0
%38 = insertelement <2 x double> %37, double %31, i64 1
%39 = insertelement <2 x double> poison, double %36, i64 0
%40 = insertelement <2 x double> %39, double %33, i64 1
%41 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %38, <2 x double> %40, <2 x double> %29)
%42 = getelementptr inbounds [11 x double], [11 x double]* %0, i64 0, i64 4
%43 = load double, double* %42
%44 = fmul double %1, 4.000000e+00
%45 = tail call double @cos(double %44)
%46 = getelementptr inbounds [11 x double], [11 x double]* %0, i64 1, i64 4
%47 = load double, double* %46
%48 = tail call double @sin(double %44)
%49 = insertelement <2 x double> poison, double %47, i64 0
%50 = insertelement <2 x double> %49, double %43, i64 1
%51 = insertelement <2 x double> poison, double %48, i64 0
%52 = insertelement <2 x double> %51, double %45, i64 1
%53 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %50, <2 x double> %52, <2 x double> %41)
%54 = getelementptr inbounds [11 x double], [11 x double]* %0, i64 0, i64 5
%55 = load double, double* %54
%56 = fmul double %1, 5.000000e+00
%57 = tail call double @cos(double %56)
%58 = getelementptr inbounds [11 x double], [11 x double]* %0, i64 1, i64 5
%59 = load double, double* %58
%60 = tail call double @sin(double %56)
%61 = insertelement <2 x double> poison, double %59, i64 0
%62 = insertelement <2 x double> %61, double %55, i64 1
%63 = insertelement <2 x double> poison, double %60, i64 0
%64 = insertelement <2 x double> %63, double %57, i64 1
%65 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %62, <2 x double> %64, <2 x double> %53)
%66 = shufflevector <2 x double> %65, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%67 = fadd <2 x double> %65, %66
%68 = extractelement <2 x double> %67, i64 0
ret double %68
}