#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 *pMethodAccessFlags(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, "synchronized");
  }
  if (flags & 0x0100) {
    spAppend(result, "native");
  }
  if (flags & 0x0400) {
    spAppend(result, "abstract");
  }
  if (flags & 0x0800) {
    spAppend(result, "strict");
  }
  return result;
}


x86 assembly (clang, -O0):
<pMethodAccessFlags>:
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 <pMethodAccessFlags+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 <pMethodAccessFlags+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 <pMethodAccessFlags+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 <pMethodAccessFlags+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 <pMethodAccessFlags+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 <pMethodAccessFlags+0xd0>
mov    -0x10(%rbp),%rdi
lea    0xe3b(%rip),%rsi
call   1030 <spAppend@plt>
mov    -0x4(%rbp),%eax
and    $0x100,%eax
cmp    $0x0,%eax
je     1211 <pMethodAccessFlags+0xf1>
mov    -0x10(%rbp),%rdi
lea    0xe27(%rip),%rsi
call   1030 <spAppend@plt>
mov    -0x4(%rbp),%eax
and    $0x400,%eax
cmp    $0x0,%eax
je     1232 <pMethodAccessFlags+0x112>
mov    -0x10(%rbp),%rdi
lea    0xe0d(%rip),%rsi
call   1030 <spAppend@plt>
mov    -0x4(%rbp),%eax
and    $0x800,%eax
cmp    $0x0,%eax
je     1253 <pMethodAccessFlags+0x133>
mov    -0x10(%rbp),%rdi
lea    0xdf5(%rip),%rsi
call   1030 <spAppend@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pMethodAccessFlags>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <buf@plt>
mov    %rax,%rbx
test   $0x1,%bpl
jne    119c <pMethodAccessFlags+0x7c>
test   $0x2,%bpl
jne    11b1 <pMethodAccessFlags+0x91>
test   $0x4,%bpl
jne    11ca <pMethodAccessFlags+0xaa>
test   $0x8,%bpl
jne    11e3 <pMethodAccessFlags+0xc3>
test   $0x10,%bpl
jne    11fc <pMethodAccessFlags+0xdc>
test   $0x20,%bpl
jne    1215 <pMethodAccessFlags+0xf5>
test   $0x100,%ebp
jne    1230 <pMethodAccessFlags+0x110>
test   $0x400,%ebp
jne    124b <pMethodAccessFlags+0x12b>
test   $0x800,%ebp
je     1192 <pMethodAccessFlags+0x72>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe5d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x2,%bpl
je     113b <pMethodAccessFlags+0x1b>
lea    0xe4f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x4,%bpl
je     1145 <pMethodAccessFlags+0x25>
lea    0xe3e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x8,%bpl
je     114f <pMethodAccessFlags+0x2f>
lea    0xe2f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x10,%bpl
je     1159 <pMethodAccessFlags+0x39>
lea    0xe1d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x20,%bpl
je     1163 <pMethodAccessFlags+0x43>
lea    0xe0a(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x100,%ebp
je     116f <pMethodAccessFlags+0x4f>
lea    0xdfc(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x400,%ebp
je     117b <pMethodAccessFlags+0x5b>
lea    0xde8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <spAppend@plt>
test   $0x800,%ebp
jne    1183 <pMethodAccessFlags+0x63>
jmp    1192 <pMethodAccessFlags+0x72>

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 = [13 x i8] c"synchronized\00"
@.str.6 = [7 x i8] c"native\00"
@.str.7 = [9 x i8] c"abstract\00"
@.str.8 = [7 x i8] c"strict\00"
define i8* @pMethodAccessFlags(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 ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
br label %46
46: ; preds = %43, %39
%47 = load i32, i32* %2
%48 = and i32 %47, 256
%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 ([7 x i8], [7 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 i32, i32* %2
%62 = and i32 %61, 2048
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %67
64: ; preds = %60
%65 = load i8*, i8** %3
%66 = call i32 @spAppend(i8* %65, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %67
67: ; preds = %64, %60
%68 = load i8*, i8** %3
ret i8* %68
}

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 = [13 x i8] c"synchronized\00"
@.str.6 = [7 x i8] c"native\00"
@.str.7 = [9 x i8] c"abstract\00"
@.str.8 = [7 x i8] c"strict\00"
define i8* @pMethodAccessFlags(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 ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
br label %32
32: ; preds = %30, %27
%33 = and i32 %0, 256
%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 ([7 x i8], [7 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
%43 = and i32 %0, 2048
%44 = icmp eq i32 %43, 0
br i1 %44, label %47, label %45
45: ; preds = %42
%46 = tail call i32 @spAppend(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %47
47: ; preds = %45, %42
ret i8* %2
}