user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<find_test>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x58(%rbp)
  lea    D24(%rip),%rax
  mov    %rax,-0x20(%rbp)
  lea    D11(%rip),%rax
  mov    %rax,-0x18(%rbp)
  lea    D44(%rip),%rax
  mov    %rax,-0x10(%rbp)
  lea    D23(%rip),%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x78(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x70(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  movl   $0x0,-0x60(%rbp)
  jmp    L42
L92:
  mov    -0x60(%rbp),%eax
  mov    -0x20(%rbp,%rax,8),%rax
  mov    %rax,-0x50(%rbp)
  movl   $0x0,-0x5c(%rbp)
  jmp    L12
L22:
  mov    -0x5c(%rbp),%eax
  mov    -0x40(%rbp,%rax,8),%rax
  mov    %rax,-0x48(%rbp)
  cmpq   $0x0,-0x48(%rbp)
  je     L89
  mov    -0x50(%rbp),%rcx
  mov    -0x68(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    $0x0,%r8d
  lea    D49(%rip),%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  mov    %rax,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <is_valid_test@plt>
  test   %rax,%rax
  je     L16
  mov    -0x58(%rbp),%rax
  jmp    L69
L16:
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movq   $0x0,-0x58(%rbp)
  jmp    L30
L89:
  nop
L30:
  addl   $0x1,-0x5c(%rbp)
L12:
  cmpl   $0x2,-0x5c(%rbp)
  jbe    L22
  addl   $0x1,-0x60(%rbp)
L42:
  cmpl   $0x2,-0x60(%rbp)
  jbe    L92
  cmpq   $0x0,-0x58(%rbp)
  jne    L60
  mov    -0x68(%rbp),%rax
  mov    $0x4b3,%edx
  lea    D14(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <x_strdup@plt>
  mov    %rax,-0x58(%rbp)
L60:
  mov    -0x58(%rbp),%rax
L69:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L51
  call   <__stack_chk_fail@plt>
L51:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D24
datatype: string
name: read_data
arguments: data_label: D11
datatype: string
name: read_data
arguments: data_label: D44
datatype: string
name: read_data
arguments: data_label: D23
datatype: string
name: read_data
arguments: data_label: D49
datatype: string
name: read_data
arguments: data_label: D14
datatype: string

tool: D24: -t

tool: D11: .t

tool: 

tool: D23: .

tool: D49: /

tool: D14: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Mkaysi/charybdis/refs/heads/master/tests/runtests.c

assistant: ```c
char *find_test(const char *name, const char *source, const char *build) {
  char *path = NULL;
  const char *bases[3], *suffix, *base;
  unsigned int i, j;
  const char *suffixes[3] = {"-t", ".t", ""};
  bases[0] = ".";
  bases[1] = build;
  bases[2] = source;
  for (i = 0; i < (sizeof(suffixes) / sizeof((suffixes)[0])); i++) {
    suffix = suffixes[i];
    for (j = 0; j < (sizeof(bases) / sizeof((bases)[0])); j++) {
      base = bases[j];
      if (base == NULL)
        continue;
      path = concat(base, "/", name, suffix, (const char *)0);
      if (is_valid_test(path))
        return path;
      free(path);
      path = NULL;
    }
  }
  if (path == NULL)
    path = x_strdup((name), "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Mkaysi/charybdis/refs/heads/master/tests/runtests.c", 1203);
  return path;
}
```