user: What is the c source code of the assembly code below:

```asm
<__mpn_impn_sqr_n>:
  endbr64
  push   %r15
  mov    %edx,%eax
  push   %r14
  mov    %rsi,%r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edx,0x4(%rsp)
  test   $0x1,%al
  je     L121
  lea    -0x1(%rdx),%ebx
  cmp    $0x1f,%ebx
  jle    L39
  mov    %ebx,%edx
  call   <__mpn_impn_sqr_n>
L192:
  movslq %ebx,%rax
  mov    %ebx,%edx
  mov    %r14,%rsi
  shl    $0x2,%rax
  lea    (%r14,%rax,1),%r12
  lea    0x0(%rbp,%rax,1),%r13
  mov    (%r12),%ecx
  mov    %r13,%rdi
  call   <__mpn_addmul_1@plt>
  mov    0x4(%rsp),%r15d
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    %eax,%r9d
  lea    (%rbx,%rbx,1),%eax
  cltq
  mov    %r15d,%edx
  add    %r15d,%ebx
  mov    %r9d,0x0(%rbp,%rax,4)
  mov    (%r12),%ecx
  movslq %ebx,%rbx
  call   <__mpn_addmul_1@plt>
  mov    %eax,0x0(%rbp,%rbx,4)
L123:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L121:
  movslq 0x4(%rsp),%rax
  mov    %eax,%r12d
  mov    %rax,0x20(%rsp)
  shl    $0x2,%rax
  sar    %r12d
  mov    %rax,0x10(%rsp)
  lea    (%rdi,%rax,1),%rbx
  movslq %r12d,%rsi
  lea    0x0(,%rsi,4),%rcx
  mov    %rsi,0x18(%rsp)
  mov    %rcx,0x8(%rsp)
  lea    (%r14,%rcx,1),%r15
  cmp    $0x1f,%r12d
  jle    L102
  mov    %r13,%rcx
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <__mpn_impn_sqr_n>
L93:
  mov    %r12d,%edx
  mov    %r14,%rsi
  mov    %r15d,%edi
  call   <__mpn_cmp@plt>
  mov    %r12d,%ecx
  test   %rax,%rax
  js     L34
  mov    %r14,%rdx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <__mpn_sub_n@plt>
L124:
  cmp    $0x1f,%r12d
  jg     L148
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <__mpn_impn_sqr_n_basecase@plt>
  test   %r12d,%r12d
  jle    L55
L167:
  mov    0x8(%rsp),%rax
  lea    0x0(%rbp,%rax,1),%r9
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L188:
  mov    (%rbx,%rax,4),%edx
  mov    %edx,(%r9,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L188
  mov    0x18(%rsp),%rax
  add    0x20(%rsp),%rax
  mov    %r12d,%ecx
  mov    %rbx,%rsi
  lea    0x0(%rbp,%rax,4),%rax
  mov    %rbx,%rdi
  mov    %r9,0x28(%rsp)
  mov    %rax,%rdx
  mov    %rax,0x20(%rsp)
  call   <__mpn_add_n@plt>
  mov    0x28(%rsp),%r15
  mov    0x4(%rsp),%ecx
  mov    %r13,%rdx
  mov    %eax,0x18(%rsp)
  mov    %r15,%rdi
  mov    %r15,%rsi
  call   <__mpn_sub_n@plt>
  mov    0x18(%rsp),%edi
  sub    %eax,%edi
  mov    %edi,0x18(%rsp)
  cmp    $0x1f,%r12d
  jle    L9
  mov    0x10(%rsp),%rcx
  mov    %r12d,%edx
  mov    %r14,%rsi
  mov    %r13,%rdi
  add    %r13,%rcx
  call   <__mpn_impn_sqr_n>
  mov    0x4(%rsp),%ecx
  mov    %r13,%rdx
  mov    %r15,%rsi
  mov    %r15,%rdi
  call   <__mpn_add_n@plt>
  mov    0x18(%rsp),%ecx
  add    %eax,%ecx
  jne    L170
L183:
  xor    %eax,%eax
  nop
L80:
  mov    0x0(%r13,%rax,4),%edx
  mov    %edx,0x0(%rbp,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L80
L51:
  mov    0x8(%rsp),%rdx
  mov    %r12d,%ecx
  mov    %r15,%rsi
  mov    %r15,%rdi
  add    %r13,%rdx
  call   <__mpn_add_n@plt>
  test   %eax,%eax
  je     L123
  mov    0x4(%rsp),%edx
  add    $0x38,%rsp
  mov    %rbx,%rsi
  mov    %rbx,%rdi
  mov    $0x1,%ecx
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10e0 <__mpn_add_1@plt>
  nopw   0x0(%rax,%rax,1)
L102:
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <__mpn_impn_sqr_n_basecase@plt>
  jmp    L93
  nopl   0x0(%rax,%rax,1)
L39:
  mov    %ebx,%edx
  call   <__mpn_impn_sqr_n_basecase@plt>
  jmp    L192
  nopl   0x0(%rax)
L55:
  mov    0x18(%rsp),%r15
  add    0x20(%rsp),%r15
  mov    %r12d,%ecx
  mov    %rbx,%rsi
  lea    0x0(%rbp,%r15,4),%rax
  mov    %rbx,%rdi
  mov    %rax,%rdx
  mov    %rax,0x20(%rsp)
  call   <__mpn_add_n@plt>
  mov    0x8(%rsp),%rsi
  mov    0x4(%rsp),%ecx
  mov    %r13,%rdx
  mov    %eax,0x10(%rsp)
  lea    0x0(%rbp,%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)
L9:
  mov    %r12d,%edx
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <__mpn_impn_sqr_n_basecase@plt>
  mov    0x4(%rsp),%ecx
  mov    %r13,%rdx
  mov    %r15,%rsi
  mov    %r15,%rdi
  call   <__mpn_add_n@plt>
  mov    0x18(%rsp),%ecx
  add    %eax,%ecx
  jne    L170
  test   %r12d,%r12d
  jg     L183
  jmp    L51
  nopl   (%rax)
L148:
  mov    0x10(%rsp),%rax
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  lea    0x0(%r13,%rax,1),%rcx
  call   <__mpn_impn_sqr_n>
  jmp    L167
  nopl   (%rax)
L34:
  mov    %r15,%rdx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <__mpn_sub_n@plt>
  jmp    L124
  nopl   0x0(%rax,%rax,1)
L170:
  mov    0x20(%rsp),%rdi
  mov    %r12d,%edx
  mov    %rdi,%rsi
  call   <__mpn_add_1@plt>
  test   %r12d,%r12d
  jg     L183
  jmp    L51
```

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);
  }
}
```