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

```asm
<yalex_atoll_s>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,%r10d
  movsbl (%rdi),%ecx
  cmp    $0x2d,%ecx
  je     L38
  cmp    $0x2b,%ecx
  je     L96
  lea    0x1(%rdi),%rsi
  mov    $0x0,%ebp
L37:
  test   $0xffffffef,%r10d
  jne    L85
  cmp    $0x30,%ecx
  je     L165
L85:
  test   %r10d,%r10d
  jne    L143
  cmp    $0x30,%ecx
  setne  %r10b
  movzbl %r10b,%r10d
  lea    0x8(%r10,%r10,1),%r10d
L143:
  movslq %ebp,%rax
  movabs $0x7fffffffffffffff,%rdx
  add    %rdx,%rax
  movslq %r10d,%rbx
  mov    $0x0,%edx
  div    %rbx
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0xffffffff,%r11d
  mov    $0x1,%r12d
  jmp    L69
L38:
  lea    0x2(%rdi),%rsi
  movsbl 0x1(%rdi),%ecx
  mov    $0x1,%ebp
  jmp    L37
L96:
  lea    0x2(%rdi),%rsi
  movsbl 0x1(%rdi),%ecx
  mov    $0x0,%ebp
  jmp    L37
L165:
  movzbl (%rsi),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  jne    L203
  movsbl 0x1(%rsi),%ecx
  add    $0x2,%rsi
  mov    $0x10,%r10d
  jmp    L143
L203:
  mov    $0x30,%ecx
  jmp    L85
L208:
  lea    -0x41(%rcx),%r13d
  mov    %ecx,%edi
  and    $0xffffffdf,%edi
  sub    $0x41,%edi
  cmp    $0x19,%edi
  ja     L152
  cmp    $0x1a,%r13d
  sbb    %edi,%edi
  and    $0xffffffe0,%edi
  add    $0x57,%edi
  sub    %edi,%ecx
  jmp    L79
L139:
  mov    %r11d,%r9d
L158:
  add    $0x1,%rsi
  movsbl -0x1(%rsi),%ecx
L69:
  lea    -0x30(%rcx),%edi
  cmp    $0x9,%edi
  ja     L208
  mov    %edi,%ecx
L79:
  cmp    %ecx,%r10d
  jle    L152
  test   %r9d,%r9d
  js     L139
  cmp    %rax,%r8
  ja     L139
  jne    L166
  mov    %r11d,%r9d
  cmp    %edx,%ecx
  jg     L158
L166:
  imul   %rbx,%r8
  movslq %ecx,%rcx
  add    %rcx,%r8
  mov    %r12d,%r9d
  jmp    L158
L152:
  test   %r9d,%r9d
  js     L109
  mov    %r8,%rax
  neg    %rax
  test   %ebp,%ebp
  cmove  %r8,%rax
L200:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L109:
  test   %ebp,%ebp
  movabs $0x8000000000000000,%rax
  movabs $0x7fffffffffffffff,%rdx
  cmove  %rdx,%rax
  jmp    L200
```

assistant: ```c
long long yalex_atoll_s(const char *buf, char **end, int radix) {
  end = 0;
  register const char *s = buf;
  register unsigned long long acc;
  register int c;
  register unsigned long long cutoff;
  register int neg = 0, any, cutlim;
  c = *s++;
  if (c == '-') {
    neg = 1;
    c = *s++;
  } else if (c == '+') {
    c = *s++;
  }
  if ((radix == 0 || radix == 16) && c == '0' && (*s == 'x' || *s == 'X')) {
    c = s[1];
    s += 2;
    radix = 16;
  }
  if (radix == 0)
    radix = c == '0' ? 8 : 10;
  cutoff = neg ? (0x8000000000000000) : (0x7FFFFFFFFFFFFFFF);
  cutlim = cutoff % (long long)radix;
  cutoff /= (long long)radix;
  for (acc = 0, any = 0;; c = *s++) {
    if ((c >= '0' && c <= '9'))
      c -= '0';
    else if (((c >= 'A' && c <= 'Z') || c >= 'a' && c <= 'z'))
      c -= (c >= 'A' && c <= 'Z') ? 'A' - 10 : 'a' - 10;
    else
      break;
    if (c >= radix)
      break;
    if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
      any = -1;
    else {
      any = 1;
      acc *= radix;
      acc += c;
    }
  }
  if (any < 0) {
    return neg ? (0x8000000000000000) : (0x7FFFFFFFFFFFFFFF);
  } else if (neg) {
    return -1 * ((long long)acc);
  }
  return (long long)acc;
}
```