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

/* Variables and functions */
int FAN_ALL_EVENTS;
int FAN_ALL_PERM_EVENTS;
unsigned int FAN_MARK_ADD;
unsigned int FAN_MARK_IGNORED_MASK;
unsigned int FAN_MARK_IGNORED_SURV_MODIFY;
int mark_object(int, int /*<<< orphan*/ *, int, int, unsigned int);
scalar_t__ strcmp(char *, char *);
int set_special_ignored(int fan_fd, int fd, char *path) {
  unsigned int flags =
      (FAN_MARK_ADD | FAN_MARK_IGNORED_MASK | FAN_MARK_IGNORED_SURV_MODIFY);
  uint64_t mask = FAN_ALL_EVENTS | FAN_ALL_PERM_EVENTS;
  if (strcmp("/var/log/audit/audit.log", path) &&
      strcmp("/var/log/messages", path) && strcmp("/var/log/wtmp", path) &&
      strcmp("/var/run/utmp", path))
    return 0;
  return mark_object(fan_fd, NULL, fd, mask, flags);
}


x86 assembly (clang, -O0):
<set_special_ignored>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
mov    0x2e9e(%rip),%rcx
or     (%rcx),%eax
mov    0x2e9d(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x1c(%rbp)
mov    0x2e69(%rip),%rax
mov    (%rax),%eax
mov    0x2e78(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe90(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11d9 <set_special_ignored+0xb9>
mov    -0x18(%rbp),%rsi
lea    0xe8f(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11d9 <set_special_ignored+0xb9>
mov    -0x18(%rbp),%rsi
lea    0xe87(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11d9 <set_special_ignored+0xb9>
mov    -0x18(%rbp),%rsi
lea    0xe7b(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11d9 <set_special_ignored+0xb9>
movl   $0x0,-0x4(%rbp)
jmp    11f2 <set_special_ignored+0xd2>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%esi
call   1040 <mark_object@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_special_ignored>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r12
mov    %esi,%r14d
mov    %edi,%r15d
mov    0x2e90(%rip),%rax
mov    0x2ea1(%rip),%rcx
mov    (%rcx),%ebp
or     (%rax),%ebp
mov    0x2e9e(%rip),%rax
or     (%rax),%ebp
mov    0x2e6d(%rip),%rax
mov    0x2e7e(%rip),%rcx
mov    (%rcx),%ebx
or     (%rax),%ebx
lea    0xe9b(%rip),%rdi
mov    %rdx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11b9 <set_special_ignored+0x99>
lea    0xea0(%rip),%rdi
mov    %r12,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11b9 <set_special_ignored+0x99>
lea    0xe9e(%rip),%rdi
mov    %r12,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11b9 <set_special_ignored+0x99>
lea    0xe98(%rip),%rdi
mov    %r12,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     11b9 <set_special_ignored+0x99>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r15d,%edi
xor    %esi,%esi
mov    %r14d,%edx
mov    %ebx,%ecx
mov    %ebp,%r8d
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <mark_object@plt>

LLVM IR (-O0):
@FAN_MARK_ADD = global i32 0
@FAN_MARK_IGNORED_MASK = global i32 0
@FAN_MARK_IGNORED_SURV_MODIFY = global i32 0
@FAN_ALL_EVENTS = global i32 0
@FAN_ALL_PERM_EVENTS = global i32 0
@.str = [25 x i8] c"/var/log/audit/audit.log\00"
@.str.1 = [18 x i8] c"/var/log/messages\00"
@.str.2 = [14 x i8] c"/var/log/wtmp\00"
@.str.3 = [14 x i8] c"/var/run/utmp\00"
define i32 @set_special_ignored(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%10 = load i32, i32* @FAN_MARK_ADD
%11 = load i32, i32* @FAN_MARK_IGNORED_MASK
%12 = or i32 %10, %11
%13 = load i32, i32* @FAN_MARK_IGNORED_SURV_MODIFY
%14 = or i32 %12, %13
store i32 %14, i32* %8
%15 = load i32, i32* @FAN_ALL_EVENTS
%16 = load i32, i32* @FAN_ALL_PERM_EVENTS
%17 = or i32 %15, %16
store i32 %17, i32* %9
%18 = load i8*, i8** %7
%19 = call i64 @strcmp(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %34
21: ; preds = %3
%22 = load i8*, i8** %7
%23 = call i64 @strcmp(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %22)
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %34
25: ; preds = %21
%26 = load i8*, i8** %7
%27 = call i64 @strcmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %34
29: ; preds = %25
%30 = load i8*, i8** %7
%31 = call i64 @strcmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* %30)
%32 = icmp ne i64 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %29
store i32 0, i32* %4
br label %40
34: ; preds = %29, %25, %21, %3
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = load i32, i32* %9
%38 = load i32, i32* %8
%39 = call i32 @mark_object(i32 %35, i32* null, i32 %36, i32 %37, i32 %38)
store i32 %39, i32* %4
br label %40
40: ; preds = %34, %33
%41 = load i32, i32* %4
ret i32 %41
}

LLVM IR (-O2):
@FAN_MARK_ADD = global i32 0
@FAN_MARK_IGNORED_MASK = global i32 0
@FAN_MARK_IGNORED_SURV_MODIFY = global i32 0
@FAN_ALL_EVENTS = global i32 0
@FAN_ALL_PERM_EVENTS = global i32 0
@.str = [25 x i8] c"/var/log/audit/audit.log\00"
@.str.1 = [18 x i8] c"/var/log/messages\00"
@.str.2 = [14 x i8] c"/var/log/wtmp\00"
@.str.3 = [14 x i8] c"/var/run/utmp\00"
define i32 @set_special_ignored(i32 %0, i32 %1, i8* %2) {
%4 = load i32, i32* @FAN_MARK_ADD
%5 = load i32, i32* @FAN_MARK_IGNORED_MASK
%6 = or i32 %5, %4
%7 = load i32, i32* @FAN_MARK_IGNORED_SURV_MODIFY
%8 = or i32 %6, %7
%9 = load i32, i32* @FAN_ALL_EVENTS
%10 = load i32, i32* @FAN_ALL_PERM_EVENTS
%11 = or i32 %10, %9
%12 = tail call i64 @strcmp(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %2)
%13 = icmp eq i64 %12, 0
br i1 %13, label %23, label %14
14: ; preds = %3
%15 = tail call i64 @strcmp(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%16 = icmp eq i64 %15, 0
br i1 %16, label %23, label %17
17: ; preds = %14
%18 = tail call i64 @strcmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%19 = icmp eq i64 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %17
%21 = tail call i64 @strcmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %20, %17, %14, %3
%24 = tail call i32 @mark_object(i32 %0, i32* null, i32 %1, i32 %11, i32 %8)
br label %25
25: ; preds = %20, %23
%26 = phi i32 [ %24, %23 ], [ 0, %20 ]
ret i32 %26
}