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

```asm
<xatoi>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  movb   $0x0,-0x9(%rbp)
  mov    -0x20(%rbp),%rax
  movq   $0x0,(%rax)
  jmp    L170
L216:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
L170:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  mov    %al,-0xb(%rbp)
  cmpb   $0x20,-0xb(%rbp)
  je     L216
  cmpb   $0x2d,-0xb(%rbp)
  jne    L235
  movb   $0x1,-0x9(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  mov    %al,-0xb(%rbp)
L235:
  cmpb   $0x30,-0xb(%rbp)
  jne    L224
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  mov    %al,-0xb(%rbp)
  movzbl -0xb(%rbp),%eax
  cmp    $0x62,%eax
  je     L184
  cmp    $0x78,%eax
  jne    L57
  movb   $0x10,-0xa(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  mov    %al,-0xb(%rbp)
  jmp    L77
L184:
  movb   $0x2,-0xa(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  mov    %al,-0xb(%rbp)
  jmp    L77
L57:
  cmpb   $0x20,-0xb(%rbp)
  ja     L129
  mov    $0x1,%eax
  jmp    L51
L129:
  cmpb   $0x2f,-0xb(%rbp)
  jbe    L126
  cmpb   $0x39,-0xb(%rbp)
  jbe    L218
L126:
  mov    $0x0,%eax
  jmp    L51
L218:
  movb   $0x8,-0xa(%rbp)
  jmp    L77
L224:
  cmpb   $0x2f,-0xb(%rbp)
  jbe    L54
  cmpb   $0x39,-0xb(%rbp)
  jbe    L20
L54:
  mov    $0x0,%eax
  jmp    L51
L20:
  movb   $0xa,-0xa(%rbp)
L77:
  movq   $0x0,-0x8(%rbp)
  jmp    L85
L56:
  cmpb   $0x60,-0xb(%rbp)
  jbe    L49
  subb   $0x20,-0xb(%rbp)
L49:
  subb   $0x30,-0xb(%rbp)
  cmpb   $0x10,-0xb(%rbp)
  jbe    L2
  subb   $0x7,-0xb(%rbp)
L2:
  movzbl -0xb(%rbp),%eax
  cmp    -0xa(%rbp),%al
  jb     L46
  mov    $0x0,%eax
  jmp    L51
L46:
  movzbl -0xa(%rbp),%eax
  imul   -0x8(%rbp),%rax
  mov    %rax,%rdx
  movzbl -0xb(%rbp),%eax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  mov    %al,-0xb(%rbp)
L85:
  cmpb   $0x20,-0xb(%rbp)
  ja     L56
  cmpb   $0x0,-0x9(%rbp)
  je     L109
  negq   -0x8(%rbp)
L109:
  mov    -0x8(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,(%rax)
  mov    $0x1,%eax
L51:
  pop    %rbp
  ret
```

assistant: ```c
int xatoi(char **str, long *res) {
  unsigned long val;
  unsigned char c, r, s = 0;
  *res = 0;
  while ((c = **str) == ' ') {
    (*str)++;
  }
  if (c == '-') {
    s = 1;
    c = *(++(*str));
  }
  if (c == '0') {
    c = *(++(*str));
    switch (c) {
    case 'x':
      r = 16;
      c = *(++(*str));
      break;
    case 'b':
      r = 2;
      c = *(++(*str));
      break;
    default:
      if (c <= ' ') {
        return 1;
      }
      if (c < '0' || c > '9') {
        return 0;
      }
      r = 8;
    }
  } else {
    if (c < '0' || c > '9') {
      return 0;
    }
    r = 10;
  }
  val = 0;
  while (c > ' ') {
    if (c >= 'a') {
      c -= 0x20;
    }
    c -= '0';
    if (c >= 17) {
      c -= 7;
    }
    if (c >= r) {
      return 0;
    }
    val = val * r + c;
    c = *(++(*str));
  }
  if (s) {
    val = 0 - val;
  }
  *res = val;
  return 1;
}
```