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

```asm
<UpdateQuaternion>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  movss  %xmm0,-0x44(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm1,%xmm1
  cvtss2sd -0x44(%rbp),%xmm1
  movsd  D2(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rdx
  lea    -0x2c(%rbp),%rcx
  mov    -0x40(%rbp),%rax
  mov    %rcx,%rsi
  movq   %rdx,%xmm0
  mov    %rax,%rdi
  call   <Vector3Scale@plt>
  movss  -0x2c(%rbp),%xmm0
  movss  D14(%rip),%xmm1
  xorps  %xmm0,%xmm1
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm0
  mulss  %xmm1,%xmm0
  movss  -0x28(%rbp),%xmm2
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm1
  mulss  %xmm2,%xmm1
  subss  %xmm1,%xmm0
  movss  -0x24(%rbp),%xmm2
  mov    -0x38(%rbp),%rax
  add    $0xc,%rax
  movss  (%rax),%xmm1
  mulss  %xmm2,%xmm1
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x20(%rbp)
  movss  -0x2c(%rbp),%xmm1
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm0
  mulss  %xmm1,%xmm0
  movss  -0x28(%rbp),%xmm2
  mov    -0x38(%rbp),%rax
  add    $0xc,%rax
  movss  (%rax),%xmm1
  mulss  %xmm1,%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  movss  -0x24(%rbp),%xmm2
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movss  -0x2c(%rbp),%xmm1
  mov    -0x38(%rbp),%rax
  add    $0xc,%rax
  movss  (%rax),%xmm0
  mulss  %xmm0,%xmm1
  movss  -0x28(%rbp),%xmm2
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  movss  -0x24(%rbp),%xmm2
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm1
  mulss  %xmm2,%xmm1
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
  movss  -0x2c(%rbp),%xmm0
  movss  D14(%rip),%xmm1
  xorps  %xmm0,%xmm1
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm0
  mulss  %xmm0,%xmm1
  movss  -0x28(%rbp),%xmm2
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  movss  -0x24(%rbp),%xmm2
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm1
  movss  -0x20(%rbp),%xmm0
  addss  %xmm1,%xmm0
  mov    -0x38(%rbp),%rax
  movss  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm1
  movss  -0x1c(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm1
  movss  -0x18(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0xc,%rax
  movss  (%rax),%xmm1
  movss  -0x14(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  add    $0xc,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L4
  call   <__stack_chk_fail@plt>
L4:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D2
data_type: f64
name: disassemble_data
arguments: data_label: D14
data_type: byte[4]

tool: D2: 0.5

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

assistant: ```c
float *UpdateQuaternion(float quat[4], const float angular_rate[3], float dt) {
  float dpqr[3];
  Vector3Scale(angular_rate, 0.5 * dt, dpqr);
  float d_quat[4];
  d_quat[0] = -dpqr[0] * quat[1] - dpqr[1] * quat[2] - dpqr[2] * quat[3];
  d_quat[1] = dpqr[0] * quat[0] - dpqr[1] * quat[3] + dpqr[2] * quat[2];
  d_quat[2] = dpqr[0] * quat[3] + dpqr[1] * quat[0] - dpqr[2] * quat[1];
  d_quat[3] = -dpqr[0] * quat[2] + dpqr[1] * quat[1] + dpqr[2] * quat[0];
  quat[0] += d_quat[0];
  quat[1] += d_quat[1];
  quat[2] += d_quat[2];
  quat[3] += d_quat[3];
  return quat;
}
```