user: 请将以下的汇编代码转换成C语言代码：

```asm
<strtoxl>:
  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,%r14d
  mov    %ecx,%r13d
  lea    0x1(%rdi),%rbp
  movzbl (%rdi),%ebx
  jmp    L130
L427:
  add    $0x1,%rbp
  movzbl -0x1(%rbp),%ebx
L130:
  movsbl %bl,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L427
  cmp    $0x2d,%bl
  je     L10
  cmp    $0x2b,%bl
  je     L306
L305:
  cmp    $0x1,%r14d
  je     L46
  cmp    $0x24,%r14d
  ja     L46
  test   %r14d,%r14d
  jne    L438
  mov    $0xa,%r14d
  cmp    $0x30,%bl
  je     L441
L12:
  movslq %r14d,%rcx
  mov    %rcx,0x8(%rsp)
  mov    $0xffffffff,%eax
  mov    $0x0,%edx
  div    %rcx
  mov    %rax,%r15
  mov    $0x0,%r12d
  jmp    L322
L10:
  or     $0x2,%r13d
  movzbl 0x0(%rbp),%ebx
  lea    0x1(%rbp),%rbp
  jmp    L305
L306:
  movzbl 0x0(%rbp),%ebx
  lea    0x1(%rbp),%rbp
  jmp    L305
L46:
  mov    $0x0,%r12d
  mov    0x10(%rsp),%rax
  test   %rax,%rax
  je     L336
  mov    0x18(%rsp),%rsi
  mov    %rsi,(%rax)
L336:
  mov    %r12,%rax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L441:
  movzbl 0x0(%rbp),%eax
  and    $0xffffffdf,%eax
  mov    $0x8,%r14d
  cmp    $0x58,%al
  jne    L12
L283:
  movzbl 0x1(%rbp),%ebx
  lea    0x2(%rbp),%rbp
  mov    $0x10,%r14d
  jmp    L12
L438:
  cmp    $0x10,%r14d
  jne    L12
  cmp    $0x30,%bl
  jne    L12
  movzbl 0x0(%rbp),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  jne    L12
  jmp    L283
L193:
  mov    %ebx,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L373
  mov    %ebx,%edi
  call   <toupper@plt>
  movsbl %al,%ebx
  sub    $0x37,%ebx
  jmp    L448
L423:
  mov    %ebx,%ecx
  mov    $0xffffffff,%eax
  mov    $0x0,%edx
  divq   0x8(%rsp)
  cmp    %rdx,%rcx
  ja     L4
L343:
  or     $0x8,%r13d
  imul   0x8(%rsp),%r12
  mov    %ebx,%ebx
  add    %rbx,%r12
L325:
  add    $0x1,%rbp
  movzbl -0x1(%rbp),%ebx
L322:
  movsbl %bl,%ebx
  mov    %ebx,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L193
  sub    $0x30,%ebx
L448:
  cmp    %ebx,%r14d
  jbe    L373
  cmp    %r15,%r12
  jb     L343
  je     L423
L4:
  or     $0xc,%r13d
  jmp    L325
L373:
  sub    $0x1,%rbp
  test   $0x8,%r13b
  jne    L230
  mov    0x18(%rsp),%rbp
  mov    $0x0,%r12d
  cmpq   $0x0,0x10(%rsp)
  je     L242
L80:
  mov    0x10(%rsp),%rax
  mov    %rbp,(%rax)
L242:
  test   $0x2,%r13b
  je     L336
L87:
  neg    %r12
  jmp    L336
L230:
  test   $0x4,%r13b
  jne    L399
  test   $0x1,%r13b
  jne    L239
  mov    %r13d,%edx
  and    $0x2,%edx
  movabs $0xffffffff7fffffff,%rax
  cmp    %rax,%r12
  ja     L256
  test   %edx,%edx
  jne    L17
L256:
  cmp    $0x7fffffff,%r12
  jbe    L239
  test   %edx,%edx
  jne    L239
  jmp    L28
L399:
  mov    $0xffffffff,%r12d
  test   $0x1,%r13b
  je     L308
L239:
  cmpq   $0x0,0x10(%rsp)
  jne    L80
  jmp    L242
L308:
  test   $0x2,%r13b
  jne    L17
L28:
  mov    $0x7fffffff,%r12d
  cmpq   $0x0,0x10(%rsp)
  jne    L80
  jmp    L336
L17:
  mov    $0xffffffff80000000,%r12
  cmpq   $0x0,0x10(%rsp)
  jne    L80
  jmp    L87
```

assistant: ```c
unsigned long strtoxl(const char *nptr, char **endptr, int ibase, int flags) {
  const unsigned char *p;
  char c;
  unsigned long number;
  unsigned digval;
  unsigned long maxval;
  p = (const unsigned char *)nptr;
  number = 0;
  c = *p++;
  while (isspace(c))
    c = *p++;
  if (c == '-') {
    flags |= 2;
    c = *p++;
  } else if (c == '+') {
    c = *p++;
  }
  if (ibase < 0 || ibase == 1 || ibase > 36) {
    if (endptr)
      *endptr = (char *)nptr;
    return 0L;
  } else if (ibase == 0) {
    if (c != '0') {
      ibase = 10;
    } else if (*p == 'x' || *p == 'X') {
      ibase = 16;
    } else {
      ibase = 8;
    }
  }
  if (ibase == 16) {
    if (c == '0' && (*p == 'x' || *p == 'X')) {
      ++p;
      c = *p++;
    }
  }
  maxval = (2147483647L * 2UL + 1UL) / ibase;
  for (;;) {
    if (isdigit(c)) {
      digval = c - '0';
    } else if (isalpha(c)) {
      digval = toupper(c) - 'A' + 10;
    } else {
      break;
    }
    if (digval >= (unsigned)ibase)
      break;
    flags |= 8;
    if (number < maxval || (number == maxval && (unsigned long)digval <= (2147483647L * 2UL + 1UL) % ibase)) {
      number = number * ibase + digval;
    } else {
      flags |= 4;
    }
    c = *p++;
  }
  --p;
  if (!(flags & 8)) {
    if (endptr)
      p = (const unsigned char *)nptr;
    number = 0;
  } else if ((flags & 4) || (!(flags & 1) && (((flags & 2) && (number < (-2147483647L - 1L))) || (!(flags & 2) && (number > 2147483647L))))) {
    if (flags & 1) {
      number = (2147483647L * 2UL + 1UL);
    } else if (flags & 2) {
      number = (-2147483647L - 1L);
    } else {
      number = 2147483647L;
    }
  }
  if (endptr)
    *endptr = (char *)p;
  if (flags & 2)
    number = (unsigned long)(-(long)number);
  return number;
}
```