#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 int32_t;

/* Variables and functions */
int IN_ACCESS;
int IN_ATTRIB;
int IN_CLOSE_NOWRITE;
int IN_CLOSE_WRITE;
int IN_CREATE;
int IN_DELETE;
int IN_DELETE_SELF;
int IN_MODIFY;
int IN_MOVED_FROM;
int IN_MOVED_TO;
int IN_MOVE_SELF;
int IN_OPEN;
int /*<<< orphan*/ printf(char *);
void GetMask(int32_t mask) {
  if (mask & IN_ACCESS) {
    printf("IN_ACCESS\n");
  }
  if (mask & IN_ATTRIB) {
    printf("IN_ATTRIB\n");
  }
  if (mask & IN_CLOSE_WRITE) {
    printf("IN_CLOSE_WRITE\n");
  }
  if (mask & IN_CLOSE_NOWRITE) {
    printf("IN_CLOSE_NOWRITE\n");
  }
  if (mask & IN_CREATE) {
    printf("IN_CREATE\n");
  }
  if (mask & IN_DELETE) {
    printf("IN_DELETE\n");
  }
  if (mask & IN_DELETE_SELF) {
    printf("IN_DELETE_SELF\n");
  }
  if (mask & IN_MODIFY) {
    printf("IN_MODIFY\n");
  }
  if (mask & IN_MOVE_SELF) {
    printf("IN_MOVE_SELF\n");
  }
  if (mask & IN_MOVED_FROM) {
    printf("IN_MOVED_FROM\n");
  }
  if (mask & IN_MOVED_TO) {
    printf("IN_MOVED_TO\n");
  }
  if (mask & IN_OPEN) {
    printf("IN_OPEN\n");
  }
}


x86 assembly (clang, -O0):
<GetMask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2e93(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     113c <GetMask+0x2c>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2e9a(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     115d <GetMask+0x4d>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2e69(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     117e <GetMask+0x6e>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2e50(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     119f <GetMask+0x8f>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2def(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     11c0 <GetMask+0xb0>
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2dfe(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     11e1 <GetMask+0xd1>
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2d95(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1202 <GetMask+0xf2>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2de4(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1223 <GetMask+0x113>
lea    0xe40(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2d73(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1244 <GetMask+0x134>
lea    0xe2a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2d5a(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1265 <GetMask+0x155>
lea    0xe17(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2d41(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1286 <GetMask+0x176>
lea    0xe05(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2cf8(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     12a7 <GetMask+0x197>
lea    0xdf1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetMask>:
push   %rbx
mov    %edi,%ebx
mov    0x2e9e(%rip),%rax
test   %edi,(%rax)
je     112a <GetMask+0x1a>
lea    0xf61(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eaf(%rip),%rax
test   %ebx,(%rax)
je     1141 <GetMask+0x31>
lea    0xf40(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e88(%rip),%rax
test   %ebx,(%rax)
je     1158 <GetMask+0x48>
lea    0xf1a(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e79(%rip),%rax
test   %ebx,(%rax)
je     116f <GetMask+0x5f>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e22(%rip),%rax
test   %ebx,(%rax)
je     1186 <GetMask+0x76>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e3b(%rip),%rax
test   %ebx,(%rax)
je     119d <GetMask+0x8d>
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ddc(%rip),%rax
test   %ebx,(%rax)
je     11b4 <GetMask+0xa4>
lea    0xe8a(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e35(%rip),%rax
test   %ebx,(%rax)
je     11cb <GetMask+0xbb>
lea    0xe69(%rip),%rdi
call   1030 <puts@plt>
mov    0x2dce(%rip),%rax
test   %ebx,(%rax)
je     11e2 <GetMask+0xd2>
lea    0xe45(%rip),%rdi
call   1030 <puts@plt>
mov    0x2dbf(%rip),%rax
test   %ebx,(%rax)
je     11f9 <GetMask+0xe9>
lea    0xe20(%rip),%rdi
call   1030 <puts@plt>
mov    0x2db0(%rip),%rax
test   %ebx,(%rax)
je     1210 <GetMask+0x100>
lea    0xdfd(%rip),%rdi
call   1030 <puts@plt>
mov    0x2d71(%rip),%rax
test   %ebx,(%rax)
je     1228 <GetMask+0x118>
lea    0xdde(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>
pop    %rbx
ret

LLVM IR (-O0):
@IN_ACCESS = global i32 0
@.str = [11 x i8] c"IN_ACCESS\0A\00"
@IN_ATTRIB = global i32 0
@.str.1 = [11 x i8] c"IN_ATTRIB\0A\00"
@IN_CLOSE_WRITE = global i32 0
@.str.2 = [16 x i8] c"IN_CLOSE_WRITE\0A\00"
@IN_CLOSE_NOWRITE = global i32 0
@.str.3 = [18 x i8] c"IN_CLOSE_NOWRITE\0A\00"
@IN_CREATE = global i32 0
@.str.4 = [11 x i8] c"IN_CREATE\0A\00"
@IN_DELETE = global i32 0
@.str.5 = [11 x i8] c"IN_DELETE\0A\00"
@IN_DELETE_SELF = global i32 0
@.str.6 = [16 x i8] c"IN_DELETE_SELF\0A\00"
@IN_MODIFY = global i32 0
@.str.7 = [11 x i8] c"IN_MODIFY\0A\00"
@IN_MOVE_SELF = global i32 0
@.str.8 = [14 x i8] c"IN_MOVE_SELF\0A\00"
@IN_MOVED_FROM = global i32 0
@.str.9 = [15 x i8] c"IN_MOVED_FROM\0A\00"
@IN_MOVED_TO = global i32 0
@.str.10 = [13 x i8] c"IN_MOVED_TO\0A\00"
@IN_OPEN = global i32 0
@.str.11 = [9 x i8] c"IN_OPEN\0A\00"
define void @GetMask(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @IN_ACCESS
%5 = and i32 %3, %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %2
%11 = load i32, i32* @IN_ATTRIB
%12 = and i32 %10, %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %9
%17 = load i32, i32* %2
%18 = load i32, i32* @IN_CLOSE_WRITE
%19 = and i32 %17, %18
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %23
23: ; preds = %21, %16
%24 = load i32, i32* %2
%25 = load i32, i32* @IN_CLOSE_NOWRITE
%26 = and i32 %24, %25
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %23
%29 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %30
30: ; preds = %28, %23
%31 = load i32, i32* %2
%32 = load i32, i32* @IN_CREATE
%33 = and i32 %31, %32
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %30
%36 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
br label %37
37: ; preds = %35, %30
%38 = load i32, i32* %2
%39 = load i32, i32* @IN_DELETE
%40 = and i32 %38, %39
%41 = icmp ne i32 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %37
%43 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %44
44: ; preds = %42, %37
%45 = load i32, i32* %2
%46 = load i32, i32* @IN_DELETE_SELF
%47 = and i32 %45, %46
%48 = icmp ne i32 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %44
%50 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
br label %51
51: ; preds = %49, %44
%52 = load i32, i32* %2
%53 = load i32, i32* @IN_MODIFY
%54 = and i32 %52, %53
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %51
%57 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
br label %58
58: ; preds = %56, %51
%59 = load i32, i32* %2
%60 = load i32, i32* @IN_MOVE_SELF
%61 = and i32 %59, %60
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %58
%64 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
br label %65
65: ; preds = %63, %58
%66 = load i32, i32* %2
%67 = load i32, i32* @IN_MOVED_FROM
%68 = and i32 %66, %67
%69 = icmp ne i32 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %65
%71 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0))
br label %72
72: ; preds = %70, %65
%73 = load i32, i32* %2
%74 = load i32, i32* @IN_MOVED_TO
%75 = and i32 %73, %74
%76 = icmp ne i32 %75, 0
br i1 %76, label %77, label %79
77: ; preds = %72
%78 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
br label %79
79: ; preds = %77, %72
%80 = load i32, i32* %2
%81 = load i32, i32* @IN_OPEN
%82 = and i32 %80, %81
%83 = icmp ne i32 %82, 0
br i1 %83, label %84, label %86
84: ; preds = %79
%85 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
br label %86
86: ; preds = %84, %79
ret void
}

LLVM IR (-O2):
@IN_ACCESS = global i32 0
@IN_ATTRIB = global i32 0
@IN_CLOSE_WRITE = global i32 0
@IN_CLOSE_NOWRITE = global i32 0
@IN_CREATE = global i32 0
@IN_DELETE = global i32 0
@IN_DELETE_SELF = global i32 0
@IN_MODIFY = global i32 0
@IN_MOVE_SELF = global i32 0
@IN_MOVED_FROM = global i32 0
@IN_MOVED_TO = global i32 0
@IN_OPEN = global i32 0
@str = [8 x i8] c"IN_OPEN\00"
@str.12 = [12 x i8] c"IN_MOVED_TO\00"
@str.13 = [14 x i8] c"IN_MOVED_FROM\00"
@str.14 = [13 x i8] c"IN_MOVE_SELF\00"
@str.15 = [10 x i8] c"IN_MODIFY\00"
@str.16 = [15 x i8] c"IN_DELETE_SELF\00"
@str.17 = [10 x i8] c"IN_DELETE\00"
@str.18 = [10 x i8] c"IN_CREATE\00"
@str.19 = [17 x i8] c"IN_CLOSE_NOWRITE\00"
@str.20 = [15 x i8] c"IN_CLOSE_WRITE\00"
@str.21 = [10 x i8] c"IN_ATTRIB\00"
@str.22 = [10 x i8] c"IN_ACCESS\00"
define void @GetMask(i32 %0) {
%2 = load i32, i32* @IN_ACCESS
%3 = and i32 %2, %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.22, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i32, i32* @IN_ATTRIB
%9 = and i32 %8, %0
%10 = icmp eq i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %7
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.21, i64 0, i64 0))
br label %13
13: ; preds = %11, %7
%14 = load i32, i32* @IN_CLOSE_WRITE
%15 = and i32 %14, %0
%16 = icmp eq i32 %15, 0
br i1 %16, label %19, label %17
17: ; preds = %13
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.20, i64 0, i64 0))
br label %19
19: ; preds = %17, %13
%20 = load i32, i32* @IN_CLOSE_NOWRITE
%21 = and i32 %20, %0
%22 = icmp eq i32 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %19
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.19, i64 0, i64 0))
br label %25
25: ; preds = %23, %19
%26 = load i32, i32* @IN_CREATE
%27 = and i32 %26, %0
%28 = icmp eq i32 %27, 0
br i1 %28, label %31, label %29
29: ; preds = %25
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.18, i64 0, i64 0))
br label %31
31: ; preds = %29, %25
%32 = load i32, i32* @IN_DELETE
%33 = and i32 %32, %0
%34 = icmp eq i32 %33, 0
br i1 %34, label %37, label %35
35: ; preds = %31
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.17, i64 0, i64 0))
br label %37
37: ; preds = %35, %31
%38 = load i32, i32* @IN_DELETE_SELF
%39 = and i32 %38, %0
%40 = icmp eq i32 %39, 0
br i1 %40, label %43, label %41
41: ; preds = %37
%42 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.16, i64 0, i64 0))
br label %43
43: ; preds = %41, %37
%44 = load i32, i32* @IN_MODIFY
%45 = and i32 %44, %0
%46 = icmp eq i32 %45, 0
br i1 %46, label %49, label %47
47: ; preds = %43
%48 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.15, i64 0, i64 0))
br label %49
49: ; preds = %47, %43
%50 = load i32, i32* @IN_MOVE_SELF
%51 = and i32 %50, %0
%52 = icmp eq i32 %51, 0
br i1 %52, label %55, label %53
53: ; preds = %49
%54 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.14, i64 0, i64 0))
br label %55
55: ; preds = %53, %49
%56 = load i32, i32* @IN_MOVED_FROM
%57 = and i32 %56, %0
%58 = icmp eq i32 %57, 0
br i1 %58, label %61, label %59
59: ; preds = %55
%60 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.13, i64 0, i64 0))
br label %61
61: ; preds = %59, %55
%62 = load i32, i32* @IN_MOVED_TO
%63 = and i32 %62, %0
%64 = icmp eq i32 %63, 0
br i1 %64, label %67, label %65
65: ; preds = %61
%66 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.12, i64 0, i64 0))
br label %67
67: ; preds = %65, %61
%68 = load i32, i32* @IN_OPEN
%69 = and i32 %68, %0
%70 = icmp eq i32 %69, 0
br i1 %70, label %73, label %71
71: ; preds = %67
%72 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
br label %73
73: ; preds = %71, %67
ret void
}