void cofactor3D(double *cofDy, const double *p1, const double *p2,
                const double *p3, const double *pM, double w) {
  w = w / 6.0;
  cofDy[0] = w * ((p2[1] - pM[1]) * (p3[2] - pM[2]) -
                  (p2[2] - pM[2]) * (p3[1] - pM[1]));
  cofDy[1] = w * ((p3[1] - pM[1]) * (p1[2] - pM[2]) -
                  (p3[2] - pM[2]) * (p1[1] - pM[1]));
  cofDy[2] = w * ((p1[1] - pM[1]) * (p2[2] - pM[2]) -
                  (p1[2] - pM[2]) * (p2[1] - pM[1]));
  cofDy[3] = w * ((p3[0] - pM[0]) * (p2[2] - pM[2]) -
                  (p3[2] - pM[2]) * (p2[0] - pM[0]));
  cofDy[4] = w * ((p1[0] - pM[0]) * (p3[2] - pM[2]) -
                  (p1[2] - pM[2]) * (p3[0] - pM[0]));
  cofDy[5] = w * ((p2[0] - pM[0]) * (p1[2] - pM[2]) -
                  (p2[2] - pM[2]) * (p1[0] - pM[0]));
  cofDy[6] = w * ((p2[0] - pM[0]) * (p3[1] - pM[1]) -
                  (p2[1] - pM[1]) * (p3[0] - pM[0]));
  cofDy[7] = w * ((p3[0] - pM[0]) * (p1[1] - pM[1]) -
                  (p3[1] - pM[1]) * (p1[0] - pM[0]));
  cofDy[8] = w * ((p1[0] - pM[0]) * (p2[1] - pM[1]) -
                  (p1[1] - pM[1]) * (p2[0] - pM[0]));
}


x86 assembly (clang, -O0):
<cofactor3D>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x28(%rbp),%rax
subsd  0x8(%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm3
mov    -0x28(%rbp),%rax
subsd  0x10(%rax),%xmm3
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x28(%rbp),%rax
subsd  0x10(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm4
mov    -0x28(%rbp),%rax
subsd  0x8(%rax),%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x28(%rbp),%rax
subsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm3
mov    -0x28(%rbp),%rax
subsd  0x10(%rax),%xmm3
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x28(%rbp),%rax
subsd  0x10(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm4
mov    -0x28(%rbp),%rax
subsd  0x8(%rax),%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x28(%rbp),%rax
subsd  0x8(%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm3
mov    -0x28(%rbp),%rax
subsd  0x10(%rax),%xmm3
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x28(%rbp),%rax
subsd  0x10(%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm4
mov    -0x28(%rbp),%rax
subsd  0x8(%rax),%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm3
mov    -0x28(%rbp),%rax
subsd  0x10(%rax),%xmm3
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x28(%rbp),%rax
subsd  0x10(%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm4
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm3
mov    -0x28(%rbp),%rax
subsd  0x10(%rax),%xmm3
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x28(%rbp),%rax
subsd  0x10(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm4
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm3
mov    -0x28(%rbp),%rax
subsd  0x10(%rax),%xmm3
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x28(%rbp),%rax
subsd  0x10(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm4
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0x28(%rbp),%rax
subsd  0x8(%rax),%xmm3
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x28(%rbp),%rax
subsd  0x8(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm4
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0x28(%rbp),%rax
subsd  0x8(%rax),%xmm3
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x28(%rbp),%rax
subsd  0x8(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm4
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x38(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0x28(%rbp),%rax
subsd  0x8(%rax),%xmm3
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x28(%rbp),%rax
subsd  0x8(%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm4
mov    -0x28(%rbp),%rax
subsd  (%rax),%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x40(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cofactor3D>:
divsd  0xef8(%rip),%xmm0
movsd  0x8(%r8),%xmm1
movsd  0x10(%r8),%xmm2
movsd  0x8(%rdx),%xmm3
movsd  0x10(%rdx),%xmm4
subsd  %xmm1,%xmm3
movsd  0x8(%rcx),%xmm5
movsd  0x10(%rcx),%xmm6
subsd  %xmm2,%xmm6
mulsd  %xmm3,%xmm6
subsd  %xmm2,%xmm4
subsd  %xmm1,%xmm5
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm6
mulsd  %xmm0,%xmm6
movsd  %xmm6,(%rdi)
movsd  0x8(%r8),%xmm1
movsd  0x10(%r8),%xmm2
movsd  0x8(%rcx),%xmm3
movsd  0x10(%rcx),%xmm4
subsd  %xmm1,%xmm3
movsd  0x8(%rsi),%xmm5
movsd  0x10(%rsi),%xmm6
subsd  %xmm2,%xmm6
mulsd  %xmm3,%xmm6
subsd  %xmm2,%xmm4
subsd  %xmm1,%xmm5
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm6
mulsd  %xmm0,%xmm6
movsd  %xmm6,0x8(%rdi)
movsd  0x8(%r8),%xmm1
movsd  0x10(%r8),%xmm2
movsd  0x8(%rsi),%xmm3
movsd  0x10(%rsi),%xmm4
subsd  %xmm1,%xmm3
movsd  0x8(%rdx),%xmm5
movsd  0x10(%rdx),%xmm6
subsd  %xmm2,%xmm6
mulsd  %xmm3,%xmm6
subsd  %xmm2,%xmm4
subsd  %xmm1,%xmm5
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm6
mulsd  %xmm0,%xmm6
movsd  %xmm6,0x10(%rdi)
movsd  (%r8),%xmm1
movsd  0x10(%r8),%xmm2
movsd  (%rcx),%xmm3
movsd  0x10(%rcx),%xmm4
subsd  %xmm1,%xmm3
movsd  (%rdx),%xmm5
movsd  0x10(%rdx),%xmm6
subsd  %xmm2,%xmm6
mulsd  %xmm3,%xmm6
subsd  %xmm2,%xmm4
subsd  %xmm1,%xmm5
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm6
mulsd  %xmm0,%xmm6
movsd  %xmm6,0x18(%rdi)
movsd  (%r8),%xmm1
movsd  0x10(%r8),%xmm2
movsd  (%rsi),%xmm3
movsd  0x10(%rsi),%xmm4
subsd  %xmm1,%xmm3
movsd  (%rcx),%xmm5
movsd  0x10(%rcx),%xmm6
subsd  %xmm2,%xmm6
mulsd  %xmm3,%xmm6
subsd  %xmm2,%xmm4
subsd  %xmm1,%xmm5
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm6
mulsd  %xmm0,%xmm6
movsd  %xmm6,0x20(%rdi)
movsd  (%r8),%xmm1
movsd  0x10(%r8),%xmm2
movsd  (%rdx),%xmm3
movsd  0x10(%rdx),%xmm4
subsd  %xmm1,%xmm3
movsd  (%rsi),%xmm5
movsd  0x10(%rsi),%xmm6
subsd  %xmm2,%xmm6
mulsd  %xmm3,%xmm6
subsd  %xmm2,%xmm4
subsd  %xmm1,%xmm5
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm6
mulsd  %xmm0,%xmm6
movsd  %xmm6,0x28(%rdi)
movsd  (%r8),%xmm1
movsd  0x8(%r8),%xmm2
movsd  (%rdx),%xmm3
movsd  0x8(%rdx),%xmm4
subsd  %xmm1,%xmm3
movsd  (%rcx),%xmm5
movsd  0x8(%rcx),%xmm6
subsd  %xmm2,%xmm6
mulsd  %xmm3,%xmm6
subsd  %xmm2,%xmm4
subsd  %xmm1,%xmm5
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm6
mulsd  %xmm0,%xmm6
movsd  %xmm6,0x30(%rdi)
movsd  (%r8),%xmm1
movsd  0x8(%r8),%xmm2
movsd  (%rcx),%xmm3
movsd  0x8(%rcx),%xmm4
subsd  %xmm1,%xmm3
movsd  (%rsi),%xmm5
movsd  0x8(%rsi),%xmm6
subsd  %xmm2,%xmm6
mulsd  %xmm3,%xmm6
subsd  %xmm2,%xmm4
subsd  %xmm1,%xmm5
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm6
mulsd  %xmm0,%xmm6
movsd  %xmm6,0x38(%rdi)
movsd  (%r8),%xmm1
movsd  0x8(%r8),%xmm2
movsd  (%rsi),%xmm3
movsd  0x8(%rsi),%xmm4
subsd  %xmm1,%xmm3
movsd  (%rdx),%xmm5
movsd  0x8(%rdx),%xmm6
subsd  %xmm2,%xmm6
mulsd  %xmm3,%xmm6
subsd  %xmm2,%xmm4
subsd  %xmm1,%xmm5
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm6
mulsd  %xmm0,%xmm6
movsd  %xmm6,0x40(%rdi)
ret

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

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