user: What would the C source look like for the assembly code provided here?

```asm
<ver_compare>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x10(%rsp)
  test   %rdi,%rdi
  je     L268
L184:
  cmpq   $0x0,0x10(%rsp)
  je     L170
L214:
  lea    0x10(%rsp),%rax
  movsbl 0x0(%r13),%edi
  mov    %rax,0x8(%rsp)
  jmp    L80
  nopl   (%rax)
L348:
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L8
  movsbl 0x1(%r13),%edi
  add    $0x1,%r13
L80:
  test   %dil,%dil
  jne    L348
L8:
  mov    0x10(%rsp),%r12
  movsbl (%r12),%edi
  mov    %r12,%rbx
  test   %dil,%dil
  jne    L82
  jmp    L371
  nopl   0x0(%rax)
L365:
  movsbl 0x1(%r12),%edi
  add    $0x1,%r12
  test   %dil,%dil
  je     L104
L82:
  call   <isdigit@plt>
  test   %rax,%rax
  je     L365
L104:
  mov    0x10(%rsp),%rbx
  cs nopw 0x0(%rax,%rax,1)
L371:
  mov    0x18(%rsp),%r15
  cmp    %r13,%r15
  je     L174
  lea    0x1(%r15),%rax
  mov    %rax,0x18(%rsp)
  movsbl (%r15),%r14d
  mov    %r14d,%eax
  cmp    %rbx,%r12
  je     L398
  lea    0x1(%rbx),%rcx
  mov    %rcx,0x10(%rsp)
  movsbl (%rbx),%ebp
  or     %bpl,%al
  je     L217
  test   %r14d,%r14d
  je     L156
  mov    %r14d,%edi
  mov    %rcx,(%rsp)
  call   <isalpha@plt>
  mov    (%rsp),%rbx
  test   %eax,%eax
  je     L155
L154:
  test   %ebp,%ebp
  je     L21
  mov    %ebp,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  je     L236
L401:
  cmp    %r14d,%ebp
  jne    L274
  cmp    %r13,%r15
  jne    L371
  cmp    %rbx,%r12
  je     L217
  add    $0x1,%rbx
  mov    %rbx,0x10(%rsp)
  movsbl -0x1(%rbx),%ebp
  test   %ebp,%ebp
  je     L217
  mov    %ebp,%edi
  call   <isalpha@plt>
  mov    %eax,%r8d
  lea    0x100(%rbp),%eax
  test   %r8d,%r8d
  cmove  %eax,%ebp
  xor    %r14d,%r14d
L274:
  sub    %ebp,%r14d
L21:
  add    $0x28,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L174:
  cmp    %rbx,%r12
  je     L217
  lea    0x1(%rbx),%rax
  mov    %rax,0x10(%rsp)
  movsbl (%rbx),%ebp
  test   %ebp,%ebp
  je     L217
  mov    %rax,%rbx
L24:
  mov    %ebp,%edi
  call   <isalpha@plt>
  mov    %eax,%r14d
  test   %eax,%eax
  jne    L224
L236:
  add    $0x100,%ebp
  jmp    L401
  nopl   (%rax)
L398:
  test   %r14d,%r14d
  je     L217
  mov    %r14d,%edi
  call   <isalpha@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  jne    L21
L155:
  add    $0x100,%r14d
  jmp    L154
  nopw   0x0(%rax,%rax,1)
L156:
  mov    %rcx,%rbx
  test   %ebp,%ebp
  je     L371
  jmp    L24
  nopl   (%rax)
L217:
  mov    %r13,0x18(%rsp)
  mov    %r12,0x10(%rsp)
  movsbl 0x0(%r13),%edi
  call   <isdigit@plt>
  mov    %rax,%r14
  test   %rax,%rax
  jne    L226
  movsbl (%r12),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L287
L396:
  mov    0x18(%rsp),%r13
  mov    0x10(%rsp),%rax
  movsbl 0x0(%r13),%edi
  movzbl (%rax),%eax
  test   %dil,%dil
  jne    L73
  neg    %al
  sbb    %r14d,%r14d
  jmp    L21
  nopl   0x0(%rax)
L73:
  test   %al,%al
  jne    L80
  mov    $0x1,%r14d
  jmp    L21
  nopl   0x0(%rax,%rax,1)
L226:
  mov    0x18(%rsp),%rdi
  lea    0x18(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtol@plt>
  movsbl (%r12),%edi
  mov    %rax,%r14
  call   <isdigit@plt>
  test   %rax,%rax
  je     L389
L287:
  mov    0x8(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  mov    $0xa,%edx
  call   <strtol@plt>
L389:
  cmp    %r14,%rax
  je     L396
  sub    %eax,%r14d
  jmp    L21
  nop
L170:
  lea    D17(%rip),%rax
  mov    %rax,0x10(%rsp)
  jmp    L214
  nopl   0x0(%rax)
L268:
  lea    D17(%rip),%r13
  mov    %r13,0x18(%rsp)
  jmp    L184
L224:
  xor    %r14d,%r14d
  jmp    L274
```

tool_calls: name: disassemble_data
arguments: tag: D17
type: 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;
  }
}
```