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

```asm
<list_dir>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x278,%rsp
  lea    D8(%rip),%r15
  mov    %esi,0xc(%rsp)
  mov    %esi,%r14d
  lea    0x60(%rsp),%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x1268(%rsp)
  xor    %eax,%eax
  mov    %rsi,(%rsp)
  call   <dfs_dir_findfirst@plt>
  mov    %eax,%ebx
  lea    0x12(%r14),%eax
  mov    %eax,0x34(%rsp)
L123:
  mov    0xc(%rsp),%edi
  and    $0x3,%ebx
  call   <pr_depth@plt>
  mov    (%rsp),%rsi
  mov    %r15,%rdi
  call   <printf@plt>
  cmp    $0x1,%ebx
  je     L260
L126:
  mov    (%rsp),%rdi
  call   <dfs_dir_findnext@plt>
  mov    %eax,%ebx
  cmp    $0x2,%eax
  jne    L123
  mov    0x1268(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L66
  add    $0x1278,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L260:
  mov    0xc(%rsp),%eax
  mov    (%rsp),%rdi
  add    $0x2,%eax
  mov    %eax,0x20(%rsp)
  lea    0x260(%rsp),%rax
  mov    %rax,%rsi
  mov    %rax,0x10(%rsp)
  call   <dfs_dir_findfirst@plt>
  mov    %eax,%ebx
L96:
  mov    0x20(%rsp),%edi
  and    $0x3,%ebx
  call   <pr_depth@plt>
  mov    0x10(%rsp),%rsi
  mov    %r15,%rdi
  call   <printf@plt>
  cmp    $0x1,%ebx
  je     L148
L9:
  mov    0x10(%rsp),%rdi
  call   <dfs_dir_findnext@plt>
  mov    %eax,%ebx
  cmp    $0x2,%eax
  jne    L96
  jmp    L126
  nopw   0x0(%rax,%rax,1)
L148:
  mov    0xc(%rsp),%eax
  mov    0x10(%rsp),%rdi
  add    $0x4,%eax
  mov    %eax,0x24(%rsp)
  lea    0x460(%rsp),%rax
  mov    %rax,%rsi
  mov    %rax,0x18(%rsp)
  call   <dfs_dir_findfirst@plt>
  mov    %eax,%ebx
L19:
  mov    0x24(%rsp),%edi
  and    $0x3,%ebx
  call   <pr_depth@plt>
  mov    0x18(%rsp),%rsi
  mov    %r15,%rdi
  call   <printf@plt>
  cmp    $0x1,%ebx
  je     L163
L92:
  mov    0x18(%rsp),%rdi
  call   <dfs_dir_findnext@plt>
  mov    %eax,%ebx
  cmp    $0x2,%eax
  jne    L19
  jmp    L9
  nopl   0x0(%rax,%rax,1)
L163:
  mov    0xc(%rsp),%eax
  mov    0x18(%rsp),%rdi
  lea    0x660(%rsp),%r14
  mov    %r14,%rsi
  add    $0x6,%eax
  mov    %eax,0x28(%rsp)
  call   <dfs_dir_findfirst@plt>
  mov    %eax,%ebx
L55:
  mov    0x28(%rsp),%edi
  and    $0x3,%ebx
  call   <pr_depth@plt>
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <printf@plt>
  cmp    $0x1,%ebx
  je     L252
L239:
  mov    %r14,%rdi
  call   <dfs_dir_findnext@plt>
  mov    %eax,%ebx
  cmp    $0x2,%eax
  jne    L55
  jmp    L92
  nop
L252:
  mov    0xc(%rsp),%eax
  lea    0x860(%rsp),%r13
  mov    %r14,%rdi
  mov    %r13,%rsi
  add    $0x8,%eax
  mov    %eax,0x2c(%rsp)
  call   <dfs_dir_findfirst@plt>
  mov    %r14,0x38(%rsp)
  mov    %r13,%r14
  mov    %eax,%ebx
L136:
  mov    0x2c(%rsp),%edi
  and    $0x3,%ebx
  call   <pr_depth@plt>
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <printf@plt>
  cmp    $0x1,%ebx
  je     L67
L93:
  mov    %r14,%rdi
  call   <dfs_dir_findnext@plt>
  mov    %eax,%ebx
  cmp    $0x2,%eax
  jne    L136
  mov    0x38(%rsp),%r14
  jmp    L239
  nopw   0x0(%rax,%rax,1)
L67:
  mov    0xc(%rsp),%eax
  lea    0xa60(%rsp),%r13
  mov    %r14,%rdi
  mov    %r13,%rsi
  add    $0xa,%eax
  mov    %eax,0x30(%rsp)
  call   <dfs_dir_findfirst@plt>
  mov    %r14,0x40(%rsp)
  mov    %eax,%ebx
L266:
  mov    0x30(%rsp),%edi
  and    $0x3,%ebx
  call   <pr_depth@plt>
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <printf@plt>
  cmp    $0x1,%ebx
  je     L89
L122:
  mov    %r13,%rdi
  call   <dfs_dir_findnext@plt>
  mov    %eax,%ebx
  cmp    $0x2,%eax
  jne    L266
  mov    0x40(%rsp),%r14
  jmp    L93
  nopw   0x0(%rax,%rax,1)
L89:
  lea    0xc60(%rsp),%rbx
  mov    0xc(%rsp),%r12d
  mov    %r13,%rdi
  mov    %rbx,%rsi
  call   <dfs_dir_findfirst@plt>
  mov    %r13,0x48(%rsp)
  lea    0xc(%r12),%r14d
  mov    %eax,%ebp
  lea    0xe(%r12),%eax
  mov    %eax,0x50(%rsp)
L102:
  mov    %r14d,%edi
  and    $0x3,%ebp
  call   <pr_depth@plt>
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <printf@plt>
  cmp    $0x1,%ebp
  je     L248
L217:
  mov    %rbx,%rdi
  call   <dfs_dir_findnext@plt>
  mov    %eax,%ebp
  cmp    $0x2,%eax
  jne    L102
  mov    0x48(%rsp),%r13
  jmp    L122
  xchg   %ax,%ax
L248:
  lea    0xe60(%rsp),%rbp
  mov    %rbx,%rdi
  lea    0x1060(%rsp),%r12
  mov    %rbp,%rsi
  call   <dfs_dir_findfirst@plt>
  mov    %r14d,0x54(%rsp)
  mov    0x50(%rsp),%r14d
  mov    %eax,%edx
  mov    0xc(%rsp),%eax
  mov    %rbx,0x58(%rsp)
  mov    %edx,%ebx
  lea    0x10(%rax),%r13d
L132:
  mov    %r14d,%edi
  call   <pr_depth@plt>
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <printf@plt>
  mov    %ebx,%edx
  and    $0x3,%edx
  cmp    $0x1,%edx
  je     L184
L146:
  mov    %rbp,%rdi
  call   <dfs_dir_findnext@plt>
  mov    %eax,%ebx
  cmp    $0x2,%eax
  jne    L132
  mov    0x54(%rsp),%r14d
  mov    0x58(%rsp),%rbx
  jmp    L217
  nopl   0x0(%rax)
L184:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <dfs_dir_findfirst@plt>
  mov    %eax,%ebx
L152:
  mov    %r13d,%edi
  and    $0x3,%ebx
  call   <pr_depth@plt>
  mov    %r12,%rsi
  mov    %r15,%rdi
  call   <printf@plt>
  cmp    $0x1,%ebx
  je     L156
L171:
  mov    %r12,%rdi
  call   <dfs_dir_findnext@plt>
  mov    %eax,%ebx
  cmp    $0x2,%eax
  jne    L152
  jmp    L146
  nopl   0x0(%rax)
L156:
  mov    0x34(%rsp),%esi
  mov    %r12,%rdi
  call   <list_dir>
  jmp    L171
L66:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D8
datatype: string

tool: D8: %s


assistant: ```c
void list_dir(char *directory, int depth) {
  char path[512];
  int dir = dfs_dir_findfirst(directory, path);
  do {
    pr_depth(depth);
    printf("%s\n", path);
    if (((dir)&3) == 0x1) {
      list_dir(path, depth + 2);
    }
  } while ((dir = dfs_dir_findnext(path)) != 0x2);
}
```