#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 */

/* Variables and functions */
char *buf();
int /*<<< orphan*/ spAppend(char *, char *);
char *pClassAccessFlags(int flags) {
  char *result = buf();
  if (flags & 0x0001) {
    spAppend(result, "public");
  }
  if (flags & 0x0002) {
    spAppend(result, "private");
  }
  if (flags & 0x0004) {
    spAppend(result, "protected");
  }
  if (flags & 0x0008) {
    spAppend(result, "static");
  }
  if (flags & 0x0010) {
    spAppend(result, "final");
  }
  if (flags & 0x0020) {
    spAppend(result, "super");
  }
  if (flags & 0x0200) {
    spAppend(result, "interface");
  }
  if (flags & 0x0400) {
    spAppend(result, "abstract");
  }
  return result;
}


x86 assembly (clang, -O0):
<pClassAccessFlags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <buf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1155 <pClassAccessFlags+0x35>
mov    -0x10(%rbp),%rdi
lea    0xeb0(%rip),%rsi
call   1030 <spAppend@plt>
mov    -0x4(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1174 <pClassAccessFlags+0x54>
mov    -0x10(%rbp),%rdi
lea    0xe98(%rip),%rsi
call   1030 <spAppend@plt>
mov    -0x4(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1193 <pClassAccessFlags+0x73>
mov    -0x10(%rbp),%rdi
lea    0xe81(%rip),%rsi
call   1030 <spAppend@plt>
mov    -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     11b2 <pClassAccessFlags+0x92>
mov    -0x10(%rbp),%rdi
lea    0xe6c(%rip),%rsi
call   1030 <spAppend@plt>
mov    -0x4(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     11d1 <pClassAccessFlags+0xb1>
mov    -0x10(%rbp),%rdi
lea    0xe54(%rip),%rsi
call   1030 <spAppend@plt>
mov    -0x4(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     11f0 <pClassAccessFlags+0xd0>
mov    -0x10(%rbp),%rdi
lea    0xe3b(%rip),%rsi
call   1030 <spAppend@plt>
mov    -0x4(%rbp),%eax
and    $0x200,%eax
cmp    $0x0,%eax
je     1211 <pClassAccessFlags+0xf1>
mov    -0x10(%rbp),%rdi
lea    0xe20(%rip),%rsi
call   1030 <spAppend@plt>
mov    -0x4(%rbp),%eax
and    $0x400,%eax
cmp    $0x0,%eax
je     1232 <pClassAccessFlags+0x112>
mov    -0x10(%rbp),%rdi
lea    0xe09(%rip),%rsi
call   1030 <spAppend@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pClassAccessFlags>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <buf@plt>
mov    %rax,%rbx
test   $0x1,%bpl
jne    118c <pClassAccessFlags+0x6c>
test   $0x2,%bpl
jne    11a1 <pClassAccessFlags+0x81>
test   $0x4,%bpl
jne    11b6 <pClassAccessFlags+0x96>
test   $0x8,%bpl
jne    11cb <pClassAccessFlags+0xab>
test   $0x10,%bpl
jne    11e4 <pClassAccessFlags+0xc4>
test   $0x20,%bpl
jne    11fd <pClassAccessFlags+0xdd>
test   $0x200,%ebp
jne    1218 <pClassAccessFlags+0xf8>
test   $0x400,%ebp
je     1182 <pClassAccessFlags+0x62>
lea    0xebc(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe6d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x2,%bpl
je     113b <pClassAccessFlags+0x1b>
lea    0xe5f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x4,%bpl
je     1141 <pClassAccessFlags+0x21>
lea    0xe52(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x8,%bpl
je     114b <pClassAccessFlags+0x2b>
lea    0xe47(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x10,%bpl
je     1155 <pClassAccessFlags+0x35>
lea    0xe35(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x20,%bpl
je     115f <pClassAccessFlags+0x3f>
lea    0xe22(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x200,%ebp
je     116b <pClassAccessFlags+0x4b>
lea    0xe0d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x400,%ebp
jne    1173 <pClassAccessFlags+0x53>
jmp    1182 <pClassAccessFlags+0x62>

LLVM IR (-O0):
@.str = [7 x i8] c"public\00"
@.str.1 = [8 x i8] c"private\00"
@.str.2 = [10 x i8] c"protected\00"
@.str.3 = [7 x i8] c"static\00"
@.str.4 = [6 x i8] c"final\00"
@.str.5 = [6 x i8] c"super\00"
@.str.6 = [10 x i8] c"interface\00"
@.str.7 = [9 x i8] c"abstract\00"
define i8* @pClassAccessFlags(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* (...) @buf()
store i8* %4, i8** %3
%5 = load i32, i32* %2
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @spAppend(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %8, %1
%12 = load i32, i32* %2
%13 = and i32 %12, 2
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i8*, i8** %3
%17 = call i32 @spAppend(i8* %16, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %15, %11
%19 = load i32, i32* %2
%20 = and i32 %19, 4
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %18
%23 = load i8*, i8** %3
%24 = call i32 @spAppend(i8* %23, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %25
25: ; preds = %22, %18
%26 = load i32, i32* %2
%27 = and i32 %26, 8
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %25
%30 = load i8*, i8** %3
%31 = call i32 @spAppend(i8* %30, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %32
32: ; preds = %29, %25
%33 = load i32, i32* %2
%34 = and i32 %33, 16
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %39
36: ; preds = %32
%37 = load i8*, i8** %3
%38 = call i32 @spAppend(i8* %37, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %39
39: ; preds = %36, %32
%40 = load i32, i32* %2
%41 = and i32 %40, 32
%42 = icmp ne i32 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %39
%44 = load i8*, i8** %3
%45 = call i32 @spAppend(i8* %44, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %46
46: ; preds = %43, %39
%47 = load i32, i32* %2
%48 = and i32 %47, 512
%49 = icmp ne i32 %48, 0
br i1 %49, label %50, label %53
50: ; preds = %46
%51 = load i8*, i8** %3
%52 = call i32 @spAppend(i8* %51, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
br label %53
53: ; preds = %50, %46
%54 = load i32, i32* %2
%55 = and i32 %54, 1024
%56 = icmp ne i32 %55, 0
br i1 %56, label %57, label %60
57: ; preds = %53
%58 = load i8*, i8** %3
%59 = call i32 @spAppend(i8* %58, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
br label %60
60: ; preds = %57, %53
%61 = load i8*, i8** %3
ret i8* %61
}

LLVM IR (-O2):
@.str = [7 x i8] c"public\00"
@.str.1 = [8 x i8] c"private\00"
@.str.2 = [10 x i8] c"protected\00"
@.str.3 = [7 x i8] c"static\00"
@.str.4 = [6 x i8] c"final\00"
@.str.5 = [6 x i8] c"super\00"
@.str.6 = [10 x i8] c"interface\00"
@.str.7 = [9 x i8] c"abstract\00"
define i8* @pClassAccessFlags(i32 %0) {
%2 = tail call i8* (...) @buf()
%3 = and i32 %0, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @spAppend(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = and i32 %0, 2
%9 = icmp eq i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = tail call i32 @spAppend(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %7
%13 = and i32 %0, 4
%14 = icmp eq i32 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = tail call i32 @spAppend(i8* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %17
17: ; preds = %15, %12
%18 = and i32 %0, 8
%19 = icmp eq i32 %18, 0
br i1 %19, label %22, label %20
20: ; preds = %17
%21 = tail call i32 @spAppend(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %22
22: ; preds = %20, %17
%23 = and i32 %0, 16
%24 = icmp eq i32 %23, 0
br i1 %24, label %27, label %25
25: ; preds = %22
%26 = tail call i32 @spAppend(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %27
27: ; preds = %25, %22
%28 = and i32 %0, 32
%29 = icmp eq i32 %28, 0
br i1 %29, label %32, label %30
30: ; preds = %27
%31 = tail call i32 @spAppend(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %32
32: ; preds = %30, %27
%33 = and i32 %0, 512
%34 = icmp eq i32 %33, 0
br i1 %34, label %37, label %35
35: ; preds = %32
%36 = tail call i32 @spAppend(i8* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
br label %37
37: ; preds = %35, %32
%38 = and i32 %0, 1024
%39 = icmp eq i32 %38, 0
br i1 %39, label %42, label %40
40: ; preds = %37
%41 = tail call i32 @spAppend(i8* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
br label %42
42: ; preds = %40, %37
ret i8* %2
}