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

```asm
<compare_prerelease>:
  endbr64
  push   %r15
  mov    %rdi,%rcx
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  or     %rsi,%rcx
  je     L245
  mov    %rdi,%r12
  mov    %rsi,%r15
  test   %rsi,%rsi
  jne    L209
  test   %rdi,%rdi
  je     L214
L98:
  mov    $0xffffffff,%eax
  nopl   0x0(%rax,%rax,1)
L245:
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L110
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L209:
  test   %rdi,%rdi
  je     L214
L63:
  mov    %r12,%rdi
  mov    %r12,%rbp
  lea    0x40(%rsp),%r13
  call   <strlen@plt>
  mov    %r15,%rdi
  mov    %eax,%ebx
  call   <strlen@plt>
  movslq %ebx,%rcx
  mov    %r12,0x30(%rsp)
  cltq
  mov    %rcx,0x28(%rsp)
  add    %r12,%rcx
  mov    %r15,%r12
  mov    %rcx,0x18(%rsp)
  lea    (%r15,%rax,1),%rcx
  lea    0x1(%r15,%rax,1),%rax
  mov    %rcx,0x20(%rsp)
  mov    %rax,0x10(%rsp)
  jmp    L53
  nopw   0x0(%rax,%rax,1)
L192:
  cmp    0x10(%rsp),%r12
  je     L30
L53:
  mov    $0x2e,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    $0x2e,%esi
  mov    %r12,%rdi
  test   %rax,%rax
  mov    %rax,%rbx
  cmove  0x18(%rsp),%rbx
  call   <strchr@plt>
  mov    $0xa,%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  test   %rax,%rax
  mov    %rax,%r14
  cmove  0x20(%rsp),%r14
  call   <strtol@plt>
  mov    0x40(%rsp),%r15
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    $0xa,%edx
  mov    %eax,0x38(%rsp)
  cmp    %rbx,%r15
  sete   %r10b
  mov    %r10b,0x8(%rsp)
  call   <strtol@plt>
  cmp    %r14,0x40(%rsp)
  movzbl 0x8(%rsp),%r10d
  sete   %dl
  je     L166
  test   %r10b,%r10b
  jne    L98
L166:
  cmp    %rbx,%r15
  je     L170
  test   %dl,%dl
  jne    L30
L170:
  test   %r10b,%r10b
  je     L9
  test   %dl,%dl
  je     L9
  cmp    %eax,0x38(%rsp)
  jne    L226
L201:
  mov    0x30(%rsp),%rax
  mov    0x28(%rsp),%rcx
  lea    0x1(%rbx),%rbp
  lea    0x1(%r14),%r12
  lea    0x1(%rax,%rcx,1),%rax
  cmp    %rax,%rbp
  jne    L192
  xor    %eax,%eax
  cmp    0x10(%rsp),%r12
  setne  %al
  neg    %eax
  jmp    L245
L214:
  test   %r15,%r15
  je     L63
L30:
  mov    $0x1,%eax
  jmp    L245
  nopl   0x0(%rax,%rax,1)
L9:
  mov    %rbx,%r11
  mov    %r14,%r15
  mov    %r12,%rsi
  mov    %rbp,%rdi
  sub    %rbp,%r11
  sub    %r12,%r15
  cmp    %r11d,%r15d
  mov    %r11d,%edx
  mov    %r11d,0x38(%rsp)
  cmovle %r15d,%edx
  mov    %r11,0x8(%rsp)
  mov    %r15d,0x3c(%rsp)
  call   <strncmp@plt>
  mov    0x8(%rsp),%r11
  test   %eax,%eax
  jne    L41
  cmp    %r15d,%r11d
  je     L201
  mov    0x3c(%rsp),%ecx
  cmp    %ecx,0x38(%rsp)
  jl     L98
  jmp    L30
  nopw   0x0(%rax,%rax,1)
L226:
  jge    L30
  jmp    L98
L41:
  jns    L30
  jmp    L98
L110:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int compare_prerelease(char *x, char *y) {
  char *lastx, *lasty, *xptr, *yptr, *endptr;
  int xlen, ylen, xisnum, yisnum, xnum, ynum;
  int xn, yn, min, 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;
}
```