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

```asm
<strtoul>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %al,-0x19(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  jmp    L16
L152:
  addq   $0x1,-0x10(%rbp)
L16:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L152
  movb   $0x0,-0x1b(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L243
  addq   $0x1,-0x10(%rbp)
  jmp    L33
L243:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L33
  addq   $0x1,-0x10(%rbp)
  movb   $0x1,-0x1b(%rbp)
L33:
  cmpl   $0x0,-0x34(%rbp)
  jne    L86
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  jne    L196
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x78,%al
  je     L54
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x58,%al
  jne    L236
L54:
  movb   $0x10,-0x19(%rbp)
  jmp    L86
L236:
  movb   $0x8,-0x19(%rbp)
  jmp    L86
L196:
  movb   $0xa,-0x19(%rbp)
L86:
  cmpl   $0x10,-0x34(%rbp)
  jne    L157
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  jne    L157
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x78,%al
  je     L240
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x58,%al
  jne    L157
L240:
  addq   $0x2,-0x10(%rbp)
L157:
  movq   $0x0,-0x18(%rbp)
L127:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  mov    %al,-0x1a(%rbp)
  cmpb   $0x40,-0x1a(%rbp)
  jbe    L17
  subb   $0x37,-0x1a(%rbp)
  jmp    L18
L17:
  subb   $0x30,-0x1a(%rbp)
L18:
  movzbl -0x1a(%rbp),%eax
  cmp    -0x19(%rbp),%al
  jae    L129
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  movzbl -0x19(%rbp),%eax
  imul   -0x18(%rbp),%rax
  mov    %rax,%rdx
  movzbl -0x1a(%rbp),%eax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jae    L127
  mov    D7(%rip),%rax
  mov    (%rax),%edx
  mov    D1(%rip),%rax
  mov    %edx,(%rax)
  mov    D18(%rip),%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L127
L129:
  nop
  cmpb   $0x0,-0x1b(%rbp)
  je     L44
  negq   -0x18(%rbp)
L44:
  cmpq   $0x0,-0x30(%rbp)
  je     L165
  subq   $0x1,-0x10(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  jne    L202
  jmp    L52
L43:
  addq   $0x1,-0x10(%rbp)
L52:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x68,%al
  je     L43
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x75,%al
  je     L43
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x6c,%al
  je     L43
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x4c,%al
  je     L43
L202:
  mov    -0x30(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
L165:
  mov    -0x18(%rbp),%rax
  leave
  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);
}
```