user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %r12
  lea    D13(%rip),%rdi
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x420,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  call   <puts@plt>
  mov    0x8(%rbx),%rdi
  movq   $0x0,0x8(%rsp)
  test   %rdi,%rdi
  je     L35
  call   <atoi@plt>
L35:
  lea    0x8(%rsp),%rdi
  call   <pipe@plt>
  test   %rax,%rax
  js     L32
L40:
  call   <fork@plt>
  test   %eax,%eax
  jne    L46
  call   <getpid@plt>
  mov    %eax,%ebp
  xor    %eax,%eax
  call   <getppid@plt>
  mov    %ebp,%esi
  lea    D35(%rip),%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%edi
  call   <close@plt>
  lea    D32(%rip),%rdi
  call   <strlen@plt>
  mov    0xc(%rsp),%edi
  lea    D56(%rip),%rsi
  mov    %eax,%edx
  call   <write@plt>
  lea    D16(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
L25:
  jmp    L25
L46:
  xor    %eax,%eax
  lea    0x10(%rsp),%r12
  call   <getpid@plt>
  mov    %eax,%ebp
  xor    %eax,%eax
  call   <getppid@plt>
  mov    %ebp,%esi
  lea    D59(%rip),%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <printf@plt>
  mov    0xc(%rsp),%edi
  call   <close@plt>
  xor    %eax,%eax
  lea    0x20(%rsp),%rdi
  pxor   %xmm0,%xmm0
  mov    $0x7e,%ecx
  mov    $0x400,%edx
  mov    %r12,%rsi
  movaps %xmm0,0x10(%rsp)
  rep stos %rax,%es:(%rdi)
  mov    0x8(%rsp),%edi
  call   <read@plt>
  mov    %r12,%rdx
  lea    D30(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
L9:
  jmp    L9
L32:
  lea    D24(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L40
```

tool_calls: name: unpack_data
arguments: tag: D13
datatype: string
name: unpack_data
arguments: tag: D35
datatype: string
name: unpack_data
arguments: tag: D32
datatype: string
name: unpack_data
arguments: tag: D56
datatype: string
name: unpack_data
arguments: tag: D16
datatype: string
name: unpack_data
arguments: tag: D59
datatype: string
name: unpack_data
arguments: tag: D30
datatype: string
name: unpack_data
arguments: tag: D24
datatype: string

tool: D13: 
[Main]: Started default program...

tool: D35: 
[Child]: own pid:%u, Parent id:%u ..


tool: D32: Hello World from Child process

tool: D56: Hello World from Child process


tool: D16: 
 wrote %u bytes from child process...


tool: D59: 
[Parent]: own pid:%u, Parent id:%u ..


tool: D30: 
 Got from child %u bytes: [%s] ...


tool: D24: 
Failed to create a pipe..exiting..

assistant: ```c
int main(int argc, char **argv) {
  printf("\n[Main]: Started default program...\n");
  uint32_t pipefd[2] = {0};
  uint32_t cpid = 0, ppid = 0;
  int32_t ret = -1;
  bool exec = false;
  if (argv[1]) {
    exec = atoi(argv[1]);
  }
  ret = pipe(pipefd);
  if (ret < 0) {
    printf("\nFailed to create a pipe..exiting..\n");
    exit(0);
  }
  if (!fork()) {
    pid_t pid = getpid();
    ppid = getppid();
    uint32_t nBytes = 0;
    printf("\n[Child]: own pid:%u, Parent id:%u ..\n", pid, ppid);
    close(pipefd[0]);
    nBytes = write(pipefd[1], "Hello World from Child process\n", strlen("Hello World from Child process"));
    printf("\n wrote %u bytes from child process...\n", nBytes);
    while (1)
      continue;
  } else {
    pid_t pid = getpid();
    ppid = getppid();
    printf("\n[Parent]: own pid:%u, Parent id:%u ..\n", pid, ppid);
    close(pipefd[1]);
    uint32_t nBytes = 0;
    char buff[1024] = {0};
    nBytes = read(pipefd[0], buff, 1024);
    printf("\n Got from child %u bytes: [%s] ...\n", nBytes, buff);
    while (1)
      continue;
  }
  return 0;
}
```