double det3D(const double *col1, const double *col2, const double *col3,
             const double *colM) {
  return ((col1[0] - colM[0]) * (col2[1] - colM[1]) * (col3[2] - colM[2]) +
          (col1[2] - colM[2]) * (col2[0] - colM[0]) * (col3[1] - colM[1]) +
          (col1[1] - colM[1]) * (col2[2] - colM[2]) * (col3[0] - colM[0]) -
          (col1[2] - colM[2]) * (col2[1] - colM[1]) * (col3[0] - colM[0]) -
          (col1[0] - colM[0]) * (col2[2] - colM[2]) * (col3[1] - colM[1]) -
          (col1[1] - colM[1]) * (col2[0] - colM[0]) * (col3[2] - colM[2])) /
         6.0;
}


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

x86 assembly (clang, -O2):
<det3D>:
movsd  (%rcx),%xmm8
movsd  0x8(%rcx),%xmm9
movsd  (%rdi),%xmm5
movsd  0x8(%rdi),%xmm0
subsd  %xmm8,%xmm5
movsd  (%rsi),%xmm1
movsd  0x8(%rsi),%xmm11
subsd  %xmm9,%xmm11
movsd  0x10(%rcx),%xmm10
movsd  0x10(%rdi),%xmm6
subsd  %xmm10,%xmm6
subsd  %xmm8,%xmm1
movapd %xmm6,%xmm12
mulsd  %xmm1,%xmm12
subsd  %xmm9,%xmm0
movsd  0x10(%rsi),%xmm3
subsd  %xmm10,%xmm3
mulsd  %xmm0,%xmm1
mulsd  %xmm3,%xmm0
mulsd  %xmm5,%xmm3
mulsd  %xmm11,%xmm5
movsd  0x10(%rdx),%xmm7
subsd  %xmm10,%xmm7
movsd  (%rdx),%xmm4
movsd  0x8(%rdx),%xmm2
subsd  %xmm9,%xmm2
mulsd  %xmm2,%xmm12
mulsd  %xmm7,%xmm5
addsd  %xmm12,%xmm5
subsd  %xmm8,%xmm4
mulsd  %xmm4,%xmm0
addsd  %xmm5,%xmm0
mulsd  %xmm11,%xmm6
mulsd  %xmm4,%xmm6
subsd  %xmm6,%xmm0
mulsd  %xmm2,%xmm3
subsd  %xmm3,%xmm0
mulsd  %xmm7,%xmm1
subsd  %xmm1,%xmm0
divsd  0xe41(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @det3D(double* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3) {
%5 = load double, double* %0
%6 = load double, double* %3
%7 = fsub double %5, %6
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %3, i64 1
%11 = load double, double* %10
%12 = fsub double %9, %11
%13 = fmul double %7, %12
%14 = getelementptr inbounds double, double* %2, i64 2
%15 = load double, double* %14
%16 = getelementptr inbounds double, double* %3, i64 2
%17 = load double, double* %16
%18 = fsub double %15, %17
%19 = getelementptr inbounds double, double* %0, i64 2
%20 = load double, double* %19
%21 = fsub double %20, %17
%22 = load double, double* %1
%23 = fsub double %22, %6
%24 = fmul double %21, %23
%25 = getelementptr inbounds double, double* %2, i64 1
%26 = load double, double* %25
%27 = fsub double %26, %11
%28 = fmul double %24, %27
%29 = tail call double @llvm.fmuladd.f64(double %13, double %18, double %28)
%30 = getelementptr inbounds double, double* %0, i64 1
%31 = load double, double* %30
%32 = fsub double %31, %11
%33 = getelementptr inbounds double, double* %1, i64 2
%34 = load double, double* %33
%35 = fsub double %34, %17
%36 = fmul double %32, %35
%37 = load double, double* %2
%38 = fsub double %37, %6
%39 = tail call double @llvm.fmuladd.f64(double %36, double %38, double %29)
%40 = fneg double %21
%41 = fmul double %12, %40
%42 = tail call double @llvm.fmuladd.f64(double %41, double %38, double %39)
%43 = fneg double %7
%44 = fmul double %35, %43
%45 = tail call double @llvm.fmuladd.f64(double %44, double %27, double %42)
%46 = fneg double %32
%47 = fmul double %23, %46
%48 = tail call double @llvm.fmuladd.f64(double %47, double %18, double %45)
%49 = fdiv double %48, 6.000000e+00
ret double %49
}