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

```asm
<wcstoull>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  nopl   (%rax)
L213:
  mov    %rbx,%r15
  mov    (%rbx),%r14d
  add    $0x4,%rbx
  mov    %r14d,%edi
  call   <iswspace@plt>
  test   %rax,%rax
  jne    L213
  cmp    $0x2d,%r14d
  je     L26
  xor    %r8d,%r8d
  cmp    $0x2b,%r14d
  je     L127
L301:
  test   $0xffffffef,%ebp
  je     L244
L264:
  lea    -0x2(%rbp),%edx
  xor    %eax,%eax
  cmp    $0x22,%edx
  jbe    L222
L48:
  mov    D18(%rip),%rdx
  mov    (%rdx),%ecx
  mov    D34(%rip),%rdx
  mov    %ecx,(%rdx)
  test   %r13,%r13
  je     L52
L243:
  mov    %r12,0x0(%r13)
L52:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L244:
  cmp    $0x30,%r14d
  je     L104
  test   %ebp,%ebp
  jne    L264
  mov    $0xa,%ebp
L222:
  mov    D11(%rip),%rax
  xor    %esi,%esi
  movslq %ebp,%r10
  mov    (%rax),%r9d
  mov    %r9d,%eax
  cltd
  idiv   %ebp
  movslq %eax,%rdi
  xor    %eax,%eax
  jmp    L245
  nop
L98:
  lea    -0x37(%r14),%ecx
L47:
  cmp    %ebp,%ecx
  jge    L57
L55:
  test   %esi,%esi
  js     L270
  cmp    %rdi,%rax
  ja     L270
  jne    L201
  mov    $0xffffffff,%esi
  cmp    %edx,%ecx
  jle    L201
L22:
  mov    (%rbx),%r14d
  add    $0x4,%rbx
L245:
  lea    -0x30(%r14),%ecx
  cmp    $0x9,%ecx
  jbe    L47
  lea    -0x41(%r14),%ecx
  cmp    $0x19,%ecx
  jbe    L98
  lea    -0x61(%r14),%ecx
  cmp    $0x19,%ecx
  ja     L57
  lea    -0x57(%r14),%ecx
  cmp    %ebp,%ecx
  jl     L55
  cs nopw 0x0(%rax,%rax,1)
L57:
  cmp    $0xffffffff,%esi
  je     L25
  test   %esi,%esi
  je     L48
  test   %r8d,%r8d
  je     L238
  neg    %rax
  test   %r13,%r13
  je     L52
L284:
  lea    -0x4(%rbx),%r12
  jmp    L243
  nopl   0x0(%rax,%rax,1)
L270:
  mov    $0xffffffff,%esi
  jmp    L22
  nopw   0x0(%rax,%rax,1)
L201:
  imul   %r10,%rax
  movslq %ecx,%rcx
  mov    $0x1,%esi
  add    %rcx,%rax
  jmp    L22
  nopl   0x0(%rax)
L25:
  mov    D12(%rip),%rdx
  movslq %r9d,%rax
  mov    (%rdx),%ecx
  mov    D34(%rip),%rdx
  mov    %ecx,(%rdx)
  test   %r13,%r13
  je     L52
  lea    -0x4(%rbx),%r12
  jmp    L243
  nop
L127:
  mov    (%rbx),%r14d
  lea    0x8(%r15),%rbx
  jmp    L301
  nopl   0x0(%rax)
L26:
  mov    (%rbx),%r14d
  mov    $0x1,%r8d
  lea    0x8(%r15),%rbx
  jmp    L301
  nopw   0x0(%rax,%rax,1)
L104:
  mov    (%rbx),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%eax
  jne    L183
  mov    0x4(%rbx),%r14d
  mov    $0x10,%ebp
  add    $0x8,%rbx
  jmp    L222
  nopl   0x0(%rax)
L238:
  test   %r13,%r13
  jne    L284
  jmp    L52
L183:
  test   %ebp,%ebp
  jne    L264
  mov    $0x8,%ebp
  jmp    L222
```

assistant: ```c
unsigned long long wcstoull(const wchar_t *__restrict nptr, wchar_t **__restrict endptr, int base) {
  const wchar_t *s;
  unsigned long long acc;
  wchar_t c;
  unsigned long long cutoff;
  int neg, any, cutlim;
  s = nptr;
  do {
    c = *s++;
  } while (iswspace(c));
  if (c == L'-') {
    neg = 1;
    c = *s++;
  } else {
    neg = 0;
    if (c == L'+')
      c = *s++;
  }
  if ((base == 0 || base == 16) && c == L'0' && (*s == L'x' || *s == L'X')) {
    c = s[1];
    s += 2;
    base = 16;
  }
  if (base == 0)
    base = c == L'0' ? 8 : 10;
  acc = any = 0;
  if (base < 2 || base > 36)
    goto noconv;
  cutoff = ULLONG_MAX / base;
  cutlim = ULLONG_MAX % base;
  for (;; c = *s++) {
    if (c >= L'0' && c <= L'9')
      c -= L'0';
    else if (c >= L'A' && c <= L'Z')
      c -= L'A' - 10;
    else if (c >= L'a' && c <= L'z')
      c -= L'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 = ULLONG_MAX;
    errno = ERANGE;
  } else if (!any) {
  noconv:
    errno = EINVAL;
  } else if (neg)
    acc = -acc;
  if (endptr != NULL)
    *endptr = (wchar_t *)(any ? s - 1 : nptr);
  return (acc);
}
```