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

```asm
<compute_tree>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x24(%rbp)
  jmp    L37
L88:
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x24(%rbp)
L37:
  mov    -0x24(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L88
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x28(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <stat@plt>
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISDIR@plt>
  test   %rax,%rax
  je     L26
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <opendir@plt>
  mov    %rax,-0x20(%rbp)
  jmp    L41
L93:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  lea    D1(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L84
  jmp    L41
L84:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  lea    D5(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L96
  jmp    L41
L96:
  mov    $0x3e8,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x10(%rbp),%rax
  lea    D14(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x3c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <compute_tree>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L41:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <readdir@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L93
  cmpq   $0x0,-0x20(%rbp)
  je     L69
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <closedir@plt>
  jmp    L69
L26:
  nop
L69:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L19
  call   <__stack_chk_fail@plt>
L19:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D37
type_infered: string
name: parse_data
arguments: label: D1
type_infered: string
name: parse_data
arguments: label: D5
type_infered: string
name: parse_data
arguments: label: D14
type_infered: string

tool: D37: |---

tool: D1: .

tool: D5: ..

tool: D14: /

assistant: ```c
void compute_tree(char *current_file, int lev) {
  int i;
  for (i = 0; i < lev; ++i) {
    printf("|---");
  }
  printf("%s\n", current_file);
  struct stat st;
  stat(current_file, &st);
  if (S_ISDIR(st.st_mode) == 0) {
    return;
  }
  DIR *pd = opendir(current_file);
  struct dirent *pde;
  while ((pde = readdir(pd)) != NULL) {
    if (strcmp(pde->d_name, ".") == 0) {
      continue;
    }
    if (strcmp(pde->d_name, "..") == 0) {
      continue;
    }
    char *new_dir = (char *)malloc(1000);
    strcpy(new_dir, current_file);
    strcat(new_dir, "/");
    strcat(new_dir, pde->d_name);
    compute_tree(new_dir, lev + 1);
    free(new_dir);
  }
  if (pd != NULL) {
    closedir(pd);
  }
}
```