user: 请将以下的汇编代码转换成C语言代码:

```asm
<trackball>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x68(%rbp)
  movss  %xmm0,-0x6c(%rbp)
  movss  %xmm1,-0x70(%rbp)
  movss  %xmm2,-0x74(%rbp)
  movss  %xmm3,-0x78(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movss  -0x6c(%rbp),%xmm0
  ucomiss -0x74(%rbp),%xmm0
  jp     L20
  movss  -0x6c(%rbp),%xmm0
  ucomiss -0x74(%rbp),%xmm0
  jne    L20
  movss  -0x70(%rbp),%xmm0
  ucomiss -0x78(%rbp),%xmm0
  jp     L20
  movss  -0x70(%rbp),%xmm0
  ucomiss -0x78(%rbp),%xmm0
  jne    L20
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <vzero@plt>
  mov    -0x68(%rbp),%rax
  add    $0xc,%rax
  movss  D64(%rip),%xmm0
  movss  %xmm0,(%rax)
  jmp    L17
L20:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x70(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x6c(%rbp),%xmm0
  mov    D18(%rip),%rax
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x3,%eax
  call   <tb_project_to_sphere@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x50(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x50(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x70(%rbp),%xmm0
  pxor   %xmm4,%xmm4
  cvtss2sd -0x6c(%rbp),%xmm4
  movq   %xmm4,%rdx
  lea    -0x2c(%rbp),%rax
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  mov    %rax,%rdi
  mov    $0x3,%eax
  call   <vset@plt>
  pxor   %xmm1,%xmm1
  cvtss2sd -0x78(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x74(%rbp),%xmm0
  mov    D18(%rip),%rax
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x3,%eax
  call   <tb_project_to_sphere@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x4c(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x4c(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x78(%rbp),%xmm0
  pxor   %xmm5,%xmm5
  cvtss2sd -0x74(%rbp),%xmm5
  movq   %xmm5,%rdx
  lea    -0x20(%rbp),%rax
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  mov    %rax,%rdi
  mov    $0x3,%eax
  call   <vset@plt>
  lea    -0x38(%rbp),%rdx
  lea    -0x2c(%rbp),%rcx
  lea    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <vcross@plt>
  lea    -0x14(%rbp),%rdx
  lea    -0x20(%rbp),%rcx
  lea    -0x2c(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <vsub@plt>
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <vlength@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x48(%rbp)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x48(%rbp),%xmm0
  movsd  D49(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x54(%rbp)
  movss  -0x54(%rbp),%xmm0
  movss  D64(%rip),%xmm1
  comiss %xmm1,%xmm0
  jbe    L76
  movss  D64(%rip),%xmm0
  movss  %xmm0,-0x54(%rbp)
L76:
  movss  D41(%rip),%xmm0
  comiss -0x54(%rbp),%xmm0
  jbe    L54
  movss  D41(%rip),%xmm0
  movss  %xmm0,-0x54(%rbp)
L54:
  pxor   %xmm6,%xmm6
  cvtss2sd -0x54(%rbp),%xmm6
  movq   %xmm6,%rax
  movq   %rax,%xmm0
  call   <asin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x40(%rbp)
  movsd  -0x40(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x44(%rbp)
  pxor   %xmm7,%xmm7
  cvtss2sd -0x44(%rbp),%xmm7
  movq   %xmm7,%rdx
  mov    -0x68(%rbp),%rcx
  lea    -0x38(%rbp),%rax
  mov    %rcx,%rsi
  movq   %rdx,%xmm0
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <axis_to_quat@plt>
L17:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L28
  call   <__stack_chk_fail@plt>
L28:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D64
type: f32
name: parse_data
arguments: data_label: D18
type: byte[8]
name: parse_data
arguments: data_label: D49
type: byte[8]
name: parse_data
arguments: data_label: D41
type: byte[4]

tool: D64: 1

tool: {"D18": [0x00,0x00,0x00,0xa0,0x99,0x99,0xe9,0x3f]}

tool: {"D49": [0x9a,0x99,0x99,0x99,0x99,0x99,0xf9,0x3f]}

tool: {"D41": [0x00,0x00,0x80,0xbf]}

assistant: ```c
void trackball(float *q, float p1x, float p1y, float p2x, float p2y) {
  float a[3l];
  float phi;
  float p1[3l];
  float p2[3l];
  float d[3l];
  float t;
  if ((p1x == p2x)) {
    if ((p1y == p2y)) {
      vzero(q);
      q[(signed long int)3] = (float)1.000000;
      return;
    }
  }
  float return_value_tb_project_to_sphere$1;
  return_value_tb_project_to_sphere$1 = tb_project_to_sphere((float)8.000000e-1, p1x, p1y);
  vset(p1, p1x, p1y, return_value_tb_project_to_sphere$1);
  float return_value_tb_project_to_sphere$2;
  return_value_tb_project_to_sphere$2 = tb_project_to_sphere((float)8.000000e-1, p2x, p2y);
  vset(p2, p2x, p2y, return_value_tb_project_to_sphere$2);
  vcross(p2, p1, a);
  vsub(p1, p2, d);
  float return_value_vlength$3;
  return_value_vlength$3 = vlength(d);
  t = (float)((double)return_value_vlength$3 / (2.000000 * 8.000000e-1));
  if (t > 1.000000f)
    t = (float)1.000000;
  if (t < -1.000000f)
    t = (float)-1.000000;
  double return_value_asin$4;
  return_value_asin$4 = asin((double)t);
  phi = (float)(2.000000 * return_value_asin$4);
  axis_to_quat(a, phi, q);
}
```