user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<GetAngles>:
  endbr64
  movapd %xmm0,%xmm9
  movapd %xmm0,%xmm8
  push   %r14
  pxor   %xmm10,%xmm10
  mulsd  %xmm0,%xmm9
  movapd %xmm1,%xmm0
  push   %r13
  movapd %xmm3,%xmm11
  mulsd  %xmm1,%xmm0
  push   %r12
  movapd %xmm6,%xmm3
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  addsd  %xmm0,%xmm9
  movapd %xmm2,%xmm0
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm9
  ucomisd %xmm9,%xmm10
  ja     L141
  sqrtsd %xmm9,%xmm9
L52:
  movapd %xmm4,%xmm6
  movapd %xmm11,%xmm0
  mulsd  %xmm4,%xmm6
  mulsd  %xmm11,%xmm0
  addsd  %xmm6,%xmm0
  movapd %xmm5,%xmm6
  mulsd  %xmm5,%xmm6
  addsd  %xmm6,%xmm0
  ucomisd %xmm0,%xmm10
  ja     L5
  sqrtsd %xmm0,%xmm0
L3:
  divsd  %xmm9,%xmm1
  ucomisd %xmm10,%xmm3
  mov    $0x1,%edx
  setp   %al
  cmovne %edx,%eax
  divsd  %xmm9,%xmm8
  movapd %xmm1,%xmm12
  divsd  %xmm9,%xmm2
  movapd %xmm12,%xmm9
  xorpd  D34(%rip),%xmm9
  movsd  %xmm9,0x58(%rsp)
  movapd %xmm8,%xmm1
  xorpd  D34(%rip),%xmm1
  movsd  %xmm1,0x50(%rsp)
  movapd %xmm2,%xmm6
  xorpd  D34(%rip),%xmm6
  movsd  %xmm6,0x60(%rsp)
  test   %al,%al
  jne    L109
  ucomisd %xmm10,%xmm7
  setp   %al
  cmovne %edx,%eax
  test   %al,%al
  jne    L109
L127:
  movapd %xmm9,%xmm2
  movapd %xmm1,%xmm0
  mulsd  %xmm9,%xmm2
  mulsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm2
  ucomisd %xmm2,%xmm10
  ja     L26
  sqrtsd %xmm2,%xmm2
L71:
  movapd %xmm9,%xmm0
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm6,0x8(%rsp)
  call   <atan2@plt>
  movsd  0x8(%rsp),%xmm6
  pxor   %xmm10,%xmm10
  addsd  D44(%rip),%xmm0
  movsd  0x10(%rsp),%xmm2
  comisd %xmm6,%xmm10
  movsd  %xmm0,0x0(%rbp)
  movapd %xmm2,%xmm0
  jae    L145
  call   <acos@plt>
  xorpd  D34(%rip),%xmm0
L136:
  movsd  %xmm0,(%rbx)
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L82
  add    $0x70,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L145:
  call   <acos@plt>
  jmp    L136
  nopw   0x0(%rax,%rax,1)
L109:
  divsd  %xmm0,%xmm11
  movapd %xmm12,%xmm6
  movapd %xmm12,%xmm1
  divsd  %xmm0,%xmm4
  mulsd  %xmm11,%xmm1
  divsd  %xmm0,%xmm5
  movapd %xmm2,%xmm0
  mulsd  %xmm11,%xmm2
  mulsd  %xmm4,%xmm0
  mulsd  %xmm5,%xmm6
  mulsd  %xmm8,%xmm5
  mulsd  %xmm4,%xmm8
  subsd  %xmm0,%xmm6
  subsd  %xmm5,%xmm2
  subsd  %xmm1,%xmm8
  movapd %xmm6,%xmm0
  mulsd  %xmm6,%xmm0
  movapd %xmm2,%xmm1
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  movapd %xmm8,%xmm1
  mulsd  %xmm8,%xmm1
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm10
  ja     L74
  sqrtsd %xmm0,%xmm0
L44:
  divsd  %xmm0,%xmm8
  lea    0x60(%rsp),%r14
  lea    0x58(%rsp),%r13
  movsd  %xmm7,0x20(%rsp)
  lea    0x50(%rsp),%r12
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  divsd  %xmm0,%xmm6
  movsd  %xmm8,0x18(%rsp)
  divsd  %xmm0,%xmm2
  movapd %xmm6,%xmm0
  movsd  %xmm6,0x8(%rsp)
  movapd %xmm2,%xmm1
  movapd %xmm8,%xmm2
  movsd  %xmm1,0x10(%rsp)
  call   <Rodrigues@plt>
  movsd  0x60(%rsp),%xmm4
  movsd  0x58(%rsp),%xmm2
  pxor   %xmm10,%xmm10
  movsd  0x10(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm8
  movsd  0x50(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm6
  movapd %xmm4,%xmm3
  movapd %xmm2,%xmm5
  mulsd  %xmm1,%xmm3
  movsd  0x20(%rsp),%xmm7
  mulsd  %xmm8,%xmm5
  mulsd  %xmm6,%xmm4
  mulsd  %xmm0,%xmm8
  mulsd  %xmm6,%xmm2
  mulsd  %xmm1,%xmm0
  subsd  %xmm5,%xmm3
  subsd  %xmm4,%xmm8
  subsd  %xmm0,%xmm2
  movapd %xmm3,%xmm0
  mulsd  %xmm3,%xmm0
  movapd %xmm8,%xmm1
  mulsd  %xmm8,%xmm1
  addsd  %xmm1,%xmm0
  movapd %xmm2,%xmm1
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm10
  ja     L124
  sqrtsd %xmm0,%xmm0
L80:
  divsd  %xmm0,%xmm3
  movapd %xmm8,%xmm1
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  divsd  %xmm0,%xmm1
  movapd %xmm3,%xmm4
  movapd %xmm7,%xmm3
  divsd  %xmm0,%xmm2
  movapd %xmm4,%xmm0
  call   <Rodrigues@plt>
  movsd  0x50(%rsp),%xmm1
  movsd  0x60(%rsp),%xmm6
  pxor   %xmm10,%xmm10
  movsd  0x58(%rsp),%xmm9
  jmp    L127
L26:
  movapd %xmm2,%xmm0
  movsd  %xmm6,0x18(%rsp)
  movsd  %xmm9,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x18(%rsp),%xmm6
  movsd  0x10(%rsp),%xmm9
  movsd  0x8(%rsp),%xmm1
  movapd %xmm0,%xmm2
  jmp    L71
L5:
  movsd  %xmm7,0x48(%rsp)
  movsd  %xmm3,0x40(%rsp)
  movsd  %xmm5,0x38(%rsp)
  movsd  %xmm4,0x30(%rsp)
  movsd  %xmm11,0x28(%rsp)
  movsd  %xmm2,0x20(%rsp)
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm8,0x10(%rsp)
  movsd  %xmm9,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x48(%rsp),%xmm7
  pxor   %xmm10,%xmm10
  movsd  0x40(%rsp),%xmm3
  movsd  0x38(%rsp),%xmm5
  movsd  0x30(%rsp),%xmm4
  movsd  0x28(%rsp),%xmm11
  movsd  0x20(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm8
  movsd  0x8(%rsp),%xmm9
  jmp    L3
L141:
  movapd %xmm9,%xmm0
  movsd  %xmm7,0x40(%rsp)
  movsd  %xmm5,0x30(%rsp)
  movsd  %xmm4,0x28(%rsp)
  movsd  %xmm11,0x20(%rsp)
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm8,0x8(%rsp)
  movsd  %xmm6,0x38(%rsp)
  call   <sqrt@plt>
  movsd  0x40(%rsp),%xmm7
  pxor   %xmm10,%xmm10
  movsd  0x38(%rsp),%xmm3
  movsd  0x30(%rsp),%xmm5
  movsd  0x28(%rsp),%xmm4
  movapd %xmm0,%xmm9
  movsd  0x20(%rsp),%xmm11
  movsd  0x18(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm8
  jmp    L52
L82:
  call   <__stack_chk_fail@plt>
L74:
  movsd  %xmm7,0x28(%rsp)
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm8,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm6,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x28(%rsp),%xmm7
  movsd  0x20(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm8
  movsd  0x10(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm6
  jmp    L44
L124:
  movsd  %xmm7,0x20(%rsp)
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm8,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x20(%rsp),%xmm7
  movsd  0x18(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm8
  movsd  0x8(%rsp),%xmm3
  jmp    L80
```

tool_calls: name: parse_data
arguments: data_label: D34
type_guessed: byte[16]
name: parse_data
arguments: data_label: D44
type_guessed: byte[8]

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

tool: {"D44": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x09,0x40]}

assistant: ```c
void GetAngles(double x, double y, double z, double vx, double vy, double vz, double Lambda, double Phi, double *theta, double *gamma) {
  double r, xstar, ystar, zstar, v, d;
  r = sqrt(x * x + y * y + z * z);
  v = sqrt(vx * vx + vy * vy + vz * vz);
  x /= r;
  y /= r;
  z /= r;
  vx /= v;
  vy /= v;
  vz /= v;
  xstar = -x;
  ystar = -y;
  zstar = -z;
  if ((Lambda != 0) || (Phi != 0)) {
    double vlon, vlonx, vlony, vlonz;
    double vlat, vlatx, vlaty, vlatz;
    vlonx = (y * vz - z * vy);
    vlony = (z * vx - x * vz);
    vlonz = (x * vy - y * vx);
    vlon = sqrt(vlonx * vlonx + vlony * vlony + vlonz * vlonz);
    vlonx /= vlon;
    vlony /= vlon;
    vlonz /= vlon;
    Rodrigues(&xstar, &ystar, &zstar, vlonx, vlony, vlonz, Lambda);
    vlatx = (vlony * zstar - vlonz * ystar);
    vlaty = (vlonz * xstar - vlonx * zstar);
    vlatz = (vlonx * ystar - vlony * xstar);
    vlat = sqrt(vlatx * vlatx + vlaty * vlaty + vlatz * vlatz);
    vlatx /= vlat;
    vlaty /= vlat;
    vlatz /= vlat;
    Rodrigues(&xstar, &ystar, &zstar, vlatx, vlaty, vlatz, Phi);
  }
  d = sqrt(xstar * xstar + ystar * ystar);
  *gamma = atan2(ystar, xstar) + acos(-1.);
  if (zstar <= 0)
    *theta = acos(d);
  else
    *theta = -acos(d);
}
```