#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 /*<<< orphan*/ uid_t;
struct stat {
  int dummy;
};
struct passwd {
  int /*<<< orphan*/ pw_uid;
};
typedef int /*<<< orphan*/ program;

/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
int /*<<< orphan*/ errx(int, char *, ...);
int execlp(char *, char *, char *, char *, int /*<<< orphan*/ *, char **,
           int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
char *getenv(char *);
struct passwd *getpwnam(char *);
int /*<<< orphan*/ getuid();
int /*<<< orphan*/ perror(char *);
scalar_t__ seteuid(int /*<<< orphan*/);
scalar_t__ setuid(int /*<<< orphan*/);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv, char **envp __attribute__((__unused__))) {
  char *perlprog = "/usr/bin/perl";
  char program[1024];
  char *boithohome;
  int ret;
  struct passwd *pwd;
  uid_t webuid, execuid;
  uid_t uid = getuid();
  char *perlenv[] = {NULL};
  struct stat st;
  if (argc < 2)
    errx(1, "Usage: ./repomodwrap cmd");
  if ((pwd = getpwnam("apache")) == NULL) {
    perror("Could not find web user");
    return 80;
  }
  webuid = pwd->pw_uid;
  if (argc != 2) {
    fprintf(stderr, "Wrong number of arguments.\n");
    return 98;
  }
  boithohome = getenv("BOITHOHOME");
  if (boithohome == NULL) {
    err(1, "getenv(BOITHOHOME)");
    return 105;
  }
  snprintf(program, sizeof(program), "%s/perl/repomod.pl", boithohome);
  if (setuid(0) != 0) {
    perror("Could not setuid(0)");
    return 97;
  }
  if (seteuid(0) != 0) {
    perror("Could not seteuid(0)");
    return 96;
  }
  if (strcmp(argv[1], "production") == 0) {
    ret = execlp(perlprog, "perl", program, "production", NULL, perlenv, NULL);
  } else if (strcmp(argv[1], "testing") == 0) {
    ret = execlp(perlprog, "perl", program, "testing", NULL, perlenv, NULL);
  } else if (strcmp(argv[1], "devel") == 0) {
    ret = execlp(perlprog, "perl", program, "devel", NULL, perlenv, NULL);
  } else {
    errx(1, "Wrong argument: %s", argv[1]);
  }
  perror("Unable to exec program");
  return 100;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xe0c(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %eax,-0x444(%rbp)
lea    -0x450(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1070 <memset@plt>
cmpl   $0x2,-0x8(%rbp)
jge    1235 <main+0x65>
mov    $0x1,%edi
lea    0xde0(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
lea    0xdeb(%rip),%rdi
call   1090 <getpwnam@plt>
mov    %rax,-0x438(%rbp)
cmp    $0x0,%rax
jne    126a <main+0x9a>
lea    0xdd5(%rip),%rdi
call   10c0 <perror@plt>
movl   $0x50,-0x4(%rbp)
jmp    149c <main+0x2cc>
mov    -0x438(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x43c(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     12a4 <main+0xd4>
mov    0x2d56(%rip),%rax
mov    (%rax),%edi
lea    0xdb3(%rip),%rsi
call   10a0 <fprintf@plt>
movl   $0x62,-0x4(%rbp)
jmp    149c <main+0x2cc>
lea    0xdb7(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x428(%rbp)
cmpq   $0x0,-0x428(%rbp)
jne    12e2 <main+0x112>
mov    $0x1,%edi
lea    0xd9c(%rip),%rsi
call   10b0 <err@plt>
movl   $0x69,-0x4(%rbp)
jmp    149c <main+0x2cc>
lea    -0x420(%rbp),%rdi
mov    -0x428(%rbp),%rcx
mov    $0x400,%esi
lea    0xd84(%rip),%rdx
call   1060 <snprintf@plt>
xor    %edi,%edi
call   10d0 <setuid@plt>
cmp    $0x0,%rax
je     132a <main+0x15a>
lea    0xd7a(%rip),%rdi
call   10c0 <perror@plt>
movl   $0x61,-0x4(%rbp)
jmp    149c <main+0x2cc>
xor    %edi,%edi
call   10f0 <seteuid@plt>
cmp    $0x0,%rax
je     1353 <main+0x183>
lea    0xd65(%rip),%rdi
call   10c0 <perror@plt>
movl   $0x60,-0x4(%rbp)
jmp    149c <main+0x2cc>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd5a(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    13ae <main+0x1de>
mov    -0x20(%rbp),%rdi
lea    -0x420(%rbp),%rdx
lea    -0x450(%rbp),%r9
lea    0xc7f(%rip),%rsi
lea    0xd2b(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
movq   $0x0,(%rsp)
call   10e0 <execlp@plt>
mov    %eax,-0x42c(%rbp)
jmp    1489 <main+0x2b9>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd0a(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1409 <main+0x239>
mov    -0x20(%rbp),%rdi
lea    -0x420(%rbp),%rdx
lea    -0x450(%rbp),%r9
lea    0xc24(%rip),%rsi
lea    0xcdb(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
movq   $0x0,(%rsp)
call   10e0 <execlp@plt>
mov    %eax,-0x42c(%rbp)
jmp    1484 <main+0x2b4>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xcb7(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1464 <main+0x294>
mov    -0x20(%rbp),%rdi
lea    -0x420(%rbp),%rdx
lea    -0x450(%rbp),%r9
lea    0xbc9(%rip),%rsi
lea    0xc88(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
movq   $0x0,(%rsp)
call   10e0 <execlp@plt>
mov    %eax,-0x42c(%rbp)
jmp    147f <main+0x2af>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    $0x1,%edi
lea    0xc5d(%rip),%rsi
mov    $0x0,%al
call   1050 <errx@plt>
jmp    1484 <main+0x2b4>
jmp    1489 <main+0x2b9>
lea    0xc58(%rip),%rdi
call   10c0 <perror@plt>
movl   $0x64,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x460,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x418,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <getuid@plt>
movq   $0x0,0x8(%rsp)
cmp    $0x1,%ebp
jg     11f6 <main+0x36>
lea    0xe24(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1050 <errx@plt>
lea    0xe2a(%rip),%rdi
call   1080 <getpwnam@plt>
test   %rax,%rax
je     1259 <main+0x99>
cmp    $0x2,%ebp
jne    1235 <main+0x75>
lea    0xe4f(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
jne    126c <main+0xac>
lea    0xe49(%rip),%rsi
mov    $0x1,%edi
call   10a0 <err@plt>
mov    $0x69,%eax
jmp    124f <main+0x8f>
mov    0x2da4(%rip),%rax
mov    (%rax),%edi
lea    0xe01(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0x62,%eax
add    $0x418,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xdce(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x50,%eax
jmp    124f <main+0x8f>
lea    0xe0d(%rip),%rdx
lea    0x10(%rsp),%rdi
mov    $0x400,%esi
mov    %rax,%rcx
call   1060 <snprintf@plt>
xor    %edi,%edi
call   10c0 <setuid@plt>
test   %rax,%rax
jne    12d4 <main+0x114>
xor    %edi,%edi
call   10e0 <seteuid@plt>
test   %rax,%rax
jne    12ea <main+0x12a>
mov    0x8(%rbx),%rdi
lea    0xe14(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1300 <main+0x140>
movq   $0x0,(%rsp)
lea    0xd3f(%rip),%rdi
lea    0xd41(%rip),%rsi
lea    0xded(%rip),%rcx
jmp    1366 <main+0x1a6>
lea    0xdb8(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x61,%eax
jmp    124f <main+0x8f>
lea    0xdb6(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x60,%eax
jmp    124f <main+0x8f>
mov    0x8(%rbx),%rdi
lea    0xdbc(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1334 <main+0x174>
movq   $0x0,(%rsp)
lea    0xcdc(%rip),%rdi
lea    0xcde(%rip),%rsi
lea    0xd95(%rip),%rcx
jmp    1366 <main+0x1a6>
mov    0x8(%rbx),%rdi
lea    0xd90(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    138e <main+0x1ce>
movq   $0x0,(%rsp)
lea    0xca8(%rip),%rdi
lea    0xcaa(%rip),%rsi
lea    0xd69(%rip),%rcx
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%r9
xor    %r8d,%r8d
call   10d0 <execlp@plt>
lea    0xd69(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x64,%eax
jmp    124f <main+0x8f>
mov    0x8(%rbx),%rdx
lea    0xd3c(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1050 <errx@plt>
jmp    1378 <main+0x1b8>

LLVM IR (-O0):
%struct.passwd = type { i32 }
%struct.stat = type { i32 }
@.str = [14 x i8] c"/usr/bin/perl\00"
@.str.1 = [25 x i8] c"Usage: ./repomodwrap cmd\00"
@.str.2 = [7 x i8] c"apache\00"
@.str.3 = [24 x i8] c"Could not find web user\00"
@stderr = global i32 0
@.str.4 = [28 x i8] c"Wrong number of arguments.\0A\00"
@.str.5 = [11 x i8] c"BOITHOHOME\00"
@.str.6 = [19 x i8] c"getenv(BOITHOHOME)\00"
@.str.7 = [19 x i8] c"%s/perl/repomod.pl\00"
@.str.8 = [20 x i8] c"Could not setuid(0)\00"
@.str.9 = [21 x i8] c"Could not seteuid(0)\00"
@.str.10 = [11 x i8] c"production\00"
@.str.11 = [5 x i8] c"perl\00"
@.str.12 = [8 x i8] c"testing\00"
@.str.13 = [6 x i8] c"devel\00"
@.str.14 = [19 x i8] c"Wrong argument: %s\00"
@.str.15 = [23 x i8] c"Unable to exec program\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca [1024 x i8]
%10 = alloca i8*
%11 = alloca i32
%12 = alloca %struct.passwd*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca [1 x i8*]
%17 = alloca %struct.stat
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %8
%18 = call i32 (...) @getuid()
store i32 %18, i32* %15
%19 = bitcast [1 x i8*]* %16 to i8*
%20 = load i32, i32* %5
%21 = icmp slt i32 %20, 2
br i1 %21, label %22, label %24
22: ; preds = %3
%23 = call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %3
%25 = call %struct.passwd* @getpwnam(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
store %struct.passwd* %25, %struct.passwd** %12
%26 = icmp eq %struct.passwd* %25, null
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
store i32 80, i32* %4
br label %99
29: ; preds = %24
%30 = load %struct.passwd*, %struct.passwd** %12
%31 = getelementptr inbounds %struct.passwd, %struct.passwd* %30, i32 0, i32 0
%32 = load i32, i32* %31
store i32 %32, i32* %13
%33 = load i32, i32* %5
%34 = icmp ne i32 %33, 2
br i1 %34, label %35, label %38
35: ; preds = %29
%36 = load i32, i32* @stderr
%37 = call i32 @fprintf(i32 %36, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
store i32 98, i32* %4
br label %99
38: ; preds = %29
%39 = call i8* @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
store i8* %39, i8** %10
%40 = load i8*, i8** %10
%41 = icmp eq i8* %40, null
br i1 %41, label %42, label %44
42: ; preds = %38
%43 = call i32 @err(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
store i32 105, i32* %4
br label %99
44: ; preds = %38
%45 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%46 = load i8*, i8** %10
%47 = call i32 @snprintf(i8* %45, i32 1024, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i8* %46)
%48 = call i64 @setuid(i32 0)
%49 = icmp ne i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %44
%51 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
store i32 97, i32* %4
br label %99
52: ; preds = %44
%53 = call i64 @seteuid(i32 0)
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
store i32 96, i32* %4
br label %99
57: ; preds = %52
%58 = load i8**, i8*** %6
%59 = getelementptr inbounds i8*, i8** %58, i64 1
%60 = load i8*, i8** %59
%61 = call i64 @strcmp(i8* %60, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %68
63: ; preds = %57
%64 = load i8*, i8** %8
%65 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%66 = getelementptr inbounds [1 x i8*], [1 x i8*]* %16, i64 0, i64 0
%67 = call i32 @execlp(i8* %64, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* %65, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32* null, i8** %66, i32* null)
store i32 %67, i32* %11
br label %97
68: ; preds = %57
%69 = load i8**, i8*** %6
%70 = getelementptr inbounds i8*, i8** %69, i64 1
%71 = load i8*, i8** %70
%72 = call i64 @strcmp(i8* %71, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %79
74: ; preds = %68
%75 = load i8*, i8** %8
%76 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%77 = getelementptr inbounds [1 x i8*], [1 x i8*]* %16, i64 0, i64 0
%78 = call i32 @execlp(i8* %75, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32* null, i8** %77, i32* null)
store i32 %78, i32* %11
br label %96
79: ; preds = %68
%80 = load i8**, i8*** %6
%81 = getelementptr inbounds i8*, i8** %80, i64 1
%82 = load i8*, i8** %81
%83 = call i64 @strcmp(i8* %82, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
%84 = icmp eq i64 %83, 0
br i1 %84, label %85, label %90
85: ; preds = %79
%86 = load i8*, i8** %8
%87 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%88 = getelementptr inbounds [1 x i8*], [1 x i8*]* %16, i64 0, i64 0
%89 = call i32 @execlp(i8* %86, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* %87, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i32* null, i8** %88, i32* null)
store i32 %89, i32* %11
br label %95
90: ; preds = %79
%91 = load i8**, i8*** %6
%92 = getelementptr inbounds i8*, i8** %91, i64 1
%93 = load i8*, i8** %92
%94 = call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* %93)
br label %95
95: ; preds = %90, %85
br label %96
96: ; preds = %95, %74
br label %97
97: ; preds = %96, %63
%98 = call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0))
store i32 100, i32* %4
br label %99
99: ; preds = %97, %55, %50, %42, %35, %27
%100 = load i32, i32* %4
ret i32 %100
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
@.str = [14 x i8] c"/usr/bin/perl\00"
@.str.1 = [25 x i8] c"Usage: ./repomodwrap cmd\00"
@.str.2 = [7 x i8] c"apache\00"
@.str.3 = [24 x i8] c"Could not find web user\00"
@stderr = global i32 0
@.str.4 = [28 x i8] c"Wrong number of arguments.\0A\00"
@.str.5 = [11 x i8] c"BOITHOHOME\00"
@.str.6 = [19 x i8] c"getenv(BOITHOHOME)\00"
@.str.7 = [19 x i8] c"%s/perl/repomod.pl\00"
@.str.8 = [20 x i8] c"Could not setuid(0)\00"
@.str.9 = [21 x i8] c"Could not seteuid(0)\00"
@.str.10 = [11 x i8] c"production\00"
@.str.11 = [5 x i8] c"perl\00"
@.str.12 = [8 x i8] c"testing\00"
@.str.13 = [6 x i8] c"devel\00"
@.str.14 = [19 x i8] c"Wrong argument: %s\00"
@.str.15 = [23 x i8] c"Unable to exec program\00"
define i32 @main(i32 %0, i8** nocapture %1, i8** nocapture readnone %2) {
%4 = alloca [1024 x i8]
%5 = alloca [1 x i8*]
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%7 = tail call i32 (...) @getuid()
%8 = bitcast [1 x i8*]* %5 to i8*
%9 = bitcast [1 x i8*]* %5 to i64*
store i64 0, i64* %9
%10 = icmp slt i32 %0, 2
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = tail call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %3
%14 = tail call %struct.passwd* @getpwnam(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq %struct.passwd* %14, null
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
br label %66
18: ; preds = %13
%19 = icmp eq i32 %0, 2
br i1 %19, label %23, label %20
20: ; preds = %18
%21 = load i32, i32* @stderr
%22 = tail call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %66
23: ; preds = %18
%24 = tail call i8* @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%25 = icmp eq i8* %24, null
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %66
28: ; preds = %23
%29 = call i32 @snprintf(i8* %6, i32 1024, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i8* %24)
%30 = call i64 @setuid(i32 0)
%31 = icmp eq i64 %30, 0
br i1 %31, label %34, label %32
32: ; preds = %28
%33 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
br label %66
34: ; preds = %28
%35 = call i64 @seteuid(i32 0)
%36 = icmp eq i64 %35, 0
br i1 %36, label %39, label %37
37: ; preds = %34
%38 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
br label %66
39: ; preds = %34
%40 = getelementptr inbounds i8*, i8** %1, i64 1
%41 = load i8*, i8** %40
%42 = call i64 @strcmp(i8* %41, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %47
44: ; preds = %39
%45 = getelementptr inbounds [1 x i8*], [1 x i8*]* %5, i64 0, i64 0
%46 = call i32 @execlp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32* null, i8** %45, i32* null)
br label %64
47: ; preds = %39
%48 = load i8*, i8** %40
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %47
%52 = getelementptr inbounds [1 x i8*], [1 x i8*]* %5, i64 0, i64 0
%53 = call i32 @execlp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32* null, i8** %52, i32* null)
br label %64
54: ; preds = %47
%55 = load i8*, i8** %40
%56 = call i64 @strcmp(i8* %55, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
%57 = icmp eq i64 %56, 0
br i1 %57, label %58, label %61
58: ; preds = %54
%59 = getelementptr inbounds [1 x i8*], [1 x i8*]* %5, i64 0, i64 0
%60 = call i32 @execlp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i32* null, i8** %59, i32* null)
br label %64
61: ; preds = %54
%62 = load i8*, i8** %40
%63 = call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* %62)
br label %64
64: ; preds = %51, %61, %58, %44
%65 = call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0))
br label %66
66: ; preds = %64, %37, %32, %26, %20, %16
%67 = phi i32 [ 80, %16 ], [ 98, %20 ], [ 105, %26 ], [ 97, %32 ], [ 96, %37 ], [ 100, %64 ]
ret i32 %67
}