#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 mode_t;

/* Variables and functions */
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
int S_IWGRP;
int S_IWOTH;
int S_IWUSR;
int S_IXGRP;
int S_IXOTH;
int S_IXUSR;
int aaip_cleanout_st_mode(char *, int *, int);
int /*<<< orphan*/ sprintf(char *, char *, char, char, char);
int strlen(char *);
int aaip_add_acl_st_mode(char *acl_text, mode_t st_mode, int flag) {
  char *wpt;
  int tag_types = 0;
  tag_types = aaip_cleanout_st_mode(acl_text, &st_mode, 1);
  if (!(tag_types & (4 | 32))) {
    wpt = acl_text + strlen(acl_text);
    sprintf(wpt, "user::%c%c%c\n", st_mode & S_IRUSR ? 'r' : '-',
            st_mode & S_IWUSR ? 'w' : '-', st_mode & S_IXUSR ? 'x' : '-');
  }
  if (!(tag_types & (2 | 16 | 1024))) {
    wpt = acl_text + strlen(acl_text);
    sprintf(wpt, "group::%c%c%c\n", st_mode & S_IRGRP ? 'r' : '-',
            st_mode & S_IWGRP ? 'w' : '-', st_mode & S_IXGRP ? 'x' : '-');
  }
  if (!(tag_types & (1 | 8))) {
    wpt = acl_text + strlen(acl_text);
    sprintf(wpt, "other::%c%c%c\n", st_mode & S_IROTH ? 'r' : '-',
            st_mode & S_IWOTH ? 'w' : '-', st_mode & S_IXOTH ? 'x' : '-');
  }
  if ((tag_types & (128 | 256)) && !(tag_types & 512)) {
    wpt = acl_text + strlen(acl_text);
    sprintf(wpt, "mask::%c%c%c\n", st_mode & S_IRGRP ? 'r' : '-',
            st_mode & S_IWGRP ? 'w' : '-', st_mode & S_IXGRP ? 'x' : '-');
  }
  return (1);
}


x86 assembly (clang, -O0):
<aaip_add_acl_st_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x1,%edx
call   1040 <aaip_cleanout_st_mode@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
and    $0x24,%eax
cmp    $0x0,%eax
jne    1203 <aaip_add_acl_st_mode+0xd3>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    0x2e0c(%rip),%rax
and    (%rax),%edx
mov    $0x2d,%eax
mov    $0x72,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,%dl
mov    -0xc(%rbp),%esi
mov    0x2e16(%rip),%rax
and    (%rax),%esi
mov    $0x2d,%eax
mov    $0x77,%ecx
cmp    $0x0,%esi
cmovne %ecx,%eax
mov    %al,%cl
mov    -0xc(%rbp),%r8d
mov    0x2e07(%rip),%rax
and    (%rax),%r8d
mov    $0x2d,%eax
mov    $0x78,%esi
cmp    $0x0,%r8d
cmovne %esi,%eax
lea    0xe0c(%rip),%rsi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %al,%r8d
call   1050 <sprintf@plt>
mov    -0x1c(%rbp),%eax
and    $0x412,%eax
cmp    $0x0,%eax
jne    12aa <aaip_add_acl_st_mode+0x17a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    0x2d75(%rip),%rax
and    (%rax),%edx
mov    $0x2d,%eax
mov    $0x72,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,%dl
mov    -0xc(%rbp),%esi
mov    0x2d77(%rip),%rax
and    (%rax),%esi
mov    $0x2d,%eax
mov    $0x77,%ecx
cmp    $0x0,%esi
cmovne %ecx,%eax
mov    %al,%cl
mov    -0xc(%rbp),%r8d
mov    0x2d48(%rip),%rax
and    (%rax),%r8d
mov    $0x2d,%eax
mov    $0x78,%esi
cmp    $0x0,%r8d
cmovne %esi,%eax
lea    0xd73(%rip),%rsi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %al,%r8d
call   1050 <sprintf@plt>
mov    -0x1c(%rbp),%eax
and    $0x9,%eax
cmp    $0x0,%eax
jne    134f <aaip_add_acl_st_mode+0x21f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    0x2cc8(%rip),%rax
and    (%rax),%edx
mov    $0x2d,%eax
mov    $0x72,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,%dl
mov    -0xc(%rbp),%esi
mov    0x2c92(%rip),%rax
and    (%rax),%esi
mov    $0x2d,%eax
mov    $0x77,%ecx
cmp    $0x0,%esi
cmovne %ecx,%eax
mov    %al,%cl
mov    -0xc(%rbp),%r8d
mov    0x2cc3(%rip),%rax
and    (%rax),%r8d
mov    $0x2d,%eax
mov    $0x78,%esi
cmp    $0x0,%r8d
cmovne %esi,%eax
lea    0xcdd(%rip),%rsi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %al,%r8d
call   1050 <sprintf@plt>
mov    -0x1c(%rbp),%eax
and    $0x180,%eax
cmp    $0x0,%eax
je     1407 <aaip_add_acl_st_mode+0x2d7>
mov    -0x1c(%rbp),%eax
and    $0x200,%eax
cmp    $0x0,%eax
jne    1407 <aaip_add_acl_st_mode+0x2d7>
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    0x2c18(%rip),%rax
and    (%rax),%edx
mov    $0x2d,%eax
mov    $0x72,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,%dl
mov    -0xc(%rbp),%esi
mov    0x2c1a(%rip),%rax
and    (%rax),%esi
mov    $0x2d,%eax
mov    $0x77,%ecx
cmp    $0x0,%esi
cmovne %ecx,%eax
mov    %al,%cl
mov    -0xc(%rbp),%r8d
mov    0x2beb(%rip),%rax
and    (%rax),%r8d
mov    $0x2d,%eax
mov    $0x78,%esi
cmp    $0x0,%r8d
cmovne %esi,%eax
lea    0xc34(%rip),%rsi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %al,%r8d
call   1050 <sprintf@plt>
mov    $0x1,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aaip_add_acl_st_mode>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edx
call   1040 <aaip_cleanout_st_mode@plt>
mov    %eax,%ebp
test   $0x24,%bpl
je     1178 <aaip_add_acl_st_mode+0x48>
test   $0x412,%ebp
je     11e6 <aaip_add_acl_st_mode+0xb6>
test   $0x9,%bpl
je     1252 <aaip_add_acl_st_mode+0x122>
test   $0x180,%ebp
jne    12bc <aaip_add_acl_st_mode+0x18c>
jmp    1326 <aaip_add_acl_st_mode+0x1f6>
mov    %rbx,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    0x4(%rsp),%eax
mov    0x2e17(%rip),%rcx
mov    (%rcx),%edx
and    %eax,%edx
mov    0x2e34(%rip),%rcx
mov    (%rcx),%ecx
and    %eax,%ecx
mov    0x2e39(%rip),%rsi
and    (%rsi),%eax
test   %ecx,%ecx
mov    $0x2d,%esi
mov    $0x77,%ecx
cmove  %esi,%ecx
test   %edx,%edx
mov    $0x72,%edx
cmove  %esi,%edx
test   %eax,%eax
mov    $0x78,%r8d
cmove  %esi,%r8d
lea    0xe2b(%rip),%rsi
call   1050 <sprintf@plt>
test   $0x412,%ebp
jne    115d <aaip_add_acl_st_mode+0x2d>
mov    %rbx,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    0x4(%rsp),%eax
mov    0x2db9(%rip),%rcx
mov    (%rcx),%edx
and    %eax,%edx
mov    0x2dce(%rip),%rcx
mov    (%rcx),%ecx
and    %eax,%ecx
mov    0x2db3(%rip),%rsi
and    (%rsi),%eax
test   %ecx,%ecx
mov    $0x2d,%esi
mov    $0x77,%ecx
cmove  %esi,%ecx
test   %edx,%edx
mov    $0x72,%edx
cmove  %esi,%edx
test   %eax,%eax
mov    $0x78,%r8d
cmove  %esi,%r8d
lea    0xdcb(%rip),%rsi
call   1050 <sprintf@plt>
test   $0x9,%bpl
jne    1167 <aaip_add_acl_st_mode+0x37>
mov    %rbx,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    0x4(%rsp),%eax
mov    0x2d45(%rip),%rcx
mov    (%rcx),%edx
and    %eax,%edx
mov    0x2d22(%rip),%rcx
mov    (%rcx),%ecx
and    %eax,%ecx
mov    0x2d67(%rip),%rsi
and    (%rsi),%eax
test   %ecx,%ecx
mov    $0x2d,%esi
mov    $0x77,%ecx
cmove  %esi,%ecx
test   %edx,%edx
mov    $0x72,%edx
cmove  %esi,%edx
test   %eax,%eax
mov    $0x78,%r8d
cmove  %esi,%r8d
lea    0xd6e(%rip),%rsi
call   1050 <sprintf@plt>
test   $0x180,%ebp
je     1326 <aaip_add_acl_st_mode+0x1f6>
and    $0x200,%ebp
jne    1326 <aaip_add_acl_st_mode+0x1f6>
mov    %rbx,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    0x4(%rsp),%eax
mov    0x2cdb(%rip),%rcx
mov    (%rcx),%edx
and    %eax,%edx
mov    0x2cf0(%rip),%rcx
mov    (%rcx),%ecx
and    %eax,%ecx
mov    0x2cd5(%rip),%rsi
and    (%rsi),%eax
test   %ecx,%ecx
mov    $0x2d,%esi
mov    $0x77,%ecx
cmove  %esi,%ecx
test   %edx,%edx
mov    $0x72,%edx
cmove  %esi,%edx
test   %eax,%eax
mov    $0x78,%r8d
cmove  %esi,%r8d
lea    0xd0b(%rip),%rsi
call   1050 <sprintf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"user::%c%c%c\0A\00"
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@.str.1 = [15 x i8] c"group::%c%c%c\0A\00"
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IXGRP = global i32 0
@.str.2 = [15 x i8] c"other::%c%c%c\0A\00"
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_IXOTH = global i32 0
@.str.3 = [14 x i8] c"mask::%c%c%c\0A\00"
define i32 @aaip_add_acl_st_mode(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %8
%9 = load i8*, i8** %4
%10 = call i32 @aaip_cleanout_st_mode(i8* %9, i32* %5, i32 1)
store i32 %10, i32* %8
%11 = load i32, i32* %8
%12 = and i32 %11, 36
%13 = icmp ne i32 %12, 0
br i1 %13, label %43, label %14
14: ; preds = %3
%15 = load i8*, i8** %4
%16 = load i8*, i8** %4
%17 = call i32 @strlen(i8* %16)
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %15, i64 %18
store i8* %19, i8** %7
%20 = load i8*, i8** %7
%21 = load i32, i32* %5
%22 = load i32, i32* @S_IRUSR
%23 = and i32 %21, %22
%24 = icmp ne i32 %23, 0
%25 = zext i1 %24 to i64
%26 = select i1 %24, i32 114, i32 45
%27 = trunc i32 %26 to i8
%28 = load i32, i32* %5
%29 = load i32, i32* @S_IWUSR
%30 = and i32 %28, %29
%31 = icmp ne i32 %30, 0
%32 = zext i1 %31 to i64
%33 = select i1 %31, i32 119, i32 45
%34 = trunc i32 %33 to i8
%35 = load i32, i32* %5
%36 = load i32, i32* @S_IXUSR
%37 = and i32 %35, %36
%38 = icmp ne i32 %37, 0
%39 = zext i1 %38 to i64
%40 = select i1 %38, i32 120, i32 45
%41 = trunc i32 %40 to i8
%42 = call i32 @sprintf(i8* %20, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 signext %27, i8 signext %34, i8 signext %41)
br label %43
43: ; preds = %14, %3
%44 = load i32, i32* %8
%45 = and i32 %44, 1042
%46 = icmp ne i32 %45, 0
br i1 %46, label %76, label %47
47: ; preds = %43
%48 = load i8*, i8** %4
%49 = load i8*, i8** %4
%50 = call i32 @strlen(i8* %49)
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8, i8* %48, i64 %51
store i8* %52, i8** %7
%53 = load i8*, i8** %7
%54 = load i32, i32* %5
%55 = load i32, i32* @S_IRGRP
%56 = and i32 %54, %55
%57 = icmp ne i32 %56, 0
%58 = zext i1 %57 to i64
%59 = select i1 %57, i32 114, i32 45
%60 = trunc i32 %59 to i8
%61 = load i32, i32* %5
%62 = load i32, i32* @S_IWGRP
%63 = and i32 %61, %62
%64 = icmp ne i32 %63, 0
%65 = zext i1 %64 to i64
%66 = select i1 %64, i32 119, i32 45
%67 = trunc i32 %66 to i8
%68 = load i32, i32* %5
%69 = load i32, i32* @S_IXGRP
%70 = and i32 %68, %69
%71 = icmp ne i32 %70, 0
%72 = zext i1 %71 to i64
%73 = select i1 %71, i32 120, i32 45
%74 = trunc i32 %73 to i8
%75 = call i32 @sprintf(i8* %53, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8 signext %60, i8 signext %67, i8 signext %74)
br label %76
76: ; preds = %47, %43
%77 = load i32, i32* %8
%78 = and i32 %77, 9
%79 = icmp ne i32 %78, 0
br i1 %79, label %109, label %80
80: ; preds = %76
%81 = load i8*, i8** %4
%82 = load i8*, i8** %4
%83 = call i32 @strlen(i8* %82)
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8, i8* %81, i64 %84
store i8* %85, i8** %7
%86 = load i8*, i8** %7
%87 = load i32, i32* %5
%88 = load i32, i32* @S_IROTH
%89 = and i32 %87, %88
%90 = icmp ne i32 %89, 0
%91 = zext i1 %90 to i64
%92 = select i1 %90, i32 114, i32 45
%93 = trunc i32 %92 to i8
%94 = load i32, i32* %5
%95 = load i32, i32* @S_IWOTH
%96 = and i32 %94, %95
%97 = icmp ne i32 %96, 0
%98 = zext i1 %97 to i64
%99 = select i1 %97, i32 119, i32 45
%100 = trunc i32 %99 to i8
%101 = load i32, i32* %5
%102 = load i32, i32* @S_IXOTH
%103 = and i32 %101, %102
%104 = icmp ne i32 %103, 0
%105 = zext i1 %104 to i64
%106 = select i1 %104, i32 120, i32 45
%107 = trunc i32 %106 to i8
%108 = call i32 @sprintf(i8* %86, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8 signext %93, i8 signext %100, i8 signext %107)
br label %109
109: ; preds = %80, %76
%110 = load i32, i32* %8
%111 = and i32 %110, 384
%112 = icmp ne i32 %111, 0
br i1 %112, label %113, label %146
113: ; preds = %109
%114 = load i32, i32* %8
%115 = and i32 %114, 512
%116 = icmp ne i32 %115, 0
br i1 %116, label %146, label %117
117: ; preds = %113
%118 = load i8*, i8** %4
%119 = load i8*, i8** %4
%120 = call i32 @strlen(i8* %119)
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds i8, i8* %118, i64 %121
store i8* %122, i8** %7
%123 = load i8*, i8** %7
%124 = load i32, i32* %5
%125 = load i32, i32* @S_IRGRP
%126 = and i32 %124, %125
%127 = icmp ne i32 %126, 0
%128 = zext i1 %127 to i64
%129 = select i1 %127, i32 114, i32 45
%130 = trunc i32 %129 to i8
%131 = load i32, i32* %5
%132 = load i32, i32* @S_IWGRP
%133 = and i32 %131, %132
%134 = icmp ne i32 %133, 0
%135 = zext i1 %134 to i64
%136 = select i1 %134, i32 119, i32 45
%137 = trunc i32 %136 to i8
%138 = load i32, i32* %5
%139 = load i32, i32* @S_IXGRP
%140 = and i32 %138, %139
%141 = icmp ne i32 %140, 0
%142 = zext i1 %141 to i64
%143 = select i1 %141, i32 120, i32 45
%144 = trunc i32 %143 to i8
%145 = call i32 @sprintf(i8* %123, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8 signext %130, i8 signext %137, i8 signext %144)
br label %146
146: ; preds = %117, %113, %109
ret i32 1
}

LLVM IR (-O2):
@.str = [14 x i8] c"user::%c%c%c\0A\00"
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@.str.1 = [15 x i8] c"group::%c%c%c\0A\00"
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IXGRP = global i32 0
@.str.2 = [15 x i8] c"other::%c%c%c\0A\00"
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_IXOTH = global i32 0
@.str.3 = [14 x i8] c"mask::%c%c%c\0A\00"
define i32 @aaip_add_acl_st_mode(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
store i32 %1, i32* %4
%5 = call i32 @aaip_cleanout_st_mode(i8* %0, i32* %4, i32 1)
%6 = and i32 %5, 36
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %26
8: ; preds = %3
%9 = call i32 @strlen(i8* %0)
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i32, i32* %4
%13 = load i32, i32* @S_IRUSR
%14 = and i32 %13, %12
%15 = icmp eq i32 %14, 0
%16 = select i1 %15, i8 45, i8 114
%17 = load i32, i32* @S_IWUSR
%18 = and i32 %17, %12
%19 = icmp eq i32 %18, 0
%20 = select i1 %19, i8 45, i8 119
%21 = load i32, i32* @S_IXUSR
%22 = and i32 %21, %12
%23 = icmp eq i32 %22, 0
%24 = select i1 %23, i8 45, i8 120
%25 = call i32 @sprintf(i8* dereferenceable(1) %11, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 signext %16, i8 signext %20, i8 signext %24)
br label %26
26: ; preds = %8, %3
%27 = and i32 %5, 1042
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %47
29: ; preds = %26
%30 = call i32 @strlen(i8* %0)
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %0, i64 %31
%33 = load i32, i32* %4
%34 = load i32, i32* @S_IRGRP
%35 = and i32 %34, %33
%36 = icmp eq i32 %35, 0
%37 = select i1 %36, i8 45, i8 114
%38 = load i32, i32* @S_IWGRP
%39 = and i32 %38, %33
%40 = icmp eq i32 %39, 0
%41 = select i1 %40, i8 45, i8 119
%42 = load i32, i32* @S_IXGRP
%43 = and i32 %42, %33
%44 = icmp eq i32 %43, 0
%45 = select i1 %44, i8 45, i8 120
%46 = call i32 @sprintf(i8* dereferenceable(1) %32, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8 signext %37, i8 signext %41, i8 signext %45)
br label %47
47: ; preds = %29, %26
%48 = and i32 %5, 9
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %68
50: ; preds = %47
%51 = call i32 @strlen(i8* %0)
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8, i8* %0, i64 %52
%54 = load i32, i32* %4
%55 = load i32, i32* @S_IROTH
%56 = and i32 %55, %54
%57 = icmp eq i32 %56, 0
%58 = select i1 %57, i8 45, i8 114
%59 = load i32, i32* @S_IWOTH
%60 = and i32 %59, %54
%61 = icmp eq i32 %60, 0
%62 = select i1 %61, i8 45, i8 119
%63 = load i32, i32* @S_IXOTH
%64 = and i32 %63, %54
%65 = icmp eq i32 %64, 0
%66 = select i1 %65, i8 45, i8 120
%67 = call i32 @sprintf(i8* dereferenceable(1) %53, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8 signext %58, i8 signext %62, i8 signext %66)
br label %68
68: ; preds = %50, %47
%69 = and i32 %5, 384
%70 = icmp ne i32 %69, 0
%71 = and i32 %5, 512
%72 = icmp eq i32 %71, 0
%73 = and i1 %70, %72
br i1 %73, label %74, label %92
74: ; preds = %68
%75 = call i32 @strlen(i8* %0)
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i8, i8* %0, i64 %76
%78 = load i32, i32* %4
%79 = load i32, i32* @S_IRGRP
%80 = and i32 %79, %78
%81 = icmp eq i32 %80, 0
%82 = select i1 %81, i8 45, i8 114
%83 = load i32, i32* @S_IWGRP
%84 = and i32 %83, %78
%85 = icmp eq i32 %84, 0
%86 = select i1 %85, i8 45, i8 119
%87 = load i32, i32* @S_IXGRP
%88 = and i32 %87, %78
%89 = icmp eq i32 %88, 0
%90 = select i1 %89, i8 45, i8 120
%91 = call i32 @sprintf(i8* dereferenceable(1) %77, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8 signext %82, i8 signext %86, i8 signext %90)
br label %92
92: ; preds = %74, %68
ret i32 1
}