void invert_matrix(double m[3][3], double inverse[3][3]) {
  double det = m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) -
               m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0]) +
               m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]);
  double invdet = 1.0 / det;
  inverse[0][0] = (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * invdet;
  inverse[0][1] = (m[0][2] * m[2][1] - m[0][1] * m[2][2]) * invdet;
  inverse[0][2] = (m[0][1] * m[1][2] - m[0][2] * m[1][1]) * invdet;
  inverse[1][0] = (m[1][2] * m[2][0] - m[1][0] * m[2][2]) * invdet;
  inverse[1][1] = (m[0][0] * m[2][2] - m[0][2] * m[2][0]) * invdet;
  inverse[1][2] = (m[1][0] * m[0][2] - m[0][0] * m[1][2]) * invdet;
  inverse[2][0] = (m[1][0] * m[2][1] - m[2][0] * m[1][1]) * invdet;
  inverse[2][1] = (m[2][0] * m[0][1] - m[0][0] * m[2][1]) * invdet;
  inverse[2][2] = (m[0][0] * m[1][1] - m[1][0] * m[0][1]) * invdet;
}


x86 assembly (clang, -O0):
<invert_matrix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm3
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x28(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm3,%xmm2
addsd  %xmm0,%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm3
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm5
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm4
mov    -0x8(%rbp),%rax
mulsd  0x30(%rax),%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
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm4
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm3
mov    -0x8(%rbp),%rax
mulsd  0x30(%rax),%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,-0x18(%rbp)
movsd  0xdd9(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x28(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x40(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x40(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x30(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x28(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x38(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @invert_matrix([3 x double]* %0, [3 x double]* %1) {
%3 = alloca [3 x double]*
%4 = alloca [3 x double]*
%5 = alloca double
%6 = alloca double
store [3 x double]* %0, [3 x double]** %3
store [3 x double]* %1, [3 x double]** %4
%7 = load [3 x double]*, [3 x double]** %3
%8 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0
%9 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%10 = load double, double* %9
%11 = load [3 x double]*, [3 x double]** %3
%12 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 1
%13 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 1
%14 = load double, double* %13
%15 = load [3 x double]*, [3 x double]** %3
%16 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 2
%17 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 2
%18 = load double, double* %17
%19 = load [3 x double]*, [3 x double]** %3
%20 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 2
%21 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 1
%22 = load double, double* %21
%23 = load [3 x double]*, [3 x double]** %3
%24 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 1
%25 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 0, i64 2
%26 = load double, double* %25
%27 = fmul double %22, %26
%28 = fneg double %27
%29 = call double @llvm.fmuladd.f64(double %14, double %18, double %28)
%30 = load [3 x double]*, [3 x double]** %3
%31 = getelementptr inbounds [3 x double], [3 x double]* %30, i64 0
%32 = getelementptr inbounds [3 x double], [3 x double]* %31, i64 0, i64 1
%33 = load double, double* %32
%34 = load [3 x double]*, [3 x double]** %3
%35 = getelementptr inbounds [3 x double], [3 x double]* %34, i64 1
%36 = getelementptr inbounds [3 x double], [3 x double]* %35, i64 0, i64 0
%37 = load double, double* %36
%38 = load [3 x double]*, [3 x double]** %3
%39 = getelementptr inbounds [3 x double], [3 x double]* %38, i64 2
%40 = getelementptr inbounds [3 x double], [3 x double]* %39, i64 0, i64 2
%41 = load double, double* %40
%42 = load [3 x double]*, [3 x double]** %3
%43 = getelementptr inbounds [3 x double], [3 x double]* %42, i64 1
%44 = getelementptr inbounds [3 x double], [3 x double]* %43, i64 0, i64 2
%45 = load double, double* %44
%46 = load [3 x double]*, [3 x double]** %3
%47 = getelementptr inbounds [3 x double], [3 x double]* %46, i64 2
%48 = getelementptr inbounds [3 x double], [3 x double]* %47, i64 0, i64 0
%49 = load double, double* %48
%50 = fmul double %45, %49
%51 = fneg double %50
%52 = call double @llvm.fmuladd.f64(double %37, double %41, double %51)
%53 = fmul double %33, %52
%54 = fneg double %53
%55 = call double @llvm.fmuladd.f64(double %10, double %29, double %54)
%56 = load [3 x double]*, [3 x double]** %3
%57 = getelementptr inbounds [3 x double], [3 x double]* %56, i64 0
%58 = getelementptr inbounds [3 x double], [3 x double]* %57, i64 0, i64 2
%59 = load double, double* %58
%60 = load [3 x double]*, [3 x double]** %3
%61 = getelementptr inbounds [3 x double], [3 x double]* %60, i64 1
%62 = getelementptr inbounds [3 x double], [3 x double]* %61, i64 0, i64 0
%63 = load double, double* %62
%64 = load [3 x double]*, [3 x double]** %3
%65 = getelementptr inbounds [3 x double], [3 x double]* %64, i64 2
%66 = getelementptr inbounds [3 x double], [3 x double]* %65, i64 0, i64 1
%67 = load double, double* %66
%68 = load [3 x double]*, [3 x double]** %3
%69 = getelementptr inbounds [3 x double], [3 x double]* %68, i64 1
%70 = getelementptr inbounds [3 x double], [3 x double]* %69, i64 0, i64 1
%71 = load double, double* %70
%72 = load [3 x double]*, [3 x double]** %3
%73 = getelementptr inbounds [3 x double], [3 x double]* %72, i64 2
%74 = getelementptr inbounds [3 x double], [3 x double]* %73, i64 0, i64 0
%75 = load double, double* %74
%76 = fmul double %71, %75
%77 = fneg double %76
%78 = call double @llvm.fmuladd.f64(double %63, double %67, double %77)
%79 = call double @llvm.fmuladd.f64(double %59, double %78, double %55)
store double %79, double* %5
%80 = load double, double* %5
%81 = fdiv double 1.000000e+00, %80
store double %81, double* %6
%82 = load [3 x double]*, [3 x double]** %3
%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 1
%85 = load double, double* %84
%86 = load [3 x double]*, [3 x double]** %3
%87 = getelementptr inbounds [3 x double], [3 x double]* %86, i64 2
%88 = getelementptr inbounds [3 x double], [3 x double]* %87, i64 0, i64 2
%89 = load double, double* %88
%90 = load [3 x double]*, [3 x double]** %3
%91 = getelementptr inbounds [3 x double], [3 x double]* %90, i64 2
%92 = getelementptr inbounds [3 x double], [3 x double]* %91, i64 0, i64 1
%93 = load double, double* %92
%94 = load [3 x double]*, [3 x double]** %3
%95 = getelementptr inbounds [3 x double], [3 x double]* %94, i64 1
%96 = getelementptr inbounds [3 x double], [3 x double]* %95, i64 0, i64 2
%97 = load double, double* %96
%98 = fmul double %93, %97
%99 = fneg double %98
%100 = call double @llvm.fmuladd.f64(double %85, double %89, double %99)
%101 = load double, double* %6
%102 = fmul double %100, %101
%103 = load [3 x double]*, [3 x double]** %4
%104 = getelementptr inbounds [3 x double], [3 x double]* %103, i64 0
%105 = getelementptr inbounds [3 x double], [3 x double]* %104, i64 0, i64 0
store double %102, double* %105
%106 = load [3 x double]*, [3 x double]** %3
%107 = getelementptr inbounds [3 x double], [3 x double]* %106, i64 0
%108 = getelementptr inbounds [3 x double], [3 x double]* %107, i64 0, i64 2
%109 = load double, double* %108
%110 = load [3 x double]*, [3 x double]** %3
%111 = getelementptr inbounds [3 x double], [3 x double]* %110, i64 2
%112 = getelementptr inbounds [3 x double], [3 x double]* %111, i64 0, i64 1
%113 = load double, double* %112
%114 = load [3 x double]*, [3 x double]** %3
%115 = getelementptr inbounds [3 x double], [3 x double]* %114, i64 0
%116 = getelementptr inbounds [3 x double], [3 x double]* %115, i64 0, i64 1
%117 = load double, double* %116
%118 = load [3 x double]*, [3 x double]** %3
%119 = getelementptr inbounds [3 x double], [3 x double]* %118, i64 2
%120 = getelementptr inbounds [3 x double], [3 x double]* %119, i64 0, i64 2
%121 = load double, double* %120
%122 = fmul double %117, %121
%123 = fneg double %122
%124 = call double @llvm.fmuladd.f64(double %109, double %113, double %123)
%125 = load double, double* %6
%126 = fmul double %124, %125
%127 = load [3 x double]*, [3 x double]** %4
%128 = getelementptr inbounds [3 x double], [3 x double]* %127, i64 0
%129 = getelementptr inbounds [3 x double], [3 x double]* %128, i64 0, i64 1
store double %126, double* %129
%130 = load [3 x double]*, [3 x double]** %3
%131 = getelementptr inbounds [3 x double], [3 x double]* %130, i64 0
%132 = getelementptr inbounds [3 x double], [3 x double]* %131, i64 0, i64 1
%133 = load double, double* %132
%134 = load [3 x double]*, [3 x double]** %3
%135 = getelementptr inbounds [3 x double], [3 x double]* %134, i64 1
%136 = getelementptr inbounds [3 x double], [3 x double]* %135, i64 0, i64 2
%137 = load double, double* %136
%138 = load [3 x double]*, [3 x double]** %3
%139 = getelementptr inbounds [3 x double], [3 x double]* %138, i64 0
%140 = getelementptr inbounds [3 x double], [3 x double]* %139, i64 0, i64 2
%141 = load double, double* %140
%142 = load [3 x double]*, [3 x double]** %3
%143 = getelementptr inbounds [3 x double], [3 x double]* %142, i64 1
%144 = getelementptr inbounds [3 x double], [3 x double]* %143, i64 0, i64 1
%145 = load double, double* %144
%146 = fmul double %141, %145
%147 = fneg double %146
%148 = call double @llvm.fmuladd.f64(double %133, double %137, double %147)
%149 = load double, double* %6
%150 = fmul double %148, %149
%151 = load [3 x double]*, [3 x double]** %4
%152 = getelementptr inbounds [3 x double], [3 x double]* %151, i64 0
%153 = getelementptr inbounds [3 x double], [3 x double]* %152, i64 0, i64 2
store double %150, double* %153
%154 = load [3 x double]*, [3 x double]** %3
%155 = getelementptr inbounds [3 x double], [3 x double]* %154, i64 1
%156 = getelementptr inbounds [3 x double], [3 x double]* %155, i64 0, i64 2
%157 = load double, double* %156
%158 = load [3 x double]*, [3 x double]** %3
%159 = getelementptr inbounds [3 x double], [3 x double]* %158, i64 2
%160 = getelementptr inbounds [3 x double], [3 x double]* %159, i64 0, i64 0
%161 = load double, double* %160
%162 = load [3 x double]*, [3 x double]** %3
%163 = getelementptr inbounds [3 x double], [3 x double]* %162, i64 1
%164 = getelementptr inbounds [3 x double], [3 x double]* %163, i64 0, i64 0
%165 = load double, double* %164
%166 = load [3 x double]*, [3 x double]** %3
%167 = getelementptr inbounds [3 x double], [3 x double]* %166, i64 2
%168 = getelementptr inbounds [3 x double], [3 x double]* %167, i64 0, i64 2
%169 = load double, double* %168
%170 = fmul double %165, %169
%171 = fneg double %170
%172 = call double @llvm.fmuladd.f64(double %157, double %161, double %171)
%173 = load double, double* %6
%174 = fmul double %172, %173
%175 = load [3 x double]*, [3 x double]** %4
%176 = getelementptr inbounds [3 x double], [3 x double]* %175, i64 1
%177 = getelementptr inbounds [3 x double], [3 x double]* %176, i64 0, i64 0
store double %174, double* %177
%178 = load [3 x double]*, [3 x double]** %3
%179 = getelementptr inbounds [3 x double], [3 x double]* %178, i64 0
%180 = getelementptr inbounds [3 x double], [3 x double]* %179, i64 0, i64 0
%181 = load double, double* %180
%182 = load [3 x double]*, [3 x double]** %3
%183 = getelementptr inbounds [3 x double], [3 x double]* %182, i64 2
%184 = getelementptr inbounds [3 x double], [3 x double]* %183, i64 0, i64 2
%185 = load double, double* %184
%186 = load [3 x double]*, [3 x double]** %3
%187 = getelementptr inbounds [3 x double], [3 x double]* %186, i64 0
%188 = getelementptr inbounds [3 x double], [3 x double]* %187, i64 0, i64 2
%189 = load double, double* %188
%190 = load [3 x double]*, [3 x double]** %3
%191 = getelementptr inbounds [3 x double], [3 x double]* %190, i64 2
%192 = getelementptr inbounds [3 x double], [3 x double]* %191, i64 0, i64 0
%193 = load double, double* %192
%194 = fmul double %189, %193
%195 = fneg double %194
%196 = call double @llvm.fmuladd.f64(double %181, double %185, double %195)
%197 = load double, double* %6
%198 = fmul double %196, %197
%199 = load [3 x double]*, [3 x double]** %4
%200 = getelementptr inbounds [3 x double], [3 x double]* %199, i64 1
%201 = getelementptr inbounds [3 x double], [3 x double]* %200, i64 0, i64 1
store double %198, double* %201
%202 = load [3 x double]*, [3 x double]** %3
%203 = getelementptr inbounds [3 x double], [3 x double]* %202, i64 1
%204 = getelementptr inbounds [3 x double], [3 x double]* %203, i64 0, i64 0
%205 = load double, double* %204
%206 = load [3 x double]*, [3 x double]** %3
%207 = getelementptr inbounds [3 x double], [3 x double]* %206, i64 0
%208 = getelementptr inbounds [3 x double], [3 x double]* %207, i64 0, i64 2
%209 = load double, double* %208
%210 = load [3 x double]*, [3 x double]** %3
%211 = getelementptr inbounds [3 x double], [3 x double]* %210, i64 0
%212 = getelementptr inbounds [3 x double], [3 x double]* %211, i64 0, i64 0
%213 = load double, double* %212
%214 = load [3 x double]*, [3 x double]** %3
%215 = getelementptr inbounds [3 x double], [3 x double]* %214, i64 1
%216 = getelementptr inbounds [3 x double], [3 x double]* %215, i64 0, i64 2
%217 = load double, double* %216
%218 = fmul double %213, %217
%219 = fneg double %218
%220 = call double @llvm.fmuladd.f64(double %205, double %209, double %219)
%221 = load double, double* %6
%222 = fmul double %220, %221
%223 = load [3 x double]*, [3 x double]** %4
%224 = getelementptr inbounds [3 x double], [3 x double]* %223, i64 1
%225 = getelementptr inbounds [3 x double], [3 x double]* %224, i64 0, i64 2
store double %222, double* %225
%226 = load [3 x double]*, [3 x double]** %3
%227 = getelementptr inbounds [3 x double], [3 x double]* %226, i64 1
%228 = getelementptr inbounds [3 x double], [3 x double]* %227, i64 0, i64 0
%229 = load double, double* %228
%230 = load [3 x double]*, [3 x double]** %3
%231 = getelementptr inbounds [3 x double], [3 x double]* %230, i64 2
%232 = getelementptr inbounds [3 x double], [3 x double]* %231, i64 0, i64 1
%233 = load double, double* %232
%234 = load [3 x double]*, [3 x double]** %3
%235 = getelementptr inbounds [3 x double], [3 x double]* %234, i64 2
%236 = getelementptr inbounds [3 x double], [3 x double]* %235, i64 0, i64 0
%237 = load double, double* %236
%238 = load [3 x double]*, [3 x double]** %3
%239 = getelementptr inbounds [3 x double], [3 x double]* %238, i64 1
%240 = getelementptr inbounds [3 x double], [3 x double]* %239, i64 0, i64 1
%241 = load double, double* %240
%242 = fmul double %237, %241
%243 = fneg double %242
%244 = call double @llvm.fmuladd.f64(double %229, double %233, double %243)
%245 = load double, double* %6
%246 = fmul double %244, %245
%247 = load [3 x double]*, [3 x double]** %4
%248 = getelementptr inbounds [3 x double], [3 x double]* %247, i64 2
%249 = getelementptr inbounds [3 x double], [3 x double]* %248, i64 0, i64 0
store double %246, double* %249
%250 = load [3 x double]*, [3 x double]** %3
%251 = getelementptr inbounds [3 x double], [3 x double]* %250, i64 2
%252 = getelementptr inbounds [3 x double], [3 x double]* %251, i64 0, i64 0
%253 = load double, double* %252
%254 = load [3 x double]*, [3 x double]** %3
%255 = getelementptr inbounds [3 x double], [3 x double]* %254, i64 0
%256 = getelementptr inbounds [3 x double], [3 x double]* %255, i64 0, i64 1
%257 = load double, double* %256
%258 = load [3 x double]*, [3 x double]** %3
%259 = getelementptr inbounds [3 x double], [3 x double]* %258, i64 0
%260 = getelementptr inbounds [3 x double], [3 x double]* %259, i64 0, i64 0
%261 = load double, double* %260
%262 = load [3 x double]*, [3 x double]** %3
%263 = getelementptr inbounds [3 x double], [3 x double]* %262, i64 2
%264 = getelementptr inbounds [3 x double], [3 x double]* %263, i64 0, i64 1
%265 = load double, double* %264
%266 = fmul double %261, %265
%267 = fneg double %266
%268 = call double @llvm.fmuladd.f64(double %253, double %257, double %267)
%269 = load double, double* %6
%270 = fmul double %268, %269
%271 = load [3 x double]*, [3 x double]** %4
%272 = getelementptr inbounds [3 x double], [3 x double]* %271, i64 2
%273 = getelementptr inbounds [3 x double], [3 x double]* %272, i64 0, i64 1
store double %270, double* %273
%274 = load [3 x double]*, [3 x double]** %3
%275 = getelementptr inbounds [3 x double], [3 x double]* %274, i64 0
%276 = getelementptr inbounds [3 x double], [3 x double]* %275, i64 0, i64 0
%277 = load double, double* %276
%278 = load [3 x double]*, [3 x double]** %3
%279 = getelementptr inbounds [3 x double], [3 x double]* %278, i64 1
%280 = getelementptr inbounds [3 x double], [3 x double]* %279, i64 0, i64 1
%281 = load double, double* %280
%282 = load [3 x double]*, [3 x double]** %3
%283 = getelementptr inbounds [3 x double], [3 x double]* %282, i64 1
%284 = getelementptr inbounds [3 x double], [3 x double]* %283, i64 0, i64 0
%285 = load double, double* %284
%286 = load [3 x double]*, [3 x double]** %3
%287 = getelementptr inbounds [3 x double], [3 x double]* %286, i64 0
%288 = getelementptr inbounds [3 x double], [3 x double]* %287, i64 0, i64 1
%289 = load double, double* %288
%290 = fmul double %285, %289
%291 = fneg double %290
%292 = call double @llvm.fmuladd.f64(double %277, double %281, double %291)
%293 = load double, double* %6
%294 = fmul double %292, %293
%295 = load [3 x double]*, [3 x double]** %4
%296 = getelementptr inbounds [3 x double], [3 x double]* %295, i64 2
%297 = getelementptr inbounds [3 x double], [3 x double]* %296, i64 0, i64 2
store double %294, double* %297
ret void
}

LLVM IR (-O2):
define void @invert_matrix([3 x double]* nocapture %0, [3 x double]* nocapture writeonly %1) {
%3 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 0
%4 = load double, double* %3
%5 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 2
%8 = load double, double* %7
%9 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 1
%10 = load double, double* %9
%11 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%12 = load double, double* %11
%13 = fneg double %10
%14 = fmul double %12, %13
%15 = tail call double @llvm.fmuladd.f64(double %6, double %8, double %14)
%16 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 1
%17 = load double, double* %16
%18 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%19 = load double, double* %18
%20 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%21 = load double, double* %20
%22 = fneg double %12
%23 = fmul double %21, %22
%24 = tail call double @llvm.fmuladd.f64(double %19, double %8, double %23)
%25 = fneg double %17
%26 = fmul double %24, %25
%27 = tail call double @llvm.fmuladd.f64(double %4, double %15, double %26)
%28 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%29 = load double, double* %28
%30 = fneg double %6
%31 = fmul double %21, %30
%32 = tail call double @llvm.fmuladd.f64(double %19, double %10, double %31)
%33 = tail call double @llvm.fmuladd.f64(double %29, double %32, double %27)
%34 = fdiv double 1.000000e+00, %33
%35 = fmul double %15, %34
%36 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 0
store double %35, double* %36
%37 = load double, double* %28
%38 = load double, double* %9
%39 = load double, double* %16
%40 = load double, double* %7
%41 = fneg double %39
%42 = fmul double %40, %41
%43 = tail call double @llvm.fmuladd.f64(double %37, double %38, double %42)
%44 = fmul double %34, %43
%45 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 1
store double %44, double* %45
%46 = load double, double* %16
%47 = load double, double* %11
%48 = load double, double* %28
%49 = load double, double* %5
%50 = fneg double %48
%51 = fmul double %49, %50
%52 = tail call double @llvm.fmuladd.f64(double %46, double %47, double %51)
%53 = fmul double %34, %52
%54 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 2
store double %53, double* %54
%55 = load double, double* %11
%56 = load double, double* %20
%57 = load double, double* %18
%58 = load double, double* %7
%59 = fneg double %57
%60 = fmul double %58, %59
%61 = tail call double @llvm.fmuladd.f64(double %55, double %56, double %60)
%62 = fmul double %34, %61
%63 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 0
store double %62, double* %63
%64 = load double, double* %3
%65 = load double, double* %7
%66 = load double, double* %28
%67 = load double, double* %20
%68 = fneg double %66
%69 = fmul double %67, %68
%70 = tail call double @llvm.fmuladd.f64(double %64, double %65, double %69)
%71 = fmul double %34, %70
%72 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 1
store double %71, double* %72
%73 = load double, double* %18
%74 = load double, double* %28
%75 = load double, double* %3
%76 = load double, double* %11
%77 = fneg double %75
%78 = fmul double %76, %77
%79 = tail call double @llvm.fmuladd.f64(double %73, double %74, double %78)
%80 = fmul double %34, %79
%81 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 2
store double %80, double* %81
%82 = load double, double* %18
%83 = load double, double* %9
%84 = load double, double* %20
%85 = load double, double* %5
%86 = fneg double %84
%87 = fmul double %85, %86
%88 = tail call double @llvm.fmuladd.f64(double %82, double %83, double %87)
%89 = fmul double %34, %88
%90 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 0
store double %89, double* %90
%91 = load double, double* %20
%92 = load double, double* %16
%93 = load double, double* %3
%94 = load double, double* %9
%95 = fneg double %93
%96 = fmul double %94, %95
%97 = tail call double @llvm.fmuladd.f64(double %91, double %92, double %96)
%98 = fmul double %34, %97
%99 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 1
store double %98, double* %99
%100 = load double, double* %3
%101 = load double, double* %5
%102 = load double, double* %18
%103 = load double, double* %16
%104 = fneg double %102
%105 = fmul double %103, %104
%106 = tail call double @llvm.fmuladd.f64(double %100, double %101, double %105)
%107 = fmul double %34, %106
%108 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 2
store double %107, double* %108
ret void
}