user: What would the C source look like for the assembly code provided here?

```asm
<strtoul>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  mov    %rsi,(%rsp)
  mov    %edx,%r15d
  mov    %edx,%r13d
  jmp    L235
L28:
  add    $0x1,%rbx
L235:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L28
  movzbl (%rbx),%eax
  cmp    $0x2b,%al
  je     L79
  movb   $0x0,0xf(%rsp)
  cmp    $0x2d,%al
  je     L201
L19:
  test   %r15d,%r15d
  jne    L165
  mov    $0xa,%r13d
  cmpb   $0x30,(%rbx)
  je     L90
L61:
  mov    $0x0,%ebp
  movzbl %r13b,%r14d
  jmp    L128
L79:
  add    $0x1,%rbx
  movb   $0x0,0xf(%rsp)
  jmp    L19
L201:
  add    $0x1,%rbx
  movb   $0x1,0xf(%rsp)
  jmp    L19
L90:
  movzbl 0x1(%rbx),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  sete   %r13b
  lea    0x8(,%r13,8),%r13d
  jmp    L61
L165:
  cmp    $0x10,%r15d
  jne    L61
  mov    $0x10,%r13d
  cmpb   $0x30,(%rbx)
  jne    L61
  movzbl 0x1(%rbx),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  jne    L61
  add    $0x2,%rbx
  jmp    L61
L92:
  mov    %r12,%rbx
  mov    %rax,%rbp
L128:
  lea    0x1(%rbx),%r12
  movsbl (%rbx),%edi
  call   <toupper@plt>
  lea    -0x37(%rax),%ecx
  lea    -0x30(%rax),%edx
  cmp    $0x41,%al
  mov    %ecx,%eax
  cmovb  %edx,%eax
  cmp    %r13b,%al
  jae    L234
  mov    %r14,%rdx
  imul   %rbp,%rdx
  movzbl %al,%eax
  add    %rdx,%rax
  cmp    %rax,%rbp
  jbe    L92
  mov    D0(%rip),%rax
  mov    (%rax),%edx
  mov    D13(%rip),%rax
  mov    %edx,(%rax)
  mov    D14(%rip),%rax
  mov    (%rax),%rax
  jmp    L92
L234:
  mov    %rbp,%rax
  neg    %rax
  cmpb   $0x0,0xf(%rsp)
  cmovne %rax,%rbp
  cmpq   $0x0,(%rsp)
  je     L21
  test   %r15d,%r15d
  jne    L114
  movzbl (%rbx),%eax
  sub    $0x4c,%eax
  cmp    $0x29,%al
  ja     L114
  movabs $0x20110000001,%rdx
  bt     %rax,%rdx
  jb     L216
  jmp    L114
L210:
  bt     %rax,%rdx
  jae    L114
L216:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  sub    $0x4c,%eax
  cmp    $0x29,%al
  jbe    L210
L114:
  mov    (%rsp),%rax
  mov    %rbx,(%rax)
L21:
  mov    %rbp,%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
unsigned long strtoul(const char *__restrict nptr, char **__restrict endptr, int base) {
  unsigned long sum, psum;
  unsigned char sign;
  unsigned char digit;
  unsigned char radix = base;
  char *cp = (char *)nptr;
  while (isspace(*cp))
    ++cp;
  sign = 0;
  if (*cp == '+') {
    ++cp;
  } else if (*cp == '-') {
    ++cp;
    sign = 1;
  }
  if (base == 0) {
    if (*cp == '0')
      if (cp[1] == 'x' || cp[1] == 'X')
        radix = 16;
      else
        radix = 8;
    else
      radix = 10;
  }
  if (base == 16 && *cp == '0' && (cp[1] == 'x' || cp[1] == 'X'))
    cp += 2;
  sum = 0;
  for (;;) {
    digit = toupper(*(cp++));
    if (digit >= 'A')
      digit = digit - ('A' - 10);
    else
      digit -= '0';
    if (digit >= radix)
      break;
    psum = sum;
    sum = sum * radix + digit;
    if (sum < psum) {
      errno = ERANGE;
      sum = ULONG_MAX;
    }
  }
  if (sign) {
    sum = -sum;
  }
  if (endptr) {
    --cp;
    if (base == 0) {
      while (*cp == 'h' || *cp == 'u' || *cp == 'l' || *cp == 'L')
        ++cp;
    }
    *endptr = (char *)cp;
  }
  return (sum);
}
```