#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 */
#define S_IFBLK 134
#define S_IFCHR 133
#define S_IFDIR 132
#define S_IFIFO 131
#define S_IFLNK 130
int S_IFMT;
#define S_IFREG 129
#define S_IFSOCK 128
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
int S_ISGID;
int S_ISUID;
int S_ISVTX;
int S_IWGRP;
int S_IWOTH;
int S_IWUSR;
int S_IXGRP;
int S_IXOTH;
int S_IXUSR;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strcpy(char *, char *);
void make_ls(mode_t mode, char *ls, int len) {
  if (len < 11) {
    printf("make_ls: ls length too short\n");
    exit(1);
  }
  strcpy(ls, "----------");
  switch (S_IFMT & mode) {
  case S_IFREG:
    ls[0] = '-';
    break;
  case S_IFDIR:
    ls[0] = 'd';
    break;
  case S_IFLNK:
    ls[0] = 'l';
    break;
  case S_IFIFO:
    ls[0] = 'p';
    break;
  case S_IFCHR:
    ls[0] = 'c';
    break;
  case S_IFBLK:
    ls[0] = 'b';
    break;
  case S_IFSOCK:
    ls[0] = 's';
    break;
  }
  if (mode & S_IRUSR)
    ls[1] = 'r';
  if (mode & S_IWUSR)
    ls[2] = 'w';
  if (mode & S_ISUID) {
    if (mode & S_IXUSR)
      ls[3] = 's';
    else
      ls[3] = 'S';
  } else if (mode & S_IXUSR)
    ls[3] = 'x';
  if (mode & S_IRGRP)
    ls[4] = 'r';
  if (mode & S_IWGRP)
    ls[5] = 'w';
  if (mode & S_ISGID) {
    if (mode & S_IXGRP)
      ls[6] = 's';
    else
      ls[6] = 'S';
  } else if (mode & S_IXGRP)
    ls[6] = 'x';
  if (mode & S_IROTH)
    ls[7] = 'r';
  if (mode & S_IWOTH)
    ls[8] = 'w';
  if (mode & S_ISVTX) {
    if (mode & S_IXOTH)
      ls[9] = 't';
    else
      ls[9] = 'T';
  } else if (mode & S_IXOTH)
    ls[9] = 'x';
  return;
}


x86 assembly (clang, -O0):
<make_ls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0xb,-0x14(%rbp)
jge    1162 <make_ls+0x32>
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rdi
lea    0xecd(%rip),%rsi
call   1030 <strcpy@plt>
mov    0x2e2f(%rip),%rax
mov    (%rax),%eax
mov    -0x4(%rbp),%ecx
and    %ecx,%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x6,%eax
ja     11f5 <make_ls+0xc5>
mov    -0x20(%rbp),%rax
lea    0xe63(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
movb   $0x2d,(%rax)
jmp    11f5 <make_ls+0xc5>
mov    -0x10(%rbp),%rax
movb   $0x64,(%rax)
jmp    11f5 <make_ls+0xc5>
mov    -0x10(%rbp),%rax
movb   $0x6c,(%rax)
jmp    11f5 <make_ls+0xc5>
mov    -0x10(%rbp),%rax
movb   $0x70,(%rax)
jmp    11f5 <make_ls+0xc5>
mov    -0x10(%rbp),%rax
movb   $0x63,(%rax)
jmp    11f5 <make_ls+0xc5>
mov    -0x10(%rbp),%rax
movb   $0x62,(%rax)
jmp    11f5 <make_ls+0xc5>
mov    -0x10(%rbp),%rax
movb   $0x73,(%rax)
mov    -0x4(%rbp),%eax
mov    0x2d89(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1212 <make_ls+0xe2>
mov    -0x10(%rbp),%rax
movb   $0x72,0x1(%rax)
mov    -0x4(%rbp),%eax
mov    0x2da4(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     122f <make_ls+0xff>
mov    -0x10(%rbp),%rax
movb   $0x77,0x2(%rax)
mov    -0x4(%rbp),%eax
mov    0x2d97(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1273 <make_ls+0x143>
mov    -0x4(%rbp),%eax
mov    0x2d8a(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1266 <make_ls+0x136>
mov    -0x10(%rbp),%rax
movb   $0x73,0x3(%rax)
jmp    126e <make_ls+0x13e>
mov    -0x10(%rbp),%rax
movb   $0x53,0x3(%rax)
jmp    1295 <make_ls+0x165>
mov    -0x4(%rbp),%eax
mov    0x2d5b(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1290 <make_ls+0x160>
mov    -0x10(%rbp),%rax
movb   $0x78,0x3(%rax)
jmp    1295 <make_ls+0x165>
mov    -0x4(%rbp),%eax
mov    0x2cf9(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     12b2 <make_ls+0x182>
mov    -0x10(%rbp),%rax
movb   $0x72,0x4(%rax)
mov    -0x4(%rbp),%eax
mov    0x2d0c(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     12cf <make_ls+0x19f>
mov    -0x10(%rbp),%rax
movb   $0x77,0x5(%rax)
mov    -0x4(%rbp),%eax
mov    0x2cc7(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1313 <make_ls+0x1e3>
mov    -0x4(%rbp),%eax
mov    0x2cca(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1306 <make_ls+0x1d6>
mov    -0x10(%rbp),%rax
movb   $0x73,0x6(%rax)
jmp    130e <make_ls+0x1de>
mov    -0x10(%rbp),%rax
movb   $0x53,0x6(%rax)
jmp    1335 <make_ls+0x205>
mov    -0x4(%rbp),%eax
mov    0x2c9b(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1330 <make_ls+0x200>
mov    -0x10(%rbp),%rax
movb   $0x78,0x6(%rax)
jmp    1335 <make_ls+0x205>
mov    -0x4(%rbp),%eax
mov    0x2c51(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1352 <make_ls+0x222>
mov    -0x10(%rbp),%rax
movb   $0x72,0x7(%rax)
mov    -0x4(%rbp),%eax
mov    0x2c1c(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     136f <make_ls+0x23f>
mov    -0x10(%rbp),%rax
movb   $0x77,0x8(%rax)
mov    -0x4(%rbp),%eax
mov    0x2c6f(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     13b3 <make_ls+0x283>
mov    -0x4(%rbp),%eax
mov    0x2c52(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     13a6 <make_ls+0x276>
mov    -0x10(%rbp),%rax
movb   $0x74,0x9(%rax)
jmp    13ae <make_ls+0x27e>
mov    -0x10(%rbp),%rax
movb   $0x54,0x9(%rax)
jmp    13d5 <make_ls+0x2a5>
mov    -0x4(%rbp),%eax
mov    0x2c23(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     13d0 <make_ls+0x2a0>
mov    -0x10(%rbp),%rax
movb   $0x78,0x9(%rax)
jmp    13d5 <make_ls+0x2a5>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_ls>:
push   %rbp
push   %rbx
push   %rax
cmp    $0xa,%edx
jle    125a <make_ls+0x12a>
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xeb8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%ecx
and    %ebp,%ecx
add    $0xffffff80,%ecx
cmp    $0x6,%ecx
ja     1175 <make_ls+0x45>
shl    $0x3,%ecx
movabs $0x626364706c2d73,%rax
shr    %cl,%rax
mov    %al,(%rbx)
mov    0x2e0c(%rip),%rax
test   %ebp,(%rax)
je     1184 <make_ls+0x54>
movb   $0x72,0x1(%rbx)
mov    0x2e35(%rip),%rax
test   %ebp,(%rax)
je     1193 <make_ls+0x63>
movb   $0x77,0x2(%rbx)
mov    0x2e36(%rip),%rcx
mov    0x2e37(%rip),%rax
mov    (%rax),%eax
test   %ebp,(%rcx)
je     11b1 <make_ls+0x81>
test   %ebp,%eax
je     11bb <make_ls+0x8b>
movb   $0x73,0x3(%rbx)
jmp    11bf <make_ls+0x8f>
test   %ebp,%eax
je     11bf <make_ls+0x8f>
movb   $0x78,0x3(%rbx)
jmp    11bf <make_ls+0x8f>
movb   $0x53,0x3(%rbx)
mov    0x2dd2(%rip),%rax
test   %ebp,(%rax)
je     11ce <make_ls+0x9e>
movb   $0x72,0x4(%rbx)
mov    0x2df3(%rip),%rax
test   %ebp,(%rax)
je     11dd <make_ls+0xad>
movb   $0x77,0x5(%rbx)
mov    0x2dbc(%rip),%rcx
mov    0x2dcd(%rip),%rax
mov    (%rax),%eax
test   %ebp,(%rcx)
je     11fb <make_ls+0xcb>
test   %ebp,%eax
je     1205 <make_ls+0xd5>
movb   $0x73,0x6(%rbx)
jmp    1209 <make_ls+0xd9>
test   %ebp,%eax
je     1209 <make_ls+0xd9>
movb   $0x78,0x6(%rbx)
jmp    1209 <make_ls+0xd9>
movb   $0x53,0x6(%rbx)
mov    0x2d80(%rip),%rax
test   %ebp,(%rax)
je     1218 <make_ls+0xe8>
movb   $0x72,0x7(%rbx)
mov    0x2d59(%rip),%rax
test   %ebp,(%rax)
je     1227 <make_ls+0xf7>
movb   $0x77,0x8(%rbx)
mov    0x2dba(%rip),%rcx
mov    0x2dab(%rip),%rax
mov    (%rax),%eax
test   %ebp,(%rcx)
je     1245 <make_ls+0x115>
test   %ebp,%eax
je     124f <make_ls+0x11f>
movb   $0x74,0x9(%rbx)
jmp    1253 <make_ls+0x123>
test   %ebp,%eax
je     1253 <make_ls+0x123>
movb   $0x78,0x9(%rbx)
jmp    1253 <make_ls+0x123>
movb   $0x54,0x9(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xdaa(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str.1 = [11 x i8] c"----------\00"
@S_IFMT = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_ISUID = global i32 0
@S_IXUSR = global i32 0
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_ISGID = global i32 0
@S_IXGRP = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_ISVTX = global i32 0
@S_IXOTH = global i32 0
@str = [29 x i8] c"make_ls: ls length too short\00"
define void @make_ls(i32 %0, i8* %1, i32 %2) {
%4 = icmp slt i32 %2, 11
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %3
%9 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* @S_IFMT
%11 = and i32 %10, %0
%12 = add i32 %11, -128
%13 = icmp ult i32 %12, 7
br i1 %13, label %14, label %19
14: ; preds = %8
%15 = zext i32 %12 to i56
%16 = shl nuw nsw i56 %15, 3
%17 = lshr i56 27693830751661427, %16
%18 = trunc i56 %17 to i8
store i8 %18, i8* %1
br label %19
19: ; preds = %8, %14
%20 = load i32, i32* @S_IRUSR
%21 = and i32 %20, %0
%22 = icmp eq i32 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %19
%24 = getelementptr inbounds i8, i8* %1, i64 1
store i8 114, i8* %24
br label %25
25: ; preds = %23, %19
%26 = load i32, i32* @S_IWUSR
%27 = and i32 %26, %0
%28 = icmp eq i32 %27, 0
br i1 %28, label %31, label %29
29: ; preds = %25
%30 = getelementptr inbounds i8, i8* %1, i64 2
store i8 119, i8* %30
br label %31
31: ; preds = %29, %25
%32 = load i32, i32* @S_ISUID
%33 = and i32 %32, %0
%34 = icmp eq i32 %33, 0
%35 = load i32, i32* @S_IXUSR
%36 = and i32 %35, %0
%37 = icmp eq i32 %36, 0
br i1 %34, label %42, label %38
38: ; preds = %31
%39 = getelementptr inbounds i8, i8* %1, i64 3
br i1 %37, label %41, label %40
40: ; preds = %38
store i8 115, i8* %39
br label %45
41: ; preds = %38
store i8 83, i8* %39
br label %45
42: ; preds = %31
br i1 %37, label %45, label %43
43: ; preds = %42
%44 = getelementptr inbounds i8, i8* %1, i64 3
store i8 120, i8* %44
br label %45
45: ; preds = %42, %43, %40, %41
%46 = load i32, i32* @S_IRGRP
%47 = and i32 %46, %0
%48 = icmp eq i32 %47, 0
br i1 %48, label %51, label %49
49: ; preds = %45
%50 = getelementptr inbounds i8, i8* %1, i64 4
store i8 114, i8* %50
br label %51
51: ; preds = %49, %45
%52 = load i32, i32* @S_IWGRP
%53 = and i32 %52, %0
%54 = icmp eq i32 %53, 0
br i1 %54, label %57, label %55
55: ; preds = %51
%56 = getelementptr inbounds i8, i8* %1, i64 5
store i8 119, i8* %56
br label %57
57: ; preds = %55, %51
%58 = load i32, i32* @S_ISGID
%59 = and i32 %58, %0
%60 = icmp eq i32 %59, 0
%61 = load i32, i32* @S_IXGRP
%62 = and i32 %61, %0
%63 = icmp eq i32 %62, 0
br i1 %60, label %68, label %64
64: ; preds = %57
%65 = getelementptr inbounds i8, i8* %1, i64 6
br i1 %63, label %67, label %66
66: ; preds = %64
store i8 115, i8* %65
br label %71
67: ; preds = %64
store i8 83, i8* %65
br label %71
68: ; preds = %57
br i1 %63, label %71, label %69
69: ; preds = %68
%70 = getelementptr inbounds i8, i8* %1, i64 6
store i8 120, i8* %70
br label %71
71: ; preds = %68, %69, %66, %67
%72 = load i32, i32* @S_IROTH
%73 = and i32 %72, %0
%74 = icmp eq i32 %73, 0
br i1 %74, label %77, label %75
75: ; preds = %71
%76 = getelementptr inbounds i8, i8* %1, i64 7
store i8 114, i8* %76
br label %77
77: ; preds = %75, %71
%78 = load i32, i32* @S_IWOTH
%79 = and i32 %78, %0
%80 = icmp eq i32 %79, 0
br i1 %80, label %83, label %81
81: ; preds = %77
%82 = getelementptr inbounds i8, i8* %1, i64 8
store i8 119, i8* %82
br label %83
83: ; preds = %81, %77
%84 = load i32, i32* @S_ISVTX
%85 = and i32 %84, %0
%86 = icmp eq i32 %85, 0
%87 = load i32, i32* @S_IXOTH
%88 = and i32 %87, %0
%89 = icmp eq i32 %88, 0
br i1 %86, label %94, label %90
90: ; preds = %83
%91 = getelementptr inbounds i8, i8* %1, i64 9
br i1 %89, label %93, label %92
92: ; preds = %90
store i8 116, i8* %91
br label %97
93: ; preds = %90
store i8 84, i8* %91
br label %97
94: ; preds = %83
br i1 %89, label %97, label %95
95: ; preds = %94
%96 = getelementptr inbounds i8, i8* %1, i64 9
store i8 120, i8* %96
br label %97
97: ; preds = %94, %95, %92, %93
ret void
}