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

```asm
<mp_sqrt_newton>:
  endbr64
  push   %r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %r8,%r13
  mov    $0x2,%r8d
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x28,%rsp
  mov    0x68(%rsp),%eax
  mov    %rdx,0x10(%rsp)
  mov    %r9,(%rsp)
  sar    %eax
  cmp    %r8d,%eax
  lea    0x1(%rax),%ecx
  mov    %eax,0x18(%rsp)
  cmovge %eax,%r8d
  shr    $0x1f,%ebp
  mov    %edi,%eax
  mov    %ecx,0xc(%rsp)
  add    %edi,%ebp
  sub    %ecx,%eax
  mov    %r13,%rcx
  sar    %ebp
  mov    %r8d,%r15d
  mov    %r8d,0x1c(%rsp)
  add    $0x1,%ebp
  cmp    %eax,%ebp
  cmovl  %eax,%ebp
  sar    %r15d
  lea    0x1(%r15),%edx
  lea    0xa(%r15,%r15,1),%r15d
  mov    %ebp,%edi
  call   <mp_round@plt>
  mov    (%rsp),%rsi
  mov    %r13,%rdx
  mov    %r15d,%edi
  call   <f_swap_out@plt>
  mov    0x80(%rsp),%rax
  mov    0x1c(%rsp),%r8d
  cmp    %r8d,(%rax)
  je     L13
  mov    0x70(%rsp),%r9
  mov    %r13,%rcx
  mov    %r13,%rdx
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <mp_squh@plt>
L1:
  mov    0xc(%rsp),%edx
  mov    %r14,%rcx
  mov    %r12d,%esi
  mov    %ebx,%edi
  call   <mp_round@plt>
  mov    0x18(%rsp),%eax
  mov    0x60(%rsp),%rsi
  mov    %r14,%rdx
  lea    0xa(%rax,%rax,1),%r10d
  mov    %r10d,%edi
  mov    %r10d,0x18(%rsp)
  call   <f_swap_out@plt>
  push   0x70(%rsp)
  mov    %r14,%r8
  mov    %r13,%rcx
  push   0x80(%rsp)
  mov    %r14,%rdx
  mov    %r12d,%esi
  mov    %ebp,%edi
  mov    0x78(%rsp),%r9d
  call   <mp_mulh_f@plt>
  mov    %r13,%rdx
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <mp_load_0@plt>
  mov    0x10(%rsp),%rsi
  mov    %r15d,%edi
  mov    %r13,%rdx
  lea    0x8(%rbp,%rbp,1),%r15d
  call   <f_swap_in@plt>
  mov    %r14,%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <mp_sub@plt>
  mov    %r13,%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <mp_add@plt>
  mov    0x1c(%rsp),%edx
  mov    %r13,%rcx
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <mp_round@plt>
  mov    0x10(%rsp),%rsi
  mov    %r13,%rdx
  mov    %r15d,%edi
  call   <f_swap_out@plt>
  mov    0x78(%rsp),%eax
  mov    0x80(%rsp),%rdx
  mov    0x88(%rsp),%rsi
  lea    0x10(,%rax,8),%edi
  call   <f_swap_in@plt>
  mov    0x78(%rsp),%r8d
  mov    %r14,%rcx
  mov    %r12d,%esi
  mov    0x80(%rsp),%rdx
  mov    %ebx,%edi
  call   <mp_squh_use_in1fft@plt>
  mov    0x20(%rsp),%rdx
  mov    %r14,%r8
  mov    %r14,%rcx
  mov    %r12d,%esi
  mov    %ebx,%edi
  call   <mp_sub@plt>
  mov    0x20(%rsp),%rcx
  mov    (%r14),%edi
  mov    %r13,%r8
  pop    %rdx
  xor    %edx,%edx
  pop    %rsi
  mov    0x4(%rcx),%eax
  movzwl 0x8(%r14),%esi
  sub    0x4(%r14),%eax
  cmp    %si,0x8(%rcx)
  mov    %r14,%rcx
  mov    0x68(%rsp),%esi
  setg   %dl
  add    %edx,%eax
  test   %edi,%edi
  mov    %ebp,%edi
  lea    0x1(%rsi),%edx
  mov    %r12d,%esi
  cmove  %edx,%eax
  mov    %r13,%rdx
  mov    %eax,0xc(%rsp)
  push   0x70(%rsp)
  push   0x80(%rsp)
  mov    0x78(%rsp),%r9d
  call   <mp_mulh_f@plt>
  mov    0x78(%rsp),%ecx
  mov    %r13,%rdx
  mov    %r12d,%esi
  mov    0x90(%rsp),%rax
  mov    %ebp,%edi
  mov    %ecx,(%rax)
  mov    %r13,%rcx
  call   <mp_idiv_2@plt>
  mov    %r14,%rdx
  mov    %r12d,%esi
  mov    %ebx,%edi
  call   <mp_load_0@plt>
  mov    0x70(%rsp),%rsi
  mov    0x28(%rsp),%edi
  mov    %r14,%rdx
  call   <f_swap_in@plt>
  mov    0x0(%r13),%r10d
  pop    %r8
  pop    %r9
  mov    0xc(%rsp),%eax
  test   %r10d,%r10d
  jne    L20
L26:
  mov    (%rsp),%rsi
  mov    %r13,%rdx
  mov    %r15d,%edi
  mov    %eax,0xc(%rsp)
  call   <f_swap_in@plt>
  mov    0xc(%rsp),%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L13:
  mov    0x70(%rsp),%rdx
  mov    0x78(%rsp),%rsi
  mov    %r8d,0x1c(%rsp)
  lea    0x10(,%r8,8),%edi
  call   <f_swap_in@plt>
  mov    0x1c(%rsp),%r8d
  mov    %r13,%rcx
  mov    %r12d,%esi
  mov    0x70(%rsp),%rdx
  mov    %ebp,%edi
  call   <mp_squh_use_in1fft@plt>
  jmp    L1
L20:
  mov    %r14,%r8
  mov    %r13,%rcx
  mov    %r14,%rdx
  mov    %r12d,%esi
  mov    %ebx,%edi
  call   <mp_add@plt>
  mov    0xc(%rsp),%eax
  jmp    L26
```

assistant: ```c
int mp_sqrt_newton(int n, int radix, int in[], int inout[], int inout_rev[], char *f_name_tmp1, char *f_name_tmp2, int nfft, double tmpfft[], char *f_name_tmp1fft, int *n_tmp1fft) {
  void f_swap_in(int bytesize, char *f_name, char *in);
  void f_swap_out(int bytesize, char *f_name, char *out);
  void mp_load_0(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_idiv_2(int n, int radix, int in[], int out[]);
  void mp_mulh_f(int n, int radix, int in1[], int in2[], int out[], int nfft, char *f_name_in1fft, double outfft[]);
  void mp_squh(int n, int radix, int in[], int out[], int nfft, double inoutfft[]);
  void mp_squh_use_in1fft(int n, int radix, double inoutfft[], int out[], int nfft);
  int n_h, nfft_h, shift, prc;
  nfft_h = nfft >> 1;
  shift = nfft_h + 1;
  if (nfft_h < 2) {
    nfft_h = 2;
  }
  n_h = n / 2 + 1;
  if (n_h < n - shift) {
    n_h = n - shift;
  }
  mp_round(n_h, radix, (nfft_h >> 1) + 1, inout_rev);
  f_swap_out(2 * sizeof(int) + ((nfft_h >> 1) + 1) * sizeof(short int), f_name_tmp1, (char *)inout_rev);
  if (*n_tmp1fft != nfft_h) {
    mp_squh(n_h, radix, inout_rev, inout_rev, nfft_h, tmpfft);
  } else {
    f_swap_in((nfft_h + 2) * sizeof(double), f_name_tmp1fft, (char *)tmpfft);
    mp_squh_use_in1fft(n_h, radix, tmpfft, inout_rev, nfft_h);
  }
  mp_round(n, radix, shift, inout);
  f_swap_out(2 * sizeof(int) + shift * sizeof(short int), f_name_tmp2, (char *)inout);
  mp_mulh_f(n_h, radix, inout, inout_rev, inout, nfft, f_name_tmp1fft, tmpfft);
  mp_load_0(n_h, radix, inout_rev);
  f_swap_in(2 * sizeof(int) + ((nfft_h >> 1) + 1) * sizeof(short int), f_name_tmp1, (char *)inout_rev);
  mp_sub(n_h, radix, inout_rev, inout, inout);
  mp_add(n_h, radix, inout_rev, inout, inout_rev);
  mp_round(n_h, radix, shift, inout_rev);
  f_swap_out(2 * sizeof(int) + n_h * sizeof(short int), f_name_tmp1, (char *)inout_rev);
  f_swap_in((nfft + 2) * sizeof(double), f_name_tmp1fft, (char *)tmpfft);
  mp_squh_use_in1fft(n, radix, tmpfft, inout, nfft);
  mp_sub(n, radix, in, inout, inout);
  prc = in[1] - inout[1];
  if (((short int *)&in[2])[0] > ((short int *)&inout[2])[0]) {
    prc++;
  }
  if (inout[0] == 0) {
    prc = nfft + 1;
  }
  mp_mulh_f(n_h, radix, inout_rev, inout, inout_rev, nfft, f_name_tmp1fft, tmpfft);
  *n_tmp1fft = nfft;
  mp_idiv_2(n_h, radix, inout_rev, inout_rev);
  mp_load_0(n, radix, inout);
  f_swap_in(2 * sizeof(int) + shift * sizeof(short int), f_name_tmp2, (char *)inout);
  if (inout_rev[0] != 0) {
    mp_add(n, radix, inout, inout_rev, inout);
  }
  f_swap_in(2 * sizeof(int) + n_h * sizeof(short int), f_name_tmp1, (char *)inout_rev);
  return prc;
}
```