user: Converte this assembly snippet into its equivalent C code:

```asm
<floats_quat_slerp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  movss  %xmm0,-0x5c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x50(%rbp),%rcx
  mov    -0x48(%rbp),%rax
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <floats_dot@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x50(%rbp),%rcx
  lea    -0x20(%rbp),%rax
  mov    $0x10,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  pxor   %xmm0,%xmm0
  comiss -0x3c(%rbp),%xmm0
  jbe    L12
  movss  -0x3c(%rbp),%xmm0
  movss  D28(%rip),%xmm1
  xorps  %xmm1,%xmm0
  movss  %xmm0,-0x3c(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L13
L4:
  mov    -0x38(%rbp),%eax
  cltq
  movss  -0x20(%rbp,%rax,4),%xmm0
  movss  D28(%rip),%xmm1
  xorps  %xmm1,%xmm0
  mov    -0x38(%rbp),%eax
  cltq
  movss  %xmm0,-0x20(%rbp,%rax,4)
  addl   $0x1,-0x38(%rbp)
L13:
  cmpl   $0x3,-0x38(%rbp)
  jle    L4
L12:
  pxor   %xmm0,%xmm0
  cvtss2sd -0x3c(%rbp),%xmm0
  comisd D39(%rip),%xmm0
  jbe    L28
  movl   $0x0,-0x34(%rbp)
  jmp    L15
L75:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  D36(%rip),%xmm0
  subss  -0x5c(%rbp),%xmm0
  mulss  %xmm0,%xmm1
  mov    -0x34(%rbp),%eax
  cltq
  movss  -0x20(%rbp,%rax,4),%xmm0
  mulss  -0x5c(%rbp),%xmm0
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L15:
  cmpl   $0x3,-0x34(%rbp)
  jle    L75
  jmp    L60
L28:
  mov    -0x3c(%rbp),%eax
  movd   %eax,%xmm0
  call   <acos@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x2c(%rbp)
  movss  D36(%rip),%xmm0
  subss  -0x5c(%rbp),%xmm0
  mulss  -0x2c(%rbp),%xmm0
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x28(%rbp)
  movss  -0x2c(%rbp),%xmm0
  mulss  -0x5c(%rbp),%xmm0
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  call   <sin@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x24(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L87
L34:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movaps %xmm0,%xmm1
  mulss  -0x28(%rbp),%xmm1
  mov    -0x30(%rbp),%eax
  cltq
  movss  -0x20(%rbp,%rax,4),%xmm0
  mulss  -0x24(%rbp),%xmm0
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x30(%rbp)
L87:
  cmpl   $0x3,-0x30(%rbp)
  jle    L34
  mov    -0x58(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <floats_normalize@plt>
L60:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L55
  call   <__stack_chk_fail@plt>
L55:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D28
type: byte[4]
name: extract_symbolic_data
arguments: data_tag: D39
type: f64
name: extract_symbolic_data
arguments: data_tag: D36
type: f32

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

tool: D39: 0.95

tool: D36: 1

assistant: ```c
void floats_quat_slerp(const float q0[4], const float _q1[4], float r[4], float w) {
  float dot = floats_dot(q0, _q1, 4);
  float q1[4];
  memcpy(q1, _q1, sizeof(float) * 4);
  if (dot < 0) {
    dot = -dot;
    for (int i = 0; i < 4; i++)
      q1[i] *= -1;
  }
  if (dot > 0.95) {
    for (int i = 0; i < 4; i++)
      r[i] = q0[i] * (1 - w) + q1[i] * w;
  } else {
    float angle = acos(dot);
    float w0 = sin(angle * (1 - w)), w1 = sin(angle * w);
    for (int i = 0; i < 4; i++)
      r[i] = q0[i] * w0 + q1[i] * w1;
    floats_normalize(r, 4, r);
  }
}
```