user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<cfftf1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,0xc(%rsp)
  mov    %rcx,0x30(%rsp)
  mov    %r8,0x18(%rsp)
  mov    %r9d,0x14(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  mov    0x4(%r8),%eax
  mov    %eax,0x10(%rsp)
  test   %eax,%eax
  jle    L3
  mov    0x18(%rsp),%rax
  mov    %rdx,%r10
  mov    %rsi,%r15
  xor    %r11d,%r11d
  lea    0x44(%rsp),%rcx
  mov    %r15,0x20(%rsp)
  xor    %r13d,%r13d
  mov    %r11d,%r15d
  mov    0x8(%rax),%ebx
  mov    0xc(%rsp),%eax
  mov    %r10,0x28(%rsp)
  mov    %r10,%r11
  mov    %rcx,0x38(%rsp)
  mov    0x30(%rsp),%r10
  mov    $0x2,%r12d
  cltd
  mov    %ebx,%r14d
  idiv   %ebx
  mov    %rsi,%rdx
  mov    $0x1,%esi
  lea    (%rax,%rax,1),%ebp
  mov    %ebp,%edi
  jmp    L100
  nopl   0x0(%rax,%rax,1)
L168:
  cmp    $0x3,%ebx
  jne    L72
  sub    $0x8,%rsp
  lea    0x0(%rbp,%r13,1),%ecx
  mov    %ebp,%edi
  xor    $0x1,%r15d
  mov    0x1c(%rsp),%eax
  movslq %ecx,%rcx
  lea    (%r10,%rcx,8),%r9
  mov    %r11,%rcx
  push   %rax
  mov    %r10,0x40(%rsp)
  call   <passf3@plt>
  pop    %rdx
  pop    %rcx
  mov    0x30(%rsp),%r10
L13:
  sub    $0x1,%ebx
  imul   %ebp,%ebx
  add    %ebx,%r13d
  cmp    %r12d,0x10(%rsp)
  jl     L10
L115:
  mov    0x18(%rsp),%rax
  mov    %r14d,%esi
  mov    0x4(%rax,%r12,4),%ebx
  mov    0xc(%rsp),%eax
  mov    %ebx,%ecx
  cltd
  imul   %r14d,%ecx
  idiv   %ecx
  mov    0x20(%rsp),%rdx
  lea    (%rax,%rax,1),%ebp
  mov    0x28(%rsp),%rax
  mov    %ebp,%edi
  imul   %r14d,%edi
  mov    %rax,%r11
  test   %r15d,%r15d
  mov    %ecx,%r14d
  cmovne %rdx,%r11
  cmovne %rax,%rdx
  add    $0x1,%r12
L100:
  movslq %r13d,%rcx
  lea    (%r10,%rcx,8),%r8
  cmp    $0x4,%ebx
  je     L11
  jg     L5
  cmp    $0x2,%ebx
  jne    L168
  sub    $0x1,%ebx
  mov    0x14(%rsp),%r9d
  mov    %r11,%rcx
  mov    %ebp,%edi
  imul   %ebp,%ebx
  mov    %r10,0x30(%rsp)
  xor    $0x1,%r15d
  call   <passf2@plt>
  mov    0x30(%rsp),%r10
  add    %ebx,%r13d
  cmp    %r12d,0x10(%rsp)
  jge    L115
  xchg   %ax,%ax
L10:
  mov    %r15d,%r11d
  mov    0x28(%rsp),%r10
  mov    0x20(%rsp),%r15
  test   %r11d,%r11d
  je     L3
  mov    0xc(%rsp),%ecx
  xor    %eax,%eax
  add    %ecx,%ecx
  movslq %ecx,%rdx
  test   %ecx,%ecx
  jle    L3
  nopl   0x0(%rax)
L93:
  movsd  (%r10,%rax,8),%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L93
L3:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L104
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L5:
  cmp    $0x5,%ebx
  jne    L72
  lea    0x0(%rbp,%r13,1),%ecx
  sub    $0x8,%rsp
  xor    $0x1,%r15d
  lea    (%rcx,%rbp,1),%edi
  mov    0x1c(%rsp),%eax
  movslq %ecx,%rcx
  lea    (%rdi,%rbp,1),%r9d
  movslq %edi,%rdi
  movslq %r9d,%r9
  lea    (%r10,%rdi,8),%rdi
  push   %rax
  lea    (%r10,%r9,8),%r9
  push   %r9
  lea    (%r10,%rcx,8),%r9
  mov    %r11,%rcx
  push   %rdi
  mov    %ebp,%edi
  mov    %r10,0x50(%rsp)
  call   <passf5@plt>
  add    $0x20,%rsp
  mov    0x30(%rsp),%r10
  jmp    L13
  nopw   0x0(%rax,%rax,1)
L11:
  lea    0x0(%rbp,%r13,1),%ecx
  mov    0x14(%rsp),%eax
  xor    $0x1,%r15d
  movslq %ecx,%rdi
  add    %ebp,%ecx
  movslq %ecx,%rcx
  push   %rax
  lea    (%r10,%rdi,8),%r9
  mov    %ebp,%edi
  lea    (%r10,%rcx,8),%rcx
  push   %rcx
  mov    %r11,%rcx
  mov    %r10,0x40(%rsp)
  call   <passf4@plt>
  pop    %rsi
  pop    %rdi
  mov    0x30(%rsp),%r10
  jmp    L13
  nopw   0x0(%rax,%rax,1)
L72:
  mov    %r10,0x30(%rsp)
  sub    $0x8,%rsp
  mov    %rdx,%r9
  mov    %esi,%ecx
  mov    0x1c(%rsp),%eax
  mov    %ebx,%edx
  mov    %ebp,%esi
  push   %rax
  push   %r8
  mov    %edi,%r8d
  push   %r11
  mov    0x58(%rsp),%rdi
  call   <passf@plt>
  mov    0x64(%rsp),%eax
  add    $0x20,%rsp
  mov    0x30(%rsp),%r10
  test   %eax,%eax
  je     L13
  xor    $0x1,%r15d
  jmp    L13
L104:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void cfftf1(int n, double c[], double ch[], const double wa[], const int ifac[13 + 2], int isign) {
  int idot, i;
  int k1, l1, l2;
  int na, nf, ip, iw, ix2, ix3, ix4, nac, ido, idl1;
  double *cinput, *coutput;
  nf = ifac[1];
  na = 0;
  l1 = 1;
  iw = 0;
  for (k1 = 2; k1 <= nf + 1; k1++) {
    ip = ifac[k1];
    l2 = ip * l1;
    ido = n / l2;
    idot = ido + ido;
    idl1 = idot * l1;
    if (na) {
      cinput = ch;
      coutput = c;
    } else {
      cinput = c;
      coutput = ch;
    }
    switch (ip) {
    case 4:
      ix2 = iw + idot;
      ix3 = ix2 + idot;
      passf4(idot, l1, cinput, coutput, &wa[iw], &wa[ix2], &wa[ix3], isign);
      na = !na;
      break;
    case 2:
      passf2(idot, l1, cinput, coutput, &wa[iw], isign);
      na = !na;
      break;
    case 3:
      ix2 = iw + idot;
      passf3(idot, l1, cinput, coutput, &wa[iw], &wa[ix2], isign);
      na = !na;
      break;
    case 5:
      ix2 = iw + idot;
      ix3 = ix2 + idot;
      ix4 = ix3 + idot;
      passf5(idot, l1, cinput, coutput, &wa[iw], &wa[ix2], &wa[ix3], &wa[ix4], isign);
      na = !na;
      break;
    default:
      passf(&nac, idot, ip, l1, idl1, cinput, coutput, &wa[iw], isign);
      if (nac != 0)
        na = !na;
    }
    l1 = l2;
    iw += (ip - 1) * idot;
  }
  if (na == 0)
    return;
  for (i = 0; i < 2 * n; i++)
    c[i] = ch[i];
}
```