user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x130,%rsp
  mov    %edi,-0x124(%rbp)
  mov    %rsi,-0x130(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x118(%rbp),%rax
  mov    %rax,%rdi
  call   <pipe@plt>
  cmp    $0xffffffff,%eax
  jne    L3
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L3:
  call   <fork@plt>
  cmp    $0xffffffff,%eax
  je     L47
  test   %eax,%eax
  je     L11
  jmp    L58
L47:
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x2,%edi
  call   <exit@plt>
  jmp    L89
L11:
  lea    D67(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x120(%rbp)
L97:
  mov    -0x114(%rbp),%eax
  mov    -0x120(%rbp),%edx
  lea    D67(%rip),%rcx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  cmp    %eax,-0x120(%rbp)
  je     L73
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x3,%edi
  call   <exit@plt>
L73:
  mov    $0x5,%edi
  call   <sleep@plt>
  jmp    L97
L58:
  lea    D69(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x120(%rbp)
L36:
  mov    -0x114(%rbp),%eax
  mov    -0x120(%rbp),%edx
  lea    D69(%rip),%rcx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  cmp    %eax,-0x120(%rbp)
  je     L38
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x4,%edi
  call   <exit@plt>
L38:
  mov    $0x1,%edi
  call   <sleep@plt>
  mov    -0x118(%rbp),%eax
  lea    -0x110(%rbp),%rcx
  mov    $0x100,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,-0x11c(%rbp)
  cmpl   $0x0,-0x11c(%rbp)
  js     L94
  mov    -0x11c(%rbp),%edx
  lea    -0x110(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x1,%edi
  call   <write@plt>
  jmp    L36
L94:
  nop
L89:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L95
  call   <__stack_chk_fail@plt>
L95:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D47
type_infered: string
name: parse_data
arguments: data_tag: D32
type_infered: string
name: parse_data
arguments: data_tag: D67
type_infered: string
name: parse_data
arguments: data_tag: D17
type_infered: string
name: parse_data
arguments: data_tag: D69
type_infered: string

tool: D47: cann't get a pip

tool: D32: cann't fork

tool: D67: I want a cookie


tool: D17: write

tool: D69: testing.. 


assistant: ```c
int main(int argc, char *argv[]) {
  int pipefd[2];
  int len;
  char buf[256];
  int read_len;
  if (pipe(pipefd) == -1) {
    {
      perror("cann't get a pip");
      exit(1);
    };
  }
  switch (fork()) {
  case -1: {
    perror("cann't fork");
    exit(2);
  }; break;
  case 0:
    len = strlen("I want a cookie\n");
    while (1) {
      if (write(pipefd[1], "I want a cookie\n", len) != len) {
        {
          perror("write");
          exit(3);
        };
      }
      sleep(5);
    }
  default:
    len = strlen("testing.. \n");
    while (1) {
      if (write(pipefd[1], "testing.. \n", len) != len) {
        {
          perror("write");
          exit(4);
        };
      }
      sleep(1);
      read_len = read(pipefd[0], buf, 256);
      if (read_len < 0) {
        break;
      }
      write(1, buf, read_len);
    }
  }
  return 0;
}
```