user: What is the c source code of the assembly code below:

```asm
<launchProcess>:
  endbr64
  push   %r15
  xor    %eax,%eax
  mov    %rdx,%r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %r8,%r13
  push   %r12
  push   %rbp
  mov    %r9,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x8(%rsp)
  mov    0x68(%rsp),%rbx
  mov    %rsi,0x10(%rsp)
  call   <fork@plt>
  mov    %rax,%r12
  test   %rax,%rax
  jne    L9
  test   %r14,%r14
  je     L99
  mov    %r14,%rdi
  call   <chdir@plt>
  test   %rax,%rax
  js     L51
L99:
  mov    (%rbx),%ecx
  test   %ecx,%ecx
  jle    L15
  mov    $0x1,%eax
  nopl   (%rax)
L93:
  mov    %eax,%r8d
  add    $0x1,%rax
  mov    -0x4(%rbx,%rax,4),%edx
  test   %edx,%edx
  jg     L93
L84:
  cmpq   $0x0,0x60(%rsp)
  mov    0x4(%rbp),%esi
  mov    0x0(%r13),%edi
  je     L19
  mov    0x60(%rsp),%rax
  mov    %rbx,%rcx
  mov    %r8d,0x1c(%rsp)
  mov    0x4(%rax),%edx
  call   <closeOtherFds@plt>
  mov    0x4(%r13),%edi
  call   <close@plt>
  mov    0x0(%rbp),%edi
  call   <close@plt>
  mov    0x60(%rsp),%rax
  mov    (%rax),%edi
  call   <close@plt>
  xor    %edi,%edi
  call   <close@plt>
  mov    0x0(%r13),%edi
  xor    %esi,%esi
  call   <dup2@plt>
  mov    $0x1,%edi
  call   <close@plt>
  mov    0x4(%rbp),%edi
  mov    $0x1,%esi
  call   <dup2@plt>
  mov    $0x2,%edi
  call   <close@plt>
  mov    0x60(%rsp),%rax
  mov    0x1c(%rsp),%r8d
  mov    0x4(%rax),%edi
L52:
  mov    $0x2,%esi
  mov    %r8d,0x1c(%rsp)
  xor    %r13d,%r13d
  call   <dup2@plt>
  movslq 0x1c(%rsp),%rbp
  test   %ebp,%ebp
  je     L46
  nopw   0x0(%rax,%rax,1)
L42:
  mov    (%rbx,%r13,4),%edi
  lea    0x3(%r13),%esi
  add    $0x1,%r13
  call   <dup2@plt>
  cmp    %r13,%rbp
  jne    L42
L46:
  mov    0x8(%rsp),%rdi
  mov    0x10(%rsp),%rsi
  mov    %r15,%rdx
  call   <execve@plt>
  mov    $0x1,%edi
  call   <_exit@plt>
L9:
  add    $0x28,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L51:
  mov    $0x7e,%edi
  call   <_exit@plt>
  jmp    L99
  nopw   0x0(%rax,%rax,1)
L15:
  xor    %r8d,%r8d
  jmp    L84
  nopl   0x0(%rax,%rax,1)
L19:
  mov    %rbx,%rcx
  xor    %edx,%edx
  mov    %r8d,0x1c(%rsp)
  call   <closeOtherFds@plt>
  mov    0x4(%r13),%edi
  call   <close@plt>
  mov    0x0(%rbp),%edi
  call   <close@plt>
  xor    %edi,%edi
  call   <close@plt>
  mov    0x0(%r13),%edi
  xor    %esi,%esi
  call   <dup2@plt>
  mov    $0x1,%edi
  call   <close@plt>
  mov    0x4(%rbp),%edi
  mov    $0x1,%esi
  call   <dup2@plt>
  mov    $0x2,%edi
  call   <close@plt>
  mov    0x4(%rbp),%edi
  mov    0x1c(%rsp),%r8d
  jmp    L52
```

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;
}
```