void Cp(double Cpl[], double Cpv[], double T[], double MW[], double HVAP[],
        double HCAPLa[], double HCAPLb[], double HCAPVa[], double HCAPVb[]) {
  int i;
  double cp_v[7], cp_l[7];
  for (i = 0; i < 7; i++) {
    cp_l[i] = HCAPLa[i] + HCAPLb[i] * T[0];
    cp_v[i] = HCAPVa[i] + HCAPVb[i] * T[0];
    Cpl[i] = cp_l[i] * MW[i];
    Cpv[i] = cp_v[i] * MW[i];
  };
}


x86 assembly (clang, -O0):
<Cp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x7,-0x34(%rbp)
jge    1201 <Cp+0x101>
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x34(%rbp),%rax
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x34(%rbp),%rax
movsd  %xmm0,-0x70(%rbp,%rax,8)
movslq -0x34(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x34(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1133 <Cp+0x33>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cp>:
mov    0x10(%rsp),%r8
mov    0x18(%rsp),%r10
mov    0x8(%rsp),%rax
movsd  (%rdx),%xmm0
movsd  (%rax),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%r9),%xmm1
mulsd  (%r10),%xmm0
addsd  (%r8),%xmm0
mulsd  (%rcx),%xmm1
movsd  %xmm1,(%rdi)
mulsd  (%rcx),%xmm0
movsd  %xmm0,(%rsi)
movsd  (%rdx),%xmm0
movsd  0x8(%rax),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x8(%r9),%xmm1
mulsd  0x8(%r10),%xmm0
addsd  0x8(%r8),%xmm0
mulsd  0x8(%rcx),%xmm1
movsd  %xmm1,0x8(%rdi)
mulsd  0x8(%rcx),%xmm0
movsd  %xmm0,0x8(%rsi)
movsd  (%rdx),%xmm0
movsd  0x10(%rax),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%r9),%xmm1
mulsd  0x10(%r10),%xmm0
addsd  0x10(%r8),%xmm0
mulsd  0x10(%rcx),%xmm1
movsd  %xmm1,0x10(%rdi)
mulsd  0x10(%rcx),%xmm0
movsd  %xmm0,0x10(%rsi)
movsd  (%rdx),%xmm0
movsd  0x18(%rax),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x18(%r9),%xmm1
mulsd  0x18(%r10),%xmm0
addsd  0x18(%r8),%xmm0
mulsd  0x18(%rcx),%xmm1
movsd  %xmm1,0x18(%rdi)
mulsd  0x18(%rcx),%xmm0
movsd  %xmm0,0x18(%rsi)
movsd  (%rdx),%xmm0
movsd  0x20(%rax),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x20(%r9),%xmm1
mulsd  0x20(%r10),%xmm0
addsd  0x20(%r8),%xmm0
mulsd  0x20(%rcx),%xmm1
movsd  %xmm1,0x20(%rdi)
mulsd  0x20(%rcx),%xmm0
movsd  %xmm0,0x20(%rsi)
movsd  (%rdx),%xmm0
movsd  0x28(%rax),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x28(%r9),%xmm1
mulsd  0x28(%r10),%xmm0
addsd  0x28(%r8),%xmm0
mulsd  0x28(%rcx),%xmm1
movsd  %xmm1,0x28(%rdi)
mulsd  0x28(%rcx),%xmm0
movsd  %xmm0,0x28(%rsi)
movsd  (%rdx),%xmm0
movsd  0x30(%rax),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x30(%r9),%xmm1
mulsd  0x30(%r10),%xmm0
addsd  0x30(%r8),%xmm0
mulsd  0x30(%rcx),%xmm1
movsd  %xmm1,0x30(%rdi)
mulsd  0x30(%rcx),%xmm0
movsd  %xmm0,0x30(%rsi)
ret

LLVM IR (-O0):
define void @Cp(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8) {
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca i32
%20 = alloca [7 x double]
%21 = alloca [7 x double]
store double* %0, double** %10
store double* %1, double** %11
store double* %2, double** %12
store double* %3, double** %13
store double* %4, double** %14
store double* %5, double** %15
store double* %6, double** %16
store double* %7, double** %17
store double* %8, double** %18
store i32 0, i32* %19
br label %22
22: ; preds = %88, %9
%23 = load i32, i32* %19
%24 = icmp slt i32 %23, 7
br i1 %24, label %25, label %91
25: ; preds = %22
%26 = load double*, double** %15
%27 = load i32, i32* %19
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds double, double* %26, i64 %28
%30 = load double, double* %29
%31 = load double*, double** %16
%32 = load i32, i32* %19
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds double, double* %31, i64 %33
%35 = load double, double* %34
%36 = load double*, double** %12
%37 = getelementptr inbounds double, double* %36, i64 0
%38 = load double, double* %37
%39 = call double @llvm.fmuladd.f64(double %35, double %38, double %30)
%40 = load i32, i32* %19
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [7 x double], [7 x double]* %21, i64 0, i64 %41
store double %39, double* %42
%43 = load double*, double** %17
%44 = load i32, i32* %19
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds double, double* %43, i64 %45
%47 = load double, double* %46
%48 = load double*, double** %18
%49 = load i32, i32* %19
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %48, i64 %50
%52 = load double, double* %51
%53 = load double*, double** %12
%54 = getelementptr inbounds double, double* %53, i64 0
%55 = load double, double* %54
%56 = call double @llvm.fmuladd.f64(double %52, double %55, double %47)
%57 = load i32, i32* %19
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [7 x double], [7 x double]* %20, i64 0, i64 %58
store double %56, double* %59
%60 = load i32, i32* %19
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [7 x double], [7 x double]* %21, i64 0, i64 %61
%63 = load double, double* %62
%64 = load double*, double** %13
%65 = load i32, i32* %19
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %64, i64 %66
%68 = load double, double* %67
%69 = fmul double %63, %68
%70 = load double*, double** %10
%71 = load i32, i32* %19
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %70, i64 %72
store double %69, double* %73
%74 = load i32, i32* %19
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [7 x double], [7 x double]* %20, i64 0, i64 %75
%77 = load double, double* %76
%78 = load double*, double** %13
%79 = load i32, i32* %19
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %78, i64 %80
%82 = load double, double* %81
%83 = fmul double %77, %82
%84 = load double*, double** %11
%85 = load i32, i32* %19
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds double, double* %84, i64 %86
store double %83, double* %87
br label %88
88: ; preds = %25
%89 = load i32, i32* %19
%90 = add nsw i32 %89, 1
store i32 %90, i32* %19
br label %22
91: ; preds = %22
ret void
}

LLVM IR (-O2):
define void @Cp(double* nocapture writeonly %0, double* nocapture writeonly %1, double* nocapture %2, double* nocapture %3, double* nocapture readnone %4, double* nocapture %5, double* nocapture %6, double* nocapture %7, double* nocapture %8) {
%10 = load double, double* %5
%11 = load double, double* %6
%12 = load double, double* %2
%13 = tail call double @llvm.fmuladd.f64(double %11, double %12, double %10)
%14 = load double, double* %7
%15 = load double, double* %8
%16 = tail call double @llvm.fmuladd.f64(double %15, double %12, double %14)
%17 = load double, double* %3
%18 = fmul double %13, %17
store double %18, double* %0
%19 = load double, double* %3
%20 = fmul double %16, %19
store double %20, double* %1
%21 = getelementptr inbounds double, double* %5, i64 1
%22 = load double, double* %21
%23 = getelementptr inbounds double, double* %6, i64 1
%24 = load double, double* %23
%25 = load double, double* %2
%26 = tail call double @llvm.fmuladd.f64(double %24, double %25, double %22)
%27 = getelementptr inbounds double, double* %7, i64 1
%28 = load double, double* %27
%29 = getelementptr inbounds double, double* %8, i64 1
%30 = load double, double* %29
%31 = tail call double @llvm.fmuladd.f64(double %30, double %25, double %28)
%32 = getelementptr inbounds double, double* %3, i64 1
%33 = load double, double* %32
%34 = fmul double %26, %33
%35 = getelementptr inbounds double, double* %0, i64 1
store double %34, double* %35
%36 = load double, double* %32
%37 = fmul double %31, %36
%38 = getelementptr inbounds double, double* %1, i64 1
store double %37, double* %38
%39 = getelementptr inbounds double, double* %5, i64 2
%40 = load double, double* %39
%41 = getelementptr inbounds double, double* %6, i64 2
%42 = load double, double* %41
%43 = load double, double* %2
%44 = tail call double @llvm.fmuladd.f64(double %42, double %43, double %40)
%45 = getelementptr inbounds double, double* %7, i64 2
%46 = load double, double* %45
%47 = getelementptr inbounds double, double* %8, i64 2
%48 = load double, double* %47
%49 = tail call double @llvm.fmuladd.f64(double %48, double %43, double %46)
%50 = getelementptr inbounds double, double* %3, i64 2
%51 = load double, double* %50
%52 = fmul double %44, %51
%53 = getelementptr inbounds double, double* %0, i64 2
store double %52, double* %53
%54 = load double, double* %50
%55 = fmul double %49, %54
%56 = getelementptr inbounds double, double* %1, i64 2
store double %55, double* %56
%57 = getelementptr inbounds double, double* %5, i64 3
%58 = load double, double* %57
%59 = getelementptr inbounds double, double* %6, i64 3
%60 = load double, double* %59
%61 = load double, double* %2
%62 = tail call double @llvm.fmuladd.f64(double %60, double %61, double %58)
%63 = getelementptr inbounds double, double* %7, i64 3
%64 = load double, double* %63
%65 = getelementptr inbounds double, double* %8, i64 3
%66 = load double, double* %65
%67 = tail call double @llvm.fmuladd.f64(double %66, double %61, double %64)
%68 = getelementptr inbounds double, double* %3, i64 3
%69 = load double, double* %68
%70 = fmul double %62, %69
%71 = getelementptr inbounds double, double* %0, i64 3
store double %70, double* %71
%72 = load double, double* %68
%73 = fmul double %67, %72
%74 = getelementptr inbounds double, double* %1, i64 3
store double %73, double* %74
%75 = getelementptr inbounds double, double* %5, i64 4
%76 = load double, double* %75
%77 = getelementptr inbounds double, double* %6, i64 4
%78 = load double, double* %77
%79 = load double, double* %2
%80 = tail call double @llvm.fmuladd.f64(double %78, double %79, double %76)
%81 = getelementptr inbounds double, double* %7, i64 4
%82 = load double, double* %81
%83 = getelementptr inbounds double, double* %8, i64 4
%84 = load double, double* %83
%85 = tail call double @llvm.fmuladd.f64(double %84, double %79, double %82)
%86 = getelementptr inbounds double, double* %3, i64 4
%87 = load double, double* %86
%88 = fmul double %80, %87
%89 = getelementptr inbounds double, double* %0, i64 4
store double %88, double* %89
%90 = load double, double* %86
%91 = fmul double %85, %90
%92 = getelementptr inbounds double, double* %1, i64 4
store double %91, double* %92
%93 = getelementptr inbounds double, double* %5, i64 5
%94 = load double, double* %93
%95 = getelementptr inbounds double, double* %6, i64 5
%96 = load double, double* %95
%97 = load double, double* %2
%98 = tail call double @llvm.fmuladd.f64(double %96, double %97, double %94)
%99 = getelementptr inbounds double, double* %7, i64 5
%100 = load double, double* %99
%101 = getelementptr inbounds double, double* %8, i64 5
%102 = load double, double* %101
%103 = tail call double @llvm.fmuladd.f64(double %102, double %97, double %100)
%104 = getelementptr inbounds double, double* %3, i64 5
%105 = load double, double* %104
%106 = fmul double %98, %105
%107 = getelementptr inbounds double, double* %0, i64 5
store double %106, double* %107
%108 = load double, double* %104
%109 = fmul double %103, %108
%110 = getelementptr inbounds double, double* %1, i64 5
store double %109, double* %110
%111 = getelementptr inbounds double, double* %5, i64 6
%112 = load double, double* %111
%113 = getelementptr inbounds double, double* %6, i64 6
%114 = load double, double* %113
%115 = load double, double* %2
%116 = tail call double @llvm.fmuladd.f64(double %114, double %115, double %112)
%117 = getelementptr inbounds double, double* %7, i64 6
%118 = load double, double* %117
%119 = getelementptr inbounds double, double* %8, i64 6
%120 = load double, double* %119
%121 = tail call double @llvm.fmuladd.f64(double %120, double %115, double %118)
%122 = getelementptr inbounds double, double* %3, i64 6
%123 = load double, double* %122
%124 = fmul double %116, %123
%125 = getelementptr inbounds double, double* %0, i64 6
store double %124, double* %125
%126 = load double, double* %122
%127 = fmul double %121, %126
%128 = getelementptr inbounds double, double* %1, i64 6
store double %127, double* %128
ret void
}