#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 scalar_t__ ssize_t;
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ EX_IOERR;
int /*<<< orphan*/ EX_OSERR;
int STDIN_FILENO;
int STDOUT_FILENO;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ close(int);
int dup2(int, int);
int /*<<< orphan*/ err(int /*<<< orphan*/, char *);
scalar_t__ execlp(char *, char *, char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *getenv(char *);
int pipe(int *);
scalar_t__ read(int, char **, size_t);
char *strrchr(char *, char);
scalar_t__ vfork();
scalar_t__ waitpid(scalar_t__, int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ warn(char *, char *);
int write(int, char **, size_t);
int main(void) {
  char buf[4096], *clippy, *shortname;
  int fd[2];
  pid_t pid;
  ssize_t howmuch;
  if (pipe(fd) == -1)
    err(EX_OSERR, "pipe() failed");
  if ((pid = vfork()) < 0) {
    err(EX_OSERR, "fork() failed");
  } else if (pid > 0) {
    close(fd[0]);
    while (1) {
      if ((howmuch = read(STDIN_FILENO, &buf, (size_t)4096)) < 0) {
        err(EX_IOERR, "read() failed");
      } else if (howmuch == 0) {
        break;
      }
      if (write(fd[1], &buf, (size_t)howmuch) == -1)
        err(EX_IOERR, "write() to clipboard command failed");
      if (write(STDOUT_FILENO, &buf, (size_t)howmuch) == -1)
        err(EX_IOERR, "write() to STDOUT failed");
    }
    close(fd[1]);
    if (waitpid(pid, NULL, 0) < 0)
      err(EX_OSERR, "waitpid() failed");
  } else {
    close(fd[1]);
    if (fd[0] != STDIN_FILENO) {
      if (dup2(fd[0], STDIN_FILENO) != STDIN_FILENO)
        err(EX_OSERR, "dup2() to STDIN failed");
      close(fd[0]);
    }
    if ((clippy = getenv("CLIPBOARD")) == NULL)
      clippy = "pbcopy";
    if ((shortname = strrchr(clippy, '/')) != NULL)
      shortname++;
    else
      shortname = clippy;
    if (execlp(clippy, shortname, (char *)0) < 0) {
      warn("execlp() of %s failed", clippy);
      _exit(EX_OSERR);
    }
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1040,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1028(%rbp),%rdi
call   10a0 <pipe@plt>
cmp    $0xffffffff,%eax
jne    121c <main+0x3c>
mov    0x2dba(%rip),%rax
mov    (%rax),%edi
lea    0xde9(%rip),%rsi
call   10c0 <err@plt>
mov    $0x0,%al
call   10e0 <vfork@plt>
mov    %rax,-0x1030(%rbp)
cmp    $0x0,%rax
jge    124e <main+0x6e>
mov    0x2d8d(%rip),%rax
mov    (%rax),%edi
lea    0xdca(%rip),%rsi
call   10c0 <err@plt>
jmp    149c <main+0x2bc>
cmpq   $0x0,-0x1030(%rbp)
jle    137b <main+0x19b>
mov    -0x1028(%rbp),%edi
call   1090 <close@plt>
mov    0x2d52(%rip),%rax
mov    (%rax),%edi
lea    -0x1010(%rbp),%rsi
mov    $0x1000,%edx
call   10b0 <read@plt>
mov    %rax,-0x1038(%rbp)
cmp    $0x0,%rax
jge    12ac <main+0xcc>
mov    0x2d47(%rip),%rax
mov    (%rax),%edi
lea    0xd7a(%rip),%rsi
call   10c0 <err@plt>
jmp    12c4 <main+0xe4>
cmpq   $0x0,-0x1038(%rbp)
jne    12bf <main+0xdf>
jmp    133a <main+0x15a>
jmp    12c4 <main+0xe4>
mov    -0x1024(%rbp),%edi
lea    -0x1010(%rbp),%rsi
mov    -0x1038(%rbp),%rdx
call   1060 <write@plt>
cmp    $0xffffffff,%eax
jne    12fb <main+0x11b>
mov    0x2cf3(%rip),%rax
mov    (%rax),%edi
lea    0xd34(%rip),%rsi
call   10c0 <err@plt>
mov    0x2cee(%rip),%rax
mov    (%rax),%edi
lea    -0x1010(%rbp),%rsi
mov    -0x1038(%rbp),%rdx
call   1060 <write@plt>
cmp    $0xffffffff,%eax
jne    1335 <main+0x155>
mov    0x2cb9(%rip),%rax
mov    (%rax),%edi
lea    0xd1e(%rip),%rsi
call   10c0 <err@plt>
jmp    1267 <main+0x87>
mov    -0x1024(%rbp),%edi
call   1090 <close@plt>
mov    -0x1030(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10d0 <waitpid@plt>
cmp    $0x0,%rax
jge    1376 <main+0x196>
mov    0x2c60(%rip),%rax
mov    (%rax),%edi
lea    0xcf6(%rip),%rsi
call   10c0 <err@plt>
jmp    1497 <main+0x2b7>
mov    -0x1024(%rbp),%edi
call   1090 <close@plt>
mov    -0x1028(%rbp),%eax
mov    0x2c2d(%rip),%rcx
cmp    (%rcx),%eax
je     13de <main+0x1fe>
mov    -0x1028(%rbp),%edi
mov    0x2c18(%rip),%rax
mov    (%rax),%esi
call   1070 <dup2@plt>
mov    0x2c0a(%rip),%rcx
cmp    (%rcx),%eax
je     13d3 <main+0x1f3>
mov    0x2c03(%rip),%rax
mov    (%rax),%edi
lea    0xcaa(%rip),%rsi
call   10c0 <err@plt>
mov    -0x1028(%rbp),%edi
call   1090 <close@plt>
lea    0xcaa(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x1018(%rbp)
cmp    $0x0,%rax
jne    1409 <main+0x229>
lea    0xc97(%rip),%rax
mov    %rax,-0x1018(%rbp)
mov    -0x1018(%rbp),%rdi
mov    $0x2f,%esi
call   1080 <strrchr@plt>
mov    %rax,-0x1020(%rbp)
cmp    $0x0,%rax
je     1442 <main+0x262>
mov    -0x1020(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x1020(%rbp)
jmp    1450 <main+0x270>
mov    -0x1018(%rbp),%rax
mov    %rax,-0x1020(%rbp)
mov    -0x1018(%rbp),%rdi
mov    -0x1020(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1100 <execlp@plt>
cmp    $0x0,%rax
jge    1492 <main+0x2b2>
mov    -0x1018(%rbp),%rsi
lea    0xc21(%rip),%rdi
call   1050 <warn@plt>
mov    0x2b3d(%rip),%rax
mov    (%rax),%edi
call   1040 <_exit@plt>
jmp    1497 <main+0x2b7>
jmp    149c <main+0x2bc>
mov    0x2b2d(%rip),%rax
mov    (%rax),%edi
call   10f0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1018,%rsp
mov    %rsp,%rdi
call   10a0 <pipe@plt>
cmp    $0xffffffff,%eax
jne    1213 <main+0x33>
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
lea    0xdf2(%rip),%rsi
call   10c0 <err@plt>
xor    %eax,%eax
call   10e0 <vfork@plt>
test   %rax,%rax
jns    1242 <main+0x62>
lea    0xde8(%rip),%rsi
mov    0x2d9b(%rip),%rax
mov    (%rax),%edi
call   10c0 <err@plt>
mov    0x2d95(%rip),%rax
mov    (%rax),%edi
call   10f0 <exit@plt>
jne    12e9 <main+0x109>
mov    0x4(%rsp),%edi
call   1090 <close@plt>
mov    (%rsp),%edi
mov    0x2d65(%rip),%rbx
mov    (%rbx),%esi
cmp    %esi,%edi
je     1287 <main+0xa7>
call   1070 <dup2@plt>
cmp    (%rbx),%eax
je     127f <main+0x9f>
mov    0x2d57(%rip),%rax
mov    (%rax),%edi
lea    0xdfe(%rip),%rsi
call   10c0 <err@plt>
mov    (%rsp),%edi
call   1090 <close@plt>
lea    0xe01(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xdfc(%rip),%rbx
cmovne %rax,%rbx
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1080 <strrchr@plt>
lea    0x1(%rax),%rsi
test   %rax,%rax
cmove  %rbx,%rsi
mov    %rbx,%rdi
xor    %edx,%edx
call   1100 <execlp@plt>
test   %rax,%rax
jns    1234 <main+0x54>
lea    0xdcd(%rip),%rdi
mov    %rbx,%rsi
call   1050 <warn@plt>
mov    0x2ce6(%rip),%rax
mov    (%rax),%edi
call   1040 <_exit@plt>
mov    %rax,0x8(%rsp)
mov    (%rsp),%edi
call   1090 <close@plt>
mov    0x2cc3(%rip),%r14
lea    0x10(%rsp),%rbx
mov    0x2cd7(%rip),%r15
mov    0x2ce0(%rip),%r12
lea    0xd37(%rip),%r13
nopw   0x0(%rax,%rax,1)
mov    (%r14),%edi
mov    $0x1000,%edx
mov    %rbx,%rsi
call   10b0 <read@plt>
mov    %rax,%rbp
test   %rax,%rax
js     1340 <main+0x160>
jne    134f <main+0x16f>
jmp    1393 <main+0x1b3>
nopl   0x0(%rax)
mov    (%r15),%edi
lea    0xcd2(%rip),%rsi
call   10c0 <err@plt>
mov    0x4(%rsp),%edi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1060 <write@plt>
cmp    $0xffffffff,%eax
jne    1372 <main+0x192>
mov    (%r15),%edi
lea    0xcbd(%rip),%rsi
call   10c0 <err@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1060 <write@plt>
cmp    $0xffffffff,%eax
jne    1320 <main+0x140>
mov    (%r15),%edi
mov    %r13,%rsi
call   10c0 <err@plt>
jmp    1320 <main+0x140>
mov    0x4(%rsp),%edi
call   1090 <close@plt>
mov    0x8(%rsp),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <waitpid@plt>
test   %rax,%rax
jns    1234 <main+0x54>
lea    0xcad(%rip),%rsi
jmp    1226 <main+0x46>

LLVM IR (-O0):
@EX_OSERR = global i32 0
@.str = [14 x i8] c"pipe() failed\00"
@.str.1 = [14 x i8] c"fork() failed\00"
@STDIN_FILENO = global i32 0
@EX_IOERR = global i32 0
@.str.2 = [14 x i8] c"read() failed\00"
@.str.3 = [36 x i8] c"write() to clipboard command failed\00"
@STDOUT_FILENO = global i32 0
@.str.4 = [25 x i8] c"write() to STDOUT failed\00"
@.str.5 = [17 x i8] c"waitpid() failed\00"
@.str.6 = [23 x i8] c"dup2() to STDIN failed\00"
@.str.7 = [10 x i8] c"CLIPBOARD\00"
@.str.8 = [7 x i8] c"pbcopy\00"
@.str.9 = [22 x i8] c"execlp() of %s failed\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [4096 x i8]
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [2 x i32]
%6 = alloca i64
%7 = alloca i64
store i32 0, i32* %1
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%9 = call i32 @pipe(i32* %8)
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %14
11: ; preds = %0
%12 = load i32, i32* @EX_OSERR
%13 = call i32 @err(i32 %12, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %11, %0
%15 = call i64 (...) @vfork()
store i64 %15, i64* %6
%16 = icmp slt i64 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* @EX_OSERR
%19 = call i32 @err(i32 %18, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %118
20: ; preds = %14
%21 = load i64, i64* %6
%22 = icmp sgt i64 %21, 0
br i1 %22, label %23, label %71
23: ; preds = %20
%24 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%25 = load i32, i32* %24
%26 = call i32 @close(i32 %25)
br label %27
27: ; preds = %23, %59
%28 = load i32, i32* @STDIN_FILENO
%29 = bitcast [4096 x i8]* %2 to i8**
%30 = call i64 @read(i32 %28, i8** %29, i64 4096)
store i64 %30, i64* %7
%31 = icmp slt i64 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %27
%33 = load i32, i32* @EX_IOERR
%34 = call i32 @err(i32 %33, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %40
35: ; preds = %27
%36 = load i64, i64* %7
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %39
38: ; preds = %35
br label %60
39: ; preds = %35
br label %40
40: ; preds = %39, %32
%41 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%42 = load i32, i32* %41
%43 = bitcast [4096 x i8]* %2 to i8**
%44 = load i64, i64* %7
%45 = call i32 @write(i32 %42, i8** %43, i64 %44)
%46 = icmp eq i32 %45, -1
br i1 %46, label %47, label %50
47: ; preds = %40
%48 = load i32, i32* @EX_IOERR
%49 = call i32 @err(i32 %48, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
br label %50
50: ; preds = %47, %40
%51 = load i32, i32* @STDOUT_FILENO
%52 = bitcast [4096 x i8]* %2 to i8**
%53 = load i64, i64* %7
%54 = call i32 @write(i32 %51, i8** %52, i64 %53)
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %59
56: ; preds = %50
%57 = load i32, i32* @EX_IOERR
%58 = call i32 @err(i32 %57, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
br label %59
59: ; preds = %56, %50
br label %27
60: ; preds = %38
%61 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%62 = load i32, i32* %61
%63 = call i32 @close(i32 %62)
%64 = load i64, i64* %6
%65 = call i64 @waitpid(i64 %64, i32* null, i32 0)
%66 = icmp slt i64 %65, 0
br i1 %66, label %67, label %70
67: ; preds = %60
%68 = load i32, i32* @EX_OSERR
%69 = call i32 @err(i32 %68, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
br label %70
70: ; preds = %67, %60
br label %117
71: ; preds = %20
%72 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%73 = load i32, i32* %72
%74 = call i32 @close(i32 %73)
%75 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%76 = load i32, i32* %75
%77 = load i32, i32* @STDIN_FILENO
%78 = icmp ne i32 %76, %77
br i1 %78, label %79, label %93
79: ; preds = %71
%80 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%81 = load i32, i32* %80
%82 = load i32, i32* @STDIN_FILENO
%83 = call i32 @dup2(i32 %81, i32 %82)
%84 = load i32, i32* @STDIN_FILENO
%85 = icmp ne i32 %83, %84
br i1 %85, label %86, label %89
86: ; preds = %79
%87 = load i32, i32* @EX_OSERR
%88 = call i32 @err(i32 %87, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
br label %89
89: ; preds = %86, %79
%90 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%91 = load i32, i32* %90
%92 = call i32 @close(i32 %91)
br label %93
93: ; preds = %89, %71
%94 = call i8* @getenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
store i8* %94, i8** %3
%95 = icmp eq i8* %94, null
br i1 %95, label %96, label %97
96: ; preds = %93
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %97
97: ; preds = %96, %93
%98 = load i8*, i8** %3
%99 = call i8* @strrchr(i8* %98, i8 signext 47)
store i8* %99, i8** %4
%100 = icmp ne i8* %99, null
br i1 %100, label %101, label %104
101: ; preds = %97
%102 = load i8*, i8** %4
%103 = getelementptr inbounds i8, i8* %102, i32 1
store i8* %103, i8** %4
br label %106
104: ; preds = %97
%105 = load i8*, i8** %3
store i8* %105, i8** %4
br label %106
106: ; preds = %104, %101
%107 = load i8*, i8** %3
%108 = load i8*, i8** %4
%109 = call i64 @execlp(i8* %107, i8* %108, i8* null)
%110 = icmp slt i64 %109, 0
br i1 %110, label %111, label %116
111: ; preds = %106
%112 = load i8*, i8** %3
%113 = call i32 @warn(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i8* %112)
%114 = load i32, i32* @EX_OSERR
%115 = call i32 @_exit(i32 %114)
unreachable
116: ; preds = %106
br label %117
117: ; preds = %116, %70
br label %118
118: ; preds = %117, %17
%119 = load i32, i32* @EXIT_SUCCESS
%120 = call i32 @exit(i32 %119)
unreachable
}

LLVM IR (-O2):
@EX_OSERR = global i32 0
@.str = [14 x i8] c"pipe() failed\00"
@.str.1 = [14 x i8] c"fork() failed\00"
@STDIN_FILENO = global i32 0
@EX_IOERR = global i32 0
@.str.2 = [14 x i8] c"read() failed\00"
@.str.3 = [36 x i8] c"write() to clipboard command failed\00"
@STDOUT_FILENO = global i32 0
@.str.4 = [25 x i8] c"write() to STDOUT failed\00"
@.str.5 = [17 x i8] c"waitpid() failed\00"
@.str.6 = [23 x i8] c"dup2() to STDIN failed\00"
@.str.7 = [10 x i8] c"CLIPBOARD\00"
@.str.8 = [7 x i8] c"pbcopy\00"
@.str.9 = [22 x i8] c"execlp() of %s failed\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [4096 x i8]
%2 = alloca [2 x i32]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%4 = bitcast [2 x i32]* %2 to i8*
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%6 = call i32 @pipe(i32* %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i32, i32* @EX_OSERR
%10 = call i32 @err(i32 %9, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %8, %0
%12 = call i64 (...) @vfork()
%13 = icmp slt i64 %12, 0
br i1 %13, label %81, label %14
14: ; preds = %11
%15 = icmp eq i64 %12, 0
br i1 %15, label %50, label %16
16: ; preds = %14
%17 = load i32, i32* %5
%18 = call i32 @close(i32 %17)
%19 = bitcast [4096 x i8]* %1 to i8**
%20 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
br label %21
21: ; preds = %44, %16
%22 = load i32, i32* @STDIN_FILENO
%23 = call i64 @read(i32 %22, i8** %19, i64 4096)
%24 = icmp slt i64 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %21
%26 = load i32, i32* @EX_IOERR
%27 = call i32 @err(i32 %26, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %30
28: ; preds = %21
%29 = icmp eq i64 %23, 0
br i1 %29, label %45, label %30
30: ; preds = %28, %25
%31 = load i32, i32* %20
%32 = call i32 @write(i32 %31, i8** %19, i64 %23)
%33 = icmp eq i32 %32, -1
br i1 %33, label %34, label %37
34: ; preds = %30
%35 = load i32, i32* @EX_IOERR
%36 = call i32 @err(i32 %35, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
br label %37
37: ; preds = %34, %30
%38 = load i32, i32* @STDOUT_FILENO
%39 = call i32 @write(i32 %38, i8** %19, i64 %23)
%40 = icmp eq i32 %39, -1
br i1 %40, label %41, label %44
41: ; preds = %37
%42 = load i32, i32* @EX_IOERR
%43 = call i32 @err(i32 %42, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
br label %44
44: ; preds = %41, %37
br label %21
45: ; preds = %28
%46 = load i32, i32* %20
%47 = call i32 @close(i32 %46)
%48 = call i64 @waitpid(i64 %12, i32* null, i32 0)
%49 = icmp slt i64 %48, 0
br i1 %49, label %81, label %85
50: ; preds = %14
%51 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%52 = load i32, i32* %51
%53 = call i32 @close(i32 %52)
%54 = load i32, i32* %5
%55 = load i32, i32* @STDIN_FILENO
%56 = icmp eq i32 %54, %55
br i1 %56, label %67, label %57
57: ; preds = %50
%58 = call i32 @dup2(i32 %54, i32 %55)
%59 = load i32, i32* @STDIN_FILENO
%60 = icmp eq i32 %58, %59
br i1 %60, label %64, label %61
61: ; preds = %57
%62 = load i32, i32* @EX_OSERR
%63 = call i32 @err(i32 %62, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
br label %64
64: ; preds = %61, %57
%65 = load i32, i32* %5
%66 = call i32 @close(i32 %65)
br label %67
67: ; preds = %64, %50
%68 = call i8* @getenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%69 = icmp eq i8* %68, null
%70 = select i1 %69, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* %68
%71 = call i8* @strrchr(i8* dereferenceable(1) %70, i8 signext 47)
%72 = icmp eq i8* %71, null
%73 = getelementptr inbounds i8, i8* %71, i64 1
%74 = select i1 %72, i8* %70, i8* %73
%75 = call i64 @execlp(i8* %70, i8* %74, i8* null)
%76 = icmp slt i64 %75, 0
br i1 %76, label %77, label %85
77: ; preds = %67
%78 = call i32 @warn(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i8* %70)
%79 = load i32, i32* @EX_OSERR
%80 = call i32 @_exit(i32 %79)
unreachable
81: ; preds = %45, %11
%82 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), %11 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), %45 ]
%83 = load i32, i32* @EX_OSERR
%84 = call i32 @err(i32 %83, i8* %82)
br label %85
85: ; preds = %81, %45, %67
%86 = load i32, i32* @EXIT_SUCCESS
%87 = call i32 @exit(i32 %86)
unreachable
}