user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,-0x54(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  cmpl   $0x4,-0x54(%rbp)
  je     L14
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L8
L14:
  mov    -0x60(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x2,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%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
L68:
  cmp    %rdx,%rsp
  je     L27
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L68
L27:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L6
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L6:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x60(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x60(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %al,-0x4d(%rbp)
  mov    -0x60(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <bmount@plt>
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  mov    -0x40(%rbp),%rdx
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x2f,%al
  je     L15
  mov    -0x40(%rbp),%rax
  lea    D5(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
L15:
  movsbl -0x4d(%rbp),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mi_creat@plt>
  mov    %eax,-0x4c(%rbp)
  mov    $0x0,%eax
  call   <bumount@plt>
  mov    -0x4c(%rbp),%eax
L8:
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L51
  call   <__stack_chk_fail@plt>
L51:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: tag: D9
type_guessed: string
name: read_data
arguments: tag: D5
type_guessed: string

tool: D9: Uso: mi_mkdir <nombre_dispositivo> <permisos> <path>

tool: D5: /

assistant: ```c
int main(int argc, char const *argv[]) {
  if (argc != 4) {
    puts("Uso: mi_mkdir <nombre_dispositivo> <permisos> <path>");
    return -1;
  }
  char camino[strlen(argv[3]) + 2];
  strcpy(camino, argv[3]);
  char permisos = atoi(argv[2]);
  int resultado;
  bmount(argv[1]);
  if (camino[strlen(camino) - 1] != '/')
    strcat(camino, "/");
  resultado = mi_creat(camino, permisos);
  bumount();
  return resultado;
}
```