user: Please show me the C implementation that matches the assembly code listed below:

```asm
<strverscmp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  movl   $0x1,-0x14(%rbp)
  jmp    L19
L58:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L228
  mov    $0x0,%eax
  jmp    L28
L228:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  jne    L135
  cmpl   $0x1,-0x14(%rbp)
  jne    L150
  movl   $0x0,-0x14(%rbp)
  jmp    L150
L135:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L110
  cmpl   $0x1,-0x14(%rbp)
  jne    L150
  movl   $0x2,-0x14(%rbp)
  jmp    L150
L110:
  movl   $0x1,-0x14(%rbp)
L150:
  addq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x30(%rbp)
L19:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L58
  cmpl   $0x1,-0x14(%rbp)
  jne    L157
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  je     L134
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  jne    L157
L134:
  movl   $0x0,-0x14(%rbp)
L157:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L84
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L84
  cmpl   $0x0,-0x14(%rbp)
  je     L84
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
  jmp    L119
L224:
  addq   $0x1,-0x10(%rbp)
L119:
  mov    -0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L224
  jmp    L50
L108:
  addq   $0x1,-0x8(%rbp)
L50:
  mov    -0x30(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L108
  mov    -0x10(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jne    L220
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  jmp    L28
L220:
  mov    -0x10(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jbe    L63
  mov    $0x1,%eax
  jmp    L28
L63:
  mov    $0xffffffff,%eax
  jmp    L28
L84:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
L28:
  leave
  ret
```

assistant: ```c
int strverscmp(const char *l, const char *r) {
  int haszero = 1;
  while (*l == *r) {
    if (!*l)
      return 0;
    if (*l == '0') {
      if (haszero == 1) {
        haszero = 0;
      }
    } else if (isdigit(*l)) {
      if (haszero == 1) {
        haszero = 2;
      }
    } else {
      haszero = 1;
    }
    l++;
    r++;
  }
  if (haszero == 1 && (*l == '0' || *r == '0')) {
    haszero = 0;
  }
  if ((isdigit(*l) && isdigit(*r)) && haszero) {
    size_t lenl = 0, lenr = 0;
    while (isdigit(l[lenl]))
      lenl++;
    while (isdigit(r[lenr]))
      lenr++;
    if (lenl == lenr) {
      return (*l - *r);
    } else if (lenl > lenr) {
      return 1;
    } else {
      return -1;
    }
  } else {
    return (*l - *r);
  }
}
```