user: 这段汇编代码用C语言表示是什么样的：

```asm
<launchProcess>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,0x10(%rsp)
  mov    %rdx,0x18(%rsp)
  mov    %rcx,%rbp
  mov    %r8,%r14
  mov    %r9,%r13
  mov    0x60(%rsp),%r15
  mov    0x68(%rsp),%rbx
  mov    $0x0,%eax
  call   <fork@plt>
  mov    %rax,%r12
  test   %rax,%rax
  jne    L30
  test   %rbp,%rbp
  je     L81
  mov    %rbp,%rdi
  call   <chdir@plt>
  test   %rax,%rax
  js     L13
L81:
  cmpl   $0x0,(%rbx)
  jle    L36
  mov    $0x1,%eax
L90:
  mov    %eax,%ebp
  add    $0x1,%rax
  cmpl   $0x0,-0x4(%rbx,%rax,4)
  jg     L90
L48:
  test   %r15,%r15
  je     L104
  mov    0x4(%r15),%edx
  mov    0x4(%r13),%esi
  mov    %ebp,%r8d
  mov    %rbx,%rcx
  mov    (%r14),%edi
  call   <closeOtherFds@plt>
  mov    0x4(%r14),%edi
  call   <close@plt>
  mov    0x0(%r13),%edi
  call   <close@plt>
  mov    (%r15),%edi
  call   <close@plt>
  mov    $0x0,%edi
  call   <close@plt>
  mov    $0x0,%esi
  mov    (%r14),%edi
  call   <dup2@plt>
  mov    $0x1,%edi
  call   <close@plt>
  mov    0x4(%r13),%edi
  mov    $0x1,%esi
  call   <dup2@plt>
  mov    $0x2,%edi
  call   <close@plt>
  mov    0x4(%r15),%edi
L8:
  mov    $0x2,%esi
  call   <dup2@plt>
  test   %ebp,%ebp
  jle    L98
  mov    %ebp,%ebp
  mov    $0x0,%r13d
L10:
  lea    0x3(%r13),%esi
  mov    (%rbx,%r13,4),%edi
  call   <dup2@plt>
  add    $0x1,%r13
  cmp    %r13,%rbp
  jne    L10
L98:
  mov    0x18(%rsp),%rdx
  mov    0x10(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  call   <execve@plt>
  mov    $0x1,%edi
  call   <_exit@plt>
L30:
  mov    %r12,%rax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L13:
  mov    $0x7e,%edi
  call   <_exit@plt>
  jmp    L81
L36:
  mov    $0x0,%ebp
  jmp    L48
L104:
  mov    0x4(%r13),%esi
  mov    %ebp,%r8d
  mov    %rbx,%rcx
  mov    $0x0,%edx
  mov    (%r14),%edi
  call   <closeOtherFds@plt>
  mov    0x4(%r14),%edi
  call   <close@plt>
  mov    0x0(%r13),%edi
  call   <close@plt>
  mov    $0x0,%edi
  call   <close@plt>
  mov    $0x0,%esi
  mov    (%r14),%edi
  call   <dup2@plt>
  mov    $0x1,%edi
  call   <close@plt>
  mov    0x4(%r13),%edi
  mov    $0x1,%esi
  call   <dup2@plt>
  mov    $0x2,%edi
  call   <close@plt>
  mov    0x4(%r13),%edi
  jmp    L8
```

assistant: ```c
pid_t launchProcess(const char *path, char *const argv[], char *const envp[], const char *workdir, const int fd_in[2], const int fd_out[2], const int fd_err[2], const int dupFds[]) {
  pid_t pid;
  int mergeStderr = (fd_err ? 0 : 1);
  pid = fork();
  if (pid == 0) {
    int countFd = 0;
    int i;
    if (workdir) {
      if (chdir(workdir) < 0) {
        _exit(126);
      }
    }
    while (dupFds[countFd] > 0) {
      ++countFd;
    }
    closeOtherFds(fd_in[0], fd_out[1], fd_err ? fd_err[1] : 0, dupFds, countFd);
    close(fd_in[1]);
    close(fd_out[0]);
    if (!mergeStderr)
      close(fd_err[0]);
    close(0);
    dup2(fd_in[0], 0);
    close(1);
    dup2(fd_out[1], 1);
    close(2);
    dup2(mergeStderr ? fd_out[1] : fd_err[1], 2);
    for (i = 0; i < countFd; i++) {
      dup2(dupFds[i], 3 + i);
    }
    execve(path, argv, envp);
    _exit(1);
  }
  return pid;
}
```