user: What would the C source look like for the assembly code provided here?

```asm
<floats_mat_to_quat>:
  endbr64
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  movss  (%rdi),%xmm2
  movss  0x14(%rdi),%xmm1
  movss  0x28(%rdi),%xmm3
  movsd  D18(%rip),%xmm6
  movaps %xmm2,%xmm0
  addss  %xmm1,%xmm0
  addss  %xmm3,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  %xmm6,%xmm0
  comisd D3(%rip),%xmm0
  ja     L38
  comiss %xmm1,%xmm2
  pxor   %xmm4,%xmm4
  pxor   %xmm7,%xmm7
  pxor   %xmm5,%xmm5
  cvtss2sd %xmm3,%xmm4
  cvtss2sd %xmm2,%xmm7
  cvtss2sd %xmm1,%xmm5
  jbe    L59
  comiss %xmm3,%xmm2
  ja     L27
L59:
  comiss %xmm3,%xmm1
  ja     L44
  addsd  %xmm6,%xmm4
  movapd %xmm4,%xmm0
  subsd  %xmm7,%xmm0
  subsd  %xmm5,%xmm0
  call   <sqrt@plt>
  pxor   %xmm0,%xmm0
  movss  0x10(%rbx),%xmm1
  subss  0x4(%rbx),%xmm1
  cvtsi2sd %eax,%xmm0
  cvtss2sd %xmm1,%xmm1
  divsd  %xmm0,%xmm1
  cvtsd2ss %xmm1,%xmm1
  movss  %xmm1,0x0(%rbp)
  movss  0x8(%rbx),%xmm1
  addss  0x20(%rbx),%xmm1
  cvtss2sd %xmm1,%xmm1
  divsd  %xmm0,%xmm1
  cvtsd2ss %xmm1,%xmm1
  movss  %xmm1,0x4(%rbp)
  movss  0x24(%rbx),%xmm1
  addss  0x18(%rbx),%xmm1
  cvtss2sd %xmm1,%xmm1
  divsd  %xmm0,%xmm1
  mulsd  D54(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  cvtsd2ss %xmm1,%xmm1
  movss  %xmm1,0x8(%rbp)
L46:
  movss  %xmm0,0xc(%rbp)
  add    $0x8,%rsp
  mov    %rbp,%rdx
  mov    %rbp,%rdi
  pop    %rbx
  mov    $0x4,%esi
  pop    %rbp
  jmp    1070 <floats_normalize@plt>
  nopl   0x0(%rax,%rax,1)
L44:
  addsd  %xmm6,%xmm5
  movapd %xmm5,%xmm0
  subsd  %xmm7,%xmm0
  subsd  %xmm4,%xmm0
  call   <sqrt@plt>
  pxor   %xmm1,%xmm1
  movss  0x8(%rbx),%xmm0
  subss  0x20(%rbx),%xmm0
  add    %eax,%eax
  cvtsi2sd %eax,%xmm1
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x0(%rbp)
  movss  0x10(%rbx),%xmm0
  addss  0x4(%rbx),%xmm0
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x4(%rbp)
  movsd  D54(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x8(%rbp)
  movss  0x24(%rbx),%xmm0
  addss  0x18(%rbx),%xmm0
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  jmp    L46
  nopl   (%rax)
L38:
  call   <sqrt@plt>
  pxor   %xmm1,%xmm1
  movsd  D54(%rip),%xmm0
  add    %eax,%eax
  cvtsi2sd %eax,%xmm1
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x0(%rbp)
  movss  0x24(%rbx),%xmm0
  subss  0x18(%rbx),%xmm0
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x4(%rbp)
  movss  0x8(%rbx),%xmm0
  subss  0x20(%rbx),%xmm0
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x8(%rbp)
  movss  0x10(%rbx),%xmm0
  subss  0x4(%rbx),%xmm0
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  jmp    L46
  nopl   (%rax)
L27:
  addsd  %xmm6,%xmm7
  movapd %xmm7,%xmm0
  subsd  %xmm5,%xmm0
  subsd  %xmm4,%xmm0
  call   <sqrt@plt>
  pxor   %xmm1,%xmm1
  movss  0x24(%rbx),%xmm0
  subss  0x18(%rbx),%xmm0
  add    %eax,%eax
  movsd  D54(%rip),%xmm2
  cvtsi2sd %eax,%xmm1
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm2
  unpcklpd %xmm2,%xmm0
  cvtpd2ps %xmm0,%xmm0
  movlps %xmm0,0x0(%rbp)
  movss  0x10(%rbx),%xmm0
  addss  0x4(%rbx),%xmm0
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x8(%rbp)
  movss  0x8(%rbx),%xmm0
  addss  0x20(%rbx),%xmm0
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  jmp    L46
```

tool_calls: name: retrieve_data
arguments: label: D18
type: f64
name: retrieve_data
arguments: label: D3
type: f64[2]
name: retrieve_data
arguments: label: D54
type: f64

tool: D18: 1

tool: {"D3": [1e-7,0.25]}

tool: D54: 0.25

assistant: ```c
void floats_mat_to_quat(const float M[16], float q[4]) {
  double T = M[0] + M[5] + M[10] + 1.0;
  double S;
  if (T > 0.0000001) {
    S = sqrt(T) * 2;
    q[0] = 0.25 * S;
    q[1] = (M[9] - M[6]) / S;
    q[2] = (M[2] - M[8]) / S;
    q[3] = (M[4] - M[1]) / S;
  } else if (M[0] > M[5] && M[0] > M[10]) {
    S = sqrt(1.0 + M[0] - M[5] - M[10]) * 2;
    q[0] = (M[9] - M[6]) / S;
    q[1] = 0.25 * S;
    q[2] = (M[4] + M[1]) / S;
    q[3] = (M[2] + M[8]) / S;
  } else if (M[5] > M[10]) {
    S = sqrt(1.0 + M[5] - M[0] - M[10]) * 2;
    q[0] = (M[2] - M[8]) / S;
    q[1] = (M[4] + M[1]) / S;
    q[2] = 0.25 * S;
    q[3] = (M[9] + M[6]) / S;
  } else {
    S = sqrt(1.0 + M[10] - M[0] - M[5]);
    q[0] = (M[4] - M[1]) / S;
    q[1] = (M[2] + M[8]) / S;
    q[2] = (M[9] + M[6]) / S;
    q[3] = 0.25 * S;
  }
  floats_normalize(q, 4, q);
}
```