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

```asm
<strtol>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x10(%rsp)
  nopw   0x0(%rax,%rax,1)
L198:
  mov    %r15,%rbx
  movsbl (%r15),%r14d
  add    $0x1,%r15
  mov    %r14d,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L198
  cmp    $0x2d,%r14d
  je     L63
  movl   $0x0,0xc(%rsp)
  cmp    $0x2b,%r14d
  je     L324
L304:
  cmp    $0x30,%r14d
  je     L289
  test   %r13d,%r13d
  jne    L329
  mov    0xc(%rsp),%esi
  movq   $0xa,(%rsp)
  mov    $0xa,%r13d
  test   %esi,%esi
  jne    L292
L30:
  mov    D17(%rip),%rax
  mov    (%rax),%rax
  jmp    L167
  nopl   0x0(%rax)
L289:
  test   $0xffffffef,%r13d
  je     L311
L329:
  movslq %r13d,%rax
  mov    %rax,(%rsp)
L143:
  mov    0xc(%rsp),%esi
  test   %esi,%esi
  je     L30
L292:
  mov    D11(%rip),%rax
  mov    (%rax),%rax
  neg    %rax
L167:
  xor    %edx,%edx
  xor    %ebx,%ebx
  xor    %r12d,%r12d
  divq   (%rsp)
  mov    %edx,0x8(%rsp)
  mov    %rax,%rbp
  jmp    L267
  nopl   (%rax)
L297:
  cmp    %ecx,%r13d
  jle    L217
L22:
  test   %ebx,%ebx
  js     L193
  cmp    %rbp,%r12
  ja     L193
  jne    L32
  mov    $0xffffffff,%ebx
  cmp    0x8(%rsp),%ecx
  jle    L32
L286:
  movsbl (%r15),%r14d
  add    $0x1,%r15
L267:
  mov    %r14d,%edi
  call   <isdigit@plt>
  lea    -0x30(%r14),%ecx
  test   %rax,%rax
  jne    L297
  mov    %r14d,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L217
  mov    %r14d,%edi
  call   <isupper@plt>
  mov    %r14d,%ecx
  cmp    $0x1,%rax
  sbb    %eax,%eax
  and    $0x20,%eax
  add    $0x37,%eax
  sub    %eax,%ecx
  cmp    %ecx,%r13d
  jg     L22
L217:
  cmp    $0xffffffff,%ebx
  je     L228
  mov    0xc(%rsp),%edx
  mov    %r12,%rax
  neg    %rax
  test   %edx,%edx
  cmovne %rax,%r12
  cmpq   $0x0,0x10(%rsp)
  je     L254
  test   %ebx,%ebx
  jne    L178
L11:
  mov    0x10(%rsp),%rax
  mov    0x18(%rsp),%rdx
  mov    %rdx,(%rax)
L254:
  add    $0x28,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L193:
  mov    $0xffffffff,%ebx
  jmp    L286
  nopw   0x0(%rax,%rax,1)
L32:
  imul   (%rsp),%r12
  movslq %ecx,%rcx
  mov    $0x1,%ebx
  add    %rcx,%r12
  jmp    L286
  nopl   (%rax)
L324:
  movsbl (%r15),%r14d
  lea    0x2(%rbx),%r15
  jmp    L304
  nopl   (%rax)
L228:
  mov    0xc(%rsp),%ecx
  test   %ecx,%ecx
  jne    L308
  mov    D17(%rip),%rax
  mov    (%rax),%r12
L3:
  cmpq   $0x0,0x10(%rsp)
  je     L254
L178:
  lea    -0x1(%r15),%rax
  mov    %rax,0x18(%rsp)
  jmp    L11
  nopl   (%rax)
L63:
  movsbl (%r15),%r14d
  movl   $0x1,0xc(%rsp)
  lea    0x2(%rbx),%r15
  jmp    L304
  nopl   (%rax)
L308:
  mov    D11(%rip),%rax
  mov    (%rax),%r12
  jmp    L3
  nopl   0x0(%rax)
L311:
  movzbl (%r15),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  jne    L5
  movsbl 0x1(%r15),%r14d
  mov    $0x10,%r13d
  add    $0x2,%r15
  movq   $0x10,(%rsp)
  jmp    L143
L5:
  test   %r13d,%r13d
  jne    L329
  movq   $0x8,(%rsp)
  mov    $0x8,%r13d
  jmp    L143
```

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;
}
```