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

```asm
<myrealpath>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r15
  mov    %rsi,%r12
  mov    %edx,%r13d
  cmpb   $0x2f,(%rdi)
  jne    L265
  lea    0x1(%rsi),%rbx
  movb   $0x2f,(%rsi)
  lea    0x1(%rdi),%rbp
  mov    D82(%rip),%rax
  mov    (%rax),%edi
  add    $0x1,%edi
  call   <malloc@plt>
  mov    %rax,%r14
  movzbl 0x1(%r15),%eax
  test   %al,%al
  je     L117
L100:
  movq   $0x0,(%rsp)
  mov    $0x0,%esi
  sub    $0x2,%r13d
  jmp    L324
L265:
  lea    -0x2(%rdx),%esi
  mov    %r12,%rdi
  call   <getcwd@plt>
  mov    %eax,%edx
  mov    $0x0,%eax
  test   %edx,%edx
  je     L228
  mov    %r12,%rdi
  call   <strlen@plt>
  movslq %eax,%rbx
  add    %r12,%rbx
  cmpb   $0x2f,-0x1(%rbx)
  je     L366
  movb   $0x2f,(%rbx)
  lea    0x1(%rbx),%rbx
L366:
  mov    D82(%rip),%rax
  mov    (%rax),%edi
  add    $0x1,%edi
  call   <malloc@plt>
  mov    %rax,%r14
  movzbl (%r15),%eax
  test   %al,%al
  je     L301
  mov    %r15,%rbp
  jmp    L100
L117:
  movq   $0x0,(%rsp)
  jmp    L157
L306:
  add    $0x1,%rbp
  jmp    L302
L206:
  movzbl 0x1(%rbp),%eax
  test   %al,%al
  je     L190
  cmp    $0x2f,%al
  je     L190
  cmp    $0x2e,%al
  jne    L67
  movzbl 0x2(%rbp),%eax
  test   %al,%al
  je     L303
  cmp    $0x2f,%al
  jne    L67
L303:
  add    $0x2,%rbp
  lea    0x1(%r12),%rax
L24:
  cmp    %rax,%rbx
  jbe    L302
  sub    $0x1,%rbx
  cmpb   $0x2f,-0x1(%rbx)
  jne    L24
  jmp    L302
L190:
  add    $0x1,%rbp
  jmp    L302
L104:
  lea    0x1(%rsi),%eax
  mov    %eax,0x18(%rsp)
  cmp    $0x100,%esi
  jg     L350
  movb   $0x0,(%rbx)
  mov    D82(%rip),%rax
  mov    (%rax),%edx
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <readlink@plt>
  mov    %eax,%r15d
  test   %eax,%eax
  js     L279
  cltq
  mov    %rax,0x10(%rsp)
  movb   $0x0,(%r14,%rax,1)
  mov    %r12,0x8(%rsp)
  cmpb   $0x2f,(%r14)
  jne    L71
L231:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,0x1c(%rsp)
  lea    0x1(%r15,%rax,1),%edi
  call   <malloc@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L367
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    0x1c(%rsp),%edx
  add    $0x1,%edx
  mov    0x10(%rsp),%rdi
  add    %rbx,%rdi
  mov    %rbp,%rsi
  call   <memcpy@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    %rbx,(%rsp)
  mov    %rbx,%rbp
L160:
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rbx
  movb   $0x2f,(%rax)
  mov    0x18(%rsp),%esi
L302:
  movzbl 0x0(%rbp),%eax
  test   %al,%al
  je     L358
L324:
  cmp    $0x2f,%al
  je     L306
  cmp    $0x2e,%al
  je     L206
L67:
  movzbl 0x0(%rbp),%eax
  test   %al,%al
  je     L104
  cmp    $0x2f,%al
  je     L104
  movslq %r13d,%rcx
  mov    %rbx,%rdx
  sub    %r12,%rdx
  cmp    %rcx,%rdx
  jg     L234
L345:
  add    $0x1,%rbp
  add    $0x1,%rbx
  mov    %al,-0x1(%rbx)
  movzbl 0x0(%rbp),%eax
  test   %al,%al
  je     L104
  cmp    $0x2f,%al
  je     L104
  mov    %rbx,%rdx
  sub    %r12,%rdx
  cmp    %rcx,%rdx
  jle    L345
L234:
  mov    D25(%rip),%rax
  mov    (%rax),%rdx
  mov    D81(%rip),%rax
  mov    %rdx,(%rax)
L367:
  mov    %r14,%rdi
  call   <free@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    $0x0,%eax
L228:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L350:
  mov    D64(%rip),%rax
  mov    (%rax),%rdx
  mov    D81(%rip),%rax
  mov    %rdx,(%rax)
  jmp    L367
L279:
  mov    D81(%rip),%rdx
  mov    D38(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,(%rdx)
  jne    L367
  mov    %rbx,0x8(%rsp)
  jmp    L160
L71:
  sub    $0x1,%rbx
  cmpb   $0x2f,(%rbx)
  jne    L71
  mov    %rbx,0x8(%rsp)
  jmp    L231
L301:
  movq   $0x0,(%rsp)
L358:
  lea    0x1(%r12),%rax
  cmp    %rax,%rbx
  je     L157
  cmpb   $0x2f,-0x1(%rbx)
  sete   %al
  movzbl %al,%eax
  sub    %rax,%rbx
L157:
  movb   $0x0,(%rbx)
  mov    %r14,%rdi
  call   <free@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    %r12,%rax
  jmp    L228
```

assistant: ```c
char *myrealpath(const char *path, char *resolved_path, int maxreslth) {
  int readlinks = 0;
  char *npath;
  char *link_path;
  int n;
  char *buf = NULL;
  npath = resolved_path;
  if (*path != '/') {
    if (!getcwd(npath, maxreslth - 2))
      return NULL;
    npath += strlen(npath);
    if (npath[-1] != '/')
      *npath++ = '/';
  } else {
    *npath++ = '/';
    path++;
  }
  link_path = malloc(PATH_MAX + 1);
  while (*path != '\0') {
    if (*path == '/') {
      path++;
      continue;
    }
    if (*path == '.' && (path[1] == '\0' || path[1] == '/')) {
      path++;
      continue;
    }
    if (*path == '.' && path[1] == '.' && (path[2] == '\0' || path[2] == '/')) {
      path += 2;
      while (npath > resolved_path + 1 && (--npath)[-1] != '/')
        ;
      continue;
    }
    while (*path != '\0' && *path != '/') {
      if (npath - resolved_path > maxreslth - 2) {
        errno = ENAMETOOLONG;
        goto err;
      }
      *npath++ = *path++;
    }
    if (readlinks++ > 256) {
      errno = ELOOP;
      goto err;
    }
    *npath = '\0';
    n = readlink(resolved_path, link_path, PATH_MAX);
    if (n < 0) {
      if (errno != EINVAL)
        goto err;
    } else {
      int m;
      char *newbuf;
      link_path[n] = '\0';
      if (*link_path == '/')
        npath = resolved_path;
      else
        while (*(--npath) != '/')
          ;
      m = strlen(path);
      newbuf = malloc(m + n + 1);
      if (!newbuf)
        goto err;
      memcpy(newbuf, link_path, n);
      memcpy(newbuf + n, path, m + 1);
      free(buf);
      path = buf = newbuf;
    }
    *npath++ = '/';
  }
  if (npath != resolved_path + 1 && npath[-1] == '/')
    npath--;
  *npath = '\0';
  free(link_path);
  free(buf);
  return resolved_path;
err:
  free(link_path);
  free(buf);
  return NULL;
}
```