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

```asm
<run>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x750,%rsp
  mov    %rdi,-0x2748(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x2722(%rbp),%rax
  lea    D3(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0xfb0(%rbp),%rax
  mov    $0x7d0,%esi
  mov    %rax,%rdi
  call   <getcwd@plt>
  lea    -0x2722(%rbp),%rdx
  lea    -0xfb0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x2748(%rbp),%rax
  lea    D57(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <popen@plt>
  mov    %rax,-0x2730(%rbp)
  jmp    L10
L39:
  movzbl -0x1780(%rbp),%eax
  cmp    $0x3f,%al
  je     L18
  movzbl -0x1780(%rbp),%eax
  cmp    $0x4d,%al
  je     L18
  movzbl -0x1780(%rbp),%eax
  cmp    $0x49,%al
  jne    L10
L18:
  lea    -0x1780(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  movb   $0x0,-0x1780(%rbp,%rax,1)
  lea    -0xfb0(%rbp),%rdx
  lea    -0x1f50(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x1780(%rbp),%rax
  add    $0x8,%rax
  lea    -0x7e0(%rbp),%rdx
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strcpy@plt>
  lea    -0x7e0(%rbp),%rdx
  lea    -0x1f50(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1f50(%rbp),%rax
  mov    %rax,%rdi
  call   <canread@plt>
  test   %rax,%rax
  je     L79
  lea    -0x1f50(%rbp),%rax
  mov    %rax,%rdi
  call   <isdir@plt>
  test   %eax,%eax
  jne    L79
  lea    -0x7e0(%rbp),%rax
  mov    %rax,%rsi
  lea    D51(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1f50(%rbp),%rdx
  lea    -0x2720(%rbp),%rax
  lea    D23(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x2720(%rbp),%rax
  mov    %rax,%rdi
  call   <system@plt>
  mov    %eax,-0x2734(%rbp)
  jmp    L10
L79:
  lea    -0x2722(%rbp),%rdx
  lea    -0x7e0(%rbp),%rax
  mov    %rax,%rsi
  lea    D58(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1f50(%rbp),%rdx
  lea    -0x2720(%rbp),%rax
  lea    D19(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x2720(%rbp),%rax
  mov    %rax,%rdi
  call   <system@plt>
  mov    %eax,-0x2734(%rbp)
  cmpl   $0x1,-0x2734(%rbp)
  je     L10
  lea    -0x1f50(%rbp),%rax
  mov    %rax,%rsi
  lea    D65(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L10:
  mov    -0x2730(%rbp),%rdx
  lea    -0x1780(%rbp),%rax
  mov    $0x7d0,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L39
  mov    -0x2730(%rbp),%rax
  mov    %rax,%rdi
  call   <pclose@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L83
  call   <__stack_chk_fail@plt>
L83:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D3
data_type: string
name: parse_data
arguments: data_label: D57
data_type: string
name: parse_data
arguments: data_label: D51
data_type: string
name: parse_data
arguments: data_label: D23
data_type: string
name: parse_data
arguments: data_label: D58
data_type: string
name: parse_data
arguments: data_label: D19
data_type: string
name: parse_data
arguments: data_label: D65
data_type: string

tool: D3: /

tool: D57: r

tool: D51: Deleting %s


tool: D23: rm %s

tool: D58: Deleting %s%s


tool: D19: rm -rf %s

tool: D65: Deleting %s failed.


assistant: ```c
void run(char *command) {
  FILE *fp;
  char cmd[2000];
  char filename[2000];
  char line[2000];
  char curdir[2000];
  char short_filename[2000];
  char slash[2];
  int result;
  strcpy(slash, "/");
  getcwd(curdir, 2000);
  strcat(curdir, slash);
  fp = popen(command, "r");
  while (fgets(line, sizeof line, fp)) {
    if ((line[0] == '?') || (line[0] == 'M') || (line[0] == 'I')) {
      line[strlen(line) - 1] = '\0';
      strcpy(filename, curdir);
      strcpy(short_filename, line + 8);
      strcat(filename, short_filename);
      if (canread(filename) && !isdir(filename)) {
        printf("Deleting %s\n", short_filename);
        sprintf(cmd, "rm %s", filename);
        result = system(cmd);
      } else {
        printf("Deleting %s%s\n", short_filename, slash);
        sprintf(cmd, "rm -rf %s", filename);
        result = system(cmd);
        if (result != true) {
          printf("Deleting %s failed.\n", filename);
        }
      }
    }
  }
  pclose(fp);
}
```