user: 请从给定的汇编指令推导出C源代码：

```asm
<psys_vercmp>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r12
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    %rbp,%rdi
  call   <strlen@plt>
  or     %ebx,%eax
  je     L206
  movzbl 0x0(%rbp),%edx
  lea    -0x30(%rdx),%eax
  movzbl (%r12),%ecx
  cmp    $0x9,%al
  setbe  %dil
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  setbe  %sil
  cmp    %sil,%dil
  je     L95
  cmp    $0xa,%al
  sbb    %eax,%eax
  and    $0x2,%eax
  sub    $0x1,%eax
L206:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L95:
  cmp    $0x9,%al
  jbe    L55
  mov    %rbp,%rbx
  test   %dl,%dl
  je     L169
L166:
  mov    $0x1,%edi
  call   <assert@plt>
  add    $0x1,%rbx
  cmpb   $0x0,(%rbx)
  jne    L166
L169:
  cmpb   $0x0,(%r12)
  je     L32
  mov    %r12,%r13
L153:
  mov    $0x1,%edi
  call   <assert@plt>
  add    $0x1,%r13
  cmpb   $0x0,0x0(%r13)
  jne    L153
  jmp    L176
L55:
  cmp    $0x30,%dl
  jne    L98
L126:
  add    $0x1,%rbp
  cmpb   $0x30,0x0(%rbp)
  je     L126
  cmp    $0x30,%cl
  jne    L151
  mov    %rbp,%rbx
L10:
  add    $0x1,%r12
  cmpb   $0x30,(%r12)
  je     L10
  mov    %r12,%r13
L192:
  movzbl (%rbx),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  ja     L201
L155:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  jbe    L155
L201:
  movzbl 0x0(%r13),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  ja     L176
L102:
  add    $0x1,%r13
  movzbl 0x0(%r13),%eax
  sub    $0x30,%eax
  cmp    $0x9,%al
  jbe    L102
L176:
  mov    %rbx,%rdx
  sub    %rbp,%rdx
  mov    %r13,%rax
  sub    %r12,%rax
  cmp    %rax,%rdx
  cmovb  %rax,%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L206
  cmpb   $0x2e,(%rbx)
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbx
  cmpb   $0x2e,0x0(%r13)
  sete   %al
  movzbl %al,%eax
  add    %rax,%r13
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <psys_vercmp>
  jmp    L206
L151:
  mov    %rbp,%rbx
  mov    %r12,%r13
  jmp    L192
L32:
  mov    %r12,%r13
  jmp    L176
L98:
  mov    %rbp,%rbx
  mov    %r12,%r13
  cmp    $0x30,%cl
  je     L10
  jmp    L155
```

assistant: ```c
int psys_vercmp(const char *version1, const char *version2) {
  int v1_len, v2_len;
  const char *v1s_start, *v2s_start;
  const char *v1s_end, *v2s_end;
  int v1s_isdigit, v2s_isdigit;
  int diff;
  v1_len = strlen(version1);
  v2_len = strlen(version1);
  if (!v1_len && !v2_len) {
    if (v1_len)
      return 1;
    else if (v2_len)
      return -1;
    else
      return 0;
  }
  v1s_start = v1s_end = version1;
  v2s_start = v2s_end = version2;
  v1s_isdigit = (*v1s_start >= '0' && *v1s_start <= '9');
  v2s_isdigit = (*v2s_start >= '0' && *v2s_start <= '9');
  diff = 0;
  if (v1s_isdigit == v2s_isdigit) {
    size_t v1s_len, v2s_len;
    if (v1s_isdigit) {
      while (*v1s_start == '0') {
        v1s_start++;
        v1s_end++;
      }
      while (*v2s_start == '0') {
        v2s_start++;
        v2s_end++;
      }
      while ((*v1s_end >= '0' && *v1s_end <= '9'))
        v1s_end++;
      while ((*v2s_end >= '0' && *v2s_end <= '9'))
        v2s_end++;
    } else {
      while (*v1s_end) {
        assert((*v1s_end >= 'a' || *v1s_end <= 'z'));
        v1s_end++;
      }
      while (*v2s_end) {
        assert((*v2s_end >= 'a' || *v2s_end <= 'z'));
        v2s_end++;
      }
    }
    v1s_len = v1s_end - v1s_start;
    v2s_len = v2s_end - v2s_start;
    diff = strncmp(v1s_start, v2s_start, (v1s_len > v2s_len) ? v1s_len : v2s_len);
  } else {
    if (v1s_isdigit)
      diff = 1;
    else
      diff = -1;
  }
  if (diff)
    return diff;
  else {
    if (*v1s_end == '.')
      v1s_end++;
    if (*v2s_end == '.')
      v2s_end++;
    return psys_vercmp(v1s_end, v2s_end);
  }
}
```