#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 STDIN_FILENO;
int STDOUT_FILENO;
int /*<<< orphan*/ WIFEXITED(int);
int /*<<< orphan*/ close(int);
int dup2(int, int);
int /*<<< orphan*/ execl(char *, char *, char *, int /*<<< orphan*/ *);
int fork();
scalar_t__ pipe(int *);
int /*<<< orphan*/ setup_handler();
int /*<<< orphan*/ sys_error(char *, int);
int /*<<< orphan*/ waitpid(int, int *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  int pid[2];
  int fd[2];
  int status;
  enum { READ, WRITE };
  enum { childA, childB };
  setup_handler();
  if (pipe(fd) < 0)
    sys_error("pipe failed", 101);
  if ((pid[childA] = fork()) < 0)
    sys_error("fork failed", 111);
  if (pid[childA] == 0) {
    close(fd[READ]);
    if (fd[WRITE] != STDOUT_FILENO) {
      if (dup2(fd[WRITE], STDOUT_FILENO) != STDOUT_FILENO)
        sys_error("dup2 failed", 121);
    }
    close(fd[WRITE]);
    execl("/bin/cat", "cat", "/etc/inittab", NULL);
    sys_error("execl failed (should not reach this line) ", 128);
  }
  if ((pid[childB] = fork()) < 0)
    sys_error("fork failed", 140);
  if (pid[childB] == 0) {
    close(fd[WRITE]);
    if (fd[READ] != STDIN_FILENO) {
      if (dup2(fd[READ], STDIN_FILENO) != STDIN_FILENO)
        sys_error("dup2 failed", 148);
    }
    close(fd[READ]);
    execl("/usr/bin/wc", "wc", "-c", NULL);
    sys_error("execl failed (should not reach this line) ", 154);
  }
  close(fd[READ]);
  close(fd[WRITE]);
  waitpid(pid[childA], &status, 0);
  if (!WIFEXITED(status))
    sys_error("child process A terminated abnormally", 166);
  waitpid(pid[childB], &status, 0);
  if (!WIFEXITED(status))
    sys_error("child process B terminated abnormally", 170);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <setup_handler@plt>
lea    -0x20(%rbp),%rdi
call   1050 <pipe@plt>
cmp    $0x0,%rax
jge    11d1 <main+0x41>
lea    0xe39(%rip),%rdi
mov    $0x65,%esi
call   1070 <sys_error@plt>
mov    $0x0,%al
call   10b0 <fork@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jge    11f5 <main+0x65>
lea    0xe21(%rip),%rdi
mov    $0x6f,%esi
call   1070 <sys_error@plt>
cmpl   $0x0,-0x18(%rbp)
jne    1286 <main+0xf6>
mov    -0x20(%rbp),%edi
call   1040 <close@plt>
mov    -0x1c(%rbp),%eax
mov    0x2ddf(%rip),%rcx
cmp    (%rcx),%eax
je     124f <main+0xbf>
mov    -0x1c(%rbp),%edi
mov    0x2dcd(%rip),%rax
mov    (%rax),%esi
call   1030 <dup2@plt>
mov    0x2dbf(%rip),%rcx
cmp    (%rcx),%eax
je     124a <main+0xba>
lea    0xdd8(%rip),%rdi
mov    $0x79,%esi
call   1070 <sys_error@plt>
jmp    124f <main+0xbf>
mov    -0x1c(%rbp),%edi
call   1040 <close@plt>
lea    0xdc6(%rip),%rdi
lea    0xdc4(%rip),%rsi
lea    0xdc1(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   10a0 <execl@plt>
lea    0xdbe(%rip),%rdi
mov    $0x80,%esi
call   1070 <sys_error@plt>
mov    $0x0,%al
call   10b0 <fork@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    12aa <main+0x11a>
lea    0xd6c(%rip),%rdi
mov    $0x8c,%esi
call   1070 <sys_error@plt>
cmpl   $0x0,-0x14(%rbp)
jne    133b <main+0x1ab>
mov    -0x1c(%rbp),%edi
call   1040 <close@plt>
mov    -0x20(%rbp),%eax
mov    0x2d12(%rip),%rcx
cmp    (%rcx),%eax
je     1304 <main+0x174>
mov    -0x20(%rbp),%edi
mov    0x2d00(%rip),%rax
mov    (%rax),%esi
call   1030 <dup2@plt>
mov    0x2cf2(%rip),%rcx
cmp    (%rcx),%eax
je     12ff <main+0x16f>
lea    0xd23(%rip),%rdi
mov    $0x94,%esi
call   1070 <sys_error@plt>
jmp    1304 <main+0x174>
mov    -0x20(%rbp),%edi
call   1040 <close@plt>
lea    0xd52(%rip),%rdi
lea    0xd54(%rip),%rsi
lea    0xd50(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   10a0 <execl@plt>
lea    0xd09(%rip),%rdi
mov    $0x9a,%esi
call   1070 <sys_error@plt>
mov    -0x20(%rbp),%edi
call   1040 <close@plt>
mov    -0x1c(%rbp),%edi
call   1040 <close@plt>
mov    -0x18(%rbp),%edi
lea    -0x24(%rbp),%rsi
xor    %edx,%edx
call   1080 <waitpid@plt>
mov    -0x24(%rbp),%edi
call   1090 <WIFEXITED@plt>
cmp    $0x0,%eax
jne    137b <main+0x1eb>
lea    0xd03(%rip),%rdi
mov    $0xa6,%esi
call   1070 <sys_error@plt>
mov    -0x14(%rbp),%edi
lea    -0x24(%rbp),%rsi
xor    %edx,%edx
call   1080 <waitpid@plt>
mov    -0x24(%rbp),%edi
call   1090 <WIFEXITED@plt>
cmp    $0x0,%eax
jne    13ab <main+0x21b>
lea    0xcf9(%rip),%rdi
mov    $0xaa,%esi
call   1070 <sys_error@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1060 <setup_handler@plt>
lea    0x4(%rsp),%rdi
call   1050 <pipe@plt>
test   %rax,%rax
jns    11bf <main+0x2f>
lea    0xe4b(%rip),%rdi
mov    $0x65,%esi
call   1070 <sys_error@plt>
xor    %eax,%eax
call   10b0 <fork@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1237 <main+0xa7>
jne    1248 <main+0xb8>
mov    0x4(%rsp),%edi
call   1040 <close@plt>
mov    0x8(%rsp),%edi
mov    0x2e0e(%rip),%rbp
mov    0x0(%rbp),%esi
cmp    %esi,%edi
je     1204 <main+0x74>
call   1030 <dup2@plt>
cmp    0x0(%rbp),%eax
je     1204 <main+0x74>
lea    0xe1e(%rip),%rdi
mov    $0x79,%esi
call   1070 <sys_error@plt>
mov    0x8(%rsp),%edi
call   1040 <close@plt>
lea    0xe10(%rip),%rdi
lea    0xe0e(%rip),%rsi
lea    0xe0b(%rip),%rdx
xor    %ecx,%ecx
call   10a0 <execl@plt>
lea    0xe0a(%rip),%rdi
mov    $0x80,%esi
jmp    1243 <main+0xb3>
lea    0xdce(%rip),%rdi
mov    $0x6f,%esi
call   1070 <sys_error@plt>
xor    %eax,%eax
call   10b0 <fork@plt>
mov    %eax,%ebp
test   %eax,%eax
js     12c0 <main+0x130>
jne    12d1 <main+0x141>
mov    0x8(%rsp),%edi
call   1040 <close@plt>
mov    0x4(%rsp),%edi
mov    0x2d6d(%rip),%r14
mov    (%r14),%esi
cmp    %esi,%edi
je     128d <main+0xfd>
call   1030 <dup2@plt>
cmp    (%r14),%eax
je     128d <main+0xfd>
lea    0xd95(%rip),%rdi
mov    $0x94,%esi
call   1070 <sys_error@plt>
mov    0x4(%rsp),%edi
call   1040 <close@plt>
lea    0xdc8(%rip),%rdi
lea    0xdca(%rip),%rsi
lea    0xdc6(%rip),%rdx
xor    %ecx,%ecx
call   10a0 <execl@plt>
lea    0xd81(%rip),%rdi
mov    $0x9a,%esi
jmp    12cc <main+0x13c>
lea    0xd45(%rip),%rdi
mov    $0x8c,%esi
call   1070 <sys_error@plt>
mov    0x4(%rsp),%edi
call   1040 <close@plt>
mov    0x8(%rsp),%edi
call   1040 <close@plt>
lea    0xc(%rsp),%rsi
mov    %ebx,%edi
xor    %edx,%edx
call   1080 <waitpid@plt>
mov    0xc(%rsp),%edi
call   1090 <WIFEXITED@plt>
test   %eax,%eax
jne    130f <main+0x17f>
lea    0xd6f(%rip),%rdi
mov    $0xa6,%esi
call   1070 <sys_error@plt>
lea    0xc(%rsp),%rsi
mov    %ebp,%edi
xor    %edx,%edx
call   1080 <waitpid@plt>
mov    0xc(%rsp),%edi
call   1090 <WIFEXITED@plt>
test   %eax,%eax
jne    133b <main+0x1ab>
lea    0xd69(%rip),%rdi
mov    $0xaa,%esi
call   1070 <sys_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"pipe failed\00"
@.str.1 = [12 x i8] c"fork failed\00"
@STDOUT_FILENO = global i32 0
@.str.2 = [12 x i8] c"dup2 failed\00"
@.str.3 = [9 x i8] c"/bin/cat\00"
@.str.4 = [4 x i8] c"cat\00"
@.str.5 = [13 x i8] c"/etc/inittab\00"
@.str.6 = [43 x i8] c"execl failed (should not reach this line) \00"
@STDIN_FILENO = global i32 0
@.str.7 = [12 x i8] c"/usr/bin/wc\00"
@.str.8 = [3 x i8] c"wc\00"
@.str.9 = [3 x i8] c"-c\00"
@.str.10 = [38 x i8] c"child process A terminated abnormally\00"
@.str.11 = [38 x i8] c"child process B terminated abnormally\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i32]
%7 = alloca [2 x i32]
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (...) @setup_handler()
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%11 = call i64 @pipe(i32* %10)
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @sys_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 101)
br label %15
15: ; preds = %13, %2
%16 = call i32 (...) @fork()
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 %16, i32* %17
%18 = icmp slt i32 %16, 0
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 @sys_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 111)
br label %21
21: ; preds = %19, %15
%22 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%23 = load i32, i32* %22
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %49
25: ; preds = %21
%26 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%27 = load i32, i32* %26
%28 = call i32 @close(i32 %27)
%29 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%30 = load i32, i32* %29
%31 = load i32, i32* @STDOUT_FILENO
%32 = icmp ne i32 %30, %31
br i1 %32, label %33, label %43
33: ; preds = %25
%34 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%35 = load i32, i32* %34
%36 = load i32, i32* @STDOUT_FILENO
%37 = call i32 @dup2(i32 %35, i32 %36)
%38 = load i32, i32* @STDOUT_FILENO
%39 = icmp ne i32 %37, %38
br i1 %39, label %40, label %42
40: ; preds = %33
%41 = call i32 @sys_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 121)
br label %42
42: ; preds = %40, %33
br label %43
43: ; preds = %42, %25
%44 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%45 = load i32, i32* %44
%46 = call i32 @close(i32 %45)
%47 = call i32 @execl(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32* null)
%48 = call i32 @sys_error(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), i32 128)
br label %49
49: ; preds = %43, %21
%50 = call i32 (...) @fork()
%51 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
store i32 %50, i32* %51
%52 = icmp slt i32 %50, 0
br i1 %52, label %53, label %55
53: ; preds = %49
%54 = call i32 @sys_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 140)
br label %55
55: ; preds = %53, %49
%56 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%57 = load i32, i32* %56
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %83
59: ; preds = %55
%60 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%61 = load i32, i32* %60
%62 = call i32 @close(i32 %61)
%63 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%64 = load i32, i32* %63
%65 = load i32, i32* @STDIN_FILENO
%66 = icmp ne i32 %64, %65
br i1 %66, label %67, label %77
67: ; preds = %59
%68 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%69 = load i32, i32* %68
%70 = load i32, i32* @STDIN_FILENO
%71 = call i32 @dup2(i32 %69, i32 %70)
%72 = load i32, i32* @STDIN_FILENO
%73 = icmp ne i32 %71, %72
br i1 %73, label %74, label %76
74: ; preds = %67
%75 = call i32 @sys_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 148)
br label %76
76: ; preds = %74, %67
br label %77
77: ; preds = %76, %59
%78 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%79 = load i32, i32* %78
%80 = call i32 @close(i32 %79)
%81 = call i32 @execl(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32* null)
%82 = call i32 @sys_error(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), i32 154)
br label %83
83: ; preds = %77, %55
%84 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%85 = load i32, i32* %84
%86 = call i32 @close(i32 %85)
%87 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%88 = load i32, i32* %87
%89 = call i32 @close(i32 %88)
%90 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%91 = load i32, i32* %90
%92 = call i32 @waitpid(i32 %91, i32* %8, i32 0)
%93 = load i32, i32* %8
%94 = call i32 @WIFEXITED(i32 %93)
%95 = icmp ne i32 %94, 0
br i1 %95, label %98, label %96
96: ; preds = %83
%97 = call i32 @sys_error(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i32 166)
br label %98
98: ; preds = %96, %83
%99 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%100 = load i32, i32* %99
%101 = call i32 @waitpid(i32 %100, i32* %8, i32 0)
%102 = load i32, i32* %8
%103 = call i32 @WIFEXITED(i32 %102)
%104 = icmp ne i32 %103, 0
br i1 %104, label %107, label %105
105: ; preds = %98
%106 = call i32 @sys_error(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0), i32 170)
br label %107
107: ; preds = %105, %98
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"pipe failed\00"
@.str.1 = [12 x i8] c"fork failed\00"
@STDOUT_FILENO = global i32 0
@.str.2 = [12 x i8] c"dup2 failed\00"
@.str.3 = [9 x i8] c"/bin/cat\00"
@.str.4 = [4 x i8] c"cat\00"
@.str.5 = [13 x i8] c"/etc/inittab\00"
@.str.6 = [43 x i8] c"execl failed (should not reach this line) \00"
@STDIN_FILENO = global i32 0
@.str.7 = [12 x i8] c"/usr/bin/wc\00"
@.str.8 = [3 x i8] c"wc\00"
@.str.9 = [3 x i8] c"-c\00"
@.str.10 = [38 x i8] c"child process A terminated abnormally\00"
@.str.11 = [38 x i8] c"child process B terminated abnormally\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [2 x i32]
%4 = alloca i32
%5 = bitcast [2 x i32]* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = tail call i32 (...) @setup_handler()
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%9 = call i64 @pipe(i32* %8)
%10 = icmp slt i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @sys_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 101)
br label %13
13: ; preds = %11, %2
%14 = call i32 (...) @fork()
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @sys_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 111)
br label %38
18: ; preds = %13
%19 = icmp eq i32 %14, 0
br i1 %19, label %20, label %38
20: ; preds = %18
%21 = load i32, i32* %8
%22 = call i32 @close(i32 %21)
%23 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%24 = load i32, i32* %23
%25 = load i32, i32* @STDOUT_FILENO
%26 = icmp eq i32 %24, %25
br i1 %26, label %33, label %27
27: ; preds = %20
%28 = call i32 @dup2(i32 %24, i32 %25)
%29 = load i32, i32* @STDOUT_FILENO
%30 = icmp eq i32 %28, %29
br i1 %30, label %33, label %31
31: ; preds = %27
%32 = call i32 @sys_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 121)
br label %33
33: ; preds = %27, %31, %20
%34 = load i32, i32* %23
%35 = call i32 @close(i32 %34)
%36 = call i32 @execl(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32* null)
%37 = call i32 @sys_error(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), i32 128)
br label %38
38: ; preds = %16, %33, %18
%39 = call i32 (...) @fork()
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = call i32 @sys_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 140)
br label %63
43: ; preds = %38
%44 = icmp eq i32 %39, 0
br i1 %44, label %45, label %63
45: ; preds = %43
%46 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%47 = load i32, i32* %46
%48 = call i32 @close(i32 %47)
%49 = load i32, i32* %8
%50 = load i32, i32* @STDIN_FILENO
%51 = icmp eq i32 %49, %50
br i1 %51, label %58, label %52
52: ; preds = %45
%53 = call i32 @dup2(i32 %49, i32 %50)
%54 = load i32, i32* @STDIN_FILENO
%55 = icmp eq i32 %53, %54
br i1 %55, label %58, label %56
56: ; preds = %52
%57 = call i32 @sys_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 148)
br label %58
58: ; preds = %52, %56, %45
%59 = load i32, i32* %8
%60 = call i32 @close(i32 %59)
%61 = call i32 @execl(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32* null)
%62 = call i32 @sys_error(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), i32 154)
br label %63
63: ; preds = %41, %58, %43
%64 = load i32, i32* %8
%65 = call i32 @close(i32 %64)
%66 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%67 = load i32, i32* %66
%68 = call i32 @close(i32 %67)
%69 = call i32 @waitpid(i32 %14, i32* %4, i32 0)
%70 = load i32, i32* %4
%71 = call i32 @WIFEXITED(i32 %70)
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %63
%74 = call i32 @sys_error(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i32 166)
br label %75
75: ; preds = %73, %63
%76 = call i32 @waitpid(i32 %39, i32* %4, i32 0)
%77 = load i32, i32* %4
%78 = call i32 @WIFEXITED(i32 %77)
%79 = icmp eq i32 %78, 0
br i1 %79, label %80, label %82
80: ; preds = %75
%81 = call i32 @sys_error(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0), i32 170)
br label %82
82: ; preds = %80, %75
ret i32 0
}