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

```asm
<main>:
  endbr64
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rdi
  call   <pipe@plt>
  lea    0x10(%rsp),%rdi
  call   <pipe@plt>
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  je     L32
L27:
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  je     L31
L13:
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  je     L63
L36:
  mov    0x8(%rsp),%edi
  call   <close@plt>
  mov    0xc(%rsp),%edi
  call   <close@plt>
  mov    0x10(%rsp),%edi
  call   <close@plt>
  mov    0x14(%rsp),%edi
  call   <close@plt>
  xor    %edi,%edi
  call   <wait@plt>
  xor    %edi,%edi
  call   <wait@plt>
  xor    %edi,%edi
  call   <wait@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L60
  xor    %eax,%eax
  add    $0x28,%rsp
  ret
L32:
  mov    0x8(%rsp),%edi
  call   <close@plt>
  mov    0x10(%rsp),%edi
  call   <close@plt>
  mov    0x14(%rsp),%edi
  call   <close@plt>
  mov    0xc(%rsp),%edi
  mov    $0x1,%esi
  call   <dup2@plt>
  lea    D17(%rip),%rdi
  xor    %ecx,%ecx
  xor    %eax,%eax
  mov    %rdi,%rsi
  lea    D15(%rip),%rdx
  call   <execl@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L27
L63:
  mov    0x8(%rsp),%edi
  call   <close@plt>
  mov    0xc(%rsp),%edi
  call   <close@plt>
  mov    0x14(%rsp),%edi
  call   <close@plt>
  mov    0x10(%rsp),%edi
  xor    %esi,%esi
  call   <dup2@plt>
  lea    D44(%rip),%rdi
  xor    %ecx,%ecx
  xor    %eax,%eax
  mov    %rdi,%rsi
  lea    D6(%rip),%rdx
  call   <execl@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L36
L31:
  mov    0xc(%rsp),%edi
  call   <close@plt>
  mov    0x10(%rsp),%edi
  call   <close@plt>
  mov    0x8(%rsp),%edi
  xor    %esi,%esi
  call   <dup2@plt>
  mov    0x14(%rsp),%edi
  mov    $0x1,%esi
  call   <dup2@plt>
  lea    D33(%rip),%rdi
  xor    %edx,%edx
  xor    %eax,%eax
  mov    %rdi,%rsi
  call   <execl@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L13
L60:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D17
type_guessed: string
name: read_data
arguments: data_tag: D15
type_guessed: string
name: read_data
arguments: data_tag: D44
type_guessed: string
name: read_data
arguments: data_tag: D6
type_guessed: string
name: read_data
arguments: data_tag: D33
type_guessed: string

tool: D17: /usr/bin/sort

tool: D15: a.txt

tool: D44: /usr/bin/wc

tool: D6: -l

tool: D33: /usr/bin/uniq

assistant: ```c
int main() {
  int su[2], uw[2];
  pipe(su);
  pipe(uw);
  if (fork() == 0) {
    close(su[0]);
    close(uw[0]);
    close(uw[1]);
    dup2(su[1], 1);
    execl("/usr/bin/sort", "/usr/bin/sort", "a.txt", NULL);
    exit(0);
  }
  if (fork() == 0) {
    close(su[1]);
    close(uw[0]);
    dup2(su[0], 0);
    dup2(uw[1], 1);
    execl("/usr/bin/uniq", "/usr/bin/uniq", NULL);
    exit(0);
  }
  if (fork() == 0) {
    close(su[0]);
    close(su[1]);
    close(uw[1]);
    dup2(uw[0], 0);
    execl("/usr/bin/wc", "/usr/bin/wc", "-l", NULL);
    exit(0);
  }
  close(su[0]);
  close(su[1]);
  close(uw[0]);
  close(uw[1]);
  wait(0);
  wait(0);
  wait(0);
  return 0;
}
```