user: Demonstrate the C code that generates the assembly output below:

```asm
<SendDirectory>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xa8,%rsp
  mov    %edi,0xc(%rsp)
  mov    %rsi,%rdi
  mov    %rdx,%rbp
  lea    0x890(%rsp),%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x3098(%rsp)
  xor    %eax,%eax
  call   <opendir@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L3
L35:
  lea    0x490(%rsp),%r13
  mov    $0x400,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  lea    D27(%rip),%r12
  call   <memset@plt>
  mov    $0x1,%edx
  mov    %r13,%rcx
  mov    %rbp,%rdi
  mov    $0xffffffff,%esi
  call   <substr@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  mov    $0x400,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  test   %rax,%rax
  jne    L51
  call   <memset@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strcpy@plt>
L81:
  lea    0x90(%rsp),%r12
  mov    %rbp,%r8
  mov    %rbp,%rdx
  xor    %eax,%eax
  lea    D42(%rip),%rcx
  lea    D45(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rsi
  mov    %r14,%rdi
  lea    D93(%rip),%rbp
  call   <strcat@plt>
  jmp    L69
  nopw   0x0(%rax,%rax,1)
L67:
  mov    (%r15),%rdi
  mov    %rbp,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L33
L69:
  mov    %rbx,%rdi
  call   <readdir@plt>
  mov    %rax,%r15
  test   %rax,%rax
  jne    L67
  mov    %r12,%rdi
  mov    $0x400,%edx
  xor    %esi,%esi
  call   <memset@plt>
  lea    D42(%rip),%rdx
  mov    %r12,%rdi
  xor    %eax,%eax
  lea    D28(%rip),%rsi
  call   <sprintf@plt>
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <strcat@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  sub    $0x8,%rsp
  lea    D107(%rip),%r8
  lea    D25(%rip),%rcx
  push   $0x0
  mov    0x1c(%rsp),%ebx
  mov    %rax,%r12
  mov    %rax,%r9
  lea    D83(%rip),%rdx
  mov    $0xc8,%esi
  mov    %ebx,%edi
  call   <SendHeaders@plt>
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    %ebx,%edi
  call   <write@plt>
  pop    %rax
  pop    %rdx
  mov    0x3098(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L29
  add    $0x30a8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L33:
  xor    %esi,%esi
  mov    %r12,%rdi
  mov    $0x400,%edx
  call   <memset@plt>
  mov    (%r15),%rcx
  mov    %r12,%rdi
  mov    %r13,%rdx
  lea    D0(%rip),%rsi
  xor    %eax,%eax
  mov    %rcx,%r8
  call   <sprintf@plt>
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <strcat@plt>
  jmp    L69
  nopl   0x0(%rax)
L51:
  call   <memset@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strcpy@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  jmp    L81
L3:
  xor    %esi,%esi
  mov    %r14,%rdi
  lea    0x10(%rsp),%r12
  mov    $0x80,%edx
  call   <memset@plt>
  mov    %rbp,%rdx
  mov    %r12,%rdi
  xor    %eax,%eax
  lea    D90(%rip),%rsi
  call   <sprintf@plt>
  mov    0xc(%rsp),%edi
  mov    %r12,%r8
  lea    D25(%rip),%rcx
  lea    D44(%rip),%rdx
  mov    $0x1f4,%esi
  call   <SendError@plt>
  jmp    L35
L29:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D27
type_guessed: string
name: parse_data
arguments: data_label: D42
type_guessed: string
name: parse_data
arguments: data_label: D45
type_guessed: string
name: parse_data
arguments: data_label: D93
type_guessed: string
name: parse_data
arguments: data_label: D28
type_guessed: string
name: parse_data
arguments: data_label: D107
type_guessed: string
name: parse_data
arguments: data_label: D25
type_guessed: string
name: parse_data
arguments: data_label: D83
type_guessed: string
name: parse_data
arguments: data_label: D0
type_guessed: string
name: parse_data
arguments: data_label: D90
type_guessed: string
name: parse_data
arguments: data_label: D44
type_guessed: string

tool: D27: /

tool: D42: tmhttpd/1.0.0_alpha

tool: D45: <html>
<head>
<title>Browse directory %s - %s</title>
</head>
<body><h3>Directory %s</h3>
<hr />
<ul>


tool: D93: .

tool: D28: 
</ul>
<br /><hr />
<address>%s</address>
</body>
</html>


tool: D107: text/html

tool: 

tool: D83: OK

tool: D0: 	<li><a href="%s%s">%s</a></li>


tool: D90: Something unexpected went wrong browse directory %s.

tool: D44: Internal Server Error

assistant: ```c
int SendDirectory(int client_sock, char *path, char *pathinfo) {
  size_t file_size;
  char msg[128], buf[10240], tmp[1024], tmp_path[1024];
  DIR *dp;
  struct dirent *node;
  if ((dp = opendir(path)) == NULL) {
    memset(buf, 0, sizeof(msg));
    sprintf(msg, "Something unexpected went wrong browse directory %s.", pathinfo);
    SendError(client_sock, 500, "Internal Server Error", "", msg);
  }
  memset(tmp_path, 0, sizeof(tmp_path));
  substr(pathinfo, -1, 1, tmp_path);
  if (strcmp(tmp_path, "/") == 0) {
    memset(tmp_path, 0, sizeof(tmp_path));
    strcpy(tmp_path, pathinfo);
  } else {
    memset(tmp_path, 0, sizeof(tmp_path));
    strcpy(tmp_path, pathinfo);
    strcat(tmp_path, "/");
  }
  sprintf(tmp, "<html>\n<head>\n<title>Browse directory %s - %s</title>\n</head>\n<body><h3>Directory %s</h3>\n<hr />\n<ul>\n", pathinfo, "tmhttpd/1.0.0_alpha", pathinfo);
  strcat(buf, tmp);
  while ((node = readdir(dp)) != NULL) {
    if (strcmp(node->d_name, ".") != 0) {
      memset(tmp, 0, sizeof(tmp));
      sprintf(tmp, "\t<li><a href=\"%s%s\">%s</a></li>\n", tmp_path, node->d_name, node->d_name);
      strcat(buf, tmp);
    }
  }
  memset(tmp, 0, sizeof(tmp));
  sprintf(tmp, "\n</ul>\n<br /><hr />\n<address>%s</address>\n</body>\n</html>\n", "tmhttpd/1.0.0_alpha");
  strcat(buf, tmp);
  file_size = strlen(buf);
  SendHeaders(client_sock, 200, "OK", "", "text/html", file_size, 0);
  write(client_sock, buf, file_size);
  return 0;
}
```