user: Please show me the C implementation that matches the assembly code listed below:

```asm
<get_filenames>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    $0x20,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x1,-0xc(%rbp)
  jmp    L27
L21:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D28(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L50
  addl   $0x1,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,(%rax)
  jmp    L32
L50:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D34(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L64
  addl   $0x1,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  add    $0x8,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  jmp    L32
L64:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D16(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L25
  addl   $0x1,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  add    $0x10,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  jmp    L32
L25:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D5(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L32
  addl   $0x1,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  add    $0x18,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
L32:
  addl   $0x1,-0xc(%rbp)
L27:
  mov    -0xc(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L21
  mov    -0x8(%rbp),%rax
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D28
data_type: string
name: parse_data
arguments: label: D34
data_type: string
name: parse_data
arguments: label: D16
data_type: string
name: parse_data
arguments: label: D5
data_type: string

tool: D28: --or

tool: D34: --and

tool: D16: --impl

tool: D5: --not

assistant: ```c
char **get_filenames(int argc, char **argv) {
  char **filenames = malloc(4 * sizeof(char *));
  for (int i = 1; i < argc; i++) {
    if (strcmp(argv[i], "--or") == 0) {
      i++;
      filenames[0] = argv[i];
    } else {
      if (strcmp(argv[i], "--and") == 0) {
        i++;
        filenames[1] = argv[i];
      } else {
        if (strcmp(argv[i], "--impl") == 0) {
          i++;
          filenames[2] = argv[i];
        } else {
          if (strcmp(argv[i], "--not") == 0) {
            i++;
            filenames[3] = argv[i];
          }
        }
      }
    }
  }
  return filenames;
}
```