user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x2,-0x28(%rbp)
  movl   $0x3,-0x24(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L147
L139:
  lea    -0x20(%rbp),%rdx
  mov    -0x40(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <pipe@plt>
  addl   $0x1,-0x40(%rbp)
L147:
  cmpl   $0x2,-0x40(%rbp)
  jle    L139
  movl   $0x0,-0x40(%rbp)
  jmp    L102
L113:
  mov    $0x0,%eax
  call   <fork@plt>
  test   %rax,%rax
  jne    L152
  mov    -0x40(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x40(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x2c(%rbp)
  movl   $0x0,-0x3c(%rbp)
  jmp    L151
L76:
  mov    -0x3c(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  je     L61
  mov    -0x3c(%rbp),%eax
  cltq
  mov    -0x20(%rbp,%rax,8),%eax
  mov    %eax,%edi
  call   <close@plt>
L61:
  mov    -0x3c(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  je     L99
  mov    -0x3c(%rbp),%eax
  cltq
  mov    -0x1c(%rbp,%rax,8),%eax
  mov    %eax,%edi
  call   <close@plt>
L99:
  addl   $0x1,-0x3c(%rbp)
L151:
  cmpl   $0x2,-0x3c(%rbp)
  jle    L76
L77:
  mov    -0x30(%rbp),%eax
  cltq
  mov    -0x20(%rbp,%rax,8),%eax
  lea    -0x44(%rbp),%rcx
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    -0x44(%rbp),%eax
  mov    -0x40(%rbp),%edx
  movslq %edx,%rdx
  mov    -0x28(%rbp,%rdx,4),%ecx
  cltd
  idiv   %ecx
  mov    %edx,%eax
  test   %eax,%eax
  jne    L73
  mov    -0x44(%rbp),%eax
  mov    -0x40(%rbp),%edx
  movslq %edx,%rdx
  mov    -0x28(%rbp,%rdx,4),%esi
  cltd
  idiv   %esi
  mov    %eax,-0x44(%rbp)
L73:
  mov    -0x2c(%rbp),%eax
  cltq
  mov    -0x1c(%rbp,%rax,8),%eax
  lea    -0x44(%rbp),%rcx
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    -0x44(%rbp),%eax
  cmp    $0x64,%eax
  jg     L77
  mov    -0x30(%rbp),%eax
  cltq
  mov    -0x20(%rbp,%rax,8),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0x2c(%rbp),%eax
  cltq
  mov    -0x1c(%rbp,%rax,8),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L152:
  addl   $0x1,-0x40(%rbp)
L102:
  cmpl   $0x1,-0x40(%rbp)
  jle    L113
  lea    -0x44(%rbp),%rax
  mov    %rax,%rsi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x2,-0x38(%rbp)
  movl   $0x0,-0x34(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L145
L86:
  mov    -0x40(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  je     L66
  mov    -0x40(%rbp),%eax
  cltq
  mov    -0x20(%rbp,%rax,8),%eax
  mov    %eax,%edi
  call   <close@plt>
L66:
  mov    -0x40(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  je     L54
  mov    -0x40(%rbp),%eax
  cltq
  mov    -0x1c(%rbp,%rax,8),%eax
  mov    %eax,%edi
  call   <close@plt>
L54:
  addl   $0x1,-0x40(%rbp)
L145:
  cmpl   $0x2,-0x40(%rbp)
  jle    L86
L161:
  mov    -0x34(%rbp),%eax
  cltq
  mov    -0x1c(%rbp,%rax,8),%eax
  lea    -0x44(%rbp),%rcx
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    -0x38(%rbp),%eax
  cltq
  mov    -0x20(%rbp,%rax,8),%eax
  lea    -0x44(%rbp),%rcx
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    -0x44(%rbp),%eax
  sub    $0x5,%eax
  mov    %eax,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  mov    %eax,%esi
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x44(%rbp),%eax
  cmp    $0x64,%eax
  jg     L161
  mov    -0x34(%rbp),%eax
  cltq
  mov    -0x1c(%rbp,%rax,8),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0x38(%rbp),%eax
  cltq
  mov    -0x20(%rbp,%rax,8),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    $0x0,%edi
  call   <wait@plt>
  mov    $0x0,%edi
  call   <wait@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L156
  call   <__stack_chk_fail@plt>
L156:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D3
type_infered: string
name: extract_symbolic_data
arguments: tag: D11
type_infered: string

tool: D3: %d

tool: D11: Father : %d


assistant: ```c
int main() {
  int n, i, j;
  int p[3][2], mod[2] = {2, 3};
  for (i = 0; i < 3; ++i)
    pipe(p[i]);
  for (i = 0; i < 2; ++i)
    if (fork() == 0) {
      int from = i;
      int to = i + 1;
      for (j = 0; j < 3; ++j) {
        if (j != from)
          close(p[j][0]);
        if (j != to)
          close(p[j][1]);
      }
      do {
        read(p[from][0], &n, sizeof(int));
        if (n % mod[i] == 0)
          n /= mod[i];
        write(p[to][1], &n, sizeof(int));
      } while (n > 100);
      close(p[from][0]);
      close(p[to][1]);
      exit(0);
    }
  scanf("%d", &n);
  int from = 2;
  int to = 0;
  for (i = 0; i < 3; ++i) {
    if (i != from)
      close(p[i][0]);
    if (i != to)
      close(p[i][1]);
  }
  do {
    write(p[to][1], &n, sizeof(int));
    read(p[from][0], &n, sizeof(int));
    n -= 5;
    printf("Father : %d\n", n);
  } while (n > 100);
  close(p[to][1]);
  close(p[from][0]);
  wait(0);
  wait(0);
  return 0;
}
```