user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<main>:
  endbr64
  push   %r12
  lea    D71(%rip),%rdi
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <puts@plt>
  lea    D89(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  je     L130
  lea    0x4(%rsp),%r12
  mov    %rax,%rbx
  mov    %r12,%rdi
  call   <wait@plt>
  movslq %eax,%rbp
  cmp    %rbp,%rbx
  jne    L10
L168:
  cmpl   $0x2,0x4(%rsp)
  jne    L221
L189:
  mov    0x4(%rsp),%edx
  lea    D74(%rip),%rdi
  xor    %eax,%eax
  mov    %rbp,%rsi
  call   <printf@plt>
  mov    %r12,%rdi
  movl   $0xffffffff,0x4(%rsp)
  call   <wait@plt>
  cmp    $0xffffffff,%eax
  jne    L218
L97:
  xor    %eax,%eax
  xor    %ebx,%ebx
  call   <ps@plt>
  lea    D78(%rip),%rdi
  call   <puts@plt>
  lea    D22(%rip),%rdi
  call   <puts@plt>
  jmp    L50
  nopl   0x0(%rax)
L90:
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  js     L81
L62:
  xor    %edi,%edi
  add    $0x1,%ebx
  call   <exit@plt>
  cmp    $0x3e8,%ebx
  je     L162
L50:
  imul   $0xcccccccd,%ebx,%eax
  ror    %eax
  cmp    $0x19999999,%eax
  ja     L90
  mov    $0x2e,%edi
  call   <putchar@plt>
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  jns    L62
L81:
  lea    D117(%rip),%rdi
  call   <puts@plt>
  test   %ebx,%ebx
  je     L58
L162:
  lea    D121(%rip),%rbp
  jmp    L115
  nopl   0x0(%rax)
L166:
  xor    %edi,%edi
  call   <wait@plt>
  test   %eax,%eax
  js     L172
L179:
  sub    $0x1,%ebx
  je     L58
L115:
  imul   $0xcccccccd,%ebx,%eax
  ror    %eax
  cmp    $0x19999999,%eax
  ja     L166
  mov    $0x2d,%edi
  call   <putchar@plt>
  xor    %edi,%edi
  call   <wait@plt>
  test   %eax,%eax
  jns    L179
L172:
  mov    %rbp,%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  sub    $0x1,%ebx
  jne    L115
L58:
  xor    %edi,%edi
  call   <wait@plt>
  cmp    $0xffffffff,%eax
  jne    L196
L41:
  lea    D104(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <ps@plt>
  xor    %eax,%eax
L79:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L160
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L196:
  lea    D9(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L41
L218:
  lea    D46(%rip),%rdi
  call   <puts@plt>
  mov    $0x4,%edi
  call   <exit@plt>
  jmp    L97
L221:
  lea    D48(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%edi
  call   <exit@plt>
  jmp    L189
L10:
  lea    D73(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L168
L130:
  lea    D36(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%eax
  jmp    L79
L160:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D71
type_infered: string
name: disassemble_data
arguments: label: D89
type_infered: string
name: disassemble_data
arguments: label: D74
type_infered: string
name: disassemble_data
arguments: label: D78
type_infered: string
name: disassemble_data
arguments: label: D22
type_infered: string
name: disassemble_data
arguments: label: D117
type_infered: string
name: disassemble_data
arguments: label: D121
type_infered: string
name: disassemble_data
arguments: label: D104
type_infered: string
name: disassemble_data
arguments: label: D9
type_infered: string
name: disassemble_data
arguments: label: D46
type_infered: string
name: disassemble_data
arguments: label: D48
type_infered: string
name: disassemble_data
arguments: label: D73
type_infered: string
name: disassemble_data
arguments: label: D36
type_infered: string

tool: D71: 
We are in userland

tool: D89: Let's fork(), baby!

tool: D74: OK child %d exited with status: %d


tool: D78: Test OK


tool: D22: fork() stress test

tool: D117: fork returned -1

tool: D121: Wait exit early

tool: D104: Fork test OK

tool: D9: Wait got too many

tool: D46: wait too many

tool: D48: fork returned different exit status

tool: D73: fork returned different pid

tool: D36: I am the child

assistant: ```c
int main() {
  pid_t pid, wp;
  int status;
  printf("\nWe are in userland\n");
  printf("Let's fork(), baby!\n");
  pid = fork();
  if (pid == 0) {
    printf("I am the child\n");
    return 2;
  } else {
    wp = wait(&status);
    if (pid != wp) {
      printf("fork returned different pid\n");
      exit(1);
    }
    if (status != 2) {
      printf("fork returned different exit status\n");
      exit(2);
    }
    printf("OK child %d exited with status: %d\n", wp, status);
  }
  status = -1;
  wp = 0;
  wp = wait(&status);
  if (wp != -1) {
    printf("wait too many\n");
    exit(4);
  }
  ps();
  printf("Test OK\n\n");
  printf("fork() stress test\n");
  int i;
  for (i = 0; i < 1000; i++) {
    if (!(i % 10))
      printf(".");
    pid = fork();
    if (pid < 0) {
      printf("fork returned -1\n");
      break;
    } else {
      exit(0);
    }
  }
  for (; i > 0; i--) {
    if (!(i % 10))
      printf("-");
    if ((pid = wait(NULL)) < 0) {
      printf("Wait exit early\n");
      exit(0);
    }
  }
  if (wait(NULL) != -1) {
    printf("Wait got too many\n");
    exit(0);
  }
  printf("Fork test OK\n");
  ps();
}
```