#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 /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ S_IFBLK;
int /*<<< orphan*/ S_IFCHR;
int /*<<< orphan*/ S_IFDIR;
int /*<<< orphan*/ S_IFIFO;
int /*<<< orphan*/ S_IFLNK;
int /*<<< orphan*/ S_IFREG;
int /*<<< orphan*/ S_IFSOCK;
int /*<<< orphan*/ S_IRGRP;
int /*<<< orphan*/ S_IROTH;
int /*<<< orphan*/ S_IRUSR;
int /*<<< orphan*/ S_ISGID;
int /*<<< orphan*/ S_ISUID;
int /*<<< orphan*/ S_ISVTX;
int /*<<< orphan*/ S_IWGRP;
int /*<<< orphan*/ S_IWOTH;
int /*<<< orphan*/ S_IWUSR;
int /*<<< orphan*/ S_IXGRP;
int /*<<< orphan*/ S_IXOTH;
int /*<<< orphan*/ S_IXUSR;
mode_t fuserl_stat_mode_decanonicalize(int canonical) {
  mode_t mode = 0;
  if ((canonical & 0140000) == 0140000) {
    mode |= S_IFSOCK;
  }
  if ((canonical & 0120000) == 0120000) {
    mode |= S_IFLNK;
  }
  if ((canonical & 0100000) == 0100000) {
    mode |= S_IFREG;
  }
  if ((canonical & 0060000) == 0060000) {
    mode |= S_IFBLK;
  }
  if ((canonical & 0040000) == 0040000) {
    mode |= S_IFDIR;
  }
  if ((canonical & 0020000) == 0020000) {
    mode |= S_IFCHR;
  }
  if ((canonical & 0010000) == 0010000) {
    mode |= S_IFIFO;
  }
  if ((canonical & 0004000) == 0004000) {
    mode |= S_ISUID;
  }
  if ((canonical & 0002000) == 0002000) {
    mode |= S_ISGID;
  }
  if ((canonical & 0001000) == 0001000) {
    mode |= S_ISVTX;
  }
  if ((canonical & 00400) == 00400) {
    mode |= S_IRUSR;
  }
  if ((canonical & 00200) == 00200) {
    mode |= S_IWUSR;
  }
  if ((canonical & 00100) == 00100) {
    mode |= S_IXUSR;
  }
  if ((canonical & 00040) == 00040) {
    mode |= S_IRGRP;
  }
  if ((canonical & 00020) == 00020) {
    mode |= S_IWGRP;
  }
  if ((canonical & 00010) == 00010) {
    mode |= S_IXGRP;
  }
  if ((canonical & 00004) == 00004) {
    mode |= S_IROTH;
  }
  if ((canonical & 00002) == 00002) {
    mode |= S_IWOTH;
  }
  if ((canonical & 00001) == 00001) {
    mode |= S_IXOTH;
  }
  return mode;
}


x86 assembly (clang, -O0):
<fuserl_stat_mode_decanonicalize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xc000,%eax
cmp    $0xc000,%eax
jne    1130 <fuserl_stat_mode_decanonicalize+0x30>
mov    0x2e70(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xa000,%eax
cmp    $0xa000,%eax
jne    1152 <fuserl_stat_mode_decanonicalize+0x52>
mov    0x2e6e(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x8000,%eax
cmp    $0x8000,%eax
jne    1174 <fuserl_stat_mode_decanonicalize+0x74>
mov    0x2e5c(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x6000,%eax
cmp    $0x6000,%eax
jne    1196 <fuserl_stat_mode_decanonicalize+0x96>
mov    0x2e02(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x4000,%eax
cmp    $0x4000,%eax
jne    11b8 <fuserl_stat_mode_decanonicalize+0xb8>
mov    0x2d98(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x2000,%eax
cmp    $0x2000,%eax
jne    11da <fuserl_stat_mode_decanonicalize+0xda>
mov    0x2db6(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1000,%eax
cmp    $0x1000,%eax
jne    11fc <fuserl_stat_mode_decanonicalize+0xfc>
mov    0x2d6c(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x800,%eax
cmp    $0x800,%eax
jne    121e <fuserl_stat_mode_decanonicalize+0x11e>
mov    0x2dba(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x400,%eax
cmp    $0x400,%eax
jne    1240 <fuserl_stat_mode_decanonicalize+0x140>
mov    0x2d48(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x200,%eax
cmp    $0x200,%eax
jne    1262 <fuserl_stat_mode_decanonicalize+0x162>
mov    0x2d8e(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x100,%eax
cmp    $0x100,%eax
jne    1284 <fuserl_stat_mode_decanonicalize+0x184>
mov    0x2cec(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x80,%eax
cmp    $0x80,%eax
jne    12a6 <fuserl_stat_mode_decanonicalize+0x1a6>
mov    0x2d12(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x40,%eax
cmp    $0x40,%eax
jne    12c4 <fuserl_stat_mode_decanonicalize+0x1c4>
mov    0x2d1c(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x20,%eax
cmp    $0x20,%eax
jne    12e2 <fuserl_stat_mode_decanonicalize+0x1e2>
mov    0x2c9e(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x10,%eax
cmp    $0x10,%eax
jne    1300 <fuserl_stat_mode_decanonicalize+0x200>
mov    0x2cc8(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x8,%eax
jne    131e <fuserl_stat_mode_decanonicalize+0x21e>
mov    0x2c92(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x4,%eax
cmp    $0x4,%eax
jne    133c <fuserl_stat_mode_decanonicalize+0x23c>
mov    0x2c3c(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x2,%eax
cmp    $0x2,%eax
jne    135a <fuserl_stat_mode_decanonicalize+0x25a>
mov    0x2bfe(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    1378 <fuserl_stat_mode_decanonicalize+0x278>
mov    0x2c70(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fuserl_stat_mode_decanonicalize>:
mov    %edi,%eax
mov    %edi,%esi
not    %esi
xor    %r8d,%r8d
mov    $0x0,%edi
test   $0xc000,%esi
jne    111f <fuserl_stat_mode_decanonicalize+0x1f>
mov    0x2e7b(%rip),%rcx
mov    (%rcx),%edi
mov    $0x0,%ecx
test   $0xa000,%esi
jne    1135 <fuserl_stat_mode_decanonicalize+0x35>
mov    0x2e85(%rip),%rcx
mov    (%rcx),%ecx
or     %edi,%ecx
movswl %ax,%edi
sar    $0xf,%edi
mov    0x2e84(%rip),%rdx
and    (%rdx),%edi
test   $0x6000,%esi
jne    1158 <fuserl_stat_mode_decanonicalize+0x58>
mov    0x2e3b(%rip),%rdx
mov    (%rdx),%r8d
or     %r8d,%edi
or     %edi,%ecx
mov    %eax,%edx
shl    $0x11,%edx
sar    $0x1f,%edx
mov    0x2ddc(%rip),%rsi
and    (%rsi),%edx
mov    %eax,%esi
shl    $0x12,%esi
sar    $0x1f,%esi
mov    0x2e0b(%rip),%rdi
and    (%rdi),%esi
or     %edx,%esi
mov    %eax,%edi
shl    $0x13,%edi
sar    $0x1f,%edi
mov    0x2dd0(%rip),%rdx
and    (%rdx),%edi
or     %esi,%edi
mov    %eax,%edx
shl    $0x14,%edx
sar    $0x1f,%edx
mov    0x2e2d(%rip),%rsi
and    (%rsi),%edx
or     %edi,%edx
or     %ecx,%edx
mov    %eax,%ecx
shl    $0x15,%ecx
sar    $0x1f,%ecx
mov    0x2dc8(%rip),%rsi
and    (%rsi),%ecx
mov    %eax,%esi
shl    $0x16,%esi
sar    $0x1f,%esi
mov    0x2e1f(%rip),%rdi
and    (%rdi),%esi
or     %ecx,%esi
mov    %eax,%ecx
shl    $0x17,%ecx
sar    $0x1f,%ecx
mov    0x2d8c(%rip),%rdi
and    (%rdi),%ecx
or     %esi,%ecx
movsbl %al,%esi
sar    $0x7,%esi
mov    0x2dc3(%rip),%rdi
and    (%rdi),%esi
or     %ecx,%esi
mov    %eax,%ecx
shl    $0x19,%ecx
sar    $0x1f,%ecx
mov    0x2dd8(%rip),%rdi
and    (%rdi),%ecx
or     %esi,%ecx
mov    %eax,%esi
shl    $0x1a,%esi
sar    $0x1f,%esi
mov    0x2d65(%rip),%rdi
and    (%rdi),%esi
or     %edx,%ecx
mov    %eax,%edx
shl    $0x1b,%edx
sar    $0x1f,%edx
mov    0x2d9a(%rip),%rdi
and    (%rdi),%edx
or     %esi,%edx
mov    %eax,%esi
shl    $0x1c,%esi
sar    $0x1f,%esi
mov    0x2d6f(%rip),%rdi
and    (%rdi),%esi
or     %edx,%esi
mov    %eax,%edx
shl    $0x1d,%edx
sar    $0x1f,%edx
mov    0x2d24(%rip),%rdi
and    (%rdi),%edx
or     %esi,%edx
mov    %eax,%esi
shl    $0x1e,%esi
sar    $0x1f,%esi
mov    0x2cf1(%rip),%rdi
and    (%rdi),%esi
or     %edx,%esi
and    $0x1,%eax
neg    %eax
mov    0x2d71(%rip),%rdx
and    (%rdx),%eax
or     %esi,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
@S_IFSOCK = global i32 0
@S_IFLNK = global i32 0
@S_IFREG = global i32 0
@S_IFBLK = global i32 0
@S_IFDIR = global i32 0
@S_IFCHR = global i32 0
@S_IFIFO = global i32 0
@S_ISUID = global i32 0
@S_ISGID = global i32 0
@S_ISVTX = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IXGRP = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_IXOTH = global i32 0
define i32 @fuserl_stat_mode_decanonicalize(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = and i32 %4, 49152
%6 = icmp eq i32 %5, 49152
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @S_IFSOCK
%9 = load i32, i32* %3
%10 = or i32 %9, %8
store i32 %10, i32* %3
br label %11
11: ; preds = %7, %1
%12 = load i32, i32* %2
%13 = and i32 %12, 40960
%14 = icmp eq i32 %13, 40960
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i32, i32* @S_IFLNK
%17 = load i32, i32* %3
%18 = or i32 %17, %16
store i32 %18, i32* %3
br label %19
19: ; preds = %15, %11
%20 = load i32, i32* %2
%21 = and i32 %20, 32768
%22 = icmp eq i32 %21, 32768
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i32, i32* @S_IFREG
%25 = load i32, i32* %3
%26 = or i32 %25, %24
store i32 %26, i32* %3
br label %27
27: ; preds = %23, %19
%28 = load i32, i32* %2
%29 = and i32 %28, 24576
%30 = icmp eq i32 %29, 24576
br i1 %30, label %31, label %35
31: ; preds = %27
%32 = load i32, i32* @S_IFBLK
%33 = load i32, i32* %3
%34 = or i32 %33, %32
store i32 %34, i32* %3
br label %35
35: ; preds = %31, %27
%36 = load i32, i32* %2
%37 = and i32 %36, 16384
%38 = icmp eq i32 %37, 16384
br i1 %38, label %39, label %43
39: ; preds = %35
%40 = load i32, i32* @S_IFDIR
%41 = load i32, i32* %3
%42 = or i32 %41, %40
store i32 %42, i32* %3
br label %43
43: ; preds = %39, %35
%44 = load i32, i32* %2
%45 = and i32 %44, 8192
%46 = icmp eq i32 %45, 8192
br i1 %46, label %47, label %51
47: ; preds = %43
%48 = load i32, i32* @S_IFCHR
%49 = load i32, i32* %3
%50 = or i32 %49, %48
store i32 %50, i32* %3
br label %51
51: ; preds = %47, %43
%52 = load i32, i32* %2
%53 = and i32 %52, 4096
%54 = icmp eq i32 %53, 4096
br i1 %54, label %55, label %59
55: ; preds = %51
%56 = load i32, i32* @S_IFIFO
%57 = load i32, i32* %3
%58 = or i32 %57, %56
store i32 %58, i32* %3
br label %59
59: ; preds = %55, %51
%60 = load i32, i32* %2
%61 = and i32 %60, 2048
%62 = icmp eq i32 %61, 2048
br i1 %62, label %63, label %67
63: ; preds = %59
%64 = load i32, i32* @S_ISUID
%65 = load i32, i32* %3
%66 = or i32 %65, %64
store i32 %66, i32* %3
br label %67
67: ; preds = %63, %59
%68 = load i32, i32* %2
%69 = and i32 %68, 1024
%70 = icmp eq i32 %69, 1024
br i1 %70, label %71, label %75
71: ; preds = %67
%72 = load i32, i32* @S_ISGID
%73 = load i32, i32* %3
%74 = or i32 %73, %72
store i32 %74, i32* %3
br label %75
75: ; preds = %71, %67
%76 = load i32, i32* %2
%77 = and i32 %76, 512
%78 = icmp eq i32 %77, 512
br i1 %78, label %79, label %83
79: ; preds = %75
%80 = load i32, i32* @S_ISVTX
%81 = load i32, i32* %3
%82 = or i32 %81, %80
store i32 %82, i32* %3
br label %83
83: ; preds = %79, %75
%84 = load i32, i32* %2
%85 = and i32 %84, 256
%86 = icmp eq i32 %85, 256
br i1 %86, label %87, label %91
87: ; preds = %83
%88 = load i32, i32* @S_IRUSR
%89 = load i32, i32* %3
%90 = or i32 %89, %88
store i32 %90, i32* %3
br label %91
91: ; preds = %87, %83
%92 = load i32, i32* %2
%93 = and i32 %92, 128
%94 = icmp eq i32 %93, 128
br i1 %94, label %95, label %99
95: ; preds = %91
%96 = load i32, i32* @S_IWUSR
%97 = load i32, i32* %3
%98 = or i32 %97, %96
store i32 %98, i32* %3
br label %99
99: ; preds = %95, %91
%100 = load i32, i32* %2
%101 = and i32 %100, 64
%102 = icmp eq i32 %101, 64
br i1 %102, label %103, label %107
103: ; preds = %99
%104 = load i32, i32* @S_IXUSR
%105 = load i32, i32* %3
%106 = or i32 %105, %104
store i32 %106, i32* %3
br label %107
107: ; preds = %103, %99
%108 = load i32, i32* %2
%109 = and i32 %108, 32
%110 = icmp eq i32 %109, 32
br i1 %110, label %111, label %115
111: ; preds = %107
%112 = load i32, i32* @S_IRGRP
%113 = load i32, i32* %3
%114 = or i32 %113, %112
store i32 %114, i32* %3
br label %115
115: ; preds = %111, %107
%116 = load i32, i32* %2
%117 = and i32 %116, 16
%118 = icmp eq i32 %117, 16
br i1 %118, label %119, label %123
119: ; preds = %115
%120 = load i32, i32* @S_IWGRP
%121 = load i32, i32* %3
%122 = or i32 %121, %120
store i32 %122, i32* %3
br label %123
123: ; preds = %119, %115
%124 = load i32, i32* %2
%125 = and i32 %124, 8
%126 = icmp eq i32 %125, 8
br i1 %126, label %127, label %131
127: ; preds = %123
%128 = load i32, i32* @S_IXGRP
%129 = load i32, i32* %3
%130 = or i32 %129, %128
store i32 %130, i32* %3
br label %131
131: ; preds = %127, %123
%132 = load i32, i32* %2
%133 = and i32 %132, 4
%134 = icmp eq i32 %133, 4
br i1 %134, label %135, label %139
135: ; preds = %131
%136 = load i32, i32* @S_IROTH
%137 = load i32, i32* %3
%138 = or i32 %137, %136
store i32 %138, i32* %3
br label %139
139: ; preds = %135, %131
%140 = load i32, i32* %2
%141 = and i32 %140, 2
%142 = icmp eq i32 %141, 2
br i1 %142, label %143, label %147
143: ; preds = %139
%144 = load i32, i32* @S_IWOTH
%145 = load i32, i32* %3
%146 = or i32 %145, %144
store i32 %146, i32* %3
br label %147
147: ; preds = %143, %139
%148 = load i32, i32* %2
%149 = and i32 %148, 1
%150 = icmp eq i32 %149, 1
br i1 %150, label %151, label %155
151: ; preds = %147
%152 = load i32, i32* @S_IXOTH
%153 = load i32, i32* %3
%154 = or i32 %153, %152
store i32 %154, i32* %3
br label %155
155: ; preds = %151, %147
%156 = load i32, i32* %3
ret i32 %156
}

LLVM IR (-O2):
@S_IFSOCK = global i32 0
@S_IFLNK = global i32 0
@S_IFREG = global i32 0
@S_IFBLK = global i32 0
@S_IFDIR = global i32 0
@S_IFCHR = global i32 0
@S_IFIFO = global i32 0
@S_ISUID = global i32 0
@S_ISGID = global i32 0
@S_ISVTX = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IXGRP = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_IXOTH = global i32 0
define i32 @fuserl_stat_mode_decanonicalize(i32 %0) {
%2 = and i32 %0, 49152
%3 = icmp eq i32 %2, 49152
%4 = load i32, i32* @S_IFSOCK
%5 = select i1 %3, i32 %4, i32 0
%6 = and i32 %0, 40960
%7 = icmp eq i32 %6, 40960
%8 = load i32, i32* @S_IFLNK
%9 = select i1 %7, i32 %8, i32 0
%10 = or i32 %9, %5
%11 = and i32 %0, 32768
%12 = icmp eq i32 %11, 0
%13 = load i32, i32* @S_IFREG
%14 = select i1 %12, i32 0, i32 %13
%15 = or i32 %10, %14
%16 = and i32 %0, 24576
%17 = icmp eq i32 %16, 24576
%18 = load i32, i32* @S_IFBLK
%19 = select i1 %17, i32 %18, i32 0
%20 = or i32 %15, %19
%21 = and i32 %0, 16384
%22 = icmp eq i32 %21, 0
%23 = load i32, i32* @S_IFDIR
%24 = select i1 %22, i32 0, i32 %23
%25 = or i32 %20, %24
%26 = and i32 %0, 8192
%27 = icmp eq i32 %26, 0
%28 = load i32, i32* @S_IFCHR
%29 = select i1 %27, i32 0, i32 %28
%30 = or i32 %25, %29
%31 = and i32 %0, 4096
%32 = icmp eq i32 %31, 0
%33 = load i32, i32* @S_IFIFO
%34 = select i1 %32, i32 0, i32 %33
%35 = or i32 %30, %34
%36 = and i32 %0, 2048
%37 = icmp eq i32 %36, 0
%38 = load i32, i32* @S_ISUID
%39 = select i1 %37, i32 0, i32 %38
%40 = or i32 %35, %39
%41 = and i32 %0, 1024
%42 = icmp eq i32 %41, 0
%43 = load i32, i32* @S_ISGID
%44 = select i1 %42, i32 0, i32 %43
%45 = or i32 %40, %44
%46 = and i32 %0, 512
%47 = icmp eq i32 %46, 0
%48 = load i32, i32* @S_ISVTX
%49 = select i1 %47, i32 0, i32 %48
%50 = or i32 %45, %49
%51 = and i32 %0, 256
%52 = icmp eq i32 %51, 0
%53 = load i32, i32* @S_IRUSR
%54 = select i1 %52, i32 0, i32 %53
%55 = or i32 %50, %54
%56 = and i32 %0, 128
%57 = icmp eq i32 %56, 0
%58 = load i32, i32* @S_IWUSR
%59 = select i1 %57, i32 0, i32 %58
%60 = or i32 %55, %59
%61 = and i32 %0, 64
%62 = icmp eq i32 %61, 0
%63 = load i32, i32* @S_IXUSR
%64 = select i1 %62, i32 0, i32 %63
%65 = or i32 %60, %64
%66 = and i32 %0, 32
%67 = icmp eq i32 %66, 0
%68 = load i32, i32* @S_IRGRP
%69 = select i1 %67, i32 0, i32 %68
%70 = or i32 %65, %69
%71 = and i32 %0, 16
%72 = icmp eq i32 %71, 0
%73 = load i32, i32* @S_IWGRP
%74 = select i1 %72, i32 0, i32 %73
%75 = or i32 %70, %74
%76 = and i32 %0, 8
%77 = icmp eq i32 %76, 0
%78 = load i32, i32* @S_IXGRP
%79 = select i1 %77, i32 0, i32 %78
%80 = or i32 %75, %79
%81 = and i32 %0, 4
%82 = icmp eq i32 %81, 0
%83 = load i32, i32* @S_IROTH
%84 = select i1 %82, i32 0, i32 %83
%85 = or i32 %80, %84
%86 = and i32 %0, 2
%87 = icmp eq i32 %86, 0
%88 = load i32, i32* @S_IWOTH
%89 = select i1 %87, i32 0, i32 %88
%90 = or i32 %85, %89
%91 = and i32 %0, 1
%92 = icmp eq i32 %91, 0
%93 = load i32, i32* @S_IXOTH
%94 = select i1 %92, i32 0, i32 %93
%95 = or i32 %90, %94
ret i32 %95
}