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

```asm
<strtol>:
  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,-0x10(%rbp)
  movl   $0x0,-0x20(%rbp)
L91:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L91
  cmpl   $0x2d,-0x28(%rbp)
  jne    L217
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x28(%rbp)
  movl   $0x1,-0x20(%rbp)
  jmp    L281
L217:
  cmpl   $0x2b,-0x28(%rbp)
  jne    L281
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x28(%rbp)
L281:
  cmpl   $0x30,-0x28(%rbp)
  jne    L315
  cmpl   $0x0,-0x44(%rbp)
  je     L37
  cmpl   $0x10,-0x44(%rbp)
  jne    L315
L37:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x78,%al
  je     L292
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x58,%al
  jne    L315
L292:
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x28(%rbp)
  addq   $0x2,-0x10(%rbp)
  movl   $0x10,-0x44(%rbp)
L315:
  cmpl   $0x0,-0x44(%rbp)
  jne    L232
  cmpl   $0x30,-0x28(%rbp)
  jne    L250
  mov    $0x8,%eax
  jmp    L301
L250:
  mov    $0xa,%eax
L301:
  mov    %eax,-0x44(%rbp)
L232:
  cmpl   $0x0,-0x20(%rbp)
  je     L119
  mov    D13(%rip),%rax
  mov    (%rax),%rax
  neg    %rax
  jmp    L285
L119:
  mov    D35(%rip),%rax
  mov    (%rax),%rax
L285:
  mov    %rax,-0x8(%rbp)
  mov    -0x44(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x8(%rbp),%rax
  mov    $0x0,%edx
  div    %rcx
  mov    %rdx,%rax
  mov    %eax,-0x1c(%rbp)
  mov    -0x44(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%rax
  mov    $0x0,%edx
  div    %rsi
  mov    %rax,-0x8(%rbp)
  movq   $0x0,-0x18(%rbp)
  movl   $0x0,-0x24(%rbp)
L192:
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L266
  subl   $0x30,-0x28(%rbp)
  jmp    L84
L266:
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L63
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <isupper@plt>
  test   %rax,%rax
  je     L90
  mov    $0x37,%eax
  jmp    L279
L90:
  mov    $0x57,%eax
L279:
  sub    %eax,-0x28(%rbp)
L84:
  mov    -0x28(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jge    L239
  cmpl   $0x0,-0x24(%rbp)
  js     L151
  mov    -0x18(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  ja     L151
  mov    -0x18(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jne    L39
  mov    -0x28(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jle    L39
L151:
  movl   $0xffffffff,-0x24(%rbp)
  jmp    L190
L39:
  movl   $0x1,-0x24(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  mov    -0x18(%rbp),%rdx
  imul   %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  add    %rax,-0x18(%rbp)
L190:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x28(%rbp)
  jmp    L192
L63:
  nop
  jmp    L75
L239:
  nop
L75:
  cmpl   $0x0,-0x24(%rbp)
  jns    L113
  cmpl   $0x0,-0x20(%rbp)
  je     L19
  mov    D13(%rip),%rax
  mov    (%rax),%rax
  jmp    L112
L19:
  mov    D35(%rip),%rax
  mov    (%rax),%rax
L112:
  mov    %rax,-0x18(%rbp)
  jmp    L148
L113:
  cmpl   $0x0,-0x20(%rbp)
  je     L148
  negq   -0x18(%rbp)
L148:
  cmpq   $0x0,-0x40(%rbp)
  je     L9
  cmpl   $0x0,-0x24(%rbp)
  je     L16
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  jmp    L106
L16:
  mov    -0x38(%rbp),%rax
L106:
  mov    -0x40(%rbp),%rdx
  mov    %rax,(%rdx)
L9:
  mov    -0x18(%rbp),%rax
  leave
  ret
```

assistant: ```c
long strtol(const char *number_string, char **end_pointer, int base) {
  unsigned long acc, cutoff;
  int c, any, cutlim;
  const char *s = number_string;
  bool is_negative = false;
  do {
    c = *s++;
  } while (isspace(c));
  if (c == '-') {
    c = *s++;
    is_negative = true;
  } else if (c == '+')
    c = *s++;
  if (c == '0' && (base == 0 || base == 16) && (*s == 'x' || *s == 'X')) {
    c = s[1];
    s += 2;
    base = 16;
  }
  if (base == 0)
    base = c == '0' ? 8 : 10;
  cutoff = is_negative ? -(unsigned long)INT32_MIN : INT32_MAX;
  cutlim = cutoff % (unsigned long)base;
  cutoff /= base;
  for (acc = 0, any = 0;; c = *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 || acc > cutoff || (acc == cutoff && c > cutlim))
      any = -1;
    else {
      any = 1;
      acc *= base;
      acc += c;
    }
  }
  if (any < 0)
    acc = is_negative ? INT32_MIN : INT32_MAX;
  else if (is_negative)
    acc = -acc;
  if (end_pointer != 0)
    *end_pointer = (char *)(any ? s - 1 : number_string);
  return acc;
}
```