user: Translate the below assembly code into C programming language:

```asm
<ver_cmp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x10(%rsp)
  mov    $0x0,%r14d
  lea    0x10(%rsp),%rax
  mov    %rax,(%rsp)
  lea    0x18(%rsp),%rax
  mov    %rax,0x8(%rsp)
  lea    D3(%rip),%r15
L3:
  mov    0x18(%rsp),%r12
  movzbl (%r12),%edi
  test   %dil,%dil
  je     L303
L327:
  movsbl %dil,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L303
  add    $0x1,%r12
  movzbl (%r12),%edi
  test   %dil,%dil
  jne    L327
L303:
  mov    0x10(%rsp),%r13
  movzbl 0x0(%r13),%edi
  test   %dil,%dil
  je     L74
L76:
  movsbl %dil,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L74
  add    $0x1,%r13
  movzbl 0x0(%r13),%edi
  test   %dil,%dil
  jne    L76
  jmp    L74
L337:
  mov    %ebx,%eax
  sub    %ebp,%eax
L103:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L251:
  mov    %r12,0x18(%rsp)
  mov    %r13,0x10(%rsp)
  movsbl (%r12),%edi
  call   <isdigit@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  jne    L175
  movsbl 0x0(%r13),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L336
L44:
  mov    $0xa,%edx
  mov    (%rsp),%rsi
  mov    0x10(%rsp),%rdi
  call   <strtol@plt>
  mov    %rax,%rdx
L355:
  cmp    %rbx,%rdx
  jne    L248
L336:
  mov    0x18(%rsp),%rax
  movzbl (%rax),%ebp
  mov    0x10(%rsp),%rax
  movzbl (%rax),%r12d
  movsbl %bpl,%esi
  mov    %r15,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  movsbl %r12b,%esi
  mov    %r15,%rdi
  call   <strchr@plt>
  test   %rbx,%rbx
  je     L112
  test   %rax,%rax
  je     L75
L112:
  test   %rbx,%rbx
  jne    L8
  test   %rax,%rax
  jne    L258
L8:
  mov    %ebp,%eax
  or     %r12b,%al
  je     L166
  test   %bpl,%bpl
  je     L276
  test   %r12b,%r12b
  jne    L3
  mov    $0x1,%eax
  jmp    L103
L175:
  mov    $0xa,%edx
  mov    0x8(%rsp),%rsi
  mov    0x18(%rsp),%rdi
  call   <strtol@plt>
  mov    %rax,%rbx
  movsbl 0x0(%r13),%edi
  call   <isdigit@plt>
  mov    %rax,%rdx
  test   %rax,%rax
  je     L355
  jmp    L44
L248:
  mov    %ebx,%eax
  sub    %edx,%eax
  jmp    L103
L75:
  mov    $0xffffffff,%eax
  jmp    L103
L258:
  mov    $0x1,%eax
  jmp    L103
L166:
  mov    $0x0,%eax
  jmp    L103
L276:
  mov    $0xffffffff,%eax
  jmp    L103
L61:
  test   %ebp,%ebp
  je     L74
  mov    %ebp,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  jne    L337
  mov    %eax,%ebx
L123:
  add    $0x100,%ebp
L241:
  cmp    %ebx,%ebp
  jne    L337
L74:
  mov    0x18(%rsp),%rax
  cmp    %r12,%rax
  je     L64
  lea    0x1(%rax),%rdx
  mov    %rdx,0x18(%rsp)
  movsbl (%rax),%ebx
  mov    0x10(%rsp),%rax
  mov    $0x0,%ebp
  cmp    %r13,%rax
  je     L148
L326:
  lea    0x1(%rax),%rdx
  mov    %rdx,0x10(%rsp)
  movsbl (%rax),%ebp
L148:
  mov    %ebp,%eax
  or     %ebx,%eax
  je     L251
  test   %ebx,%ebx
  je     L61
  mov    %ebx,%edi
  call   <isalpha@plt>
  mov    %eax,%edx
  lea    0x100(%rbx),%eax
  test   %edx,%edx
  cmove  %eax,%ebx
  test   %ebp,%ebp
  je     L337
  mov    %ebp,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  jne    L241
  jmp    L123
L64:
  mov    0x10(%rsp),%rax
  cmp    %rax,%r13
  je     L251
  mov    %r14d,%ebx
  jmp    L326
```

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

tool: D3: .-

assistant: ```c
int ver_cmp(const char *val, const char *ref) {
  int vc, rc;
  long vl, rl;
  const char *vp, *rp;
  const char *vsep, *rsep;
  for (;;) {
    vp = val;
    while (*vp && !isdigit(*vp))
      vp++;
    rp = ref;
    while (*rp && !isdigit(*rp))
      rp++;
    for (;;) {
      vc = val == vp ? 0 : *val++;
      rc = ref == rp ? 0 : *ref++;
      if (!rc && !vc)
        break;
      if (vc && !isalpha(vc))
        vc += 256;
      if (rc && !isalpha(rc))
        rc += 256;
      if (vc != rc)
        return vc - rc;
    }
    val = vp;
    ref = rp;
    vl = 0;
    if (isdigit(*vp))
      vl = strtol(val, (char **)&val, 10);
    rl = 0;
    if (isdigit(*rp))
      rl = strtol(ref, (char **)&ref, 10);
    if (vl != rl)
      return vl - rl;
    vc = *val;
    rc = *ref;
    vsep = strchr(".-", vc);
    rsep = strchr(".-", rc);
    if (vsep && !rsep)
      return -1;
    if (!vsep && rsep)
      return +1;
    if (!*val && !*ref)
      return 0;
    if (!*val)
      return -1;
    if (!*ref)
      return +1;
  }
}
```