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

```asm
<drftf1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    0x4(%r8),%eax
  mov    %edi,0x14(%rsp)
  mov    %rcx,0x8(%rsp)
  test   %eax,%eax
  jle    L98
  mov    %rdx,%rbp
  movslq %eax,%rdx
  sub    $0x1,%eax
  mov    %rsi,%r15
  shl    $0x2,%rax
  mov    %edi,%r13d
  mov    %edi,%r12d
  mov    $0x1,%ecx
  lea    0x4(,%rdx,4),%rdx
  lea    (%r8,%rdx,1),%rbx
  lea    -0x4(%r8,%rdx,1),%rdx
  sub    %rax,%rdx
  mov    %rdx,0x18(%rsp)
  jmp    L36
  nopl   (%rax)
L1:
  cmp    $0x2,%esi
  je     L108
  cmp    $0x1,%edi
  cmove  %ecx,%r14d
  mov    %r12d,%ecx
  imul   %edi,%ecx
  test   %r14d,%r14d
  je     L93
  push   %r8
  mov    %rbp,%r9
  mov    %rbp,%r8
  mov    %r12d,%edx
  push   %r15
  push   %r15
  push   %rbp
  call   <dradfg@plt>
  add    $0x20,%rsp
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L159:
  sub    $0x4,%rbx
  cmp    %rbx,0x18(%rsp)
  je     L60
L36:
  mov    %r12d,%eax
  mov    (%rbx),%esi
  mov    %r12d,%edi
  mov    $0x1,%r14d
  cltd
  sub    %ecx,%r14d
  idiv   %esi
  mov    %eax,%r12d
  mov    0x14(%rsp),%eax
  cltd
  idiv   %edi
  mov    0x8(%rsp),%rdx
  mov    %eax,%edi
  lea    -0x1(%rsi),%eax
  imul   %edi,%eax
  sub    %eax,%r13d
  movslq %r13d,%rax
  lea    -0x8(%rdx,%rax,8),%r8
  cmp    $0x4,%esi
  jne    L1
  lea    (%rdi,%r13,1),%eax
  mov    0x8(%rsp),%rcx
  lea    (%rdi,%rax,1),%edx
  cltq
  movslq %edx,%rdx
  lea    -0x8(%rcx,%rax,8),%r9
  lea    -0x8(%rcx,%rdx,8),%rdx
  test   %r14d,%r14d
  je     L148
  sub    $0x8,%rsp
  mov    %r15,%rcx
  mov    %r12d,%esi
  sub    $0x4,%rbx
  push   %rdx
  mov    %rbp,%rdx
  call   <dradf4@plt>
  pop    %rcx
  mov    %r14d,%ecx
  pop    %rsi
  cmp    %rbx,0x18(%rsp)
  jne    L36
  nopl   0x0(%rax)
L60:
  cmp    $0x1,%ecx
  je     L98
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  jle    L98
  movslq %eax,%rdx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L110:
  movsd  0x0(%rbp,%rax,8),%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L110
L98:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L108:
  test   %r14d,%r14d
  je     L67
  mov    %r15,%rcx
  mov    %rbp,%rdx
  mov    %r12d,%esi
  call   <dradf2@plt>
  mov    %r14d,%ecx
  jmp    L159
  nopl   0x0(%rax,%rax,1)
L148:
  sub    $0x8,%rsp
  mov    %rbp,%rcx
  mov    %r12d,%esi
  push   %rdx
  mov    %r15,%rdx
  call   <dradf4@plt>
  pop    %rax
  xor    %ecx,%ecx
  pop    %rdx
  jmp    L159
  nopl   0x0(%rax)
L93:
  push   %r8
  mov    %r15,%r9
  mov    %r15,%r8
  mov    %r12d,%edx
  push   %rbp
  push   %rbp
  push   %r15
  call   <dradfg@plt>
  add    $0x20,%rsp
  mov    $0x1,%ecx
  jmp    L159
  nopw   0x0(%rax,%rax,1)
L67:
  mov    %rbp,%rcx
  mov    %r15,%rdx
  mov    %r12d,%esi
  call   <dradf2@plt>
  xor    %ecx,%ecx
  jmp    L159
```

assistant: ```c
void drftf1(int n, double *c, double *ch, double *wa, int *ifac) {
  int i, k1, l1, l2;
  int na, kh, nf;
  int ip, iw, ido, idl1, ix2, ix3;
  nf = ifac[1];
  na = 1;
  l2 = n;
  iw = n;
  for (k1 = 0; k1 < nf; k1++) {
    kh = nf - k1;
    ip = ifac[kh + 1];
    l1 = l2 / ip;
    ido = n / l2;
    idl1 = ido * l1;
    iw -= (ip - 1) * ido;
    na = 1 - na;
    if (ip != 4)
      goto L102;
    ix2 = iw + ido;
    ix3 = ix2 + ido;
    if (na != 0)
      dradf4(ido, l1, ch, c, wa + iw - 1, wa + ix2 - 1, wa + ix3 - 1);
    else
      dradf4(ido, l1, c, ch, wa + iw - 1, wa + ix2 - 1, wa + ix3 - 1);
    goto L110;
  L102:
    if (ip != 2)
      goto L104;
    if (na != 0)
      goto L103;
    dradf2(ido, l1, c, ch, wa + iw - 1);
    goto L110;
  L103:
    dradf2(ido, l1, ch, c, wa + iw - 1);
    goto L110;
  L104:
    if (ido == 1)
      na = 1 - na;
    if (na != 0)
      goto L109;
    dradfg(ido, ip, l1, idl1, c, c, c, ch, ch, wa + iw - 1);
    na = 1;
    goto L110;
  L109:
    dradfg(ido, ip, l1, idl1, ch, ch, ch, c, c, wa + iw - 1);
    na = 0;
  L110:
    l2 = l1;
  }
  if (na == 1)
    return;
  for (i = 0; i < n; i++)
    c[i] = ch[i];
}
```