#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 {
  int st_mode;
};

/* 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_ISGID;
int S_ISUID;
int /*<<< orphan*/ printf(char *, int);
void get_perm(struct stat *st, char *dst) {
  switch (st->st_mode & S_IFMT) {
  case S_IFREG:
    dst[0] = '-';
    break;
  case S_IFDIR:
    dst[0] = 'd';
    break;
  case S_IFCHR:
    dst[0] = 'c';
    break;
  case S_IFBLK:
    dst[0] = 'b';
    break;
  case S_IFLNK:
    dst[0] = 'l';
    break;
  case S_IFIFO:
    dst[0] = 'f';
    break;
  case S_IFSOCK:
    dst[0] = 's';
    break;
  default:
    dst[0] = '?';
    printf("Unknown property: %u", st->st_mode & S_IFMT);
    break;
  }
  if (st->st_mode & 0400)
    dst[1] = 'r';
  else
    dst[1] = '-';
  if (st->st_mode & 0200)
    dst[2] = 'w';
  else
    dst[2] = '-';
  if (st->st_mode & 0100)
    dst[3] = 'x';
  else
    dst[3] = '-';
  if ((st->st_mode & 0100) && (st->st_mode & S_ISUID))
    dst[3] = 's';
  if (st->st_mode & 0040)
    dst[4] = 'r';
  else
    dst[4] = '-';
  if (st->st_mode & 0020)
    dst[5] = 'w';
  else
    dst[5] = '-';
  if (st->st_mode & 0010)
    dst[6] = 'x';
  else
    dst[6] = '-';
  if ((st->st_mode & 0010) && (st->st_mode & S_ISGID))
    dst[6] = 's';
  if (st->st_mode & 0004)
    dst[7] = 'r';
  else
    dst[7] = '-';
  if (st->st_mode & 0002)
    dst[8] = 'w';
  else
    dst[8] = '-';
  if (st->st_mode & 0001)
    dst[9] = 'x';
  else
    dst[9] = '-';
}


x86 assembly (clang, -O0):
<get_perm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2eab(%rip),%rcx
mov    (%rcx),%ecx
and    %ecx,%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x6,%eax
ja     11ab <get_perm+0x9b>
mov    -0x18(%rbp),%rax
lea    0xeb2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
movb   $0x2d,(%rax)
jmp    11cd <get_perm+0xbd>
mov    -0x10(%rbp),%rax
movb   $0x64,(%rax)
jmp    11cd <get_perm+0xbd>
mov    -0x10(%rbp),%rax
movb   $0x63,(%rax)
jmp    11cd <get_perm+0xbd>
mov    -0x10(%rbp),%rax
movb   $0x62,(%rax)
jmp    11cd <get_perm+0xbd>
mov    -0x10(%rbp),%rax
movb   $0x6c,(%rax)
jmp    11cd <get_perm+0xbd>
mov    -0x10(%rbp),%rax
movb   $0x66,(%rax)
jmp    11cd <get_perm+0xbd>
mov    -0x10(%rbp),%rax
movb   $0x73,(%rax)
jmp    11cd <get_perm+0xbd>
mov    -0x10(%rbp),%rax
movb   $0x3f,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    0x2e19(%rip),%rax
and    (%rax),%esi
lea    0xe54(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x100,%eax
cmp    $0x0,%eax
je     11ee <get_perm+0xde>
mov    -0x10(%rbp),%rax
movb   $0x72,0x1(%rax)
jmp    11f6 <get_perm+0xe6>
mov    -0x10(%rbp),%rax
movb   $0x2d,0x1(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1217 <get_perm+0x107>
mov    -0x10(%rbp),%rax
movb   $0x77,0x2(%rax)
jmp    121f <get_perm+0x10f>
mov    -0x10(%rbp),%rax
movb   $0x2d,0x2(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     123e <get_perm+0x12e>
mov    -0x10(%rbp),%rax
movb   $0x78,0x3(%rax)
jmp    1246 <get_perm+0x136>
mov    -0x10(%rbp),%rax
movb   $0x2d,0x3(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     1278 <get_perm+0x168>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2d83(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1278 <get_perm+0x168>
mov    -0x10(%rbp),%rax
movb   $0x73,0x3(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1297 <get_perm+0x187>
mov    -0x10(%rbp),%rax
movb   $0x72,0x4(%rax)
jmp    129f <get_perm+0x18f>
mov    -0x10(%rbp),%rax
movb   $0x2d,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     12be <get_perm+0x1ae>
mov    -0x10(%rbp),%rax
movb   $0x77,0x5(%rax)
jmp    12c6 <get_perm+0x1b6>
mov    -0x10(%rbp),%rax
movb   $0x2d,0x5(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     12e5 <get_perm+0x1d5>
mov    -0x10(%rbp),%rax
movb   $0x78,0x6(%rax)
jmp    12ed <get_perm+0x1dd>
mov    -0x10(%rbp),%rax
movb   $0x2d,0x6(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     131f <get_perm+0x20f>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2cc4(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     131f <get_perm+0x20f>
mov    -0x10(%rbp),%rax
movb   $0x73,0x6(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     133e <get_perm+0x22e>
mov    -0x10(%rbp),%rax
movb   $0x72,0x7(%rax)
jmp    1346 <get_perm+0x236>
mov    -0x10(%rbp),%rax
movb   $0x2d,0x7(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1365 <get_perm+0x255>
mov    -0x10(%rbp),%rax
movb   $0x77,0x8(%rax)
jmp    136d <get_perm+0x25d>
mov    -0x10(%rbp),%rax
movb   $0x2d,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     138c <get_perm+0x27c>
mov    -0x10(%rbp),%rax
movb   $0x78,0x9(%rax)
jmp    1394 <get_perm+0x284>
mov    -0x10(%rbp),%rax
movb   $0x2d,0x9(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_perm>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eb7(%rip),%rcx
mov    (%rcx),%eax
and    (%rdi),%eax
add    $0xffffff80,%eax
cmp    $0x6,%eax
ja     1143 <get_perm+0x33>
lea    0xecc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x73,(%r14)
jmp    117b <get_perm+0x6b>
movb   $0x3f,(%r14)
mov    (%rcx),%esi
and    (%rbx),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
jmp    117b <get_perm+0x6b>
movb   $0x2d,(%r14)
jmp    117b <get_perm+0x6b>
movb   $0x6c,(%r14)
jmp    117b <get_perm+0x6b>
movb   $0x66,(%r14)
jmp    117b <get_perm+0x6b>
movb   $0x64,(%r14)
jmp    117b <get_perm+0x6b>
movb   $0x63,(%r14)
jmp    117b <get_perm+0x6b>
movb   $0x62,(%r14)
testl  $0x100,(%rbx)
mov    $0x2d,%r8d
mov    $0x72,%ecx
cmove  %r8d,%ecx
mov    %cl,0x1(%r14)
testb  $0x80,(%rbx)
mov    $0x77,%ecx
cmove  %r8d,%ecx
mov    $0x72,%esi
mov    %cl,0x2(%r14)
testb  $0x40,(%rbx)
mov    $0x77,%edx
mov    $0x78,%edi
cmove  %r8d,%edi
mov    $0x78,%ecx
mov    %dil,0x3(%r14)
mov    (%rbx),%edi
test   $0x40,%dil
je     11dd <get_perm+0xcd>
mov    0x2e16(%rip),%rax
test   %edi,(%rax)
je     11dd <get_perm+0xcd>
movb   $0x73,0x3(%r14)
mov    (%rbx),%edi
test   $0x20,%dil
cmove  %r8d,%esi
mov    %sil,0x4(%r14)
testb  $0x10,(%rbx)
cmove  %r8d,%edx
mov    %dl,0x5(%r14)
testb  $0x8,(%rbx)
cmove  %r8d,%ecx
mov    %cl,0x6(%r14)
mov    (%rbx),%eax
test   $0x8,%al
je     1217 <get_perm+0x107>
mov    0x2dc4(%rip),%rcx
test   %eax,(%rcx)
je     1217 <get_perm+0x107>
movb   $0x73,0x6(%r14)
mov    (%rbx),%eax
test   $0x4,%al
mov    $0x2d,%eax
mov    $0x72,%ecx
cmove  %eax,%ecx
mov    %cl,0x7(%r14)
testb  $0x2,(%rbx)
mov    $0x77,%ecx
cmove  %eax,%ecx
mov    %cl,0x8(%r14)
testb  $0x1,(%rbx)
mov    $0x78,%ecx
cmove  %eax,%ecx
mov    %cl,0x9(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IFMT = global i32 0
@.str = [21 x i8] c"Unknown property: %u\00"
@S_ISUID = global i32 0
@S_ISGID = global i32 0
define void @get_perm(%struct.stat* nocapture %0, i8* writeonly %1) {
%3 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = load i32, i32* @S_IFMT
%6 = and i32 %5, %4
switch i32 %6, label %14 [
i32 129, label %7
i32 132, label %8
i32 133, label %9
i32 134, label %10
i32 130, label %11
i32 131, label %12
i32 128, label %13
]
7: ; preds = %2
store i8 45, i8* %1
br label %19
8: ; preds = %2
store i8 100, i8* %1
br label %19
9: ; preds = %2
store i8 99, i8* %1
br label %19
10: ; preds = %2
store i8 98, i8* %1
br label %19
11: ; preds = %2
store i8 108, i8* %1
br label %19
12: ; preds = %2
store i8 102, i8* %1
br label %19
13: ; preds = %2
store i8 115, i8* %1
br label %19
14: ; preds = %2
store i8 63, i8* %1
%15 = load i32, i32* %3
%16 = load i32, i32* @S_IFMT
%17 = and i32 %16, %15
%18 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %14, %13, %12, %11, %10, %9, %8, %7
%20 = load i32, i32* %3
%21 = and i32 %20, 256
%22 = icmp eq i32 %21, 0
%23 = select i1 %22, i8 45, i8 114
%24 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %23, i8* %24
%25 = load i32, i32* %3
%26 = and i32 %25, 128
%27 = icmp eq i32 %26, 0
%28 = select i1 %27, i8 45, i8 119
%29 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %28, i8* %29
%30 = load i32, i32* %3
%31 = and i32 %30, 64
%32 = icmp eq i32 %31, 0
%33 = select i1 %32, i8 45, i8 120
%34 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %33, i8* %34
%35 = load i32, i32* %3
%36 = and i32 %35, 64
%37 = icmp eq i32 %36, 0
br i1 %37, label %44, label %38
38: ; preds = %19
%39 = load i32, i32* @S_ISUID
%40 = and i32 %39, %35
%41 = icmp eq i32 %40, 0
br i1 %41, label %44, label %42
42: ; preds = %38
store i8 115, i8* %34
%43 = load i32, i32* %3
br label %44
44: ; preds = %42, %38, %19
%45 = phi i32 [ %43, %42 ], [ %35, %38 ], [ %35, %19 ]
%46 = and i32 %45, 32
%47 = icmp eq i32 %46, 0
%48 = select i1 %47, i8 45, i8 114
%49 = getelementptr inbounds i8, i8* %1, i64 4
store i8 %48, i8* %49
%50 = load i32, i32* %3
%51 = and i32 %50, 16
%52 = icmp eq i32 %51, 0
%53 = select i1 %52, i8 45, i8 119
%54 = getelementptr inbounds i8, i8* %1, i64 5
store i8 %53, i8* %54
%55 = load i32, i32* %3
%56 = and i32 %55, 8
%57 = icmp eq i32 %56, 0
%58 = select i1 %57, i8 45, i8 120
%59 = getelementptr inbounds i8, i8* %1, i64 6
store i8 %58, i8* %59
%60 = load i32, i32* %3
%61 = and i32 %60, 8
%62 = icmp eq i32 %61, 0
br i1 %62, label %69, label %63
63: ; preds = %44
%64 = load i32, i32* @S_ISGID
%65 = and i32 %64, %60
%66 = icmp eq i32 %65, 0
br i1 %66, label %69, label %67
67: ; preds = %63
store i8 115, i8* %59
%68 = load i32, i32* %3
br label %69
69: ; preds = %67, %63, %44
%70 = phi i32 [ %68, %67 ], [ %60, %63 ], [ %60, %44 ]
%71 = and i32 %70, 4
%72 = icmp eq i32 %71, 0
%73 = select i1 %72, i8 45, i8 114
%74 = getelementptr inbounds i8, i8* %1, i64 7
store i8 %73, i8* %74
%75 = load i32, i32* %3
%76 = and i32 %75, 2
%77 = icmp eq i32 %76, 0
%78 = select i1 %77, i8 45, i8 119
%79 = getelementptr inbounds i8, i8* %1, i64 8
store i8 %78, i8* %79
%80 = load i32, i32* %3
%81 = and i32 %80, 1
%82 = icmp eq i32 %81, 0
%83 = select i1 %82, i8 45, i8 120
%84 = getelementptr inbounds i8, i8* %1, i64 9
store i8 %83, i8* %84
ret void
}