double det3(double j1[3], double j2[3], double j3[3]) {
  double deter;
  double j11, j12, j13, j21, j22, j23, j31, j32, j33;
  j11 = j1[0];
  j12 = j2[0];
  j13 = j3[0];
  j21 = j1[1];
  j22 = j2[1];
  j23 = j3[1];
  j31 = j1[2];
  j32 = j2[2];
  j33 = j3[2];
  deter = j11 * (j22 * j33 - j23 * j32) - j12 * (j21 * j33 - j23 * j31) +
          j13 * (j21 * j32 - j22 * j31);
  return deter;
}


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

x86 assembly (clang, -O2):
<det3>:
movsd  0x8(%rdi),%xmm0
movsd  0x10(%rdi),%xmm1
movsd  0x8(%rsi),%xmm2
movsd  0x10(%rsi),%xmm3
movsd  0x8(%rdx),%xmm4
movsd  0x10(%rdx),%xmm5
movapd %xmm2,%xmm6
mulsd  %xmm5,%xmm6
mulsd  %xmm0,%xmm5
mulsd  %xmm3,%xmm0
mulsd  %xmm4,%xmm3
subsd  %xmm3,%xmm6
mulsd  %xmm1,%xmm4
subsd  %xmm4,%xmm5
mulsd  (%rsi),%xmm5
mulsd  (%rdi),%xmm6
subsd  %xmm5,%xmm6
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
mulsd  (%rdx),%xmm0
addsd  %xmm6,%xmm0
ret

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

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