user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<cquat_from_matrix_t>:
  endbr64
  sub    $0x18,%rsp
  movsd  (%rsi),%xmm2
  movsd  0x20(%rsi),%xmm3
  movsd  D19(%rip),%xmm1
  movsd  0x40(%rsi),%xmm4
  movapd %xmm2,%xmm5
  addsd  %xmm1,%xmm5
  movapd %xmm5,%xmm0
  addsd  %xmm3,%xmm0
  addsd  %xmm4,%xmm0
  comisd D45(%rip),%xmm0
  ja     L99
  comisd %xmm3,%xmm2
  jbe    L27
  comisd %xmm4,%xmm2
  ja     L126
L27:
  comisd %xmm2,%xmm3
  ja     L11
L91:
  comisd %xmm2,%xmm4
  jbe    L169
  comisd %xmm3,%xmm4
  ja     L119
L169:
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax,%rax,1)
L11:
  comisd %xmm4,%xmm3
  jbe    L91
  subsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  addsd  %xmm3,%xmm0
  subsd  %xmm4,%xmm0
  ucomisd %xmm0,%xmm1
  ja     L89
  sqrtsd %xmm0,%xmm0
L157:
  addsd  %xmm0,%xmm0
  movsd  D58(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rdi)
  movsd  0x18(%rsi),%xmm1
  addsd  0x8(%rsi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdi)
  movsd  0x38(%rsi),%xmm1
  addsd  0x28(%rsi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rdi)
  movsd  0x30(%rsi),%xmm1
  subsd  0x10(%rsi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rdi)
  jmp    L169
  nopw   0x0(%rax,%rax,1)
L99:
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L65
  sqrtsd %xmm0,%xmm0
L54:
  addsd  %xmm0,%xmm0
  movsd  D58(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rdi)
  movsd  0x28(%rsi),%xmm1
  subsd  0x38(%rsi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdi)
  movsd  0x30(%rsi),%xmm1
  subsd  0x10(%rsi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rdi)
  movsd  0x8(%rsi),%xmm1
  subsd  0x18(%rsi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rdi)
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax)
L126:
  subsd  %xmm3,%xmm5
  pxor   %xmm1,%xmm1
  movapd %xmm5,%xmm0
  subsd  %xmm4,%xmm0
  ucomisd %xmm0,%xmm1
  ja     L101
  sqrtsd %xmm0,%xmm0
L168:
  addsd  %xmm0,%xmm0
  movsd  D58(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdi)
  movsd  0x18(%rsi),%xmm1
  addsd  0x8(%rsi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rdi)
  movsd  0x30(%rsi),%xmm1
  addsd  0x10(%rsi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rdi)
  movsd  0x28(%rsi),%xmm1
  subsd  0x38(%rsi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rdi)
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax,%rax,1)
L119:
  movapd %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  subsd  %xmm2,%xmm0
  subsd  %xmm3,%xmm0
  addsd  %xmm4,%xmm0
  ucomisd %xmm0,%xmm1
  ja     L55
  sqrtsd %xmm0,%xmm0
L13:
  addsd  %xmm0,%xmm0
  movsd  D58(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rdi)
  movsd  0x30(%rsi),%xmm1
  addsd  0x10(%rsi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rdi)
  movsd  0x38(%rsi),%xmm1
  addsd  0x28(%rsi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdi)
  movsd  0x8(%rsi),%xmm1
  subsd  0x18(%rsi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rdi)
  jmp    L169
L65:
  mov    %rsi,0x8(%rsp)
  mov    %rdi,(%rsp)
  call   <sqrt@plt>
  mov    0x8(%rsp),%rsi
  mov    (%rsp),%rdi
  jmp    L54
L101:
  mov    %rsi,0x8(%rsp)
  mov    %rdi,(%rsp)
  call   <sqrt@plt>
  mov    0x8(%rsp),%rsi
  mov    (%rsp),%rdi
  jmp    L168
L55:
  mov    %rsi,0x8(%rsp)
  mov    %rdi,(%rsp)
  call   <sqrt@plt>
  mov    0x8(%rsp),%rsi
  mov    (%rsp),%rdi
  jmp    L13
L89:
  mov    %rsi,0x8(%rsp)
  mov    %rdi,(%rsp)
  call   <sqrt@plt>
  mov    0x8(%rsp),%rsi
  mov    (%rsp),%rdi
  jmp    L157
```

tool_calls: name: unpack_data
arguments: tag: D19
type: f64
name: unpack_data
arguments: tag: D45
type: f64[2]
name: unpack_data
arguments: tag: D58
type: byte[8]

tool: D19: 1

tool: {"D45": [0.1,0.25]}

tool: {"D58": [0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x3f]}

assistant: ```c
void cquat_from_matrix_t(double *q, const double *m) {
  double m11 = m[((1) - 1) * (3) + ((1) - 1)];
  double m22 = m[((2) - 1) * (3) + ((2) - 1)];
  double m33 = m[((3) - 1) * (3) + ((3) - 1)];
  double s;
  s = 1.0 + m11 + m22 + m33;
  if (s > 0.1) {
    s = 2.0 * sqrt(s);
    q[3] = s / 4.0;
    q[0] = (m[((2) - 1) * (3) + ((3) - 1)] - m[((3) - 1) * (3) + ((2) - 1)]) / s;
    q[1] = (m[((3) - 1) * (3) + ((1) - 1)] - m[((1) - 1) * (3) + ((3) - 1)]) / s;
    q[2] = (m[((1) - 1) * (3) + ((2) - 1)] - m[((2) - 1) * (3) + ((1) - 1)]) / s;
  } else if ((m11 > m22) && (m11 > m33)) {
    s = 2.0 * sqrt(1.0 + m11 - m22 - m33);
    q[0] = s / 4.0;
    q[1] = (m[((2) - 1) * (3) + ((1) - 1)] + m[((1) - 1) * (3) + ((2) - 1)]) / s;
    q[2] = (m[((3) - 1) * (3) + ((1) - 1)] + m[((1) - 1) * (3) + ((3) - 1)]) / s;
    q[3] = (m[((2) - 1) * (3) + ((3) - 1)] - m[((3) - 1) * (3) + ((2) - 1)]) / s;
  } else if ((m22 > m11) && (m22 > m33)) {
    s = 2.0 * sqrt(1.0 - m11 + m22 - m33);
    q[1] = s / 4.0;
    q[0] = (m[((2) - 1) * (3) + ((1) - 1)] + m[((1) - 1) * (3) + ((2) - 1)]) / s;
    q[2] = (m[((3) - 1) * (3) + ((2) - 1)] + m[((2) - 1) * (3) + ((3) - 1)]) / s;
    q[3] = (m[((3) - 1) * (3) + ((1) - 1)] - m[((1) - 1) * (3) + ((3) - 1)]) / s;
  } else if ((m33 > m11) && (m33 > m22)) {
    s = 2.0 * sqrt(1.0 - m11 - m22 + m33);
    q[2] = s / 4.0;
    q[3] = (m[((3) - 1) * (3) + ((1) - 1)] + m[((1) - 1) * (3) + ((3) - 1)]) / s;
    q[0] = (m[((3) - 1) * (3) + ((2) - 1)] + m[((2) - 1) * (3) + ((3) - 1)]) / s;
    q[1] = (m[((1) - 1) * (3) + ((2) - 1)] - m[((2) - 1) * (3) + ((1) - 1)]) / s;
  }
}
```