user: 这段汇编代码用C语言表示是什么样的？

```asm
<strtoll>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  cmpl   $0x23,-0x24(%rbp)
  jg     L81
  cmpl   $0x1,-0x24(%rbp)
  je     L81
  cmpl   $0x0,-0x24(%rbp)
  jns    L172
L81:
  mov    $0x0,%eax
  jmp    L23
L207:
  addq   $0x1,-0x18(%rbp)
L172:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L207
  movl   $0x2b,-0xc(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L24
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L218
L24:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
L218:
  cmpl   $0x0,-0x24(%rbp)
  jne    L170
  movl   $0xa,-0x24(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  jne    L170
  movl   $0x8,-0x24(%rbp)
  addq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x78,%al
  je     L16
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x58,%al
  jne    L170
L16:
  movl   $0x10,-0x24(%rbp)
  addq   $0x1,-0x18(%rbp)
L170:
  movq   $0x0,-0x8(%rbp)
L125:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L139
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L0
L139:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isupper@plt>
  test   %rax,%rax
  je     L205
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x37,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L0
L205:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <islower@plt>
  test   %rax,%rax
  je     L146
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x57,%eax
  mov    %eax,-0x10(%rbp)
L0:
  mov    -0x10(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jge    L174
  mov    -0x24(%rbp),%eax
  cltq
  imul   -0x8(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  addq   $0x1,-0x18(%rbp)
  jmp    L125
L146:
  nop
  jmp    L153
L174:
  nop
L153:
  cmpq   $0x0,-0x20(%rbp)
  je     L36
  mov    -0x20(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,(%rax)
L36:
  cmpl   $0x2d,-0xc(%rbp)
  jne    L104
  mov    -0x8(%rbp),%rax
  neg    %rax
  jmp    L23
L104:
  mov    -0x8(%rbp),%rax
L23:
  leave
  ret
```

assistant: ```c
long long strtoll(const char *restrict str, char **restrict endptr, int base) {
  long long total;
  int val;
  int sign;
  if (base > 35 || base == 1 || base < 0) {
    return 0;
  }
  while (isspace(*str)) {
    ++str;
  }
  sign = '+';
  if (*str == '-' || *str == '+') {
    sign = *str++;
  }
  if (base == 0) {
    base = 10;
    if (*str == '0') {
      base = 8;
      ++str;
      if (*str == 'x' || *str == 'X') {
        base = 16;
        ++str;
      }
    }
  }
  total = 0;
  while (1) {
    if (isdigit(*str)) {
      val = *str - '0';
    } else if (isupper(*str)) {
      val = *str - 'A' + 10;
    } else if (islower(*str)) {
      val = *str - 'a' + 10;
    } else {
      break;
    }
    if (val >= base) {
      break;
    }
    total = total * base + val;
    ++str;
  }
  if (endptr) {
    *endptr = (char *)str;
  }
  if (sign == '-') {
    return -total;
  }
  return total;
}
```