double invert_homography(double invH[3][3], double H[3][3]) {
  double *a = H[0], *r = invH[0];
  double det = a[0] * a[4] * a[8] + a[2] * a[3] * a[7] + a[1] * a[5] * a[6] -
               a[2] * a[4] * a[6] - a[1] * a[3] * a[8] - a[0] * a[5] * a[7];
  r[0] = (a[4] * a[8] - a[5] * a[7]) / det;
  r[1] = (a[2] * a[7] - a[1] * a[8]) / det;
  r[2] = (a[1] * a[5] - a[2] * a[4]) / det;
  r[3] = (a[5] * a[6] - a[3] * a[8]) / det;
  r[4] = (a[0] * a[8] - a[2] * a[6]) / det;
  r[5] = (a[2] * a[3] - a[0] * a[5]) / det;
  r[6] = (a[3] * a[7] - a[4] * a[6]) / det;
  r[7] = (a[1] * a[6] - a[0] * a[7]) / det;
  r[8] = (a[0] * a[4] - a[1] * a[3]) / det;
  return det;
}


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

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

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

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