user: Please show me the C implementation that matches the assembly code listed below:

```asm
<mp_squhf_use_infft>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    %r9,-0x38(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  mov    %rax,-0x8(%rbp)
  mov    0x10(%rbp),%eax
  sar    %eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L33
L48:
  mov    -0xc(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  test   %ax,%ax
  jne    L7
  addl   $0x1,-0xc(%rbp)
L33:
  mov    -0x14(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jg     L48
  jmp    L57
L7:
  nop
L57:
  mov    -0x14(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  sub    -0xc(%rbp),%eax
  cmp    %eax,-0x10(%rbp)
  jge    L52
  mov    -0x14(%rbp),%eax
  sub    -0xc(%rbp),%eax
  mov    %eax,-0x10(%rbp)
L52:
  mov    0x18(%rbp),%rdi
  mov    -0x28(%rbp),%rcx
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %rdi,%r9
  mov    %rcx,%r8
  mov    %edx,%ecx
  mov    0x10(%rbp),%edx
  mov    %eax,%edi
  call   <mp_mul_i2d@plt>
  mov    0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  mov    %rax,%rsi
  mov    0x10(%rbp),%edi
  call   <mp_mul_cmul_nt_d1@plt>
  mov    -0x38(%rbp),%rcx
  mov    0x18(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x10(%rbp),%eax
  mov    %rcx,%r8
  mov    %rdx,%rcx
  mov    0x10(%rbp),%edx
  mov    %eax,%edi
  call   <mp_mul_d2i@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rsi
  mov    0x10(%rbp),%edi
  call   <mp_mul_csqu_nt_d1@plt>
  mov    -0x30(%rbp),%rcx
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %rcx,%r8
  mov    %rdx,%rcx
  mov    0x10(%rbp),%edx
  mov    %eax,%edi
  call   <mp_mul_d2i@plt>
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L42
  mov    -0x30(%rbp),%rdi
  mov    -0x38(%rbp),%rcx
  mov    -0x30(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <mp_add@plt>
L42:
  nop
  leave
  ret
```

assistant: ```c
void mp_squhf_use_infft(int n, int radix, double infft[], int in[], int out[], int tmp[], int nfft, double tmpfft[]) {
  void mp_add(int n, int radix, int in1[], int in2[], int out[]);
  void mp_mul_i2d(int n, int radix, int nfft, int shift, int in[], double dout[]);
  void mp_mul_cmul_nt_d1(int nfft, double d1[], double d2[]);
  void mp_mul_csqu_nt_d1(int nfft, double d1[]);
  void mp_mul_d2i(int n, int radix, int nfft, double din[], int out[]);
  int n_h, shift;
  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, shift, in, tmpfft);
  mp_mul_cmul_nt_d1(nfft, infft, tmpfft);
  mp_mul_d2i(n_h, radix, nfft, tmpfft, tmp);
  mp_mul_csqu_nt_d1(nfft, infft);
  mp_mul_d2i(n, radix, nfft, infft, out);
  if (tmp[0] != 0) {
    mp_add(n, radix, out, tmp, out);
  }
}
```