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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
  movb   $0x0,-0x15(%rbp)
  movl   $0x1,-0x14(%rbp)
  jmp    L80
L8:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L145
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D15(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L76
  mov    -0x24(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jge    L55
  addl   $0x1,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L62
L55:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <usage_error@plt>
  jmp    L62
L76:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D24(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L100
  mov    -0x24(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jge    L149
  addl   $0x1,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <validate_type@plt>
  test   %rax,%rax
  je     L115
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  mov    %al,-0x15(%rbp)
  jmp    L62
L115:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <usage_error@plt>
  jmp    L62
L149:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <usage_error@plt>
  jmp    L62
L100:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <usage_error@plt>
  jmp    L62
L145:
  cmpq   $0x0,-0x10(%rbp)
  je     L21
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <print_usage@plt>
  jmp    L62
L21:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
L62:
  addl   $0x1,-0x14(%rbp)
L80:
  mov    -0x14(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L8
  cmpq   $0x0,-0x10(%rbp)
  jne    L138
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <print_usage@plt>
L138:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L123
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L123:
  movsbl -0x15(%rbp),%edx
  mov    -0x8(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <searchdir@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D15
type_infered: string
name: disassemble_data
arguments: label: D46
type_infered: string
name: disassemble_data
arguments: label: D24
type_infered: string
name: disassemble_data
arguments: label: D18
type_infered: string
name: disassemble_data
arguments: label: D23
type_infered: string

tool: D15: -name

tool: D46: missing argument to `%s'

tool: D24: -type

tool: D18: invalid argument `%s' to `-type'

tool: D23: invalid predicate `%s'

assistant: ```c
int main(int argc, char *argv[]) {
  char *dirname = NULL;
  char *findme = NULL;
  char type = '\0';
  for (int i = 1; i < argc; i++) {
    if (argv[i][0] == '-') {
      if (strcmp(argv[i], "-name") == 0) {
        if (i + 1 <= argc - 1) {
          i++;
          findme = argv[i];
        } else
          usage_error("missing argument to `%s'", argv[i]);
      } else if (strcmp(argv[i], "-type") == 0) {
        if (i + 1 <= argc - 1) {
          i++;
          if (validate_type(argv[i]))
            type = argv[i][0];
          else
            usage_error("invalid argument `%s' to `-type'", argv[i]);
        } else
          usage_error("missing argument to `%s'", argv[i]);
      } else
        usage_error("invalid predicate `%s'", argv[i]);
    } else {
      if (dirname)
        print_usage(argv[0]);
      else
        dirname = argv[i];
    }
  }
  if (!dirname)
    print_usage(argv[0]);
  if (dirname[strlen(dirname) - 1] == '/')
    dirname[strlen(dirname) - 1] = '\0';
  searchdir(dirname, findme, type);
}
```