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

```asm
<bn_div_words>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %edx,-0x3c(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x2,-0x14(%rbp)
  cmpl   $0x0,-0x3c(%rbp)
  jne    L81
  mov    $0xffffffff,%eax
  jmp    L94
L81:
  mov    -0x3c(%rbp),%eax
  mov    %eax,%edi
  call   <BN_num_bits_word@plt>
  mov    %eax,-0x10(%rbp)
  cmpl   $0x20,-0x10(%rbp)
  je     L87
  mov    -0x10(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  cmp    %eax,-0x34(%rbp)
  jbe    L28
L87:
  mov    $0x1,%eax
  jmp    L80
L28:
  mov    $0x0,%eax
L80:
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x20,%eax
  sub    -0x10(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x34(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jb     L61
  mov    -0x3c(%rbp),%eax
  sub    %eax,-0x34(%rbp)
L61:
  cmpl   $0x0,-0x10(%rbp)
  je     L118
  mov    -0x10(%rbp),%eax
  mov    %eax,%ecx
  shll   %cl,-0x3c(%rbp)
  mov    -0x10(%rbp),%eax
  mov    -0x34(%rbp),%edx
  mov    %edx,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    $0x20,%eax
  sub    -0x10(%rbp),%eax
  mov    -0x38(%rbp),%edx
  mov    %eax,%ecx
  shr    %cl,%edx
  mov    %edx,%eax
  or     %esi,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,%ecx
  shll   %cl,-0x38(%rbp)
L118:
  mov    -0x3c(%rbp),%eax
  shr    $0x10,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x3c(%rbp),%eax
  movzwl %ax,%eax
  mov    %eax,-0x8(%rbp)
L11:
  mov    -0x34(%rbp),%eax
  shr    $0x10,%eax
  cmp    %eax,-0xc(%rbp)
  jne    L42
  movl   $0xffff,-0x24(%rbp)
  jmp    L13
L42:
  mov    -0x34(%rbp),%eax
  mov    $0x0,%edx
  divl   -0xc(%rbp)
  mov    %eax,-0x24(%rbp)
L13:
  mov    -0x24(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x8(%rbp),%eax
  imul   -0x24(%rbp),%eax
  mov    %eax,-0x18(%rbp)
L89:
  mov    -0x34(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  and    $0xffff0000,%eax
  test   %rax,%rax
  jne    L62
  mov    -0x4(%rbp),%eax
  shl    $0x10,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  shr    $0x10,%eax
  or     %edx,%eax
  cmp    %eax,-0x18(%rbp)
  jbe    L62
  subl   $0x1,-0x24(%rbp)
  mov    -0xc(%rbp),%eax
  sub    %eax,-0x1c(%rbp)
  mov    -0x8(%rbp),%eax
  sub    %eax,-0x18(%rbp)
  jmp    L89
L62:
  mov    -0x18(%rbp),%eax
  shr    $0x10,%eax
  mov    %eax,-0x4(%rbp)
  shll   $0x10,-0x18(%rbp)
  mov    -0x4(%rbp),%eax
  add    %eax,-0x1c(%rbp)
  mov    -0x38(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jae    L47
  addl   $0x1,-0x1c(%rbp)
L47:
  mov    -0x18(%rbp),%eax
  sub    %eax,-0x38(%rbp)
  mov    -0x34(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jae    L143
  mov    -0x3c(%rbp),%eax
  add    %eax,-0x34(%rbp)
  subl   $0x1,-0x24(%rbp)
L143:
  mov    -0x1c(%rbp),%eax
  sub    %eax,-0x34(%rbp)
  subl   $0x1,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  je     L15
  mov    -0x24(%rbp),%eax
  shl    $0x10,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x34(%rbp),%eax
  shl    $0x10,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  shr    $0x10,%eax
  or     %edx,%eax
  mov    %eax,-0x34(%rbp)
  shll   $0x10,-0x38(%rbp)
  jmp    L11
L15:
  nop
  mov    -0x24(%rbp),%eax
  or     %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
L94:
  leave
  ret
```

assistant: ```c
unsigned int bn_div_words(unsigned int h, unsigned int l, unsigned int d) {
  unsigned int dh, dl, q, ret = 0, th, tl, t;
  int i, count = 2;
  if (d == 0)
    return (0xffffffffL);
  i = BN_num_bits_word(d);
  assert((i == 32) || (h > (unsigned int)1 << i));
  i = 32 - i;
  if (h >= d)
    h -= d;
  if (i) {
    d <<= i;
    h = (h << i) | (l >> (32 - i));
    l <<= i;
  }
  dh = (d & (0xffff0000L)) >> 16;
  dl = (d & (0xffff));
  for (;;) {
    if ((h >> 16) == dh)
      q = (0xffff);
    else
      q = h / dh;
    th = q * dh;
    tl = dl * q;
    for (;;) {
      t = h - th;
      if ((t & (0xffff0000L)) || ((tl) <= ((t << 16) | ((l & (0xffff0000L)) >> 16))))
        break;
      q--;
      th -= dh;
      tl -= dl;
    }
    t = (tl >> 16);
    tl = (tl << 16) & (0xffff0000L);
    th += t;
    if (l < tl)
      th++;
    l -= tl;
    if (h < th) {
      h += d;
      q--;
    }
    h -= th;
    if (--count == 0)
      break;
    ret = q << 16;
    h = ((h << 16) | (l >> 16)) & (0xffffffffL);
    l = (l & (0xffff)) << 16;
  }
  ret |= q;
  return ret;
}
```