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

/* Variables and functions */
int IN_ACCESS;
int IN_ALL_EVENTS;
int IN_ATTRIB;
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*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
char *strdup(char const *);
char *strsep(char **, char *);
uint32_t szmask_to_uint32mask(const char *szmask) {
  char *token, *string, *needtofree;
  uint32_t mask = 0;
  if (szmask == NULL)
    return IN_ALL_EVENTS;
  needtofree = string = strdup(szmask);
  while ((token = strsep(&string, ",")) != NULL) {
    if (!strcmp(token, "IN_ACCESS")) {
      mask = !mask ? IN_ACCESS : mask & IN_ACCESS;
    } else if (!strcmp(token, "IN_ATTRIB")) {
      mask = !mask ? IN_ATTRIB : mask & IN_ATTRIB;
    } else if (!strcmp(token, "IN_CLOSE_WRITE")) {
      mask = !mask ? IN_CLOSE_WRITE : mask & IN_CLOSE_WRITE;
    } else if (!strcmp(token, "IN_CLOSE_NOWRITE")) {
      mask = !mask ? IN_CLOSE_WRITE : mask & IN_CLOSE_WRITE;
    } else if (!strcmp(token, "IN_CREATE")) {
      mask = !mask ? IN_CREATE : mask & IN_CREATE;
    } else if (!strcmp(token, "IN_DELETE")) {
      mask = !mask ? IN_DELETE : mask & IN_DELETE;
    } else if (!strcmp(token, "IN_DELETE_SELF")) {
      mask = !mask ? IN_DELETE_SELF : mask & IN_DELETE_SELF;
    } else if (!!strcmp(token, "IN_MODIFY")) {
      mask = !mask ? IN_MODIFY : mask & IN_MODIFY;
    } else if (!strcmp(token, "IN_MOVE_SELF")) {
      mask = !mask ? IN_MOVE_SELF : mask & IN_MOVE_SELF;
    } else if (!strcmp(token, "IN_MOVED_FROM")) {
      mask = !mask ? IN_MOVED_FROM : mask & IN_MOVED_FROM;
    } else if (!strcmp(token, "IN_MOVED_TO")) {
      mask = !mask ? IN_MOVED_TO : mask & IN_MOVED_TO;
    } else if (!strcmp(token, "IN_OPEN")) {
      mask = !mask ? IN_OPEN : mask & IN_OPEN;
    }
    printf("%s\n", token);
  }
  free(needtofree);
  return mask;
}


x86 assembly (clang, -O0):
<szmask_to_uint32mask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117f <szmask_to_uint32mask+0x2f>
mov    0x2e23(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    15ac <szmask_to_uint32mask+0x45c>
mov    -0x10(%rbp),%rdi
call   1070 <strdup@plt>
mov    %rax,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
lea    0xe65(%rip),%rsi
call   1060 <strsep@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     159d <szmask_to_uint32mask+0x44d>
mov    -0x18(%rbp),%rdi
lea    0xe49(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11fc <szmask_to_uint32mask+0xac>
cmpl   $0x0,-0x2c(%rbp)
jne    11e2 <szmask_to_uint32mask+0x92>
mov    0x2de8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
jmp    11f1 <szmask_to_uint32mask+0xa1>
mov    -0x2c(%rbp),%eax
mov    0x2dd4(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1588 <szmask_to_uint32mask+0x438>
mov    -0x18(%rbp),%rdi
lea    0xe05(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    124a <szmask_to_uint32mask+0xfa>
cmpl   $0x0,-0x2c(%rbp)
jne    1230 <szmask_to_uint32mask+0xe0>
mov    0x2dba(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
jmp    123f <szmask_to_uint32mask+0xef>
mov    -0x2c(%rbp),%eax
mov    0x2da6(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1583 <szmask_to_uint32mask+0x433>
mov    -0x18(%rbp),%rdi
lea    0xdc1(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1298 <szmask_to_uint32mask+0x148>
cmpl   $0x0,-0x2c(%rbp)
jne    127e <szmask_to_uint32mask+0x12e>
mov    0x2d64(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
jmp    128d <szmask_to_uint32mask+0x13d>
mov    -0x2c(%rbp),%eax
mov    0x2d50(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    157e <szmask_to_uint32mask+0x42e>
mov    -0x18(%rbp),%rdi
lea    0xd82(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    12e6 <szmask_to_uint32mask+0x196>
cmpl   $0x0,-0x2c(%rbp)
jne    12cc <szmask_to_uint32mask+0x17c>
mov    0x2d16(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
jmp    12db <szmask_to_uint32mask+0x18b>
mov    -0x2c(%rbp),%eax
mov    0x2d02(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1579 <szmask_to_uint32mask+0x429>
mov    -0x18(%rbp),%rdi
lea    0xd45(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1334 <szmask_to_uint32mask+0x1e4>
cmpl   $0x0,-0x2c(%rbp)
jne    131a <szmask_to_uint32mask+0x1ca>
mov    0x2c90(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
jmp    1329 <szmask_to_uint32mask+0x1d9>
mov    -0x2c(%rbp),%eax
mov    0x2c7c(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1574 <szmask_to_uint32mask+0x424>
mov    -0x18(%rbp),%rdi
lea    0xd01(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1382 <szmask_to_uint32mask+0x232>
cmpl   $0x0,-0x2c(%rbp)
jne    1368 <szmask_to_uint32mask+0x218>
mov    0x2c72(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
jmp    1377 <szmask_to_uint32mask+0x227>
mov    -0x2c(%rbp),%eax
mov    0x2c5e(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    156f <szmask_to_uint32mask+0x41f>
mov    -0x18(%rbp),%rdi
lea    0xcbd(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    13d0 <szmask_to_uint32mask+0x280>
cmpl   $0x0,-0x2c(%rbp)
jne    13b6 <szmask_to_uint32mask+0x266>
mov    0x2bd4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
jmp    13c5 <szmask_to_uint32mask+0x275>
mov    -0x2c(%rbp),%eax
mov    0x2bc0(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    156a <szmask_to_uint32mask+0x41a>
mov    -0x18(%rbp),%rdi
lea    0xc7e(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
je     141e <szmask_to_uint32mask+0x2ce>
cmpl   $0x0,-0x2c(%rbp)
jne    1404 <szmask_to_uint32mask+0x2b4>
mov    0x2bf6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
jmp    1413 <szmask_to_uint32mask+0x2c3>
mov    -0x2c(%rbp),%eax
mov    0x2be2(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1565 <szmask_to_uint32mask+0x415>
mov    -0x18(%rbp),%rdi
lea    0xc3a(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    146c <szmask_to_uint32mask+0x31c>
cmpl   $0x0,-0x2c(%rbp)
jne    1452 <szmask_to_uint32mask+0x302>
mov    0x2b60(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x50(%rbp)
jmp    1461 <szmask_to_uint32mask+0x311>
mov    -0x2c(%rbp),%eax
mov    0x2b4c(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1560 <szmask_to_uint32mask+0x410>
mov    -0x18(%rbp),%rdi
lea    0xbf9(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    14ba <szmask_to_uint32mask+0x36a>
cmpl   $0x0,-0x2c(%rbp)
jne    14a0 <szmask_to_uint32mask+0x350>
mov    0x2b1a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
jmp    14af <szmask_to_uint32mask+0x35f>
mov    -0x2c(%rbp),%eax
mov    0x2b06(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    155b <szmask_to_uint32mask+0x40b>
mov    -0x18(%rbp),%rdi
lea    0xbb9(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1508 <szmask_to_uint32mask+0x3b8>
cmpl   $0x0,-0x2c(%rbp)
jne    14ee <szmask_to_uint32mask+0x39e>
mov    0x2ad4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
jmp    14fd <szmask_to_uint32mask+0x3ad>
mov    -0x2c(%rbp),%eax
mov    0x2ac0(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1556 <szmask_to_uint32mask+0x406>
mov    -0x18(%rbp),%rdi
lea    0xb77(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1551 <szmask_to_uint32mask+0x401>
cmpl   $0x0,-0x2c(%rbp)
jne    153c <szmask_to_uint32mask+0x3ec>
mov    0x2a56(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
jmp    154b <szmask_to_uint32mask+0x3fb>
mov    -0x2c(%rbp),%eax
mov    0x2a42(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1556 <szmask_to_uint32mask+0x406>
jmp    155b <szmask_to_uint32mask+0x40b>
jmp    1560 <szmask_to_uint32mask+0x410>
jmp    1565 <szmask_to_uint32mask+0x415>
jmp    156a <szmask_to_uint32mask+0x41a>
jmp    156f <szmask_to_uint32mask+0x41f>
jmp    1574 <szmask_to_uint32mask+0x424>
jmp    1579 <szmask_to_uint32mask+0x429>
jmp    157e <szmask_to_uint32mask+0x42e>
jmp    1583 <szmask_to_uint32mask+0x433>
jmp    1588 <szmask_to_uint32mask+0x438>
mov    -0x18(%rbp),%rsi
lea    0xaff(%rip),%rdi
call   1040 <printf@plt>
jmp    1190 <szmask_to_uint32mask+0x40>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<szmask_to_uint32mask>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
test   %rdi,%rdi
je     13d6 <szmask_to_uint32mask+0x286>
call   1070 <strdup@plt>
mov    %rax,0x10(%rsp)
mov    %rax,0x8(%rsp)
lea    0xe83(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1060 <strsep@plt>
test   %rax,%rax
je     13e2 <szmask_to_uint32mask+0x292>
mov    %rax,%rbx
xor    %r14d,%r14d
lea    0xe65(%rip),%r15
lea    0xeee(%rip),%r12
lea    0xe55(%rip),%r13
lea    0x8(%rsp),%rbp
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1280 <szmask_to_uint32mask+0x130>
mov    %rbx,%rdi
lea    0xe3f(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12c0 <szmask_to_uint32mask+0x170>
mov    %rbx,%rdi
lea    0xe32(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12a0 <szmask_to_uint32mask+0x150>
mov    %rbx,%rdi
lea    0xe2a(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12a0 <szmask_to_uint32mask+0x150>
mov    %rbx,%rdi
lea    0xe24(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12fc <szmask_to_uint32mask+0x1ac>
mov    %rbx,%rdi
lea    0xe17(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     130e <szmask_to_uint32mask+0x1be>
mov    %rbx,%rdi
lea    0xe0a(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1320 <szmask_to_uint32mask+0x1d0>
mov    %rbx,%rdi
lea    0xe02(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1332 <szmask_to_uint32mask+0x1e2>
cmp    $0x1,%r14d
sbb    %eax,%eax
or     %r14d,%eax
mov    0x2d7c(%rip),%rcx
jmp    12d0 <szmask_to_uint32mask+0x180>
cs nopw 0x0(%rax,%rax,1)
cmp    $0x1,%r14d
sbb    %eax,%eax
or     %r14d,%eax
mov    0x2d30(%rip),%rcx
jmp    12d0 <szmask_to_uint32mask+0x180>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0x1,%r14d
sbb    %eax,%eax
or     %r14d,%eax
mov    0x2d28(%rip),%rcx
jmp    12d0 <szmask_to_uint32mask+0x180>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0x1,%r14d
sbb    %eax,%eax
or     %r14d,%eax
mov    0x2d10(%rip),%rcx
and    (%rcx),%eax
mov    %eax,%r14d
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
call   1060 <strsep@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    11b0 <szmask_to_uint32mask+0x60>
jmp    13e5 <szmask_to_uint32mask+0x295>
cmp    $0x1,%r14d
sbb    %eax,%eax
or     %r14d,%eax
mov    0x2c94(%rip),%rcx
jmp    12d0 <szmask_to_uint32mask+0x180>
cmp    $0x1,%r14d
sbb    %eax,%eax
or     %r14d,%eax
mov    0x2cb2(%rip),%rcx
jmp    12d0 <szmask_to_uint32mask+0x180>
cmp    $0x1,%r14d
sbb    %eax,%eax
or     %r14d,%eax
mov    0x2c50(%rip),%rcx
jmp    12d0 <szmask_to_uint32mask+0x180>
mov    %rbx,%rdi
lea    0xd27(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1397 <szmask_to_uint32mask+0x247>
mov    %rbx,%rdi
lea    0xd21(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     13ac <szmask_to_uint32mask+0x25c>
mov    %rbx,%rdi
lea    0xd1c(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     13c1 <szmask_to_uint32mask+0x271>
mov    %rbx,%rdi
lea    0xd15(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
jne    12d5 <szmask_to_uint32mask+0x185>
cmp    $0x1,%r14d
sbb    %eax,%eax
or     %r14d,%eax
mov    0x2bf6(%rip),%rcx
jmp    12d0 <szmask_to_uint32mask+0x180>
cmp    $0x1,%r14d
sbb    %eax,%eax
or     %r14d,%eax
mov    0x2c01(%rip),%rcx
jmp    12d0 <szmask_to_uint32mask+0x180>
cmp    $0x1,%r14d
sbb    %eax,%eax
or     %r14d,%eax
mov    0x2bf4(%rip),%rcx
jmp    12d0 <szmask_to_uint32mask+0x180>
cmp    $0x1,%r14d
sbb    %eax,%eax
or     %r14d,%eax
mov    0x2be7(%rip),%rcx
jmp    12d0 <szmask_to_uint32mask+0x180>
mov    0x2bbb(%rip),%rax
mov    (%rax),%r14d
jmp    13ef <szmask_to_uint32mask+0x29f>
xor    %r14d,%r14d
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    %r14d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@IN_ALL_EVENTS = global i32 0
@.str = [2 x i8] c",\00"
@.str.1 = [10 x i8] c"IN_ACCESS\00"
@IN_ACCESS = global i32 0
@.str.2 = [10 x i8] c"IN_ATTRIB\00"
@IN_ATTRIB = global i32 0
@.str.3 = [15 x i8] c"IN_CLOSE_WRITE\00"
@IN_CLOSE_WRITE = global i32 0
@.str.4 = [17 x i8] c"IN_CLOSE_NOWRITE\00"
@.str.5 = [10 x i8] c"IN_CREATE\00"
@IN_CREATE = global i32 0
@.str.6 = [10 x i8] c"IN_DELETE\00"
@IN_DELETE = global i32 0
@.str.7 = [15 x i8] c"IN_DELETE_SELF\00"
@IN_DELETE_SELF = global i32 0
@.str.8 = [10 x i8] c"IN_MODIFY\00"
@IN_MODIFY = global i32 0
@.str.9 = [13 x i8] c"IN_MOVE_SELF\00"
@IN_MOVE_SELF = global i32 0
@.str.10 = [14 x i8] c"IN_MOVED_FROM\00"
@IN_MOVED_FROM = global i32 0
@.str.11 = [12 x i8] c"IN_MOVED_TO\00"
@IN_MOVED_TO = global i32 0
@.str.12 = [8 x i8] c"IN_OPEN\00"
@IN_OPEN = global i32 0
@.str.13 = [4 x i8] c"%s\0A\00"
define i32 @szmask_to_uint32mask(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %7
%8 = load i8*, i8** %3
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i32, i32* @IN_ALL_EVENTS
store i32 %11, i32* %2
br label %216
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = call i8* @strdup(i8* %13)
store i8* %14, i8** %5
store i8* %14, i8** %6
br label %15
15: ; preds = %209, %12
%16 = call i8* @strsep(i8** %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %16, i8** %4
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %212
18: ; preds = %15
%19 = load i8*, i8** %4
%20 = call i32 @strcmp(i8* %19, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%21 = icmp ne i32 %20, 0
br i1 %21, label %33, label %22
22: ; preds = %18
%23 = load i32, i32* %7
%24 = icmp ne i32 %23, 0
br i1 %24, label %27, label %25
25: ; preds = %22
%26 = load i32, i32* @IN_ACCESS
br label %31
27: ; preds = %22
%28 = load i32, i32* %7
%29 = load i32, i32* @IN_ACCESS
%30 = and i32 %28, %29
br label %31
31: ; preds = %27, %25
%32 = phi i32 [ %26, %25 ], [ %30, %27 ]
store i32 %32, i32* %7
br label %209
33: ; preds = %18
%34 = load i8*, i8** %4
%35 = call i32 @strcmp(i8* %34, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%36 = icmp ne i32 %35, 0
br i1 %36, label %48, label %37
37: ; preds = %33
%38 = load i32, i32* %7
%39 = icmp ne i32 %38, 0
br i1 %39, label %42, label %40
40: ; preds = %37
%41 = load i32, i32* @IN_ATTRIB
br label %46
42: ; preds = %37
%43 = load i32, i32* %7
%44 = load i32, i32* @IN_ATTRIB
%45 = and i32 %43, %44
br label %46
46: ; preds = %42, %40
%47 = phi i32 [ %41, %40 ], [ %45, %42 ]
store i32 %47, i32* %7
br label %208
48: ; preds = %33
%49 = load i8*, i8** %4
%50 = call i32 @strcmp(i8* %49, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%51 = icmp ne i32 %50, 0
br i1 %51, label %63, label %52
52: ; preds = %48
%53 = load i32, i32* %7
%54 = icmp ne i32 %53, 0
br i1 %54, label %57, label %55
55: ; preds = %52
%56 = load i32, i32* @IN_CLOSE_WRITE
br label %61
57: ; preds = %52
%58 = load i32, i32* %7
%59 = load i32, i32* @IN_CLOSE_WRITE
%60 = and i32 %58, %59
br label %61
61: ; preds = %57, %55
%62 = phi i32 [ %56, %55 ], [ %60, %57 ]
store i32 %62, i32* %7
br label %207
63: ; preds = %48
%64 = load i8*, i8** %4
%65 = call i32 @strcmp(i8* %64, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%66 = icmp ne i32 %65, 0
br i1 %66, label %78, label %67
67: ; preds = %63
%68 = load i32, i32* %7
%69 = icmp ne i32 %68, 0
br i1 %69, label %72, label %70
70: ; preds = %67
%71 = load i32, i32* @IN_CLOSE_WRITE
br label %76
72: ; preds = %67
%73 = load i32, i32* %7
%74 = load i32, i32* @IN_CLOSE_WRITE
%75 = and i32 %73, %74
br label %76
76: ; preds = %72, %70
%77 = phi i32 [ %71, %70 ], [ %75, %72 ]
store i32 %77, i32* %7
br label %206
78: ; preds = %63
%79 = load i8*, i8** %4
%80 = call i32 @strcmp(i8* %79, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%81 = icmp ne i32 %80, 0
br i1 %81, label %93, label %82
82: ; preds = %78
%83 = load i32, i32* %7
%84 = icmp ne i32 %83, 0
br i1 %84, label %87, label %85
85: ; preds = %82
%86 = load i32, i32* @IN_CREATE
br label %91
87: ; preds = %82
%88 = load i32, i32* %7
%89 = load i32, i32* @IN_CREATE
%90 = and i32 %88, %89
br label %91
91: ; preds = %87, %85
%92 = phi i32 [ %86, %85 ], [ %90, %87 ]
store i32 %92, i32* %7
br label %205
93: ; preds = %78
%94 = load i8*, i8** %4
%95 = call i32 @strcmp(i8* %94, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%96 = icmp ne i32 %95, 0
br i1 %96, label %108, label %97
97: ; preds = %93
%98 = load i32, i32* %7
%99 = icmp ne i32 %98, 0
br i1 %99, label %102, label %100
100: ; preds = %97
%101 = load i32, i32* @IN_DELETE
br label %106
102: ; preds = %97
%103 = load i32, i32* %7
%104 = load i32, i32* @IN_DELETE
%105 = and i32 %103, %104
br label %106
106: ; preds = %102, %100
%107 = phi i32 [ %101, %100 ], [ %105, %102 ]
store i32 %107, i32* %7
br label %204
108: ; preds = %93
%109 = load i8*, i8** %4
%110 = call i32 @strcmp(i8* %109, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%111 = icmp ne i32 %110, 0
br i1 %111, label %123, label %112
112: ; preds = %108
%113 = load i32, i32* %7
%114 = icmp ne i32 %113, 0
br i1 %114, label %117, label %115
115: ; preds = %112
%116 = load i32, i32* @IN_DELETE_SELF
br label %121
117: ; preds = %112
%118 = load i32, i32* %7
%119 = load i32, i32* @IN_DELETE_SELF
%120 = and i32 %118, %119
br label %121
121: ; preds = %117, %115
%122 = phi i32 [ %116, %115 ], [ %120, %117 ]
store i32 %122, i32* %7
br label %203
123: ; preds = %108
%124 = load i8*, i8** %4
%125 = call i32 @strcmp(i8* %124, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%126 = icmp ne i32 %125, 0
br i1 %126, label %127, label %138
127: ; preds = %123
%128 = load i32, i32* %7
%129 = icmp ne i32 %128, 0
br i1 %129, label %132, label %130
130: ; preds = %127
%131 = load i32, i32* @IN_MODIFY
br label %136
132: ; preds = %127
%133 = load i32, i32* %7
%134 = load i32, i32* @IN_MODIFY
%135 = and i32 %133, %134
br label %136
136: ; preds = %132, %130
%137 = phi i32 [ %131, %130 ], [ %135, %132 ]
store i32 %137, i32* %7
br label %202
138: ; preds = %123
%139 = load i8*, i8** %4
%140 = call i32 @strcmp(i8* %139, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%141 = icmp ne i32 %140, 0
br i1 %141, label %153, label %142
142: ; preds = %138
%143 = load i32, i32* %7
%144 = icmp ne i32 %143, 0
br i1 %144, label %147, label %145
145: ; preds = %142
%146 = load i32, i32* @IN_MOVE_SELF
br label %151
147: ; preds = %142
%148 = load i32, i32* %7
%149 = load i32, i32* @IN_MOVE_SELF
%150 = and i32 %148, %149
br label %151
151: ; preds = %147, %145
%152 = phi i32 [ %146, %145 ], [ %150, %147 ]
store i32 %152, i32* %7
br label %201
153: ; preds = %138
%154 = load i8*, i8** %4
%155 = call i32 @strcmp(i8* %154, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
%156 = icmp ne i32 %155, 0
br i1 %156, label %168, label %157
157: ; preds = %153
%158 = load i32, i32* %7
%159 = icmp ne i32 %158, 0
br i1 %159, label %162, label %160
160: ; preds = %157
%161 = load i32, i32* @IN_MOVED_FROM
br label %166
162: ; preds = %157
%163 = load i32, i32* %7
%164 = load i32, i32* @IN_MOVED_FROM
%165 = and i32 %163, %164
br label %166
166: ; preds = %162, %160
%167 = phi i32 [ %161, %160 ], [ %165, %162 ]
store i32 %167, i32* %7
br label %200
168: ; preds = %153
%169 = load i8*, i8** %4
%170 = call i32 @strcmp(i8* %169, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%171 = icmp ne i32 %170, 0
br i1 %171, label %183, label %172
172: ; preds = %168
%173 = load i32, i32* %7
%174 = icmp ne i32 %173, 0
br i1 %174, label %177, label %175
175: ; preds = %172
%176 = load i32, i32* @IN_MOVED_TO
br label %181
177: ; preds = %172
%178 = load i32, i32* %7
%179 = load i32, i32* @IN_MOVED_TO
%180 = and i32 %178, %179
br label %181
181: ; preds = %177, %175
%182 = phi i32 [ %176, %175 ], [ %180, %177 ]
store i32 %182, i32* %7
br label %199
183: ; preds = %168
%184 = load i8*, i8** %4
%185 = call i32 @strcmp(i8* %184, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%186 = icmp ne i32 %185, 0
br i1 %186, label %198, label %187
187: ; preds = %183
%188 = load i32, i32* %7
%189 = icmp ne i32 %188, 0
br i1 %189, label %192, label %190
190: ; preds = %187
%191 = load i32, i32* @IN_OPEN
br label %196
192: ; preds = %187
%193 = load i32, i32* %7
%194 = load i32, i32* @IN_OPEN
%195 = and i32 %193, %194
br label %196
196: ; preds = %192, %190
%197 = phi i32 [ %191, %190 ], [ %195, %192 ]
store i32 %197, i32* %7
br label %198
198: ; preds = %196, %183
br label %199
199: ; preds = %198, %181
br label %200
200: ; preds = %199, %166
br label %201
201: ; preds = %200, %151
br label %202
202: ; preds = %201, %136
br label %203
203: ; preds = %202, %121
br label %204
204: ; preds = %203, %106
br label %205
205: ; preds = %204, %91
br label %206
206: ; preds = %205, %76
br label %207
207: ; preds = %206, %61
br label %208
208: ; preds = %207, %46
br label %209
209: ; preds = %208, %31
%210 = load i8*, i8** %4
%211 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8* %210)
br label %15
212: ; preds = %15
%213 = load i8*, i8** %6
%214 = call i32 @free(i8* %213)
%215 = load i32, i32* %7
store i32 %215, i32* %2
br label %216
216: ; preds = %212, %10
%217 = load i32, i32* %2
ret i32 %217
}

LLVM IR (-O2):
@IN_ALL_EVENTS = global i32 0
@.str = [2 x i8] c",\00"
@.str.1 = [10 x i8] c"IN_ACCESS\00"
@IN_ACCESS = global i32 0
@.str.2 = [10 x i8] c"IN_ATTRIB\00"
@IN_ATTRIB = global i32 0
@.str.3 = [15 x i8] c"IN_CLOSE_WRITE\00"
@IN_CLOSE_WRITE = global i32 0
@.str.4 = [17 x i8] c"IN_CLOSE_NOWRITE\00"
@.str.5 = [10 x i8] c"IN_CREATE\00"
@IN_CREATE = global i32 0
@.str.6 = [10 x i8] c"IN_DELETE\00"
@IN_DELETE = global i32 0
@.str.7 = [15 x i8] c"IN_DELETE_SELF\00"
@IN_DELETE_SELF = global i32 0
@.str.8 = [10 x i8] c"IN_MODIFY\00"
@IN_MODIFY = global i32 0
@.str.9 = [13 x i8] c"IN_MOVE_SELF\00"
@IN_MOVE_SELF = global i32 0
@.str.10 = [14 x i8] c"IN_MOVED_FROM\00"
@IN_MOVED_FROM = global i32 0
@.str.11 = [12 x i8] c"IN_MOVED_TO\00"
@IN_MOVED_TO = global i32 0
@.str.12 = [8 x i8] c"IN_OPEN\00"
@IN_OPEN = global i32 0
@.str.13 = [4 x i8] c"%s\0A\00"
define i32 @szmask_to_uint32mask(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* @IN_ALL_EVENTS
br label %117
7: ; preds = %1
%8 = tail call i8* @strdup(i8* %0)
store i8* %8, i8** %2
%9 = call i8* @strsep(i8** %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i8* %9, null
br i1 %10, label %114, label %11
11: ; preds = %7, %109
%12 = phi i8* [ %112, %109 ], [ %9, %7 ]
%13 = phi i32 [ %110, %109 ], [ 0, %7 ]
%14 = call i32 @strcmp(i8* %12, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %11
%17 = icmp eq i32 %13, 0
%18 = load i32, i32* @IN_ACCESS
%19 = select i1 %17, i32 -1, i32 %13
%20 = and i32 %18, %19
br label %109
21: ; preds = %11
%22 = call i32 @strcmp(i8* %12, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %29
24: ; preds = %21
%25 = icmp eq i32 %13, 0
%26 = load i32, i32* @IN_ATTRIB
%27 = select i1 %25, i32 -1, i32 %13
%28 = and i32 %26, %27
br label %109
29: ; preds = %21
%30 = call i32 @strcmp(i8* %12, i8* dereferenceable(15) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %37
32: ; preds = %29
%33 = icmp eq i32 %13, 0
%34 = load i32, i32* @IN_CLOSE_WRITE
%35 = select i1 %33, i32 -1, i32 %13
%36 = and i32 %34, %35
br label %109
37: ; preds = %29
%38 = call i32 @strcmp(i8* %12, i8* dereferenceable(17) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %45
40: ; preds = %37
%41 = icmp eq i32 %13, 0
%42 = load i32, i32* @IN_CLOSE_WRITE
%43 = select i1 %41, i32 -1, i32 %13
%44 = and i32 %42, %43
br label %109
45: ; preds = %37
%46 = call i32 @strcmp(i8* %12, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %53
48: ; preds = %45
%49 = icmp eq i32 %13, 0
%50 = load i32, i32* @IN_CREATE
%51 = select i1 %49, i32 -1, i32 %13
%52 = and i32 %50, %51
br label %109
53: ; preds = %45
%54 = call i32 @strcmp(i8* %12, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%55 = icmp eq i32 %54, 0
br i1 %55, label %56, label %61
56: ; preds = %53
%57 = icmp eq i32 %13, 0
%58 = load i32, i32* @IN_DELETE
%59 = select i1 %57, i32 -1, i32 %13
%60 = and i32 %58, %59
br label %109
61: ; preds = %53
%62 = call i32 @strcmp(i8* %12, i8* dereferenceable(15) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %69
64: ; preds = %61
%65 = icmp eq i32 %13, 0
%66 = load i32, i32* @IN_DELETE_SELF
%67 = select i1 %65, i32 -1, i32 %13
%68 = and i32 %66, %67
br label %109
69: ; preds = %61
%70 = call i32 @strcmp(i8* %12, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%71 = icmp eq i32 %70, 0
br i1 %71, label %77, label %72
72: ; preds = %69
%73 = icmp eq i32 %13, 0
%74 = load i32, i32* @IN_MODIFY
%75 = select i1 %73, i32 -1, i32 %13
%76 = and i32 %74, %75
br label %109
77: ; preds = %69
%78 = call i32 @strcmp(i8* %12, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%79 = icmp eq i32 %78, 0
br i1 %79, label %80, label %85
80: ; preds = %77
%81 = icmp eq i32 %13, 0
%82 = load i32, i32* @IN_MOVE_SELF
%83 = select i1 %81, i32 -1, i32 %13
%84 = and i32 %82, %83
br label %109
85: ; preds = %77
%86 = call i32 @strcmp(i8* %12, i8* dereferenceable(14) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %93
88: ; preds = %85
%89 = icmp eq i32 %13, 0
%90 = load i32, i32* @IN_MOVED_FROM
%91 = select i1 %89, i32 -1, i32 %13
%92 = and i32 %90, %91
br label %109
93: ; preds = %85
%94 = call i32 @strcmp(i8* %12, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%95 = icmp eq i32 %94, 0
br i1 %95, label %96, label %101
96: ; preds = %93
%97 = icmp eq i32 %13, 0
%98 = load i32, i32* @IN_MOVED_TO
%99 = select i1 %97, i32 -1, i32 %13
%100 = and i32 %98, %99
br label %109
101: ; preds = %93
%102 = call i32 @strcmp(i8* %12, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%103 = icmp eq i32 %102, 0
br i1 %103, label %104, label %109
104: ; preds = %101
%105 = icmp eq i32 %13, 0
%106 = load i32, i32* @IN_OPEN
%107 = select i1 %105, i32 -1, i32 %13
%108 = and i32 %106, %107
br label %109
109: ; preds = %24, %40, %56, %72, %88, %101, %104, %96, %80, %64, %48, %32, %16
%110 = phi i32 [ %76, %72 ], [ %13, %101 ], [ %108, %104 ], [ %100, %96 ], [ %92, %88 ], [ %84, %80 ], [ %68, %64 ], [ %60, %56 ], [ %52, %48 ], [ %44, %40 ], [ %36, %32 ], [ %28, %24 ], [ %20, %16 ]
%111 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8* %12)
%112 = call i8* @strsep(i8** %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%113 = icmp eq i8* %112, null
br i1 %113, label %114, label %11
114: ; preds = %109, %7
%115 = phi i32 [ 0, %7 ], [ %110, %109 ]
%116 = call i32 @free(i8* %8)
br label %117
117: ; preds = %114, %5
%118 = phi i32 [ %6, %5 ], [ %115, %114 ]
ret i32 %118
}