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

```asm
<alphanum_compare>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  jmp    L47
L160:
  addq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x50(%rbp)
L47:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L22
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  mov    -0x50(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    %eax,%ebx
  je     L160
L22:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L15
  mov    -0x50(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L15
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  movl   $0x0,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jbe    L200
  mov    -0x50(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  jne    L200
  subq   $0x1,-0x28(%rbp)
  subq   $0x1,-0x50(%rbp)
  jmp    L200
L147:
  subq   $0x1,-0x28(%rbp)
  subq   $0x1,-0x50(%rbp)
L200:
  mov    -0x28(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jbe    L153
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  je     L147
L153:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L158
  addq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x50(%rbp)
  jmp    L158
L84:
  addl   $0x1,-0x30(%rbp)
  mov    -0x38(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %ecx,%eax
  mov    %eax,-0x38(%rbp)
L158:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L84
  jmp    L0
L72:
  addl   $0x1,-0x2c(%rbp)
  mov    -0x34(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%ecx
  mov    -0x50(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x50(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %ecx,%eax
  mov    %eax,-0x34(%rbp)
L0:
  mov    -0x50(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L72
  cmpl   $0x8,-0x30(%rbp)
  jg     L204
  cmpl   $0x8,-0x2c(%rbp)
  jle    L128
L204:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jne    L155
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  jmp    L124
L155:
  mov    -0x30(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  jmp    L124
L128:
  cmpl   $0x0,-0x38(%rbp)
  je     L75
  cmpl   $0x0,-0x34(%rbp)
  je     L75
  mov    -0x38(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  je     L75
  mov    -0x38(%rbp),%eax
  sub    -0x34(%rbp),%eax
  jmp    L124
L75:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  jmp    L124
L15:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  mov    -0x50(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,%edx
  mov    %ebx,%eax
  sub    %edx,%eax
L124:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int alphanum_compare(const char *t1, const char *s2) {
  int n1, n2, cnt1, cnt2;
  const char *u1, *u2;
  const char *s1 = t1;
  while (*s1 && tolower(*s1) == tolower(*s2)) {
    s1++;
    s2++;
  }
  if (isdigit(*s1) && isdigit(*s2)) {
    u1 = s1;
    u2 = s2;
    n1 = n2 = 0;
    cnt1 = cnt2 = 0;
    if (s1 > t1 && *s2 == '0') {
      s1--;
      s2--;
    }
    while (s1 > t1 && *s1 == '0') {
      s1--;
      s2--;
    }
    if (!isdigit(*s1)) {
      s1++;
      s2++;
    }
    while (isdigit(*s1)) {
      cnt1++;
      n1 = (n1 * 10) + (*s1++ - '0');
    }
    while (isdigit(*s2)) {
      cnt2++;
      n2 = (n2 * 10) + (*s2++ - '0');
    }
    if (cnt1 > 8 || cnt2 > 8) {
      if (cnt1 == cnt2)
        return (*u1 - *u2);
      return (cnt1 - cnt2);
    }
    if (n1 && n2 && n1 != n2)
      return (n1 - n2);
    return (*u1 - *u2);
  }
  return (tolower(*s1) - tolower(*s2));
}
```