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

```asm
<rffti1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %edi,%r15d
  mov    %edi,0x4c(%rsp)
  mov    %rsi,%r14
  mov    %rdx,%rbx
  lea    D19(%rip),%rdx
  mov    %rbx,%rsi
  call   <factorize@plt>
  mov    0x4(%rbx),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %r15d,%xmm0
  movsd  D23(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x20(%rsp)
  cmp    $0x1,%eax
  jle    L9
  lea    0x8(%rbx),%rdx
  mov    %rdx,0x30(%rsp)
  lea    -0x2(%rax),%eax
  lea    0xc(%rbx,%rax,4),%rax
  mov    %rax,0x40(%rsp)
  movl   $0x0,0x3c(%rsp)
  movl   $0x1,0x48(%rsp)
L29:
  mov    0x30(%rsp),%rax
  mov    (%rax),%esi
  mov    %esi,0x10(%rsp)
  mov    0x48(%rsp),%eax
  mov    %eax,0x38(%rsp)
  imul   %esi,%eax
  mov    %eax,%ecx
  mov    %eax,0x48(%rsp)
  mov    0x4c(%rsp),%eax
  cltd
  idiv   %ecx
  mov    %eax,0x14(%rsp)
  cmp    $0x1,%esi
  jle    L2
  movslq %eax,%rdx
  mov    %rdx,0x18(%rsp)
  movslq 0x3c(%rsp),%r12
  sub    $0x3,%eax
  shr    %eax
  mov    %eax,%eax
  add    %rax,%rax
  mov    %rax,0x28(%rsp)
  mov    $0x0,%r15d
  mov    $0x1,%r13d
L47:
  add    0x38(%rsp),%r15d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r15d,%xmm0
  mulsd  0x20(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  cmpl   $0x2,0x14(%rsp)
  jle    L39
  lea    (%r14,%r12,8),%rbx
  mov    0x28(%rsp),%rax
  add    %r12,%rax
  lea    0x10(%r14,%rax,8),%rbp
  pxor   %xmm4,%xmm4
  movsd  %xmm4,(%rsp)
L23:
  movsd  (%rsp),%xmm2
  addsd  D22(%rip),%xmm2
  movsd  %xmm2,(%rsp)
  lea    0x58(%rsp),%rdi
  lea    0x50(%rsp),%rsi
  movsd  0x8(%rsp),%xmm0
  mulsd  %xmm2,%xmm0
  call   <sincos@plt>
  movsd  0x50(%rsp),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x58(%rsp),%xmm0
  movsd  %xmm0,0x8(%rbx)
  add    $0x10,%rbx
  cmp    %rbp,%rbx
  jne    L23
L39:
  add    $0x1,%r13d
  add    0x18(%rsp),%r12
  cmp    %r13d,0x10(%rsp)
  jne    L47
  mov    0x3c(%rsp),%edx
  mov    0x14(%rsp),%ecx
  add    %ecx,%edx
  mov    0x10(%rsp),%eax
  sub    $0x2,%eax
  imul   %ecx,%eax
  add    %edx,%eax
  mov    %eax,0x3c(%rsp)
L2:
  addq   $0x4,0x30(%rsp)
  mov    0x30(%rsp),%rax
  cmp    0x40(%rsp),%rax
  jne    L29
L9:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: label: D19
type: string
name: read_data
arguments: label: D23
type: f64
name: read_data
arguments: label: D22
type: byte[8]

tool: D19: 

tool: D23: 6.28318530717959

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

assistant: ```c
void rffti1(int n, double wa[], int ifac[13 + 2]) {
  static const double twopi = 6.28318530717959;
  double arg, argh, argld, fi;
  int i, j;
  int k1, l1, l2;
  int ld, ii, nf, ip, is;
  int ido, ipm, nfm1;
  static const int ntryh[4] = {4, 2, 3, 5};
  factorize(n, ifac, ntryh);
  nf = ifac[1];
  argh = twopi / n;
  is = 0;
  nfm1 = nf - 1;
  l1 = 1;
  if (nfm1 == 0)
    return;
  for (k1 = 1; k1 <= nfm1; k1++) {
    ip = ifac[k1 + 1];
    ld = 0;
    l2 = l1 * ip;
    ido = n / l2;
    ipm = ip - 1;
    for (j = 1; j <= ipm; ++j) {
      ld += l1;
      i = is;
      argld = (double)ld * argh;
      fi = 0;
      for (ii = 3; ii <= ido; ii += 2) {
        i += 2;
        fi += 1;
        arg = fi * argld;
        wa[i - 2] = cos(arg);
        wa[i - 1] = sin(arg);
      }
      is += ido;
    }
    l1 = l2;
  }
}
```