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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    $0x0,%eax
  call   <getppid@plt>
  mov    %eax,%ebx
  mov    $0x0,%eax
  call   <getpid@plt>
  mov    %ebx,%edx
  mov    %eax,%esi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x1,-0x2c(%rbp)
  jmp    L29
L37:
  mov    $0x0,%eax
  call   <fork@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  jns    L12
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L4
L12:
  cmpq   $0x0,-0x20(%rbp)
  jne    L31
  mov    $0x0,%eax
  call   <getppid@plt>
  mov    %eax,%ebx
  mov    $0x0,%eax
  call   <getpid@plt>
  mov    %ebx,%edx
  mov    %eax,%esi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x186a0,%edi
  call   <usleep@plt>
  mov    $0x0,%eax
  call   <getppid@plt>
  mov    %eax,%ebx
  mov    $0x0,%eax
  call   <getpid@plt>
  mov    %ebx,%edx
  mov    %eax,%esi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L4
L31:
  movl   $0x1,-0x28(%rbp)
  jmp    L89
L43:
  mov    $0x186a0,%edi
  call   <usleep@plt>
  movl   $0x0,-0x24(%rbp)
  mov    -0x24(%rbp),%edx
  lea    -0x30(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xffffffff,%edi
  call   <waitpid@plt>
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  addl   $0x1,-0x28(%rbp)
L89:
  cmpl   $0x3,-0x28(%rbp)
  jle    L43
L4:
  addl   $0x1,-0x2c(%rbp)
L29:
  cmpl   $0x4,-0x2c(%rbp)
  jle    L37
  mov    $0x0,%edi
  call   <exit@plt>
  mov    $0x0,%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L44
  call   <__stack_chk_fail@plt>
L44:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D18
type_guessed: string
name: retrieve_data
arguments: data_tag: D46
type_guessed: string
name: retrieve_data
arguments: data_tag: D8
type_guessed: string
name: retrieve_data
arguments: data_tag: D39
type_guessed: string
name: retrieve_data
arguments: data_tag: D14
type_guessed: string

tool: D18: I'm process %d. My parent is %d.


tool: D46: fork error

tool: D8: I'm process %d. My parent is %d. I'm going to work for 1 second ...


tool: D39: I'm process %d. My parent is %d. I finished my work


tool: D14: father working ...

assistant: ```c
int main(void) {
  pid_t pid;
  int i, j;
  printf("I'm process %d. My parent is %d.\n", getpid(), getppid());
  for (i = 1; i <= 4; i++) {
    pid = fork();
    if (pid < 0) {
      printf("fork error");
      exit(1);
    } else if (pid == 0) {
      printf("I'm process %d. My parent is %d. I'm going to work for 1 second ...\n", getpid(), getppid());
      usleep(100000);
      printf("I'm process %d. My parent is %d. I finished my work\n", getpid(), getppid());
    } else
      for (j = 1; j <= 3; j++) {
        usleep(100000);
        int status;
        int options = 0;
        waitpid(-1, &status, options);
        printf("father working ...\n");
      }
  }
  exit(0);
}
```