user: Please show me the C implementation that matches the assembly code listed below:

```asm
<q_slerp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  movss  %xmm0,-0x3c(%rbp)
  movl   $0x1,-0xc(%rbp)
  pxor   %xmm0,%xmm0
  comiss -0x3c(%rbp),%xmm0
  jb     L54
  mov    -0x30(%rbp),%rax
  movss  (%rax),%xmm0
  mov    -0x28(%rbp),%rax
  movss  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  lea    0xc(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    $0xc,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  jmp    L5
L54:
  movss  -0x3c(%rbp),%xmm0
  movss  D42(%rip),%xmm1
  comiss %xmm1,%xmm0
  jb     L8
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm0
  mov    -0x28(%rbp),%rax
  movss  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  lea    0xc(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    $0xc,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  jmp    L5
L8:
  mov    -0x30(%rbp),%rax
  movss  (%rax),%xmm1
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm0
  mulss  %xmm0,%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm2
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm0
  mulss  %xmm0,%xmm2
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm3
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm0
  mulss  %xmm3,%xmm0
  addss  %xmm0,%xmm2
  mov    -0x30(%rbp),%rax
  add    $0xc,%rax
  movss  (%rax),%xmm3
  mov    -0x38(%rbp),%rax
  add    $0xc,%rax
  movss  (%rax),%xmm0
  mulss  %xmm3,%xmm0
  addss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
  pxor   %xmm0,%xmm0
  comiss -0x18(%rbp),%xmm0
  jbe    L23
  movss  -0x18(%rbp),%xmm0
  movss  D32(%rip),%xmm1
  xorps  %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
  movl   $0xffffffff,-0xc(%rbp)
L23:
  movss  D42(%rip),%xmm0
  subss  -0x18(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D36(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L4
  movss  D42(%rip),%xmm0
  subss  -0x3c(%rbp),%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x3c(%rbp),%xmm0
  movss  %xmm0,-0x10(%rbp)
  jmp    L24
L4:
  pxor   %xmm4,%xmm4
  cvtss2sd -0x18(%rbp),%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  call   <acos@plt>
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x8(%rbp)
  pxor   %xmm5,%xmm5
  cvtss2sd -0x8(%rbp),%xmm5
  movq   %xmm5,%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movss  D42(%rip),%xmm0
  subss  -0x3c(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x8(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  cvtsd2ss %xmm0,%xmm0
  divss  -0x4(%rbp),%xmm0
  movss  %xmm0,-0x14(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x3c(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x8(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  cvtsd2ss %xmm0,%xmm0
  movaps %xmm0,%xmm1
  divss  -0x4(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0xc(%rbp),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x10(%rbp)
L24:
  mov    -0x30(%rbp),%rax
  movss  (%rax),%xmm0
  movaps %xmm0,%xmm1
  mulss  -0x14(%rbp),%xmm1
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm0
  mulss  -0x10(%rbp),%xmm0
  addss  %xmm1,%xmm0
  mov    -0x28(%rbp),%rax
  movss  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm0
  movaps %xmm0,%xmm1
  mulss  -0x14(%rbp),%xmm1
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm0
  mulss  -0x10(%rbp),%xmm0
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm0
  movaps %xmm0,%xmm1
  mulss  -0x14(%rbp),%xmm1
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm0
  mulss  -0x10(%rbp),%xmm0
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0xc,%rax
  movss  (%rax),%xmm0
  movaps %xmm0,%xmm1
  mulss  -0x14(%rbp),%xmm1
  mov    -0x38(%rbp),%rax
  add    $0xc,%rax
  movss  (%rax),%xmm0
  mulss  -0x10(%rbp),%xmm0
  mov    -0x28(%rbp),%rax
  add    $0xc,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x28(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <q_nrm@plt>
L5:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D42
type: byte[4]
name: parse_data
arguments: tag: D32
type: byte[4]
name: parse_data
arguments: tag: D36
type: byte[8]

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

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

tool: {"D36": [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);
}
```