user: Converte this assembly snippet into its equivalent C code:

```asm
<mp_squ>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %rdx,-0x30(%rbp)
  mov    %rcx,-0x38(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    %r9d,-0x44(%rbp)
  lea    D1(%rip),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x44(%rbp),%eax
  sar    %eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L64
L54:
  mov    -0x14(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  test   %ax,%ax
  jne    L40
  addl   $0x1,-0x14(%rbp)
L64:
  mov    -0x24(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jg     L54
  jmp    L27
L40:
  nop
L27:
  mov    -0x24(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  add    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x24(%rbp),%eax
  sub    -0x14(%rbp),%eax
  cmp    %eax,-0x18(%rbp)
  jge    L66
  mov    -0x24(%rbp),%eax
  sub    -0x14(%rbp),%eax
  mov    %eax,-0x18(%rbp)
L66:
  mov    -0x30(%rbp),%rcx
  mov    -0x44(%rbp),%edx
  mov    -0x28(%rbp),%esi
  mov    -0x24(%rbp),%eax
  mov    0x10(%rbp),%r9
  mov    %rcx,%r8
  mov    $0x0,%ecx
  mov    %eax,%edi
  call   <mp_mul_i2d@plt>
  mov    0x10(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x44(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <rdft@plt>
  mov    -0x44(%rbp),%eax
  add    $0x2,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rax
  mov    0x10(%rbp),%rdx
  mov    %rax,%rsi
  mov    %ecx,%edi
  call   <f_swap_out@plt>
  mov    -0x44(%rbp),%eax
  mov    0x10(%rbp),%rsi
  mov    %eax,%edi
  call   <mp_mul_csqu@plt>
  mov    0x10(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x44(%rbp),%eax
  mov    $0xffffffff,%esi
  mov    %eax,%edi
  call   <rdft@plt>
  mov    -0x40(%rbp),%rcx
  mov    -0x44(%rbp),%edx
  mov    -0x28(%rbp),%esi
  mov    -0x24(%rbp),%eax
  mov    %rcx,%r8
  mov    0x10(%rbp),%rcx
  mov    %eax,%edi
  call   <mp_mul_d2i@plt>
  mov    -0x30(%rbp),%rdi
  mov    -0x14(%rbp),%ecx
  mov    -0x44(%rbp),%edx
  mov    -0x28(%rbp),%esi
  mov    -0x24(%rbp),%eax
  mov    0x10(%rbp),%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <mp_mul_i2d@plt>
  mov    0x10(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x44(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <rdft@plt>
  mov    -0x10(%rbp),%rcx
  mov    -0x44(%rbp),%eax
  mov    0x10(%rbp),%rdx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <mp_mul_f_cmul@plt>
  mov    0x10(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x44(%rbp),%eax
  mov    $0xffffffff,%esi
  mov    %eax,%edi
  call   <rdft@plt>
  mov    -0x38(%rbp),%rcx
  mov    -0x44(%rbp),%edx
  mov    -0x28(%rbp),%esi
  mov    -0x18(%rbp),%eax
  mov    %rcx,%r8
  mov    0x10(%rbp),%rcx
  mov    %eax,%edi
  call   <mp_mul_d2i@plt>
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L65
  mov    -0x38(%rbp),%rdi
  mov    -0x38(%rbp),%rcx
  mov    -0x38(%rbp),%rdx
  mov    -0x28(%rbp),%esi
  mov    -0x18(%rbp),%eax
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <mp_add@plt>
  mov    -0x38(%rbp),%rdi
  mov    -0x40(%rbp),%rcx
  mov    -0x38(%rbp),%rdx
  mov    -0x28(%rbp),%esi
  mov    -0x24(%rbp),%eax
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <mp_add@plt>
  jmp    L67
L65:
  mov    -0x38(%rbp),%rcx
  mov    -0x40(%rbp),%rdx
  mov    -0x28(%rbp),%esi
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <mp_copy@plt>
L67:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <remove@plt>
  nop
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D1
data_type: string

tool: D1: tmp1fft.swp

assistant: ```c
void mp_squ(int n, int radix, int in[], int out[], int tmp[], int nfft, double tmpfft[]) {
  void f_swap_out(int bytesize, char *f_name, char *out);
  void mp_copy(int n, int radix, int in[], int out[]);
  void mp_add(int n, int radix, int in1[], int in2[], int out[]);
  void rdft(int n, int isgn, double *a);
  void mp_mul_i2d(int n, int radix, int nfft, int shift, int in[], double dout[]);
  void mp_mul_f_cmul(int nfft, char *f_name_in, 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;
  char *f_name_tmp1fft = "tmp1fft.swp";
  short int *indgt;
  indgt = (short int *)&in[2];
  shift = (nfft >> 1) + 1;
  while (n > shift) {
    if (indgt[shift] != 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, tmpfft);
  rdft(nfft, 1, &tmpfft[1]);
  f_swap_out((nfft + 2) * sizeof(double), f_name_tmp1fft, (char *)tmpfft);
  mp_mul_csqu(nfft, tmpfft);
  rdft(nfft, -1, &tmpfft[1]);
  mp_mul_d2i(n, radix, nfft, tmpfft, tmp);
  mp_mul_i2d(n, radix, nfft, shift, in, tmpfft);
  rdft(nfft, 1, &tmpfft[1]);
  mp_mul_f_cmul(nfft, f_name_tmp1fft, tmpfft);
  rdft(nfft, -1, &tmpfft[1]);
  mp_mul_d2i(n_h, radix, nfft, tmpfft, out);
  if (out[0] != 0) {
    mp_add(n_h, radix, out, out, out);
    mp_add(n, radix, out, tmp, out);
  } else {
    mp_copy(n, radix, tmp, out);
  }
  remove(f_name_tmp1fft);
}
```