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
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbx
  sub    $0x18,%rsp
  mov    D9(%rip),%rbx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rsi
  mov    (%rbx),%eax
  add    $0x1,%eax
  cltq
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L45
L104:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L104
L45:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L97
L80:
  test   %edx,%edx
  js     L90
  mov    %r12,%rdi
  call   <chdir@plt>
  test   %eax,%eax
  je     L103
  mov    $0x2f,%esi
  mov    %r12,%rdi
  call   <strrchr@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L113
  mov    %rax,%r15
  movslq (%rbx),%rax
  sub    %r12,%r15
  cmp    %rax,%r15
  jg     L140
  mov    %rsp,%rdi
  mov    %r15d,%edx
  mov    %r12,%rsi
  call   <memcpy@plt>
  mov    %rsp,%rdi
  movb   $0x0,(%rsp,%r15,1)
  call   <chdir@plt>
  cmp    $0xffffffff,%eax
  je     L140
  lea    0x1(%r14),%r12
L113:
  mov    (%rbx),%esi
  mov    %r13,%rdi
  call   <getcwd@plt>
  test   %rax,%rax
  je     L140
  mov    %r13,%rdi
  call   <strlen@plt>
  movslq %eax,%rdx
  add    $0x1,%eax
  movb   $0x2f,0x0(%r13,%rdx,1)
  mov    (%rbx),%esi
  lea    -0x1(%rsi),%edx
  cmp    %edx,%eax
  jge    L17
  movslq %eax,%rdx
  add    %r13,%rdx
  jmp    L138
  xchg   %ax,%ax
L61:
  mov    (%rbx),%edi
  add    $0x1,%eax
  add    $0x1,%r12
  add    $0x1,%rdx
  lea    -0x1(%rdi),%ecx
  cmp    %eax,%ecx
  jle    L17
L138:
  movzbl (%r12),%ecx
  mov    %cl,(%rdx)
  test   %cl,%cl
  jne    L61
L183:
  movb   $0x0,(%rdx)
  mov    %r13,%rax
L15:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L147
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L103:
  mov    (%rbx),%esi
  mov    %r13,%rdi
  call   <getcwd@plt>
  jmp    L15
  nopl   0x0(%rax)
L140:
  xor    %eax,%eax
  jmp    L15
  nopl   0x0(%rax)
L90:
  mov    D3(%rip),%rax
  mov    (%rax),%edx
  mov    D29(%rip),%rax
  mov    %edx,(%rax)
  xor    %eax,%eax
  jmp    L15
  cs nopw 0x0(%rax,%rax,1)
L97:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L80
  nopl   0x0(%rax,%rax,1)
L17:
  cltq
  lea    0x0(%r13,%rax,1),%rdx
  jmp    L183
L147:
  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;
}
```