#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 */
typedef int pid_t;

/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ F_OK;
int STDIN_FILENO;
int WEXITSTATUS(int);
scalar_t__ WIFEXITED(int);
int /*<<< orphan*/ _exit(int);
int access(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ dup(int);
int /*<<< orphan*/ execvp(char *, char **);
int fork();
char *malloc(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ pipe(int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strlen(char const *);
int waitpid(int, int *, int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    printf("Usage: %s cmd [args...]\n", argv[0]);
    _exit(1);
  }
  int fd[2];
  pipe(fd);
  pid_t pid = fork();
  if (pid == -1) {
    perror("fork");
  } else if (pid == 0) {
    char *args[] = {NULL};
    close(fd[1]);
    close(STDIN_FILENO);
    dup(fd[0]);
    execvp("/bin/bash", args);
  } else {
    close(fd[0]);
    const char *initsh = "/home/abstruse/init.sh";
    if (access(initsh, F_OK) != -1) {
      const char *initrc = "source /home/abstruse/init.sh\n";
      write(fd[1], initrc, strlen(initrc));
    }
    int i;
    char *cmdstring = NULL;
    cmdstring = malloc(1024);
    cmdstring[0] = '\0';
    for (i = 1; i < argc; i++) {
      strcat(cmdstring, argv[i]);
      if (argc > i + 1) {
        strcat(cmdstring, " ");
      }
    }
    write(fd[1], cmdstring, strlen(cmdstring));
    close(fd[1]);
    int status;
    if (waitpid(pid, &status, 0) == -1) {
      perror("waitpid failed");
      return EXIT_FAILURE;
    }
    if (WIFEXITED(status)) {
      const int code = WEXITSTATUS(status);
      if (code == 0) {
        printf("\n[success]: 0\n");
      } else {
        printf("\n[error]: %d\n", code);
      }
      return code;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    124f <main+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdc2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>
lea    -0x18(%rbp),%rdi
call   10a0 <pipe@plt>
mov    $0x0,%al
call   1130 <fork@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    127d <main+0x6d>
lea    0xda6(%rip),%rdi
call   10f0 <perror@plt>
jmp    1462 <main+0x252>
cmpl   $0x0,-0x1c(%rbp)
jne    12ca <main+0xba>
lea    -0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1080 <memset@plt>
mov    -0x14(%rbp),%edi
call   1090 <close@plt>
mov    0x2d32(%rip),%rax
mov    (%rax),%edi
call   1090 <close@plt>
mov    -0x18(%rbp),%edi
call   1070 <dup@plt>
lea    -0x28(%rbp),%rsi
lea    0xd5e(%rip),%rdi
call   1100 <execvp@plt>
jmp    145d <main+0x24d>
mov    -0x18(%rbp),%edi
call   1090 <close@plt>
lea    0xd4f(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    0x2ce0(%rip),%rax
mov    (%rax),%esi
call   10e0 <access@plt>
cmp    $0xffffffff,%eax
je     1328 <main+0x118>
lea    0xd40(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x5c(%rbp),%edi
mov    -0x58(%rbp),%rsi
mov    %eax,%edx
call   1040 <write@plt>
movq   $0x0,-0x48(%rbp)
mov    $0x400,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13a1 <main+0x191>
mov    -0x48(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1110 <strcat@plt>
mov    -0x8(%rbp),%eax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jle    138e <main+0x17e>
mov    -0x48(%rbp),%rdi
lea    0xcd5(%rip),%rsi
call   1110 <strcat@plt>
jmp    1393 <main+0x183>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    134c <main+0x13c>
mov    -0x14(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x48(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x6c(%rbp),%edi
mov    -0x68(%rbp),%rsi
mov    %eax,%edx
call   1040 <write@plt>
mov    -0x14(%rbp),%edi
call   1090 <close@plt>
mov    -0x1c(%rbp),%edi
lea    -0x4c(%rbp),%rsi
xor    %edx,%edx
call   10d0 <waitpid@plt>
cmp    $0xffffffff,%eax
jne    1402 <main+0x1f2>
lea    0xc74(%rip),%rdi
call   10f0 <perror@plt>
mov    0x2be8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1462 <main+0x252>
mov    -0x4c(%rbp),%edi
call   1120 <WIFEXITED@plt>
cmp    $0x0,%rax
je     1458 <main+0x248>
mov    -0x4c(%rbp),%edi
call   10c0 <WEXITSTATUS@plt>
mov    %eax,-0x50(%rbp)
cmpl   $0x0,-0x50(%rbp)
jne    143c <main+0x22c>
lea    0xc3f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    144d <main+0x23d>
mov    -0x50(%rbp),%esi
lea    0xc38(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x50(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1462 <main+0x252>
jmp    145d <main+0x24d>
jmp    1462 <main+0x252>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r13
cmp    $0x1,%edi
jle    13e1 <main+0x1d1>
mov    %edi,%r12d
mov    %rsp,%rdi
call   10a0 <pipe@plt>
xor    %r15d,%r15d
xor    %eax,%eax
call   1130 <fork@plt>
test   %eax,%eax
je     12f1 <main+0xe1>
cmp    $0xffffffff,%eax
je     13a8 <main+0x198>
mov    %eax,0x14(%rsp)
mov    (%rsp),%edi
call   1090 <close@plt>
mov    0x2d65(%rip),%rax
mov    (%rax),%esi
lea    0xdbc(%rip),%rdi
call   10e0 <access@plt>
cmp    $0xffffffff,%eax
je     1295 <main+0x85>
mov    0x4(%rsp),%ebp
lea    0xdbe(%rip),%r15
mov    %r15,%rdi
call   1060 <strlen@plt>
mov    %ebp,%edi
mov    %r15,%rsi
mov    %eax,%edx
call   1050 <write@plt>
mov    $0x400,%edi
call   10b0 <malloc@plt>
mov    %rax,%rbp
movb   $0x0,(%rax)
mov    %r12d,%r12d
mov    $0x1,%ebx
sub    %r12,%rbx
mov    $0x2,%r14d
lea    0xda1(%rip),%r15
jmp    12d2 <main+0xc2>
nop
lea    (%rbx,%r14,1),%rax
add    $0x1,%rax
add    $0x1,%r14
cmp    $0x2,%rax
je     132f <main+0x11f>
mov    -0x8(%r13,%r14,8),%rsi
mov    %rbp,%rdi
call   1110 <strcat@plt>
cmp    %r12,%r14
jae    12c0 <main+0xb0>
mov    %rbp,%rdi
mov    %r15,%rsi
call   1110 <strcat@plt>
jmp    12c0 <main+0xb0>
movq   $0x0,0x8(%rsp)
mov    0x4(%rsp),%edi
call   1090 <close@plt>
mov    0x2cce(%rip),%rax
mov    (%rax),%edi
call   1090 <close@plt>
mov    (%rsp),%edi
call   1080 <dup@plt>
lea    0xcfe(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1100 <execvp@plt>
jmp    13cf <main+0x1bf>
mov    0x4(%rsp),%ebx
mov    %rbp,%rdi
call   1060 <strlen@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %eax,%edx
call   1050 <write@plt>
mov    0x4(%rsp),%edi
call   1090 <close@plt>
lea    0x8(%rsp),%rsi
xor    %r15d,%r15d
mov    0x14(%rsp),%edi
xor    %edx,%edx
call   10d0 <waitpid@plt>
cmp    $0xffffffff,%eax
je     13b9 <main+0x1a9>
mov    0x8(%rsp),%edi
call   1120 <WIFEXITED@plt>
test   %rax,%rax
je     13cf <main+0x1bf>
mov    0x8(%rsp),%edi
call   10c0 <WEXITSTATUS@plt>
test   %eax,%eax
je     139a <main+0x18a>
mov    %eax,%ebx
lea    0xce3(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %ebx,%r15d
jmp    13cf <main+0x1bf>
lea    0xcdc(%rip),%rdi
call   1040 <puts@plt>
jmp    13cf <main+0x1bf>
lea    0xc6a(%rip),%rdi
call   10f0 <perror@plt>
xor    %r15d,%r15d
jmp    13cf <main+0x1bf>
lea    0xca0(%rip),%rdi
call   10f0 <perror@plt>
mov    0x2c14(%rip),%rax
mov    (%rax),%r15d
mov    %r15d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x0(%r13),%rsi
lea    0xc14(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Usage: %s cmd [args...]\0A\00"
@.str.1 = [5 x i8] c"fork\00"
@STDIN_FILENO = global i32 0
@.str.2 = [10 x i8] c"/bin/bash\00"
@.str.3 = [23 x i8] c"/home/abstruse/init.sh\00"
@F_OK = global i32 0
@.str.4 = [31 x i8] c"source /home/abstruse/init.sh\0A\00"
@.str.5 = [2 x i8] c" \00"
@.str.6 = [15 x i8] c"waitpid failed\00"
@EXIT_FAILURE = global i32 0
@.str.7 = [15 x i8] c"\0A[success]: 0\0A\00"
@.str.8 = [14 x i8] c"\0A[error]: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i32]
%7 = alloca i32
%8 = alloca [1 x i8*]
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 2
br i1 %16, label %17, label %23
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = call i32 @_exit(i32 1)
unreachable
23: ; preds = %2
%24 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%25 = call i32 @pipe(i32* %24)
%26 = call i32 (...) @fork()
store i32 %26, i32* %7
%27 = load i32, i32* %7
%28 = icmp eq i32 %27, -1
br i1 %28, label %29, label %31
29: ; preds = %23
%30 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %122
31: ; preds = %23
%32 = load i32, i32* %7
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %46
34: ; preds = %31
%35 = bitcast [1 x i8*]* %8 to i8*
%36 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%37 = load i32, i32* %36
%38 = call i32 @close(i32 %37)
%39 = load i32, i32* @STDIN_FILENO
%40 = call i32 @close(i32 %39)
%41 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%42 = load i32, i32* %41
%43 = call i32 @dup(i32 %42)
%44 = getelementptr inbounds [1 x i8*], [1 x i8*]* %8, i64 0, i64 0
%45 = call i32 @execvp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %44)
br label %121
46: ; preds = %31
%47 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%48 = load i32, i32* %47
%49 = call i32 @close(i32 %48)
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i8** %9
%50 = load i8*, i8** %9
%51 = load i32, i32* @F_OK
%52 = call i32 @access(i8* %50, i32 %51)
%53 = icmp ne i32 %52, -1
br i1 %53, label %54, label %61
54: ; preds = %46
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8** %10
%55 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%56 = load i32, i32* %55
%57 = load i8*, i8** %10
%58 = load i8*, i8** %10
%59 = call i32 @strlen(i8* %58)
%60 = call i32 @write(i32 %56, i8* %57, i32 %59)
br label %61
61: ; preds = %54, %46
store i8* null, i8** %12
%62 = call i8* @malloc(i32 1024)
store i8* %62, i8** %12
%63 = load i8*, i8** %12
%64 = getelementptr inbounds i8, i8* %63, i64 0
store i8 0, i8* %64
store i32 1, i32* %11
br label %65
65: ; preds = %85, %61
%66 = load i32, i32* %11
%67 = load i32, i32* %4
%68 = icmp slt i32 %66, %67
br i1 %68, label %69, label %88
69: ; preds = %65
%70 = load i8*, i8** %12
%71 = load i8**, i8*** %5
%72 = load i32, i32* %11
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8*, i8** %71, i64 %73
%75 = load i8*, i8** %74
%76 = call i32 @strcat(i8* %70, i8* %75)
%77 = load i32, i32* %4
%78 = load i32, i32* %11
%79 = add nsw i32 %78, 1
%80 = icmp sgt i32 %77, %79
br i1 %80, label %81, label %84
81: ; preds = %69
%82 = load i8*, i8** %12
%83 = call i32 @strcat(i8* %82, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %84
84: ; preds = %81, %69
br label %85
85: ; preds = %84
%86 = load i32, i32* %11
%87 = add nsw i32 %86, 1
store i32 %87, i32* %11
br label %65
88: ; preds = %65
%89 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%90 = load i32, i32* %89
%91 = load i8*, i8** %12
%92 = load i8*, i8** %12
%93 = call i32 @strlen(i8* %92)
%94 = call i32 @write(i32 %90, i8* %91, i32 %93)
%95 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%96 = load i32, i32* %95
%97 = call i32 @close(i32 %96)
%98 = load i32, i32* %7
%99 = call i32 @waitpid(i32 %98, i32* %13, i32 0)
%100 = icmp eq i32 %99, -1
br i1 %100, label %101, label %104
101: ; preds = %88
%102 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%103 = load i32, i32* @EXIT_FAILURE
store i32 %103, i32* %3
br label %122
104: ; preds = %88
%105 = load i32, i32* %13
%106 = call i64 @WIFEXITED(i32 %105)
%107 = icmp ne i64 %106, 0
br i1 %107, label %108, label %120
108: ; preds = %104
%109 = load i32, i32* %13
%110 = call i32 @WEXITSTATUS(i32 %109)
store i32 %110, i32* %14
%111 = load i32, i32* %14
%112 = icmp eq i32 %111, 0
br i1 %112, label %113, label %115
113: ; preds = %108
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
br label %118
115: ; preds = %108
%116 = load i32, i32* %14
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %116)
br label %118
118: ; preds = %115, %113
%119 = load i32, i32* %14
store i32 %119, i32* %3
br label %122
120: ; preds = %104
br label %121
121: ; preds = %120, %34
br label %122
122: ; preds = %101, %118, %121, %29
%123 = load i32, i32* %3
ret i32 %123
}

LLVM IR (-O2):
@.str = [25 x i8] c"Usage: %s cmd [args...]\0A\00"
@.str.1 = [5 x i8] c"fork\00"
@STDIN_FILENO = global i32 0
@.str.2 = [10 x i8] c"/bin/bash\00"
@.str.3 = [23 x i8] c"/home/abstruse/init.sh\00"
@F_OK = global i32 0
@.str.4 = [31 x i8] c"source /home/abstruse/init.sh\0A\00"
@.str.5 = [2 x i8] c" \00"
@.str.6 = [15 x i8] c"waitpid failed\00"
@EXIT_FAILURE = global i32 0
@.str.8 = [14 x i8] c"\0A[error]: %d\0A\00"
@str = [14 x i8] c"\0A[success]: 0\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [2 x i32]
%4 = alloca [1 x i8*]
%5 = alloca i32
%6 = icmp slt i32 %0, 2
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8*, i8** %1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = tail call i32 @_exit(i32 1)
unreachable
11: ; preds = %2
%12 = bitcast [2 x i32]* %3 to i8*
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%14 = call i32 @pipe(i32* %13)
%15 = call i32 (...) @fork()
switch i32 %15, label %30 [
i32 -1, label %16
i32 0, label %18
]
16: ; preds = %11
%17 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %83
18: ; preds = %11
%19 = bitcast [1 x i8*]* %4 to i8*
%20 = bitcast [1 x i8*]* %4 to i64*
store i64 0, i64* %20
%21 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%22 = load i32, i32* %21
%23 = call i32 @close(i32 %22)
%24 = load i32, i32* @STDIN_FILENO
%25 = call i32 @close(i32 %24)
%26 = load i32, i32* %13
%27 = call i32 @dup(i32 %26)
%28 = getelementptr inbounds [1 x i8*], [1 x i8*]* %4, i64 0, i64 0
%29 = call i32 @execvp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %28)
br label %83
30: ; preds = %11
%31 = load i32, i32* %13
%32 = call i32 @close(i32 %31)
%33 = load i32, i32* @F_OK
%34 = call i32 @access(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %33)
%35 = icmp eq i32 %34, -1
br i1 %35, label %41, label %36
36: ; preds = %30
%37 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%38 = load i32, i32* %37
%39 = call i32 @strlen(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%40 = call i32 @write(i32 %38, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i32 %39)
br label %41
41: ; preds = %30, %36
%42 = call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
store i8 0, i8* %42
%43 = zext i32 %0 to i64
%44 = zext i32 %0 to i64
br label %45
45: ; preds = %41, %54
%46 = phi i64 [ 1, %41 ], [ %50, %54 ]
%47 = getelementptr inbounds i8*, i8** %1, i64 %46
%48 = load i8*, i8** %47
%49 = call i32 @strcat(i8* %42, i8* %48)
%50 = add nuw nsw i64 %46, 1
%51 = icmp ult i64 %50, %43
br i1 %51, label %52, label %54
52: ; preds = %45
%53 = call i32 @strcat(i8* %42, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %54
54: ; preds = %45, %52
%55 = icmp eq i64 %50, %44
br i1 %55, label %56, label %45
56: ; preds = %54
%57 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%58 = load i32, i32* %57
%59 = call i32 @strlen(i8* %42)
%60 = call i32 @write(i32 %58, i8* %42, i32 %59)
%61 = load i32, i32* %57
%62 = call i32 @close(i32 %61)
%63 = bitcast i32* %5 to i8*
%64 = call i32 @waitpid(i32 %15, i32* %5, i32 0)
%65 = icmp eq i32 %64, -1
br i1 %65, label %66, label %69
66: ; preds = %56
%67 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%68 = load i32, i32* @EXIT_FAILURE
br label %81
69: ; preds = %56
%70 = load i32, i32* %5
%71 = call i64 @WIFEXITED(i32 %70)
%72 = icmp eq i64 %71, 0
br i1 %72, label %81, label %73
73: ; preds = %69
%74 = load i32, i32* %5
%75 = call i32 @WEXITSTATUS(i32 %74)
%76 = icmp eq i32 %75, 0
br i1 %76, label %77, label %79
77: ; preds = %73
%78 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
br label %81
79: ; preds = %73
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %75)
br label %81
81: ; preds = %69, %77, %79, %66
%82 = phi i32 [ %68, %66 ], [ %75, %79 ], [ 0, %77 ], [ 0, %69 ]
br label %83
83: ; preds = %81, %16, %18
%84 = phi i32 [ 0, %16 ], [ 0, %18 ], [ %82, %81 ]
ret i32 %84
}