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

```asm
<pjf_rmdir>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rsi
  call   <lstat@plt>
  mov    $0x0,%ebx
  test   %rax,%rax
  js     L16
  mov    0x4(%rsp),%edi
  call   <S_ISDIR@plt>
  test   %rax,%rax
  je     L64
  mov    %rbp,%rdi
  call   <opendir@plt>
  mov    %rax,%r14
  lea    D26(%rip),%r15
  test   %rax,%rax
  jne    L38
  mov    $0x0,%ebx
  jmp    L16
L87:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rax,%r13
  mov    (%rbx),%rdi
  call   <strlen@plt>
  lea    0x2(%r13,%rax,1),%rdi
  call   <pjf_malloc@plt>
  mov    %rax,%r13
  mov    %rbp,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    D23(%rip),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  mov    (%rbx),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <pjf_rmdir>
  mov    %eax,%ebx
  mov    %r13,%rdi
  call   <free@plt>
  test   %ebx,%ebx
  je     L16
L38:
  mov    %r14,%rdi
  call   <readdir@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L51
  mov    %r15,%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L38
  lea    D28(%rip),%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L38
  test   %r12,%r12
  je     L87
  mov    %r12,%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L87
  jmp    L38
L51:
  mov    %r14,%rdi
  call   <closedir@plt>
  mov    %rbp,%rdi
  call   <rmdir@plt>
  test   %r12,%r12
  sete   %bl
  test   %rax,%rax
  setne  %al
  and    %eax,%ebx
  xor    $0x1,%ebx
  movzbl %bl,%ebx
  jmp    L16
L64:
  mov    %rbp,%rdi
  call   <unlink@plt>
  test   %rax,%rax
  sete   %bl
  movzbl %bl,%ebx
L16:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L61
  mov    %ebx,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L61:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D26
datatype: string
name: parse_data
arguments: data_label: D23
datatype: string
name: parse_data
arguments: data_label: D28
datatype: string

tool: D26: .

tool: D23: /

tool: D28: ..

assistant: ```c
int pjf_rmdir(const char *path, const char *skip) {
  struct stat statbuf;
  struct dirent *dirp;
  DIR *subd;
  char *newpath;
  int upret;
  if (lstat(path, &statbuf) < 0)
    return 0;
  if (S_ISDIR(statbuf.st_mode)) {
    subd = opendir(path);
    if (!subd)
      return 0;
    while ((dirp = readdir(subd))) {
      if ((strcmp((dirp->d_name), (".")) == 0))
        continue;
      if ((strcmp((dirp->d_name), ("..")) == 0))
        continue;
      if (skip && (strcmp((dirp->d_name), (skip)) == 0))
        continue;
      newpath = pjf_malloc(strlen(path) + strlen(dirp->d_name) + 2);
      strcpy(newpath, path);
      strcat(newpath, "/");
      strcat(newpath, dirp->d_name);
      upret = pjf_rmdir(newpath, skip);
      free(newpath);
      if (!upret)
        return 0;
    }
    closedir(subd);
    if (rmdir(path) != 0 && !skip)
      return 0;
  } else {
    if (unlink(path) != 0)
      return 0;
  }
  return 1;
}
```