// File: /workspace/github_cpp_makefile_star2_O3/lvandeve[P]lodepng/lodepng_util.cpp
// Function: lodepng::invMatrix(float*)
static unsigned invMatrix(float* m) {
  int i;
  /* double used instead of float for intermediate computations to avoid
  intermediate numerical precision issues */
  double e0 = (double)m[4] * m[8] - (double)m[5] * m[7];
  double e3 = (double)m[5] * m[6] - (double)m[3] * m[8];
  double e6 = (double)m[3] * m[7] - (double)m[4] * m[6];
  /* inverse determinant */
  double d = 1.0 / (m[0] * e0 + m[1] * e3 + m[2] * e6);
  double result[9];
  if((d > 0 ? d : -d) > 1e15) return 1; /* error, likely not invertible */
  result[0] = e0 * d;
  result[1] = ((double)m[2] * m[7] - (double)m[1] * m[8]) * d;
  result[2] = ((double)m[1] * m[5] - (double)m[2] * m[4]) * d;
  result[3] = e3 * d;
  result[4] = ((double)m[0] * m[8] - (double)m[2] * m[6]) * d;
  result[5] = ((double)m[3] * m[2] - (double)m[0] * m[5]) * d;
  result[6] = e6 * d;
  result[7] = ((double)m[6] * m[1] - (double)m[0] * m[7]) * d;
  result[8] = ((double)m[0] * m[4] - (double)m[3] * m[1]) * d;
  for(i = 0; i < 9; i++) m[i] = (float)result[i];
  return 0; /* ok */
}

// Assembly:
cvtss2sd 0x10(%rdi), %xmm0
cvtss2sd 0x1c(%rdi), %xmm2
cvtss2sd 0x4(%rdi), %xmm1
cvtps2pd 0x14(%rdi), %xmm5
movapd %xmm5, %xmm3
mulsd %xmm2, %xmm3
movss (%rdi), %xmm4
movss 0x8(%rdi), %xmm6
movss 0xc(%rdi), %xmm7
unpcklps %xmm7, %xmm4            # xmm4 = xmm4[0],xmm7[0],xmm4[1],xmm7[1]
movss 0x20(%rdi), %xmm7
unpcklps %xmm6, %xmm7            # xmm7 = xmm7[0],xmm6[0],xmm7[1],xmm6[1]
cvtps2pd %xmm7, %xmm6
movaps %xmm0, %xmm11
mulsd %xmm6, %xmm11
cvtps2pd %xmm4, %xmm4
subsd %xmm3, %xmm11
movapd %xmm4, %xmm3
unpckhpd %xmm4, %xmm3            # xmm3 = xmm3[1],xmm4[1]
movapd 0x616bf(%rip), %xmm12   # 0x75e20
movapd %xmm6, %xmm8
mulsd %xmm3, %xmm8
movapd %xmm5, %xmm7
unpckhpd %xmm5, %xmm7            # xmm7 = xmm7[1],xmm5[1]
movapd %xmm5, %xmm10
mulsd %xmm7, %xmm10
subsd %xmm8, %xmm10
movapd %xmm7, %xmm9
mulsd %xmm0, %xmm9
movapd %xmm3, %xmm8
mulsd %xmm2, %xmm8
subsd %xmm9, %xmm8
movapd %xmm10, %xmm9
mulsd %xmm1, %xmm9
movapd %xmm4, %xmm13
mulsd %xmm11, %xmm13
addsd %xmm9, %xmm13
movapd %xmm6, %xmm14
unpckhpd %xmm6, %xmm14           # xmm14 = xmm14[1],xmm6[1]
movapd %xmm14, %xmm15
mulsd %xmm8, %xmm15
addsd %xmm13, %xmm15
movsd 0x6185a(%rip), %xmm9    # 0x76030
divsd %xmm15, %xmm9
movapd %xmm9, %xmm13
xorpd %xmm12, %xmm13
movapd %xmm9, %xmm15
maxsd %xmm13, %xmm15
movl $0x1, %eax
ucomisd 0x6183b(%rip), %xmm15   # 0x76038
ja 0x148e8
xorpd %xmm12, %xmm3
movapd %xmm5, %xmm13
shufpd $0x1, %xmm5, %xmm13     # xmm13 = xmm13[1],xmm5[0]
movapd %xmm6, %xmm12
mulsd %xmm1, %xmm12
mulsd %xmm2, %xmm14
subsd %xmm12, %xmm14
unpcklpd %xmm14, %xmm11          # xmm11 = xmm11[0],xmm14[0]
movapd %xmm9, %xmm12
unpcklpd %xmm9, %xmm12           # xmm12 = xmm12[0],xmm9[0]
mulpd %xmm12, %xmm11
movapd %xmm11, -0x48(%rsp)
movapd %xmm6, %xmm11
shufpd $0x1, %xmm4, %xmm11     # xmm11 = xmm11[1],xmm4[0]
mulpd %xmm11, %xmm13
xorpd 0x615c5(%rip), %xmm11   # 0x75e20
pshufd $0xee, %xmm11, %xmm14   # xmm14 = xmm11[2,3,2,3]
mulsd %xmm0, %xmm11
mulsd %xmm1, %xmm5
addsd %xmm11, %xmm5
unpcklpd %xmm10, %xmm5           # xmm5 = xmm5[0],xmm10[0]
mulpd %xmm12, %xmm5
movapd %xmm5, -0x38(%rsp)
movapd %xmm4, %xmm5
mulpd %xmm6, %xmm5
subpd %xmm13, %xmm5
mulpd %xmm12, %xmm5
movapd %xmm5, -0x28(%rsp)
mulsd %xmm2, %xmm14
mulsd %xmm1, %xmm7
addsd %xmm14, %xmm7
unpcklpd %xmm7, %xmm8            # xmm8 = xmm8[0],xmm7[0]
mulpd %xmm12, %xmm8
movapd %xmm8, -0x18(%rsp)
mulsd %xmm1, %xmm3
mulsd %xmm4, %xmm0
addsd %xmm3, %xmm0
mulsd %xmm9, %xmm0
movsd %xmm0, -0x8(%rsp)
xorl %eax, %eax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
cvtsd2ss -0x48(%rsp,%rcx,8), %xmm0
movss %xmm0, (%rdi,%rcx,4)
incq %rcx
cmpq $0x9, %rcx
jne 0x148d1
retq