#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 stat {
  scalar_t__ st_uid;
  int st_mode;
  scalar_t__ st_gid;
};
struct passwd {
  char *pw_name;
  int /*<<< orphan*/ pw_dir;
};

/* Variables and functions */
int S_IRUSR;
int S_IWUSR;
int S_IXUSR;
scalar_t__ getgid();
struct passwd *getpwuid(scalar_t__);
scalar_t__ getuid();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stat(char *, struct stat *);
char *strcpy(char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int i = 1;
  while (argv[i] != NULL) {
    int flag1 = 0, flag2 = 0, flag3 = 0;
    struct stat buf;
    char *f = argv[i];
    stat(f, &buf);
    struct passwd *ptr;
    ptr = getpwuid(getuid());
    if (buf.st_uid == getuid()) {
      flag1 = 1;
      flag2 = 1;
    }
    if (((buf.st_mode & S_IRUSR) > 200) && ((buf.st_mode & S_IRUSR) < 300) &&
        (buf.st_mode & S_IWUSR > 100) && (buf.st_mode & S_IXUSR == 0)) {
      flag1 = 1;
      flag2 = 1;
      flag3 = 0;
    }
    if (((buf.st_mode & S_IWUSR) > 200) && ((buf.st_mode & S_IWUSR) < 200)) {
      flag2 = 1;
    }
    if ((buf.st_mode & S_IXUSR) > 0) {
      flag3 = 1;
    }
    if (buf.st_gid == getgid()) {
      flag1 = 1;
      flag2 = 1;
    }
    f = strcpy(argv[i], ptr->pw_dir);
    stat(f, &buf);
    if ((buf.st_mode & S_IRUSR) < 99) {
      flag1 = 1;
    }
    if ((buf.st_mode & S_IWUSR) < 99) {
      flag2 = 1;
    }
    if ((buf.st_mode & S_IXUSR) > 100) {
      flag3 = 1;
    }
    printf("User's Permissions: -");
    if (flag1 == 1)
      printf("r");
    else
      printf("-");
    if (flag2 == 1)
      printf("w");
    else
      printf("-");
    if (flag3 == 1)
      printf("x\t");
    else
      printf("-\t");
    printf("%s\t", ptr->pw_name);
    printf("%s\n", argv[i]);
    i++;
  }
  return 0;
}


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)
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     144e <main+0x2ee>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1070 <stat@plt>
mov    $0x0,%al
call   1050 <getuid@plt>
mov    %rax,%rdi
call   1040 <getpwuid@plt>
mov    %rax,-0x48(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    $0x0,%al
call   1050 <getuid@plt>
mov    %rax,%rcx
mov    -0x50(%rbp),%rax
cmp    %rcx,%rax
jne    1202 <main+0xa2>
movl   $0x1,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x30(%rbp),%eax
mov    0x2dc4(%rip),%rcx
and    (%rcx),%eax
cmp    $0xc8,%eax
jle    1287 <main+0x127>
mov    -0x30(%rbp),%eax
mov    0x2dad(%rip),%rcx
and    (%rcx),%eax
cmp    $0x12c,%eax
jge    1287 <main+0x127>
mov    -0x30(%rbp),%eax
mov    0x2da6(%rip),%rcx
cmpl   $0x64,(%rcx)
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1287 <main+0x127>
mov    -0x30(%rbp),%eax
mov    0x2d8d(%rip),%rcx
cmpl   $0x0,(%rcx)
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1287 <main+0x127>
movl   $0x1,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x30(%rbp),%eax
mov    0x2d4f(%rip),%rcx
and    (%rcx),%eax
cmp    $0xc8,%eax
jle    12bc <main+0x15c>
mov    -0x30(%rbp),%eax
mov    0x2d38(%rip),%rcx
and    (%rcx),%eax
cmp    $0xc8,%eax
jge    12bc <main+0x15c>
movl   $0x1,-0x1c(%rbp)
mov    -0x30(%rbp),%eax
mov    0x2d22(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
jle    12d8 <main+0x178>
movl   $0x1,-0x20(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    $0x0,%al
call   1080 <getgid@plt>
mov    %rax,%rcx
mov    -0x58(%rbp),%rax
cmp    %rcx,%rax
jne    1305 <main+0x1a5>
movl   $0x1,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x48(%rbp),%rax
mov    0x8(%rax),%esi
call   1030 <strcpy@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1070 <stat@plt>
mov    -0x30(%rbp),%eax
mov    0x2c98(%rip),%rcx
and    (%rcx),%eax
cmp    $0x63,%eax
jge    134a <main+0x1ea>
movl   $0x1,-0x18(%rbp)
mov    -0x30(%rbp),%eax
mov    0x2c8c(%rip),%rcx
and    (%rcx),%eax
cmp    $0x63,%eax
jge    1366 <main+0x206>
movl   $0x1,-0x1c(%rbp)
mov    -0x30(%rbp),%eax
mov    0x2c78(%rip),%rcx
and    (%rcx),%eax
cmp    $0x64,%eax
jle    1382 <main+0x222>
movl   $0x1,-0x20(%rbp)
lea    0xc77(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x1,-0x18(%rbp)
jne    13ad <main+0x24d>
lea    0xc75(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13bb <main+0x25b>
lea    0xc60(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x1,-0x1c(%rbp)
jne    13d8 <main+0x278>
lea    0xc4c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13e6 <main+0x286>
lea    0xc35(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x1,-0x20(%rbp)
jne    1403 <main+0x2a3>
lea    0xc23(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1411 <main+0x2b1>
lea    0xc13(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x48(%rbp),%rax
mov    (%rax),%rsi
lea    0xc01(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xbeb(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    117d <main+0x1d>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
je     1355 <main+0x1d5>
mov    %rsi,%rbx
add    $0x8,%rbx
lea    0x20(%rsp),%r14
mov    0x2e22(%rip),%r12
jmp    12d6 <main+0x156>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %edx,0xc(%rsp)
mov    0x2e1d(%rip),%rax
and    (%rax),%r15d
mov    0x30(%rsp),%rbp
xor    %eax,%eax
call   10a0 <getgid@plt>
cmp    %rax,%rbp
sete   %bpl
mov    (%rbx),%rdi
mov    0x8(%r13),%esi
call   1040 <strcpy@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1090 <stat@plt>
mov    0x28(%rsp),%r14d
mov    %rbx,0x18(%rsp)
mov    %r12,%rbx
mov    (%r12),%r12d
and    %r14d,%r12d
mov    0x2dcd(%rip),%rax
mov    %r13,0x10(%rsp)
mov    (%rax),%r13d
and    %r14d,%r13d
mov    0x2dc3(%rip),%rax
and    (%rax),%r14d
lea    0xdd1(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
cmpl   $0x0,0xc(%rsp)
setne  %al
or     %bpl,%al
mov    $0x2d,%edi
mov    $0x72,%eax
cmovne %eax,%edi
mov    $0x2d,%ebp
mov    $0x77,%ecx
cmovne %ecx,%ebp
cmp    $0x63,%r12d
mov    %rbx,%r12
mov    0x18(%rsp),%rbx
cmovl  %eax,%edi
call   1030 <putchar@plt>
cmp    $0x63,%r13d
mov    $0x77,%eax
cmovl  %eax,%ebp
mov    %ebp,%edi
call   1030 <putchar@plt>
test   %r15d,%r15d
lea    0xd8d(%rip),%rdi
lea    0xd83(%rip),%rax
cmovg  %rax,%rdi
cmp    $0x65,%r14d
lea    0x20(%rsp),%r14
cmovge %rax,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%rsi
lea    0xd62(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    (%rbx),%rdi
call   1050 <puts@plt>
mov    0x8(%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
je     1355 <main+0x1d5>
mov    %r14,%rsi
call   1090 <stat@plt>
xor    %eax,%eax
call   1070 <getuid@plt>
mov    %rax,%rdi
call   1060 <getpwuid@plt>
mov    %rax,%r13
mov    0x20(%rsp),%rbp
xor    %eax,%eax
call   1070 <getuid@plt>
xor    %edx,%edx
cmp    %rax,%rbp
sete   %dl
mov    0x28(%rsp),%r15d
mov    (%r12),%eax
and    %r15d,%eax
add    $0xffffff37,%eax
cmp    $0x62,%eax
ja     11c0 <main+0x40>
xor    %eax,%eax
mov    0x2cb9(%rip),%rcx
cmpl   $0x65,(%rcx)
setge  %al
test   %eax,%r15d
je     11c0 <main+0x40>
xor    %eax,%eax
mov    0x2ca9(%rip),%rcx
cmpl   $0x0,(%rcx)
sete   %al
test   %eax,%r15d
mov    $0x1,%eax
cmovne %eax,%edx
jmp    11c0 <main+0x40>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i64, i32, i64 }
%struct.passwd = type { i8*, i32 }
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@.str = [22 x i8] c"User's Permissions: -\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [2 x i8] c"-\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [3 x i8] c"x\09\00"
@.str.5 = [3 x i8] c"-\09\00"
@.str.6 = [4 x i8] c"%s\09\00"
@.str.7 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.stat
%11 = alloca i8*
%12 = alloca %struct.passwd*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %13
13: ; preds = %144, %2
%14 = load i8**, i8*** %5
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
%18 = load i8*, i8** %17
%19 = icmp ne i8* %18, null
br i1 %19, label %20, label %157
20: ; preds = %13
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
%21 = load i8**, i8*** %5
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8*, i8** %21, i64 %23
%25 = load i8*, i8** %24
store i8* %25, i8** %11
%26 = load i8*, i8** %11
%27 = call i32 @stat(i8* %26, %struct.stat* %10)
%28 = call i64 (...) @getuid()
%29 = call %struct.passwd* @getpwuid(i64 %28)
store %struct.passwd* %29, %struct.passwd** %12
%30 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%31 = load i64, i64* %30
%32 = call i64 (...) @getuid()
%33 = icmp eq i64 %31, %32
br i1 %33, label %34, label %35
34: ; preds = %20
store i32 1, i32* %7
store i32 1, i32* %8
br label %35
35: ; preds = %34, %20
%36 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%37 = load i32, i32* %36
%38 = load i32, i32* @S_IRUSR
%39 = and i32 %37, %38
%40 = icmp sgt i32 %39, 200
br i1 %40, label %41, label %64
41: ; preds = %35
%42 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%43 = load i32, i32* %42
%44 = load i32, i32* @S_IRUSR
%45 = and i32 %43, %44
%46 = icmp slt i32 %45, 300
br i1 %46, label %47, label %64
47: ; preds = %41
%48 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%49 = load i32, i32* %48
%50 = load i32, i32* @S_IWUSR
%51 = icmp sgt i32 %50, 100
%52 = zext i1 %51 to i32
%53 = and i32 %49, %52
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %64
55: ; preds = %47
%56 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%57 = load i32, i32* %56
%58 = load i32, i32* @S_IXUSR
%59 = icmp eq i32 %58, 0
%60 = zext i1 %59 to i32
%61 = and i32 %57, %60
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %64
63: ; preds = %55
store i32 1, i32* %7
store i32 1, i32* %8
store i32 0, i32* %9
br label %64
64: ; preds = %63, %55, %47, %41, %35
%65 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%66 = load i32, i32* %65
%67 = load i32, i32* @S_IWUSR
%68 = and i32 %66, %67
%69 = icmp sgt i32 %68, 200
br i1 %69, label %70, label %77
70: ; preds = %64
%71 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%72 = load i32, i32* %71
%73 = load i32, i32* @S_IWUSR
%74 = and i32 %72, %73
%75 = icmp slt i32 %74, 200
br i1 %75, label %76, label %77
76: ; preds = %70
store i32 1, i32* %8
br label %77
77: ; preds = %76, %70, %64
%78 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%79 = load i32, i32* %78
%80 = load i32, i32* @S_IXUSR
%81 = and i32 %79, %80
%82 = icmp sgt i32 %81, 0
br i1 %82, label %83, label %84
83: ; preds = %77
store i32 1, i32* %9
br label %84
84: ; preds = %83, %77
%85 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 2
%86 = load i64, i64* %85
%87 = call i64 (...) @getgid()
%88 = icmp eq i64 %86, %87
br i1 %88, label %89, label %90
89: ; preds = %84
store i32 1, i32* %7
store i32 1, i32* %8
br label %90
90: ; preds = %89, %84
%91 = load i8**, i8*** %5
%92 = load i32, i32* %6
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i8*, i8** %91, i64 %93
%95 = load i8*, i8** %94
%96 = load %struct.passwd*, %struct.passwd** %12
%97 = getelementptr inbounds %struct.passwd, %struct.passwd* %96, i32 0, i32 1
%98 = load i32, i32* %97
%99 = call i8* @strcpy(i8* %95, i32 %98)
store i8* %99, i8** %11
%100 = load i8*, i8** %11
%101 = call i32 @stat(i8* %100, %struct.stat* %10)
%102 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%103 = load i32, i32* %102
%104 = load i32, i32* @S_IRUSR
%105 = and i32 %103, %104
%106 = icmp slt i32 %105, 99
br i1 %106, label %107, label %108
107: ; preds = %90
store i32 1, i32* %7
br label %108
108: ; preds = %107, %90
%109 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%110 = load i32, i32* %109
%111 = load i32, i32* @S_IWUSR
%112 = and i32 %110, %111
%113 = icmp slt i32 %112, 99
br i1 %113, label %114, label %115
114: ; preds = %108
store i32 1, i32* %8
br label %115
115: ; preds = %114, %108
%116 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%117 = load i32, i32* %116
%118 = load i32, i32* @S_IXUSR
%119 = and i32 %117, %118
%120 = icmp sgt i32 %119, 100
br i1 %120, label %121, label %122
121: ; preds = %115
store i32 1, i32* %9
br label %122
122: ; preds = %121, %115
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%124 = load i32, i32* %7
%125 = icmp eq i32 %124, 1
br i1 %125, label %126, label %128
126: ; preds = %122
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %130
128: ; preds = %122
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %130
130: ; preds = %128, %126
%131 = load i32, i32* %8
%132 = icmp eq i32 %131, 1
br i1 %132, label %133, label %135
133: ; preds = %130
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %137
135: ; preds = %130
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %137
137: ; preds = %135, %133
%138 = load i32, i32* %9
%139 = icmp eq i32 %138, 1
br i1 %139, label %140, label %142
140: ; preds = %137
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %144
142: ; preds = %137
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %144
144: ; preds = %142, %140
%145 = load %struct.passwd*, %struct.passwd** %12
%146 = getelementptr inbounds %struct.passwd, %struct.passwd* %145, i32 0, i32 0
%147 = load i8*, i8** %146
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %147)
%149 = load i8**, i8*** %5
%150 = load i32, i32* %6
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds i8*, i8** %149, i64 %151
%153 = load i8*, i8** %152
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %153)
%155 = load i32, i32* %6
%156 = add nsw i32 %155, 1
store i32 %156, i32* %6
br label %13
157: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i64, i32, i64 }
%struct.passwd = type { i8*, i32 }
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@.str = [22 x i8] c"User's Permissions: -\00"
@.str.4 = [3 x i8] c"x\09\00"
@.str.5 = [3 x i8] c"-\09\00"
@.str.6 = [4 x i8] c"%s\09\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
br i1 %6, label %85, label %7
7: ; preds = %2
%8 = bitcast %struct.stat* %3 to i8*
%9 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%10 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 1
%11 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 2
br label %12
12: ; preds = %7, %41
%13 = phi i64 [ 1, %7 ], [ %81, %41 ]
%14 = phi i8* [ %5, %7 ], [ %83, %41 ]
%15 = phi i8** [ %4, %7 ], [ %82, %41 ]
%16 = call i32 @stat(i8* %14, %struct.stat* %3)
%17 = tail call i64 (...) @getuid()
%18 = tail call %struct.passwd* @getpwuid(i64 %17)
%19 = load i64, i64* %9
%20 = tail call i64 (...) @getuid()
%21 = icmp eq i64 %19, %20
%22 = zext i1 %21 to i32
%23 = load i32, i32* %10
%24 = load i32, i32* @S_IRUSR
%25 = and i32 %24, %23
%26 = add i32 %25, -201
%27 = icmp ult i32 %26, 99
br i1 %27, label %28, label %41
28: ; preds = %12
%29 = load i32, i32* @S_IWUSR
%30 = icmp sgt i32 %29, 100
%31 = zext i1 %30 to i32
%32 = and i32 %23, %31
%33 = icmp eq i32 %32, 0
br i1 %33, label %41, label %34
34: ; preds = %28
%35 = load i32, i32* @S_IXUSR
%36 = icmp eq i32 %35, 0
%37 = zext i1 %36 to i32
%38 = and i32 %23, %37
%39 = icmp eq i32 %38, 0
%40 = select i1 %39, i32 %22, i32 1
br label %41
41: ; preds = %34, %28, %12
%42 = phi i32 [ %22, %28 ], [ %22, %12 ], [ %40, %34 ]
%43 = load i32, i32* @S_IXUSR
%44 = and i32 %43, %23
%45 = icmp sgt i32 %44, 0
%46 = load i64, i64* %11
%47 = tail call i64 (...) @getgid()
%48 = icmp eq i64 %46, %47
%49 = load i8*, i8** %15
%50 = getelementptr inbounds %struct.passwd, %struct.passwd* %18, i64 0, i32 1
%51 = load i32, i32* %50
%52 = tail call i8* @strcpy(i8* %49, i32 %51)
%53 = call i32 @stat(i8* %52, %struct.stat* %3)
%54 = load i32, i32* %10
%55 = load i32, i32* @S_IRUSR
%56 = and i32 %55, %54
%57 = icmp slt i32 %56, 99
%58 = load i32, i32* @S_IWUSR
%59 = and i32 %58, %54
%60 = icmp slt i32 %59, 99
%61 = load i32, i32* @S_IXUSR
%62 = and i32 %61, %54
%63 = icmp sgt i32 %62, 100
%64 = select i1 %63, i1 true, i1 %45
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%66 = icmp eq i32 %42, 1
%67 = select i1 %48, i1 true, i1 %66
%68 = select i1 %57, i1 true, i1 %67
%69 = select i1 %68, i32 114, i32 45
%70 = tail call i32 @putchar(i32 %69)
%71 = select i1 %60, i1 true, i1 %67
%72 = select i1 %71, i32 119, i32 45
%73 = tail call i32 @putchar(i32 %72)
%74 = select i1 %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %74)
%76 = getelementptr inbounds %struct.passwd, %struct.passwd* %18, i64 0, i32 0
%77 = load i8*, i8** %76
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %77)
%79 = load i8*, i8** %15
%80 = tail call i32 @puts(i8* dereferenceable(1) %79)
%81 = add nuw i64 %13, 1
%82 = getelementptr inbounds i8*, i8** %1, i64 %81
%83 = load i8*, i8** %82
%84 = icmp eq i8* %83, null
br i1 %84, label %85, label %12
85: ; preds = %41, %2
ret i32 0
}