user: 下面的汇编指令对应的C源代码是什么：

```asm
<calc_relative_path>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,-0x88(%rbp)
  mov    %rsi,-0x90(%rbp)
  mov    %rdx,-0x98(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    D1(%rip),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x58(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L118:
  cmp    %rdx,%rsp
  je     L209
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L118
L209:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L96
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L96:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x50(%rbp)
  mov    D1(%rip),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L85:
  cmp    %rdx,%rsp
  je     L7
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L85
L7:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L135
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L135:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x40(%rbp),%rdx
  mov    -0x90(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <realpath@plt>
  test   %eax,%eax
  je     L239
  cmpq   $0x0,-0x88(%rbp)
  je     L239
  mov    -0x50(%rbp),%rdx
  mov    -0x88(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <realpath@plt>
  test   %eax,%eax
  jne    L60
L239:
  mov    -0x40(%rbp),%rdx
  mov    -0x98(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L234
L60:
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x70(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  movq   $0x0,-0x60(%rbp)
  movl   $0xffffffff,-0x78(%rbp)
  jmp    L181
L84:
  addq   $0x1,-0x70(%rbp)
  mov    -0x68(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x68(%rbp)
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L181
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  addl   $0x1,-0x78(%rbp)
L181:
  mov    -0x70(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x68(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L84
  movl   $0x0,-0x74(%rbp)
  mov    -0x70(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L143
  mov    -0x68(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L143
  addq   $0x1,-0x68(%rbp)
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  addl   $0x1,-0x78(%rbp)
  jmp    L27
L143:
  addl   $0x1,-0x74(%rbp)
L27:
  cmpl   $0x0,-0x78(%rbp)
  jg     L154
  mov    -0x40(%rbp),%rdx
  mov    -0x98(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L234
L123:
  mov    -0x70(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L154
  addl   $0x1,-0x74(%rbp)
L154:
  mov    -0x70(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x70(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  jne    L123
  mov    -0x70(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L76
  subl   $0x1,-0x74(%rbp)
  jmp    L76
L189:
  mov    -0x98(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x98(%rbp)
  movb   $0x2e,(%rax)
  mov    -0x98(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x98(%rbp)
  movb   $0x2e,(%rax)
  mov    -0x98(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x98(%rbp)
  movb   $0x2f,(%rax)
L76:
  mov    -0x74(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x74(%rbp)
  test   %eax,%eax
  jne    L189
  mov    -0x60(%rbp),%rdx
  mov    -0x98(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    %rbx,%rsp
  jmp    L98
L234:
  mov    %rbx,%rsp
L98:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L25
  call   <__stack_chk_fail@plt>
L25:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
void calc_relative_path(const char *from, const char *to, char *out) {
  char path_from[PATH_MAX];
  char path_to[PATH_MAX];
  if (!realpath(to, path_to) || !from || !realpath(from, path_from)) {
    strcpy(out, path_to);
    return;
  }
  char *ptr_from = path_from;
  char *ptr_to = path_to;
  char *ptr_match = NULL;
  int depth_match = -1;
  while (*ptr_from == *ptr_to) {
    ptr_from++;
    if (*ptr_to++ == '/') {
      ptr_match = ptr_to;
      depth_match++;
    }
  }
  int depth = 0;
  if (!(*ptr_from) && *ptr_to == '/') {
    ptr_match = ++ptr_to;
    depth_match++;
  } else {
    depth++;
  }
  if (depth_match <= 0) {
    strcpy(out, path_to);
    return;
  }
  while (*ptr_from++) {
    if (*ptr_from == '/')
      depth++;
  }
  if (*(ptr_from - 1) == '/')
    depth--;
  while (depth--) {
    *out++ = '.';
    *out++ = '.';
    *out++ = '/';
  }
  strcpy(out, ptr_match);
}
```