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

```asm
<a_article_search>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8d8,%rsp
  mov    %rdi,%r12
  mov    %rsi,0x8(%rsp)
  mov    %rdx,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x8c8(%rsp)
  xor    %eax,%eax
  movabs $0x73656d614e2e2f,%rax
  mov    %rax,0x48(%rsp)
  lea    0x4c0(%rsp),%rbx
  mov    %rdi,%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  lea    0x48(%rsp),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D110(%rip),%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  test   %rax,%rax
  je     L45
  mov    %rax,%rbx
  lea    D18(%rip),%r13
  lea    D92(%rip),%r14
  lea    D94(%rip),%r15
  jmp    L27
L116:
  lea    0x240(%rsp),%rdi
  mov    $0x7,%edx
  lea    D112(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L79
  lea    0x247(%rsp),%rsi
  lea    0x170(%rsp),%rdi
  mov    $0x50,%edx
  call   <strncpy@plt>
L175:
  movb   $0x0,0x1bf(%rsp)
  jmp    L192
L79:
  lea    0x245(%rsp),%rsi
  lea    0x170(%rsp),%rdi
  mov    $0x50,%edx
  call   <strncpy@plt>
  jmp    L175
L139:
  mov    %rbp,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  movb   $0x0,0x130(%rsp,%rax,1)
  jmp    L129
L42:
  mov    0x44(%rsp),%edi
  call   <S_ISREG@plt>
  test   %rax,%rax
  je     L27
  lea    0xf0(%rsp),%rbp
  mov    $0x40,%esi
  mov    %rbp,%rdi
  call   <bzero@plt>
  lea    0x1c5(%rsp),%rsi
  mov    $0x26,%edx
  mov    %rbp,%rdi
  call   <strncpy@plt>
  lea    0x130(%rsp),%rax
  mov    %rbp,%rsi
  mov    %rax,0x18(%rsp)
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    0xb0(%rsp),%rbp
  mov    0x8(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    0x18(%rsp),%rdi
  call   <toupper@plt>
  mov    %rbp,%rdi
  call   <toupper@plt>
  mov    %rbp,%rsi
  mov    0x18(%rsp),%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L186
  lea    0x50(%rsp),%rbp
  mov    %rbx,%rdx
  mov    $0x14,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  mov    $0x5,%edx
  lea    D4(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L12
L9:
  lea    0x55(%rsp),%rcx
  lea    0x90(%rsp),%rax
  mov    0x10(%rsp),%rdx
  lea    D39(%rip),%rsi
  mov    %rax,0x30(%rsp)
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    0xf0(%rsp),%rax
  mov    %rax,0x18(%rsp)
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    $0x7,%eax
  cltq
  movb   $0x0,0xf0(%rsp,%rax,1)
  lea    0x2d3(%rsp),%rsi
  lea    0x3c0(%rsp),%rbp
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x2f,%esi
  mov    %rbp,%rdi
  call   <strrchr@plt>
  lea    0x70(%rsp),%rcx
  mov    %rax,0x28(%rsp)
  mov    %rax,%rsi
  mov    %rcx,0x38(%rsp)
  mov    %rcx,%rdi
  call   <strcpy@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,0x24(%rsp)
  mov    0x28(%rsp),%rdi
  call   <strlen@plt>
  mov    0x24(%rsp),%r9d
  sub    %eax,%r9d
  mov    %r9d,%eax
  cltq
  movb   $0x0,0x3c0(%rsp,%rax,1)
  mov    0x18(%rsp),%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  movb   $0x0,0xf0(%rsp,%rax,1)
  mov    0x18(%rsp),%r8
  mov    0x38(%rsp),%rcx
  mov    %rbp,%rdx
  mov    0x30(%rsp),%rsi
  lea    D68(%rip),%rdi
  call   <printf@plt>
  jmp    L27
L12:
  mov    %rbp,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  movb   $0x0,0x50(%rsp,%rax,1)
  jmp    L9
L186:
  movb   $0x0,0x1c0(%rsp)
  movb   $0x0,0x240(%rsp)
  jmp    L27
L32:
  movb   $0x0,0x1c0(%rsp)
L27:
  mov    %rbx,%rdi
  call   <feof@plt>
  test   %eax,%eax
  jne    L83
  lea    0x2c0(%rsp),%rbp
  mov    $0x50,%esi
  mov    %rbp,%rdi
  call   <bzero@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  lea    0x1c0(%rsp),%rbp
  mov    %rbx,%rdx
  mov    $0x80,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  mov    $0x5,%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L32
  lea    0x240(%rsp),%rdi
  mov    %rbx,%rdx
  mov    $0x80,%esi
  call   <fgets@plt>
  lea    0x1eb(%rsp),%rdi
  mov    %r14,%rsi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L27
  lea    0x1eb(%rsp),%rdi
  mov    %r15,%rsi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L27
  lea    0x1c5(%rsp),%rdi
  lea    D5(%rip),%rsi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L27
  lea    0x240(%rsp),%rdi
  mov    $0x5,%edx
  lea    D104(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L116
L192:
  lea    0x2c0(%rsp),%rbp
  lea    D24(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    0x170(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  movb   $0x0,0x2c0(%rsp,%rax,1)
  lea    0x44(%rsp),%rsi
  mov    %rbp,%rdi
  call   <lstat@plt>
  mov    0x44(%rsp),%edi
  call   <S_ISDIR@plt>
  test   %rax,%rax
  je     L42
  lea    0x130(%rsp),%rbp
  mov    %rbx,%rdx
  mov    $0x14,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  mov    $0x5,%edx
  lea    D4(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L139
L129:
  lea    0x135(%rsp),%rcx
  lea    0x3c0(%rsp),%rbp
  mov    0x10(%rsp),%rdx
  lea    D19(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  lea    0x2c0(%rsp),%rdi
  mov    %rbp,%rdx
  mov    0x8(%rsp),%rsi
  call   <a_article_search>
  jmp    L27
L83:
  mov    %rbx,%rdi
  call   <fclose@plt>
L45:
  mov    0x8c8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L36
  add    $0x8d8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L36:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D110
type_guessed: string
name: retrieve_data
arguments: data_label: D18
type_guessed: string
name: retrieve_data
arguments: data_label: D92
type_guessed: string
name: retrieve_data
arguments: data_label: D94
type_guessed: string
name: retrieve_data
arguments: data_label: D112
type_guessed: string
name: retrieve_data
arguments: data_label: D4
type_guessed: string
name: retrieve_data
arguments: data_label: D39
type_guessed: string
name: retrieve_data
arguments: data_label: D68
type_guessed: string
name: retrieve_data
arguments: data_label: D5
type_guessed: string
name: retrieve_data
arguments: data_label: D104
type_guessed: string
name: retrieve_data
arguments: data_label: D24
type_guessed: string
name: retrieve_data
arguments: data_label: D19
type_guessed: string

tool: D110: r

tool: D18: Name=

tool: D92: (BM: BMS)

tool: D94: (BM: SYSOPS)

tool: D112: Path=~/

tool: D4: Numb=

tool: D39: %s%s

tool: D68: %s,%s,%s,%s 


tool: D5: <HIDE>

tool: D104: Path=

tool: D24: /

tool: D19: %s%s-

assistant: ```c
void a_article_search(char *path, char *key, char *location) {
  FILE *fp;
  struct stat buf;
  char index_file[] = "/.Names";
  char titlebuf[128];
  char pathbuf[128];
  char index_path[1024];
  char filename[256];
  strcpy(index_path, path);
  strcat(index_path, index_file);
  if ((fp = fopen(index_path, "r")) == NULL) {
    return;
  }
  while (!feof(fp)) {
    bzero(filename, 80);
    strcpy(filename, path);
    fgets(titlebuf, 128, fp);
    if (strncmp(titlebuf, "Name=", 5) == 0) {
      fgets(pathbuf, 128, fp);
      if (strstr(titlebuf + 43, "(BM: BMS)") || strstr(titlebuf + 43, "(BM: SYSOPS)") || strstr(titlebuf + 5, "<HIDE>"))
        continue;
      char temppath[80];
      if (strncmp(pathbuf, "Path=", 5) == 0) {
        if (strncmp(pathbuf, "Path=~/", 7) == 0)
          strncpy(temppath, pathbuf + 7, 80);
        else
          strncpy(temppath, pathbuf + 5, 80);
        temppath[79] = '\0';
      }
      strcat(filename, "/");
      strcat(filename, temppath);
      filename[strlen(filename) - 1] = '\0';
      lstat(filename, &buf);
      if (S_ISDIR(buf.st_mode)) {
        char linebuf[20];
        fgets(linebuf, 20, fp);
        if (strncmp(linebuf, "Numb=", 5) == 0)
          linebuf[strlen(linebuf) - 1] = '\0';
        char nextlocate[20];
        sprintf(nextlocate, "%s%s-", location, linebuf + 5);
        a_article_search(filename, key, nextlocate);
      } else if (S_ISREG(buf.st_mode)) {
        char temptitle[64];
        bzero(temptitle, sizeof(temptitle));
        strncpy(temptitle, titlebuf + 5, 38);
        char tempupper[64];
        strcpy(tempupper, temptitle);
        char keyupper[50];
        strcpy(keyupper, key);
        toupper(tempupper);
        toupper(keyupper);
        if (strstr(tempupper, keyupper) != NULL) {
          char linebuf[20];
          fgets(linebuf, 20, fp);
          if (strncmp(linebuf, "Numb=", 5) == 0)
            linebuf[strlen(linebuf) - 1] = '\0';
          char nextlocate[32];
          sprintf(nextlocate, "%s%s", location, linebuf + 5);
          temptitle[strlen(temptitle) - 7] = '\0';
          char *filenamenum;
          char tempresult[256];
          strcpy(tempresult, filename + 19);
          filenamenum = strrchr(tempresult, '/');
          char temptitleresult[30];
          strcpy(temptitleresult, filenamenum);
          tempresult[strlen(tempresult) - strlen(filenamenum)] = '\0';
          temptitle[strlen(temptitle) - 1] = '\0';
          printf("%s,%s,%s,%s \n", nextlocate, tempresult, temptitleresult, temptitle);
        } else {
          titlebuf[0] = '\0';
          pathbuf[0] = '\0';
        }
      } else {
        continue;
      }
    } else
      titlebuf[0] = '\0';
  }
  fclose(fp);
  return;
}
```