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

```asm
<strtoul>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %edx,%ebp
  mov    %r12,%r14
  push   %rbx
  sub    $0x18,%rsp
  test   %rdi,%rdi
  setne  %dil
  mov    %rsi,0x8(%rsp)
  movzbl %dil,%edi
  call   <assert@plt>
  lea    -0x2(%rbp),%eax
  cmp    $0x22,%eax
  seta   %r13b
  test   %ebp,%ebp
  setne  %al
  and    %al,%r13b
  jne    L17
  nopw   0x0(%rax,%rax,1)
L127:
  mov    %r14,%r15
  movzbl (%r14),%edi
  add    $0x1,%r14
  mov    %edi,%ebx
  call   <isspace@plt>
  test   %rax,%rax
  jne    L127
  cmp    $0x2d,%bl
  je     L214
  cmp    $0x2b,%bl
  jne    L112
  movzbl (%r14),%ebx
  lea    0x2(%r15),%r14
  test   $0xffffffef,%ebp
  je     L248
  nopl   (%rax)
L129:
  movslq %ebp,%r9
L221:
  mov    D2(%rip),%rax
  xor    %edx,%edx
  xor    %esi,%esi
  mov    (%rax),%r8
  mov    %r8,%rax
  div    %r9
  mov    %rax,%rdi
  mov    D25(%rip),%rax
  mov    (%rax),%r10d
  xor    %eax,%eax
  jmp    L144
  nopl   0x0(%rax,%rax,1)
L303:
  sub    $0x30,%ebx
L254:
  cmp    %ebx,%ebp
  jle    L237
L297:
  cmp    $0xffffffff,%esi
  je     L183
  cmp    %rdi,%rax
  ja     L176
  jne    L202
  cmp    %edx,%ebx
  jle    L202
L176:
  mov    D31(%rip),%rax
  mov    $0xffffffff,%esi
  mov    %r10d,(%rax)
  mov    %r8,%rax
L183:
  movzbl (%r14),%ebx
  add    $0x1,%r14
L144:
  lea    -0x30(%rbx),%r11d
  cmp    $0x9,%r11b
  jbe    L303
  lea    -0x61(%rbx),%r11d
  cmp    $0x19,%r11b
  ja     L44
  sub    $0x57,%ebx
  cmp    %ebx,%ebp
  jg     L297
L237:
  test   %esi,%esi
  jle    L162
  test   %r13b,%r13b
  je     L162
  neg    %rax
  cmpq   $0x0,0x8(%rsp)
  je     L10
L132:
  lea    -0x1(%r14),%r12
L65:
  mov    0x8(%rsp),%rcx
L218:
  mov    %r12,(%rcx)
L10:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L214:
  movzbl (%r14),%ebx
  mov    $0x1,%r13d
  lea    0x2(%r15),%r14
L112:
  test   $0xffffffef,%ebp
  jne    L129
L248:
  cmp    $0x30,%bl
  je     L194
  test   %ebp,%ebp
  jne    L129
  mov    $0xa,%r9d
  mov    $0xa,%ebp
  jmp    L221
  nopl   0x0(%rax,%rax,1)
L44:
  lea    -0x41(%rbx),%r11d
  cmp    $0x19,%r11b
  ja     L237
  sub    $0x37,%ebx
  jmp    L254
  cs nopw 0x0(%rax,%rax,1)
L202:
  imul   %r9,%rax
  movslq %ebx,%rbx
  mov    $0x1,%esi
  add    %rbx,%rax
  jmp    L183
  nopl   0x0(%rax)
L17:
  mov    D35(%rip),%rax
  mov    0x8(%rsp),%rcx
  mov    (%rax),%edx
  mov    D31(%rip),%rax
  mov    %edx,(%rax)
  xor    %eax,%eax
  test   %rcx,%rcx
  jne    L218
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L162:
  cmpq   $0x0,0x8(%rsp)
  je     L10
  test   %esi,%esi
  je     L65
  jmp    L132
  nopl   0x0(%rax)
L194:
  movzbl (%r14),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  jne    L215
  movzbl 0x1(%r14),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L261
L121:
  add    $0x2,%r14
  movzbl %al,%ebx
  mov    $0x10,%r9d
  mov    $0x10,%ebp
  jmp    L221
L261:
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x5,%dl
  jbe    L121
L215:
  test   %ebp,%ebp
  jne    L129
  mov    $0x8,%r9d
  mov    $0x8,%ebp
  jmp    L221
```

assistant: ```c
unsigned long int strtoul(const char *nptr, char **endptr, int base) {
  const char *s;
  unsigned long int acc, cutoff;
  unsigned char c;
  int i, neg, any, cutlim;
  assert(nptr != NULL);
  if (base && (base < 2 || base > 36)) {
    errno = EINVAL;
    if (endptr != NULL)
      *endptr = (char *)(nptr);
    return 0;
  }
  s = nptr;
  do {
    c = *s++;
  } while (isspace(c));
  if (c == '-') {
    neg = 1;
    c = *s++;
  } else {
    neg = 0;
    if (c == '+')
      c = *s++;
  }
  if ((base == 0 || base == 16) && c == '0' && (*s == 'x' || *s == 'X') && ((s[1] >= '0' && s[1] <= '9') || (s[1] >= 'a' && s[1] <= 'f') || (s[1] >= 'A' && s[1] <= 'F'))) {
    c = s[1];
    s += 2;
    base = 16;
  } else if (base == 0)
    base = (c == '0' ? 8 : 10);
  cutoff = ((unsigned long int)ULONG_MAX / (unsigned long int)base);
  cutlim = (int)((unsigned long int)ULONG_MAX % (unsigned long int)base);
  for (acc = 0, any = 0;; c = *s++) {
    if (c >= '0' && c <= '9')
      i = c - '0';
    else if (c >= 'a' && c <= 'z')
      i = (c - 'a') + 10;
    else if (c >= 'A' && c <= 'Z')
      i = (c - 'A') + 10;
    else
      break;
    if (i >= base)
      break;
    if (any < 0)
      continue;
    if (acc > cutoff || (acc == cutoff && i > cutlim)) {
      acc = ULONG_MAX;
      any = -1;
      errno = ERANGE;
    } else {
      any = 1;
      acc *= (unsigned long int)base;
      acc += i;
    }
  }
  if (neg && any > 0)
    acc = -acc;
  if (endptr != NULL)
    *endptr = (char *)(any ? s - 1 : nptr);
  return (acc);
}
```