user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rsi,%r13
  cmp    $0x1,%edi
  jle    L37
  mov    %edi,%r15d
  mov    $0x1,%ebx
  movb   $0x0,0xf(%rsp)
  movq   $0x0,(%rsp)
  mov    $0x0,%r14d
  jmp    L167
L29:
  lea    D53(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L12
  lea    -0x1(%r15),%eax
  cmp    %ebx,%eax
  jle    L87
  add    $0x1,%ebx
  mov    0x8(%r13,%rbp,1),%rax
  mov    %rax,(%rsp)
  jmp    L187
L87:
  mov    (%r12),%rsi
  lea    D21(%rip),%rdi
  call   <usage_error@plt>
  jmp    L187
L12:
  lea    D17(%rip),%rsi
  mov    (%r12),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L152
  lea    -0x1(%r15),%eax
  cmp    %ebx,%eax
  jle    L106
  add    $0x1,%ebx
  lea    0x8(%r13,%rbp,1),%rbp
  mov    0x0(%rbp),%rdi
  call   <validate_type@plt>
  test   %rax,%rax
  je     L175
  mov    0x0(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,0xf(%rsp)
  jmp    L187
L175:
  mov    0x0(%rbp),%rsi
  lea    D37(%rip),%rdi
  call   <usage_error@plt>
  jmp    L187
L106:
  mov    (%r12),%rsi
  lea    D21(%rip),%rdi
  call   <usage_error@plt>
  jmp    L187
L152:
  mov    (%r12),%rsi
  lea    D42(%rip),%rdi
  call   <usage_error@plt>
  jmp    L187
L165:
  mov    %rdi,%r14
L187:
  add    $0x1,%ebx
  cmp    %ebx,%r15d
  jle    L64
L167:
  movslq %ebx,%rbp
  shl    $0x3,%rbp
  lea    0x0(%r13,%rbp,1),%r12
  mov    (%r12),%rdi
  cmpb   $0x2d,(%rdi)
  je     L29
  test   %r14,%r14
  je     L165
  mov    0x0(%r13),%rdi
  call   <print_usage@plt>
  jmp    L187
L64:
  test   %r14,%r14
  je     L204
L171:
  mov    %r14,%rdi
  call   <strlen@plt>
  cltq
  cmpb   $0x2f,-0x1(%r14,%rax,1)
  je     L135
L21:
  movsbl 0xf(%rsp),%edx
  mov    (%rsp),%rsi
  mov    %r14,%rdi
  call   <searchdir@plt>
  mov    $0x0,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L37:
  movb   $0x0,0xf(%rsp)
  movq   $0x0,(%rsp)
L204:
  mov    0x0(%r13),%rdi
  call   <print_usage@plt>
  mov    $0x0,%r14d
  jmp    L171
L135:
  mov    %r14,%rdi
  call   <strlen@plt>
  cltq
  movb   $0x0,-0x1(%r14,%rax,1)
  jmp    L21
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D53
type_infered: string
name: extract_symbolic_data
arguments: data_label: D21
type_infered: string
name: extract_symbolic_data
arguments: data_label: D17
type_infered: string
name: extract_symbolic_data
arguments: data_label: D37
type_infered: string
name: extract_symbolic_data
arguments: data_label: D42
type_infered: string

tool: D53: -name

tool: D21: missing argument to `%s'

tool: D17: -type

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

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