double determinante(double mtx[3][3]) {
  return (
      (mtx[0][0] * mtx[1][1] * mtx[2][2] + mtx[1][0] * mtx[2][1] * mtx[0][2] +
       mtx[2][0] * mtx[0][1] * mtx[1][2]) -
      (mtx[2][0] * mtx[1][1] * mtx[0][2] + mtx[1][0] * mtx[0][1] * mtx[2][2] +
       mtx[0][0] * mtx[2][1] * mtx[1][2]));
}


x86 assembly (clang, -O0):
<determinante>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x38(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm2
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm3
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x40(%rax),%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x38(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<determinante>:
movupd 0x30(%rdi),%xmm0
movupd (%rdi),%xmm2
movapd %xmm2,%xmm1
shufpd $0x1,%xmm2,%xmm1
movsd  0x20(%rdi),%xmm3
unpcklpd %xmm3,%xmm3
movapd %xmm0,%xmm4
unpckhpd %xmm2,%xmm4
unpcklpd %xmm0,%xmm2
mulpd  %xmm3,%xmm2
movsd  0x18(%rdi),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm4,%xmm3
movsd  0x40(%rdi),%xmm4
movsd  0x10(%rdi),%xmm5
movapd %xmm5,%xmm6
unpcklpd %xmm4,%xmm6
mulpd  %xmm3,%xmm6
unpcklpd %xmm5,%xmm4
mulpd  %xmm2,%xmm4
addpd  %xmm6,%xmm4
mulpd  %xmm0,%xmm1
movsd  0x28(%rdi),%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm1,%xmm0
addpd  %xmm4,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
subsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @determinante([3 x double]* nocapture %0) {
%2 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 1
%3 = load double, double* %2
%4 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 2
%5 = load double, double* %4
%6 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%7 = load double, double* %6
%8 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%9 = load double, double* %8
%10 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%11 = bitcast double* %10 to <2 x double>*
%12 = load <2 x double>, <2 x double>* %11
%13 = bitcast [3 x double]* %0 to <2 x double>*
%14 = load <2 x double>, <2 x double>* %13
%15 = shufflevector <2 x double> %14, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%16 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%17 = load double, double* %16
%18 = insertelement <2 x double> poison, double %3, i64 0
%19 = shufflevector <2 x double> %18, <2 x double> poison, <2 x i32> zeroinitializer
%20 = shufflevector <2 x double> %14, <2 x double> %12, <2 x i32> <i32 0, i32 2>
%21 = fmul <2 x double> %19, %20
%22 = insertelement <2 x double> poison, double %7, i64 0
%23 = shufflevector <2 x double> %22, <2 x double> poison, <2 x i32> zeroinitializer
%24 = shufflevector <2 x double> %12, <2 x double> %14, <2 x i32> <i32 1, i32 3>
%25 = fmul <2 x double> %23, %24
%26 = insertelement <2 x double> poison, double %9, i64 0
%27 = insertelement <2 x double> %26, double %5, i64 1
%28 = fmul <2 x double> %25, %27
%29 = insertelement <2 x double> poison, double %5, i64 0
%30 = insertelement <2 x double> %29, double %9, i64 1
%31 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %21, <2 x double> %30, <2 x double> %28)
%32 = fmul <2 x double> %15, %12
%33 = insertelement <2 x double> poison, double %17, i64 0
%34 = shufflevector <2 x double> %33, <2 x double> poison, <2 x i32> zeroinitializer
%35 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %32, <2 x double> %34, <2 x double> %31)
%36 = shufflevector <2 x double> %35, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%37 = fsub <2 x double> %35, %36
%38 = extractelement <2 x double> %37, i64 0
ret double %38
}