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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xa0,%rsp
  mov    %edi,-0x94(%rbp)
  mov    %rsi,-0xa0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x74(%rbp),%rax
  mov    %rax,%rdi
  call   <pipe@plt>
  lea    -0x6c(%rbp),%rax
  mov    %rax,%rdi
  call   <pipe@plt>
  mov    $0x0,%eax
  call   <fork@plt>
  mov    %rax,-0x80(%rbp)
  cmpq   $0x0,-0x80(%rbp)
  jne    L7
  movl   $0x0,-0x8c(%rbp)
  jmp    L56
L21:
  mov    -0x6c(%rbp),%eax
  lea    -0x60(%rbp),%rcx
  mov    $0x50,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,-0x84(%rbp)
  mov    -0x84(%rbp),%eax
  cltq
  movb   $0x0,-0x60(%rbp,%rax,1)
  mov    -0x84(%rbp),%eax
  mov    %eax,%esi
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x60(%rbp),%rax
  mov    %rax,%rsi
  lea    D83(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xa,%eax
  sub    -0x8c(%rbp),%eax
  mov    %eax,%esi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x8,-0x8c(%rbp)
  jg     L62
  mov    -0x70(%rbp),%eax
  mov    $0x1,%edx
  lea    D9(%rip),%rcx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  jmp    L93
L62:
  mov    -0x70(%rbp),%eax
  mov    $0x1,%edx
  lea    D62(%rip),%rcx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
L93:
  addl   $0x1,-0x8c(%rbp)
L56:
  cmpl   $0x9,-0x8c(%rbp)
  jle    L21
  jmp    L77
L7:
  movl   $0x0,-0x88(%rbp)
  jmp    L71
L10:
  lea    -0x60(%rbp),%rax
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x68(%rbp),%eax
  lea    -0x60(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  lea    -0x60(%rbp),%rax
  mov    %rax,%rsi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D85(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x74(%rbp),%eax
  lea    -0x62(%rbp),%rcx
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  lea    -0x62(%rbp),%rax
  mov    %rax,%rsi
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movzbl -0x62(%rbp),%eax
  cmp    $0x71,%al
  jne    L71
  movl   $0x1,-0x88(%rbp)
L71:
  cmpl   $0x0,-0x88(%rbp)
  je     L10
L77:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L53
  call   <__stack_chk_fail@plt>
L53:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D30
type_infered: string
name: unpack_data
arguments: data_tag: D83
type_infered: string
name: unpack_data
arguments: data_tag: D18
type_infered: string
name: unpack_data
arguments: data_tag: D9
type_infered: string
name: unpack_data
arguments: data_tag: D62
type_infered: string
name: unpack_data
arguments: data_tag: D22
type_infered: string
name: unpack_data
arguments: data_tag: D45
type_infered: string
name: unpack_data
arguments: data_tag: D85
type_infered: string
name: unpack_data
arguments: data_tag: D46
type_infered: string

tool: D30: Child:%d Bytes recieved from parent.


tool: D83: Child:Msg:	%s


tool: D18: Child:	Remaining:%i


tool: D9: l

tool: D62: q

tool: D22: %s

tool: D45: Parent:Message: <<%s>> sent to child


tool: D85: Parent:Waiting for confirmation

tool: D46: Parent:confirmation recieved from child %s


assistant: ```c
void main(int args, char *argv[]) {
  int hp[2], ph[2];
  char pa_buf[2], ch_buf[80];
  pipe(hp);
  pipe(ph);
  pid_t pid = fork();
  if (pid == 0) {
    int n_rec = 0;
    while (n_rec < 10) {
      int by_re = read(ph[0], ch_buf, 80);
      ch_buf[by_re] = '\0';
      printf("Child:%d Bytes recieved from parent.\n", by_re);
      printf("Child:Msg:\t%s\n", ch_buf);
      printf("Child:\tRemaining:%i\n", 10 - n_rec);
      if (n_rec < 9)
        write(hp[1], "l", 1);
      else
        write(hp[1], "q", 1);
      n_rec++;
    }
  } else {
    int exit = 0;
    while (!exit) {
      char input[80];
      scanf("%s", input);
      write(ph[1], input, strlen(input));
      printf("Parent:Message: <<%s>> sent to child\n", input);
      printf("Parent:Waiting for confirmation\n");
      read(hp[0], pa_buf, 2);
      printf("Parent:confirmation recieved from child %s\n", pa_buf);
      if (pa_buf[0] == 'q')
        exit = 1;
    }
  }
}
```