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

```asm
<search_match_file>:
  endbr64
  push   %r15
  mov    %rdi,%r9
  mov    %rcx,%rdi
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  mov    %r8,%rbx
  sub    $0x18,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %r9,%rsi
  call   <build_total_path@plt>
  mov    %rax,%rdi
  mov    %rax,%r13
  call   <opendir@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L48
  jmp    L107
  nopl   0x0(%rax,%rax,1)
L73:
  mov    (%rbx),%eax
  cmp    %eax,(%r12)
  jle    L98
  mov    (%r14),%rdi
  call   <sub_directory_or_file@plt>
  test   %rax,%rax
  jne    L105
L48:
  mov    %rbp,%rdi
  call   <readdir@plt>
  mov    %rax,%r14
  test   %rax,%rax
  jne    L73
  mov    %rbp,%rdi
  call   <closedir@plt>
L1:
  add    $0x18,%rsp
  mov    %r13,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10f0 <free@plt>
  nopl   0x0(%rax,%rax,1)
L98:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L105:
  mov    (%r14),%rsi
  mov    %r13,%rdi
  call   <build_total_path@plt>
  mov    %rax,%rdi
  mov    %rax,%r15
  call   <directory_match@plt>
  test   %rax,%rax
  jne    L12
  mov    (%r14),%rdi
  call   <sub_directory_or_file@plt>
  test   %rax,%rax
  jne    L114
L88:
  mov    %r15,%rdi
  call   <free@plt>
  jmp    L48
  nopw   0x0(%rax,%rax,1)
L12:
  mov    0x8(%rsp),%rsi
  mov    (%r14),%rdi
  mov    %rbx,%r8
  mov    %r13,%rcx
  mov    %r12,%rdx
  call   <search_match_file>
  jmp    L88
L107:
  lea    D13(%rip),%rdi
  call   <perror@plt>
  jmp    L1
L114:
  mov    (%r14),%rsi
  mov    0x8(%rsp),%rdi
  call   <compare_match_string@plt>
  test   %rax,%rax
  je     L88
  mov    (%rbx),%eax
  lea    D15(%rip),%rdi
  lea    0x1(%rax),%esi
  mov    %esi,(%rbx)
  call   <printf@plt>
  mov    %r15,%rdi
  call   <print_file@plt>
  jmp    L88
```

tool_calls: name: unpack_data
arguments: label: D13
type_guessed: string
name: unpack_data
arguments: label: D15
type_guessed: string

tool: 

tool: D15: %d

assistant: ```c
void search_match_file(char *path, char *match_string, int *max_results, char *father_directory, int *current_result) {
  DIR *path_directory;
  struct dirent *directory_file;
  char *total_path = build_total_path(father_directory, path);
  path_directory = opendir(total_path);
  if (path_directory != NULL) {
    while ((directory_file = readdir(path_directory)) != NULL) {
      if (*max_results <= *current_result) {
        return;
      }
      if (sub_directory_or_file(directory_file->d_name)) {
        char *total_file_name;
        total_file_name = build_total_path(total_path, directory_file->d_name);
        if (directory_match(total_file_name)) {
          search_match_file(directory_file->d_name, match_string, max_results, total_path, current_result);
        } else if (sub_directory_or_file(directory_file->d_name)) {
          if (compare_match_string(match_string, directory_file->d_name)) {
            (*current_result)++;
            printf("%d", *current_result);
            print_file(total_file_name);
          }
        }
        free(total_file_name);
      }
    }
    closedir(path_directory);
  } else {
    perror("");
  }
  free(total_path);
}
```