user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <fork@plt>
  mov    %eax,%ebx
  cmp    $0xffffffff,%eax
  je     L22
  test   %eax,%eax
  jne    L17
L9:
  lea    D35(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  call   <getpid@plt>
  mov    %eax,%esi
  lea    D78(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  call   <getppid@plt>
  mov    %eax,%esi
  lea    D49(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D14(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D57(%rip),%rdi
  call   <scanf@plt>
  lea    D90(%rip),%rdi
  call   <puts@plt>
  mov    0x4(%rsp),%edi
  call   <exit@plt>
L17:
  lea    D117(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  call   <getpid@plt>
  mov    %eax,%esi
  lea    D111(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebx,%esi
  lea    D98(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D5(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rdi
  call   <wait@plt>
  mov    0x4(%rsp),%edi
  call   <WEXITSTATUS@plt>
  mov    %eax,%esi
  lea    D28(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D126(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L29
  mov    $0x0,%eax
  add    $0x10,%rsp
  pop    %rbx
  ret
L22:
  lea    D63(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L9
L29:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D35
type_guessed: string
name: read_data
arguments: data_label: D78
type_guessed: string
name: read_data
arguments: data_label: D49
type_guessed: string
name: read_data
arguments: data_label: D14
type_guessed: string
name: read_data
arguments: data_label: D57
type_guessed: string
name: read_data
arguments: data_label: D90
type_guessed: string
name: read_data
arguments: data_label: D117
type_guessed: string
name: read_data
arguments: data_label: D111
type_guessed: string
name: read_data
arguments: data_label: D98
type_guessed: string
name: read_data
arguments: data_label: D5
type_guessed: string
name: read_data
arguments: data_label: D28
type_guessed: string
name: read_data
arguments: data_label: D126
type_guessed: string
name: read_data
arguments: data_label: D63
type_guessed: string

tool: D35:  CHILD: This is the child process!

tool: D78:  CHILD: My PID is %d


tool: D49:  CHILD: My parent's PID is %d


tool: D14:  CHILD: Enter my exit status (make it small): 

tool: D57:  %d

tool: D90:  CHILD: I'm outta here!

tool: D117: PARENT: This is the parent process!

tool: D111: PARENT: My PID is %d


tool: D98: PARENT: My child's PID is %d


tool: D5: PARENT: I'm now waiting for my child to exit()...

tool: D28: PARENT: My child's exit status is: %d


tool: D126: PARENT: I'm outta here!

tool: D63: fork

assistant: ```c
int main(void) {
  pid_t pid;
  int rv;
  switch (pid = fork()) {
  case -1:
    perror("fork");
    exit(1);
  case 0:
    printf(" CHILD: This is the child process!\n");
    printf(" CHILD: My PID is %d\n", getpid());
    printf(" CHILD: My parent's PID is %d\n", getppid());
    printf(" CHILD: Enter my exit status (make it small): ");
    scanf(" %d", &rv);
    printf(" CHILD: I'm outta here!\n");
    exit(rv);
  default:
    printf("PARENT: This is the parent process!\n");
    printf("PARENT: My PID is %d\n", getpid());
    printf("PARENT: My child's PID is %d\n", pid);
    printf("PARENT: I'm now waiting for my child to exit()...\n");
    wait(&rv);
    printf("PARENT: My child's exit status is: %d\n", WEXITSTATUS(rv));
    printf("PARENT: I'm outta here!\n");
  }
  return 0;
}
```