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

```asm
<quat2rpy>:
  endbr64
  push   %r12
  mov    %rdi,%rax
  mov    %rsi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rcx,%rbx
  add    $0xffffffffffffff80,%rsp
  movsd  (%rdi),%xmm1
  movq   D39(%rip),%xmm4
  mov    %fs:0x28,%rdx
  mov    %rdx,0x78(%rsp)
  xor    %edx,%edx
  movsd  D59(%rip),%xmm2
  movdqu (%rdi),%xmm6
  movapd %xmm1,%xmm0
  andpd  %xmm4,%xmm0
  movaps %xmm6,0x50(%rsp)
  movdqu 0x10(%rdi),%xmm6
  comisd %xmm2,%xmm0
  movaps %xmm6,0x60(%rsp)
  ja     L76
  mulsd  D72(%rip),%xmm1
  pxor   %xmm3,%xmm3
  movapd %xmm2,%xmm0
  mulsd  %xmm1,%xmm1
  addsd  %xmm3,%xmm1
L33:
  movsd  0x8(%rax),%xmm2
  movapd %xmm2,%xmm5
  andpd  %xmm4,%xmm5
  comisd %xmm0,%xmm5
  ja     L5
  divsd  %xmm0,%xmm2
  mulsd  %xmm2,%xmm2
  addsd  %xmm2,%xmm1
L79:
  movsd  0x10(%rax),%xmm2
  movapd %xmm2,%xmm5
  andpd  %xmm4,%xmm5
  comisd %xmm0,%xmm5
  ja     L109
  divsd  %xmm0,%xmm2
  mulsd  %xmm2,%xmm2
  addsd  %xmm2,%xmm1
L69:
  movsd  0x18(%rax),%xmm2
  andpd  %xmm2,%xmm4
  comisd %xmm0,%xmm4
  jbe    L39
  divsd  %xmm4,%xmm0
  mulsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  addsd  D35(%rip),%xmm1
L95:
  ucomisd %xmm1,%xmm3
  ja     L86
  sqrtsd %xmm1,%xmm1
L46:
  mulsd  %xmm4,%xmm1
  movapd 0x50(%rsp),%xmm3
  movapd 0x60(%rsp),%xmm2
  movapd %xmm1,%xmm0
  unpcklpd %xmm0,%xmm0
  divpd  %xmm0,%xmm3
  divpd  %xmm0,%xmm2
  movapd %xmm3,%xmm4
  movapd %xmm3,%xmm5
  mulsd  %xmm3,%xmm4
  unpckhpd %xmm3,%xmm3
  movapd %xmm5,%xmm10
  movsd  %xmm5,0x10(%rsp)
  movapd %xmm3,%xmm9
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x18(%rsp)
  mulsd  %xmm3,%xmm9
  movapd %xmm4,%xmm1
  movsd  %xmm4,0x48(%rsp)
  addsd  %xmm9,%xmm1
  movsd  %xmm9,0x40(%rsp)
  movapd %xmm2,%xmm8
  movapd %xmm2,%xmm7
  mulsd  %xmm2,%xmm8
  unpckhpd %xmm2,%xmm2
  movsd  %xmm7,0x30(%rsp)
  mulsd  %xmm2,%xmm10
  movapd %xmm2,%xmm6
  movsd  %xmm2,0x8(%rsp)
  mulsd  %xmm7,%xmm0
  mulsd  %xmm2,%xmm6
  subsd  %xmm8,%xmm1
  movsd  %xmm8,0x38(%rsp)
  addsd  %xmm10,%xmm0
  subsd  %xmm6,%xmm1
  movsd  %xmm6,0x28(%rsp)
  addsd  %xmm0,%xmm0
  call   <rt_atan2d_snf@plt>
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm5
  movsd  0x8(%rsp),%xmm2
  movsd  0x30(%rsp),%xmm7
  movsd  %xmm0,(%r12)
  movapd %xmm5,%xmm1
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x20(%rsp)
  mulsd  %xmm7,%xmm1
  movsd  %xmm2,0x18(%rsp)
  mulsd  %xmm2,%xmm0
  movsd  %xmm7,0x8(%rsp)
  subsd  %xmm1,%xmm0
  mulsd  D58(%rip),%xmm0
  call   <asin@plt>
  movsd  0x8(%rsp),%xmm7
  movsd  0x18(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm5
  movsd  0x20(%rsp),%xmm3
  movsd  %xmm0,0x0(%rbp)
  mulsd  %xmm7,%xmm2
  movsd  0x48(%rsp),%xmm4
  movsd  0x40(%rsp),%xmm9
  mulsd  %xmm5,%xmm3
  movsd  0x38(%rsp),%xmm8
  movsd  0x28(%rsp),%xmm6
  subsd  %xmm9,%xmm4
  movapd %xmm4,%xmm1
  addsd  %xmm3,%xmm2
  subsd  %xmm8,%xmm1
  addsd  %xmm2,%xmm2
  addsd  %xmm6,%xmm1
  movapd %xmm2,%xmm0
  call   <rt_atan2d_snf@plt>
  movsd  %xmm0,(%rbx)
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L55
  sub    $0xffffffffffffff80,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L76:
  divsd  %xmm0,%xmm2
  pxor   %xmm3,%xmm3
  movapd %xmm2,%xmm1
  mulsd  %xmm3,%xmm2
  mulsd  %xmm2,%xmm1
  addsd  D35(%rip),%xmm1
  jmp    L33
  nopl   0x0(%rax)
L39:
  divsd  %xmm0,%xmm2
  movapd %xmm0,%xmm4
  mulsd  %xmm2,%xmm2
  addsd  %xmm2,%xmm1
  jmp    L95
  nopl   (%rax)
L109:
  divsd  %xmm5,%xmm0
  mulsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movapd %xmm5,%xmm0
  addsd  D35(%rip),%xmm1
  jmp    L69
  nopl   (%rax)
L5:
  divsd  %xmm5,%xmm0
  mulsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movapd %xmm5,%xmm0
  addsd  D35(%rip),%xmm1
  jmp    L79
L86:
  movapd %xmm1,%xmm0
  movsd  %xmm4,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm4
  movapd %xmm0,%xmm1
  jmp    L46
L55:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D39
data_type: qword
name: disassemble_data
arguments: data_tag: D59
data_type: f32[2]
name: disassemble_data
arguments: data_tag: D72
data_type: f32[2]
name: disassemble_data
arguments: data_tag: D35
data_type: f64
name: disassemble_data
arguments: data_tag: D58
data_type: f32[2]

tool: D39: 9223372036854775807

tool: {"D59": [0.0,1.4693679385278594e-39]}

tool: {"D72": [0.0,null]}

tool: D35: 1

tool: {"D58": [0.0,-2.0]}

assistant: ```c
void quat2rpy(const double q[4], double *yaw, double *pitch, double *roll) {
  int k;
  double qin[4];
  double qm;
  double scale;
  double absxk;
  double t;
  for (k = 0; k < 4; k++) {
    qin[k] = q[k];
  }
  qm = 0.0;
  scale = 2.2250738585072014E-308;
  for (k = 0; k < 4; k++) {
    absxk = fabs(q[k]);
    if (absxk > scale) {
      t = scale / absxk;
      qm = 1.0 + qm * t * t;
      scale = absxk;
    } else {
      t = absxk / scale;
      qm += t * t;
    }
  }
  qm = scale * sqrt(qm);
  for (k = 0; k < 4; k++) {
    qin[k] /= qm;
  }
  *yaw = rt_atan2d_snf(2.0 * (qin[1] * qin[2] + qin[0] * qin[3]), ((qin[0] * qin[0] + qin[1] * qin[1]) - qin[2] * qin[2]) - qin[3] * qin[3]);
  *pitch = asin(-2.0 * (qin[1] * qin[3] - qin[0] * qin[2]));
  *roll = rt_atan2d_snf(2.0 * (qin[2] * qin[3] + qin[0] * qin[1]), ((qin[0] * qin[0] - qin[1] * qin[1]) - qin[2] * qin[2]) + qin[3] * qin[3]);
}
```