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

```asm
<mkdir_p>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %esi,-0x6c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x50(%rbp)
  mov    D40(%rip),%rax
  mov    (%rax),%ecx
  movslq %ecx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x48(%rbp)
  movslq %ecx,%rax
  mov    %rax,%r14
  mov    $0x0,%r15d
  movslq %ecx,%rax
  mov    %rax,%r12
  mov    $0x0,%r13d
  movslq %ecx,%rax
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffff000,%rsi
  mov    %rsp,%rdx
  sub    %rsi,%rdx
L1:
  cmp    %rdx,%rsp
  je     L115
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1
L115:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L86
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L86:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x40(%rbp)
  mov    D50(%rip),%rax
  movq   $0x0,(%rax)
  movslq %ecx,%rax
  sub    $0x1,%rax
  cmp    %rax,-0x50(%rbp)
  jbe    L24
  mov    D68(%rip),%rax
  mov    (%rax),%rdx
  mov    D50(%rip),%rax
  mov    %rdx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L17
L24:
  mov    -0x68(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x40(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x58(%rbp)
  jmp    L116
L72:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L18
  mov    -0x58(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x6c(%rbp),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mkdir@plt>
  test   %rax,%rax
  je     L2
  mov    D50(%rip),%rax
  mov    (%rax),%rdx
  mov    D49(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  je     L2
  mov    $0xffffffff,%eax
  jmp    L17
L2:
  mov    -0x58(%rbp),%rax
  movb   $0x2f,(%rax)
L18:
  addq   $0x1,-0x58(%rbp)
L116:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L72
  mov    -0x6c(%rbp),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mkdir@plt>
  test   %rax,%rax
  je     L138
  mov    D50(%rip),%rax
  mov    (%rax),%rdx
  mov    D49(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  je     L138
  mov    $0xffffffff,%eax
  jmp    L17
L138:
  mov    $0x0,%eax
L17:
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L89
  call   <__stack_chk_fail@plt>
L89:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
int mkdir_p(const char *path, mode_t mode) {
  const size_t len = strlen(path);
  char _path[PATH_MAX];
  char *p;
  errno = 0;
  if (len > sizeof(_path) - 1) {
    errno = ENAMETOOLONG;
    return -1;
  }
  strcpy(_path, path);
  for (p = _path + 1; *p; p++) {
    if (*p == '/') {
      *p = '\0';
      if (mkdir(_path, mode) != 0) {
        if (errno != EEXIST)
          return -1;
      }
      *p = '/';
    }
  }
  if (mkdir(_path, mode) != 0) {
    if (errno != EEXIST)
      return -1;
  }
  return 0;
}
```