user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<wcstoull>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r14
  mov    %edx,%r12d
  mov    %rdi,%rbp
L290:
  mov    %rbp,%r15
  add    $0x4,%rbp
  mov    -0x4(%rbp),%ebx
  mov    %ebx,%edi
  call   <iswspace@plt>
  test   %rax,%rax
  jne    L290
  cmp    $0x2d,%ebx
  je     L268
  movl   $0x0,0xc(%rsp)
  cmp    $0x2b,%ebx
  je     L135
L119:
  test   $0xffffffef,%r12d
  jne    L12
  cmp    $0x30,%ebx
  je     L285
L12:
  test   %r12d,%r12d
  jne    L159
  cmp    $0x30,%ebx
  setne  %r12b
  movzbl %r12b,%r12d
  lea    0x8(%r12,%r12,1),%r12d
L294:
  mov    D23(%rip),%rax
  mov    (%rax),%r10d
  mov    %r10d,%eax
  cltd
  idiv   %r12d
  movslq %eax,%r8
  mov    $0x0,%ecx
  mov    $0x0,%eax
  mov    $0xffffffff,%r9d
  movslq %r12d,%r15
  mov    $0x1,%r11d
  jmp    L109
L268:
  mov    0x0(%rbp),%ebx
  lea    0x8(%r15),%rbp
  movl   $0x1,0xc(%rsp)
  jmp    L119
L135:
  mov    0x0(%rbp),%ebx
  lea    0x8(%r15),%rbp
  jmp    L119
L285:
  mov    0x0(%rbp),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%eax
  jne    L176
  mov    0x4(%rbp),%ebx
  add    $0x8,%rbp
  mov    $0x10,%r12d
  jmp    L294
L159:
  lea    -0x2(%r12),%edx
  mov    $0x0,%eax
  cmp    $0x22,%edx
  jbe    L294
L277:
  mov    D1(%rip),%rdx
  mov    (%rdx),%ecx
  mov    D37(%rip),%rdx
  mov    %ecx,(%rdx)
  test   %r14,%r14
  je     L103
L51:
  mov    %r13,(%r14)
L103:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L144:
  lea    -0x41(%rbx),%esi
  cmp    $0x19,%esi
  ja     L221
  sub    $0x37,%ebx
  jmp    L55
L221:
  sub    $0x61,%edi
  cmp    $0x19,%edi
  ja     L90
  sub    $0x57,%ebx
  jmp    L55
L8:
  mov    %r9d,%ecx
L13:
  add    $0x4,%rbp
  mov    -0x4(%rbp),%ebx
L109:
  mov    %ebx,%edi
  lea    -0x30(%rbx),%esi
  cmp    $0x9,%esi
  ja     L144
  mov    %esi,%ebx
L55:
  cmp    %r12d,%ebx
  jge    L90
  test   %ecx,%ecx
  js     L8
  cmp    %r8,%rax
  ja     L8
  jne    L271
  mov    %r9d,%ecx
  cmp    %edx,%ebx
  jg     L13
L271:
  imul   %r15,%rax
  movslq %ebx,%rbx
  add    %rbx,%rax
  mov    %r11d,%ecx
  jmp    L13
L90:
  test   %ecx,%ecx
  js     L24
  je     L277
  mov    %rax,%rdx
  neg    %rdx
  cmpl   $0x0,0xc(%rsp)
  cmovne %rdx,%rax
  jmp    L9
L24:
  movslq %r10d,%rax
  mov    D24(%rip),%rdx
  mov    (%rdx),%ecx
  mov    D37(%rip),%rdx
  mov    %ecx,(%rdx)
L9:
  lea    -0x4(%rbp),%r13
  test   %r14,%r14
  jne    L51
  jmp    L103
L176:
  mov    $0x30,%ebx
  test   %r12d,%r12d
  jne    L159
  mov    $0x30,%ebx
  mov    $0x8,%r12d
  jmp    L294
```

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