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

```asm
<palAopqk>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0xd8,%rsp
  movsd  0x68(%rdi),%xmm6
  movsd  0x8(%rdi),%xmm7
  mov    %rdx,0x50(%rsp)
  movsd  0x10(%rdi),%xmm5
  lea    0xb0(%rsp),%r13
  mov    %rsi,0x48(%rsp)
  subsd  %xmm6,%xmm0
  mov    %r13,%rdi
  mov    %rcx,0x58(%rsp)
  mov    %r8,0x60(%rsp)
  mov    %r9,0x68(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  movsd  %xmm7,0x8(%rsp)
  movsd  %xmm5,0x10(%rsp)
  movsd  %xmm6,0x30(%rsp)
  call   <palDcs2c@plt>
  movsd  0x18(%rbp),%xmm2
  mov    $0x0,%edx
  movsd  0xb8(%rsp),%xmm3
  movsd  D38(%rip),%xmm0
  movsd  0x10(%rsp),%xmm5
  movapd %xmm3,%xmm1
  addsd  %xmm2,%xmm3
  movsd  0x8(%rsp),%xmm7
  mulsd  %xmm2,%xmm1
  movapd %xmm5,%xmm4
  movapd %xmm7,%xmm2
  subsd  %xmm1,%xmm0
  movsd  0xb0(%rsp),%xmm1
  mulsd  %xmm0,%xmm3
  mulsd  %xmm0,%xmm1
  mulsd  0xc0(%rsp),%xmm0
  mulsd  %xmm1,%xmm2
  mulsd  %xmm0,%xmm4
  mulsd  %xmm5,%xmm1
  pxor   %xmm5,%xmm5
  mulsd  %xmm7,%xmm0
  subsd  %xmm4,%xmm2
  movapd %xmm1,%xmm4
  addsd  %xmm0,%xmm4
  ucomisd %xmm5,%xmm2
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  je     L50
  ucomisd %xmm5,%xmm3
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  je     L50
  movsd  D4(%rip),%xmm7
  movsd  %xmm5,0x40(%rsp)
  lea    0x88(%rsp),%r14
  lea    0x80(%rsp),%r15
  movsd  %xmm5,0x18(%rsp)
  movsd  %xmm7,0x38(%rsp)
  movq   D27(%rip),%xmm7
  movaps %xmm7,0x20(%rsp)
L65:
  mulsd  %xmm2,%xmm2
  mulsd  %xmm3,%xmm3
  addsd  %xmm3,%xmm2
  ucomisd %xmm2,%xmm5
  movapd %xmm2,%xmm0
  ja     L13
  sqrtsd %xmm0,%xmm0
L28:
  movapd %xmm4,%xmm1
  call   <atan2@plt>
  movsd  0x58(%rbp),%xmm2
  movsd  0x50(%rbp),%xmm1
  lea    0x90(%rsp),%rdi
  movsd  %xmm0,(%rsp)
  call   <palRefz@plt>
  movsd  0x90(%rsp),%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x70(%rsp)
  call   <cos@plt>
  movsd  D39(%rip),%xmm2
  comisd %xmm0,%xmm2
  ja     L99
  movsd  0x70(%rsp),%xmm1
L77:
  movapd %xmm1,%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x38(%rsp),%xmm1
  mov    %r13,%rdi
  movsd  0x88(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm7
  movsd  0x8(%rsp),%xmm6
  lea    0xa8(%rsp),%rdx
  lea    0xa0(%rsp),%rsi
  movsd  0x80(%rsp),%xmm3
  mulsd  %xmm2,%xmm1
  mulsd  0x40(%rsp),%xmm2
  movapd %xmm7,%xmm4
  movapd %xmm6,%xmm0
  mulsd  %xmm3,%xmm4
  mulsd  %xmm3,%xmm6
  mulsd  %xmm1,%xmm0
  mulsd  %xmm7,%xmm1
  addsd  %xmm4,%xmm0
  unpcklpd %xmm2,%xmm0
  movaps %xmm0,0xb0(%rsp)
  movapd %xmm6,%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0xc0(%rsp)
  call   <palDcc2s@plt>
  movsd  0x30(%rsp),%xmm0
  addsd  0xa0(%rsp),%xmm0
  call   <palDranrm@plt>
  mov    0x48(%rsp),%rax
  movsd  0x18(%rsp),%xmm7
  movapd %xmm0,%xmm1
  movsd  0x90(%rsp),%xmm0
  movsd  %xmm7,(%rax)
  mov    0x50(%rsp),%rax
  movsd  %xmm0,(%rax)
  mov    0x58(%rsp),%rax
  movsd  0xa0(%rsp),%xmm0
  xorpd  0x20(%rsp),%xmm0
  movsd  %xmm0,(%rax)
  mov    0x60(%rsp),%rax
  movsd  0xa8(%rsp),%xmm0
  movsd  %xmm0,(%rax)
  mov    0x68(%rsp),%rax
  movsd  %xmm1,(%rax)
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L42
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L99:
  movsd  D7(%rip),%xmm0
  mov    $0x1,%ebx
  lea    0x98(%rsp),%r12
  jmp    L88
  nop
L15:
  test   %eax,%eax
  jle    L18
  movsd  0x20(%rbp),%xmm1
  movsd  0x48(%rbp),%xmm7
  mov    %r12,%rsi
  xor    %edi,%edi
  movsd  0x0(%rbp),%xmm6
  movsd  0x40(%rbp),%xmm5
  add    $0x1,%ebx
  movsd  0x90(%rsp),%xmm0
  movsd  0x38(%rbp),%xmm4
  movsd  0x30(%rbp),%xmm3
  movsd  0x28(%rbp),%xmm2
  call   <palRefro@plt>
  movsd  0x90(%rsp),%xmm1
  movsd  0x98(%rsp),%xmm0
  addsd  %xmm1,%xmm0
  subsd  (%rsp),%xmm0
  subsd  %xmm0,%xmm1
  movsd  %xmm1,0x90(%rsp)
L88:
  call   <fabs@plt>
  cmp    $0xb,%ebx
  jne    L15
L18:
  movsd  0x90(%rsp),%xmm1
  jmp    L77
  nopl   (%rax)
L50:
  movq   D27(%rip),%xmm7
  movapd %xmm3,%xmm0
  lea    0x88(%rsp),%r14
  lea    0x80(%rsp),%r15
  movsd  %xmm4,0x78(%rsp)
  movaps %xmm7,0x20(%rsp)
  xorpd  %xmm2,%xmm7
  movapd %xmm7,%xmm1
  movsd  %xmm2,0x70(%rsp)
  movsd  %xmm3,(%rsp)
  call   <atan2@plt>
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  %xmm0,0x18(%rsp)
  call   <sincos@plt>
  movsd  (%rsp),%xmm3
  movsd  0x88(%rsp),%xmm5
  movsd  0x80(%rsp),%xmm0
  xorpd  0x20(%rsp),%xmm0
  movsd  %xmm5,0x40(%rsp)
  movsd  0x70(%rsp),%xmm2
  movsd  0x78(%rsp),%xmm4
  pxor   %xmm5,%xmm5
  movsd  %xmm0,0x38(%rsp)
  jmp    L65
L42:
  call   <__stack_chk_fail@plt>
L13:
  movsd  %xmm4,(%rsp)
  call   <sqrt@plt>
  movsd  (%rsp),%xmm4
  jmp    L28
```

tool_calls: name: retrieve_data
arguments: tag: D38
data_type: f64
name: retrieve_data
arguments: tag: D4
data_type: f32[2]
name: retrieve_data
arguments: tag: D27
data_type: f32[2]
name: retrieve_data
arguments: tag: D39
data_type: f64
name: retrieve_data
arguments: tag: D7
data_type: f64

tool: D38: 1

tool: {"D4": [0.0,-1.875]}

tool: {"D27": [0.0,-0.0]}

tool: D39: 0.242535625

tool: D7: 10

assistant: ```c
void palAopqk(double rap, double dap, const double aoprms[14], double *aob, double *zob, double *hob, double *dob, double *rob) {
  const double zbreak = 0.242535625;
  int i;
  double sphi, cphi, st, v[3], xhd, yhd, zhd, diurab, f, xhdt, yhdt, zhdt, xaet, yaet, zaet, azobs, zdt, refa, refb, zdobs, dzd, dref, ce, xaeo, yaeo, zaeo, hmobs, dcobs, raobs;
  sphi = aoprms[1];
  cphi = aoprms[2];
  st = aoprms[13];
  palDcs2c(rap - st, dap, v);
  xhd = v[0];
  yhd = v[1];
  zhd = v[2];
  diurab = aoprms[3];
  f = (1.0 - diurab * yhd);
  xhdt = f * xhd;
  yhdt = f * (yhd + diurab);
  zhdt = f * zhd;
  xaet = sphi * xhdt - cphi * zhdt;
  yaet = yhdt;
  zaet = cphi * xhdt + sphi * zhdt;
  if (xaet == 0.0 && yaet == 0.0) {
    azobs = 0.0;
  } else {
    azobs = atan2(yaet, -xaet);
  }
  zdt = atan2(sqrt(xaet * xaet + yaet * yaet), zaet);
  refa = aoprms[10];
  refb = aoprms[11];
  palRefz(zdt, refa, refb, &zdobs);
  if (cos(zdobs) < zbreak) {
    i = 1;
    dzd = 1.0e1;
    while (fabs(dzd) > 1e-10 && i <= 10) {
      palRefro(zdobs, aoprms[4], aoprms[5], aoprms[6], aoprms[7], aoprms[8], aoprms[0], aoprms[9], 1e-8, &dref);
      dzd = zdobs + dref - zdt;
      zdobs = zdobs - dzd;
      i++;
    }
  }
  ce = sin(zdobs);
  xaeo = -cos(azobs) * ce;
  yaeo = sin(azobs) * ce;
  zaeo = cos(zdobs);
  v[0] = sphi * xaeo + cphi * zaeo;
  v[1] = yaeo;
  v[2] = -cphi * xaeo + sphi * zaeo;
  palDcc2s(v, &hmobs, &dcobs);
  raobs = palDranrm(st + hmobs);
  *aob = azobs;
  *zob = zdobs;
  *hob = -hmobs;
  *dob = dcobs;
  *rob = raobs;
}
```