#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_message(char *, char const *const);
int /*<<< orphan*/ pm_strfree(char const *const);
int /*<<< orphan*/ pm_system2_vp(char const *const, char const **const,
                                 void (*)(int, void *), void *const,
                                 void (*)(int, void *), void *const, int *);
char *pm_termStatusDesc(int);
void pm_system_vp(const char *const progName, const char **const argArray,
                  void stdinFeeder(int, void *), void *const feederParm,
                  void stdoutAccepter(int, void *), void *const accepterParm) {
  int termStatus;
  pm_system2_vp(progName, argArray, stdinFeeder, feederParm, stdoutAccepter,
                accepterParm, &termStatus);
  if (termStatus != 0) {
    const char *const msg = pm_termStatusDesc(termStatus);
    pm_message("%s", msg);
    pm_strfree(msg);
  }
}


x86 assembly (clang, -O0):
<pm_system_vp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
lea    -0x34(%rbp),%rax
mov    %rax,(%rsp)
call   1050 <pm_system2_vp@plt>
cmpl   $0x0,-0x34(%rbp)
je     11b4 <pm_system_vp+0x74>
mov    -0x34(%rbp),%edi
call   1030 <pm_termStatusDesc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rsi
lea    0xe5a(%rip),%rdi
call   1040 <pm_message@plt>
mov    -0x40(%rbp),%rdi
call   1060 <pm_strfree@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm_system_vp>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rax
mov    %rax,(%rsp)
call   1050 <pm_system2_vp@plt>
mov    0xc(%rsp),%edi
test   %edi,%edi
je     117a <pm_system_vp+0x3a>
call   1030 <pm_termStatusDesc@plt>
mov    %rax,%rbx
lea    0xe96(%rip),%rdi
mov    %rax,%rsi
call   1040 <pm_message@plt>
mov    %rbx,%rdi
call   1060 <pm_strfree@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @pm_system_vp(i8* %0, i8** %1, void (i32, i8*)* %2, i8* %3, void (i32, i8*)* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i8**
%9 = alloca void (i32, i8*)*
%10 = alloca i8*
%11 = alloca void (i32, i8*)*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
store i8* %0, i8** %7
store i8** %1, i8*** %8
store void (i32, i8*)* %2, void (i32, i8*)** %9
store i8* %3, i8** %10
store void (i32, i8*)* %4, void (i32, i8*)** %11
store i8* %5, i8** %12
%15 = load i8*, i8** %7
%16 = load i8**, i8*** %8
%17 = load void (i32, i8*)*, void (i32, i8*)** %9
%18 = load i8*, i8** %10
%19 = load void (i32, i8*)*, void (i32, i8*)** %11
%20 = load i8*, i8** %12
%21 = call i32 @pm_system2_vp(i8* %15, i8** %16, void (i32, i8*)* %17, i8* %18, void (i32, i8*)* %19, i8* %20, i32* %13)
%22 = load i32, i32* %13
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %31
24: ; preds = %6
%25 = load i32, i32* %13
%26 = call i8* @pm_termStatusDesc(i32 %25)
store i8* %26, i8** %14
%27 = load i8*, i8** %14
%28 = call i32 @pm_message(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %27)
%29 = load i8*, i8** %14
%30 = call i32 @pm_strfree(i8* %29)
br label %31
31: ; preds = %24, %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @pm_system_vp(i8* %0, i8** %1, void (i32, i8*)* %2, i8* %3, void (i32, i8*)* %4, i8* %5) {
%7 = alloca i32
%8 = bitcast i32* %7 to i8*
%9 = call i32 @pm_system2_vp(i8* %0, i8** %1, void (i32, i8*)* %2, i8* %3, void (i32, i8*)* %4, i8* %5, i32* %7)
%10 = load i32, i32* %7
%11 = icmp eq i32 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %6
%13 = call i8* @pm_termStatusDesc(i32 %10)
%14 = call i32 @pm_message(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = call i32 @pm_strfree(i8* %13)
br label %16
16: ; preds = %12, %6
ret void
}