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

```asm
<ffts1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x18,%rsp
  cmp    $0x2,%rsi
  je     L198
  mov    %rsi,%r15
  mov    %rcx,%rbp
  mov    %r8,%r12
  jg     L149
  test   %rsi,%rsi
  je     L44
  cmp    $0x1,%rsi
  jne    L97
  test   %rdx,%rdx
  jle    L44
  nopl   0x0(%rax)
L123:
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x10,%r13
  call   <fft2pt@plt>
  sub    $0x1,%rbx
  jne    L123
L44:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L149:
  cmp    $0x3,%rsi
  jne    L97
  test   %rdx,%rdx
  jle    L44
  nopl   0x0(%rax,%rax,1)
L34:
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x40,%r13
  call   <fft8pt@plt>
  sub    $0x1,%rbx
  jne    L34
  jmp    L44
  xchg   %ax,%ax
L198:
  test   %rdx,%rdx
  jle    L44
  nopl   (%rax)
L116:
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x20,%r13
  call   <fft4pt@plt>
  sub    $0x1,%rbx
  jne    L116
  jmp    L44
  xchg   %ax,%ax
L97:
  test   %rbx,%rbx
  jle    L44
  movabs $0x5555555555555556,%rdx
  lea    -0x1(%r15),%rcx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rcx,%rax
  sar    $0x3f,%rax
  sub    %rax,%rdx
  lea    0x0(,%rdx,4),%rax
  mov    %rdx,%r14
  sub    %rax,%rdx
  lea    (%rdx,%rcx,1),%rax
  mov    %r15d,%ecx
  mov    %rax,(%rsp)
  mov    $0x8,%eax
  shl    %cl,%rax
  mov    %rax,0x8(%rsp)
  jmp    L48
  nopl   0x0(%rax,%rax,1)
L13:
  call   <bfstages@plt>
L20:
  add    0x8(%rsp),%r13
  sub    $0x1,%rbx
  je     L44
L48:
  xor    %eax,%eax
  mov    %r12,%rdx
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <bitrevR2@plt>
  cmpq   $0x1,(%rsp)
  je     L128
  cmpq   $0x2,(%rsp)
  mov    $0x2,%r8d
  je     L9
L110:
  mov    %r14,%r9
  mov    $0x1,%ecx
  mov    %rbp,%rdx
  mov    %r15,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  cmp    $0xb,%r15
  jbe    L13
  call   <fftrecurs@plt>
  jmp    L20
  nopl   0x0(%rax,%rax,1)
L9:
  mov    $0x2,%edx
  mov    %r15,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <bfR4@plt>
  mov    $0x8,%r8d
  jmp    L110
  nopw   0x0(%rax,%rax,1)
L128:
  mov    $0x2,%edx
  mov    %r15,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <bfR2@plt>
  mov    $0x4,%r8d
  jmp    L110
```

assistant: ```c
void ffts1(float *ioptr, long M, long Rows, float *Utbl, short *BRLow) {
  long StageCnt;
  long NDiffU;
  switch (M) {
  case 0:
    break;
  case 1:
    for (; Rows > 0; Rows--) {
      fft2pt(ioptr);
      ioptr += 2 * ((unsigned long)1 << (M));
    }
    break;
  case 2:
    for (; Rows > 0; Rows--) {
      fft4pt(ioptr);
      ioptr += 2 * ((unsigned long)1 << (M));
    }
    break;
  case 3:
    for (; Rows > 0; Rows--) {
      fft8pt(ioptr);
      ioptr += 2 * ((unsigned long)1 << (M));
    }
    break;
  default:
    for (; Rows > 0; Rows--) {
      bitrevR2(ioptr, M, BRLow);
      StageCnt = (M - 1) / 3;
      NDiffU = 2;
      if ((M - 1 - (StageCnt * 3)) == 1) {
        bfR2(ioptr, M, NDiffU);
        NDiffU *= 2;
      }
      if ((M - 1 - (StageCnt * 3)) == 2) {
        bfR4(ioptr, M, NDiffU);
        NDiffU *= 4;
      }
      if (M <= (11 - (sizeof(float) / 8)))
        bfstages(ioptr, M, Utbl, 1, NDiffU, StageCnt);
      else {
        fftrecurs(ioptr, M, Utbl, 1, NDiffU, StageCnt);
      }
      ioptr += 2 * ((unsigned long)1 << (M));
    }
  }
}
```