double calc_va(double mod[3][3], double Cf[4]) {
  int i;
  double U[3], V[3], Ga, Gb, D, X, Y, Ha, Hb, x, y, Va;
  x = Cf[0] + Cf[1];
  y = Cf[0] + Cf[2];
  for (i = 0; i < 3; i++) {
    U[i] = y * y * mod[i][0] + 2 * y * (1 - y) * mod[i][1] +
           (1 - y) * (1 - y) * mod[i][2];
    V[i] = x * x * mod[0][i] + 2 * x * (1 - x) * mod[1][i] +
           (1 - x) * (1 - x) * mod[2][i];
  }
  Ga = U[0] * (Cf[0] + Cf[1]) + U[1] * (1 - 2 * Cf[0] - 2 * Cf[1]) -
       U[2] * (Cf[2] + Cf[3]);
  Gb = V[0] * (Cf[0] + Cf[2]) + V[1] * (1 - 2 * Cf[0] - 2 * Cf[2]) -
       V[2] * (Cf[1] + Cf[3]);
  D = Cf[0] - (Cf[0] + Cf[1]) * (Cf[0] + Cf[2]);
  X = (Cf[0] + Cf[1]) * (Cf[2] + Cf[3]);
  Y = (Cf[0] + Cf[2]) * (Cf[1] + Cf[3]);
  Ha = (Ga - D * Gb / X) / (1 - D * D / (X * Y));
  Hb = (Gb - D * Ga / Y) / (1 - D * D / (X * Y));
  Va = 2 * (X * Ha * Ha + 2 * Ha * Hb * D + Y * Hb * Hb);
  return Va;
}


x86 assembly (clang, -O0):
<calc_va>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    12a9 <calc_va+0x1a9>
movsd  -0x98(%rbp),%xmm1
ff
mulsd  -0x98(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm2
movsd  0xe82(%rip),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  0xe7a(%rip),%xmm3
subsd  -0x98(%rbp),%xmm3
ff
mulsd  %xmm3,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe4a(%rip),%xmm0
subsd  -0x98(%rbp),%xmm0
ff
movsd  0xe3a(%rip),%xmm2
subsd  -0x98(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x14(%rbp),%rax
movsd  %xmm0,-0x30(%rbp,%rax,8)
movsd  -0x90(%rbp),%xmm1
ff
mulsd  -0x90(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  0xddb(%rip),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  0xdd3(%rip),%xmm3
subsd  -0x90(%rbp),%xmm3
ff
mulsd  %xmm3,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mulsd  0x18(%rax,%rcx,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xda9(%rip),%xmm0
subsd  -0x90(%rbp),%xmm0
ff
movsd  0xd99(%rip),%xmm2
subsd  -0x90(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  0x30(%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x14(%rbp),%rax
movsd  %xmm0,-0x50(%rbp,%rax,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1149 <calc_va+0x49>
movsd  -0x30(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
addsd  0x8(%rax),%xmm2
movsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm4
addsd  %xmm4,%xmm4
movsd  0xd30(%rip),%xmm3
subsd  %xmm4,%xmm3
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm4
addsd  %xmm4,%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x10(%rbp),%rax
addsd  0x18(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
addsd  0x10(%rax),%xmm2
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm4
addsd  %xmm4,%xmm4
movsd  0xca5(%rip),%xmm3
subsd  %xmm4,%xmm3
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm4
addsd  %xmm4,%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x10(%rbp),%rax
addsd  0x18(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
addsd  0x10(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
addsd  0x18(%rax),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
addsd  0x18(%rax),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
divsd  -0x70(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  -0x68(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
divsd  %xmm1,%xmm2
movsd  0xb6b(%rip),%xmm1
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
divsd  -0x78(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  -0x68(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
divsd  %xmm1,%xmm2
movsd  0xb26(%rip),%xmm1
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  0xaf7(%rip),%xmm1
mulsd  -0x80(%rbp),%xmm1
mulsd  -0x88(%rbp),%xmm1
ff
mulsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x78(%rbp),%xmm1
mulsd  -0x88(%rbp),%xmm1
ff
movsd  -0x88(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xab8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_va>:
movupd (%rsi),%xmm1
movupd 0x10(%rsi),%xmm2
movapd %xmm2,%xmm0
shufpd $0x1,%xmm2,%xmm0
movapd %xmm2,%xmm11
movapd %xmm2,-0x18(%rsp)
unpcklpd %xmm1,%xmm11
addpd  %xmm0,%xmm11
movapd %xmm11,%xmm12
unpckhpd %xmm11,%xmm12
movapd %xmm12,%xmm6
mulsd  %xmm12,%xmm6
movsd  0xebc(%rip),%xmm9
movapd %xmm9,%xmm8
subsd  %xmm12,%xmm8
movapd %xmm1,-0x28(%rsp)
movapd %xmm1,%xmm13
unpckhpd %xmm2,%xmm13
addpd  %xmm1,%xmm13
movapd %xmm13,%xmm10
mulpd  %xmm13,%xmm10
movapd %xmm13,%xmm4
addsd  %xmm13,%xmm4
subsd  %xmm13,%xmm9
mulsd  %xmm9,%xmm4
mulsd  %xmm9,%xmm9
movsd  (%rdi),%xmm3
movapd %xmm6,%xmm14
mulsd  %xmm3,%xmm14
movsd  0x18(%rdi),%xmm15
movapd %xmm4,%xmm7
mulsd  %xmm15,%xmm7
mulsd  %xmm10,%xmm3
addsd  %xmm7,%xmm3
movsd  0x30(%rdi),%xmm0
movsd  %xmm0,-0x30(%rsp)
movapd %xmm9,%xmm7
mulsd  %xmm0,%xmm7
addsd  %xmm3,%xmm7
mulsd  %xmm12,%xmm7
addsd  %xmm12,%xmm12
mulsd  %xmm8,%xmm12
mulsd  %xmm8,%xmm8
movsd  0x8(%rdi),%xmm2
movapd %xmm12,%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm3,%xmm14
movsd  0x10(%rdi),%xmm0
movapd %xmm8,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm14,%xmm3
movsd  0x20(%rdi),%xmm14
movapd %xmm12,%xmm1
mulsd  %xmm14,%xmm1
mulsd  %xmm6,%xmm15
addsd  %xmm1,%xmm15
movsd  0x28(%rdi),%xmm1
movapd %xmm8,%xmm5
mulsd  %xmm1,%xmm5
addsd  %xmm15,%xmm5
mulsd  -0x30(%rsp),%xmm6
movsd  0x38(%rdi),%xmm15
mulsd  %xmm15,%xmm12
addsd  %xmm12,%xmm6
movsd  0x40(%rdi),%xmm12
mulsd  %xmm12,%xmm8
addsd  %xmm6,%xmm8
mulsd  %xmm4,%xmm14
mulsd  %xmm1,%xmm4
mulsd  %xmm10,%xmm0
addsd  %xmm4,%xmm0
mulsd  %xmm9,%xmm12
addsd  %xmm0,%xmm12
movapd -0x28(%rsp),%xmm6
movapd %xmm6,%xmm0
unpcklpd %xmm10,%xmm0
movsd  0xd84(%rip),%xmm1
movapd %xmm1,%xmm4
unpcklpd %xmm2,%xmm4
mulpd  %xmm0,%xmm4
movapd 0xd78(%rip),%xmm0
unpcklpd %xmm14,%xmm0
addpd  %xmm4,%xmm0
movapd -0x18(%rsp),%xmm2
unpcklpd %xmm9,%xmm2
unpcklpd %xmm15,%xmm1
mulpd  %xmm2,%xmm1
movapd %xmm6,%xmm2
unpckhpd %xmm6,%xmm2
addsd  %xmm2,%xmm2
addpd  %xmm0,%xmm1
subsd  %xmm2,%xmm0
mulsd  %xmm5,%xmm0
mulsd  %xmm13,%xmm3
addsd  %xmm0,%xmm3
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm0,%xmm7
movapd %xmm13,%xmm0
unpckhpd %xmm13,%xmm0
mulsd  %xmm12,%xmm0
subsd  %xmm0,%xmm7
unpcklpd %xmm13,%xmm8
unpcklpd %xmm6,%xmm3
mulpd  %xmm11,%xmm8
subpd  %xmm8,%xmm3
mulpd  %xmm11,%xmm13
movapd %xmm3,%xmm1
unpckhpd %xmm3,%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm7,%xmm2
divsd  %xmm13,%xmm2
movapd %xmm13,%xmm0
unpckhpd %xmm13,%xmm0
movapd %xmm13,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm1,%xmm5
mulpd  %xmm3,%xmm5
subsd  %xmm2,%xmm3
movapd %xmm13,%xmm2
shufpd $0x1,%xmm4,%xmm2
shufpd $0x2,0xcc8(%rip),%xmm7
divpd  %xmm2,%xmm5
subpd  %xmm5,%xmm7
movapd %xmm7,%xmm2
unpcklpd %xmm3,%xmm2
unpckhpd %xmm7,%xmm7
divpd  %xmm7,%xmm2
movapd %xmm2,%xmm3
unpckhpd %xmm2,%xmm3
mulsd  %xmm3,%xmm13
mulsd  %xmm3,%xmm13
addsd  %xmm3,%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm13,%xmm3
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
addsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @calc_va([3 x double]* %0, double* %1) {
%3 = alloca [3 x double]*
%4 = alloca double*
%5 = alloca i32
%6 = alloca [3 x double]
%7 = alloca [3 x double]
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
store [3 x double]* %0, [3 x double]** %3
store double* %1, double** %4
%18 = load double*, double** %4
%19 = getelementptr inbounds double, double* %18, i64 0
%20 = load double, double* %19
%21 = load double*, double** %4
%22 = getelementptr inbounds double, double* %21, i64 1
%23 = load double, double* %22
%24 = fadd double %20, %23
store double %24, double* %15
%25 = load double*, double** %4
%26 = getelementptr inbounds double, double* %25, i64 0
%27 = load double, double* %26
%28 = load double*, double** %4
%29 = getelementptr inbounds double, double* %28, i64 2
%30 = load double, double* %29
%31 = fadd double %27, %30
store double %31, double* %16
store i32 0, i32* %5
br label %32
32: ; preds = %110, %2
%33 = load i32, i32* %5
%34 = icmp slt i32 %33, 3
br i1 %34, label %35, label %113
35: ; preds = %32
%36 = load double, double* %16
%37 = load double, double* %16
%38 = fmul double %36, %37
%39 = load [3 x double]*, [3 x double]** %3
%40 = load i32, i32* %5
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [3 x double], [3 x double]* %39, i64 %41
%43 = getelementptr inbounds [3 x double], [3 x double]* %42, i64 0, i64 0
%44 = load double, double* %43
%45 = load double, double* %16
%46 = fmul double 2.000000e+00, %45
%47 = load double, double* %16
%48 = fsub double 1.000000e+00, %47
%49 = fmul double %46, %48
%50 = load [3 x double]*, [3 x double]** %3
%51 = load i32, i32* %5
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [3 x double], [3 x double]* %50, i64 %52
%54 = getelementptr inbounds [3 x double], [3 x double]* %53, i64 0, i64 1
%55 = load double, double* %54
%56 = fmul double %49, %55
%57 = call double @llvm.fmuladd.f64(double %38, double %44, double %56)
%58 = load double, double* %16
%59 = fsub double 1.000000e+00, %58
%60 = load double, double* %16
%61 = fsub double 1.000000e+00, %60
%62 = fmul double %59, %61
%63 = load [3 x double]*, [3 x double]** %3
%64 = load i32, i32* %5
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [3 x double], [3 x double]* %63, i64 %65
%67 = getelementptr inbounds [3 x double], [3 x double]* %66, i64 0, i64 2
%68 = load double, double* %67
%69 = call double @llvm.fmuladd.f64(double %62, double %68, double %57)
%70 = load i32, i32* %5
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 %71
store double %69, double* %72
%73 = load double, double* %15
%74 = load double, double* %15
%75 = fmul double %73, %74
%76 = load [3 x double]*, [3 x double]** %3
%77 = getelementptr inbounds [3 x double], [3 x double]* %76, i64 0
%78 = load i32, i32* %5
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [3 x double], [3 x double]* %77, i64 0, i64 %79
%81 = load double, double* %80
%82 = load double, double* %15
%83 = fmul double 2.000000e+00, %82
%84 = load double, double* %15
%85 = fsub double 1.000000e+00, %84
%86 = fmul double %83, %85
%87 = load [3 x double]*, [3 x double]** %3
%88 = getelementptr inbounds [3 x double], [3 x double]* %87, i64 1
%89 = load i32, i32* %5
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [3 x double], [3 x double]* %88, i64 0, i64 %90
%92 = load double, double* %91
%93 = fmul double %86, %92
%94 = call double @llvm.fmuladd.f64(double %75, double %81, double %93)
%95 = load double, double* %15
%96 = fsub double 1.000000e+00, %95
%97 = load double, double* %15
%98 = fsub double 1.000000e+00, %97
%99 = fmul double %96, %98
%100 = load [3 x double]*, [3 x double]** %3
%101 = getelementptr inbounds [3 x double], [3 x double]* %100, i64 2
%102 = load i32, i32* %5
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [3 x double], [3 x double]* %101, i64 0, i64 %103
%105 = load double, double* %104
%106 = call double @llvm.fmuladd.f64(double %99, double %105, double %94)
%107 = load i32, i32* %5
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 %108
store double %106, double* %109
br label %110
110: ; preds = %35
%111 = load i32, i32* %5
%112 = add nsw i32 %111, 1
store i32 %112, i32* %5
br label %32
113: ; preds = %32
%114 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
%115 = load double, double* %114
%116 = load double*, double** %4
%117 = getelementptr inbounds double, double* %116, i64 0
%118 = load double, double* %117
%119 = load double*, double** %4
%120 = getelementptr inbounds double, double* %119, i64 1
%121 = load double, double* %120
%122 = fadd double %118, %121
%123 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 1
%124 = load double, double* %123
%125 = load double*, double** %4
%126 = getelementptr inbounds double, double* %125, i64 0
%127 = load double, double* %126
%128 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %127, double 1.000000e+00)
%129 = load double*, double** %4
%130 = getelementptr inbounds double, double* %129, i64 1
%131 = load double, double* %130
%132 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %131, double %128)
%133 = fmul double %124, %132
%134 = call double @llvm.fmuladd.f64(double %115, double %122, double %133)
%135 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 2
%136 = load double, double* %135
%137 = load double*, double** %4
%138 = getelementptr inbounds double, double* %137, i64 2
%139 = load double, double* %138
%140 = load double*, double** %4
%141 = getelementptr inbounds double, double* %140, i64 3
%142 = load double, double* %141
%143 = fadd double %139, %142
%144 = fneg double %136
%145 = call double @llvm.fmuladd.f64(double %144, double %143, double %134)
store double %145, double* %8
%146 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%147 = load double, double* %146
%148 = load double*, double** %4
%149 = getelementptr inbounds double, double* %148, i64 0
%150 = load double, double* %149
%151 = load double*, double** %4
%152 = getelementptr inbounds double, double* %151, i64 2
%153 = load double, double* %152
%154 = fadd double %150, %153
%155 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 1
%156 = load double, double* %155
%157 = load double*, double** %4
%158 = getelementptr inbounds double, double* %157, i64 0
%159 = load double, double* %158
%160 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %159, double 1.000000e+00)
%161 = load double*, double** %4
%162 = getelementptr inbounds double, double* %161, i64 2
%163 = load double, double* %162
%164 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %163, double %160)
%165 = fmul double %156, %164
%166 = call double @llvm.fmuladd.f64(double %147, double %154, double %165)
%167 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 2
%168 = load double, double* %167
%169 = load double*, double** %4
%170 = getelementptr inbounds double, double* %169, i64 1
%171 = load double, double* %170
%172 = load double*, double** %4
%173 = getelementptr inbounds double, double* %172, i64 3
%174 = load double, double* %173
%175 = fadd double %171, %174
%176 = fneg double %168
%177 = call double @llvm.fmuladd.f64(double %176, double %175, double %166)
store double %177, double* %9
%178 = load double*, double** %4
%179 = getelementptr inbounds double, double* %178, i64 0
%180 = load double, double* %179
%181 = load double*, double** %4
%182 = getelementptr inbounds double, double* %181, i64 0
%183 = load double, double* %182
%184 = load double*, double** %4
%185 = getelementptr inbounds double, double* %184, i64 1
%186 = load double, double* %185
%187 = fadd double %183, %186
%188 = load double*, double** %4
%189 = getelementptr inbounds double, double* %188, i64 0
%190 = load double, double* %189
%191 = load double*, double** %4
%192 = getelementptr inbounds double, double* %191, i64 2
%193 = load double, double* %192
%194 = fadd double %190, %193
%195 = fneg double %187
%196 = call double @llvm.fmuladd.f64(double %195, double %194, double %180)
store double %196, double* %10
%197 = load double*, double** %4
%198 = getelementptr inbounds double, double* %197, i64 0
%199 = load double, double* %198
%200 = load double*, double** %4
%201 = getelementptr inbounds double, double* %200, i64 1
%202 = load double, double* %201
%203 = fadd double %199, %202
%204 = load double*, double** %4
%205 = getelementptr inbounds double, double* %204, i64 2
%206 = load double, double* %205
%207 = load double*, double** %4
%208 = getelementptr inbounds double, double* %207, i64 3
%209 = load double, double* %208
%210 = fadd double %206, %209
%211 = fmul double %203, %210
store double %211, double* %11
%212 = load double*, double** %4
%213 = getelementptr inbounds double, double* %212, i64 0
%214 = load double, double* %213
%215 = load double*, double** %4
%216 = getelementptr inbounds double, double* %215, i64 2
%217 = load double, double* %216
%218 = fadd double %214, %217
%219 = load double*, double** %4
%220 = getelementptr inbounds double, double* %219, i64 1
%221 = load double, double* %220
%222 = load double*, double** %4
%223 = getelementptr inbounds double, double* %222, i64 3
%224 = load double, double* %223
%225 = fadd double %221, %224
%226 = fmul double %218, %225
store double %226, double* %12
%227 = load double, double* %8
%228 = load double, double* %10
%229 = load double, double* %9
%230 = fmul double %228, %229
%231 = load double, double* %11
%232 = fdiv double %230, %231
%233 = fsub double %227, %232
%234 = load double, double* %10
%235 = load double, double* %10
%236 = fmul double %234, %235
%237 = load double, double* %11
%238 = load double, double* %12
%239 = fmul double %237, %238
%240 = fdiv double %236, %239
%241 = fsub double 1.000000e+00, %240
%242 = fdiv double %233, %241
store double %242, double* %13
%243 = load double, double* %9
%244 = load double, double* %10
%245 = load double, double* %8
%246 = fmul double %244, %245
%247 = load double, double* %12
%248 = fdiv double %246, %247
%249 = fsub double %243, %248
%250 = load double, double* %10
%251 = load double, double* %10
%252 = fmul double %250, %251
%253 = load double, double* %11
%254 = load double, double* %12
%255 = fmul double %253, %254
%256 = fdiv double %252, %255
%257 = fsub double 1.000000e+00, %256
%258 = fdiv double %249, %257
store double %258, double* %14
%259 = load double, double* %11
%260 = load double, double* %13
%261 = fmul double %259, %260
%262 = load double, double* %13
%263 = load double, double* %13
%264 = fmul double 2.000000e+00, %263
%265 = load double, double* %14
%266 = fmul double %264, %265
%267 = load double, double* %10
%268 = fmul double %266, %267
%269 = call double @llvm.fmuladd.f64(double %261, double %262, double %268)
%270 = load double, double* %12
%271 = load double, double* %14
%272 = fmul double %270, %271
%273 = load double, double* %14
%274 = call double @llvm.fmuladd.f64(double %272, double %273, double %269)
%275 = fmul double 2.000000e+00, %274
store double %275, double* %17
%276 = load double, double* %17
ret double %276
}

LLVM IR (-O2):
define double @calc_va([3 x double]* nocapture %0, double* nocapture %1) {
%3 = bitcast double* %1 to <2 x double>*
%4 = load <2 x double>, <2 x double>* %3
%5 = getelementptr inbounds double, double* %1, i64 2
%6 = bitcast double* %5 to <2 x double>*
%7 = load <2 x double>, <2 x double>* %6
%8 = shufflevector <2 x double> %7, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%9 = shufflevector <2 x double> %7, <2 x double> %4, <2 x i32> <i32 0, i32 2>
%10 = fadd <2 x double> %9, %8
%11 = extractelement <2 x double> %10, i64 1
%12 = fmul double %11, %11
%13 = fmul double %11, 2.000000e+00
%14 = fsub double 1.000000e+00, %11
%15 = fmul double %13, %14
%16 = fmul double %14, %14
%17 = extractelement <2 x double> %4, i64 1
%18 = shufflevector <2 x double> %4, <2 x double> %7, <2 x i32> <i32 1, i32 3>
%19 = fadd <2 x double> %4, %18
%20 = extractelement <2 x double> %19, i64 0
%21 = fmul <2 x double> %19, %19
%22 = extractelement <2 x double> %21, i64 0
%23 = fmul double %20, 2.000000e+00
%24 = fsub double 1.000000e+00, %20
%25 = fmul double %23, %24
%26 = fmul double %24, %24
%27 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 0
%28 = load double, double* %27
%29 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 1
%30 = load double, double* %29
%31 = fmul double %15, %30
%32 = tail call double @llvm.fmuladd.f64(double %12, double %28, double %31)
%33 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%34 = load double, double* %33
%35 = tail call double @llvm.fmuladd.f64(double %16, double %34, double %32)
%36 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%37 = load double, double* %36
%38 = fmul double %25, %37
%39 = tail call double @llvm.fmuladd.f64(double %22, double %28, double %38)
%40 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%41 = load double, double* %40
%42 = tail call double @llvm.fmuladd.f64(double %26, double %41, double %39)
%43 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 1
%44 = load double, double* %43
%45 = fmul double %15, %44
%46 = tail call double @llvm.fmuladd.f64(double %12, double %37, double %45)
%47 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%48 = load double, double* %47
%49 = tail call double @llvm.fmuladd.f64(double %16, double %48, double %46)
%50 = fmul double %25, %44
%51 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 1
%52 = load double, double* %51
%53 = fmul double %15, %52
%54 = tail call double @llvm.fmuladd.f64(double %12, double %41, double %53)
%55 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 2
%56 = load double, double* %55
%57 = tail call double @llvm.fmuladd.f64(double %16, double %56, double %54)
%58 = fmul double %25, %48
%59 = tail call double @llvm.fmuladd.f64(double %22, double %34, double %58)
%60 = tail call double @llvm.fmuladd.f64(double %26, double %56, double %59)
%61 = shufflevector <2 x double> %4, <2 x double> %21, <2 x i32> <i32 0, i32 2>
%62 = insertelement <2 x double> <double -2.000000e+00, double poison>, double %30, i64 1
%63 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %50, i64 1
%64 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %61, <2 x double> %62, <2 x double> %63)
%65 = extractelement <2 x double> %64, i64 0
%66 = tail call double @llvm.fmuladd.f64(double %17, double -2.000000e+00, double %65)
%67 = fmul double %66, %49
%68 = tail call double @llvm.fmuladd.f64(double %35, double %20, double %67)
%69 = insertelement <2 x double> %7, double %26, i64 1
%70 = insertelement <2 x double> <double -2.000000e+00, double poison>, double %52, i64 1
%71 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %69, <2 x double> %70, <2 x double> %64)
%72 = shufflevector <2 x double> %71, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%73 = fmul <2 x double> %71, %72
%74 = extractelement <2 x double> %73, i64 0
%75 = tail call double @llvm.fmuladd.f64(double %42, double %11, double %74)
%76 = fneg double %60
%77 = extractelement <2 x double> %19, i64 1
%78 = tail call double @llvm.fmuladd.f64(double %76, double %77, double %75)
%79 = insertelement <2 x double> poison, double %57, i64 0
%80 = shufflevector <2 x double> %79, <2 x double> %19, <2 x i32> <i32 0, i32 2>
%81 = fneg <2 x double> %80
%82 = insertelement <2 x double> poison, double %68, i64 0
%83 = shufflevector <2 x double> %82, <2 x double> %4, <2 x i32> <i32 0, i32 2>
%84 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %81, <2 x double> %10, <2 x double> %83)
%85 = fmul <2 x double> %19, %10
%86 = extractelement <2 x double> %84, i64 1
%87 = fmul double %86, %78
%88 = extractelement <2 x double> %85, i64 0
%89 = fdiv double %87, %88
%90 = extractelement <2 x double> %84, i64 0
%91 = fsub double %90, %89
%92 = extractelement <2 x double> %85, i64 1
%93 = fmul double %88, %92
%94 = shufflevector <2 x double> %84, <2 x double> undef, <2 x i32> <i32 1, i32 1>
%95 = fmul <2 x double> %94, %84
%96 = insertelement <2 x double> poison, double %92, i64 0
%97 = insertelement <2 x double> %96, double %93, i64 1
%98 = fdiv <2 x double> %95, %97
%99 = insertelement <2 x double> <double poison, double 1.000000e+00>, double %78, i64 0
%100 = fsub <2 x double> %99, %98
%101 = insertelement <2 x double> %100, double %91, i64 1
%102 = shufflevector <2 x double> %100, <2 x double> undef, <2 x i32> <i32 1, i32 1>
%103 = fdiv <2 x double> %101, %102
%104 = extractelement <2 x double> %103, i64 1
%105 = fmul double %88, %104
%106 = fmul double %104, 2.000000e+00
%107 = extractelement <2 x double> %103, i64 0
%108 = fmul double %107, %106
%109 = fmul double %86, %108
%110 = tail call double @llvm.fmuladd.f64(double %105, double %104, double %109)
%111 = fmul double %92, %107
%112 = tail call double @llvm.fmuladd.f64(double %111, double %107, double %110)
%113 = fmul double %112, 2.000000e+00
ret double %113
}