#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 EXIT_SUCCESS;
int daemonize(char **, int, int);
int /*<<< orphan*/ exit(int);
int getopt(int, char **, char *);
int open_log(char *);
char *optarg;
int optind;
int print_help(char *);
int print_version();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
scalar_t__ write_pid(char *, int);
int main(int argc, char **argv) {
  pid_t cmd_pid;
  int optch;
  extern int opterr;
  char verbose_flag = 1;
  char *pidfile = NULL, *outfile = NULL, *errfile = NULL;
  int outfd = -1, errfd = -1;
  opterr = 1;
  while ((optch = getopt(argc, argv, "e:ho:O:p:qv")) != -1) {
    switch (optch) {
    case 'e':
      errfile = optarg;
      break;
    case 'h':
      return print_help(argv[0]);
    case 'o':
      outfile = optarg;
      break;
    case 'O':
      outfile = optarg;
      errfile = optarg;
      break;
    case 'p':
      pidfile = optarg;
      break;
    case 'q':
      verbose_flag = 0;
      break;
    case 'v':
      return print_version();
    case '?':
      exit(EXIT_FAILURE);
    }
  }
  if (optind == argc) {
    return print_help(argv[0]);
  }
  if (outfile) {
    outfd = open_log(outfile);
    if (outfd < 0) {
      printf("Cannot open '%s'\n", outfile);
      outfd = -1;
    }
  }
  if (errfile) {
    errfd = open_log(errfile);
    if (errfd < 0) {
      printf("Cannot open '%s'\n", errfile);
      errfd = -1;
    }
  }
  cmd_pid = daemonize(argv + optind, outfd, errfd);
  if (cmd_pid < 0) {
    puts("Got an error.");
    return EXIT_FAILURE;
  }
  if (verbose_flag) {
    printf("Successfully launched command"
           " with PID %d.\n",
           cmd_pid);
  }
  if (pidfile) {
    if (write_pid(pidfile, cmd_pid) < 0) {
      return EXIT_FAILURE;
    }
    if (verbose_flag) {
      printf("PID written in '%s'\n", pidfile);
    }
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x1,-0x19(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movl   $0xffffffff,-0x3c(%rbp)
movl   $0xffffffff,-0x40(%rbp)
mov    0x2e21(%rip),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xef5(%rip),%rdx
call   1090 <getopt@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
je     12be <main+0x12e>
mov    -0x18(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x48(%rbp)
sub    $0x37,%eax
ja     12b9 <main+0x129>
mov    -0x48(%rbp),%rax
lea    0xde4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2dc4(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
jmp    12b9 <main+0x129>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <print_help@plt>
mov    %eax,-0x4(%rbp)
jmp    1426 <main+0x296>
mov    0x2d9d(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
jmp    12b9 <main+0x129>
mov    0x2d8a(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    0x2d7c(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
jmp    12b9 <main+0x129>
mov    0x2d69(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
jmp    12b9 <main+0x129>
movb   $0x0,-0x19(%rbp)
jmp    12b9 <main+0x129>
mov    $0x0,%al
call   1040 <print_version@plt>
mov    %eax,-0x4(%rbp)
jmp    1426 <main+0x296>
mov    0x2d16(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
jmp    11dd <main+0x4d>
mov    0x2d13(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jne    12e4 <main+0x154>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <print_help@plt>
mov    %eax,-0x4(%rbp)
jmp    1426 <main+0x296>
cmpq   $0x0,-0x30(%rbp)
je     1323 <main+0x193>
mov    -0x30(%rbp),%rdi
call   1060 <open_log@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jge    131e <main+0x18e>
mov    -0x30(%rbp),%rsi
lea    0xddc(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x3c(%rbp)
jmp    1323 <main+0x193>
cmpq   $0x0,-0x38(%rbp)
je     1362 <main+0x1d2>
mov    -0x38(%rbp),%rdi
call   1060 <open_log@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
jge    135d <main+0x1cd>
mov    -0x38(%rbp),%rsi
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x40(%rbp)
jmp    1362 <main+0x1d2>
mov    -0x10(%rbp),%rdi
mov    0x2c6b(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x3c(%rbp),%esi
mov    -0x40(%rbp),%edx
call   1050 <daemonize@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    13ac <main+0x21c>
lea    0xd68(%rip),%rdi
call   1030 <puts@plt>
mov    0x2c26(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1426 <main+0x296>
cmpb   $0x0,-0x19(%rbp)
je     13c7 <main+0x237>
mov    -0x14(%rbp),%esi
lea    0xd4c(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
cmpq   $0x0,-0x28(%rbp)
je     141a <main+0x28a>
mov    -0x28(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1080 <write_pid@plt>
cmp    $0x0,%rax
jge    13f9 <main+0x269>
mov    0x2bd9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1426 <main+0x296>
cmpb   $0x0,-0x19(%rbp)
je     1415 <main+0x285>
mov    -0x28(%rbp),%rsi
lea    0xd2a(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    141a <main+0x28a>
mov    0x2b9f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%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,%rbx
mov    %edi,%ebp
mov    0x2e4e(%rip),%rax
movl   $0x1,(%rax)
xor    %eax,%eax
mov    %rax,0x8(%rsp)
lea    0xf22(%rip),%r13
lea    0xe3b(%rip),%r14
xor    %eax,%eax
mov    %rax,0x10(%rsp)
xor    %r12d,%r12d
xor    %r15d,%r15d
jmp    11e5 <main+0x55>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0xffffffff,%eax
je     1259 <main+0xc9>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
call   1090 <getopt@plt>
lea    -0x3f(%rax),%ecx
cmp    $0x37,%ecx
ja     11e0 <main+0x50>
movslq (%r14,%rcx,4),%rax
add    %r14,%rax
jmp    *%rax
mov    0x2de6(%rip),%rax
mov    (%rax),%r12
mov    %r12,%r15
jmp    11e5 <main+0x55>
mov    0x2dd7(%rip),%rax
mov    (%rax),%r15
jmp    11e5 <main+0x55>
mov    0x2dcb(%rip),%rax
mov    (%rax),%r12
jmp    11e5 <main+0x55>
mov    0x2dbf(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x10(%rsp)
jmp    11e5 <main+0x55>
mov    $0x1,%al
mov    %rax,0x8(%rsp)
jmp    11e5 <main+0x55>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <print_version@plt>
mov    0x2d78(%rip),%r14
cmp    %ebp,(%r14)
jne    127b <main+0xeb>
mov    (%rbx),%rdi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10a0 <print_help@plt>
mov    $0xffffffff,%r13d
mov    $0xffffffff,%ebp
test   %r12,%r12
je     12af <main+0x11f>
mov    %r12,%rdi
call   1060 <open_log@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    12af <main+0x11f>
lea    0xe4c(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xffffffff,%ebp
test   %r15,%r15
je     12da <main+0x14a>
mov    %r15,%rdi
call   1060 <open_log@plt>
mov    %eax,%r13d
test   %eax,%eax
jns    12da <main+0x14a>
lea    0xe22(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xffffffff,%r13d
movslq (%r14),%rax
lea    (%rbx,%rax,8),%rdi
mov    %ebp,%esi
mov    %r13d,%edx
call   1050 <daemonize@plt>
test   %eax,%eax
js     1345 <main+0x1b5>
mov    %eax,%ebx
mov    0x8(%rsp),%r14
test   $0x1,%r14b
jne    130c <main+0x17c>
lea    0xe09(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x10(%rsp),%rbp
test   %rbp,%rbp
je     133c <main+0x1ac>
mov    %rbp,%rdi
mov    %ebx,%esi
call   1080 <write_pid@plt>
test   %rax,%rax
js     1351 <main+0x1c1>
test   $0x1,%r14b
jne    133c <main+0x1ac>
lea    0xe06(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2c7d(%rip),%rax
jmp    1358 <main+0x1c8>
lea    0xdb2(%rip),%rdi
call   1030 <puts@plt>
mov    0x2c70(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c58(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@opterr = external global i32
@.str = [12 x i8] c"e:ho:O:p:qv\00"
@optarg = global i8* null
@EXIT_FAILURE = global i32 0
@optind = global i32 0
@.str.1 = [18 x i8] c"Cannot open '%s'\0A\00"
@.str.2 = [14 x i8] c"Got an error.\00"
@.str.3 = [44 x i8] c"Successfully launched command with PID %d.\0A\00"
@.str.4 = [21 x i8] c"PID written in '%s'\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 1, i8* %8
store i8* null, i8** %9
store i8* null, i8** %10
store i8* null, i8** %11
store i32 -1, i32* %12
store i32 -1, i32* %13
store i32 1, i32* @opterr
br label %14
14: ; preds = %41, %2
%15 = load i32, i32* %4
%16 = load i8**, i8*** %5
%17 = call i32 @getopt(i32 %15, i8** %16, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i32 %17, i32* %7
%18 = icmp ne i32 %17, -1
br i1 %18, label %19, label %42
19: ; preds = %14
%20 = load i32, i32* %7
switch i32 %20, label %41 [
i32 101, label %21
i32 104, label %23
i32 111, label %28
i32 79, label %30
i32 112, label %33
i32 113, label %35
i32 118, label %36
i32 63, label %38
]
21: ; preds = %19
%22 = load i8*, i8** @optarg
store i8* %22, i8** %11
br label %41
23: ; preds = %19
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 0
%26 = load i8*, i8** %25
%27 = call i32 @print_help(i8* %26)
store i32 %27, i32* %3
br label %113
28: ; preds = %19
%29 = load i8*, i8** @optarg
store i8* %29, i8** %10
br label %41
30: ; preds = %19
%31 = load i8*, i8** @optarg
store i8* %31, i8** %10
%32 = load i8*, i8** @optarg
store i8* %32, i8** %11
br label %41
33: ; preds = %19
%34 = load i8*, i8** @optarg
store i8* %34, i8** %9
br label %41
35: ; preds = %19
store i8 0, i8* %8
br label %41
36: ; preds = %19
%37 = call i32 (...) @print_version()
store i32 %37, i32* %3
br label %113
38: ; preds = %19
%39 = load i32, i32* @EXIT_FAILURE
%40 = call i32 @exit(i32 %39)
unreachable
41: ; preds = %19, %35, %33, %30, %28, %21
br label %14
42: ; preds = %14
%43 = load i32, i32* @optind
%44 = load i32, i32* %4
%45 = icmp eq i32 %43, %44
br i1 %45, label %46, label %51
46: ; preds = %42
%47 = load i8**, i8*** %5
%48 = getelementptr inbounds i8*, i8** %47, i64 0
%49 = load i8*, i8** %48
%50 = call i32 @print_help(i8* %49)
store i32 %50, i32* %3
br label %113
51: ; preds = %42
%52 = load i8*, i8** %10
%53 = icmp ne i8* %52, null
br i1 %53, label %54, label %63
54: ; preds = %51
%55 = load i8*, i8** %10
%56 = call i32 @open_log(i8* %55)
store i32 %56, i32* %12
%57 = load i32, i32* %12
%58 = icmp slt i32 %57, 0
br i1 %58, label %59, label %62
59: ; preds = %54
%60 = load i8*, i8** %10
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %60)
store i32 -1, i32* %12
br label %62
62: ; preds = %59, %54
br label %63
63: ; preds = %62, %51
%64 = load i8*, i8** %11
%65 = icmp ne i8* %64, null
br i1 %65, label %66, label %75
66: ; preds = %63
%67 = load i8*, i8** %11
%68 = call i32 @open_log(i8* %67)
store i32 %68, i32* %13
%69 = load i32, i32* %13
%70 = icmp slt i32 %69, 0
br i1 %70, label %71, label %74
71: ; preds = %66
%72 = load i8*, i8** %11
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %72)
store i32 -1, i32* %13
br label %74
74: ; preds = %71, %66
br label %75
75: ; preds = %74, %63
%76 = load i8**, i8*** %5
%77 = load i32, i32* @optind
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8*, i8** %76, i64 %78
%80 = load i32, i32* %12
%81 = load i32, i32* %13
%82 = call i32 @daemonize(i8** %79, i32 %80, i32 %81)
store i32 %82, i32* %6
%83 = load i32, i32* %6
%84 = icmp slt i32 %83, 0
br i1 %84, label %85, label %88
85: ; preds = %75
%86 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%87 = load i32, i32* @EXIT_FAILURE
store i32 %87, i32* %3
br label %113
88: ; preds = %75
%89 = load i8, i8* %8
%90 = icmp ne i8 %89, 0
br i1 %90, label %91, label %94
91: ; preds = %88
%92 = load i32, i32* %6
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %92)
br label %94
94: ; preds = %91, %88
%95 = load i8*, i8** %9
%96 = icmp ne i8* %95, null
br i1 %96, label %97, label %111
97: ; preds = %94
%98 = load i8*, i8** %9
%99 = load i32, i32* %6
%100 = call i64 @write_pid(i8* %98, i32 %99)
%101 = icmp slt i64 %100, 0
br i1 %101, label %102, label %104
102: ; preds = %97
%103 = load i32, i32* @EXIT_FAILURE
store i32 %103, i32* %3
br label %113
104: ; preds = %97
%105 = load i8, i8* %8
%106 = icmp ne i8 %105, 0
br i1 %106, label %107, label %110
107: ; preds = %104
%108 = load i8*, i8** %9
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8* %108)
br label %110
110: ; preds = %107, %104
br label %111
111: ; preds = %110, %94
%112 = load i32, i32* @EXIT_SUCCESS
store i32 %112, i32* %3
br label %113
113: ; preds = %111, %102, %85, %46, %36, %23
%114 = load i32, i32* %3
ret i32 %114
}

LLVM IR (-O2):
@opterr = external global i32
@.str = [12 x i8] c"e:ho:O:p:qv\00"
@optarg = global i8* null
@EXIT_FAILURE = global i32 0
@optind = global i32 0
@.str.1 = [18 x i8] c"Cannot open '%s'\0A\00"
@.str.2 = [14 x i8] c"Got an error.\00"
@.str.3 = [44 x i8] c"Successfully launched command with PID %d.\0A\00"
@.str.4 = [21 x i8] c"PID written in '%s'\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
store i32 1, i32* @opterr
br label %3
3: ; preds = %17, %2
%4 = phi i1 [ false, %2 ], [ true, %17 ]
%5 = phi i8* [ null, %2 ], [ %9, %17 ]
%6 = phi i8* [ null, %2 ], [ %13, %17 ]
%7 = phi i8* [ null, %2 ], [ %16, %17 ]
br label %8
8: ; preds = %3, %31
%9 = phi i8* [ %5, %3 ], [ %32, %31 ]
%10 = phi i8* [ %6, %3 ], [ %13, %31 ]
%11 = phi i8* [ %7, %3 ], [ %16, %31 ]
br label %12
12: ; preds = %28, %8
%13 = phi i8* [ %10, %8 ], [ %29, %28 ]
%14 = phi i8* [ %11, %8 ], [ %30, %28 ]
br label %15
15: ; preds = %12, %19
%16 = phi i8* [ %14, %12 ], [ %20, %19 ]
br label %17
17: ; preds = %15, %17
%18 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
switch i32 %18, label %17 [
i32 -1, label %38
i32 101, label %19
i32 104, label %21
i32 111, label %24
i32 79, label %26
i32 112, label %31
i32 113, label %3
i32 118, label %33
i32 63, label %35
]
19: ; preds = %17
%20 = load i8*, i8** @optarg
br label %15
21: ; preds = %17
%22 = load i8*, i8** %1
%23 = tail call i32 @print_help(i8* %22)
br label %84
24: ; preds = %17
%25 = load i8*, i8** @optarg
br label %28
26: ; preds = %17
%27 = load i8*, i8** @optarg
br label %28
28: ; preds = %26, %24
%29 = phi i8* [ %25, %24 ], [ %27, %26 ]
%30 = phi i8* [ %16, %24 ], [ %27, %26 ]
br label %12
31: ; preds = %17
%32 = load i8*, i8** @optarg
br label %8
33: ; preds = %17
%34 = tail call i32 (...) @print_version()
br label %84
35: ; preds = %17
%36 = load i32, i32* @EXIT_FAILURE
%37 = tail call i32 @exit(i32 %36)
unreachable
38: ; preds = %17
%39 = load i32, i32* @optind
%40 = icmp eq i32 %39, %0
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = load i8*, i8** %1
%43 = tail call i32 @print_help(i8* %42)
br label %84
44: ; preds = %38
%45 = icmp eq i8* %13, null
br i1 %45, label %51, label %46
46: ; preds = %44
%47 = tail call i32 @open_log(i8* %13)
%48 = icmp slt i32 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %13)
br label %51
51: ; preds = %46, %49, %44
%52 = phi i32 [ -1, %49 ], [ %47, %46 ], [ -1, %44 ]
%53 = icmp eq i8* %16, null
br i1 %53, label %59, label %54
54: ; preds = %51
%55 = tail call i32 @open_log(i8* %16)
%56 = icmp slt i32 %55, 0
br i1 %56, label %57, label %59
57: ; preds = %54
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %16)
br label %59
59: ; preds = %54, %57, %51
%60 = phi i32 [ -1, %57 ], [ %55, %54 ], [ -1, %51 ]
%61 = load i32, i32* @optind
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8*, i8** %1, i64 %62
%64 = tail call i32 @daemonize(i8** %63, i32 %52, i32 %60)
%65 = icmp slt i32 %64, 0
br i1 %65, label %66, label %69
66: ; preds = %59
%67 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%68 = load i32, i32* @EXIT_FAILURE
br label %84
69: ; preds = %59
br i1 %4, label %72, label %70
70: ; preds = %69
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %64)
br label %72
72: ; preds = %70, %69
%73 = icmp eq i8* %9, null
br i1 %73, label %82, label %74
74: ; preds = %72
%75 = tail call i64 @write_pid(i8* %9, i32 %64)
%76 = icmp slt i64 %75, 0
br i1 %76, label %77, label %79
77: ; preds = %74
%78 = load i32, i32* @EXIT_FAILURE
br label %84
79: ; preds = %74
br i1 %4, label %82, label %80
80: ; preds = %79
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8* %9)
br label %82
82: ; preds = %79, %80, %72
%83 = load i32, i32* @EXIT_SUCCESS
br label %84
84: ; preds = %82, %77, %66, %41, %33, %21
%85 = phi i32 [ %34, %33 ], [ %23, %21 ], [ %43, %41 ], [ %68, %66 ], [ %78, %77 ], [ %83, %82 ]
ret i32 %85
}