user: What would the C source look like for the assembly code provided here?

```asm
<get_directory>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x5000(%rsp),%r11
L70:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L70
  sub    $0x18,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r13
  mov    %rdx,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x5008(%rsp)
  xor    %eax,%eax
  movq   $0x0,(%rsp)
  movq   $0x0,0x8(%rsp)
  lea    0x10(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  movq   $0x0,0x1000(%rsp)
  movq   $0x0,0x1008(%rsp)
  lea    0x1010(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  movq   $0x0,0x2000(%rsp)
  movq   $0x0,0x2008(%rsp)
  lea    0x2010(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  movq   $0x0,0x3000(%rsp)
  movq   $0x0,0x3008(%rsp)
  lea    0x3010(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  movq   $0x0,0x4000(%rsp)
  movq   $0x0,0x4008(%rsp)
  lea    0x4010(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  mov    $0x0,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <get_next_line@plt>
  mov    %eax,%ebx
  cmp    $0xffffffff,%eax
  je     L13
  lea    0x1000(%rsp),%rdx
  lea    0x2000(%rsp),%r8
  mov    %r13,%rcx
  lea    D35(%rip),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  cmp    $0x3,%eax
  je     L40
  mov    $0xffffffff,%ebx
L13:
  mov    0x5008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L22
  mov    %ebx,%eax
  add    $0x5018,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L40:
  lea    0x1000(%rsp),%rdi
  lea    D2(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L64
  mov    $0xffffffff,%ebx
  jmp    L13
L64:
  lea    0x2000(%rsp),%rdi
  lea    D12(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L69
  mov    $0xffffffff,%ebx
  jmp    L13
L69:
  mov    %rsp,%rsi
  mov    %ebx,%edx
  mov    %r12,%rdi
  call   <get_next_line@plt>
  mov    %eax,%ebx
  cmp    $0xffffffff,%eax
  je     L13
  lea    0x3000(%rsp),%rbp
  mov    %rsp,%rdi
  mov    %rbp,%rdx
  lea    D8(%rip),%rsi
  mov    $0x0,%eax
  call   <sscanf@plt>
  lea    D42(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L49
  mov    %rbp,%rdi
  lea    D25(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L89
L49:
  mov    %rsp,%rbp
  mov    $0x1000,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    %ebx,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <get_next_line@plt>
  lea    0x4000(%rsp),%rbx
  mov    %rbx,%rdx
  lea    D8(%rip),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  lea    D67(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  cmp    $0x1,%rax
  sbb    %ebx,%ebx
  and    $0x2,%ebx
  sub    $0x1,%ebx
  jmp    L13
L89:
  mov    $0xffffffff,%ebx
  jmp    L13
L22:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D35
datatype: string
name: retrieve_data
arguments: data_tag: D2
datatype: string
name: retrieve_data
arguments: data_tag: D12
datatype: string
name: retrieve_data
arguments: data_tag: D8
datatype: string
name: retrieve_data
arguments: data_tag: D42
datatype: string
name: retrieve_data
arguments: data_tag: D25
datatype: string
name: retrieve_data
arguments: data_tag: D67
datatype: string

tool: D35: %s %s %s

tool: D2: GET

tool: D12: HTTP/1.1

tool: D8: %s

tool: D42: From:

tool: D25: Host:

tool: D67: User-Agent:

assistant: ```c
int get_directory(char *buffer, char *directory, char *getline) {
  char line[4096] = {0};
  char get[4096] = {0};
  char http[4096] = {0};
  char from[4096] = {0};
  char useragent[4096] = {0};
  int position = 0;
  position = get_next_line(buffer, getline, position);
  if (position == -1)
    return -1;
  if ((sscanf(getline, "%s %s %s", get, directory, http) != 3) || (strcmp(get, "GET") != 0) || (strcmp(http, "HTTP/1.1") != 0))
    return -1;
  position = get_next_line(buffer, line, position);
  if (position == -1)
    return -1;
  sscanf(line, "%s", from);
  if (strcmp(from, "From:") != 0 && strcmp(from, "Host:") != 0)
    return -1;
  memset(line, 0, sizeof(line));
  get_next_line(buffer, line, position);
  sscanf(line, "%s", useragent);
  if (strcmp(useragent, "User-Agent:") != 0)
    return -1;
  return 1;
}
```