user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<matrixInverse4x4>:
  endbr64
  push   %rbx
  sub    $0x140,%rsp
  mov    %rcx,%rax
  mov    %fs:0x28,%rcx
  mov    %rcx,0x138(%rsp)
  xor    %ecx,%ecx
  cmp    %r9b,%r8b
  jne    L36
  mov    %rdi,%rbx
  cmp    %sil,%r8b
  jne    L36
  cmp    %dl,%r8b
  jne    L51
  cmp    $0x4,%r8b
  jne    L51
  lea    0x30(%rsp),%rdi
  mov    $0x4,%r8d
  mov    $0x4,%ecx
  mov    %rax,%rdx
  mov    $0x10,%esi
  mov    $0x0,%eax
  call   <matrixToArray_CMO@plt>
  movss  0x58(%rsp),%xmm4
  movss  0x6c(%rsp),%xmm1
  movss  0x5c(%rsp),%xmm2
  movss  0x68(%rsp),%xmm0
  movss  0x64(%rsp),%xmm3
  movaps %xmm4,%xmm5
  mulss  0x44(%rsp),%xmm5
  mulss  %xmm1,%xmm5
  movaps %xmm2,%xmm6
  mulss  0x44(%rsp),%xmm6
  mulss  %xmm0,%xmm6
  subss  %xmm6,%xmm5
  movss  0x54(%rsp),%xmm6
  mulss  0x48(%rsp),%xmm6
  mulss  %xmm1,%xmm6
  subss  %xmm6,%xmm5
  movss  0x54(%rsp),%xmm6
  mulss  0x4c(%rsp),%xmm6
  mulss  %xmm0,%xmm6
  addss  %xmm6,%xmm5
  movaps %xmm3,%xmm6
  mulss  0x48(%rsp),%xmm6
  mulss  %xmm2,%xmm6
  addss  %xmm6,%xmm5
  movaps %xmm3,%xmm6
  mulss  0x4c(%rsp),%xmm6
  mulss  %xmm4,%xmm6
  subss  %xmm6,%xmm5
  pxor   %xmm6,%xmm6
  cvtss2sd %xmm5,%xmm6
  movq   %xmm6,%rax
  movsd  %xmm6,0xb0(%rsp)
  movss  0x40(%rsp),%xmm5
  xorps  D51(%rip),%xmm5
  mulss  %xmm4,%xmm5
  movaps %xmm2,%xmm15
  mulss  0x40(%rsp),%xmm15
  movss  0x50(%rsp),%xmm8
  movaps %xmm8,%xmm11
  mulss  0x48(%rsp),%xmm11
  movaps %xmm8,%xmm6
  mulss  0x4c(%rsp),%xmm6
  movss  0x48(%rsp),%xmm7
  mulss  0x60(%rsp),%xmm7
  movss  0x4c(%rsp),%xmm14
  mulss  0x60(%rsp),%xmm14
  movaps %xmm1,%xmm10
  mulss  %xmm5,%xmm10
  movaps %xmm0,%xmm9
  mulss  %xmm15,%xmm9
  addss  %xmm10,%xmm9
  movaps %xmm1,%xmm10
  mulss  %xmm11,%xmm10
  addss  %xmm10,%xmm9
  movaps %xmm0,%xmm10
  mulss  %xmm6,%xmm10
  subss  %xmm10,%xmm9
  movaps %xmm2,%xmm10
  mulss  %xmm7,%xmm10
  subss  %xmm10,%xmm9
  movaps %xmm4,%xmm10
  mulss  %xmm14,%xmm10
  addss  %xmm10,%xmm9
  pxor   %xmm13,%xmm13
  cvtss2sd %xmm9,%xmm13
  movq   %xmm13,%rcx
  movsd  %xmm13,0xd0(%rsp)
  movss  0x54(%rsp),%xmm13
  mulss  0x40(%rsp),%xmm13
  movaps %xmm8,%xmm12
  mulss  0x44(%rsp),%xmm12
  movss  0x44(%rsp),%xmm10
  mulss  0x60(%rsp),%xmm10
  movaps %xmm1,%xmm9
  mulss  %xmm13,%xmm9
  mulss  %xmm3,%xmm15
  subss  %xmm15,%xmm9
  movaps %xmm1,%xmm15
  mulss  %xmm12,%xmm15
  subss  %xmm15,%xmm9
  mulss  %xmm3,%xmm6
  addss  %xmm9,%xmm6
  movaps %xmm2,%xmm9
  mulss  %xmm10,%xmm9
  addss  %xmm9,%xmm6
  mulss  0x54(%rsp),%xmm14
  subss  %xmm14,%xmm6
  cvtss2sd %xmm6,%xmm6
  movq   %xmm6,%rdx
  movsd  %xmm6,0xf0(%rsp)
  mulss  %xmm0,%xmm13
  xorps  D51(%rip),%xmm5
  mulss  %xmm3,%xmm5
  subss  %xmm13,%xmm5
  mulss  %xmm0,%xmm12
  addss  %xmm12,%xmm5
  movaps %xmm11,%xmm12
  mulss  %xmm3,%xmm12
  subss  %xmm12,%xmm5
  movaps %xmm5,%xmm11
  mulss  %xmm4,%xmm10
  subss  %xmm10,%xmm11
  mulss  0x54(%rsp),%xmm7
  addss  %xmm11,%xmm7
  pxor   %xmm6,%xmm6
  cvtss2sd %xmm7,%xmm6
  movq   %xmm6,%rsi
  movsd  %xmm6,0x110(%rsp)
  movss  0x34(%rsp),%xmm6
  movss  0x54(%rsp),%xmm11
  mulss  0x38(%rsp),%xmm11
  movss  0x54(%rsp),%xmm13
  mulss  0x3c(%rsp),%xmm13
  movaps %xmm3,%xmm14
  mulss  0x38(%rsp),%xmm14
  movaps %xmm3,%xmm7
  mulss  0x3c(%rsp),%xmm7
  movaps %xmm6,%xmm10
  xorps  D51(%rip),%xmm10
  mulss  %xmm4,%xmm10
  mulss  %xmm1,%xmm10
  movaps %xmm2,%xmm5
  mulss  %xmm6,%xmm5
  mulss  %xmm0,%xmm5
  addss  %xmm10,%xmm5
  movss  %xmm11,0x18(%rsp)
  movaps %xmm11,%xmm10
  mulss  %xmm1,%xmm10
  addss  %xmm10,%xmm5
  movss  %xmm13,0x1c(%rsp)
  movaps %xmm13,%xmm12
  mulss  %xmm0,%xmm12
  subss  %xmm12,%xmm5
  movaps %xmm2,%xmm15
  mulss  %xmm14,%xmm15
  subss  %xmm15,%xmm5
  movaps %xmm4,%xmm15
  mulss  %xmm7,%xmm15
  addss  %xmm15,%xmm5
  cvtss2sd %xmm5,%xmm5
  movsd  %xmm5,0xb8(%rsp)
  movaps %xmm4,%xmm5
  mulss  0x30(%rsp),%xmm5
  movaps %xmm5,%xmm11
  movaps %xmm2,%xmm5
  mulss  0x30(%rsp),%xmm5
  movaps %xmm8,%xmm15
  mulss  0x38(%rsp),%xmm15
  movaps %xmm8,%xmm13
  mulss  0x3c(%rsp),%xmm13
  movss  %xmm13,0x8(%rsp)
  movss  0x60(%rsp),%xmm9
  mulss  0x38(%rsp),%xmm9
  movss  0x60(%rsp),%xmm13
  mulss  0x3c(%rsp),%xmm13
  movaps %xmm1,%xmm12
  mulss  %xmm11,%xmm12
  movaps %xmm0,%xmm10
  mulss  %xmm5,%xmm10
  subss  %xmm10,%xmm12
  movss  %xmm15,0x10(%rsp)
  movaps %xmm15,%xmm10
  mulss  %xmm1,%xmm10
  subss  %xmm10,%xmm12
  movss  0x8(%rsp),%xmm10
  mulss  %xmm0,%xmm10
  addss  %xmm12,%xmm10
  movaps %xmm2,%xmm12
  movss  %xmm9,0xc(%rsp)
  mulss  %xmm9,%xmm12
  addss  %xmm12,%xmm10
  movaps %xmm4,%xmm12
  mulss  %xmm13,%xmm12
  subss  %xmm12,%xmm10
  cvtss2sd %xmm10,%xmm10
  movsd  %xmm10,0xd8(%rsp)
  movss  0x30(%rsp),%xmm15
  xorps  D51(%rip),%xmm15
  movaps %xmm15,%xmm12
  mulss  0x54(%rsp),%xmm12
  movaps %xmm12,%xmm10
  mulss  %xmm6,%xmm8
  movaps %xmm8,%xmm9
  movaps %xmm6,%xmm12
  mulss  0x60(%rsp),%xmm12
  movaps %xmm1,%xmm8
  mulss  %xmm10,%xmm8
  mulss  %xmm3,%xmm5
  addss  %xmm8,%xmm5
  movaps %xmm9,%xmm8
  mulss  %xmm1,%xmm8
  addss  %xmm8,%xmm5
  movss  0x8(%rsp),%xmm8
  mulss  %xmm3,%xmm8
  subss  %xmm8,%xmm5
  movaps %xmm2,%xmm8
  mulss  %xmm12,%xmm8
  subss  %xmm8,%xmm5
  movaps %xmm13,%xmm8
  mulss  0x54(%rsp),%xmm8
  addss  %xmm8,%xmm5
  cvtss2sd %xmm5,%xmm5
  movsd  %xmm5,0xf8(%rsp)
  xorps  D51(%rip),%xmm10
  mulss  %xmm0,%xmm10
  mulss  %xmm3,%xmm11
  subss  %xmm11,%xmm10
  movss  %xmm9,0x20(%rsp)
  movaps %xmm9,%xmm5
  mulss  %xmm0,%xmm5
  subss  %xmm5,%xmm10
  movss  0x10(%rsp),%xmm5
  mulss  %xmm3,%xmm5
  addss  %xmm10,%xmm5
  movaps %xmm4,%xmm8
  mulss  %xmm12,%xmm8
  addss  %xmm8,%xmm5
  movss  0xc(%rsp),%xmm8
  mulss  0x54(%rsp),%xmm8
  subss  %xmm8,%xmm5
  cvtss2sd %xmm5,%xmm5
  movsd  %xmm5,0x118(%rsp)
  movaps %xmm6,%xmm11
  mulss  0x48(%rsp),%xmm11
  movaps %xmm6,%xmm10
  mulss  0x4c(%rsp),%xmm10
  movss  0x44(%rsp),%xmm8
  mulss  0x38(%rsp),%xmm8
  movss  %xmm8,0x14(%rsp)
  movss  0x44(%rsp),%xmm8
  mulss  0x3c(%rsp),%xmm8
  movaps %xmm8,%xmm9
  movss  %xmm11,0x24(%rsp)
  movaps %xmm11,%xmm8
  mulss  %xmm1,%xmm8
  movss  %xmm10,0x28(%rsp)
  movaps %xmm10,%xmm5
  mulss  %xmm0,%xmm5
  subss  %xmm5,%xmm8
  movss  0x14(%rsp),%xmm5
  mulss  %xmm1,%xmm5
  subss  %xmm5,%xmm8
  movss  %xmm9,0x2c(%rsp)
  movaps %xmm9,%xmm11
  mulss  %xmm0,%xmm11
  movaps %xmm11,%xmm5
  addss  %xmm8,%xmm5
  mulss  0x4c(%rsp),%xmm14
  addss  %xmm14,%xmm5
  mulss  0x48(%rsp),%xmm7
  subss  %xmm7,%xmm5
  cvtss2sd %xmm5,%xmm5
  movsd  %xmm5,0xc0(%rsp)
  mulss  0x48(%rsp),%xmm15
  movss  0x4c(%rsp),%xmm14
  mulss  0x30(%rsp),%xmm14
  movaps %xmm14,%xmm8
  movss  0x40(%rsp),%xmm14
  mulss  0x38(%rsp),%xmm14
  movss  0x40(%rsp),%xmm7
  mulss  0x3c(%rsp),%xmm7
  movaps %xmm7,%xmm11
  movaps %xmm1,%xmm7
  mulss  %xmm15,%xmm7
  movaps %xmm7,%xmm10
  movaps %xmm0,%xmm7
  mulss  %xmm8,%xmm7
  movaps %xmm7,%xmm5
  addss  %xmm10,%xmm5
  movaps %xmm1,%xmm7
  mulss  %xmm14,%xmm7
  addss  %xmm7,%xmm5
  movaps %xmm0,%xmm7
  mulss  %xmm11,%xmm7
  subss  %xmm7,%xmm5
  movss  0xc(%rsp),%xmm7
  mulss  0x4c(%rsp),%xmm7
  subss  %xmm7,%xmm5
  movaps %xmm13,%xmm7
  mulss  0x48(%rsp),%xmm7
  addss  %xmm7,%xmm5
  cvtss2sd %xmm5,%xmm5
  movsd  %xmm5,0xe0(%rsp)
  movss  0x44(%rsp),%xmm7
  mulss  0x30(%rsp),%xmm7
  movaps %xmm7,%xmm5
  movaps %xmm6,%xmm7
  mulss  0x40(%rsp),%xmm7
  movaps %xmm7,%xmm10
  movaps %xmm1,%xmm7
  mulss  %xmm5,%xmm7
  movaps %xmm3,%xmm9
  mulss  %xmm8,%xmm9
  subss  %xmm9,%xmm7
  mulss  %xmm10,%xmm1
  subss  %xmm1,%xmm7
  movaps %xmm3,%xmm1
  mulss  %xmm11,%xmm1
  addss  %xmm7,%xmm1
  movaps %xmm12,%xmm7
  mulss  0x4c(%rsp),%xmm7
  addss  %xmm7,%xmm1
  mulss  0x44(%rsp),%xmm13
  subss  %xmm13,%xmm1
  cvtss2sd %xmm1,%xmm1
  movsd  %xmm1,0x100(%rsp)
  movaps %xmm5,%xmm1
  xorps  D51(%rip),%xmm1
  movaps %xmm1,%xmm13
  xorps  D51(%rip),%xmm15
  movaps %xmm0,%xmm7
  mulss  %xmm1,%xmm7
  movaps %xmm15,%xmm1
  mulss  %xmm3,%xmm1
  addss  %xmm7,%xmm1
  mulss  %xmm10,%xmm0
  addss  %xmm0,%xmm1
  mulss  %xmm14,%xmm3
  subss  %xmm3,%xmm1
  mulss  0x48(%rsp),%xmm12
  subss  %xmm12,%xmm1
  movss  0xc(%rsp),%xmm9
  mulss  0x44(%rsp),%xmm9
  addss  %xmm9,%xmm1
  cvtss2sd %xmm1,%xmm1
  movsd  %xmm1,0x120(%rsp)
  movss  0x24(%rsp),%xmm0
  mulss  %xmm2,%xmm0
  movss  0x28(%rsp),%xmm1
  mulss  %xmm4,%xmm1
  subss  %xmm0,%xmm1
  movss  0x14(%rsp),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  movss  0x2c(%rsp),%xmm0
  mulss  %xmm4,%xmm0
  subss  %xmm0,%xmm1
  movss  0x18(%rsp),%xmm0
  mulss  0x4c(%rsp),%xmm0
  subss  %xmm0,%xmm1
  movss  0x1c(%rsp),%xmm0
  mulss  0x48(%rsp),%xmm0
  addss  %xmm0,%xmm1
  cvtss2sd %xmm1,%xmm1
  movsd  %xmm1,0xc8(%rsp)
  movaps %xmm15,%xmm1
  mulss  %xmm2,%xmm1
  movaps %xmm4,%xmm0
  mulss  %xmm8,%xmm0
  subss  %xmm0,%xmm1
  movaps %xmm2,%xmm0
  mulss  %xmm14,%xmm0
  subss  %xmm0,%xmm1
  movaps %xmm4,%xmm0
  mulss  %xmm11,%xmm0
  addss  %xmm1,%xmm0
  movss  0x10(%rsp),%xmm3
  movaps %xmm3,%xmm1
  mulss  0x4c(%rsp),%xmm1
  addss  %xmm1,%xmm0
  movss  0x8(%rsp),%xmm7
  movaps %xmm7,%xmm1
  mulss  0x48(%rsp),%xmm1
  subss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  movsd  %xmm0,0xe8(%rsp)
  mulss  %xmm2,%xmm13
  mulss  0x54(%rsp),%xmm8
  addss  %xmm13,%xmm8
  mulss  %xmm10,%xmm2
  addss  %xmm2,%xmm8
  mulss  0x54(%rsp),%xmm11
  subss  %xmm11,%xmm8
  movss  0x20(%rsp),%xmm2
  movaps %xmm2,%xmm0
  mulss  0x4c(%rsp),%xmm0
  subss  %xmm0,%xmm8
  mulss  0x44(%rsp),%xmm7
  movaps %xmm7,%xmm0
  addss  %xmm8,%xmm0
  cvtss2sd %xmm0,%xmm0
  movsd  %xmm0,0x108(%rsp)
  movaps %xmm5,%xmm1
  mulss  %xmm4,%xmm1
  mulss  0x54(%rsp),%xmm15
  subss  %xmm15,%xmm1
  mulss  %xmm4,%xmm10
  subss  %xmm10,%xmm1
  movaps %xmm14,%xmm0
  mulss  0x54(%rsp),%xmm0
  addss  %xmm0,%xmm1
  mulss  0x48(%rsp),%xmm2
  addss  %xmm2,%xmm1
  mulss  0x44(%rsp),%xmm3
  subss  %xmm3,%xmm1
  cvtss2sd %xmm1,%xmm1
  movsd  %xmm1,0x128(%rsp)
  pxor   %xmm0,%xmm0
  cvtss2sd 0x30(%rsp),%xmm0
  movq   %rax,%xmm4
  mulsd  %xmm4,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm6,%xmm1
  movq   %rcx,%xmm9
  mulsd  %xmm1,%xmm9
  addsd  %xmm9,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x38(%rsp),%xmm1
  movq   %rdx,%xmm4
  mulsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x3c(%rsp),%xmm1
  movq   %rsi,%xmm4
  mulsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
  ucomisd D42(%rip),%xmm0
  jp     L17
  mov    $0x0,%eax
  je     L22
L17:
  movsd  D29(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mov    $0x0,%eax
  lea    0xb0(%rsp),%rdx
L42:
  movapd %xmm1,%xmm0
  mulsd  (%rdx,%rax,8),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x70(%rsp,%rax,4)
  add    $0x1,%rax
  cmp    $0x10,%rax
  jne    L42
  lea    0x70(%rsp),%rcx
  mov    $0x10,%r8d
  mov    $0x4,%edx
  mov    $0x4,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <arrayToMatrix_CMO@plt>
  mov    $0x1,%eax
  jmp    L22
L36:
  mov    $0x0,%eax
L22:
  mov    0x138(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L96
  add    $0x140,%rsp
  pop    %rbx
  ret
L51:
  mov    $0x0,%eax
  jmp    L22
L96:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D51
type: byte[16]
name: unpack_data
arguments: label: D42
type: byte[8]
name: unpack_data
arguments: label: D29
type: f64

tool: {"D51": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D42": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D29: 1

assistant: ```c
char matrixInverse4x4(float **output, char outRows, char outCols, float **input, char inRows, char inCols) {
  if (!(inRows == inCols && inRows == outRows && inRows == outCols & inRows == 4)) {
    return 0;
  }
  char arr_length = 16;
  char matrix_rows = 4;
  char matrix_cols = 4;
  float m[arr_length];
  float invOut[arr_length];
  matrixToArray_CMO(m, arr_length, input, matrix_rows, matrix_cols);
  double inv[16], det;
  int i;
  inv[0] = m[5] * m[10] * m[15] - m[5] * m[11] * m[14] - m[9] * m[6] * m[15] + m[9] * m[7] * m[14] + m[13] * m[6] * m[11] - m[13] * m[7] * m[10];
  inv[4] = -m[4] * m[10] * m[15] + m[4] * m[11] * m[14] + m[8] * m[6] * m[15] - m[8] * m[7] * m[14] - m[12] * m[6] * m[11] + m[12] * m[7] * m[10];
  inv[8] = m[4] * m[9] * m[15] - m[4] * m[11] * m[13] - m[8] * m[5] * m[15] + m[8] * m[7] * m[13] + m[12] * m[5] * m[11] - m[12] * m[7] * m[9];
  inv[12] = -m[4] * m[9] * m[14] + m[4] * m[10] * m[13] + m[8] * m[5] * m[14] - m[8] * m[6] * m[13] - m[12] * m[5] * m[10] + m[12] * m[6] * m[9];
  inv[1] = -m[1] * m[10] * m[15] + m[1] * m[11] * m[14] + m[9] * m[2] * m[15] - m[9] * m[3] * m[14] - m[13] * m[2] * m[11] + m[13] * m[3] * m[10];
  inv[5] = m[0] * m[10] * m[15] - m[0] * m[11] * m[14] - m[8] * m[2] * m[15] + m[8] * m[3] * m[14] + m[12] * m[2] * m[11] - m[12] * m[3] * m[10];
  inv[9] = -m[0] * m[9] * m[15] + m[0] * m[11] * m[13] + m[8] * m[1] * m[15] - m[8] * m[3] * m[13] - m[12] * m[1] * m[11] + m[12] * m[3] * m[9];
  inv[13] = m[0] * m[9] * m[14] - m[0] * m[10] * m[13] - m[8] * m[1] * m[14] + m[8] * m[2] * m[13] + m[12] * m[1] * m[10] - m[12] * m[2] * m[9];
  inv[2] = m[1] * m[6] * m[15] - m[1] * m[7] * m[14] - m[5] * m[2] * m[15] + m[5] * m[3] * m[14] + m[13] * m[2] * m[7] - m[13] * m[3] * m[6];
  inv[6] = -m[0] * m[6] * m[15] + m[0] * m[7] * m[14] + m[4] * m[2] * m[15] - m[4] * m[3] * m[14] - m[12] * m[2] * m[7] + m[12] * m[3] * m[6];
  inv[10] = m[0] * m[5] * m[15] - m[0] * m[7] * m[13] - m[4] * m[1] * m[15] + m[4] * m[3] * m[13] + m[12] * m[1] * m[7] - m[12] * m[3] * m[5];
  inv[14] = -m[0] * m[5] * m[14] + m[0] * m[6] * m[13] + m[4] * m[1] * m[14] - m[4] * m[2] * m[13] - m[12] * m[1] * m[6] + m[12] * m[2] * m[5];
  inv[3] = -m[1] * m[6] * m[11] + m[1] * m[7] * m[10] + m[5] * m[2] * m[11] - m[5] * m[3] * m[10] - m[9] * m[2] * m[7] + m[9] * m[3] * m[6];
  inv[7] = m[0] * m[6] * m[11] - m[0] * m[7] * m[10] - m[4] * m[2] * m[11] + m[4] * m[3] * m[10] + m[8] * m[2] * m[7] - m[8] * m[3] * m[6];
  inv[11] = -m[0] * m[5] * m[11] + m[0] * m[7] * m[9] + m[4] * m[1] * m[11] - m[4] * m[3] * m[9] - m[8] * m[1] * m[7] + m[8] * m[3] * m[5];
  inv[15] = m[0] * m[5] * m[10] - m[0] * m[6] * m[9] - m[4] * m[1] * m[10] + m[4] * m[2] * m[9] + m[8] * m[1] * m[6] - m[8] * m[2] * m[5];
  det = m[0] * inv[0] + m[1] * inv[4] + m[2] * inv[8] + m[3] * inv[12];
  if (det == 0)
    return 0;
  det = 1.0 / det;
  for (i = 0; i < 16; i++)
    invOut[i] = inv[i] * det;
  arrayToMatrix_CMO(output, matrix_rows, matrix_cols, invOut, arr_length);
  return 1;
}
```