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

```asm
<mp_squ>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,%ebp
  mov    %esi,%r14d
  mov    %rdx,%r13
  mov    %rcx,0x18(%rsp)
  mov    %r8,%r15
  mov    %r9d,%r12d
  mov    %r9d,%ebx
  sar    %ebx
  add    $0x1,%ebx
  cmp    %edi,%ebx
  jge    L4
  movslq %ebx,%rax
L19:
  mov    %eax,%ebx
  cmpl   $0x0,0x8(%r13,%rax,4)
  jne    L4
  lea    0x1(%rax),%ebx
  add    $0x1,%rax
  cmp    %eax,%ebp
  jg     L19
L4:
  mov    %ebp,%eax
  shr    $0x1f,%eax
  add    %ebp,%eax
  sar    %eax
  add    $0x1,%eax
  mov    %ebp,%edx
  sub    %ebx,%edx
  cmp    %edx,%eax
  cmovge %eax,%edx
  mov    %edx,0x14(%rsp)
  mov    0x60(%rsp),%r9
  mov    %r13,%r8
  mov    $0x0,%ecx
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %ebp,%edi
  call   <mp_mul_i2d@plt>
  mov    0x60(%rsp),%rax
  add    $0x8,%rax
  mov    0x78(%rsp),%r8
  mov    0x70(%rsp),%rcx
  mov    %rax,0x8(%rsp)
  mov    %rax,%rdx
  mov    $0x1,%esi
  mov    %r12d,%edi
  call   <rdft@plt>
  mov    0x68(%rsp),%r9
  mov    %r13,%r8
  mov    %ebx,%ecx
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %ebp,%edi
  call   <mp_mul_i2d@plt>
  mov    0x68(%rsp),%rcx
  lea    0x8(%rcx),%rbx
  mov    0x78(%rsp),%r8
  mov    0x70(%rsp),%rcx
  mov    %rbx,%rdx
  mov    $0x1,%esi
  mov    %r12d,%edi
  call   <rdft@plt>
  mov    0x68(%rsp),%rdx
  mov    0x60(%rsp),%rsi
  mov    %r12d,%edi
  call   <mp_mul_cmul@plt>
  mov    0x78(%rsp),%r8
  mov    0x70(%rsp),%rcx
  mov    %rbx,%rdx
  mov    $0xffffffff,%esi
  mov    %r12d,%edi
  call   <rdft@plt>
  mov    %r15,%r8
  mov    0x68(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    0x14(%rsp),%ebx
  mov    %ebx,%edi
  call   <mp_mul_d2i@plt>
  mov    %r15,%r8
  mov    %r15,%rcx
  mov    %r15,%rdx
  mov    %r14d,%esi
  mov    %ebx,%edi
  call   <mp_add@plt>
  mov    0x60(%rsp),%rsi
  mov    %r12d,%edi
  call   <mp_mul_csqu@plt>
  mov    0x78(%rsp),%r8
  mov    0x70(%rsp),%rcx
  mov    0x8(%rsp),%rdx
  mov    $0xffffffff,%esi
  mov    %r12d,%edi
  call   <rdft@plt>
  mov    0x18(%rsp),%rbx
  mov    %rbx,%r8
  mov    0x60(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %ebp,%edi
  call   <mp_mul_d2i@plt>
  mov    %rbx,%r8
  mov    %r15,%rcx
  mov    %rbx,%rdx
  mov    %r14d,%esi
  mov    %ebp,%edi
  call   <mp_add@plt>
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void mp_squ(int n, int radix, int in[], int out[], int tmp[], int nfft, double tmp1fft[], double tmp2fft[], int ip[], double w[]) {
  void mp_add(int n, int radix, int in1[], int in2[], int out[]);
  void rdft(int n, int isgn, double *a, int *ip, double *w);
  void mp_mul_i2d(int n, int radix, int nfft, int shift, int in[], double dout[]);
  void mp_mul_cmul(int nfft, double din[], double dinout[]);
  void mp_mul_csqu(int nfft, double dinout[]);
  void mp_mul_d2i(int n, int radix, int nfft, double din[], int out[]);
  int n_h, shift;
  shift = (nfft >> 1) + 1;
  while (n > shift) {
    if (in[shift + 2] != 0) {
      break;
    }
    shift++;
  }
  n_h = n / 2 + 1;
  if (n_h < n - shift) {
    n_h = n - shift;
  }
  mp_mul_i2d(n, radix, nfft, 0, in, tmp1fft);
  rdft(nfft, 1, &tmp1fft[1], ip, w);
  mp_mul_i2d(n, radix, nfft, shift, in, tmp2fft);
  rdft(nfft, 1, &tmp2fft[1], ip, w);
  mp_mul_cmul(nfft, tmp1fft, tmp2fft);
  rdft(nfft, -1, &tmp2fft[1], ip, w);
  mp_mul_d2i(n_h, radix, nfft, tmp2fft, tmp);
  mp_add(n_h, radix, tmp, tmp, tmp);
  mp_mul_csqu(nfft, tmp1fft);
  rdft(nfft, -1, &tmp1fft[1], ip, w);
  mp_mul_d2i(n, radix, nfft, tmp1fft, out);
  mp_add(n, radix, out, tmp, out);
}
```