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

```asm
<strtoll>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rsi,(%rsp)
  cmp    $0x1,%edx
  je     L147
  mov    %edx,%ebx
  mov    %rdi,%r15
  cmp    $0x24,%edx
  ja     L147
  nopl   0x0(%rax,%rax,1)
L176:
  mov    %r15,%rbp
  movzbl (%r15),%r14d
  add    $0x1,%r15
  mov    %r14d,%edi
  call   <isspace@plt>
  mov    %rax,%r12
  test   %rax,%rax
  jne    L176
  cmp    $0x2d,%r14d
  je     L267
  movl   $0x0,0x18(%rsp)
  cmp    $0x2b,%r14d
  je     L73
L261:
  test   $0xffffffef,%ebx
  jne    L326
  cmp    $0x30,%r14d
  je     L240
  test   %ebx,%ebx
  jne    L326
  movq   $0xa,0x10(%rsp)
  mov    $0xa,%ebx
  jmp    L205
  nopl   (%rax)
L147:
  mov    (%rsp),%rax
  test   %rax,%rax
  je     L52
  mov    %r13,(%rax)
L52:
  mov    D0(%rip),%rax
  xor    %r12d,%r12d
  mov    (%rax),%edx
  mov    D68(%rip),%rax
  mov    %edx,(%rax)
L328:
  add    $0x28,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L326:
  movslq %ebx,%rax
  mov    %rax,0x10(%rsp)
L205:
  mov    0x18(%rsp),%eax
  test   %eax,%eax
  je     L289
  mov    D45(%rip),%rax
  mov    (%rax),%rax
  cqto
  idivq  0x10(%rsp)
  mov    %rax,0x8(%rsp)
  mov    %edx,%edi
  test   %rdx,%rdx
  jle    L16
  addq   $0x1,0x8(%rsp)
  sub    %ebx,%edi
L16:
  neg    %edi
  xor    %ebp,%ebp
  mov    %edi,0x1c(%rsp)
  jmp    L324
  nopl   0x0(%rax,%rax,1)
L302:
  cmp    %ecx,%ebx
  jle    L173
L81:
  cmp    $0xffffffff,%ebp
  je     L248
  cmp    0x8(%rsp),%r12
  jl     L292
  jne    L311
  cmp    0x1c(%rsp),%ecx
  jle    L311
L292:
  mov    D45(%rip),%rax
  mov    $0xffffffff,%ebp
  mov    (%rax),%r12
  mov    D17(%rip),%rax
  mov    (%rax),%edx
  mov    D68(%rip),%rax
  mov    %edx,(%rax)
L248:
  movzbl (%r15),%r14d
  add    $0x1,%r15
L324:
  mov    %r14d,%edi
  call   <isdigit@plt>
  lea    -0x30(%r14),%ecx
  test   %rax,%rax
  jne    L302
  mov    %r14d,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L173
  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,%ebx
  jg     L81
  nopl   0x0(%rax,%rax,1)
L173:
  mov    (%rsp),%rax
  test   %rax,%rax
  je     L328
  lea    -0x1(%r15),%rsi
  test   %ebp,%ebp
  cmovne %rsi,%r13
  mov    %r13,(%rax)
  jmp    L328
  nop
L311:
  imul   0x10(%rsp),%r12
  movslq %ecx,%rcx
  mov    0x18(%rsp),%ebp
  sub    %rcx,%r12
  jmp    L248
  nopl   (%rax)
L289:
  mov    D30(%rip),%rax
  xor    %ebp,%ebp
  mov    (%rax),%rax
  cqto
  idivq  0x10(%rsp)
  mov    %rax,0x8(%rsp)
  mov    %edx,0x18(%rsp)
  jmp    L274
  cs nopw 0x0(%rax,%rax,1)
L55:
  cmp    %ebx,%eax
  jge    L173
  cmp    $0xffffffff,%ebp
  je     L36
  cmp    0x8(%rsp),%r12
  jg     L96
  cmp    0x18(%rsp),%eax
  jle    L273
  cmp    0x8(%rsp),%r12
  jne    L273
L96:
  mov    D30(%rip),%rax
  mov    $0xffffffff,%ebp
  mov    (%rax),%r12
  mov    D17(%rip),%rax
  mov    (%rax),%edx
  mov    D68(%rip),%rax
  mov    %edx,(%rax)
L36:
  movzbl (%r15),%r14d
  add    $0x1,%r15
L274:
  mov    %r14d,%edi
  call   <isdigit@plt>
  mov    %rax,%r8
  lea    -0x30(%r14),%eax
  test   %r8,%r8
  jne    L55
  mov    %r14d,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L173
  mov    %r14d,%edi
  call   <isupper@plt>
  cmp    $0x1,%rax
  mov    %r14d,%eax
  sbb    %edx,%edx
  and    $0x20,%edx
  add    $0x37,%edx
  sub    %edx,%eax
  jmp    L55
  nopl   0x0(%rax)
L273:
  imul   0x10(%rsp),%r12
  cltq
  mov    $0x1,%ebp
  add    %rax,%r12
  jmp    L36
  nopw   0x0(%rax,%rax,1)
L73:
  movsbl (%r15),%r14d
  lea    0x2(%rbp),%r15
  jmp    L261
  nopl   (%rax)
L240:
  movzbl (%r15),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  je     L323
  test   %ebx,%ebx
  jne    L326
  movq   $0x8,0x10(%rsp)
  mov    $0x8,%ebx
  jmp    L205
  xchg   %ax,%ax
L267:
  movsbl (%r15),%r14d
  movl   $0x1,0x18(%rsp)
  lea    0x2(%rbp),%r15
  jmp    L261
L323:
  movsbl 0x1(%r15),%r14d
  mov    $0x10,%ebx
  add    $0x2,%r15
  movq   $0x10,0x10(%rsp)
  jmp    L205
```

assistant: ```c
long long strtoll(const char *nptr, char **endptr, int base) {
  const char *s;
  long long acc, cutoff;
  int c;
  int neg, any, cutlim;
  if (base < 0 || base == 1 || base > 36) {
    if (endptr != 0)
      *endptr = (char *)nptr;
    errno = EINVAL;
    return 0;
  }
  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 ? LLONG_MIN : LLONG_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 = LLONG_MIN;
        errno = ERANGE;
      } else {
        any = 1;
        acc *= base;
        acc -= c;
      }
    } else {
      if (acc > cutoff || (acc == cutoff && c > cutlim)) {
        any = -1;
        acc = LLONG_MAX;
        errno = ERANGE;
      } else {
        any = 1;
        acc *= base;
        acc += c;
      }
    }
  }
  if (endptr != 0)
    *endptr = (char *)(any ? s - 1 : nptr);
  return (acc);
}
```