user: 请从给定的汇编指令推导出C源代码:

```asm
<strtoll>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x8(%rsp)
  nopl   0x0(%rax)
L209:
  mov    %r15,%rbx
  movzbl (%r15),%r13d
  add    $0x1,%r15
  mov    %r13d,%edi
  call   <isspace@plt>
  mov    %rax,%r12
  test   %rax,%rax
  jne    L209
  mov    %ebp,%eax
  and    $0xffffffef,%eax
  cmp    $0x2d,%r13d
  je     L121
  cmp    $0x2b,%r13d
  je     L118
  test   %eax,%eax
  jne    L167
L309:
  cmp    $0x30,%r13d
  je     L369
L349:
  test   %ebp,%ebp
  jne    L47
  movq   $0xa,(%rsp)
  mov    $0xa,%ebp
L352:
  test   %eax,%eax
  je     L255
L261:
  mov    D79(%rip),%rax
  mov    (%rax),%rax
  cqto
  idivq  (%rsp)
  mov    %edx,%edi
  mov    %rax,%r14
  test   %rdx,%rdx
  jle    L277
  sub    %ebp,%edi
  add    $0x1,%r14
L277:
  neg    %edi
  xor    %ebx,%ebx
  mov    %edi,0x14(%rsp)
  jmp    L359
  nopl   (%rax)
L338:
  cmp    %ebp,%ecx
  jge    L14
L179:
  cmp    $0xffffffff,%ebx
  je     L117
  cmp    %r14,%r12
  jl     L328
  jne    L336
  cmp    0x14(%rsp),%ecx
  jle    L336
L328:
  mov    D79(%rip),%rax
  mov    $0xffffffff,%ebx
  mov    (%rax),%r12
  mov    D11(%rip),%rax
  mov    (%rax),%edx
  mov    D50(%rip),%rax
  mov    %edx,(%rax)
L117:
  movzbl (%r15),%r13d
  add    $0x1,%r15
L359:
  mov    %r13d,%edi
  call   <isdigit@plt>
  lea    -0x30(%r13),%ecx
  test   %rax,%rax
  jne    L338
  mov    %r13d,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L14
  mov    %r13d,%edi
  call   <isupper@plt>
  mov    %r13d,%ecx
  cmp    $0x1,%rax
  sbb    %eax,%eax
  and    $0x20,%eax
  add    $0x37,%eax
  sub    %eax,%ecx
  cmp    %ebp,%ecx
  jl     L179
  xchg   %ax,%ax
L14:
  mov    0x8(%rsp),%rax
  test   %rax,%rax
  je     L245
  lea    -0x1(%r15),%rsi
  test   %ebx,%ebx
  cmove  0x18(%rsp),%rsi
  mov    %rsi,(%rax)
L245:
  add    $0x28,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L167:
  movslq %ebp,%rax
  mov    %rax,(%rsp)
L255:
  mov    D53(%rip),%rax
  xor    %ebx,%ebx
  mov    (%rax),%rax
  cqto
  idivq  (%rsp)
  mov    %edx,0x14(%rsp)
  mov    %rax,%r14
  jmp    L270
  nopw   0x0(%rax,%rax,1)
L71:
  cmp    %eax,%ebp
  jle    L14
  cmp    $0xffffffff,%ebx
  je     L102
  cmp    %r14,%r12
  jg     L191
  cmp    0x14(%rsp),%eax
  jle    L355
  cmp    %r14,%r12
  jne    L355
L191:
  mov    D53(%rip),%rax
  mov    $0xffffffff,%ebx
  mov    (%rax),%r12
  mov    D11(%rip),%rax
  mov    (%rax),%edx
  mov    D50(%rip),%rax
  mov    %edx,(%rax)
L102:
  movzbl (%r15),%r13d
  add    $0x1,%r15
L270:
  mov    %r13d,%edi
  call   <isdigit@plt>
  mov    %rax,%r8
  lea    -0x30(%r13),%eax
  test   %r8,%r8
  jne    L71
  mov    %r13d,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L14
  mov    %r13d,%edi
  call   <isupper@plt>
  cmp    $0x1,%rax
  mov    %r13d,%eax
  sbb    %edx,%edx
  and    $0x20,%edx
  add    $0x37,%edx
  sub    %edx,%eax
  jmp    L71
  nopl   (%rax)
L118:
  movsbl (%r15),%r13d
  lea    0x2(%rbx),%r15
  test   %eax,%eax
  je     L309
  jmp    L167
  nopl   (%rax)
L336:
  imul   (%rsp),%r12
  movslq %ecx,%rcx
  mov    $0x1,%ebx
  sub    %rcx,%r12
  jmp    L117
  nopl   (%rax)
L355:
  imul   (%rsp),%r12
  cltq
  mov    $0x1,%ebx
  add    %rax,%r12
  jmp    L102
  nopl   0x0(%rax)
L121:
  movsbl (%r15),%r13d
  add    $0x2,%rbx
  test   %eax,%eax
  jne    L67
  mov    %rbx,%r15
  mov    $0x1,%eax
  cmp    $0x30,%r13d
  jne    L349
L369:
  movzbl (%r15),%edx
  and    $0xffffffdf,%edx
  cmp    $0x58,%dl
  jne    L268
  movsbl 0x1(%r15),%r13d
  mov    $0x10,%ebp
  add    $0x2,%r15
  movq   $0x10,(%rsp)
  jmp    L352
L268:
  test   %ebp,%ebp
  jne    L47
  movq   $0x8,(%rsp)
  mov    $0x8,%ebp
  jmp    L352
L47:
  movslq %ebp,%rsi
  mov    %rsi,(%rsp)
  jmp    L352
L67:
  movslq %ebp,%rax
  mov    %rbx,%r15
  mov    %rax,(%rsp)
  jmp    L261
```

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