#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 */
struct passwd {
  scalar_t__ pw_uid;
  char *pw_name;
  scalar_t__ pw_gid;
};
struct group {
  scalar_t__ gr_gid;
};

/* Variables and functions */
int errno;
int /*<<< orphan*/ execv(char *, char **);
char *getenv(char *);
struct group *getgrnam(char *);
struct passwd *getpwnam(char *);
scalar_t__ initgroups(char *, scalar_t__);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ setgid(scalar_t__);
scalar_t__ setuid(scalar_t__);
char *strerror(int);
int main(int argc, char *argv[]) {
  struct passwd *pw = NULL;
  struct group *gr = NULL;
  int errcode = 0;
  char *remote_user = getenv("WEBDAV_USER");
  if (remote_user == NULL)
    remote_user = getenv("REDIRECT_WEBDAV_USER");
  if (remote_user == NULL)
    remote_user = getenv("REMOTE_USER");
  if (remote_user == NULL)
    remote_user = getenv("REDIRECT_REMOTE_USER");
  if (remote_user != NULL)
    pw = getpwnam(remote_user);
  char *webdavgroup = getenv("WEBDAV_GROUP");
  if (webdavgroup == NULL)
    webdavgroup = getenv("REDIRECT_WEBDAV_GROUP");
  if (webdavgroup != NULL)
    gr = getgrnam(webdavgroup);
  if ((pw != NULL) && (pw->pw_uid != 0)) {
    if (initgroups(pw->pw_name, pw->pw_gid) == 0)
      if (setgid(gr != NULL && gr->gr_gid != 0 ? gr->gr_gid : pw->pw_gid) == 0)
        if (setuid(pw->pw_uid) == 0)
          execv("webdav.pl", argv);
        else
          printf("Status: 500 Internal Server Error: setuid failed for %s",
                 pw->pw_name);
      else
        printf("Status: 500 Internal Server Error: setgid failed for %s",
               pw->pw_name);
    else
      printf("Status: 500 Internal Server Error: initgroups failed for %s "
             "(errno=%d,%s)",
             pw->pw_name, errno, strerror(errno));
  } else {
    printf("Status: 404 Not Found\r\n");
    printf("Content-Type: text/plain\r\n\r\n");
    printf("404 Not Found - your wrapper");
  }
}


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)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
lea    0xe45(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    11e8 <main+0x58>
lea    0xe21(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1203 <main+0x73>
lea    0xe24(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    121e <main+0x8e>
lea    0xe00(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1236 <main+0xa6>
mov    -0x30(%rbp),%rdi
call   1050 <getpwnam@plt>
mov    %rax,-0x18(%rbp)
lea    0xdf6(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1261 <main+0xd1>
lea    0xdd2(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     1279 <main+0xe9>
mov    -0x38(%rbp),%rdi
call   1060 <getgrnam@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     139d <main+0x20d>
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     139d <main+0x20d>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rsi
call   10a0 <initgroups@plt>
cmp    $0x0,%rax
jne    135a <main+0x1ca>
cmpq   $0x0,-0x20(%rbp)
je     12da <main+0x14a>
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     12da <main+0x14a>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
jmp    12e6 <main+0x156>
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
call   1070 <setgid@plt>
cmp    $0x0,%rax
jne    133f <main+0x1af>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1080 <setuid@plt>
cmp    $0x0,%rax
jne    1324 <main+0x194>
mov    -0x10(%rbp),%rsi
lea    0xd26(%rip),%rdi
call   10b0 <execv@plt>
jmp    133a <main+0x1aa>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xd17(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1355 <main+0x1c5>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xd34(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1398 <main+0x208>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x50(%rbp)
mov    0x2c73(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    0x2c67(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x50(%rbp),%rsi
mov    -0x44(%rbp),%edx
mov    %rax,%rcx
lea    0xd29(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13c7 <main+0x237>
lea    0xd60(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd6a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd79(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0xe58(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
jne    11f2 <main+0x52>
lea    0xe3e(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
jne    11f2 <main+0x52>
lea    0xe4b(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
jne    11f2 <main+0x52>
lea    0xe31(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     12f7 <main+0x157>
mov    %rax,%rdi
call   1060 <getpwnam@plt>
mov    %rax,%rbx
lea    0xe2f(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
jne    121f <main+0x7f>
lea    0xe15(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     129b <main+0xfb>
mov    %rax,%rdi
call   1070 <getgrnam@plt>
mov    %rax,%r15
test   %rbx,%rbx
je     12a3 <main+0x103>
cmpq   $0x0,(%rbx)
je     12a3 <main+0x103>
mov    0x8(%rbx),%rdi
mov    0x10(%rbx),%rsi
call   10b0 <initgroups@plt>
test   %rax,%rax
je     1273 <main+0xd3>
mov    0x8(%rbx),%rbx
mov    0x2d8e(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
call   10a0 <strerror@plt>
lea    0xe58(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12c9 <main+0x129>
test   %r15,%r15
je     1280 <main+0xe0>
mov    (%r15),%rdi
test   %rdi,%rdi
jne    1284 <main+0xe4>
mov    0x10(%rbx),%rdi
call   1080 <setgid@plt>
test   %rax,%rax
je     12d6 <main+0x136>
mov    0x8(%rbx),%rsi
lea    0xde9(%rip),%rdi
jmp    12ee <main+0x14e>
xor    %r15d,%r15d
test   %rbx,%rbx
jne    122f <main+0x8f>
lea    0xe77(%rip),%rdi
call   1040 <puts@plt>
lea    0xe82(%rip),%rdi
call   1040 <puts@plt>
lea    0xe42(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%rbx),%rdi
call   1090 <setuid@plt>
test   %rax,%rax
je     12fe <main+0x15e>
mov    0x8(%rbx),%rsi
lea    0xd5c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12c9 <main+0x129>
xor    %ebx,%ebx
jmp    11fd <main+0x5d>
lea    0xd3b(%rip),%rdi
mov    %r14,%rsi
call   10c0 <execv@plt>
jmp    12c9 <main+0x129>

LLVM IR (-O0):
%struct.passwd = type { i64, i8*, i64 }
%struct.group = type { i64 }
@.str = [12 x i8] c"WEBDAV_USER\00"
@.str.1 = [21 x i8] c"REDIRECT_WEBDAV_USER\00"
@.str.2 = [12 x i8] c"REMOTE_USER\00"
@.str.3 = [21 x i8] c"REDIRECT_REMOTE_USER\00"
@.str.4 = [13 x i8] c"WEBDAV_GROUP\00"
@.str.5 = [22 x i8] c"REDIRECT_WEBDAV_GROUP\00"
@.str.6 = [10 x i8] c"webdav.pl\00"
@.str.7 = [56 x i8] c"Status: 500 Internal Server Error: setuid failed for %s\00"
@.str.8 = [56 x i8] c"Status: 500 Internal Server Error: setgid failed for %s\00"
@.str.9 = [74 x i8] c"Status: 500 Internal Server Error: initgroups failed for %s (errno=%d,%s)\00"
@errno = global i32 0
@.str.10 = [24 x i8] c"Status: 404 Not Found\0D\0A\00"
@.str.11 = [29 x i8] c"Content-Type: text/plain\0D\0A\0D\0A\00"
@.str.12 = [29 x i8] c"404 Not Found - your wrapper\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.passwd*
%7 = alloca %struct.group*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store %struct.passwd* null, %struct.passwd** %6
store %struct.group* null, %struct.group** %7
store i32 0, i32* %8
%11 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* %11, i8** %9
%12 = load i8*, i8** %9
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i8* @getenv(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
store i8* %15, i8** %9
br label %16
16: ; preds = %14, %2
%17 = load i8*, i8** %9
%18 = icmp eq i8* %17, null
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
store i8* %20, i8** %9
br label %21
21: ; preds = %19, %16
%22 = load i8*, i8** %9
%23 = icmp eq i8* %22, null
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i8* @getenv(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
store i8* %25, i8** %9
br label %26
26: ; preds = %24, %21
%27 = load i8*, i8** %9
%28 = icmp ne i8* %27, null
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load i8*, i8** %9
%31 = call %struct.passwd* @getpwnam(i8* %30)
store %struct.passwd* %31, %struct.passwd** %6
br label %32
32: ; preds = %29, %26
%33 = call i8* @getenv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
store i8* %33, i8** %10
%34 = load i8*, i8** %10
%35 = icmp eq i8* %34, null
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = call i8* @getenv(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
store i8* %37, i8** %10
br label %38
38: ; preds = %36, %32
%39 = load i8*, i8** %10
%40 = icmp ne i8* %39, null
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = load i8*, i8** %10
%43 = call %struct.group* @getgrnam(i8* %42)
store %struct.group* %43, %struct.group** %7
br label %44
44: ; preds = %41, %38
%45 = load %struct.passwd*, %struct.passwd** %6
%46 = icmp ne %struct.passwd* %45, null
br i1 %46, label %47, label %111
47: ; preds = %44
%48 = load %struct.passwd*, %struct.passwd** %6
%49 = getelementptr inbounds %struct.passwd, %struct.passwd* %48, i32 0, i32 0
%50 = load i64, i64* %49
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %111
52: ; preds = %47
%53 = load %struct.passwd*, %struct.passwd** %6
%54 = getelementptr inbounds %struct.passwd, %struct.passwd* %53, i32 0, i32 1
%55 = load i8*, i8** %54
%56 = load %struct.passwd*, %struct.passwd** %6
%57 = getelementptr inbounds %struct.passwd, %struct.passwd* %56, i32 0, i32 2
%58 = load i64, i64* %57
%59 = call i64 @initgroups(i8* %55, i64 %58)
%60 = icmp eq i64 %59, 0
br i1 %60, label %61, label %102
61: ; preds = %52
%62 = load %struct.group*, %struct.group** %7
%63 = icmp ne %struct.group* %62, null
br i1 %63, label %64, label %73
64: ; preds = %61
%65 = load %struct.group*, %struct.group** %7
%66 = getelementptr inbounds %struct.group, %struct.group* %65, i32 0, i32 0
%67 = load i64, i64* %66
%68 = icmp ne i64 %67, 0
br i1 %68, label %69, label %73
69: ; preds = %64
%70 = load %struct.group*, %struct.group** %7
%71 = getelementptr inbounds %struct.group, %struct.group* %70, i32 0, i32 0
%72 = load i64, i64* %71
br label %77
73: ; preds = %64, %61
%74 = load %struct.passwd*, %struct.passwd** %6
%75 = getelementptr inbounds %struct.passwd, %struct.passwd* %74, i32 0, i32 2
%76 = load i64, i64* %75
br label %77
77: ; preds = %73, %69
%78 = phi i64 [ %72, %69 ], [ %76, %73 ]
%79 = call i64 @setgid(i64 %78)
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %96
81: ; preds = %77
%82 = load %struct.passwd*, %struct.passwd** %6
%83 = getelementptr inbounds %struct.passwd, %struct.passwd* %82, i32 0, i32 0
%84 = load i64, i64* %83
%85 = call i64 @setuid(i64 %84)
%86 = icmp eq i64 %85, 0
br i1 %86, label %87, label %90
87: ; preds = %81
%88 = load i8**, i8*** %5
%89 = call i32 @execv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8** %88)
br label %95
90: ; preds = %81
%91 = load %struct.passwd*, %struct.passwd** %6
%92 = getelementptr inbounds %struct.passwd, %struct.passwd* %91, i32 0, i32 1
%93 = load i8*, i8** %92
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.7, i64 0, i64 0), i8* %93)
br label %95
95: ; preds = %90, %87
br label %101
96: ; preds = %77
%97 = load %struct.passwd*, %struct.passwd** %6
%98 = getelementptr inbounds %struct.passwd, %struct.passwd* %97, i32 0, i32 1
%99 = load i8*, i8** %98
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.8, i64 0, i64 0), i8* %99)
br label %101
101: ; preds = %96, %95
br label %110
102: ; preds = %52
%103 = load %struct.passwd*, %struct.passwd** %6
%104 = getelementptr inbounds %struct.passwd, %struct.passwd* %103, i32 0, i32 1
%105 = load i8*, i8** %104
%106 = load i32, i32* @errno
%107 = load i32, i32* @errno
%108 = call i8* @strerror(i32 %107)
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.9, i64 0, i64 0), i8* %105, i32 %106, i8* %108)
br label %110
110: ; preds = %102, %101
br label %115
111: ; preds = %47, %44
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0))
br label %115
115: ; preds = %111, %110
%116 = load i32, i32* %3
ret i32 %116
}

LLVM IR (-O2):
%struct.passwd = type { i64, i8*, i64 }
%struct.group = type { i64 }
@.str = [12 x i8] c"WEBDAV_USER\00"
@.str.1 = [21 x i8] c"REDIRECT_WEBDAV_USER\00"
@.str.2 = [12 x i8] c"REMOTE_USER\00"
@.str.3 = [21 x i8] c"REDIRECT_REMOTE_USER\00"
@.str.4 = [13 x i8] c"WEBDAV_GROUP\00"
@.str.5 = [22 x i8] c"REDIRECT_WEBDAV_GROUP\00"
@.str.6 = [10 x i8] c"webdav.pl\00"
@.str.7 = [56 x i8] c"Status: 500 Internal Server Error: setuid failed for %s\00"
@.str.8 = [56 x i8] c"Status: 500 Internal Server Error: setgid failed for %s\00"
@.str.9 = [74 x i8] c"Status: 500 Internal Server Error: initgroups failed for %s (errno=%d,%s)\00"
@errno = global i32 0
@.str.12 = [29 x i8] c"404 Not Found - your wrapper\00"
@str = [23 x i8] c"Status: 404 Not Found\0D\00"
@str.13 = [28 x i8] c"Content-Type: text/plain\0D\0A\0D\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = tail call i8* @getenv(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %14
8: ; preds = %5
%9 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = tail call i8* @getenv(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%13 = icmp eq i8* %12, null
br i1 %13, label %17, label %14
14: ; preds = %2, %5, %8, %11
%15 = phi i8* [ %12, %11 ], [ %9, %8 ], [ %6, %5 ], [ %3, %2 ]
%16 = tail call %struct.passwd* @getpwnam(i8* %15)
br label %17
17: ; preds = %14, %11
%18 = phi %struct.passwd* [ %16, %14 ], [ null, %11 ]
%19 = tail call i8* @getenv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp eq i8* %19, null
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = tail call i8* @getenv(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
%23 = icmp eq i8* %22, null
br i1 %23, label %27, label %24
24: ; preds = %17, %21
%25 = phi i8* [ %22, %21 ], [ %19, %17 ]
%26 = tail call %struct.group* @getgrnam(i8* %25)
br label %27
27: ; preds = %24, %21
%28 = phi %struct.group* [ %26, %24 ], [ null, %21 ]
%29 = icmp eq %struct.passwd* %18, null
br i1 %29, label %70, label %30
30: ; preds = %27
%31 = getelementptr inbounds %struct.passwd, %struct.passwd* %18, i64 0, i32 0
%32 = load i64, i64* %31
%33 = icmp eq i64 %32, 0
br i1 %33, label %70, label %34
34: ; preds = %30
%35 = getelementptr inbounds %struct.passwd, %struct.passwd* %18, i64 0, i32 1
%36 = load i8*, i8** %35
%37 = getelementptr inbounds %struct.passwd, %struct.passwd* %18, i64 0, i32 2
%38 = load i64, i64* %37
%39 = tail call i64 @initgroups(i8* %36, i64 %38)
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %65
41: ; preds = %34
%42 = icmp eq %struct.group* %28, null
br i1 %42, label %47, label %43
43: ; preds = %41
%44 = getelementptr inbounds %struct.group, %struct.group* %28, i64 0, i32 0
%45 = load i64, i64* %44
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %43, %41
%48 = load i64, i64* %37
br label %49
49: ; preds = %43, %47
%50 = phi i64 [ %48, %47 ], [ %45, %43 ]
%51 = tail call i64 @setgid(i64 %50)
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %62
53: ; preds = %49
%54 = load i64, i64* %31
%55 = tail call i64 @setuid(i64 %54)
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %59
57: ; preds = %53
%58 = tail call i32 @execv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8** %1)
br label %74
59: ; preds = %53
%60 = load i8*, i8** %35
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.7, i64 0, i64 0), i8* %60)
br label %74
62: ; preds = %49
%63 = load i8*, i8** %35
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.8, i64 0, i64 0), i8* %63)
br label %74
65: ; preds = %34
%66 = load i8*, i8** %35
%67 = load i32, i32* @errno
%68 = tail call i8* @strerror(i32 %67)
%69 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str.9, i64 0, i64 0), i8* %66, i32 %67, i8* %68)
br label %74
70: ; preds = %30, %27
%71 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%72 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.13, i64 0, i64 0))
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0))
br label %74
74: ; preds = %65, %57, %59, %62, %70
ret i32 0
}