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

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xf0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rdi
  call   <pipe@plt>
  lea    0x18(%rsp),%rdi
  call   <pipe@plt>
  call   <fork@plt>
  cmp    $0xffffffff,%eax
  je     L69
  test   %eax,%eax
  jne    L36
  mov    0x14(%rsp),%edi
  call   <close@plt>
  mov    0x18(%rsp),%edi
  call   <close@plt>
  mov    0x10(%rsp),%edi
  lea    D72(%rip),%rsi
  call   <fdopen@plt>
  mov    0x1c(%rsp),%edi
  lea    D24(%rip),%rsi
  mov    %rax,%rbp
  call   <fdopen@plt>
  mov    %rbp,%rdi
  lea    0xc(%rsp),%rdx
  lea    D59(%rip),%rsi
  mov    %rax,%r12
  xor    %eax,%eax
  call   <fscanf@plt>
  mov    0xc(%rsp),%edi
  cmp    $0x1,%edi
  jle    L57
  mov    $0x1,%esi
  nopl   0x0(%rax,%rax,1)
L8:
  mov    %edi,%eax
  lea    (%rbx,%rsi,1),%r8d
  cltd
  idiv   %esi
  test   %edx,%edx
  cmove  %r8d,%ebx
  add    $0x1,%esi
  cmp    %esi,%edi
  jne    L8
L57:
  mov    %r12,%rcx
  cmp    %ebx,%edi
  je     L46
  mov    $0x6,%edx
  mov    $0x1,%esi
  lea    D38(%rip),%rdi
  call   <fwrite@plt>
L63:
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L39
L69:
  lea    D56(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L36:
  mov    0x10(%rsp),%edi
  call   <close@plt>
  mov    0x1c(%rsp),%edi
  call   <close@plt>
  lea    0xc(%rsp),%rsi
  lea    D59(%rip),%rdi
  call   <scanf@plt>
  mov    0x14(%rsp),%edi
  lea    D24(%rip),%rsi
  call   <fdopen@plt>
  mov    0x18(%rsp),%edi
  lea    D72(%rip),%rsi
  mov    %rax,%rbp
  call   <fdopen@plt>
  mov    0xc(%rsp),%edx
  lea    D117(%rip),%rsi
  mov    %rbp,%rdi
  mov    %rax,%r12
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %rbp,%rdi
  lea    0x20(%rsp),%rbp
  call   <fflush@plt>
  mov    %r12,%rdi
  mov    %rbp,%rdx
  xor    %eax,%eax
  lea    D2(%rip),%rsi
  call   <fscanf@plt>
  mov    %rbp,%rsi
  lea    D36(%rip),%rdi
  call   <printf@plt>
L39:
  mov    0xe8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L13
  add    $0xf0,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L46:
  mov    $0x5,%edx
  mov    $0x1,%esi
  lea    D91(%rip),%rdi
  call   <fwrite@plt>
  jmp    L63
L13:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D72
type: string
name: retrieve_data
arguments: data_tag: D24
type: string
name: retrieve_data
arguments: data_tag: D59
type: string
name: retrieve_data
arguments: data_tag: D38
type: string
name: retrieve_data
arguments: data_tag: D56
type: string
name: retrieve_data
arguments: data_tag: D117
type: string
name: retrieve_data
arguments: data_tag: D2
type: string
name: retrieve_data
arguments: data_tag: D36
type: string
name: retrieve_data
arguments: data_tag: D91
type: string

tool: D72: r

tool: D24: w

tool: D59: %d

tool: D38: False


tool: D56: fork

tool: D117: %d


tool: D2: %s

tool: D36: %s


tool: D91: True


assistant: ```c
int main(int argc, const char *argv[]) {
  int fd_to_child[2];
  int fd_to_parent[2];
  pid_t child_pid;
  pipe(fd_to_child);
  pipe(fd_to_parent);
  child_pid = fork();
  if (child_pid == -1) {
    perror("fork");
    exit(1);
  }
  if (child_pid == 0) {
    close(fd_to_child[1]);
    close(fd_to_parent[0]);
    FILE *input = fdopen(fd_to_child[0], "r");
    FILE *output = fdopen(fd_to_parent[1], "w");
    int n;
    fscanf(input, "%d", &n);
    int i;
    int sum;
    for (i = 1; i < n; i++) {
      if (n % i == 0)
        sum += i;
    }
    if (sum == n)
      fprintf(output, "True\n");
    else
      fprintf(output, "False\n");
    exit(0);
  } else {
    close(fd_to_child[0]);
    close(fd_to_parent[1]);
    int n;
    scanf("%d", &n);
    FILE *output = fdopen(fd_to_child[1], "w");
    FILE *input = fdopen(fd_to_parent[0], "r");
    fprintf(output, "%d\n", n);
    fflush(output);
    char answer[200];
    fscanf(input, "%s", answer);
    printf("%s\n", answer);
  }
  return 0;
}
```