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

```asm
<_strtoul>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x18(%rbp)
L188:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <_isspace@plt>
  test   %rax,%rax
  jne    L188
  cmpl   $0x2d,-0x28(%rbp)
  jne    L133
  movl   $0x1,-0x24(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x28(%rbp)
  jmp    L135
L133:
  movl   $0x0,-0x24(%rbp)
  cmpl   $0x2b,-0x28(%rbp)
  jne    L135
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x28(%rbp)
L135:
  cmpl   $0x0,-0x44(%rbp)
  je     L184
  cmpl   $0x10,-0x44(%rbp)
  jne    L305
L184:
  cmpl   $0x30,-0x28(%rbp)
  jne    L305
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x78,%al
  je     L230
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x58,%al
  jne    L305
L230:
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x28(%rbp)
  addq   $0x2,-0x18(%rbp)
  movl   $0x10,-0x44(%rbp)
L305:
  cmpl   $0x0,-0x44(%rbp)
  jne    L289
  cmpl   $0x30,-0x28(%rbp)
  jne    L200
  mov    $0x8,%eax
  jmp    L213
L200:
  mov    $0xa,%eax
L213:
  mov    %eax,-0x44(%rbp)
L289:
  mov    -0x44(%rbp),%eax
  movslq %eax,%rsi
  mov    $0xffffffff,%eax
  mov    $0x0,%edx
  div    %rsi
  mov    %rax,-0x8(%rbp)
  mov    -0x44(%rbp),%eax
  movslq %eax,%rcx
  mov    $0xffffffff,%eax
  mov    $0x0,%edx
  div    %rcx
  mov    %rdx,%rax
  mov    %eax,-0x1c(%rbp)
  movq   $0x0,-0x10(%rbp)
  movl   $0x0,-0x20(%rbp)
L36:
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <_isdigit@plt>
  test   %rax,%rax
  je     L288
  subl   $0x30,-0x28(%rbp)
  jmp    L8
L288:
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <_isalpha@plt>
  test   %rax,%rax
  je     L30
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <_isupper@plt>
  test   %rax,%rax
  je     L1
  mov    $0x37,%eax
  jmp    L76
L1:
  mov    $0x57,%eax
L76:
  sub    %eax,-0x28(%rbp)
L8:
  mov    -0x28(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jge    L232
  cmpl   $0x0,-0x20(%rbp)
  js     L42
  mov    -0x10(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  ja     L306
  mov    -0x10(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jne    L127
  mov    -0x28(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jle    L127
L306:
  movl   $0xffffffff,-0x20(%rbp)
  mov    $0xffffffff,%eax
  mov    %rax,-0x10(%rbp)
  mov    D2(%rip),%rax
  mov    (%rax),%edx
  mov    D14(%rip),%rax
  mov    %edx,(%rax)
  jmp    L145
L127:
  movl   $0x1,-0x20(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  mov    -0x10(%rbp),%rdx
  imul   %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  add    %rax,-0x10(%rbp)
  jmp    L145
L42:
  nop
L145:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x28(%rbp)
  jmp    L36
L30:
  nop
  jmp    L169
L232:
  nop
L169:
  cmpl   $0x0,-0x24(%rbp)
  je     L101
  cmpl   $0x0,-0x20(%rbp)
  jle    L101
  negq   -0x10(%rbp)
L101:
  cmpq   $0x0,-0x40(%rbp)
  je     L27
  cmpl   $0x0,-0x20(%rbp)
  je     L2
  mov    -0x18(%rbp),%rax
  sub    $0x1,%rax
  jmp    L126
L2:
  mov    -0x38(%rbp),%rax
L126:
  mov    -0x40(%rbp),%rdx
  mov    %rax,(%rdx)
L27:
  mov    -0x10(%rbp),%rax
  leave
  ret
```

assistant: ```c
unsigned long _strtoul(const char *nptr, char **endptr, int base) {
  const char *s;
  unsigned long acc, cutoff;
  int c;
  int neg, any, cutlim;
  s = nptr;
  do {
    c = (unsigned char)*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')) {
    c = s[1];
    s += 2;
    base = 16;
  }
  if (base == 0)
    base = c == '0' ? 8 : 10;
  cutoff = 4294967295UL / (unsigned long)base;
  cutlim = 4294967295UL % (unsigned long)base;
  for (acc = 0, any = 0;; c = (unsigned char)*s++) {
    if (_isdigit(c))
      c -= '0';
    else if (_isalpha(c))
      c -= _isupper(c) ? 'A' - 10 : 'a' - 10;
    else
      break;
    if (c >= base)
      break;
    if (any < 0)
      continue;
    if (acc > cutoff || (acc == cutoff && c > cutlim)) {
      any = -1;
      acc = 4294967295UL;
      errno = ERANGE;
    } else {
      any = 1;
      acc *= (unsigned long)base;
      acc += c;
    }
  }
  if (neg && any > 0)
    acc = -acc;
  if (endptr != 0)
    *endptr = (char *)(any ? s - 1 : nptr);
  return (acc);
}
```