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

```asm
<strtoimax>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x28,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x10(%rsp)
  nopl   0x0(%rax)
L118:
  mov    %r13,%rbp
  movzbl 0x0(%r13),%r15d
  add    $0x1,%r13
  mov    %r15d,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L118
  cmp    $0x2d,%r15d
  je     L65
  cmp    $0x2b,%r15d
  je     L218
  mov    %ebx,%eax
  and    $0xffffffef,%eax
  jne    L57
L173:
  cmp    $0x30,%r15d
  je     L269
L80:
  test   %ebx,%ebx
  mov    $0xa,%edx
  cmove  %edx,%ebx
L24:
  test   %eax,%eax
  je     L57
L210:
  mov    D56(%rip),%rax
  mov    (%rax),%eax
  cltd
  idiv   %ebx
  mov    %eax,0x8(%rsp)
  test   %edx,%edx
  jle    L293
  addl   $0x1,0x8(%rsp)
  sub    %ebx,%edx
L293:
  neg    %edx
  mov    $0x1,%r14d
  mov    %edx,0xc(%rsp)
  jmp    L91
  nopl   (%rax)
L57:
  mov    D11(%rip),%rax
  xor    %r14d,%r14d
  mov    (%rax),%eax
  cltd
  idiv   %ebx
  mov    %edx,0xc(%rsp)
  mov    %eax,0x8(%rsp)
L91:
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  jmp    L40
  xchg   %ax,%ax
L107:
  cmp    0x8(%rsp),%r12d
  jl     L49
  jne    L19
  cmp    0xc(%rsp),%ecx
  jle    L19
L49:
  mov    D56(%rip),%rax
L314:
  mov    (%rax),%r12d
  mov    D25(%rip),%rax
  mov    $0xffffffff,%ebp
  mov    (%rax),%edx
  mov    D52(%rip),%rax
  mov    %edx,(%rax)
L61:
  movzbl 0x0(%r13),%r15d
  add    $0x1,%r13
L40:
  mov    %r15d,%edi
  call   <isdigit@plt>
  lea    -0x30(%r15),%ecx
  test   %rax,%rax
  je     L312
  cmp    %ebx,%ecx
  jge    L301
L67:
  cmp    $0xffffffff,%ebp
  je     L61
  test   %r14d,%r14d
  jne    L107
  cmp    0x8(%rsp),%r12d
  jg     L95
  jne    L203
  cmp    0xc(%rsp),%ecx
  jle    L203
L95:
  mov    D11(%rip),%rax
  jmp    L314
  nopl   0x0(%rax,%rax,1)
L312:
  mov    %r15d,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L301
  mov    %r15d,%edi
  call   <isupper@plt>
  mov    %r15d,%ecx
  cmp    $0x1,%rax
  sbb    %eax,%eax
  and    $0x20,%eax
  add    $0x37,%eax
  sub    %eax,%ecx
  cmp    %ebx,%ecx
  jl     L67
L301:
  mov    0x10(%rsp),%rax
  test   %rax,%rax
  je     L143
  lea    -0x1(%r13),%rsi
  test   %ebp,%ebp
  cmove  0x18(%rsp),%rsi
  mov    %rsi,(%rax)
L143:
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L203:
  imul   %ebx,%r12d
  mov    $0x1,%ebp
  add    %ecx,%r12d
  jmp    L61
  nopl   0x0(%rax)
L19:
  imul   %ebx,%r12d
  mov    %r14d,%ebp
  sub    %ecx,%r12d
  jmp    L61
  nop
L218:
  mov    %ebx,%eax
  movsbl 0x0(%r13),%r15d
  lea    0x2(%rbp),%r13
  and    $0xffffffef,%eax
  je     L173
  jmp    L57
  nopl   0x0(%rax)
L65:
  add    $0x2,%rbp
  movsbl 0x0(%r13),%r15d
  mov    %rbp,%r13
  test   $0xffffffef,%ebx
  jne    L210
  mov    $0x1,%eax
  cmp    $0x30,%r15d
  jne    L80
L269:
  movzbl 0x0(%r13),%edx
  and    $0xffffffdf,%edx
  cmp    $0x58,%dl
  jne    L226
  movsbl 0x1(%r13),%r15d
  mov    $0x10,%ebx
  add    $0x2,%r13
  jmp    L24
L226:
  test   %ebx,%ebx
  mov    $0x8,%edx
  cmove  %edx,%ebx
  jmp    L24
```

assistant: ```c
intmax_t strtoimax(const char *nptr, char **endptr, int base) {
  const char *s;
  intmax_t 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 = neg ? INTMAX_MIN : INTMAX_MAX;
  cutlim = cutoff % base;
  cutoff /= base;
  if (neg) {
    if (cutlim > 0) {
      cutlim -= base;
      cutoff += 1;
    }
    cutlim = -cutlim;
  }
  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 (neg) {
      if (acc < cutoff || (acc == cutoff && c > cutlim)) {
        any = -1;
        acc = INTMAX_MIN;
        errno = ERANGE;
      } else {
        any = 1;
        acc *= base;
        acc -= c;
      }
    } else {
      if (acc > cutoff || (acc == cutoff && c > cutlim)) {
        any = -1;
        acc = INTMAX_MAX;
        errno = ERANGE;
      } else {
        any = 1;
        acc *= base;
        acc += c;
      }
    }
  }
  if (endptr != 0)
    *endptr = (char *)(any ? s - 1 : nptr);
  return (acc);
}
```