user: Converte this assembly snippet into its equivalent C code:

```asm
<file_confirm_mountpoint>:
  endbr64
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <eslib_file_path_check@plt>
  test   %rax,%rax
  jne    L52
  mov    %r12,%rdi
  call   <eslib_file_path_check@plt>
  test   %rax,%rax
  jne    L52
  mov    %r12,%rdi
  call   <eslib_file_exists@plt>
  mov    %eax,%ebx
  cmp    $0xffffffff,%eax
  je     L78
  mov    %rbp,%rdi
  call   <eslib_file_isdir@plt>
  cmp    $0x1,%eax
  je     L176
  cmp    $0xffffffff,%eax
  je     L78
  test   %ebx,%ebx
  jne    L44
  and    $0x10,%r13d
  je     L40
  mov    $0x1ed,%esi
  mov    %r12,%rdi
  call   <eslib_file_mkfile@plt>
  test   %rax,%rax
  jne    L149
L65:
  xor    %eax,%eax
L177:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L44:
  mov    %r12,%rdi
  call   <eslib_file_isdir@plt>
  cmp    $0x1,%eax
  je     L181
  test   %eax,%eax
  je     L65
L78:
  mov    %r12,%rdx
  mov    %rbp,%rsi
  lea    D21(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L52:
  mov    $0xffffffff,%eax
  jmp    L177
  nopl   0x0(%rax,%rax,1)
L176:
  test   %ebx,%ebx
  jne    L41
  and    $0x10,%r13d
  je     L40
  mov    $0x1ed,%esi
  mov    %r12,%rdi
  call   <eslib_file_mkdirpath@plt>
  test   %rax,%rax
  je     L65
  mov    %r12,%rsi
  lea    D43(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L177
  nopl   0x0(%rax)
L41:
  mov    %r12,%rdi
  call   <eslib_file_isdir@plt>
  cmp    $0x1,%eax
  je     L65
  mov    %r12,%rsi
  lea    D52(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L177
L149:
  mov    %r12,%rsi
  lea    D25(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L177
L40:
  mov    %r12,%rsi
  lea    D54(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L177
L181:
  mov    %r12,%rsi
  lea    D29(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  or     $0xffffffff,%eax
  jmp    L177
```

tool_calls: name: retrieve_data
arguments: data_label: D21
type_guessed: string
name: retrieve_data
arguments: data_label: D43
type_guessed: string
name: retrieve_data
arguments: data_label: D52
type_guessed: string
name: retrieve_data
arguments: data_label: D25
type_guessed: string
name: retrieve_data
arguments: data_label: D54
type_guessed: string
name: retrieve_data
arguments: data_label: D29
type_guessed: string

tool: D21: create mountpoint(%s, %s) failed


tool: D43: mkdirpath(%s) failed


tool: D52: dest(%s) is not a directory.


tool: D25: mkfile(%s) failed


tool: D54: dest(%s) did not exist


tool: D29: dest(%s) should not be a directory


assistant: ```c
int file_confirm_mountpoint(char *src, char *dest, unsigned long esflags) {
  int r;
  int exists = 0;
  const mode_t mode = 0755;
  if (eslib_file_path_check(src) || eslib_file_path_check(dest))
    return -1;
  r = eslib_file_exists(dest);
  if (r == -1)
    goto err;
  exists = r;
  r = eslib_file_isdir(src);
  if (r == 1) {
    if (exists) {
      if (eslib_file_isdir(dest) != 1) {
        printf("dest(%s) is not a directory.\n", dest);
        return -1;
      }
    } else {
      if (esflags & 16) {
        if (eslib_file_mkdirpath(dest, mode)) {
          printf("mkdirpath(%s) failed\n", dest);
          return -1;
        }
      } else {
        printf("dest(%s) did not exist\n", dest);
        return -1;
      }
    }
    return 0;
  } else if (r == -1) {
    goto err;
  }
  if (exists) {
    r = eslib_file_isdir(dest);
    if (r == 1) {
      printf("dest(%s) should not be a directory\n", dest);
      return -1;
    }
    if (r == 0) {
      return 0;
    } else {
      goto err;
    }
  } else {
    if (esflags & 16) {
      if (eslib_file_mkfile(dest, mode)) {
        printf("mkfile(%s) failed\n", dest);
        return -1;
      }
    } else {
      printf("dest(%s) did not exist\n", dest);
      return -1;
    }
    return 0;
  }
err:
  printf("create mountpoint(%s, %s) failed\n", src, dest);
  return -1;
}
```