user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<ver_compare>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,(%rsp)
  test   %rdi,%rdi
  je     L157
L163:
  cmpq   $0x0,(%rsp)
  je     L219
L72:
  mov    $0x0,%r12d
L254:
  mov    0x8(%rsp),%r13
  movzbl 0x0(%r13),%edi
  test   %dil,%dil
  je     L277
L251:
  movsbl %dil,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L277
  add    $0x1,%r13
  movzbl 0x0(%r13),%edi
  test   %dil,%dil
  jne    L251
L277:
  mov    (%rsp),%rbp
  movzbl 0x0(%rbp),%edi
  test   %dil,%dil
  je     L25
L35:
  movsbl %dil,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L25
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%edi
  test   %dil,%dil
  jne    L35
  jmp    L25
L157:
  lea    D3(%rip),%rax
  mov    %rax,0x8(%rsp)
  jmp    L163
L219:
  lea    D3(%rip),%rax
  mov    %rax,(%rsp)
  jmp    L72
L208:
  mov    %ebx,%eax
  sub    %r14d,%eax
L148:
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L273:
  mov    %r13,0x8(%rsp)
  mov    %rbp,(%rsp)
  movsbl 0x0(%r13),%edi
  call   <isdigit@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  jne    L267
  movsbl 0x0(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L323
L136:
  mov    %rsp,%rsi
  mov    $0xa,%edx
  mov    (%rsp),%rdi
  call   <strtol@plt>
  mov    %rax,%rdx
L269:
  cmp    %rbx,%rdx
  jne    L207
L323:
  mov    0x8(%rsp),%rax
  cmpb   $0x0,(%rax)
  jne    L243
  mov    (%rsp),%rax
  movzbl (%rax),%eax
  neg    %al
  sbb    %eax,%eax
  jmp    L148
L267:
  lea    0x8(%rsp),%rsi
  mov    $0xa,%edx
  mov    0x8(%rsp),%rdi
  call   <strtol@plt>
  mov    %rax,%rbx
  movsbl 0x0(%rbp),%edi
  call   <isdigit@plt>
  mov    %rax,%rdx
  test   %rax,%rax
  je     L269
  jmp    L136
L207:
  mov    %ebx,%eax
  sub    %edx,%eax
  jmp    L148
L243:
  mov    (%rsp),%rax
  cmpb   $0x0,(%rax)
  jne    L254
  mov    $0x1,%eax
  jmp    L148
L150:
  test   %r14d,%r14d
  je     L25
  mov    %r14d,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  jne    L208
  mov    %eax,%ebx
L125:
  add    $0x100,%r14d
L27:
  cmp    %ebx,%r14d
  jne    L208
L25:
  mov    0x8(%rsp),%rax
  cmp    %r13,%rax
  je     L137
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movsbl (%rax),%ebx
  mov    (%rsp),%rax
  mov    $0x0,%r14d
  cmp    %rbp,%rax
  je     L298
L240:
  lea    0x1(%rax),%rdx
  mov    %rdx,(%rsp)
  movsbl (%rax),%r14d
L298:
  mov    %r14d,%eax
  or     %ebx,%eax
  je     L273
  test   %ebx,%ebx
  je     L150
  mov    %ebx,%edi
  call   <isalpha@plt>
  mov    %eax,%edx
  lea    0x100(%rbx),%eax
  test   %edx,%edx
  cmove  %eax,%ebx
  test   %r14d,%r14d
  je     L208
  mov    %r14d,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  jne    L27
  jmp    L125
L137:
  mov    (%rsp),%rax
  cmp    %rax,%rbp
  je     L273
  mov    %r12d,%ebx
  jmp    L240
```

tool_calls: name: parse_data
arguments: data_label: D3
type_infered: string

tool: 

assistant: ```c
int ver_compare(const char *value, const char *reference) {
  const char *valptr, *refptr;
  int vc, rc;
  long vl, rl;
  if (!value)
    value = "";
  if (!reference)
    reference = "";
  for (;;) {
    valptr = value;
    while (*valptr && !isdigit((int)*valptr))
      valptr++;
    refptr = reference;
    while (*refptr && !isdigit((int)*refptr))
      refptr++;
    for (;;) {
      vc = (value == valptr) ? 0 : *value++;
      rc = (reference == refptr) ? 0 : *reference++;
      if ((!vc) && (!rc))
        break;
      if (vc && !isalpha(vc))
        vc += 256;
      if (rc && !isalpha(rc))
        rc += 256;
      if (vc != rc)
        return (vc - rc);
    }
    value = valptr;
    reference = refptr;
    vl = rl = 0;
    if (isdigit((int)*valptr))
      vl = strtol(value, (char **)&value, 10);
    if (isdigit((int)*refptr))
      rl = strtol(reference, (char **)&reference, 10);
    if (vl != rl)
      return (vl - rl);
    if ((!*value) && (!*reference))
      return 0;
    if (!*value)
      return -1;
    if (!*reference)
      return 1;
  }
}
```