user: What is the c source code of the assembly code below?

```asm
<myrealpath>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %edx,%ecx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    D11(%rip),%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  cltq
  add    $0xf,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L100:
  cmp    %rdx,%rsp
  je     L159
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L100
L159:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L75
  orq    $0x0,-0x8(%rsp,%rax,1)
L75:
  mov    %rsp,%r15
  test   %ecx,%ecx
  js     L152
  mov    %rbx,%rdi
  call   <chdir@plt>
  test   %eax,%eax
  je     L15
  mov    $0x2f,%esi
  mov    %rbx,%rdi
  call   <strrchr@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L72
  mov    %rax,%r14
  sub    %rbx,%r14
  mov    D11(%rip),%rax
  movslq (%rax),%rdx
  mov    $0x0,%eax
  cmp    %rdx,%r14
  jg     L68
  mov    %r14d,%edx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <memcpy@plt>
  movb   $0x0,(%r15,%r14,1)
  mov    %r15,%rdi
  call   <chdir@plt>
  cmp    $0xffffffff,%eax
  je     L84
  lea    0x1(%r13),%rbx
L72:
  mov    D11(%rip),%rax
  mov    (%rax),%esi
  mov    %r12,%rdi
  call   <getcwd@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L68
  mov    %r12,%rdi
  call   <strlen@plt>
  movslq %eax,%rcx
  movb   $0x2f,(%r12,%rcx,1)
  add    $0x1,%eax
  mov    D11(%rip),%rdx
  mov    (%rdx),%edx
  sub    $0x1,%edx
  cmp    %edx,%eax
  jge    L116
  movslq %eax,%rdx
  sub    %rcx,%rbx
L91:
  mov    %edx,%eax
  movzbl -0x1(%rbx,%rdx,1),%ecx
  mov    %cl,(%r12,%rdx,1)
  test   %cl,%cl
  je     L116
  lea    0x1(%rdx),%eax
  add    $0x1,%rdx
  mov    D11(%rip),%rcx
  mov    (%rcx),%ecx
  sub    $0x1,%ecx
  cmp    %edx,%ecx
  jg     L91
L116:
  cltq
  movb   $0x0,(%r12,%rax,1)
  mov    %r12,%rax
  jmp    L68
L152:
  mov    D32(%rip),%rax
  mov    (%rax),%edx
  mov    D40(%rip),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  jmp    L68
L15:
  mov    D11(%rip),%rax
  mov    (%rax),%esi
  mov    %r12,%rdi
  call   <getcwd@plt>
L68:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L150
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L84:
  mov    $0x0,%eax
  jmp    L68
L150:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *myrealpath(const char *file, char *dest, int count) {
  char buf[PATH_MAX + 1];
  char *c;
  int i;
  if (count < 0) {
    errno = EMLINK;
    return 0;
  }
  if (chdir(file) == 0)
    return getcwd(dest, PATH_MAX);
  c = strrchr(file, '/');
  if (c) {
    if (c - file > PATH_MAX)
      return 0;
    memcpy(buf, file, c - file);
    buf[c - file] = 0;
    if (chdir(buf) == -1)
      return 0;
    file = c + 1;
  }
  if (getcwd(dest, PATH_MAX) == 0)
    return 0;
  i = strlen(dest);
  dest[i] = '/';
  ++i;
  for (; i < PATH_MAX - 1; ++i) {
    if (!(dest[i] = *file))
      break;
    ++file;
  }
  dest[i] = 0;
  return dest;
}
```