user: Translate the below assembly code into C programming language:

```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  D52(%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     L48
  ucomisd %xmm5,%xmm3
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  je     L48
  movsd  D23(%rip),%xmm7
  movsd  %xmm5,0x40(%rsp)
  lea    0x88(%rsp),%r14
  lea    0x80(%rsp),%r15
  movsd  %xmm5,0x18(%rsp)
  movsd  %xmm7,0x38(%rsp)
  movq   D20(%rip),%xmm7
  movaps %xmm7,0x20(%rsp)
L18:
  mulsd  %xmm2,%xmm2
  mulsd  %xmm3,%xmm3
  addsd  %xmm3,%xmm2
  ucomisd %xmm2,%xmm5
  movapd %xmm2,%xmm0
  ja     L28
  sqrtsd %xmm0,%xmm0
L26:
  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  D54(%rip),%xmm2
  comisd %xmm0,%xmm2
  ja     L37
  movsd  0x70(%rsp),%xmm1
L58:
  movapd %xmm1,%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x38(%rsp),%xmm0
  mov    %r13,%rdi
  movsd  0x88(%rsp),%xmm1
  movsd  0x80(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm6
  lea    0xa8(%rsp),%rdx
  lea    0xa0(%rsp),%rsi
  mulsd  %xmm1,%xmm0
  movsd  0x10(%rsp),%xmm7
  mulsd  0x40(%rsp),%xmm1
  movapd %xmm6,%xmm2
  mulsd  %xmm3,%xmm6
  movapd %xmm7,%xmm4
  mulsd  %xmm3,%xmm4
  mulsd  %xmm0,%xmm7
  movsd  %xmm1,0xb8(%rsp)
  mulsd  %xmm0,%xmm2
  movapd %xmm6,%xmm0
  subsd  %xmm7,%xmm0
  addsd  %xmm4,%xmm2
  movsd  %xmm0,0xc0(%rsp)
  movsd  %xmm2,0xb0(%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)
L37:
  movsd  D59(%rip),%xmm0
  mov    $0x1,%ebx
  lea    0x98(%rsp),%r12
  jmp    L61
  nopw   0x0(%rax,%rax,1)
L53:
  test   %eax,%eax
  jle    L9
  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)
L61:
  call   <fabs@plt>
  cmp    $0xb,%ebx
  jne    L53
L9:
  movsd  0x90(%rsp),%xmm1
  jmp    L58
  nopl   (%rax)
L48:
  movq   D20(%rip),%xmm5
  movapd %xmm3,%xmm0
  lea    0x88(%rsp),%r14
  lea    0x80(%rsp),%r15
  movsd  %xmm4,0x78(%rsp)
  movaps %xmm5,0x20(%rsp)
  xorpd  %xmm2,%xmm5
  movapd %xmm5,%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  0x70(%rsp),%xmm2
  pxor   %xmm5,%xmm5
  movsd  0x88(%rsp),%xmm4
  movsd  0x80(%rsp),%xmm0
  xorpd  0x20(%rsp),%xmm0
  movsd  %xmm4,0x40(%rsp)
  movsd  0x78(%rsp),%xmm4
  movsd  %xmm0,0x38(%rsp)
  jmp    L18
L42:
  call   <__stack_chk_fail@plt>
L28:
  movsd  %xmm4,(%rsp)
  call   <sqrt@plt>
  movsd  (%rsp),%xmm4
  jmp    L26
```

tool_calls: name: retrieve_data
arguments: tag: D52
data_type: f64
name: retrieve_data
arguments: tag: D23
data_type: f32[2]
name: retrieve_data
arguments: tag: D20
data_type: f32[2]
name: retrieve_data
arguments: tag: D54
data_type: f64
name: retrieve_data
arguments: tag: D59
data_type: f64

tool: D52: 1

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

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

tool: D54: 0.242535625

tool: D59: 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;
}
```