double det(double a11, double a12, double a13, double a21, double a22,
           double a23, double a31, double a32, double a33) {
  double result;
  result = a11 * (a22 * a33 - a32 * a23);
  result -= a12 * (a21 * a33 - a31 * a23);
  result += a13 * (a21 * a32 - a31 * a22);
  return result;
}


x86 assembly (clang, -O0):
<det>:
push   %rbp
mov    %rsp,%rbp
movsd  0x10(%rbp),%xmm8
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0x10(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm2
mulsd  -0x30(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  0x10(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x48(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<det>:
movsd  0x8(%rsp),%xmm8
movapd %xmm4,%xmm9
mulsd  %xmm8,%xmm9
mulsd  %xmm3,%xmm8
mulsd  %xmm7,%xmm3
mulsd  %xmm5,%xmm7
subsd  %xmm7,%xmm9
mulsd  %xmm9,%xmm0
mulsd  %xmm6,%xmm5
subsd  %xmm5,%xmm8
mulsd  %xmm1,%xmm8
subsd  %xmm8,%xmm0
mulsd  %xmm4,%xmm6
subsd  %xmm6,%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @det(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 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
%20 = load double, double* %10
%21 = load double, double* %14
%22 = load double, double* %18
%23 = load double, double* %17
%24 = load double, double* %15
%25 = fmul double %23, %24
%26 = fneg double %25
%27 = call double @llvm.fmuladd.f64(double %21, double %22, double %26)
%28 = fmul double %20, %27
store double %28, double* %19
%29 = load double, double* %11
%30 = load double, double* %13
%31 = load double, double* %18
%32 = load double, double* %16
%33 = load double, double* %15
%34 = fmul double %32, %33
%35 = fneg double %34
%36 = call double @llvm.fmuladd.f64(double %30, double %31, double %35)
%37 = load double, double* %19
%38 = fneg double %29
%39 = call double @llvm.fmuladd.f64(double %38, double %36, double %37)
store double %39, double* %19
%40 = load double, double* %12
%41 = load double, double* %13
%42 = load double, double* %17
%43 = load double, double* %16
%44 = load double, double* %14
%45 = fmul double %43, %44
%46 = fneg double %45
%47 = call double @llvm.fmuladd.f64(double %41, double %42, double %46)
%48 = load double, double* %19
%49 = call double @llvm.fmuladd.f64(double %40, double %47, double %48)
store double %49, double* %19
%50 = load double, double* %19
ret double %50
}

LLVM IR (-O2):
define double @det(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%10 = fneg double %7
%11 = fmul double %10, %5
%12 = tail call double @llvm.fmuladd.f64(double %4, double %8, double %11)
%13 = fmul double %12, %0
%14 = fneg double %6
%15 = fmul double %14, %5
%16 = tail call double @llvm.fmuladd.f64(double %3, double %8, double %15)
%17 = fneg double %1
%18 = tail call double @llvm.fmuladd.f64(double %17, double %16, double %13)
%19 = fmul double %14, %4
%20 = tail call double @llvm.fmuladd.f64(double %3, double %7, double %19)
%21 = tail call double @llvm.fmuladd.f64(double %2, double %20, double %18)
ret double %21
}