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

```asm
<get_directory>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x5000(%rsp),%r11
L65:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L65
  sub    $0x18,%rsp
  mov    $0x1fe,%ecx
  pxor   %xmm0,%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x5008(%rsp)
  xor    %eax,%eax
  mov    %rdi,%r12
  lea    0x10(%rsp),%rdi
  mov    %rdx,%rbp
  mov    %rsi,%r14
  xor    %edx,%edx
  mov    %rbp,%rsi
  movaps %xmm0,(%rsp)
  movaps %xmm0,0x1000(%rsp)
  movaps %xmm0,0x2000(%rsp)
  movaps %xmm0,0x3000(%rsp)
  movaps %xmm0,0x4000(%rsp)
  rep stos %rax,%es:(%rdi)
  lea    0x1010(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  lea    0x2010(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  lea    0x3010(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  lea    0x4010(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  mov    %r12,%rdi
  call   <get_next_line@plt>
  cmp    $0xffffffff,%eax
  je     L25
  mov    %eax,%r13d
  lea    0x2000(%rsp),%rbx
  xor    %eax,%eax
  mov    %r14,%rcx
  lea    0x1000(%rsp),%r15
  mov    %rbx,%r8
  lea    D35(%rip),%rsi
  mov    %rbp,%rdi
  mov    %r15,%rdx
  call   <sscanf@plt>
  cmp    $0x3,%eax
  je     L72
L25:
  mov    $0xffffffff,%eax
L82:
  mov    0x5008(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L23
  add    $0x5018,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L72:
  lea    D58(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L25
  lea    D61(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L25
  mov    %rsp,%rbp
  mov    %r13d,%edx
  mov    %r12,%rdi
  mov    %rbp,%rsi
  call   <get_next_line@plt>
  mov    %eax,%r13d
  cmp    $0xffffffff,%eax
  je     L25
  lea    0x3000(%rsp),%r14
  lea    D47(%rip),%r15
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    %r15,%rsi
  mov    %r14,%rdx
  call   <sscanf@plt>
  lea    D48(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L71
  lea    D50(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L25
L71:
  xor    %esi,%esi
  mov    $0x1000,%edx
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    %r12,%rdi
  mov    %r13d,%edx
  mov    %rbp,%rsi
  call   <get_next_line@plt>
  mov    %r15,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    0x4000(%rsp),%r12
  mov    %r12,%rdx
  call   <sscanf@plt>
  lea    D39(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L25
  mov    $0x1,%eax
  jmp    L82
L23:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D35
type_guessed: string
name: retrieve_data
arguments: tag: D58
type_guessed: string
name: retrieve_data
arguments: tag: D61
type_guessed: string
name: retrieve_data
arguments: tag: D47
type_guessed: string
name: retrieve_data
arguments: tag: D48
type_guessed: string
name: retrieve_data
arguments: tag: D50
type_guessed: string
name: retrieve_data
arguments: tag: D39
type_guessed: string

tool: D35: %s %s %s

tool: D58: GET

tool: D61: HTTP/1.1

tool: D47: %s

tool: D48: From:

tool: D50: Host:

tool: D39: 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;
}
```