__attribute__((visibility("hidden"))) int inverse3x3(double H[3][3]) {
  double det, inverse[3][3];
  int i, j;
  det = H[0][0] * (H[2][2] * H[1][1] - H[2][1] * H[1][2]) -
        H[1][0] * (H[2][2] * H[0][1] - H[2][1] * H[0][2]) +
        H[2][0] * (H[1][2] * H[0][1] - H[1][1] * H[0][2]);
  if (det != 0.) {
    inverse[0][0] = (H[2][2] * H[1][1] - H[2][1] * H[1][2]) / det;
    inverse[0][1] = -(H[2][2] * H[0][1] - H[2][1] * H[0][2]) / det;
    inverse[0][2] = (H[1][2] * H[0][1] - H[1][1] * H[0][2]) / det;
    inverse[1][0] = -(H[2][2] * H[1][0] - H[2][0] * H[1][2]) / det;
    inverse[1][1] = (H[2][2] * H[0][0] - H[2][0] * H[0][2]) / det;
    inverse[1][2] = -(H[1][2] * H[0][0] - H[1][0] * H[0][2]) / det;
    inverse[2][0] = (H[2][1] * H[1][0] - H[2][0] * H[1][1]) / det;
    inverse[2][1] = -(H[2][1] * H[0][0] - H[2][0] * H[0][1]) / det;
    inverse[2][2] = (H[1][1] * H[0][0] - H[1][0] * H[0][1]) / det;
    for (i = 0; i < 3; i++)
      for (j = 0; j < 3; j++)
        H[i][j] = inverse[i][j];
    return 0;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<inverse3x3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm3
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x10(%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    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm3
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm5
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm4
mov    -0x10(%rbp),%rax
mulsd  0x10(%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    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm4
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm3
mov    -0x10(%rbp),%rax
mulsd  0x10(%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  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1238 <inverse3x3+0x138>
jp     1238 <inverse3x3+0x138>
jmp    15c4 <inverse3x3+0x4c4>
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x64(%rbp)
cmpl   $0x3,-0x64(%rbp)
jge    15b8 <inverse3x3+0x4b8>
movl   $0x0,-0x68(%rbp)
cmpl   $0x3,-0x68(%rbp)
jge    15a5 <inverse3x3+0x4a5>
movslq -0x64(%rbp),%rcx
lea    -0x60(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x68(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x68(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    155d <inverse3x3+0x45d>
jmp    15aa <inverse3x3+0x4aa>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    154c <inverse3x3+0x44c>
movl   $0x0,-0x4(%rbp)
jmp    15cb <inverse3x3+0x4cb>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverse3x3>:
movsd  (%rdi),%xmm8
movsd  0x8(%rdi),%xmm9
movsd  0x40(%rdi),%xmm0
movsd  0x20(%rdi),%xmm10
movsd  0x38(%rdi),%xmm14
movsd  0x28(%rdi),%xmm2
movapd %xmm2,%xmm1
mulsd  %xmm14,%xmm1
movapd %xmm0,%xmm4
mulsd  %xmm10,%xmm4
subsd  %xmm1,%xmm4
movsd  0x18(%rdi),%xmm5
movsd  0x10(%rdi),%xmm13
movapd %xmm13,%xmm3
mulsd  %xmm14,%xmm3
movapd %xmm0,%xmm1
mulsd  %xmm9,%xmm1
subsd  %xmm3,%xmm1
movapd %xmm1,%xmm3
mulsd  %xmm5,%xmm3
movapd %xmm8,%xmm6
mulsd  %xmm4,%xmm6
subsd  %xmm3,%xmm6
movsd  0x30(%rdi),%xmm11
movapd %xmm13,%xmm3
mulsd  %xmm10,%xmm3
movapd %xmm2,%xmm7
mulsd  %xmm9,%xmm7
subsd  %xmm3,%xmm7
movapd %xmm11,%xmm3
mulsd  %xmm7,%xmm3
addsd  %xmm6,%xmm3
xorpd  %xmm6,%xmm6
ucomisd %xmm6,%xmm3
jne    11a8 <inverse3x3+0xa8>
jnp    1283 <inverse3x3+0x183>
movapd 0xe4f(%rip),%xmm12
xorpd  %xmm12,%xmm1
unpcklpd %xmm1,%xmm4
movapd %xmm2,%xmm1
mulsd  %xmm11,%xmm1
movapd %xmm0,%xmm6
mulsd  %xmm5,%xmm6
subsd  %xmm1,%xmm6
xorpd  %xmm12,%xmm6
unpcklpd %xmm6,%xmm7
movapd %xmm13,%xmm1
mulsd  %xmm11,%xmm1
mulsd  %xmm8,%xmm0
subsd  %xmm1,%xmm0
movapd 0xe0d(%rip),%xmm1
xorpd  %xmm5,%xmm1
mulsd  %xmm1,%xmm13
mulsd  %xmm8,%xmm2
addsd  %xmm13,%xmm2
xorpd  %xmm12,%xmm2
unpcklpd %xmm2,%xmm0
movapd %xmm10,%xmm2
mulsd  %xmm11,%xmm2
mulsd  %xmm14,%xmm5
subsd  %xmm2,%xmm5
mulsd  %xmm9,%xmm11
mulsd  %xmm8,%xmm14
subsd  %xmm11,%xmm14
xorpd  %xmm12,%xmm14
unpcklpd %xmm14,%xmm5
movapd %xmm3,%xmm2
unpcklpd %xmm3,%xmm2
divpd  %xmm2,%xmm4
divpd  %xmm2,%xmm7
divpd  %xmm2,%xmm0
divpd  %xmm2,%xmm5
mulsd  %xmm1,%xmm9
mulsd  %xmm8,%xmm10
addsd  %xmm9,%xmm10
divsd  %xmm3,%xmm10
movupd %xmm4,(%rdi)
movupd %xmm7,0x10(%rdi)
movupd %xmm0,0x20(%rdi)
movupd %xmm5,0x30(%rdi)
movsd  %xmm10,0x40(%rdi)
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define hidden i32 @inverse3x3([3 x double]* %0) {
%2 = alloca i32
%3 = alloca [3 x double]*
%4 = alloca double
%5 = alloca [3 x [3 x double]]
%6 = alloca i32
%7 = alloca i32
store [3 x double]* %0, [3 x double]** %3
%8 = load [3 x double]*, [3 x double]** %3
%9 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0
%10 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 0
%11 = load double, double* %10
%12 = load [3 x double]*, [3 x double]** %3
%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]** %3
%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 1
%19 = load double, double* %18
%20 = load [3 x double]*, [3 x double]** %3
%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 = load [3 x double]*, [3 x double]** %3
%25 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 1
%26 = getelementptr inbounds [3 x double], [3 x double]* %25, i64 0, i64 2
%27 = load double, double* %26
%28 = fmul double %23, %27
%29 = fneg double %28
%30 = call double @llvm.fmuladd.f64(double %15, double %19, double %29)
%31 = load [3 x double]*, [3 x double]** %3
%32 = getelementptr inbounds [3 x double], [3 x double]* %31, i64 1
%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]** %3
%36 = getelementptr inbounds [3 x double], [3 x double]* %35, i64 2
%37 = getelementptr inbounds [3 x double], [3 x double]* %36, i64 0, i64 2
%38 = load double, double* %37
%39 = load [3 x double]*, [3 x double]** %3
%40 = getelementptr inbounds [3 x double], [3 x double]* %39, i64 0
%41 = getelementptr inbounds [3 x double], [3 x double]* %40, i64 0, i64 1
%42 = load double, double* %41
%43 = load [3 x double]*, [3 x double]** %3
%44 = getelementptr inbounds [3 x double], [3 x double]* %43, i64 2
%45 = getelementptr inbounds [3 x double], [3 x double]* %44, i64 0, i64 1
%46 = load double, double* %45
%47 = load [3 x double]*, [3 x double]** %3
%48 = getelementptr inbounds [3 x double], [3 x double]* %47, i64 0
%49 = getelementptr inbounds [3 x double], [3 x double]* %48, i64 0, i64 2
%50 = load double, double* %49
%51 = fmul double %46, %50
%52 = fneg double %51
%53 = call double @llvm.fmuladd.f64(double %38, double %42, double %52)
%54 = fmul double %34, %53
%55 = fneg double %54
%56 = call double @llvm.fmuladd.f64(double %11, double %30, double %55)
%57 = load [3 x double]*, [3 x double]** %3
%58 = getelementptr inbounds [3 x double], [3 x double]* %57, i64 2
%59 = getelementptr inbounds [3 x double], [3 x double]* %58, i64 0, i64 0
%60 = load double, double* %59
%61 = load [3 x double]*, [3 x double]** %3
%62 = getelementptr inbounds [3 x double], [3 x double]* %61, i64 1
%63 = getelementptr inbounds [3 x double], [3 x double]* %62, i64 0, i64 2
%64 = load double, double* %63
%65 = load [3 x double]*, [3 x double]** %3
%66 = getelementptr inbounds [3 x double], [3 x double]* %65, i64 0
%67 = getelementptr inbounds [3 x double], [3 x double]* %66, i64 0, i64 1
%68 = load double, double* %67
%69 = load [3 x double]*, [3 x double]** %3
%70 = getelementptr inbounds [3 x double], [3 x double]* %69, i64 1
%71 = getelementptr inbounds [3 x double], [3 x double]* %70, i64 0, i64 1
%72 = load double, double* %71
%73 = load [3 x double]*, [3 x double]** %3
%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 2
%76 = load double, double* %75
%77 = fmul double %72, %76
%78 = fneg double %77
%79 = call double @llvm.fmuladd.f64(double %64, double %68, double %78)
%80 = call double @llvm.fmuladd.f64(double %60, double %79, double %56)
store double %80, double* %4
%81 = load double, double* %4
%82 = fcmp une double %81, 0.000000e+00
br i1 %82, label %83, label %325
83: ; preds = %1
%84 = load [3 x double]*, [3 x double]** %3
%85 = getelementptr inbounds [3 x double], [3 x double]* %84, i64 2
%86 = getelementptr inbounds [3 x double], [3 x double]* %85, i64 0, i64 2
%87 = load double, double* %86
%88 = load [3 x double]*, [3 x double]** %3
%89 = getelementptr inbounds [3 x double], [3 x double]* %88, i64 1
%90 = getelementptr inbounds [3 x double], [3 x double]* %89, i64 0, i64 1
%91 = load double, double* %90
%92 = load [3 x double]*, [3 x double]** %3
%93 = getelementptr inbounds [3 x double], [3 x double]* %92, i64 2
%94 = getelementptr inbounds [3 x double], [3 x double]* %93, i64 0, i64 1
%95 = load double, double* %94
%96 = load [3 x double]*, [3 x double]** %3
%97 = getelementptr inbounds [3 x double], [3 x double]* %96, i64 1
%98 = getelementptr inbounds [3 x double], [3 x double]* %97, i64 0, i64 2
%99 = load double, double* %98
%100 = fmul double %95, %99
%101 = fneg double %100
%102 = call double @llvm.fmuladd.f64(double %87, double %91, double %101)
%103 = load double, double* %4
%104 = fdiv double %102, %103
%105 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 0
%106 = getelementptr inbounds [3 x double], [3 x double]* %105, i64 0, i64 0
store double %104, double* %106
%107 = load [3 x double]*, [3 x double]** %3
%108 = getelementptr inbounds [3 x double], [3 x double]* %107, i64 2
%109 = getelementptr inbounds [3 x double], [3 x double]* %108, i64 0, i64 2
%110 = load double, double* %109
%111 = load [3 x double]*, [3 x double]** %3
%112 = getelementptr inbounds [3 x double], [3 x double]* %111, i64 0
%113 = getelementptr inbounds [3 x double], [3 x double]* %112, i64 0, i64 1
%114 = load double, double* %113
%115 = load [3 x double]*, [3 x double]** %3
%116 = getelementptr inbounds [3 x double], [3 x double]* %115, i64 2
%117 = getelementptr inbounds [3 x double], [3 x double]* %116, i64 0, i64 1
%118 = load double, double* %117
%119 = load [3 x double]*, [3 x double]** %3
%120 = getelementptr inbounds [3 x double], [3 x double]* %119, i64 0
%121 = getelementptr inbounds [3 x double], [3 x double]* %120, i64 0, i64 2
%122 = load double, double* %121
%123 = fmul double %118, %122
%124 = fneg double %123
%125 = call double @llvm.fmuladd.f64(double %110, double %114, double %124)
%126 = fneg double %125
%127 = load double, double* %4
%128 = fdiv double %126, %127
%129 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 0
%130 = getelementptr inbounds [3 x double], [3 x double]* %129, i64 0, i64 1
store double %128, double* %130
%131 = load [3 x double]*, [3 x double]** %3
%132 = getelementptr inbounds [3 x double], [3 x double]* %131, i64 1
%133 = getelementptr inbounds [3 x double], [3 x double]* %132, i64 0, i64 2
%134 = load double, double* %133
%135 = load [3 x double]*, [3 x double]** %3
%136 = getelementptr inbounds [3 x double], [3 x double]* %135, i64 0
%137 = getelementptr inbounds [3 x double], [3 x double]* %136, i64 0, i64 1
%138 = load double, double* %137
%139 = load [3 x double]*, [3 x double]** %3
%140 = getelementptr inbounds [3 x double], [3 x double]* %139, i64 1
%141 = getelementptr inbounds [3 x double], [3 x double]* %140, i64 0, i64 1
%142 = load double, double* %141
%143 = load [3 x double]*, [3 x double]** %3
%144 = getelementptr inbounds [3 x double], [3 x double]* %143, i64 0
%145 = getelementptr inbounds [3 x double], [3 x double]* %144, i64 0, i64 2
%146 = load double, double* %145
%147 = fmul double %142, %146
%148 = fneg double %147
%149 = call double @llvm.fmuladd.f64(double %134, double %138, double %148)
%150 = load double, double* %4
%151 = fdiv double %149, %150
%152 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 0
%153 = getelementptr inbounds [3 x double], [3 x double]* %152, i64 0, i64 2
store double %151, double* %153
%154 = load [3 x double]*, [3 x double]** %3
%155 = getelementptr inbounds [3 x double], [3 x double]* %154, i64 2
%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 1
%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 2
%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 1
%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 = fneg double %172
%174 = load double, double* %4
%175 = fdiv double %173, %174
%176 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 1
%177 = getelementptr inbounds [3 x double], [3 x double]* %176, i64 0, i64 0
store double %175, double* %177
%178 = load [3 x double]*, [3 x double]** %3
%179 = getelementptr inbounds [3 x double], [3 x double]* %178, i64 2
%180 = getelementptr inbounds [3 x double], [3 x double]* %179, i64 0, i64 2
%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 0
%184 = getelementptr inbounds [3 x double], [3 x double]* %183, i64 0, i64 0
%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 2
%188 = getelementptr inbounds [3 x double], [3 x double]* %187, i64 0, i64 0
%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 0
%192 = getelementptr inbounds [3 x double], [3 x double]* %191, i64 0, i64 2
%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* %4
%198 = fdiv double %196, %197
%199 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 1
%200 = getelementptr inbounds [3 x double], [3 x double]* %199, i64 0, i64 1
store double %198, double* %200
%201 = load [3 x double]*, [3 x double]** %3
%202 = getelementptr inbounds [3 x double], [3 x double]* %201, i64 1
%203 = getelementptr inbounds [3 x double], [3 x double]* %202, i64 0, i64 2
%204 = load double, double* %203
%205 = load [3 x double]*, [3 x double]** %3
%206 = getelementptr inbounds [3 x double], [3 x double]* %205, i64 0
%207 = getelementptr inbounds [3 x double], [3 x double]* %206, i64 0, i64 0
%208 = load double, double* %207
%209 = load [3 x double]*, [3 x double]** %3
%210 = getelementptr inbounds [3 x double], [3 x double]* %209, i64 1
%211 = getelementptr inbounds [3 x double], [3 x double]* %210, i64 0, i64 0
%212 = load double, double* %211
%213 = load [3 x double]*, [3 x double]** %3
%214 = getelementptr inbounds [3 x double], [3 x double]* %213, i64 0
%215 = getelementptr inbounds [3 x double], [3 x double]* %214, i64 0, i64 2
%216 = load double, double* %215
%217 = fmul double %212, %216
%218 = fneg double %217
%219 = call double @llvm.fmuladd.f64(double %204, double %208, double %218)
%220 = fneg double %219
%221 = load double, double* %4
%222 = fdiv double %220, %221
%223 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 1
%224 = getelementptr inbounds [3 x double], [3 x double]* %223, i64 0, i64 2
store double %222, double* %224
%225 = load [3 x double]*, [3 x double]** %3
%226 = getelementptr inbounds [3 x double], [3 x double]* %225, i64 2
%227 = getelementptr inbounds [3 x double], [3 x double]* %226, i64 0, i64 1
%228 = load double, double* %227
%229 = load [3 x double]*, [3 x double]** %3
%230 = getelementptr inbounds [3 x double], [3 x double]* %229, i64 1
%231 = getelementptr inbounds [3 x double], [3 x double]* %230, i64 0, i64 0
%232 = load double, double* %231
%233 = load [3 x double]*, [3 x double]** %3
%234 = getelementptr inbounds [3 x double], [3 x double]* %233, i64 2
%235 = getelementptr inbounds [3 x double], [3 x double]* %234, i64 0, i64 0
%236 = load double, double* %235
%237 = load [3 x double]*, [3 x double]** %3
%238 = getelementptr inbounds [3 x double], [3 x double]* %237, i64 1
%239 = getelementptr inbounds [3 x double], [3 x double]* %238, i64 0, i64 1
%240 = load double, double* %239
%241 = fmul double %236, %240
%242 = fneg double %241
%243 = call double @llvm.fmuladd.f64(double %228, double %232, double %242)
%244 = load double, double* %4
%245 = fdiv double %243, %244
%246 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 2
%247 = getelementptr inbounds [3 x double], [3 x double]* %246, i64 0, i64 0
store double %245, double* %247
%248 = load [3 x double]*, [3 x double]** %3
%249 = getelementptr inbounds [3 x double], [3 x double]* %248, i64 2
%250 = getelementptr inbounds [3 x double], [3 x double]* %249, i64 0, i64 1
%251 = load double, double* %250
%252 = load [3 x double]*, [3 x double]** %3
%253 = getelementptr inbounds [3 x double], [3 x double]* %252, i64 0
%254 = getelementptr inbounds [3 x double], [3 x double]* %253, i64 0, i64 0
%255 = load double, double* %254
%256 = load [3 x double]*, [3 x double]** %3
%257 = getelementptr inbounds [3 x double], [3 x double]* %256, i64 2
%258 = getelementptr inbounds [3 x double], [3 x double]* %257, i64 0, i64 0
%259 = load double, double* %258
%260 = load [3 x double]*, [3 x double]** %3
%261 = getelementptr inbounds [3 x double], [3 x double]* %260, i64 0
%262 = getelementptr inbounds [3 x double], [3 x double]* %261, i64 0, i64 1
%263 = load double, double* %262
%264 = fmul double %259, %263
%265 = fneg double %264
%266 = call double @llvm.fmuladd.f64(double %251, double %255, double %265)
%267 = fneg double %266
%268 = load double, double* %4
%269 = fdiv double %267, %268
%270 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 2
%271 = getelementptr inbounds [3 x double], [3 x double]* %270, i64 0, i64 1
store double %269, double* %271
%272 = load [3 x double]*, [3 x double]** %3
%273 = getelementptr inbounds [3 x double], [3 x double]* %272, i64 1
%274 = getelementptr inbounds [3 x double], [3 x double]* %273, i64 0, i64 1
%275 = load double, double* %274
%276 = load [3 x double]*, [3 x double]** %3
%277 = getelementptr inbounds [3 x double], [3 x double]* %276, i64 0
%278 = getelementptr inbounds [3 x double], [3 x double]* %277, i64 0, i64 0
%279 = load double, double* %278
%280 = load [3 x double]*, [3 x double]** %3
%281 = getelementptr inbounds [3 x double], [3 x double]* %280, i64 1
%282 = getelementptr inbounds [3 x double], [3 x double]* %281, i64 0, i64 0
%283 = load double, double* %282
%284 = load [3 x double]*, [3 x double]** %3
%285 = getelementptr inbounds [3 x double], [3 x double]* %284, i64 0
%286 = getelementptr inbounds [3 x double], [3 x double]* %285, i64 0, i64 1
%287 = load double, double* %286
%288 = fmul double %283, %287
%289 = fneg double %288
%290 = call double @llvm.fmuladd.f64(double %275, double %279, double %289)
%291 = load double, double* %4
%292 = fdiv double %290, %291
%293 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 2
%294 = getelementptr inbounds [3 x double], [3 x double]* %293, i64 0, i64 2
store double %292, double* %294
store i32 0, i32* %6
br label %295
295: ; preds = %321, %83
%296 = load i32, i32* %6
%297 = icmp slt i32 %296, 3
br i1 %297, label %298, label %324
298: ; preds = %295
store i32 0, i32* %7
br label %299
299: ; preds = %317, %298
%300 = load i32, i32* %7
%301 = icmp slt i32 %300, 3
br i1 %301, label %302, label %320
302: ; preds = %299
%303 = load i32, i32* %6
%304 = sext i32 %303 to i64
%305 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 %304
%306 = load i32, i32* %7
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds [3 x double], [3 x double]* %305, i64 0, i64 %307
%309 = load double, double* %308
%310 = load [3 x double]*, [3 x double]** %3
%311 = load i32, i32* %6
%312 = sext i32 %311 to i64
%313 = getelementptr inbounds [3 x double], [3 x double]* %310, i64 %312
%314 = load i32, i32* %7
%315 = sext i32 %314 to i64
%316 = getelementptr inbounds [3 x double], [3 x double]* %313, i64 0, i64 %315
store double %309, double* %316
br label %317
317: ; preds = %302
%318 = load i32, i32* %7
%319 = add nsw i32 %318, 1
store i32 %319, i32* %7
br label %299
320: ; preds = %299
br label %321
321: ; preds = %320
%322 = load i32, i32* %6
%323 = add nsw i32 %322, 1
store i32 %323, i32* %6
br label %295
324: ; preds = %295
store i32 0, i32* %2
br label %326
325: ; preds = %1
store i32 -1, i32* %2
br label %326
326: ; preds = %325, %324
%327 = load i32, i32* %2
ret i32 %327
}

LLVM IR (-O2):
define hidden i32 @inverse3x3([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 2, i64 2
%5 = load double, double* %4
%6 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 1
%9 = load double, double* %8
%10 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%11 = load double, double* %10
%12 = fneg double %9
%13 = fmul double %11, %12
%14 = tail call double @llvm.fmuladd.f64(double %5, double %7, double %13)
%15 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%16 = load double, double* %15
%17 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 1
%18 = load double, double* %17
%19 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%20 = load double, double* %19
%21 = fmul double %20, %12
%22 = tail call double @llvm.fmuladd.f64(double %5, double %18, double %21)
%23 = fneg double %16
%24 = fmul double %22, %23
%25 = tail call double @llvm.fmuladd.f64(double %3, double %14, double %24)
%26 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%27 = load double, double* %26
%28 = fneg double %7
%29 = fmul double %20, %28
%30 = tail call double @llvm.fmuladd.f64(double %11, double %18, double %29)
%31 = tail call double @llvm.fmuladd.f64(double %27, double %30, double %25)
%32 = fcmp une double %31, 0.000000e+00
br i1 %32, label %33, label %70
33: ; preds = %1
%34 = fneg double %22
%35 = insertelement <2 x double> poison, double %14, i64 0
%36 = insertelement <2 x double> %35, double %34, i64 1
%37 = insertelement <2 x double> poison, double %31, i64 0
%38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
%39 = fdiv <2 x double> %36, %38
%40 = fneg double %27
%41 = fmul double %11, %40
%42 = tail call double @llvm.fmuladd.f64(double %5, double %16, double %41)
%43 = fneg double %42
%44 = insertelement <2 x double> poison, double %30, i64 0
%45 = insertelement <2 x double> %44, double %43, i64 1
%46 = fdiv <2 x double> %45, %38
%47 = fmul double %20, %40
%48 = tail call double @llvm.fmuladd.f64(double %5, double %3, double %47)
%49 = fmul double %20, %23
%50 = tail call double @llvm.fmuladd.f64(double %11, double %3, double %49)
%51 = fneg double %50
%52 = insertelement <2 x double> poison, double %48, i64 0
%53 = insertelement <2 x double> %52, double %51, i64 1
%54 = fdiv <2 x double> %53, %38
%55 = fmul double %7, %40
%56 = tail call double @llvm.fmuladd.f64(double %9, double %16, double %55)
%57 = fmul double %18, %40
%58 = tail call double @llvm.fmuladd.f64(double %9, double %3, double %57)
%59 = fneg double %58
%60 = insertelement <2 x double> poison, double %56, i64 0
%61 = insertelement <2 x double> %60, double %59, i64 1
%62 = fdiv <2 x double> %61, %38
%63 = fmul double %18, %23
%64 = tail call double @llvm.fmuladd.f64(double %7, double %3, double %63)
%65 = fdiv double %64, %31
%66 = bitcast [3 x double]* %0 to <2 x double>*
store <2 x double> %39, <2 x double>* %66
%67 = bitcast double* %19 to <2 x double>*
store <2 x double> %46, <2 x double>* %67
%68 = bitcast double* %6 to <2 x double>*
store <2 x double> %54, <2 x double>* %68
%69 = bitcast double* %26 to <2 x double>*
store <2 x double> %62, <2 x double>* %69
store double %65, double* %4
br label %70
70: ; preds = %33, %1
%71 = phi i32 [ -1, %1 ], [ 0, %33 ]
ret i32 %71
}