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

```asm
<rfftb1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    0x8(%r8),%rax
  mov    %rdi,0x8(%rsp)
  mov    %rsi,0x30(%rsp)
  mov    %rdx,0x38(%rsp)
  mov    %rcx,0x18(%rsp)
  mov    %r8,0x20(%rsp)
  mov    %rax,0x10(%rsp)
  test   %rax,%rax
  je     L121
  xor    %r14d,%r14d
  mov    %rdx,%r13
  mov    $0x1,%ebp
  mov    $0x1,%r12d
  mov    %r14,%rax
  mov    %rsi,%r14
  mov    %rax,%r15
  jmp    L29
  nopl   0x0(%rax)
L127:
  cmp    $0x2,%rbx
  je     L61
  cmp    $0x3,%rbx
  je     L43
  cmp    $0x5,%rbx
  je     L26
  sub    $0x8,%rsp
  mov    %r10,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rdi
  push   %r8
  imul   %rsi,%rcx
  mov    %r13,%r9
  mov    %r14,%r8
  mov    %rbx,%rsi
  mov    %r10,0x38(%rsp)
  call   <radbg@plt>
  pop    %rax
  pop    %rdx
  mov    0x28(%rsp),%r10
  cmp    $0x1,%r10
  jne    L115
  mov    %r13,%rax
  mov    %r14,%r13
  mov    %rax,%r14
  nopw   0x0(%rax,%rax,1)
L115:
  sub    $0x1,%rbx
  imul   %r10,%rbx
  add    %rbx,%r15
  cmp    0x10(%rsp),%r12
  ja     L119
L29:
  mov    0x20(%rsp),%rax
  add    $0x1,%r12
  mov    %rbp,%rsi
  xor    %edx,%edx
  mov    (%rax,%r12,8),%rbx
  mov    0x8(%rsp),%rax
  imul   %rbx,%rbp
  div    %rbp
  mov    %rax,%r10
  mov    0x18(%rsp),%rax
  lea    (%rax,%r15,8),%r8
  cmp    $0x4,%rbx
  jne    L127
  mov    %r13,%rcx
  mov    %r14,%rdx
  mov    %r10,%rdi
  mov    %r10,0x28(%rsp)
  call   <radb4@plt>
  mov    %r13,%rax
  mov    0x28(%rsp),%r10
  mov    %r14,%r13
  mov    %rax,%r14
  jmp    L115
  nopl   (%rax)
L26:
  mov    %r13,%rcx
  mov    %r14,%rdx
  mov    %r10,%rdi
  mov    %r10,0x28(%rsp)
  call   <radb5@plt>
  mov    %r13,%rax
  mov    0x28(%rsp),%r10
  mov    %r14,%r13
  mov    %rax,%r14
  jmp    L115
  cs nopw 0x0(%rax,%rax,1)
L61:
  mov    %r13,%rcx
  mov    %r14,%rdx
  mov    %r10,%rdi
  mov    %r10,0x28(%rsp)
  call   <radb2@plt>
  mov    %r13,%rax
  mov    0x28(%rsp),%r10
  mov    %r14,%r13
  mov    %rax,%r14
  jmp    L115
  cs nopw 0x0(%rax,%rax,1)
L43:
  mov    %r13,%rcx
  mov    %r14,%rdx
  mov    %r10,%rdi
  mov    %r10,0x28(%rsp)
  call   <radb3@plt>
  mov    %r13,%rax
  mov    0x28(%rsp),%r10
  mov    %r14,%r13
  mov    %rax,%r14
  jmp    L115
  cs nopw 0x0(%rax,%rax,1)
L119:
  mov    0x30(%rsp),%rdi
  cmp    %rdi,%r14
  je     L121
  mov    0x8(%rsp),%rdx
  mov    0x38(%rsp),%rsi
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  shl    $0x3,%rdx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10d0 <memcpy@plt>
  nopl   0x0(%rax,%rax,1)
L121:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void rfftb1(size_t n, double c[], double ch[], const double wa[], const size_t ifac[]) {
  size_t k1, l1 = 1, nf = ifac[1], iw = 0;
  double *p1 = c, *p2 = ch;
  for (k1 = 1; k1 <= nf; k1++) {
    size_t ip = ifac[k1 + 1], ido = n / (ip * l1);
    if (ip == 4)
      radb4(ido, l1, p1, p2, wa + iw);
    else if (ip == 2)
      radb2(ido, l1, p1, p2, wa + iw);
    else if (ip == 3)
      radb3(ido, l1, p1, p2, wa + iw);
    else if (ip == 5)
      radb5(ido, l1, p1, p2, wa + iw);
    else {
      radbg(ido, ip, l1, ido * l1, p1, p2, wa + iw);
      if (ido != 1)
        do {
          double *tmp_ = (p1);
          (p1) = (p2);
          (p2) = tmp_;
        } while (0);
    }
    do {
      double *tmp_ = (p1);
      (p1) = (p2);
      (p2) = tmp_;
    } while (0);
    l1 *= ip;
    iw += (ip - 1) * ido;
  }
  if (p1 != c)
    memcpy(c, ch, n * sizeof(double));
}
```