double det33(double m[3][3]) {
  double d;
  double c00, c01, c02;
  double m00, m01, m02, m10, m11, m12, m20, m21, m22;
  m00 = m[0][0];
  m01 = m[0][1];
  m02 = m[0][2];
  m10 = m[1][0];
  m11 = m[1][1];
  m12 = m[1][2];
  m20 = m[2][0];
  m21 = m[2][1];
  m22 = m[2][2];
  c00 = m11 * m22 - m12 * m21;
  c01 = m12 * m20 - m10 * m22;
  c02 = m10 * m21 - m11 * m20;
  d = m00 * c00 + m01 * c01 + m02 * c02;
  return d;
}


x86 assembly (clang, -O0):
<det33>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<det33>:
movsd  0x18(%rdi),%xmm0
movsd  0x20(%rdi),%xmm1
movsd  0x28(%rdi),%xmm2
movsd  0x30(%rdi),%xmm3
movsd  0x38(%rdi),%xmm4
movsd  0x40(%rdi),%xmm5
movapd %xmm1,%xmm6
mulsd  %xmm5,%xmm6
mulsd  %xmm0,%xmm5
mulsd  %xmm4,%xmm0
mulsd  %xmm2,%xmm4
subsd  %xmm4,%xmm6
mulsd  %xmm3,%xmm2
subsd  %xmm5,%xmm2
mulsd  %xmm1,%xmm3
subsd  %xmm3,%xmm0
mulsd  0x8(%rdi),%xmm2
mulsd  (%rdi),%xmm6
addsd  %xmm2,%xmm6
mulsd  0x10(%rdi),%xmm0
addsd  %xmm6,%xmm0
ret

LLVM IR (-O0):
define double @det33([3 x double]* %0) {
%2 = alloca [3 x double]*
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca 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
store [3 x double]* %0, [3 x double]** %2
%16 = load [3 x double]*, [3 x double]** %2
%17 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0
%18 = getelementptr inbounds [3 x double], [3 x double]* %17, i64 0, i64 0
%19 = load double, double* %18
store double %19, double* %7
%20 = load [3 x double]*, [3 x double]** %2
%21 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0
%22 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 1
%23 = load double, double* %22
store double %23, double* %8
%24 = load [3 x double]*, [3 x double]** %2
%25 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 0
%26 = getelementptr inbounds [3 x double], [3 x double]* %25, i64 0, i64 2
%27 = load double, double* %26
store double %27, double* %9
%28 = load [3 x double]*, [3 x double]** %2
%29 = getelementptr inbounds [3 x double], [3 x double]* %28, i64 1
%30 = getelementptr inbounds [3 x double], [3 x double]* %29, i64 0, i64 0
%31 = load double, double* %30
store double %31, double* %10
%32 = load [3 x double]*, [3 x double]** %2
%33 = getelementptr inbounds [3 x double], [3 x double]* %32, i64 1
%34 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 1
%35 = load double, double* %34
store double %35, double* %11
%36 = load [3 x double]*, [3 x double]** %2
%37 = getelementptr inbounds [3 x double], [3 x double]* %36, i64 1
%38 = getelementptr inbounds [3 x double], [3 x double]* %37, i64 0, i64 2
%39 = load double, double* %38
store double %39, double* %12
%40 = load [3 x double]*, [3 x double]** %2
%41 = getelementptr inbounds [3 x double], [3 x double]* %40, i64 2
%42 = getelementptr inbounds [3 x double], [3 x double]* %41, i64 0, i64 0
%43 = load double, double* %42
store double %43, double* %13
%44 = load [3 x double]*, [3 x double]** %2
%45 = getelementptr inbounds [3 x double], [3 x double]* %44, i64 2
%46 = getelementptr inbounds [3 x double], [3 x double]* %45, i64 0, i64 1
%47 = load double, double* %46
store double %47, double* %14
%48 = load [3 x double]*, [3 x double]** %2
%49 = getelementptr inbounds [3 x double], [3 x double]* %48, i64 2
%50 = getelementptr inbounds [3 x double], [3 x double]* %49, i64 0, i64 2
%51 = load double, double* %50
store double %51, double* %15
%52 = load double, double* %11
%53 = load double, double* %15
%54 = load double, double* %12
%55 = load double, double* %14
%56 = fmul double %54, %55
%57 = fneg double %56
%58 = call double @llvm.fmuladd.f64(double %52, double %53, double %57)
store double %58, double* %4
%59 = load double, double* %12
%60 = load double, double* %13
%61 = load double, double* %10
%62 = load double, double* %15
%63 = fmul double %61, %62
%64 = fneg double %63
%65 = call double @llvm.fmuladd.f64(double %59, double %60, double %64)
store double %65, double* %5
%66 = load double, double* %10
%67 = load double, double* %14
%68 = load double, double* %11
%69 = load double, double* %13
%70 = fmul double %68, %69
%71 = fneg double %70
%72 = call double @llvm.fmuladd.f64(double %66, double %67, double %71)
store double %72, double* %6
%73 = load double, double* %7
%74 = load double, double* %4
%75 = load double, double* %8
%76 = load double, double* %5
%77 = fmul double %75, %76
%78 = call double @llvm.fmuladd.f64(double %73, double %74, double %77)
%79 = load double, double* %9
%80 = load double, double* %6
%81 = call double @llvm.fmuladd.f64(double %79, double %80, double %78)
store double %81, double* %3
%82 = load double, double* %3
ret double %82
}

LLVM IR (-O2):
define double @det33([3 x double]* nocapture %0) {
%2 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 0
%3 = load double, double* %2
%4 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%7 = load double, double* %6
%8 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%9 = load double, double* %8
%10 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 1
%11 = load double, double* %10
%12 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%13 = load double, double* %12
%14 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%15 = load double, double* %14
%16 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 1
%17 = load double, double* %16
%18 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 2
%19 = load double, double* %18
%20 = fneg double %13
%21 = fmul double %17, %20
%22 = tail call double @llvm.fmuladd.f64(double %11, double %19, double %21)
%23 = fneg double %9
%24 = fmul double %19, %23
%25 = tail call double @llvm.fmuladd.f64(double %13, double %15, double %24)
%26 = fneg double %11
%27 = fmul double %15, %26
%28 = tail call double @llvm.fmuladd.f64(double %9, double %17, double %27)
%29 = fmul double %5, %25
%30 = tail call double @llvm.fmuladd.f64(double %3, double %22, double %29)
%31 = tail call double @llvm.fmuladd.f64(double %7, double %28, double %30)
ret double %31
}