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

```asm
<main>:
  endbr64
  push   %rbp
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rdi
  call   <pipe@plt>
  cmp    $0xffffffff,%eax
  je     L85
L10:
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  je     L7
L21:
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  je     L26
L32:
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  je     L11
L49:
  mov    0x8(%rsp),%edi
  call   <close@plt>
  mov    0xc(%rsp),%edi
  call   <close@plt>
  xor    %edi,%edi
  call   <wait@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L86
  add    $0x30,%rsp
  xor    %eax,%eax
  pop    %rbp
  ret
L7:
  mov    $0x1,%edi
  lea    0x10(%rsp),%rbp
  call   <close@plt>
  mov    0xc(%rsp),%edi
  mov    $0x1,%esi
  call   <dup2@plt>
  mov    0x8(%rsp),%edi
  call   <close@plt>
  mov    0xc(%rsp),%edi
  call   <close@plt>
  lea    D81(%rip),%rdi
  mov    %rbp,%rsi
  lea    D61(%rip),%rax
  mov    %rdi,0x10(%rsp)
  mov    %rax,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  call   <execvp@plt>
  mov    0x10(%rsp),%rdi
  mov    %rbp,%rsi
  call   <execvp@plt>
  lea    D11(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L21
L11:
  xor    %edi,%edi
  call   <close@plt>
  mov    0x8(%rsp),%edi
  xor    %esi,%esi
  call   <dup2@plt>
  mov    0x8(%rsp),%edi
  call   <close@plt>
  mov    0xc(%rsp),%edi
  call   <close@plt>
  lea    D23(%rip),%rdi
  lea    0x10(%rsp),%rsi
  movq   $0x0,0x18(%rsp)
  mov    %rdi,0x10(%rsp)
  call   <execvp@plt>
  lea    D33(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L49
L26:
  xor    %edi,%edi
  call   <close@plt>
  mov    $0x1,%edi
  call   <close@plt>
  mov    0x8(%rsp),%edi
  xor    %esi,%esi
  call   <dup2@plt>
  mov    0xc(%rsp),%edi
  mov    $0x1,%esi
  call   <dup2@plt>
  mov    0x8(%rsp),%edi
  call   <close@plt>
  mov    0xc(%rsp),%edi
  call   <close@plt>
  lea    D37(%rip),%rdi
  lea    0x10(%rsp),%rsi
  movq   $0x0,0x20(%rsp)
  lea    D54(%rip),%rax
  mov    %rdi,0x10(%rsp)
  mov    %rax,0x18(%rsp)
  call   <execvp@plt>
  lea    D33(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L32
L85:
  lea    D66(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L10
L86:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D81
datatype: string
name: retrieve_data
arguments: label: D61
datatype: string
name: retrieve_data
arguments: label: D11
datatype: string
name: retrieve_data
arguments: label: D23
datatype: string
name: retrieve_data
arguments: label: D33
datatype: string
name: retrieve_data
arguments: label: D37
datatype: string
name: retrieve_data
arguments: label: D54
datatype: string
name: retrieve_data
arguments: label: D66
datatype: string

tool: D81: ls

tool: D61: -l

tool: D11: execvp of ls failed

tool: D23: sort

tool: D33: execvp of wc failed

tool: D37: grup

tool: D54: list

tool: D66: Pipe failed

assistant: ```c
int main(int argc, char **argv) {
  int pipen = 0;
  int argn = 0;
  int des_p[2];
  if (pipe(des_p) == -1) {
    perror("Pipe failed");
    exit(1);
  }
  if (fork() == 0) {
    close(1);
    dup2(des_p[1], 1);
    close(des_p[0]);
    close(des_p[1]);
    const char *prog1[] = {"ls", "-l", 0};
    execvp(prog1[0], prog1);
    execvp(prog1[0], prog1);
    perror("execvp of ls failed");
    exit(1);
  }
  if (fork() == 0) {
    close(0);
    close(1);
    dup2(des_p[0], 0);
    dup2(des_p[1], 1);
    close(des_p[0]);
    close(des_p[1]);
    const char *prog2[] = {"grup", "list", 0};
    execvp(prog2[0], prog2);
    perror("execvp of wc failed");
    exit(1);
  }
  if (fork() == 0) {
    close(0);
    dup2(des_p[0], 0);
    close(des_p[0]);
    close(des_p[1]);
    const char *prog3[] = {"sort", 0};
    execvp(prog3[0], prog3);
    perror("execvp of wc failed");
    exit(1);
  }
  close(des_p[0]);
  close(des_p[1]);
  wait(0);
  return 0;
}
```