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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xbe8,%rsp
  mov    %edi,%r13d
  mov    %rsi,%r14
  mov    %fs:0x28,%rax
  mov    %rax,0xbd8(%rsp)
  xor    %eax,%eax
  movl   $0x0,0xc(%rsp)
  movq   $0x0,0x7f0(%rsp)
  movq   $0x0,0x7f8(%rsp)
  lea    0x800(%rsp),%rdi
  mov    $0x7b,%ecx
  rep stos %rax,%es:(%rdi)
  lea    0x10(%rsp),%rbp
  lea    D28(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    0x400(%rsp),%rbx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D8(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D39(%rip),%r12
  lea    D30(%rip),%rbp
  lea    D48(%rip),%r15
  jmp    L87
  cmp    $0x2,%r13d
  je     L11
  mov    %r15,%rdi
  call   <puts@plt>
  lea    0x7f0(%rsp),%rbx
  mov    %rbx,%rsi
  lea    D32(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    %rbx,%rdi
  call   <cria_agenda_arquivo@plt>
  jmp    L87
L11:
  mov    0x8(%r14),%rdi
  call   <cria_agenda_arquivo@plt>
  jmp    L87
  lea    0x10(%rsp),%rdi
  call   <lista@plt>
L87:
  lea    0xc(%rsp),%rbx
  cmpl   $0x9,0xc(%rsp)
  je     L17
  mov    $0x0,%esi
  mov    $0xa,%edi
  call   <saida@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  cmpl   $0x9,0xc(%rsp)
  ja     L26
  mov    0xc(%rsp),%eax
  movslq 0x0(%rbp,%rax,4),%rax
  add    %rbp,%rax
  notrack jmp *%rax
  lea    0x10(%rsp),%rbx
  mov    %rbx,%rdi
  call   <edita@plt>
  lea    0x400(%rsp),%rsi
  mov    %rbx,%rdi
  call   <copia@plt>
  jmp    L87
  lea    0x10(%rsp),%rbx
  mov    %rbx,%rdi
  call   <apaga@plt>
  lea    0x400(%rsp),%rsi
  mov    %rbx,%rdi
  call   <copia@plt>
  jmp    L87
  lea    0x10(%rsp),%rdi
  call   <pesquisa@plt>
  jmp    L87
  lea    0x10(%rsp),%rdi
  call   <limpa_arquivo@plt>
  jmp    L87
L26:
  mov    $0x0,%esi
  mov    $0x9,%edi
  call   <saida@plt>
  jmp    L87
L17:
  mov    0xbd8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L110
  mov    $0x0,%eax
  add    $0xbe8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L110:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D28
type_infered: string
name: read_data
arguments: label: D8
type_infered: string
name: read_data
arguments: label: D39
type_infered: string
name: read_data
arguments: label: D48
type_infered: string
name: read_data
arguments: label: D32
type_infered: string

tool: D28: Agenda.txt

tool: D8: .editado

tool: D39: %d

tool: D48: Informe o nome do arquivo:

tool: D32: %s

assistant: ```c
int main(int argc, const char *argv[]) {
  int op = 0, op2 = 0;
  char arquivo[1000], origem[1000], file[1000] = "", nome_agenda[1000];
  strcat(arquivo, "Agenda.txt");
  strcat(origem, arquivo);
  strcat(origem, ".editado");
  while (op != 9) {
    saida(10, 0);
    scanf("%d", &op);
    switch (op) {
    case 1:
      if (argc == 2)
        cria_agenda_arquivo(argv[1]);
      else {
        puts("Informe o nome do arquivo:");
        scanf("%s", file);
        cria_agenda_arquivo(file);
      }
      break;
    case 2:
      lista(arquivo);
      break;
    case 3:
      edita(arquivo);
      copia(arquivo, origem);
      break;
    case 4:
      apaga(arquivo);
      copia(arquivo, origem);
      break;
    case 5:
      pesquisa(arquivo);
      break;
    case 6:
      limpa_arquivo(arquivo);
      break;
    case 9:
      break;
    default:
      saida(9, 0);
      break;
    }
  }
  return 0;
}
```