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

```asm
<bn_sqr_recursive>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x18(%rbp)
  cmpl   $0x4,-0x34(%rbp)
  jne    L149
  mov    -0x30(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <bn_sqr_comba4@plt>
  jmp    L94
L149:
  cmpl   $0x8,-0x34(%rbp)
  jne    L101
  mov    -0x30(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <bn_sqr_comba8@plt>
  jmp    L94
L101:
  cmpl   $0xf,-0x34(%rbp)
  jg     L5
  mov    -0x40(%rbp),%rcx
  mov    -0x34(%rbp),%edx
  mov    -0x30(%rbp),%rsi
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <bn_sqr_normal@plt>
  jmp    L94
L5:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%edx
  mov    -0x30(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <bn_cmp_words@plt>
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x1c(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jle    L90
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x18(%rbp),%edx
  mov    -0x30(%rbp),%rsi
  mov    -0x40(%rbp),%rax
  mov    %edx,%ecx
  mov    %rdi,%rdx
  mov    %rax,%rdi
  call   <bn_sub_words@plt>
  jmp    L26
L90:
  cmpl   $0x0,-0x14(%rbp)
  jns    L54
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x18(%rbp),%ecx
  mov    -0x30(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <bn_sub_words@plt>
  jmp    L26
L54:
  movl   $0x1,-0x1c(%rbp)
L26:
  mov    -0x34(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jne    L73
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x8(%rbp),%rcx
  mov    -0x18(%rbp),%edx
  mov    -0x40(%rbp),%rax
  mov    %rax,%rsi
  call   <bn_sqr_recursive>
  jmp    L17
L73:
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
L17:
  mov    -0x8(%rbp),%rcx
  mov    -0x18(%rbp),%edx
  mov    -0x30(%rbp),%rsi
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <bn_sqr_recursive>
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x8(%rbp),%rdx
  mov    -0x18(%rbp),%eax
  mov    %rdx,%rcx
  mov    %eax,%edx
  call   <bn_sqr_recursive>
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x34(%rbp),%edx
  mov    -0x28(%rbp),%rsi
  mov    -0x40(%rbp),%rax
  mov    %edx,%ecx
  mov    %rdi,%rdx
  mov    %rax,%rdi
  call   <bn_add_words@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x34(%rbp),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,%ecx
  mov    %rsi,%rdx
  mov    %rax,%rsi
  call   <bn_sub_words@plt>
  sub    %eax,-0x14(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  lea    (%rcx,%rax,1),%rsi
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  lea    (%rcx,%rax,1),%rdi
  mov    -0x34(%rbp),%eax
  mov    %eax,%ecx
  call   <bn_add_words@plt>
  add    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  je     L94
  mov    -0x18(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x8(%rbp),%rax
  mov    -0xc(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x14(%rbp),%eax
  cmp    %eax,-0xc(%rbp)
  jae    L94
L126:
  addq   $0x4,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x8(%rbp),%rax
  mov    -0xc(%rbp),%edx
  mov    %edx,(%rax)
  cmpl   $0x0,-0xc(%rbp)
  je     L126
L94:
  leave
  ret
```

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