user: Demonstrate the C code that generates the assembly output below:

```asm
<strtoimax>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x10(%rsp)
  mov    %edx,%r13d
  mov    %rdi,%rbp
L120:
  mov    %rbp,%r12
  add    $0x1,%rbp
  movzbl -0x1(%rbp),%ebx
  mov    %ebx,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L120
  cmp    $0x2d,%ebx
  je     L244
  movl   $0x0,0x8(%rsp)
  cmp    $0x2b,%ebx
  je     L130
L199:
  test   $0xffffffef,%r13d
  jne    L200
  cmp    $0x30,%ebx
  je     L114
L200:
  test   %r13d,%r13d
  jne    L68
  cmp    $0x30,%ebx
  setne  %r13b
  movzbl %r13b,%r13d
  lea    0x8(%r13,%r13,1),%r13d
L68:
  cmpl   $0x0,0x8(%rsp)
  je     L0
  mov    D8(%rip),%rax
  mov    (%rax),%eax
  cltd
  idiv   %r13d
  mov    %edx,%ecx
  mov    %eax,%r15d
  test   %edx,%edx
  jle    L219
  sub    %r13d,%ecx
  lea    0x1(%rax),%r15d
L219:
  neg    %ecx
  mov    %ecx,0xc(%rsp)
  jmp    L13
L244:
  movsbl 0x0(%rbp),%ebx
  lea    0x2(%r12),%rbp
  movl   $0x1,0x8(%rsp)
  jmp    L199
L130:
  movsbl 0x0(%rbp),%ebx
  lea    0x2(%r12),%rbp
  jmp    L199
L114:
  movzbl 0x0(%rbp),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  jne    L236
  movsbl 0x1(%rbp),%ebx
  add    $0x2,%rbp
  mov    $0x10,%r13d
  jmp    L68
L236:
  mov    $0x30,%ebx
  jmp    L200
L0:
  mov    D79(%rip),%rax
  mov    (%rax),%eax
  cltd
  idiv   %r13d
  mov    %edx,0xc(%rsp)
  mov    %eax,%r15d
L13:
  mov    $0x0,%r14d
  mov    $0x0,%r12d
  jmp    L119
L9:
  mov    %ebx,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L24
  mov    %ebx,%edi
  call   <isupper@plt>
  cmp    $0x1,%rax
  sbb    %eax,%eax
  and    $0x20,%eax
  add    $0x37,%eax
  sub    %eax,%ebx
  jmp    L1
L50:
  mov    D8(%rip),%rax
  mov    (%rax),%r12d
  mov    D3(%rip),%rax
  mov    (%rax),%edx
  mov    D47(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%r14d
L142:
  add    $0x1,%rbp
  movzbl -0x1(%rbp),%ebx
L119:
  mov    %ebx,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L9
  sub    $0x30,%ebx
L1:
  cmp    %ebx,%r13d
  jle    L24
  test   %r14d,%r14d
  js     L142
  cmpl   $0x0,0x8(%rsp)
  je     L149
  cmp    %r15d,%r12d
  jl     L50
  jne    L32
  cmp    0xc(%rsp),%ebx
  jg     L50
L32:
  imul   %r13d,%r12d
  sub    %ebx,%r12d
  mov    0x8(%rsp),%r14d
  jmp    L142
L149:
  cmp    %r15d,%r12d
  jg     L10
  jne    L243
  cmp    0xc(%rsp),%ebx
  jle    L243
L10:
  mov    D79(%rip),%rax
  mov    (%rax),%r12d
  mov    D3(%rip),%rax
  mov    (%rax),%edx
  mov    D47(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%r14d
  jmp    L142
L243:
  imul   %r13d,%r12d
  add    %ebx,%r12d
  mov    $0x1,%r14d
  jmp    L142
L24:
  mov    0x10(%rsp),%rax
  test   %rax,%rax
  je     L228
  sub    $0x1,%rbp
  test   %r14d,%r14d
  cmove  0x18(%rsp),%rbp
  mov    %rbp,(%rax)
L228:
  mov    %r12d,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

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