user: 请从给定的汇编指令推导出C源代码：

```asm
<cffti1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %edi,0x60(%rsp)
  mov    %rsi,%r15
  mov    %rdx,0x58(%rsp)
  mov    $0x1,%r8d
  mov    $0x0,%ebp
  lea    D15(%rip),%r9
  mov    %rdx,%r12
  jmp    L46
L167:
  add    $0x2,%ecx
  jmp    L162
L170:
  add    $0x1,%r8
  mov    %esi,%edi
L46:
  cmp    $0x4,%r8d
  jg     L167
  mov    (%r9,%r8,4),%ecx
L162:
  movslq %ebp,%rax
  lea    (%r12,%rax,4),%r11
  jmp    L178
L135:
  movl   $0x2,0x8(%r12)
L177:
  add    $0x4,%r11
  cmp    $0x1,%ebx
  je     L111
  mov    %r10d,%ebp
L178:
  mov    %edi,%esi
  mov    %edi,%eax
  cltd
  idiv   %ecx
  mov    %eax,%ebx
  mov    %eax,%edi
  mov    %esi,%eax
  cltd
  idiv   %ecx
  test   %edx,%edx
  jne    L170
  lea    0x1(%rbp),%r10d
  mov    %ecx,0x8(%r11)
  cmp    $0x2,%ecx
  jne    L177
  cmp    $0x1,%r10d
  je     L177
  jle    L135
  movslq %r10d,%rax
  lea    (%r12,%rax,4),%rax
  lea    -0x1(%rbp),%esi
  shl    $0x2,%rsi
  mov    %r11,%r13
  sub    %rsi,%r13
L63:
  mov    (%rax),%esi
  mov    %esi,0x4(%rax)
  sub    $0x4,%rax
  cmp    %r13,%rax
  jne    L63
  jmp    L135
L111:
  mov    %ebp,0x64(%rsp)
  mov    %edi,0x68(%rsp)
  mov    %edx,0x6c(%rsp)
  mov    0x58(%rsp),%rax
  mov    0x60(%rsp),%ecx
  mov    %ecx,(%rax)
  mov    %r10d,0x4(%rax)
  pxor   %xmm0,%xmm0
  cvtsi2sd %ecx,%xmm0
  movsd  D36(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x30(%rsp)
  test   %r10d,%r10d
  jle    L58
  mov    %edi,0x54(%rsp)
  mov    %edi,%r14d
  movq   $0x0,0x48(%rsp)
  lea    0x10(%r15),%rax
  mov    %rax,0x40(%rsp)
  jmp    L123
L138:
  addl   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  je     L193
L148:
  movslq %r14d,%rax
  lea    0x0(,%rax,8),%r13
  lea    -0x8(%r15,%r13,1),%rdx
  mov    %rdx,0x20(%rsp)
  movsd  D2(%rip),%xmm3
  movsd  %xmm3,(%rdx)
  add    %r15,%r13
  movq   $0x0,0x0(%r13)
  mov    0x2c(%rsp),%edx
  add    %edx,0x14(%rsp)
  mov    0x14(%rsp),%ecx
  pxor   %xmm0,%xmm0
  cvtsi2sd %ecx,%xmm0
  mulsd  0x30(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  cmpl   $0x3,0x28(%rsp)
  jle    L134
  mov    %r13,%rbx
  add    0x38(%rsp),%rax
  mov    0x40(%rsp),%rcx
  lea    (%rcx,%rax,8),%rbp
  pxor   %xmm5,%xmm5
  movsd  %xmm5,(%rsp)
L78:
  movsd  (%rsp),%xmm2
  addsd  D2(%rip),%xmm2
  movsd  %xmm2,(%rsp)
  lea    0x70(%rsp),%rsi
  movsd  0x8(%rsp),%xmm0
  mulsd  %xmm2,%xmm0
  mov    %r12,%rdi
  call   <sincos@plt>
  movsd  0x78(%rsp),%xmm0
  movsd  0x70(%rsp),%xmm1
  movsd  %xmm1,0x8(%rbx)
  movsd  %xmm0,0x10(%rbx)
  add    $0x10,%rbx
  cmp    %rbp,%rbx
  jne    L78
  mov    0x50(%rsp),%eax
  lea    0x2(%rax,%r14,1),%r14d
L134:
  cmpl   $0x5,0x1c(%rsp)
  jle    L138
  movslq %r14d,%rax
  movsd  -0x8(%r15,%rax,8),%xmm0
  mov    0x20(%rsp),%rdx
  movsd  %xmm0,(%rdx)
  movsd  (%r15,%rax,8),%xmm0
  movsd  %xmm0,0x0(%r13)
  jmp    L138
L193:
  addq   $0x1,0x48(%rsp)
  mov    0x48(%rsp),%rax
  cmp    %eax,0x64(%rsp)
  jl     L58
L123:
  mov    0x58(%rsp),%rax
  mov    0x48(%rsp),%rcx
  mov    0x8(%rax,%rcx,4),%edi
  mov    %edi,0x1c(%rsp)
  mov    0x54(%rsp),%eax
  mov    %eax,0x2c(%rsp)
  imul   %edi,%eax
  mov    %eax,%ecx
  mov    %eax,0x54(%rsp)
  mov    0x60(%rsp),%eax
  cltd
  idiv   %ecx
  lea    0x2(%rax,%rax,1),%eax
  mov    %eax,0x28(%rsp)
  cmp    $0x1,%edi
  jle    L193
  lea    -0x4(%rax),%edx
  mov    %edx,%eax
  shr    %eax
  mov    %eax,%eax
  add    %rax,%rax
  mov    %rax,0x38(%rsp)
  and    $0xfffffffe,%edx
  mov    %edx,0x50(%rsp)
  mov    0x6c(%rsp),%eax
  mov    %eax,0x14(%rsp)
  mov    0x68(%rsp),%eax
  mov    %eax,0x18(%rsp)
  lea    0x78(%rsp),%r12
  jmp    L148
L58:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: label: D15
type_infered: string
name: unpack_data
arguments: label: D36
type_infered: f64
name: unpack_data
arguments: label: D2
type_infered: byte[8]

tool: 

tool: D36: 6.28318530717959

tool: {"D2": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

assistant: ```c
void cffti1(int n, double wa[], int ifac[]) {
  static const int ntryh[4] = {3, 4, 2, 5};
  static const double twopi = 6.28318530717959;
  double argh;
  int idot, ntry, i, j;
  double argld;
  int i1, k1, l1, l2, ib;
  double fi;
  int ld, ii, nf, ip, nl, nq, nr;
  double arg;
  int ido, ipm;
  nl = n;
  nf = 0;
  j = 0;
startloop:
  j++;
  if (j <= 4)
    ntry = ntryh[j - 1];
  else
    ntry += 2;
  do {
    nq = nl / ntry;
    nr = nl - ntry * nq;
    if (nr != 0)
      goto startloop;
    nf++;
    ifac[nf + 1] = ntry;
    nl = nq;
    if (ntry == 2 && nf != 1) {
      for (i = 2; i <= nf; i++) {
        ib = nf - i + 2;
        ifac[ib + 1] = ifac[ib];
      }
      ifac[2] = 2;
    }
  } while (nl != 1);
  ifac[0] = n;
  ifac[1] = nf;
  argh = twopi / (double)n;
  i = 1;
  l1 = 1;
  for (k1 = 1; k1 <= nf; k1++) {
    ip = ifac[k1 + 1];
    ld = 0;
    l2 = l1 * ip;
    ido = n / l2;
    idot = ido + ido + 2;
    ipm = ip - 1;
    for (j = 1; j <= ipm; j++) {
      i1 = i;
      wa[i - 1] = 1;
      wa[i] = 0;
      ld += l1;
      fi = 0;
      argld = ld * argh;
      for (ii = 4; ii <= idot; ii += 2) {
        i += 2;
        fi += 1;
        arg = fi * argld;
        wa[i - 1] = cos(arg);
        wa[i] = sin(arg);
      }
      if (ip > 5) {
        wa[i1 - 1] = wa[i - 1];
        wa[i1] = wa[i];
      }
    }
    l1 = l2;
  }
}
```