user: Translate the below assembly code into C programming language:

```asm
<mp_invisqrt_newton>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    %r9,-0x38(%rbp)
  mov    0x10(%rbp),%eax
  sar    %eax
  add    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  sub    -0x4(%rbp),%eax
  cmp    %eax,-0xc(%rbp)
  jge    L3
  mov    -0x14(%rbp),%eax
  sub    -0x4(%rbp),%eax
  mov    %eax,-0xc(%rbp)
L3:
  mov    -0x28(%rbp),%rcx
  mov    -0x4(%rbp),%edx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <mp_round@plt>
  mov    0x18(%rbp),%rdi
  mov    -0x30(%rbp),%rcx
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  sub    $0x8,%rsp
  push   0x20(%rbp)
  mov    %rdi,%r9
  mov    0x10(%rbp),%r8d
  mov    %eax,%edi
  call   <mp_squh_save_infft@plt>
  add    $0x10,%rsp
  mov    -0x30(%rbp),%rdi
  mov    -0x1c(%rbp),%ecx
  mov    -0x30(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <mp_imul@plt>
  mov    -0x38(%rbp),%rdx
  mov    -0x18(%rbp),%ecx
  mov    -0x14(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <mp_load_1@plt>
  mov    -0x38(%rbp),%rdi
  mov    -0x30(%rbp),%rcx
  mov    -0x38(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <mp_sub@plt>
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  neg    %eax
  mov    %eax,-0x8(%rbp)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L6
  mov    0x10(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x8(%rbp)
L6:
  mov    -0x38(%rbp),%r8
  mov    -0x38(%rbp),%rdi
  mov    0x18(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0xc(%rbp),%eax
  push   0x20(%rbp)
  mov    0x10(%rbp),%ecx
  push   %rcx
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    $0x0,%ecx
  mov    %eax,%edi
  call   <mp_mulh_use_in1fft@plt>
  add    $0x10,%rsp
  mov    -0x38(%rbp),%rcx
  mov    -0x38(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0xc(%rbp),%eax
  mov    %eax,%edi
  call   <mp_idiv_2@plt>
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L2
  mov    -0x28(%rbp),%rdi
  mov    -0x38(%rbp),%rcx
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <mp_add@plt>
L2:
  mov    -0x8(%rbp),%eax
  leave
  ret
```

assistant: ```c
int mp_invisqrt_newton(int n, int radix, int in, int inout[], int tmp1[], int tmp2[], int nfft, double tmp1fft[], double tmp2fft[]) {
  void mp_load_1(int n, int radix, int out[]);
  void mp_round(int n, int radix, int m, int inout[]);
  void mp_add(int n, int radix, int in1[], int in2[], int out[]);
  void mp_sub(int n, int radix, int in1[], int in2[], int out[]);
  void mp_imul(int n, int radix, int in1[], int in2, int out[]);
  void mp_idiv_2(int n, int radix, int in[], int out[]);
  void mp_squh_save_infft(int n, int radix, int in[], int out[], int nfft, double infft[], double outfft[]);
  void mp_mulh_use_in1fft(int n, int radix, double in1fft[], int shift, int in2[], int out[], int nfft, double outfft[]);
  int n_h, shift, prc;
  shift = (nfft >> 1) + 1;
  n_h = n / 2 + 1;
  if (n_h < n - shift) {
    n_h = n - shift;
  }
  mp_round(n, radix, shift, inout);
  mp_squh_save_infft(n, radix, inout, tmp1, nfft, tmp1fft, tmp2fft);
  mp_imul(n, radix, tmp1, in, tmp1);
  mp_load_1(n, radix, tmp2);
  mp_sub(n, radix, tmp2, tmp1, tmp2);
  prc = -tmp2[1];
  if (tmp2[0] == 0) {
    prc = nfft + 1;
  }
  mp_mulh_use_in1fft(n_h, radix, tmp1fft, 0, tmp2, tmp2, nfft, tmp2fft);
  mp_idiv_2(n_h, radix, tmp2, tmp2);
  if (tmp2[0] != 0) {
    mp_add(n, radix, inout, tmp2, inout);
  }
  return prc;
}
```