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

```asm
<_lomb_scargle>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x44(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  movsd  %xmm0,-0x68(%rbp)
  movsd  %xmm1,-0x70(%rbp)
  movsd  %xmm2,-0x78(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x3c(%rbp)
  jmp    L22
L23:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  addl   $0x1,-0x3c(%rbp)
L22:
  mov    -0x3c(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L23
  movsd  -0x38(%rbp),%xmm0
  subsd  -0x78(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  D0(%rip),%xmm0
  subsd  -0x30(%rbp),%xmm0
  subsd  -0x68(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x70(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x10(%rbp),%xmm1
  movsd  -0x38(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  subsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L6
  movsd  -0x30(%rbp),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  movsd  -0x38(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  mulsd  -0x20(%rbp),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  subsd  %xmm0,%xmm1
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  divsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
L6:
  movsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D0
data_type: f32[2]

tool: {"D0": [0.0,1.875]}

assistant: ```c
double _lomb_scargle(int numt, double cn[], double sinx[], double cosx[], double st, double ct, double cst) {
  double cs = 0., s2 = 0., c2 = 0., sh = 0., ch = 0., px = 0., detm;
  int i;
  for (i = 0; i < numt; i++) {
    cs += cosx[i] * sinx[i];
    c2 += cosx[i] * cosx[i];
    sh += sinx[i] * cn[i];
    ch += cosx[i] * cn[i];
  }
  cs -= cst;
  s2 = 1 - c2 - st;
  c2 -= ct;
  detm = c2 * s2 - cs * cs;
  if (detm > 0)
    px = (c2 * sh * sh - 2. * cs * ch * sh + s2 * ch * ch) / detm;
  return px;
}
```