// File: /workspace/github_cpp_makefile_star2_O3/lvandeve[P]lodepng/lodepng_util.cpp
// Function: lodepng::getChrmMatrixXYZ(float*, float, float, float, float, float, float, float, float, float, float, float, float)
static unsigned getChrmMatrixXYZ(float* m,
                                 float wX, float wY, float wZ,
                                 float rX, float rY, float rZ,
                                 float gX, float gY, float gZ,
                                 float bX, float bY, float bZ) {
  float t[9];
  float rs, gs, bs;
  t[0] = rX; t[1] = gX; t[2] = bX;
  t[3] = rY; t[4] = gY; t[5] = bY;
  t[6] = rZ; t[7] = gZ; t[8] = bZ;
  if(invMatrix(t)) return 1; /* error, not invertible */
  mulMatrix(&rs, &gs, &bs, t, wX, wY, wZ);
  m[0] = rs * rX; m[1] = gs * gX; m[2] = bs * bX;
  m[3] = rs * rY; m[4] = gs * gY; m[5] = bs * bY;
  m[6] = rs * rZ; m[7] = gs * gZ; m[8] = bs * bZ;
  return 0;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movss %xmm2, 0xc(%rsp)
movss %xmm1, 0x8(%rsp)
movss %xmm0, 0x4(%rsp)
movq %rdi, %rbx
movss 0xb8(%rsp), %xmm0
movss 0xb0(%rsp), %xmm1
movss 0xa8(%rsp), %xmm8
movss 0xa0(%rsp), %xmm2
leaq 0x10(%rsp), %rdi
movaps %xmm3, 0x60(%rsp)
movss %xmm3, (%rdi)
movaps %xmm6, 0x50(%rsp)
movss %xmm6, 0x4(%rdi)
movss %xmm8, 0x8(%rdi)
movaps %xmm4, 0x40(%rsp)
movss %xmm4, 0xc(%rdi)
movaps %xmm7, 0x80(%rsp)
movss %xmm7, 0x10(%rdi)
movss %xmm1, 0x14(%rdi)
movaps %xmm5, 0x70(%rsp)
movss %xmm5, 0x18(%rdi)
movss %xmm2, 0x1c(%rdi)
movss %xmm0, 0x20(%rdi)
callq 0x14708
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x14bce
xorps %xmm1, %xmm1
cvtss2sd 0x4(%rsp), %xmm1
xorps %xmm3, %xmm3
cvtss2sd 0x8(%rsp), %xmm3
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
xorps %xmm4, %xmm4
cvtss2sd 0x10(%rsp), %xmm4
xorps %xmm2, %xmm2
cvtss2sd 0x14(%rsp), %xmm2
mulsd %xmm3, %xmm2
mulsd %xmm1, %xmm4
addsd %xmm2, %xmm4
xorps %xmm2, %xmm2
cvtss2sd 0x18(%rsp), %xmm2
mulsd %xmm0, %xmm2
addsd %xmm4, %xmm2
movups 0x1c(%rsp), %xmm4
movaps 0x20(%rsp), %xmm5
movss 0x28(%rsp), %xmm6
movlhps %xmm4, %xmm6            # xmm6 = xmm6[0],xmm4[0]
shufps $0xe2, %xmm4, %xmm6     # xmm6 = xmm6[2,0],xmm4[2,3]
movss 0x2c(%rsp), %xmm4
movlhps %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0]
shufps $0xe2, %xmm5, %xmm4     # xmm4 = xmm4[2,0],xmm5[2,3]
cvtps2pd %xmm4, %xmm4
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
mulpd %xmm4, %xmm3
cvtps2pd %xmm6, %xmm4
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm4, %xmm1
movups 0x24(%rsp), %xmm4
addpd %xmm3, %xmm1
movss 0x30(%rsp), %xmm3
movlhps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
shufps $0xe2, %xmm4, %xmm3     # xmm3 = xmm3[2,0],xmm4[2,3]
cvtps2pd %xmm3, %xmm3
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm3, %xmm0
addpd %xmm1, %xmm0
movss 0xa8(%rsp), %xmm4
unpcklps 0x40(%rsp), %xmm4       # xmm4 = xmm4[0],mem[0],xmm4[1],mem[1]
xorps %xmm1, %xmm1
cvtsd2ss %xmm2, %xmm1
cvtpd2ps %xmm0, %xmm0
movaps 0x60(%rsp), %xmm3
unpcklps 0x50(%rsp), %xmm3       # xmm3 = xmm3[0],mem[0],xmm3[1],mem[1]
movlhps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
movaps %xmm1, %xmm2
shufps $0x40, %xmm0, %xmm2     # xmm2 = xmm2[0,0],xmm0[0,1]
shufps $0x78, %xmm2, %xmm2     # xmm2 = xmm2[0,2,3,1]
mulps %xmm2, %xmm3
movups %xmm3, (%rbx)
shufps $0x30, %xmm0, %xmm1     # xmm1 = xmm1[0,0],xmm0[3,0]
movaps %xmm0, %xmm2
shufps $0x84, %xmm1, %xmm2     # xmm2 = xmm2[0,1],xmm1[0,2]
movaps 0x70(%rsp), %xmm3
movss 0xa0(%rsp), %xmm1
unpcklps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
movaps 0x80(%rsp), %xmm1
movss 0xb0(%rsp), %xmm4
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movlhps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
shufps $0x24, %xmm2, %xmm2     # xmm2 = xmm2[0,1,2,0]
mulps %xmm2, %xmm1
movups %xmm1, 0x10(%rbx)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
mulss 0xb8(%rsp), %xmm0
movss %xmm0, 0x20(%rbx)
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq