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

```asm
<nstrcmp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rsi,%rbx
  call   <strdup@plt>
  mov    %rax,%r12
  mov    %rbx,%rdi
  call   <strdup@plt>
  mov    %rax,%r13
  mov    %r12,%rdi
  call   <cutalias@plt>
  mov    %rax,%r15
  mov    %r13,%rdi
  call   <cutalias@plt>
  mov    %rax,0x8(%rsp)
  mov    %r12,%rdi
  call   <rindex_nondigit@plt>
  mov    %eax,%ebp
  mov    %r13,%rdi
  call   <rindex_nondigit@plt>
  mov    %eax,%ebx
  cmp    %eax,%ebp
  mov    %eax,%edx
  cmovle %ebp,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L108
  cmp    %ebx,%ebp
  jg     L104
  jl     L159
  movslq %ebx,%rbx
  add    %r13,%rbx
  movslq %ebp,%rdi
  add    %r12,%rdi
  call   <atoi@plt>
  mov    %eax,%ebp
  mov    %rbx,%rdi
  call   <atoi@plt>
  cmp    %eax,%ebp
  jl     L8
  jg     L28
  test   %r15,%r15
  je     L81
  mov    %r15,%rdi
  call   <atoi@plt>
  mov    %eax,%ebp
  mov    $0xffffffff,%ebx
  cmpq   $0x0,0x8(%rsp)
  je     L43
L36:
  mov    0x8(%rsp),%rdi
  call   <atoi@plt>
  mov    %eax,%ebx
L43:
  mov    %r12,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  cmp    %ebp,%ebx
  jg     L27
L112:
  cmp    %ebx,%ebp
  setg   %r14b
  movzbl %r14b,%r14d
L137:
  mov    %r14d,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L108:
  mov    %eax,%r14d
  mov    %r12,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  jmp    L137
L104:
  mov    %r12,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    $0x1,%r14d
  jmp    L137
L159:
  mov    %r12,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    $0xffffffff,%r14d
  jmp    L137
L8:
  mov    %r12,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    $0xffffffff,%r14d
  jmp    L137
L28:
  mov    %r12,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    $0x1,%r14d
  jmp    L137
L27:
  mov    $0xffffffff,%r14d
  jmp    L137
L81:
  mov    $0xffffffff,%ebp
  cmpq   $0x0,0x8(%rsp)
  jne    L36
  mov    %r12,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    $0xffffffff,%ebx
  mov    $0xffffffff,%ebp
  jmp    L112
```

assistant: ```c
int nstrcmp(const char *ap, const char *bp) {
  char *a = (char *)strdup(ap);
  char *b = (char *)strdup(bp);
  char *an, *bn;
  int av = 0, bv = 0;
  char *aalias = cutalias(a);
  char *balias = cutalias(b);
  int aindex = rindex_nondigit(a);
  int bindex = rindex_nondigit(b);
  int complen = (aindex < bindex) ? aindex : bindex;
  int res = strncmp(a, b, complen);
  if (res != 0) {
    free(a);
    free(b);
    return res;
  }
  if (aindex > bindex) {
    free(a);
    free(b);
    return 1;
  }
  if (aindex < bindex) {
    free(a);
    free(b);
    return -1;
  }
  an = a + aindex;
  bn = b + bindex;
  av = atoi(an);
  bv = atoi(bn);
  if (av < bv) {
    free(a);
    free(b);
    return -1;
  }
  if (av > bv) {
    free(a);
    free(b);
    return 1;
  }
  av = -1;
  if (aalias != NULL)
    av = atoi(aalias);
  bv = -1;
  if (balias != NULL)
    bv = atoi(balias);
  free(a);
  free(b);
  if (av < bv)
    return -1;
  if (av > bv)
    return 1;
  return 0;
}
```