user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x30(%rbp)
  movl   $0x0,-0x2c(%rbp)
  lea    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <pipe@plt>
  cmp    $0xffffffff,%eax
  jne    L6
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L6:
  mov    $0x0,%eax
  call   <fork@plt>
  test   %rax,%rax
  jne    L25
  mov    $0x1,%edi
  call   <close@plt>
  mov    -0x24(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <dup2@plt>
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  lea    D2(%rip),%rax
  mov    %rax,-0x20(%rbp)
  lea    D34(%rip),%rax
  mov    %rax,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  lea    -0x20(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <execvp@plt>
  mov    -0x20(%rbp),%rax
  lea    -0x20(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <execvp@plt>
  lea    D71(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L25:
  mov    $0x0,%eax
  call   <fork@plt>
  test   %rax,%rax
  jne    L40
  mov    $0x0,%edi
  call   <close@plt>
  mov    $0x1,%edi
  call   <close@plt>
  mov    -0x28(%rbp),%eax
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <dup2@plt>
  mov    -0x24(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <dup2@plt>
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  lea    D86(%rip),%rax
  mov    %rax,-0x20(%rbp)
  lea    D26(%rip),%rax
  mov    %rax,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  lea    -0x20(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <execvp@plt>
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L40:
  mov    $0x0,%eax
  call   <fork@plt>
  test   %rax,%rax
  jne    L17
  mov    $0x0,%edi
  call   <close@plt>
  mov    -0x28(%rbp),%eax
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <dup2@plt>
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  lea    D75(%rip),%rax
  mov    %rax,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  mov    -0x20(%rbp),%rax
  lea    -0x20(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <execvp@plt>
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L17:
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    $0x0,%edi
  call   <wait@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L26
  call   <__stack_chk_fail@plt>
L26:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D79
datatype: string
name: parse_data
arguments: data_label: D2
datatype: string
name: parse_data
arguments: data_label: D34
datatype: string
name: parse_data
arguments: data_label: D71
datatype: string
name: parse_data
arguments: data_label: D86
datatype: string
name: parse_data
arguments: data_label: D26
datatype: string
name: parse_data
arguments: data_label: D23
datatype: string
name: parse_data
arguments: data_label: D75
datatype: string

tool: D79: Pipe failed

tool: D2: ls

tool: D34: -l

tool: D71: execvp of ls failed

tool: D86: grup

tool: D26: list

tool: D23: execvp of wc failed

tool: D75: sort

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;
}
```