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

```asm
<main>:
  endbr64
  push   %r15
  xor    %eax,%eax
  lea    D40(%rip),%r15
  push   %r14
  lea    D46(%rip),%r14
  push   %r13
  lea    D44(%rip),%r13
  push   %r12
  lea    D18(%rip),%r12
  push   %rbp
  lea    D57(%rip),%rbp
  push   %rbx
  lea    D10(%rip),%rbx
  sub    $0x8,%rsp
  call   <getpid@plt>
  mov    %r12,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getppid@plt>
  mov    %r14,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getuid@plt>
  mov    %rbx,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <geteuid@plt>
  mov    %r15,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getgid@plt>
  mov    %r13,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getegid@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  call   <fork@plt>
  test   %eax,%eax
  je     L15
L6:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L15:
  lea    D48(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <getpid@plt>
  mov    %r12,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getppid@plt>
  mov    %r14,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getuid@plt>
  mov    %rbx,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <geteuid@plt>
  mov    %r15,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getgid@plt>
  mov    %r13,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getegid@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L6
```

tool_calls: name: disassemble_data
arguments: data_label: D40
datatype: string
name: disassemble_data
arguments: data_label: D46
datatype: string
name: disassemble_data
arguments: data_label: D44
datatype: string
name: disassemble_data
arguments: data_label: D18
datatype: string
name: disassemble_data
arguments: data_label: D57
datatype: string
name: disassemble_data
arguments: data_label: D10
datatype: string
name: disassemble_data
arguments: data_label: D48
datatype: string

tool: D40: effective user id : %d


tool: D46: parent process id : %d


tool: D44: real group id     : %d


tool: D18: process id        : %d


tool: D57: effective group id: %d


tool: D10: real user id      : %d


tool: D48: ----------------child----------------

assistant: ```c
main() {
  int k;
  printf("process id        : %d\n", getpid());
  printf("parent process id : %d\n", getppid());
  printf("real user id      : %d\n", getuid());
  printf("effective user id : %d\n", geteuid());
  printf("real group id     : %d\n", getgid());
  printf("effective group id: %d\n", getegid());
  k = fork();
  if (k == 0) {
    printf("----------------child----------------\n");
    printf("process id        : %d\n", getpid());
    printf("parent process id : %d\n", getppid());
    printf("real user id      : %d\n", getuid());
    printf("effective user id : %d\n", geteuid());
    printf("real group id     : %d\n", getgid());
    printf("effective group id: %d\n", getegid());
  }
  printf("\n");
}
```