user: 请从给定的汇编指令推导出C源代码:

```asm
<q_slerp>:
  endbr64
  pxor   %xmm5,%xmm5
  comiss %xmm0,%xmm5
  jae    L30
  movss  D17(%rip),%xmm2
  movss  (%rdx),%xmm4
  movaps %xmm0,%xmm1
  comiss %xmm2,%xmm0
  jae    L46
  push   %r13
  mov    $0x1,%r13d
  sub    $0x40,%rsp
  movss  0x4(%rsi),%xmm0
  movss  0x8(%rsi),%xmm6
  mulss  0x4(%rdx),%xmm0
  movss  (%rsi),%xmm3
  mulss  0x8(%rdx),%xmm6
  addss  %xmm6,%xmm0
  movss  0xc(%rsi),%xmm6
  mulss  0xc(%rdx),%xmm6
  addss  %xmm6,%xmm0
  movaps %xmm3,%xmm6
  mulss  %xmm4,%xmm6
  addss  %xmm6,%xmm0
  comiss %xmm0,%xmm5
  jbe    L37
  xorps  D12(%rip),%xmm0
  mov    $0xffffffff,%r13d
L37:
  movaps %xmm2,%xmm5
  movsd  D24(%rip),%xmm6
  subss  %xmm0,%xmm5
  cvtss2sd %xmm5,%xmm5
  comisd %xmm5,%xmm6
  jbe    L17
  subss  %xmm1,%xmm2
L43:
  mulss  %xmm2,%xmm3
  xor    %eax,%eax
  mulss  %xmm1,%xmm4
  addss  %xmm4,%xmm3
  movss  %xmm3,(%rdi)
  movss  0x4(%rsi),%xmm0
  movss  0x4(%rdx),%xmm3
  mulss  %xmm2,%xmm0
  mulss  %xmm1,%xmm3
  addss  %xmm3,%xmm0
  movss  %xmm0,0x4(%rdi)
  movss  0x8(%rsi),%xmm0
  movss  0x8(%rdx),%xmm3
  mulss  %xmm2,%xmm0
  mulss  %xmm1,%xmm3
  addss  %xmm3,%xmm0
  movss  %xmm0,0x8(%rdi)
  mulss  0xc(%rsi),%xmm2
  mov    %rdi,%rsi
  mulss  0xc(%rdx),%xmm1
  addss  %xmm1,%xmm2
  movss  %xmm2,0xc(%rdi)
  add    $0x40,%rsp
  pop    %r13
  jmp    1070 <q_nrm@plt>
  cs nopw 0x0(%rax,%rax,1)
L46:
  movss  %xmm4,(%rdi)
  movss  0x4(%rdx),%xmm0
  movss  %xmm0,0x4(%rdi)
  movss  0x8(%rdx),%xmm0
  movss  %xmm0,0x8(%rdi)
  movss  0xc(%rdx),%xmm0
  movss  %xmm0,0xc(%rdi)
  ret
  nopl   0x0(%rax,%rax,1)
L30:
  movss  (%rsi),%xmm0
  movss  %xmm0,(%rdi)
  movss  0x4(%rsi),%xmm0
  movss  %xmm0,0x4(%rdi)
  movss  0x8(%rsi),%xmm0
  movss  %xmm0,0x8(%rdi)
  movss  0xc(%rsi),%xmm0
  movss  %xmm0,0xc(%rdi)
  ret
  nop
L17:
  mov    %rdx,0x38(%rsp)
  cvtss2sd %xmm0,%xmm0
  mov    %rsi,0x30(%rsp)
  mov    %rdi,0x28(%rsp)
  movss  %xmm4,0x24(%rsp)
  movss  %xmm3,0x20(%rsp)
  movss  %xmm1,0x10(%rsp)
  call   <acos@plt>
  pxor   %xmm5,%xmm5
  cvtsd2ss %xmm0,%xmm5
  cvtss2sd %xmm5,%xmm5
  movapd %xmm5,%xmm0
  movsd  %xmm5,0x8(%rsp)
  call   <sin@plt>
  movss  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm5
  pxor   %xmm7,%xmm7
  movss  D17(%rip),%xmm2
  cvtsd2ss %xmm0,%xmm7
  pxor   %xmm0,%xmm0
  movss  %xmm7,0x18(%rsp)
  movss  %xmm1,0x1c(%rsp)
  subss  %xmm1,%xmm2
  movsd  %xmm5,0x10(%rsp)
  cvtss2sd %xmm2,%xmm0
  mulsd  %xmm5,%xmm0
  call   <sin@plt>
  movsd  0x10(%rsp),%xmm5
  movss  0x1c(%rsp),%xmm1
  pxor   %xmm2,%xmm2
  cvtsd2ss %xmm0,%xmm2
  divss  0x18(%rsp),%xmm2
  movss  %xmm2,0x8(%rsp)
  cvtss2sd %xmm1,%xmm1
  mulsd  %xmm5,%xmm1
  movapd %xmm1,%xmm0
  call   <sin@plt>
  pxor   %xmm1,%xmm1
  mov    0x38(%rsp),%rdx
  mov    0x30(%rsp),%rsi
  cvtsd2ss %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  divss  0x18(%rsp),%xmm1
  mov    0x28(%rsp),%rdi
  cvtsi2ss %r13d,%xmm0
  movss  0x24(%rsp),%xmm4
  movss  0x20(%rsp),%xmm3
  movss  0x8(%rsp),%xmm2
  mulss  %xmm0,%xmm1
  jmp    L43
```

tool_calls: name: retrieve_data
arguments: data_label: D17
datatype: byte[4]
name: retrieve_data
arguments: data_label: D12
datatype: byte[16]
name: retrieve_data
arguments: data_label: D24
datatype: byte[8]

tool: {"D17": [0x00,0x00,0x80,0x3f]}

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

tool: {"D24": [0xf1,0x68,0xe3,0x88,0xb5,0xf8,0xe4,0x3e]}

assistant: ```c
void q_slerp(float q[4], const float a[4], const float b[4], float t) {
  float c, r, s, u, v;
  int i = +1;
  if (t <= 0.0f) {
    do {
      (q)[0] = (a)[0];
      (q)[1] = (a)[1];
      (q)[2] = (a)[2];
      (q)[3] = (a)[3];
    } while (0);
    return;
  }
  if (1.0f <= t) {
    do {
      (q)[0] = (b)[0];
      (q)[1] = (b)[1];
      (q)[2] = (b)[2];
      (q)[3] = (b)[3];
    } while (0);
    return;
  }
  c = ((a)[0] * (b)[0] + (((a) + 1)[0] * ((b) + 1)[0] + ((a) + 1)[1] * ((b) + 1)[1] + ((a) + 1)[2] * ((b) + 1)[2]));
  if (c < 0) {
    c = -c;
    i = -1;
  }
  if (1.0f - c < 1e-5) {
    u = 1.0f - t;
    v = t;
  } else {
    r = ((float)acos((double)c));
    s = ((float)sin((double)r));
    u = ((float)sin((double)(1.0f - t) * r)) / s;
    v = ((float)sin((double)(t)*r)) / s * i;
  }
  q[0] = a[0] * u + b[0] * v;
  q[1] = a[1] * u + b[1] * v;
  q[2] = a[2] * u + b[2] * v;
  q[3] = a[3] * u + b[3] * v;
  q_nrm(q, q);
}
```