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

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int WEXITSTATUS(int);
int /*<<< orphan*/ WIFEXITED(int);
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ execve(char *, char *const *, char *const *);
int /*<<< orphan*/ fileno(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
scalar_t__ geteuid();
int getpid();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int vfork();
int waitpid(int, int *, int /*<<< orphan*/);
int write(int /*<<< orphan*/, int *, int);
int main(int argc, const char *argv[]) {
  if (geteuid() != 0) {
    fprintf(stderr, "error: must be root user to run this tool\n");
    return EXIT_FAILURE;
  }
  if (argc != 2) {
    fprintf(stderr, "error: incorrect argc (%d)\n", argc);
    return EXIT_FAILURE;
  }
  char *gdiff = (char *)argv[1];
  pid_t pid = getpid();
  ssize_t count = write(fileno(stdout), &pid, sizeof(pid));
  if (count == -1) {
    perror("error: (write)");
    return EXIT_FAILURE;
  } else if (count != sizeof(pid)) {
    fprintf(stderr, "error: write of %ld bytes failed (wrote %lud)\n",
            sizeof(pid), count);
    return EXIT_FAILURE;
  }
  pid_t child = vfork();
  if (child == -1)
    perror("error: (vfork)");
  else if (child == 0) {
    char *const args[] = {"/usr/bin/ditto", gdiff, "/usr/local/bin/gdiff",
                          NULL};
    char *const env[] = {NULL};
    execve("/usr/bin/ditto", args, env);
    perror("error: (execve)");
    _exit(EXIT_FAILURE);
  } else {
    int status;
    if (waitpid(child, &status, 0) == -1)
      perror("error: (waitpid)");
    else if (!WIFEXITED(status))
      fprintf(stderr, "error: ditto did not exit normally (status %d)", status);
    else {
      status = WEXITSTATUS(status);
      if (status != EXIT_SUCCESS)
        fprintf(stderr, "error: ditto exited with non-zero exit status (%d)\n",
                status);
      return status;
    }
  }
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <geteuid@plt>
cmp    $0x0,%rax
je     121f <main+0x4f>
mov    0x2de2(%rip),%rax
mov    (%rax),%edi
lea    0xdf9(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2dc3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    143b <main+0x26b>
cmpl   $0x2,-0x8(%rbp)
je     1254 <main+0x84>
mov    0x2db0(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xdef(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2d8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    143b <main+0x26b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1050 <getpid@plt>
mov    %eax,-0x1c(%rbp)
mov    0x2d5f(%rip),%rax
mov    (%rax),%edi
call   10a0 <fileno@plt>
mov    %eax,%edi
lea    -0x1c(%rbp),%rsi
mov    $0x4,%edx
call   1040 <write@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0xffffffff,-0x20(%rbp)
jne    12b2 <main+0xe2>
lea    0xdab(%rip),%rdi
call   10d0 <perror@plt>
mov    0x2d30(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    143b <main+0x26b>
movslq -0x20(%rbp),%rax
cmp    $0x4,%rax
je     12f0 <main+0x120>
mov    0x2d19(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%ecx
lea    0xd83(%rip),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2cf2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    143b <main+0x26b>
jmp    12f5 <main+0x125>
call   10e0 <vfork@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xffffffff,-0x24(%rbp)
jne    1318 <main+0x148>
lea    0xd77(%rip),%rdi
call   10d0 <perror@plt>
jmp    142f <main+0x25f>
cmpl   $0x0,-0x24(%rbp)
jne    1386 <main+0x1b6>
lea    0xd6b(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    0xd67(%rip),%rax
mov    %rax,-0x40(%rbp)
movq   $0x0,-0x38(%rbp)
lea    -0x58(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1060 <memset@plt>
lea    -0x50(%rbp),%rsi
lea    -0x58(%rbp),%rdx
lea    0xd2d(%rip),%rdi
call   1080 <execve@plt>
lea    0xd45(%rip),%rdi
call   10d0 <perror@plt>
mov    0x2c59(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>
mov    -0x24(%rbp),%edi
lea    -0x5c(%rbp),%rsi
xor    %edx,%edx
call   10c0 <waitpid@plt>
cmp    $0xffffffff,%eax
jne    13ae <main+0x1de>
lea    0xd24(%rip),%rdi
call   10d0 <perror@plt>
jmp    1425 <main+0x255>
mov    -0x5c(%rbp),%edi
call   10f0 <WIFEXITED@plt>
cmp    $0x0,%eax
jne    13de <main+0x20e>
mov    0x2c1a(%rip),%rax
mov    (%rax),%edi
mov    -0x5c(%rbp),%edx
lea    0xd07(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1420 <main+0x250>
mov    -0x5c(%rbp),%edi
call   10b0 <WEXITSTATUS@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    0x2bd5(%rip),%rcx
cmp    (%rcx),%eax
je     1415 <main+0x245>
mov    0x2bde(%rip),%rax
mov    (%rax),%edi
mov    -0x5c(%rbp),%edx
lea    0xcfa(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x5c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    143b <main+0x26b>
jmp    1425 <main+0x255>
jmp    142a <main+0x25a>
jmp    142f <main+0x25f>
mov    0x2ba2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r14
mov    %edi,%ebx
xor    %eax,%eax
call   1060 <geteuid@plt>
test   %rax,%rax
je     11f1 <main+0x31>
mov    0x2e01(%rip),%rax
mov    (%rax),%edi
lea    0xe18(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    126b <main+0xab>
cmp    $0x2,%ebx
jne    1252 <main+0x92>
mov    0x8(%r14),%rbx
xor    %eax,%eax
call   1050 <getpid@plt>
mov    %eax,0xc(%rsp)
mov    0x2dc4(%rip),%rax
mov    (%rax),%edi
call   1090 <fileno@plt>
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
mov    %eax,%edi
call   1040 <write@plt>
cmp    $0x4,%eax
je     127c <main+0xbc>
cmp    $0xffffffff,%eax
je     130a <main+0x14a>
mov    %eax,%ecx
mov    0x2da5(%rip),%rax
mov    (%rax),%edi
lea    0xe12(%rip),%rsi
xor    %eax,%eax
mov    $0x4,%edx
call   1080 <fprintf@plt>
jmp    126b <main+0xab>
mov    0x2d87(%rip),%rax
mov    (%rax),%edi
lea    0xdc9(%rip),%rsi
xor    %eax,%eax
mov    %ebx,%edx
call   1080 <fprintf@plt>
mov    0x2d66(%rip),%rax
mov    (%rax),%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret
call   10d0 <vfork@plt>
cmp    $0xffffffff,%eax
je     131b <main+0x15b>
test   %eax,%eax
je     133d <main+0x17d>
mov    %eax,%edi
lea    0x10(%rsp),%rsi
xor    %edx,%edx
call   10b0 <waitpid@plt>
cmp    $0xffffffff,%eax
je     132c <main+0x16c>
mov    0x10(%rsp),%edi
call   10e0 <WIFEXITED@plt>
test   %eax,%eax
je     12ef <main+0x12f>
mov    0x10(%rsp),%edi
call   10a0 <WEXITSTATUS@plt>
mov    %eax,0x10(%rsp)
mov    %eax,%edx
mov    0x2cfc(%rip),%rcx
cmp    (%rcx),%eax
je     12eb <main+0x12b>
mov    0x2d09(%rip),%rax
mov    (%rax),%edi
lea    0xe28(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x10(%rsp),%edx
mov    %edx,%eax
jmp    1274 <main+0xb4>
mov    0x2cea(%rip),%rax
mov    (%rax),%edi
mov    0x10(%rsp),%edx
lea    0xdd6(%rip),%rsi
xor    %eax,%eax
jmp    1266 <main+0xa6>
lea    0xd36(%rip),%rdi
call   10c0 <perror@plt>
jmp    126b <main+0xab>
lea    0xd63(%rip),%rdi
call   10c0 <perror@plt>
jmp    126b <main+0xab>
lea    0xd95(%rip),%rdi
call   10c0 <perror@plt>
jmp    126b <main+0xab>
lea    0xd50(%rip),%rdi
mov    %rdi,0x10(%rsp)
mov    %rbx,0x18(%rsp)
lea    0xd4e(%rip),%rax
mov    %rax,0x20(%rsp)
movq   $0x0,0x28(%rsp)
movq   $0x0,0x30(%rsp)
lea    0x10(%rsp),%rsi
lea    0x30(%rsp),%rdx
call   1070 <execve@plt>
lea    0xd36(%rip),%rdi
call   10c0 <perror@plt>
mov    0x2c4a(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"error: must be root user to run this tool\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [28 x i8] c"error: incorrect argc (%d)\0A\00"
@stdout = global i32 0
@.str.2 = [15 x i8] c"error: (write)\00"
@.str.3 = [47 x i8] c"error: write of %ld bytes failed (wrote %lud)\0A\00"
@.str.4 = [15 x i8] c"error: (vfork)\00"
@.str.5 = [15 x i8] c"/usr/bin/ditto\00"
@.str.6 = [21 x i8] c"/usr/local/bin/gdiff\00"
@.str.7 = [16 x i8] c"error: (execve)\00"
@.str.8 = [17 x i8] c"error: (waitpid)\00"
@.str.9 = [47 x i8] c"error: ditto did not exit normally (status %d)\00"
@EXIT_SUCCESS = global i32 0
@.str.10 = [52 x i8] c"error: ditto exited with non-zero exit status (%d)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [4 x i8*]
%11 = alloca [1 x i8*]
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = call i64 (...) @geteuid()
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %2
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%18 = load i32, i32* @EXIT_FAILURE
store i32 %18, i32* %3
br label %103
19: ; preds = %2
%20 = load i32, i32* %4
%21 = icmp ne i32 %20, 2
br i1 %21, label %22, label %27
22: ; preds = %19
%23 = load i32, i32* @stderr
%24 = load i32, i32* %4
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = load i32, i32* @EXIT_FAILURE
store i32 %26, i32* %3
br label %103
27: ; preds = %19
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
store i8* %30, i8** %6
%31 = call i32 (...) @getpid()
store i32 %31, i32* %7
%32 = load i32, i32* @stdout
%33 = call i32 @fileno(i32 %32)
%34 = call i32 @write(i32 %33, i32* %7, i32 4)
store i32 %34, i32* %8
%35 = load i32, i32* %8
%36 = icmp eq i32 %35, -1
br i1 %36, label %37, label %40
37: ; preds = %27
%38 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%39 = load i32, i32* @EXIT_FAILURE
store i32 %39, i32* %3
br label %103
40: ; preds = %27
%41 = load i32, i32* %8
%42 = sext i32 %41 to i64
%43 = icmp ne i64 %42, 4
br i1 %43, label %44, label %49
44: ; preds = %40
%45 = load i32, i32* @stderr
%46 = load i32, i32* %8
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i64 4, i32 %46)
%48 = load i32, i32* @EXIT_FAILURE
store i32 %48, i32* %3
br label %103
49: ; preds = %40
br label %50
50: ; preds = %49
%51 = call i32 @vfork()
store i32 %51, i32* %9
%52 = load i32, i32* %9
%53 = icmp eq i32 %52, -1
br i1 %53, label %54, label %56
54: ; preds = %50
%55 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %101
56: ; preds = %50
%57 = load i32, i32* %9
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %72
59: ; preds = %56
%60 = getelementptr inbounds [4 x i8*], [4 x i8*]* %10, i64 0, i64 0
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8** %60
%61 = getelementptr inbounds i8*, i8** %60, i64 1
%62 = load i8*, i8** %6
store i8* %62, i8** %61
%63 = getelementptr inbounds i8*, i8** %61, i64 1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8** %63
%64 = getelementptr inbounds i8*, i8** %63, i64 1
store i8* null, i8** %64
%65 = bitcast [1 x i8*]* %11 to i8*
%66 = getelementptr inbounds [4 x i8*], [4 x i8*]* %10, i64 0, i64 0
%67 = getelementptr inbounds [1 x i8*], [1 x i8*]* %11, i64 0, i64 0
%68 = call i32 @execve(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8** %66, i8** %67)
%69 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%70 = load i32, i32* @EXIT_FAILURE
%71 = call i32 @_exit(i32 %70)
unreachable
72: ; preds = %56
%73 = load i32, i32* %9
%74 = call i32 @waitpid(i32 %73, i32* %12, i32 0)
%75 = icmp eq i32 %74, -1
br i1 %75, label %76, label %78
76: ; preds = %72
%77 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
br label %99
78: ; preds = %72
%79 = load i32, i32* %12
%80 = call i32 @WIFEXITED(i32 %79)
%81 = icmp ne i32 %80, 0
br i1 %81, label %86, label %82
82: ; preds = %78
%83 = load i32, i32* @stderr
%84 = load i32, i32* %12
%85 = call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.9, i64 0, i64 0), i32 %84)
br label %98
86: ; preds = %78
%87 = load i32, i32* %12
%88 = call i32 @WEXITSTATUS(i32 %87)
store i32 %88, i32* %12
%89 = load i32, i32* %12
%90 = load i32, i32* @EXIT_SUCCESS
%91 = icmp ne i32 %89, %90
br i1 %91, label %92, label %96
92: ; preds = %86
%93 = load i32, i32* @stderr
%94 = load i32, i32* %12
%95 = call i32 (i32, i8*, ...) @fprintf(i32 %93, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0), i32 %94)
br label %96
96: ; preds = %92, %86
%97 = load i32, i32* %12
store i32 %97, i32* %3
br label %103
98: ; preds = %82
br label %99
99: ; preds = %98, %76
br label %100
100: ; preds = %99
br label %101
101: ; preds = %100, %54
%102 = load i32, i32* @EXIT_FAILURE
store i32 %102, i32* %3
br label %103
103: ; preds = %101, %96, %44, %37, %22, %15
%104 = load i32, i32* %3
ret i32 %104
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"error: must be root user to run this tool\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [28 x i8] c"error: incorrect argc (%d)\0A\00"
@stdout = global i32 0
@.str.2 = [15 x i8] c"error: (write)\00"
@.str.3 = [47 x i8] c"error: write of %ld bytes failed (wrote %lud)\0A\00"
@.str.4 = [15 x i8] c"error: (vfork)\00"
@.str.5 = [15 x i8] c"/usr/bin/ditto\00"
@.str.6 = [21 x i8] c"/usr/local/bin/gdiff\00"
@.str.7 = [16 x i8] c"error: (execve)\00"
@.str.8 = [17 x i8] c"error: (waitpid)\00"
@.str.9 = [47 x i8] c"error: ditto did not exit normally (status %d)\00"
@EXIT_SUCCESS = global i32 0
@.str.10 = [52 x i8] c"error: ditto exited with non-zero exit status (%d)\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca [4 x i8*]
%5 = alloca [1 x i8*]
%6 = alloca i32
%7 = call i64 (...) @geteuid()
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @EXIT_FAILURE
br label %81
13: ; preds = %2
%14 = icmp eq i32 %0, 2
br i1 %14, label %19, label %15
15: ; preds = %13
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%18 = load i32, i32* @EXIT_FAILURE
br label %81
19: ; preds = %13
%20 = getelementptr inbounds i8*, i8** %1, i64 1
%21 = load i8*, i8** %20
%22 = bitcast i32* %3 to i8*
%23 = call i32 (...) @getpid()
store i32 %23, i32* %3
%24 = load i32, i32* @stdout
%25 = call i32 @fileno(i32 %24)
%26 = call i32 @write(i32 %25, i32* %3, i32 4)
switch i32 %26, label %30 [
i32 -1, label %27
i32 4, label %34
]
27: ; preds = %19
%28 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%29 = load i32, i32* @EXIT_FAILURE
br label %79
30: ; preds = %19
%31 = load i32, i32* @stderr
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i64 4, i32 %26)
%33 = load i32, i32* @EXIT_FAILURE
br label %79
34: ; preds = %19
%35 = call i32 @vfork()
switch i32 %35, label %51 [
i32 -1, label %36
i32 0, label %38
]
36: ; preds = %34
%37 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %77
38: ; preds = %34
%39 = bitcast [4 x i8*]* %4 to i8*
%40 = getelementptr inbounds [4 x i8*], [4 x i8*]* %4, i64 0, i64 0
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8** %40
%41 = getelementptr inbounds [4 x i8*], [4 x i8*]* %4, i64 0, i64 1
store i8* %21, i8** %41
%42 = getelementptr inbounds [4 x i8*], [4 x i8*]* %4, i64 0, i64 2
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8** %42
%43 = getelementptr inbounds [4 x i8*], [4 x i8*]* %4, i64 0, i64 3
store i8* null, i8** %43
%44 = bitcast [1 x i8*]* %5 to i8*
%45 = bitcast [1 x i8*]* %5 to i64*
store i64 0, i64* %45
%46 = getelementptr inbounds [1 x i8*], [1 x i8*]* %5, i64 0, i64 0
%47 = call i32 @execve(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8** %40, i8** %46)
%48 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%49 = load i32, i32* @EXIT_FAILURE
%50 = call i32 @_exit(i32 %49)
unreachable
51: ; preds = %34
%52 = bitcast i32* %6 to i8*
%53 = call i32 @waitpid(i32 %35, i32* %6, i32 0)
%54 = icmp eq i32 %53, -1
br i1 %54, label %55, label %57
55: ; preds = %51
%56 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
br label %74
57: ; preds = %51
%58 = load i32, i32* %6
%59 = call i32 @WIFEXITED(i32 %58)
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %65
61: ; preds = %57
%62 = load i32, i32* @stderr
%63 = load i32, i32* %6
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.9, i64 0, i64 0), i32 %63)
br label %74
65: ; preds = %57
%66 = load i32, i32* %6
%67 = call i32 @WEXITSTATUS(i32 %66)
store i32 %67, i32* %6
%68 = load i32, i32* @EXIT_SUCCESS
%69 = icmp eq i32 %67, %68
br i1 %69, label %75, label %70
70: ; preds = %65
%71 = load i32, i32* @stderr
%72 = call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0), i32 %67)
%73 = load i32, i32* %6
br label %75
74: ; preds = %61, %55
br label %77
75: ; preds = %65, %70
%76 = phi i32 [ %67, %65 ], [ %73, %70 ]
br label %79
77: ; preds = %74, %36
%78 = load i32, i32* @EXIT_FAILURE
br label %79
79: ; preds = %75, %77, %30, %27
%80 = phi i32 [ %29, %27 ], [ %33, %30 ], [ %78, %77 ], [ %76, %75 ]
br label %81
81: ; preds = %79, %15, %9
%82 = phi i32 [ %12, %9 ], [ %18, %15 ], [ %80, %79 ]
ret i32 %82
}