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

```asm
<__mpn_impn_sqr_n>:
  endbr64
  push   %r15
  movslq %edx,%rax
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x38,%rsp
  mov    %eax,0x4(%rsp)
  test   $0x1,%al
  je     L335
  lea    -0x1(%rax),%ebp
  cmp    $0x1f,%ebp
  jle    L63
  mov    %ebp,%edx
  call   <__mpn_impn_sqr_n>
L304:
  movslq %ebp,%r12
  mov    %ebp,%edx
  mov    %r13,%rsi
  shl    $0x2,%r12
  lea    0x0(%r13,%r12,1),%r14
  add    %rbx,%r12
  mov    (%r14),%ecx
  mov    %r12,%rdi
  call   <__mpn_addmul_1@plt>
  mov    0x4(%rsp),%r15d
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    %eax,%r8d
  lea    0x0(%rbp,%rbp,1),%eax
  cltq
  mov    %r15d,%edx
  add    %r15d,%ebp
  mov    %r8d,(%rbx,%rax,4)
  mov    (%r14),%ecx
  movslq %ebp,%rbp
  call   <__mpn_addmul_1@plt>
  mov    %eax,(%rbx,%rbp,4)
L176:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L335:
  mov    %eax,%ebp
  mov    %rax,0x18(%rsp)
  shl    $0x2,%rax
  sar    %ebp
  mov    %rax,0x10(%rsp)
  lea    (%rbx,%rax,1),%r14
  movslq %ebp,%r15
  lea    0x0(,%r15,4),%rdi
  mov    %rdi,0x8(%rsp)
  lea    (%rsi,%rdi,1),%r9
  cmp    $0x1f,%ebp
  jle    L62
  mov    %r9,%rsi
  mov    %ebp,%edx
  mov    %r14,%rdi
  mov    %r9,0x20(%rsp)
  call   <__mpn_impn_sqr_n>
  mov    0x20(%rsp),%r9
L87:
  mov    %r9d,%edi
  mov    %ebp,%edx
  mov    %r13,%rsi
  mov    %r9,0x20(%rsp)
  call   <__mpn_cmp@plt>
  mov    0x20(%rsp),%r9
  mov    %ebp,%ecx
  test   %rax,%rax
  js     L60
  mov    %r13,%rdx
  mov    %r9,%rsi
  mov    %rbx,%rdi
  call   <__mpn_sub_n@plt>
L164:
  cmp    $0x1f,%ebp
  jg     L338
  mov    %ebp,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <__mpn_impn_sqr_n_basecase@plt>
  test   %ebp,%ebp
  jle    L148
L94:
  mov    0x10(%rsp),%rax
  mov    0x8(%rsp),%rsi
  lea    0x4(%rax),%rdx
  mov    %rsi,%rax
  sub    %rdx,%rax
  cmp    $0x8,%rax
  jbe    L189
  cmp    $0x3,%ebp
  jle    L189
  test   %ebp,%ebp
  mov    $0x1,%ecx
  lea    (%rbx,%rsi,1),%r9
  cmovg  %ebp,%ecx
  xor    %eax,%eax
  mov    %ecx,%edx
  shr    $0x2,%edx
  shl    $0x4,%rdx
L322:
  movdqu (%r14,%rax,1),%xmm0
  movups %xmm0,(%r9,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L322
  mov    %ecx,%eax
  and    $0xfffffffc,%eax
  and    $0x3,%ecx
  je     L243
  mov    0x18(%rsp),%rsi
  mov    %eax,%edx
  lea    (%rdx,%rsi,1),%rcx
  add    %r15,%rdx
  mov    (%rbx,%rcx,4),%ecx
  mov    %ecx,(%rbx,%rdx,4)
  lea    0x1(%rax),%edx
  cmp    %edx,%ebp
  jle    L243
  movslq %edx,%rdx
  add    $0x2,%eax
  lea    (%rsi,%rdx,1),%rcx
  add    %r15,%rdx
  mov    (%rbx,%rcx,4),%ecx
  mov    %ecx,(%rbx,%rdx,4)
  cmp    %eax,%ebp
  jle    L243
  cltq
  lea    (%rsi,%rax,1),%rdx
  add    %r15,%rax
  mov    (%rbx,%rdx,4),%edx
  mov    %edx,(%rbx,%rax,4)
L243:
  mov    0x18(%rsp),%rax
  mov    %ebp,%ecx
  mov    %r14,%rsi
  mov    %r14,%rdi
  mov    %r9,0x20(%rsp)
  add    %r15,%rax
  lea    (%rbx,%rax,4),%rax
  mov    %rax,%rdx
  mov    %rax,0x28(%rsp)
  call   <__mpn_add_n@plt>
  mov    0x20(%rsp),%r15
  mov    0x4(%rsp),%ecx
  mov    %r12,%rdx
  mov    %eax,0x18(%rsp)
  mov    %r15,%rsi
  mov    %r15,%rdi
  call   <__mpn_sub_n@plt>
  mov    0x18(%rsp),%esi
  sub    %eax,%esi
  mov    %esi,0x18(%rsp)
  cmp    $0x1f,%ebp
  jle    L316
  mov    0x10(%rsp),%rcx
  mov    %ebp,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  add    %r12,%rcx
  call   <__mpn_impn_sqr_n>
  mov    0x4(%rsp),%ecx
  mov    %r12,%rdx
  mov    %r15,%rsi
  mov    %r15,%rdi
  call   <__mpn_add_n@plt>
  mov    0x18(%rsp),%ecx
  add    %eax,%ecx
  jne    L73
L15:
  lea    0x4(%r12),%rdx
  mov    %rbx,%rax
  sub    %rdx,%rax
  cmp    $0x8,%rax
  jbe    L106
  cmp    $0x3,%ebp
  jle    L106
  test   %ebp,%ebp
  mov    $0x1,%ecx
  cmovg  %ebp,%ecx
  xor    %eax,%eax
  mov    %ecx,%edx
  shr    $0x2,%edx
  shl    $0x4,%rdx
  nopl   0x0(%rax)
L257:
  movdqu (%r12,%rax,1),%xmm1
  movups %xmm1,(%rbx,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L257
  mov    %ecx,%eax
  and    $0xfffffffc,%eax
  and    $0x3,%ecx
  je     L284
  mov    %eax,%ecx
  mov    (%r12,%rcx,4),%esi
  lea    0x0(,%rcx,4),%rdx
  mov    %esi,(%rbx,%rcx,4)
  lea    0x1(%rax),%ecx
  cmp    %ebp,%ecx
  jge    L284
  mov    0x4(%r12,%rdx,1),%ecx
  add    $0x2,%eax
  mov    %ecx,0x4(%rbx,%rdx,1)
  cmp    %eax,%ebp
  jle    L284
  mov    0x8(%r12,%rdx,1),%eax
  mov    %eax,0x8(%rbx,%rdx,1)
L284:
  mov    0x8(%rsp),%rdx
  mov    %ebp,%ecx
  mov    %r15,%rsi
  mov    %r15,%rdi
  add    %r12,%rdx
  call   <__mpn_add_n@plt>
  test   %eax,%eax
  je     L176
  mov    0x4(%rsp),%edx
  add    $0x38,%rsp
  mov    %r14,%rsi
  mov    %r14,%rdi
  pop    %rbx
  mov    $0x1,%ecx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10e0 <__mpn_add_1@plt>
  nopl   (%rax)
L62:
  mov    %r9,%rsi
  mov    %ebp,%edx
  mov    %r14,%rdi
  mov    %r9,0x20(%rsp)
  call   <__mpn_impn_sqr_n_basecase@plt>
  mov    0x20(%rsp),%r9
  jmp    L87
  nopl   0x0(%rax)
L63:
  mov    %ebp,%edx
  call   <__mpn_impn_sqr_n_basecase@plt>
  jmp    L304
  nopl   0x0(%rax)
L148:
  add    0x18(%rsp),%r15
  mov    %ebp,%ecx
  mov    %r14,%rsi
  mov    %r14,%rdi
  lea    (%rbx,%r15,4),%rax
  mov    %rax,%rdx
  mov    %rax,0x28(%rsp)
  call   <__mpn_add_n@plt>
  mov    0x8(%rsp),%rsi
  mov    0x4(%rsp),%ecx
  mov    %r12,%rdx
  mov    %eax,0x10(%rsp)
  lea    (%rbx,%rsi,1),%r15
  mov    %r15,%rdi
  mov    %r15,%rsi
  call   <__mpn_sub_n@plt>
  mov    0x10(%rsp),%edi
  sub    %eax,%edi
  mov    %edi,0x18(%rsp)
L316:
  mov    %ebp,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <__mpn_impn_sqr_n_basecase@plt>
  mov    0x4(%rsp),%ecx
  mov    %r12,%rdx
  mov    %r15,%rsi
  mov    %r15,%rdi
  call   <__mpn_add_n@plt>
  mov    0x18(%rsp),%ecx
  add    %eax,%ecx
  jne    L73
  test   %ebp,%ebp
  jg     L15
  jmp    L284
  nopl   0x0(%rax,%rax,1)
L338:
  mov    0x10(%rsp),%rax
  mov    %ebp,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  lea    (%r12,%rax,1),%rcx
  call   <__mpn_impn_sqr_n>
  jmp    L94
  nopl   0x0(%rax,%rax,1)
L60:
  mov    %r9,%rdx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <__mpn_sub_n@plt>
  jmp    L164
  nopl   0x0(%rax,%rax,1)
L73:
  mov    0x28(%rsp),%rdi
  mov    %ebp,%edx
  mov    %rdi,%rsi
  call   <__mpn_add_1@plt>
  test   %ebp,%ebp
  jg     L15
  jmp    L284
  nopl   0x0(%rax)
L106:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L224:
  mov    (%r12,%rax,4),%edx
  mov    %edx,(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%ebp
  jg     L224
  jmp    L284
  nopl   0x0(%rax)
L189:
  mov    0x8(%rsp),%rax
  lea    (%rbx,%rax,1),%r9
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L111:
  mov    (%r14,%rax,4),%edx
  mov    %edx,(%r9,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%ebp
  jg     L111
  jmp    L243
```

assistant: ```c
void __mpn_impn_sqr_n(mp_ptr prodp, mp_srcptr up, mp_size_t size, mp_ptr tspace) {
  if ((size & 1) != 0) {
    mp_size_t esize = size - 1;
    mp_limb_t cy_limb;
    do {
      if ((esize) < 32)
        __mpn_impn_sqr_n_basecase(prodp, up, esize);
      else
        __mpn_impn_sqr_n(prodp, up, esize, tspace);
    } while (0);
    ;
    cy_limb = __mpn_addmul_1(prodp + esize, up, esize, up[esize]);
    prodp[esize + esize] = cy_limb;
    cy_limb = __mpn_addmul_1(prodp + esize, up, size, up[esize]);
    prodp[esize + size] = cy_limb;
  } else {
    mp_size_t hsize = size >> 1;
    mp_limb_t cy;
    do {
      if ((hsize) < 32)
        __mpn_impn_sqr_n_basecase(prodp + size, up + hsize, hsize);
      else
        __mpn_impn_sqr_n(prodp + size, up + hsize, hsize, tspace);
    } while (0);
    ;
    if (__mpn_cmp(up + hsize, up, hsize) >= 0) {
      __mpn_sub_n(prodp, up + hsize, up, hsize);
    } else {
      __mpn_sub_n(prodp, up, up + hsize, hsize);
    }
    do {
      if ((hsize) < 32)
        __mpn_impn_sqr_n_basecase(tspace, prodp, hsize);
      else
        __mpn_impn_sqr_n(tspace, prodp, hsize, tspace + size);
    } while (0);
    ;
    do {
      mp_size_t __i;
      for (__i = 0; __i < (hsize); __i++)
        (prodp + hsize)[__i] = (prodp + size)[__i];
    } while (0);
    cy = __mpn_add_n(prodp + size, prodp + size, prodp + size + hsize, hsize);
    cy -= __mpn_sub_n(prodp + hsize, prodp + hsize, tspace, size);
    do {
      if ((hsize) < 32)
        __mpn_impn_sqr_n_basecase(tspace, up, hsize);
      else
        __mpn_impn_sqr_n(tspace, up, hsize, tspace + size);
    } while (0);
    ;
    cy += __mpn_add_n(prodp + hsize, prodp + hsize, tspace, size);
    if (cy)
      __mpn_add_1(prodp + hsize + size, prodp + hsize + size, hsize, cy);
    do {
      mp_size_t __i;
      for (__i = 0; __i < (hsize); __i++)
        (prodp)[__i] = (tspace)[__i];
    } while (0);
    cy = __mpn_add_n(prodp + hsize, prodp + hsize, tspace + hsize, hsize);
    if (cy)
      __mpn_add_1(prodp + size, prodp + size, size, 1);
  }
}
```