user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<strtoumax>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x8(%rbp)
L290:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L290
  cmpl   $0x2d,-0x1c(%rbp)
  jne    L214
  movl   $0x1,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L127
L214:
  movl   $0x0,-0x18(%rbp)
  cmpl   $0x2b,-0x1c(%rbp)
  jne    L127
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x1c(%rbp)
L127:
  cmpl   $0x0,-0x34(%rbp)
  je     L295
  cmpl   $0x10,-0x34(%rbp)
  jne    L241
L295:
  cmpl   $0x30,-0x1c(%rbp)
  jne    L241
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x78,%al
  je     L162
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x58,%al
  jne    L241
L162:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x1c(%rbp)
  addq   $0x2,-0x8(%rbp)
  movl   $0x10,-0x34(%rbp)
L241:
  cmpl   $0x0,-0x34(%rbp)
  jne    L257
  cmpl   $0x30,-0x1c(%rbp)
  jne    L188
  mov    $0x8,%eax
  jmp    L236
L188:
  mov    $0xa,%eax
L236:
  mov    %eax,-0x34(%rbp)
L257:
  mov    D26(%rip),%rax
  mov    (%rax),%eax
  cltd
  idivl  -0x34(%rbp)
  mov    %eax,-0x10(%rbp)
  mov    D26(%rip),%rax
  mov    (%rax),%eax
  cltd
  idivl  -0x34(%rbp)
  mov    %edx,-0xc(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x14(%rbp)
L239:
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L141
  subl   $0x30,-0x1c(%rbp)
  jmp    L275
L141:
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L122
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <isupper@plt>
  test   %rax,%rax
  je     L248
  mov    $0x37,%eax
  jmp    L45
L248:
  mov    $0x57,%eax
L45:
  sub    %eax,-0x1c(%rbp)
L275:
  mov    -0x1c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jge    L12
  cmpl   $0x0,-0x14(%rbp)
  js     L307
  mov    -0x20(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jg     L23
  mov    -0x20(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jne    L109
  mov    -0x1c(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jle    L109
L23:
  movl   $0xffffffff,-0x14(%rbp)
  mov    D26(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x20(%rbp)
  mov    D37(%rip),%rax
  mov    (%rax),%edx
  mov    D10(%rip),%rax
  mov    %edx,(%rax)
  jmp    L198
L109:
  movl   $0x1,-0x14(%rbp)
  mov    -0x20(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x1c(%rbp),%eax
  add    %eax,-0x20(%rbp)
  jmp    L198
L307:
  nop
L198:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L239
L122:
  nop
  jmp    L235
L12:
  nop
L235:
  cmpl   $0x0,-0x18(%rbp)
  je     L53
  cmpl   $0x0,-0x14(%rbp)
  jle    L53
  negl   -0x20(%rbp)
L53:
  cmpq   $0x0,-0x30(%rbp)
  je     L158
  cmpl   $0x0,-0x14(%rbp)
  je     L240
  mov    -0x8(%rbp),%rax
  sub    $0x1,%rax
  jmp    L276
L240:
  mov    -0x28(%rbp),%rax
L276:
  mov    -0x30(%rbp),%rdx
  mov    %rax,(%rdx)
L158:
  mov    -0x20(%rbp),%eax
  leave
  ret
```

assistant: ```c
uintmax_t strtoumax(const char *nptr, char **endptr, int base) {
  const char *s;
  uintmax_t 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 = UINTMAX_MAX / (uintmax_t)base;
  cutlim = UINTMAX_MAX % (uintmax_t)base;
  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 (acc > cutoff || (acc == cutoff && c > cutlim)) {
      any = -1;
      acc = UINTMAX_MAX;
      errno = ERANGE;
    } else {
      any = 1;
      acc *= (uintmax_t)base;
      acc += c;
    }
  }
  if (neg && any > 0)
    acc = -acc;
  if (endptr != 0)
    *endptr = (char *)(any ? s - 1 : nptr);
  return (acc);
}
```