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

```asm
<find_executable>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x468,%rsp
  mov    %rdi,-0x468(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x458(%rbp)
  cmpq   $0x0,-0x468(%rbp)
  je     L31
  mov    -0x468(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L203
L31:
  mov    $0x0,%eax
  jmp    L43
L203:
  mov    -0x468(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L76
  mov    -0x468(%rbp),%rax
  mov    %rax,%rdi
  call   <xstrdup@plt>
  mov    %rax,-0x448(%rbp)
  mov    -0x448(%rbp),%rax
  mov    %rax,%rdi
  call   <check_executable@plt>
  test   %rax,%rax
  je     L108
  mov    -0x448(%rbp),%rax
  jmp    L43
L108:
  cmpq   $0x0,-0x448(%rbp)
  je     L76
  mov    -0x448(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movq   $0x0,-0x448(%rbp)
L76:
  mov    -0x468(%rbp),%rax
  mov    %rax,-0x450(%rbp)
  jmp    L119
L254:
  mov    -0x450(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L249
  movl   $0x1,-0x458(%rbp)
  jmp    L2
L249:
  addq   $0x1,-0x450(%rbp)
L119:
  mov    -0x450(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L254
L2:
  cmpl   $0x0,-0x458(%rbp)
  jne    L140
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,-0x438(%rbp)
  cmpq   $0x0,-0x438(%rbp)
  je     L140
  mov    -0x438(%rbp),%rax
  mov    %rax,-0x450(%rbp)
  jmp    L296
L274:
  mov    -0x450(%rbp),%rax
  mov    %rax,-0x440(%rbp)
  jmp    L64
L79:
  mov    -0x440(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L218
  addq   $0x1,-0x440(%rbp)
L64:
  mov    -0x440(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L79
  jmp    L234
L218:
  nop
L234:
  mov    -0x440(%rbp),%rax
  sub    -0x450(%rbp),%rax
  mov    %rax,-0x430(%rbp)
  mov    -0x440(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L250
  mov    -0x440(%rbp),%rax
  add    $0x1,%rax
  jmp    L49
L250:
  mov    -0x440(%rbp),%rax
L49:
  mov    %rax,-0x428(%rbp)
  cmpq   $0x0,-0x430(%rbp)
  jne    L159
  lea    -0x420(%rbp),%rax
  mov    $0x400,%esi
  mov    %rax,%rdi
  call   <getcwd@plt>
  test   %rax,%rax
  jne    L118
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <lt_fatal@plt>
L118:
  lea    -0x420(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x454(%rbp)
  mov    -0x454(%rbp),%eax
  lea    0x1(%rax),%ebx
  mov    -0x468(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %ebx,%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <xmalloc@plt>
  mov    %rax,-0x448(%rbp)
  mov    -0x454(%rbp),%edx
  lea    -0x420(%rbp),%rcx
  mov    -0x448(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x454(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x448(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2f,(%rax)
  mov    -0x454(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x448(%rbp),%rax
  add    %rax,%rdx
  mov    -0x468(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strcpy@plt>
  jmp    L315
L159:
  mov    -0x468(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x430(%rbp),%rax
  add    %edx,%eax
  add    $0x2,%eax
  mov    %eax,%edi
  call   <xmalloc@plt>
  mov    %rax,-0x448(%rbp)
  mov    -0x430(%rbp),%rax
  mov    %eax,%edx
  mov    -0x450(%rbp),%rcx
  mov    -0x448(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x448(%rbp),%rdx
  mov    -0x430(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2f,(%rax)
  mov    -0x430(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x448(%rbp),%rax
  add    %rax,%rdx
  mov    -0x468(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strcpy@plt>
L315:
  mov    -0x448(%rbp),%rax
  mov    %rax,%rdi
  call   <check_executable@plt>
  test   %rax,%rax
  je     L125
  mov    -0x448(%rbp),%rax
  jmp    L43
L125:
  cmpq   $0x0,-0x448(%rbp)
  je     L134
  mov    -0x448(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movq   $0x0,-0x448(%rbp)
L134:
  mov    -0x428(%rbp),%rax
  mov    %rax,-0x450(%rbp)
L296:
  mov    -0x450(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L274
L140:
  lea    -0x420(%rbp),%rax
  mov    $0x400,%esi
  mov    %rax,%rdi
  call   <getcwd@plt>
  test   %rax,%rax
  jne    L226
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <lt_fatal@plt>
L226:
  lea    -0x420(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x454(%rbp)
  mov    -0x454(%rbp),%eax
  lea    0x1(%rax),%ebx
  mov    -0x468(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %ebx,%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <xmalloc@plt>
  mov    %rax,-0x448(%rbp)
  mov    -0x454(%rbp),%edx
  lea    -0x420(%rbp),%rcx
  mov    -0x448(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x454(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x448(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2f,(%rax)
  mov    -0x454(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x448(%rbp),%rax
  add    %rax,%rdx
  mov    -0x468(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strcpy@plt>
  mov    -0x448(%rbp),%rax
  mov    %rax,%rdi
  call   <check_executable@plt>
  test   %rax,%rax
  je     L151
  mov    -0x448(%rbp),%rax
  jmp    L43
L151:
  cmpq   $0x0,-0x448(%rbp)
  je     L93
  mov    -0x448(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movq   $0x0,-0x448(%rbp)
L93:
  mov    $0x0,%eax
L43:
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L210
  call   <__stack_chk_fail@plt>
L210:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D14
type_infered: string
name: extract_symbolic_data
arguments: tag: D24
type_infered: string

tool: D14: PATH

tool: D24: getcwd failed

assistant: ```c
char *find_executable(const char *wrapper) {
  int has_slash = 0;
  const char *p;
  const char *p_next;
  char tmp[1024 + 1];
  int tmp_len;
  char *concat_name;

  ;
  if ((wrapper == NULL) || (*wrapper == '\0'))
    return NULL;
  if (((wrapper[0]) == '/')) {
    concat_name = xstrdup(wrapper);
    if (check_executable(concat_name))
      return concat_name;
    do {
      if (concat_name) {
        free((void *)concat_name);
        concat_name = 0;
      }
    } while (0);
  }
  for (p = wrapper; *p; p++)
    if (*p == '/') {
      has_slash = 1;
      break;
    }
  if (!has_slash) {
    const char *path = getenv("PATH");
    if (path != NULL) {
      for (p = path; *p; p = p_next) {
        const char *q;
        size_t p_len;
        for (q = p; *q; q++)
          if (((*q) == ':'))
            break;
        p_len = q - p;
        p_next = (*q == '\0' ? q : q + 1);
        if (p_len == 0) {
          if (getcwd(tmp, 1024) == NULL)
            lt_fatal("getcwd failed");
          tmp_len = strlen(tmp);
          concat_name = ((char *)xmalloc((tmp_len + 1 + strlen(wrapper) + 1) * sizeof(char)));
          memcpy(concat_name, tmp, tmp_len);
          concat_name[tmp_len] = '/';
          strcpy(concat_name + tmp_len + 1, wrapper);
        } else {
          concat_name = ((char *)xmalloc((p_len + 1 + strlen(wrapper) + 1) * sizeof(char)));
          memcpy(concat_name, p, p_len);
          concat_name[p_len] = '/';
          strcpy(concat_name + p_len + 1, wrapper);
        }
        if (check_executable(concat_name))
          return concat_name;
        do {
          if (concat_name) {
            free((void *)concat_name);
            concat_name = 0;
          }
        } while (0);
      }
    }
  }
  if (getcwd(tmp, 1024) == NULL)
    lt_fatal("getcwd failed");
  tmp_len = strlen(tmp);
  concat_name = ((char *)xmalloc((tmp_len + 1 + strlen(wrapper) + 1) * sizeof(char)));
  memcpy(concat_name, tmp, tmp_len);
  concat_name[tmp_len] = '/';
  strcpy(concat_name + tmp_len + 1, wrapper);
  if (check_executable(concat_name))
    return concat_name;
  do {
    if (concat_name) {
      free((void *)concat_name);
      concat_name = 0;
    }
  } while (0);
  return NULL;
}
```