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

```asm
<path_parser>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x848,%rsp
  mov    %rdi,-0x868(%rbp)
  mov    %rsi,-0x870(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x868(%rbp),%rdx
  lea    -0x840(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <strcpy@plt>
  movl   $0x1,-0x85c(%rbp)
  lea    -0x840(%rbp),%rax
  lea    D39(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x858(%rbp)
  jmp    L19
L66:
  lea    D39(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x858(%rbp)
  addl   $0x1,-0x85c(%rbp)
L19:
  cmpq   $0x0,-0x858(%rbp)
  jne    L66
  mov    -0x85c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x850(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ecx
  mov    $0x0,%edx
  div    %rcx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L38:
  cmp    %rdx,%rsp
  je     L47
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L38
L47:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L77
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L77:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x848(%rbp)
  mov    -0x868(%rbp),%rdx
  lea    -0x840(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <strcpy@plt>
  movl   $0x0,-0x85c(%rbp)
  lea    -0x840(%rbp),%rax
  lea    D39(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x858(%rbp)
  jmp    L78
L2:
  mov    -0x848(%rbp),%rax
  mov    -0x85c(%rbp),%edx
  movslq %edx,%rdx
  mov    -0x858(%rbp),%rcx
  mov    %rcx,(%rax,%rdx,8)
  addl   $0x1,-0x85c(%rbp)
  lea    D39(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,-0x858(%rbp)
L78:
  cmpq   $0x0,-0x858(%rbp)
  jne    L2
  mov    -0x848(%rbp),%rdx
  mov    -0x870(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <strcpy@plt>
  mov    -0x85c(%rbp),%eax
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L49
  call   <__stack_chk_fail@plt>
L49:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D39
data_type: string

tool: D39: /

assistant: ```c
int path_parser(char *path, char *pathfound) {
  char *token;
  char aux[2048];
  strcpy(aux, path);
  int char_size = 1;
  token = strtok(aux, "/");
  while (token != NULL) {
    token = strtok(NULL, "/");
    ++char_size;
  }
  const char *paths[char_size];
  strcpy(aux, path);
  char_size = 0;
  token = strtok(aux, "/");
  while (token != NULL) {
    paths[char_size] = token;
    ++char_size;
    token = strtok(NULL, "/");
  }
  strcpy(pathfound, paths);
  return char_size;
}
```