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

```asm
<main>:
  endbr64
  push   %r12
  lea    D94(%rip),%rdi
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <puts@plt>
  lea    D83(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  je     L153
  lea    0x4(%rsp),%r12
  mov    %rax,%rbx
  mov    %r12,%rdi
  call   <wait@plt>
  movslq %eax,%rbp
  cmp    %rbp,%rbx
  jne    L203
L21:
  cmpl   $0x2,0x4(%rsp)
  jne    L9
L183:
  mov    0x4(%rsp),%edx
  lea    D75(%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    L23
L22:
  xor    %eax,%eax
  xor    %ebx,%ebx
  call   <ps@plt>
  lea    D29(%rip),%rdi
  call   <puts@plt>
  lea    D127(%rip),%rdi
  call   <puts@plt>
  jmp    L135
  nopl   0x0(%rax)
L49:
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  js     L184
L148:
  xor    %edi,%edi
  add    $0x1,%ebx
  call   <exit@plt>
  cmp    $0x3e8,%ebx
  je     L39
L135:
  imul   $0xcccccccd,%ebx,%eax
  ror    %eax
  cmp    $0x19999999,%eax
  ja     L49
  mov    $0x2e,%edi
  call   <putchar@plt>
  xor    %eax,%eax
  call   <fork@plt>
  test   %rax,%rax
  jns    L148
L184:
  lea    D82(%rip),%rdi
  call   <puts@plt>
  test   %ebx,%ebx
  je     L12
L39:
  lea    D109(%rip),%rbp
  jmp    L106
  nopl   0x0(%rax)
L89:
  xor    %edi,%edi
  call   <wait@plt>
  test   %eax,%eax
  js     L191
L104:
  sub    $0x1,%ebx
  je     L12
L106:
  imul   $0xcccccccd,%ebx,%eax
  ror    %eax
  cmp    $0x19999999,%eax
  ja     L89
  mov    $0x2d,%edi
  call   <putchar@plt>
  xor    %edi,%edi
  call   <wait@plt>
  test   %eax,%eax
  jns    L104
L191:
  mov    %rbp,%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  sub    $0x1,%ebx
  jne    L106
L12:
  xor    %edi,%edi
  call   <wait@plt>
  cmp    $0xffffffff,%eax
  jne    L195
L154:
  lea    D123(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <ps@plt>
  xor    %eax,%eax
L40:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L121
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L195:
  lea    D19(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L154
L23:
  lea    D65(%rip),%rdi
  call   <puts@plt>
  mov    $0x4,%edi
  call   <exit@plt>
  jmp    L22
L9:
  lea    D8(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%edi
  call   <exit@plt>
  jmp    L183
L203:
  lea    D46(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L21
L153:
  lea    D92(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%eax
  jmp    L40
L121:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D94
type: string
name: extract_symbolic_data
arguments: data_tag: D83
type: string
name: extract_symbolic_data
arguments: data_tag: D75
type: string
name: extract_symbolic_data
arguments: data_tag: D29
type: string
name: extract_symbolic_data
arguments: data_tag: D127
type: string
name: extract_symbolic_data
arguments: data_tag: D82
type: string
name: extract_symbolic_data
arguments: data_tag: D109
type: string
name: extract_symbolic_data
arguments: data_tag: D123
type: string
name: extract_symbolic_data
arguments: data_tag: D19
type: string
name: extract_symbolic_data
arguments: data_tag: D65
type: string
name: extract_symbolic_data
arguments: data_tag: D8
type: string
name: extract_symbolic_data
arguments: data_tag: D46
type: string
name: extract_symbolic_data
arguments: data_tag: D92
type: string

tool: D94: 
We are in userland

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

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


tool: D29: Test OK


tool: D127: fork() stress test

tool: D82: fork returned -1

tool: D109: Wait exit early

tool: D123: Fork test OK

tool: D19: Wait got too many

tool: D65: wait too many

tool: D8: fork returned different exit status

tool: D46: fork returned different pid

tool: D92: 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();
}
```