user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<do_ftuneven_complexinput>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xb8,%rsp
  mov    %edi,0x5c(%rsp)
  mov    %rsi,0x68(%rsp)
  mov    %rdx,0x70(%rsp)
  movsd  %xmm0,0x38(%rsp)
  movsd  %xmm1,0x88(%rsp)
  test   %r8d,%r8d
  jle    L20
  mov    0x100(%rsp),%rax
  mov    %r9,0x48(%rsp)
  mov    %rcx,%r13
  mov    0xf8(%rsp),%rbp
  mov    0xf0(%rsp),%rbx
  mov    %rax,0x50(%rsp)
  lea    -0x1(%r8),%eax
  lea    0x8(%r9,%rax,8),%rax
  mov    %rax,0x60(%rsp)
  lea    -0x1(%rdi),%eax
  mov    %rax,0x40(%rsp)
  shl    $0x3,%rax
  mov    %rax,0x98(%rsp)
  lea    0x8(%rsi,%rax,1),%rax
  mov    %rax,0x90(%rsp)
  nop
L139:
  mov    0x48(%rsp),%rax
  pxor   %xmm3,%xmm3
  movsd  (%rax),%xmm5
  ucomisd %xmm3,%xmm5
  movsd  %xmm5,0x28(%rsp)
  jp     L166
  je     L168
L166:
  mov    0x5c(%rsp),%edx
  test   %edx,%edx
  jle    L194
  movsd  0x28(%rsp),%xmm5
  mov    0x68(%rsp),%r15
  pxor   %xmm2,%xmm2
  mov    %rbx,0x20(%rsp)
  movapd %xmm2,%xmm1
  lea    0xa8(%rsp),%r12
  lea    0xa0(%rsp),%r14
  movapd %xmm5,%xmm3
  mov    %r15,%rbx
  mov    0x90(%rsp),%r15
  addsd  %xmm5,%xmm3
  movsd  %xmm3,0x18(%rsp)
  nopl   0x0(%rax)
L68:
  movsd  0x18(%rsp),%xmm0
  mulsd  (%rbx),%xmm0
  mov    %r14,%rsi
  mov    %r12,%rdi
  add    $0x8,%rbx
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <sincos@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  addsd  0xa0(%rsp),%xmm1
  addsd  0xa8(%rsp),%xmm2
  cmp    %rbx,%r15
  jne    L68
  movapd %xmm2,%xmm0
  mov    0x20(%rsp),%rbx
  xor    %r15d,%r15d
  call   <atan2@plt>
  mulsd  D10(%rip),%xmm0
  pxor   %xmm7,%xmm7
  mov    %rbp,0x80(%rsp)
  mov    %rbx,0x78(%rsp)
  mov    %r13,%rbp
  mov    0x70(%rsp),%rbx
  mov    %r15,%r13
  mov    0x68(%rsp),%r15
  movapd %xmm7,%xmm8
  movapd %xmm7,%xmm6
  movapd %xmm7,%xmm5
  movsd  %xmm0,0x30(%rsp)
  nopl   (%rax)
L5:
  movsd  0x28(%rsp),%xmm0
  mulsd  (%r15,%r13,8),%xmm0
  mov    %r14,%rsi
  mov    %r12,%rdi
  subsd  0x30(%rsp),%xmm0
  movsd  %xmm7,0x20(%rsp)
  movsd  %xmm8,0x18(%rsp)
  movsd  %xmm6,0x10(%rsp)
  movsd  %xmm5,0x8(%rsp)
  call   <sincos@plt>
  movsd  0x38(%rsp),%xmm7
  mov    %r13,%rcx
  movsd  (%rbx,%r13,8),%xmm0
  movsd  0x0(%rbp,%r13,8),%xmm3
  movsd  0x8(%rsp),%xmm5
  add    $0x1,%r13
  movapd %xmm7,%xmm9
  movapd %xmm0,%xmm4
  movsd  0xa0(%rsp),%xmm2
  movsd  0xa8(%rsp),%xmm1
  mulsd  %xmm3,%xmm9
  movsd  0x10(%rsp),%xmm6
  movsd  0x18(%rsp),%xmm8
  mulsd  %xmm7,%xmm0
  movsd  0x20(%rsp),%xmm7
  mulsd  %xmm2,%xmm4
  mulsd  %xmm2,%xmm3
  mulsd  %xmm2,%xmm2
  mulsd  %xmm1,%xmm9
  mulsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm1
  addsd  %xmm2,%xmm8
  subsd  %xmm9,%xmm4
  addsd  %xmm3,%xmm0
  addsd  %xmm1,%xmm7
  addsd  %xmm4,%xmm5
  addsd  %xmm0,%xmm6
  cmp    %rcx,0x40(%rsp)
  jne    L5
  movsd  0x38(%rsp),%xmm3
  pxor   %xmm4,%xmm4
  mov    %rbp,%r13
  mov    0x78(%rsp),%rbx
  mov    D16(%rip),%rax
  mov    0x80(%rsp),%rbp
  comisd %xmm4,%xmm3
  movq   %rax,%xmm1
  jbe    L24
  divsd  %xmm1,%xmm5
  divsd  %xmm1,%xmm6
L24:
  pxor   %xmm3,%xmm3
  ucomisd %xmm8,%xmm3
  ja     L161
L13:
  movapd %xmm8,%xmm0
  sqrtsd %xmm0,%xmm0
L12:
  mulsd  %xmm1,%xmm0
  pxor   %xmm4,%xmm4
  movapd %xmm5,%xmm3
  ucomisd %xmm7,%xmm4
  divsd  %xmm0,%xmm3
  ja     L129
  movapd %xmm7,%xmm0
  sqrtsd %xmm0,%xmm0
L45:
  mulsd  %xmm1,%xmm0
  movapd %xmm6,%xmm4
  mov    %r14,%rsi
  mov    %r12,%rdi
  movsd  0x28(%rsp),%xmm1
  movsd  %xmm8,0x78(%rsp)
  mulsd  0x88(%rsp),%xmm1
  movsd  %xmm7,0x80(%rsp)
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm5,0x18(%rsp)
  movsd  %xmm6,0x10(%rsp)
  divsd  %xmm0,%xmm4
  movsd  0x30(%rsp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm4,0x8(%rsp)
  call   <sincos@plt>
  movsd  0x18(%rsp),%xmm5
  mov    0x50(%rsp),%rax
  movsd  0x10(%rsp),%xmm6
  movsd  0x78(%rsp),%xmm8
  mulsd  %xmm5,%xmm5
  movsd  0x20(%rsp),%xmm3
  movsd  0x80(%rsp),%xmm7
  mulsd  %xmm6,%xmm6
  movsd  0x8(%rsp),%xmm4
  movsd  0xa0(%rsp),%xmm0
  movsd  0xa8(%rsp),%xmm1
  movapd %xmm0,%xmm2
  mulsd  %xmm3,%xmm2
  movapd %xmm1,%xmm9
  divsd  %xmm8,%xmm5
  mulsd  %xmm4,%xmm9
  mulsd  %xmm4,%xmm0
  mulsd  %xmm3,%xmm1
  subsd  %xmm9,%xmm2
  addsd  %xmm1,%xmm0
  movsd  %xmm2,(%rbx)
  movsd  %xmm0,0x0(%rbp)
  divsd  %xmm7,%xmm6
  addsd  %xmm6,%xmm5
  movsd  %xmm5,(%rax)
L33:
  addq   $0x8,0x48(%rsp)
  add    $0x8,%rbp
  mov    0x48(%rsp),%rax
  add    $0x8,%rbx
  addq   $0x8,0x50(%rsp)
  cmp    %rax,0x60(%rsp)
  jne    L139
L20:
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L168:
  mov    0x5c(%rsp),%eax
  movq   $0x0,(%rbx)
  test   %eax,%eax
  jle    L128
  mov    0x98(%rsp),%rdx
  mov    0x70(%rsp),%rcx
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  jmp    L163
L155:
  movsd  (%rbx),%xmm0
  add    $0x8,%rax
L163:
  addsd  (%rcx,%rax,1),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x0(%rbp),%xmm0
  addsd  0x0(%r13,%rax,1),%xmm0
  movsd  %xmm0,0x0(%rbp)
  cmp    %rax,%rdx
  jne    L155
  movsd  (%rbx),%xmm1
L122:
  pxor   %xmm2,%xmm2
  pxor   %xmm6,%xmm6
  cvtsi2sdl 0x5c(%rsp),%xmm2
  ucomisd %xmm2,%xmm6
  ja     L26
  sqrtsd %xmm2,%xmm2
  divsd  %xmm2,%xmm1
  movsd  %xmm1,(%rbx)
  movsd  0x0(%rbp),%xmm1
L67:
  divsd  %xmm2,%xmm1
  mov    0x50(%rsp),%rax
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x0(%rbp)
  movsd  (%rbx),%xmm1
  mulsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
  jmp    L33
  nop
L194:
  mov    D16(%rip),%rax
  pxor   %xmm7,%xmm7
  lea    0xa8(%rsp),%r12
  lea    0xa0(%rsp),%r14
  movapd %xmm7,%xmm8
  movsd  %xmm7,0x30(%rsp)
  movapd %xmm7,%xmm6
  movapd %xmm7,%xmm5
  movq   %rax,%xmm1
  jmp    L13
  nopl   0x0(%rax,%rax,1)
L128:
  pxor   %xmm1,%xmm1
  jmp    L122
L26:
  movapd %xmm2,%xmm0
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm2,0x10(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  divsd  %xmm0,%xmm1
  movapd %xmm2,%xmm0
  movsd  %xmm1,(%rbx)
  movsd  0x0(%rbp),%xmm1
  movsd  %xmm1,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm1
  movapd %xmm0,%xmm2
  jmp    L67
L129:
  movapd %xmm7,%xmm0
  movsd  %xmm8,0x78(%rsp)
  movsd  %xmm1,0x80(%rsp)
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm6,0x18(%rsp)
  movsd  %xmm5,0x10(%rsp)
  movsd  %xmm7,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x78(%rsp),%xmm8
  movsd  0x80(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm6
  movsd  0x10(%rsp),%xmm5
  movsd  0x8(%rsp),%xmm7
  jmp    L45
L161:
  movapd %xmm8,%xmm0
  movsd  %xmm1,0x78(%rsp)
  movsd  %xmm7,0x20(%rsp)
  movsd  %xmm6,0x18(%rsp)
  movsd  %xmm5,0x10(%rsp)
  movsd  %xmm8,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x78(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm7
  movsd  0x18(%rsp),%xmm6
  movsd  0x10(%rsp),%xmm5
  movsd  0x8(%rsp),%xmm8
  jmp    L12
```

tool_calls: name: read_data
arguments: tag: D10
type_infered: f64
name: read_data
arguments: tag: D16
type_infered: byte[8]

tool: D10: 0.5

tool: {"D16": [0xcd,0x3b,0x7f,0x66,0x9e,0xa0,0xf6,0x3f]}

assistant: ```c
void do_ftuneven_complexinput(int NJD, double *t, double *input_real, double *input_imag, double ft_sign, double tt_zero, int Nfreq, double *freqvals, double *FT_real, double *FT_imag, double *FT_periodogram) {
  int ii_ww, ii_t;
  double magmean;
  double wrun, csum, ssum, wtau, sumr, sumi, scos2, ssin2, cval, sval;
  double ft_real, ft_imag, phi_this;
  for (ii_ww = 0; ii_ww < Nfreq; ii_ww++) {
    wrun = freqvals[ii_ww];
    if (wrun == 0.0) {
      FT_real[ii_ww] = 0.0;
      for (ii_t = 0; ii_t < NJD; ii_t++) {
        FT_real[ii_ww] += input_real[ii_t];
        FT_imag[ii_ww] += input_imag[ii_t];
      }
      FT_real[ii_ww] = FT_real[ii_ww] / sqrt(NJD);
      FT_imag[ii_ww] = FT_imag[ii_ww] / sqrt(NJD);
      FT_periodogram[ii_ww] = FT_real[ii_ww] * FT_real[ii_ww] + FT_imag[ii_ww] * FT_imag[ii_ww];
    } else {
      csum = 0.0;
      ssum = 0.0;
      for (ii_t = 0; ii_t < NJD; ii_t++) {
        csum += cos(2.0 * wrun * t[ii_t]);
        ssum += sin(2.0 * wrun * t[ii_t]);
      }
      wtau = 0.5 * atan2(ssum, csum);
      sumr = 0.0;
      sumi = 0.0;
      scos2 = 0.0;
      ssin2 = 0.0;
      for (ii_t = 0; ii_t < NJD; ii_t++) {
        cval = cos(wrun * t[ii_t] - wtau);
        sval = sin(wrun * t[ii_t] - wtau);
        sumr += input_real[ii_t] * cval - ft_sign * input_imag[ii_t] * sval;
        sumi += ft_sign * input_real[ii_t] * sval + input_imag[ii_t] * cval;
        scos2 += cval * cval;
        ssin2 += sval * sval;
      }
      if (ft_sign > 0) {
        sumr = sumr / sqrt(2.0);
        sumi = sumi / sqrt(2.0);
      }
      ft_real = sumr / (sqrt(2.0) * sqrt(scos2));
      ft_imag = sumi / (sqrt(2.0) * sqrt(ssin2));
      phi_this = wtau - wrun * tt_zero;
      FT_real[ii_ww] = ft_real * cos(phi_this) - ft_imag * sin(phi_this);
      FT_imag[ii_ww] = ft_imag * cos(phi_this) + ft_real * sin(phi_this);
      FT_periodogram[ii_ww] = (sumr * sumr / scos2) + (sumi * sumi / ssin2);
    }
  }
}
```