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

```asm
<bn_sqr_recursive>:
  endbr64
  push   %r15
  mov    %rsi,%r9
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  cmp    $0x4,%edx
  je     L66
  mov    %edx,%r15d
  cmp    $0x8,%edx
  je     L69
  mov    %rcx,%r12
  cmp    $0xf,%edx
  jle    L74
  mov    %edx,%r13d
  movslq %r15d,%rbx
  mov    %r9,%rdi
  mov    %r9,0x18(%rsp)
  sar    %r13d
  shl    $0x2,%rbx
  movslq %r13d,%rax
  mov    %r13d,%edx
  lea    (%r12,%rbx,1),%r14
  shl    $0x2,%rax
  mov    %rax,0x10(%rsp)
  add    %rsi,%rax
  mov    %rax,%rsi
  mov    %rax,0x8(%rsp)
  call   <bn_cmp_words@plt>
  lea    (%r14,%rbx,1),%rcx
  mov    0x18(%rsp),%r9
  test   %eax,%eax
  mov    %rcx,(%rsp)
  jg     L83
  jne    L56
  lea    0x0(,%r15,4),%edx
  xor    %esi,%esi
  mov    %r14,%rdi
  mov    %r9,0x18(%rsp)
  call   <memset@plt>
  mov    0x18(%rsp),%r9
L88:
  mov    (%rsp),%rcx
  mov    %r9,%rsi
  mov    %r13d,%edx
  mov    %rbp,%rdi
  add    %rbp,%rbx
  call   <bn_sqr_recursive>
  mov    (%rsp),%rcx
  mov    %rbx,%rdi
  mov    %r13d,%edx
  mov    0x8(%rsp),%rsi
  call   <bn_sqr_recursive>
  mov    %rbx,%rdx
  mov    %r15d,%ecx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <bn_add_words@plt>
  mov    %r15d,%ecx
  mov    %r14,%rdx
  mov    %r12,%rsi
  mov    %r14,%rdi
  mov    %rax,%rbx
  call   <bn_sub_words@plt>
  mov    0x10(%rsp),%rdi
  mov    %r15d,%ecx
  mov    %r14,%rdx
  sub    %eax,%ebx
  add    %rbp,%rdi
  mov    %rdi,%rsi
  call   <bn_add_words@plt>
  add    %eax,%ebx
  je     L2
  lea    (%r15,%r13,1),%r8d
  movslq %r8d,%r8
  lea    0x0(%rbp,%r8,4),%rdx
  add    %ebx,(%rdx)
  jae    L2
  nopw   0x0(%rax,%rax,1)
L44:
  add    $0x4,%rdx
  addl   $0x1,(%rdx)
  je     L44
L2:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L83:
  mov    0x8(%rsp),%rdx
  mov    %r9,%rsi
  mov    %r13d,%ecx
  mov    %r12,%rdi
  call   <bn_sub_words@plt>
  mov    0x18(%rsp),%r9
L71:
  mov    (%rsp),%rcx
  mov    %r13d,%edx
  mov    %r12,%rsi
  mov    %r14,%rdi
  mov    %r9,0x18(%rsp)
  call   <bn_sqr_recursive>
  mov    0x18(%rsp),%r9
  jmp    L88
  nopl   0x0(%rax)
L74:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10d0 <bn_sqr_normal@plt>
  nopl   0x0(%rax,%rax,1)
L66:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <bn_sqr_comba4@plt>
  nopl   0x0(%rax,%rax,1)
L69:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <bn_sqr_comba8@plt>
  nopl   0x0(%rax,%rax,1)
L56:
  mov    0x8(%rsp),%rsi
  mov    %r9,%rdx
  mov    %r13d,%ecx
  mov    %r12,%rdi
  mov    %r9,0x18(%rsp)
  call   <bn_sub_words@plt>
  mov    0x18(%rsp),%r9
  jmp    L71
```

assistant: ```c
void bn_sqr_recursive(unsigned int *r, const unsigned int *a, int n2, unsigned int *t) {
  int n = n2 / 2;
  int zero, c1;
  unsigned int ln, lo, *p;
  if (n2 == 4) {
    bn_sqr_comba4(r, a);
    return;
  } else if (n2 == 8) {
    bn_sqr_comba8(r, a);
    return;
  }
  if (n2 < (16)) {
    bn_sqr_normal(r, a, n2, t);
    return;
  }
  c1 = bn_cmp_words(a, &(a[n]), n);
  zero = 0;
  if (c1 > 0)
    bn_sub_words(t, a, &(a[n]), n);
  else if (c1 < 0)
    bn_sub_words(t, &(a[n]), a, n);
  else
    zero = 1;
  p = &(t[n2 * 2]);
  if (!zero)
    bn_sqr_recursive(&(t[n2]), t, n, p);
  else
    memset(&(t[n2]), 0, n2 * sizeof(unsigned int));
  bn_sqr_recursive(r, a, n, p);
  bn_sqr_recursive(&(r[n2]), &(a[n]), n, p);
  c1 = (int)(bn_add_words(t, r, &(r[n2]), n2));
  c1 -= (int)(bn_sub_words(&(t[n2]), t, &(t[n2]), n2));
  c1 += (int)(bn_add_words(&(r[n]), &(r[n]), &(t[n2]), n2));
  if (c1) {
    p = &(r[n + n2]);
    lo = *p;
    ln = (lo + c1) & (0xffffffffL);
    *p = ln;
    if (ln < (unsigned int)c1) {
      do {
        p++;
        lo = *p;
        ln = (lo + 1) & (0xffffffffL);
        *p = ln;
      } while (ln == 0);
    }
  }
}
```