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

```asm
<rpmvercmp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L130
L238:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L464
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   (%rax)
L130:
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %rsp,%rcx
  add    $0x18,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L58
L303:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L303
L58:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L297
  orq    $0x0,-0x8(%rsp,%rdx,1)
L297:
  mov    %r13,%rdi
  lea    0xf(%rsp),%r15
  call   <strlen@plt>
  mov    %rsp,%rcx
  and    $0xfffffffffffffff0,%r15
  add    $0x18,%rax
  mov    %r15,%rbx
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L140
L75:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L75
L140:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L307
  orq    $0x0,-0x8(%rsp,%rax,1)
L307:
  lea    0xf(%rsp),%rdx
  mov    %r14,%rsi
  mov    %r15,%rdi
  and    $0xfffffffffffffff0,%rdx
  mov    %rdx,%r12
  mov    %rdx,-0x48(%rbp)
  call   <strcpy@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  movzbl (%r15),%ecx
  mov    -0x48(%rbp),%rdx
  test   %cl,%cl
  je     L329
  movzbl (%r12),%r15d
  nopl   0x0(%rax,%rax,1)
L117:
  test   %r15b,%r15b
  jne    L161
  jmp    L324
  nopw   0x0(%rax,%rax,1)
L291:
  movzbl 0x1(%rbx),%ecx
  add    $0x1,%rbx
  test   %cl,%cl
  je     L364
L161:
  movsbl %cl,%edi
  call   <isalnum@plt>
  test   %eax,%eax
  je     L291
L364:
  movsbl (%r12),%edi
  mov    %rbx,%r14
  test   %dil,%dil
  jne    L198
  jmp    L438
  nopw   0x0(%rax,%rax,1)
L419:
  movsbl 0x1(%r12),%edi
  add    $0x1,%r12
  test   %dil,%dil
  je     L438
L198:
  call   <isalnum@plt>
  test   %eax,%eax
  je     L419
L438:
  movsbl (%rbx),%edi
  mov    %r12,%r13
  call   <isdigit@plt>
  movsbl (%rbx),%edi
  test   %rax,%rax
  jne    L322
  jmp    L447
L241:
  call   <isdigit@plt>
  test   %rax,%rax
  je     L310
  movsbl 0x1(%rbx),%edi
  add    $0x1,%rbx
L322:
  test   %dil,%dil
  jne    L241
L310:
  movzbl (%r12),%r15d
  test   %r15b,%r15b
  jne    L259
  jmp    L344
  cs nopw 0x0(%rax,%rax,1)
L459:
  movzbl 0x1(%r12),%r15d
  add    $0x1,%r12
  test   %r15b,%r15b
  je     L189
L259:
  movsbl %r15b,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L459
  movzbl (%r12),%r15d
L189:
  mov    $0x1,%esi
L220:
  movzbl (%rbx),%ecx
  movb   $0x0,(%r12)
  movb   $0x0,(%rbx)
  cmp    %r14,%rbx
  je     L354
  cmp    %r13,%r12
  je     L57
  test   %esi,%esi
  jne    L478
L115:
  mov    %r13,%rsi
  mov    %r14,%rdi
  mov    %cl,-0x48(%rbp)
  call   <strcmp@plt>
  movzbl -0x48(%rbp),%ecx
  test   %eax,%eax
  jne    L335
  mov    %cl,(%rbx)
  mov    %r15b,(%r12)
  test   %cl,%cl
  jne    L117
L446:
  neg    %r15b
  sbb    %eax,%eax
  jmp    L238
  xchg   %ax,%ax
L222:
  call   <isalpha@plt>
  test   %rax,%rax
  je     L368
  movsbl 0x1(%rbx),%edi
  add    $0x1,%rbx
L447:
  test   %dil,%dil
  jne    L222
L368:
  movzbl (%r12),%r15d
  test   %r15b,%r15b
  jne    L112
  jmp    L492
  cs nopw 0x0(%rax,%rax,1)
L97:
  movzbl 0x1(%r12),%r15d
  add    $0x1,%r12
  test   %r15b,%r15b
  je     L278
L112:
  movsbl %r15b,%edi
  call   <isalpha@plt>
  test   %rax,%rax
  jne    L97
  movzbl (%r12),%r15d
L278:
  xor    %esi,%esi
  jmp    L220
  nopl   0x0(%rax)
L468:
  add    $0x1,%r14
L478:
  cmpb   $0x30,(%r14)
  je     L468
  cmpb   $0x30,0x0(%r13)
  jne    L113
  nopl   0x0(%rax)
L336:
  add    $0x1,%r13
  cmpb   $0x30,0x0(%r13)
  je     L336
L113:
  mov    %r14,%rdi
  mov    %cl,-0x49(%rbp)
  call   <strlen@plt>
  mov    %r13,%rdi
  mov    %rax,-0x48(%rbp)
  call   <strlen@plt>
  cmp    %rax,-0x48(%rbp)
  jg     L324
  movzbl -0x49(%rbp),%ecx
  jge    L115
L354:
  mov    $0xffffffff,%eax
  jmp    L238
L335:
  mov    $0xffffffff,%eax
  jle    L238
L324:
  mov    $0x1,%eax
  jmp    L238
L492:
  xor    %esi,%esi
L234:
  mov    $0xffffffff,%eax
  cmp    %rbx,%r14
  je     L238
L57:
  mov    $0xffffffff,%eax
  test   %esi,%esi
  je     L238
  jmp    L324
L344:
  mov    $0x1,%esi
  jmp    L234
L329:
  movzbl (%rdx),%r15d
  jmp    L446
L464:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int rpmvercmp(const char *a, const char *b) {
  char oldch1, oldch2;
  char *str1, *str2;
  char *one, *two;
  int rc;
  int isnum;
  if (!strcmp(a, b))
    return 0;
  str1 = alloca(strlen(a) + 1);
  str2 = alloca(strlen(b) + 1);
  strcpy(str1, a);
  strcpy(str2, b);
  one = str1;
  two = str2;
  while (*one && *two) {
    while (*one && !isalnum(*one))
      one++;
    while (*two && !isalnum(*two))
      two++;
    str1 = one;
    str2 = two;
    if (isdigit(*str1)) {
      while (*str1 && isdigit(*str1))
        str1++;
      while (*str2 && isdigit(*str2))
        str2++;
      isnum = 1;
    } else {
      while (*str1 && isalpha(*str1))
        str1++;
      while (*str2 && isalpha(*str2))
        str2++;
      isnum = 0;
    }
    oldch1 = *str1;
    *str1 = '\0';
    oldch2 = *str2;
    *str2 = '\0';
    if (one == str1)
      return -1;
    if (two == str2)
      return (isnum ? 1 : -1);
    if (isnum) {
      while (*one == '0')
        one++;
      while (*two == '0')
        two++;
      if (strlen(one) > strlen(two))
        return 1;
      if (strlen(two) > strlen(one))
        return -1;
    }
    rc = strcmp(one, two);
    if (rc)
      return (rc < 1 ? -1 : 1);
    *str1 = oldch1;
    one = str1;
    *str2 = oldch2;
    two = str2;
  }
  if ((!*one) && (!*two))
    return 0;
  if (!*one)
    return -1;
  else
    return 1;
}
```