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

```asm
<compare_prerelease>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rsi,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    %rsi,%rcx
  or     %rdi,%rcx
  je     L188
  mov    %rdi,%rbx
  test   %rsi,%rsi
  jne    L203
  mov    $0xffffffff,%eax
  test   %rdi,%rdi
  jne    L188
L203:
  test   %rbx,%rbx
  jne    L112
  mov    $0x1,%eax
  cmpq   $0x0,(%rsp)
  jne    L188
L112:
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %rax,%rbp
  mov    (%rsp),%r15
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    %rax,0x10(%rsp)
  mov    %r15,%r12
  mov    %rbx,%r13
  lea    (%rbx,%rbp,1),%rdi
  mov    %rdi,0x18(%rsp)
  mov    %r15,%rcx
  add    %rax,%rcx
  mov    %rcx,0x20(%rsp)
  lea    0x1(%rbx,%rbp,1),%rax
  mov    %rax,0x28(%rsp)
  jmp    L196
L223:
  mov    %rbx,%r14
  sub    %r13,%r14
  mov    %rbp,%r15
  sub    %r12,%r15
  cmp    %r15,%r14
  mov    %r15,%rdx
  cmovbe %r14,%rdx
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L191
  cmp    %r15,%r14
  jne    L119
L130:
  lea    0x1(%rbx),%r13
  lea    0x1(%rbp),%r12
  cmp    0x28(%rsp),%r13
  je     L102
  mov    (%rsp),%rax
  mov    0x10(%rsp),%rcx
  lea    0x1(%rax,%rcx,1),%rax
  cmp    %rax,%r12
  je     L121
L196:
  mov    $0x2e,%esi
  mov    %r13,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  cmove  0x18(%rsp),%rbx
  mov    $0x2e,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  cmove  0x20(%rsp),%rbp
  lea    0x30(%rsp),%r14
  mov    $0xa,%edx
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <strtol@plt>
  mov    %eax,0xc(%rsp)
  mov    0x30(%rsp),%r15
  cmp    %rbx,%r15
  sete   0xb(%rsp)
  mov    $0xa,%edx
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <strtol@plt>
  cmp    %rbp,0x30(%rsp)
  sete   %dl
  je     L1
  cmpb   $0x0,0xb(%rsp)
  jne    L231
L1:
  cmp    %rbx,%r15
  je     L192
  test   %dl,%dl
  jne    L25
L192:
  cmpb   $0x0,0xb(%rsp)
  je     L223
  test   %dl,%dl
  je     L223
  cmp    %eax,0xc(%rsp)
  je     L130
  cmp    %eax,0xc(%rsp)
  setge  %al
  movzbl %al,%eax
  lea    -0x1(%rax,%rax,1),%eax
  jmp    L188
L191:
  sar    $0x1f,%eax
  or     $0x1,%eax
  jmp    L188
L119:
  sbb    %eax,%eax
  or     $0x1,%eax
  jmp    L188
L102:
  mov    (%rsp),%rax
  mov    0x10(%rsp),%rcx
  lea    0x1(%rax,%rcx,1),%rax
  cmp    %rax,%r12
  setne  %al
  movzbl %al,%eax
  neg    %eax
L188:
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L206
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L121:
  mov    $0x1,%eax
  jmp    L188
L231:
  mov    $0xffffffff,%eax
  jmp    L188
L25:
  mov    $0x1,%eax
  jmp    L188
L206:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int compare_prerelease(char *x, char *y) {
  char *lastx, *lasty, *xptr, *yptr, *endptr;
  size_t xlen, ylen, xn, yn, min;
  int xisnum, yisnum, xnum, ynum;
  int res;
  if (x == NULL && y == NULL)
    return 0;
  if (y == NULL && x)
    return -1;
  if (x == NULL && y)
    return 1;
  lastx = x;
  lasty = y;
  xlen = strlen(x);
  ylen = strlen(y);
  while (1) {
    if ((xptr = strchr(lastx, "."[0])) == NULL)
      xptr = x + xlen;
    if ((yptr = strchr(lasty, "."[0])) == NULL)
      yptr = y + ylen;
    xnum = strtol(lastx, &endptr, 10);
    xisnum = endptr == xptr ? 1 : 0;
    ynum = strtol(lasty, &endptr, 10);
    yisnum = endptr == yptr ? 1 : 0;
    if (xisnum && !yisnum)
      return -1;
    if (!xisnum && yisnum)
      return 1;
    if (xisnum && yisnum) {
      if (xnum != ynum)
        return xnum < ynum ? -1 : 1;
    } else {
      xn = xptr - lastx;
      yn = yptr - lasty;
      min = xn < yn ? xn : yn;
      if ((res = strncmp(lastx, lasty, min)))
        return res < 0 ? -1 : 1;
      if (xn != yn)
        return xn < yn ? -1 : 1;
    }
    lastx = xptr + 1;
    lasty = yptr + 1;
    if (lastx == x + xlen + 1 && lasty == y + ylen + 1)
      break;
    if (lastx == x + xlen + 1)
      return -1;
    if (lasty == y + ylen + 1)
      return 1;
  }
  return 0;
}
```