#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ pm_system2_lp(char *, void (*)(int, void *), void *const,
                                 void (*)(int, void *), void *const, int *const,
                                 char *, char *, char const *const,
                                 int /*<<< orphan*/ *);
void pm_system2(void stdinFeeder(int, void *), void *const feederParm,
                void stdoutAccepter(int, void *), void *const accepterParm,
                const char *const shellCommand, int *const termStatusP) {
  pm_system2_lp("/bin/sh", stdinFeeder, feederParm, stdoutAccepter,
                accepterParm, termStatusP, "sh", "-c", shellCommand, NULL);
}


x86 assembly (clang, -O0):
<pm_system2>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x58,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x38(%rbp),%r9
mov    -0x30(%rbp),%rax
lea    0xeb0(%rip),%rdi
lea    0xeae(%rip),%r11
lea    0xeaa(%rip),%r10
xor    %ebx,%ebx
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
movq   $0x0,0x18(%rsp)
call   1030 <pm_system2_lp@plt>
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm_system2>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee1(%rip),%r10
lea    0xed7(%rip),%r11
lea    0xecb(%rip),%rdi
push   $0x0
push   %rax
push   %r10
push   %r11
call   1030 <pm_system2_lp@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/sh\00"
@.str.1 = [3 x i8] c"sh\00"
@.str.2 = [3 x i8] c"-c\00"
define void @pm_system2(void (i32, i8*)* %0, i8* %1, void (i32, i8*)* %2, i8* %3, i8* %4, i32* %5) {
%7 = alloca void (i32, i8*)*
%8 = alloca i8*
%9 = alloca void (i32, i8*)*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32*
store void (i32, i8*)* %0, void (i32, i8*)** %7
store i8* %1, i8** %8
store void (i32, i8*)* %2, void (i32, i8*)** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i32* %5, i32** %12
%13 = load void (i32, i8*)*, void (i32, i8*)** %7
%14 = load i8*, i8** %8
%15 = load void (i32, i8*)*, void (i32, i8*)** %9
%16 = load i8*, i8** %10
%17 = load i32*, i32** %12
%18 = load i8*, i8** %11
%19 = call i32 @pm_system2_lp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), void (i32, i8*)* %13, i8* %14, void (i32, i8*)* %15, i8* %16, i32* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %18, i32* null)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/sh\00"
@.str.1 = [3 x i8] c"sh\00"
@.str.2 = [3 x i8] c"-c\00"
define void @pm_system2(void (i32, i8*)* %0, i8* %1, void (i32, i8*)* %2, i8* %3, i8* %4, i32* %5) {
%7 = tail call i32 @pm_system2_lp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), void (i32, i8*)* %0, i8* %1, void (i32, i8*)* %2, i8* %3, i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %4, i32* null)
ret void
}