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

```asm
<fft_real_radix_top>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  movl   $0x1540,-0xc(%rbp)
  cmpl   $0x1,-0x18(%rbp)
  jne    L87
  mov    -0x14(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jle    L87
  mov    $0x1,%eax
  jmp    L54
L87:
  mov    $0x0,%eax
L54:
  mov    %eax,-0x8(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L23
L70:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D22(%rip),%rax
  mov    (%rdx,%rax,1),%ecx
  mov    -0x14(%rbp),%eax
  cltd
  idiv   %ecx
  mov    %edx,%eax
  test   %eax,%eax
  jne    L101
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D22(%rip),%rax
  mov    (%rdx,%rax,1),%esi
  mov    -0x14(%rbp),%eax
  cltd
  idiv   %esi
  mov    %eax,-0x4(%rbp)
  cmpl   $0x1,-0x4(%rbp)
  jne    L12
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D22(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  jmp    L205
L12:
  mov    -0x4(%rbp),%eax
  and    $0x7,%eax
  test   %eax,%eax
  jne    L125
  mov    $0x8,%eax
  jmp    L205
L125:
  mov    -0x4(%rbp),%eax
  and    $0x3,%eax
  test   %eax,%eax
  jne    L232
  mov    $0x4,%eax
  jmp    L205
L232:
  mov    -0x4(%rbp),%edx
  movslq %edx,%rax
  imul   $0xffffffff92492493,%rax,%rax
  shr    $0x20,%rax
  add    %edx,%eax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x3,%ecx
  sub    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L247
  mov    $0x7,%eax
  jmp    L205
L247:
  mov    -0x4(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    %eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x2,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L75
  mov    $0x5,%eax
  jmp    L205
L75:
  cmpl   $0x1,-0x8(%rbp)
  jne    L20
  mov    -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L109
  mov    $0x4,%eax
  jmp    L205
L109:
  mov    -0x4(%rbp),%edx
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  add    %ecx,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L150
  mov    $0x4,%eax
  jmp    L205
L20:
  mov    -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L123
  mov    $0x2,%eax
  jmp    L205
L123:
  mov    -0x4(%rbp),%edx
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  add    %ecx,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L150
  mov    $0x3,%eax
  jmp    L205
L150:
  mov    $0x0,%eax
  jmp    L205
L101:
  addl   $0x1,-0x10(%rbp)
L23:
  cmpl   $0x4,-0x10(%rbp)
  jle    L70
  mov    $0x0,%eax
L205:
  pop    %rbp
  ret
```

assistant: ```c
int fft_real_radix_top(int npoint, int f_first) {
  int i, m;
  int fft_n_thresh = 6400 * 17 / 20;
  int f_small_prohibit;
  static int trm[5] = {16, 5, 8, 3, 4};
  f_small_prohibit = (f_first == 1 && npoint > fft_n_thresh) ? 1 : 0;
  for (i = 0; i < 5; i++) {
    if (npoint % trm[i] == 0) {
      m = npoint / trm[i];
      if (m == 1)
        return trm[i];
      if (m % 8 == 0)
        return 8;
      if (m % 4 == 0)
        return 4;
      if (m % 7 == 0)
        return 7;
      if (m % 5 == 0)
        return 5;
      if (f_small_prohibit == 1) {
        if (m % 2 == 0)
          return 4;
        if (m % 3 == 0)
          return 4;
      } else {
        if (m % 2 == 0)
          return 2;
        if (m % 3 == 0)
          return 3;
      }
      return 0;
    }
  }
  return 0;
}
```