#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 */
struct mntent {
  char *mnt_dir;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
scalar_t__ ENOENT;
int FAN_ACCESS;
int FAN_CLOSE;
int FAN_EVENT_ON_CHILD;
int FAN_MARK_ADD;
int FAN_MARK_MOUNT;
int FAN_MODIFY;
int FAN_ONDIR;
int FAN_OPEN;
int /*<<< orphan*/ endmntent(int /*<<< orphan*/ *);
scalar_t__ errno;
int fanotify_init(int /*<<< orphan*/, int /*<<< orphan*/);
int fanotify_mark(int, int, int, int /*<<< orphan*/, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
struct mntent *getmntent(int /*<<< orphan*/ *);
int /*<<< orphan*/ *setmntent(char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(scalar_t__);
int fnotify_event_init(void) {
  int fan_fd;
  int ret;
  FILE *mounts;
  struct mntent *mount;
  if ((fan_fd = fanotify_init(0, 0)) < 0) {
    fprintf(stderr, "Cannot initialize fanotify: %s.\n", strerror(errno));
    return -1;
  }
  ret = fanotify_mark(fan_fd, FAN_MARK_ADD | FAN_MARK_MOUNT,
                      FAN_ACCESS | FAN_MODIFY | FAN_OPEN | FAN_CLOSE |
                          FAN_ONDIR | FAN_EVENT_ON_CHILD,
                      AT_FDCWD, "/");
  if (ret < 0) {
    fprintf(stderr, "Cannot add fanotify watch on /: %s.\n", strerror(errno));
  }
  if ((mounts = setmntent("/proc/self/mounts", "r")) == NULL) {
    fprintf(stderr, "Cannot get mount points.\n");
    return -1;
  }
  while ((mount = getmntent(mounts)) != NULL) {
    ret = fanotify_mark(fan_fd, FAN_MARK_ADD | FAN_MARK_MOUNT,
                        FAN_ACCESS | FAN_MODIFY | FAN_OPEN | FAN_CLOSE |
                            FAN_ONDIR | FAN_EVENT_ON_CHILD,
                        AT_FDCWD, mount->mnt_dir);
    if ((ret < 0) && (errno != ENOENT)) {
      continue;
    }
  }
  endmntent(mounts);
  (void)fanotify_mark(fan_fd, FAN_MARK_ADD, FAN_ACCESS | FAN_MODIFY, AT_FDCWD,
                      "/sys/power/wake_lock");
  (void)fanotify_mark(fan_fd, FAN_MARK_ADD, FAN_ACCESS | FAN_MODIFY, AT_FDCWD,
                      "/sys/power/wake_unlock");
  return fan_fd;
}


x86 assembly (clang, -O0):
<fnotify_event_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
xor    %esi,%esi
mov    %esi,%edi
call   1040 <fanotify_init@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    11c8 <fnotify_event_init+0x58>
mov    0x2e14(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    0x2df8(%rip),%rax
mov    (%rax),%rdi
call   1090 <strerror@plt>
mov    -0x24(%rbp),%edi
mov    %rax,%rdx
lea    0xe4b(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13ca <fnotify_event_init+0x25a>
mov    -0x8(%rbp),%edi
mov    0x2dde(%rip),%rax
mov    (%rax),%esi
mov    0x2dfd(%rip),%rax
or     (%rax),%esi
mov    0x2ddc(%rip),%rax
mov    (%rax),%edx
mov    0x2df3(%rip),%rax
or     (%rax),%edx
mov    0x2daa(%rip),%rax
or     (%rax),%edx
mov    0x2df1(%rip),%rax
or     (%rax),%edx
mov    0x2dc8(%rip),%rax
or     (%rax),%edx
mov    0x2db7(%rip),%rax
or     (%rax),%edx
mov    0x2d66(%rip),%rax
mov    (%rax),%ecx
lea    0xdfe(%rip),%r8
call   1060 <fanotify_mark@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1264 <fnotify_event_init+0xf4>
mov    0x2d6c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    0x2d50(%rip),%rax
mov    (%rax),%rdi
call   1090 <strerror@plt>
mov    -0x28(%rbp),%edi
mov    %rax,%rdx
lea    0xdc6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
lea    0xddd(%rip),%rdi
lea    0xde8(%rip),%rsi
call   1080 <setmntent@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    12a8 <fnotify_event_init+0x138>
mov    0x2d1c(%rip),%rax
mov    (%rax),%edi
lea    0xdc7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13ca <fnotify_event_init+0x25a>
jmp    12ad <fnotify_event_init+0x13d>
mov    -0x18(%rbp),%rdi
call   1070 <getmntent@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     1355 <fnotify_event_init+0x1e5>
mov    -0x8(%rbp),%edi
mov    0x2ce2(%rip),%rax
mov    (%rax),%esi
mov    0x2d01(%rip),%rax
or     (%rax),%esi
mov    0x2ce0(%rip),%rax
mov    (%rax),%edx
mov    0x2cf7(%rip),%rax
or     (%rax),%edx
mov    0x2cae(%rip),%rax
or     (%rax),%edx
mov    0x2cf5(%rip),%rax
or     (%rax),%edx
mov    0x2ccc(%rip),%rax
or     (%rax),%edx
mov    0x2cbb(%rip),%rax
or     (%rax),%edx
mov    0x2c6a(%rip),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    (%rax),%r8
call   1060 <fanotify_mark@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1350 <fnotify_event_init+0x1e0>
mov    0x2c60(%rip),%rax
mov    (%rax),%rax
mov    0x2c46(%rip),%rcx
cmp    (%rcx),%rax
je     1350 <fnotify_event_init+0x1e0>
jmp    12ad <fnotify_event_init+0x13d>
jmp    12ad <fnotify_event_init+0x13d>
mov    -0x18(%rbp),%rdi
call   1030 <endmntent@plt>
mov    -0x8(%rbp),%edi
mov    0x2c48(%rip),%rax
mov    (%rax),%esi
mov    0x2c4f(%rip),%rax
mov    (%rax),%edx
mov    0x2c66(%rip),%rax
or     (%rax),%edx
mov    0x2bfd(%rip),%rax
mov    (%rax),%ecx
lea    0xcea(%rip),%r8
call   1060 <fanotify_mark@plt>
mov    -0x8(%rbp),%edi
mov    0x2c15(%rip),%rax
mov    (%rax),%esi
mov    0x2c1c(%rip),%rax
mov    (%rax),%edx
mov    0x2c33(%rip),%rax
or     (%rax),%edx
mov    0x2bca(%rip),%rax
mov    (%rax),%ecx
lea    0xccc(%rip),%r8
call   1060 <fanotify_mark@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnotify_event_init>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1040 <fanotify_init@plt>
test   %eax,%eax
js     131f <fnotify_event_init+0x1af>
mov    %eax,%ebp
mov    0x2e1b(%rip),%rax
mov    0x2e3c(%rip),%r14
mov    (%r14),%esi
or     (%rax),%esi
mov    0x2e18(%rip),%rcx
mov    0x2e31(%rip),%rax
mov    (%rax),%edx
or     (%rcx),%edx
mov    0x2de6(%rip),%rax
or     (%rax),%edx
mov    0x2e2d(%rip),%rax
or     (%rax),%edx
mov    0x2e04(%rip),%rax
or     (%rax),%edx
mov    0x2df3(%rip),%rax
or     (%rax),%edx
mov    0x2daa(%rip),%rax
mov    (%rax),%ecx
lea    0xe3a(%rip),%r8
mov    %ebp,%edi
call   1060 <fanotify_mark@plt>
test   %eax,%eax
jns    121d <fnotify_event_init+0xad>
mov    0x2daf(%rip),%rax
mov    (%rax),%ebx
mov    0x2d96(%rip),%rax
mov    (%rax),%rdi
call   1090 <strerror@plt>
lea    0xe12(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe24(%rip),%rdi
lea    0xe2f(%rip),%rsi
call   1080 <setmntent@plt>
test   %rax,%rax
je     134c <fnotify_event_init+0x1dc>
mov    %rax,%rdi
mov    %rax,(%rsp)
call   1070 <getmntent@plt>
test   %rax,%rax
mov    0x2d51(%rip),%rdi
mov    0x2d9a(%rip),%r13
mov    0x2d73(%rip),%rbx
mov    0x2d64(%rip),%r15
mov    %ebp,%r12d
je     12c1 <fnotify_event_init+0x151>
mov    %r15,%rbp
nopl   0x0(%rax)
mov    (%r14),%esi
mov    0x2d36(%rip),%rcx
or     (%rcx),%esi
mov    0x2d5d(%rip),%rcx
mov    (%rcx),%edx
mov    0x2d34(%rip),%rcx
or     (%rcx),%edx
or     (%rdi),%edx
or     0x0(%r13),%edx
or     (%rbx),%edx
or     0x0(%rbp),%edx
mov    0x2ce8(%rip),%rcx
mov    (%rcx),%ecx
mov    (%rax),%r8
mov    %rdi,%r15
mov    %r12d,%edi
call   1060 <fanotify_mark@plt>
mov    (%rsp),%rdi
call   1070 <getmntent@plt>
mov    %r15,%rdi
test   %rax,%rax
jne    1270 <fnotify_event_init+0x100>
mov    (%rsp),%rdi
call   1030 <endmntent@plt>
mov    0x2cdf(%rip),%rbp
mov    0x0(%rbp),%esi
mov    0x2d05(%rip),%r14
mov    (%r14),%edx
mov    0x2cdb(%rip),%r15
or     (%r15),%edx
mov    0x2c99(%rip),%rbx
mov    (%rbx),%ecx
lea    0xd7e(%rip),%r8
mov    %r12d,%edi
call   1060 <fanotify_mark@plt>
mov    0x0(%rbp),%esi
mov    (%r14),%edx
or     (%r15),%edx
mov    (%rbx),%ecx
lea    0xd79(%rip),%r8
mov    %r12d,%edi
call   1060 <fanotify_mark@plt>
mov    %r12d,%eax
jmp    1368 <fnotify_event_init+0x1f8>
mov    0x2c82(%rip),%rax
mov    (%rax),%ebx
mov    0x2c69(%rip),%rax
mov    (%rax),%rdi
call   1090 <strerror@plt>
lea    0xcc2(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    1363 <fnotify_event_init+0x1f3>
mov    0x2c55(%rip),%rax
mov    (%rax),%edi
lea    0xd00(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.mntent = type { i8* }
@stderr = global i32 0
@.str = [33 x i8] c"Cannot initialize fanotify: %s.\0A\00"
@errno = global i64 0
@FAN_MARK_ADD = global i32 0
@FAN_MARK_MOUNT = global i32 0
@FAN_ACCESS = global i32 0
@FAN_MODIFY = global i32 0
@FAN_OPEN = global i32 0
@FAN_CLOSE = global i32 0
@FAN_ONDIR = global i32 0
@FAN_EVENT_ON_CHILD = global i32 0
@AT_FDCWD = global i32 0
@.str.1 = [2 x i8] c"/\00"
@.str.2 = [37 x i8] c"Cannot add fanotify watch on /: %s.\0A\00"
@.str.3 = [18 x i8] c"/proc/self/mounts\00"
@.str.4 = [2 x i8] c"r\00"
@.str.5 = [26 x i8] c"Cannot get mount points.\0A\00"
@ENOENT = global i64 0
@.str.6 = [21 x i8] c"/sys/power/wake_lock\00"
@.str.7 = [23 x i8] c"/sys/power/wake_unlock\00"
define i32 @fnotify_event_init() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca %struct.mntent*
%6 = call i32 @fanotify_init(i32 0, i32 0)
store i32 %6, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %0
%9 = load i32, i32* @stderr
%10 = load i64, i64* @errno
%11 = call i8* @strerror(i64 %10)
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %11)
store i32 -1, i32* %1
br label %96
13: ; preds = %0
%14 = load i32, i32* %2
%15 = load i32, i32* @FAN_MARK_ADD
%16 = load i32, i32* @FAN_MARK_MOUNT
%17 = or i32 %15, %16
%18 = load i32, i32* @FAN_ACCESS
%19 = load i32, i32* @FAN_MODIFY
%20 = or i32 %18, %19
%21 = load i32, i32* @FAN_OPEN
%22 = or i32 %20, %21
%23 = load i32, i32* @FAN_CLOSE
%24 = or i32 %22, %23
%25 = load i32, i32* @FAN_ONDIR
%26 = or i32 %24, %25
%27 = load i32, i32* @FAN_EVENT_ON_CHILD
%28 = or i32 %26, %27
%29 = load i32, i32* @AT_FDCWD
%30 = call i32 @fanotify_mark(i32 %14, i32 %17, i32 %28, i32 %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 %30, i32* %3
%31 = load i32, i32* %3
%32 = icmp slt i32 %31, 0
br i1 %32, label %33, label %38
33: ; preds = %13
%34 = load i32, i32* @stderr
%35 = load i64, i64* @errno
%36 = call i8* @strerror(i64 %35)
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %36)
br label %38
38: ; preds = %33, %13
%39 = call i32* @setmntent(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %39, i32** %4
%40 = icmp eq i32* %39, null
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = load i32, i32* @stderr
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
store i32 -1, i32* %1
br label %96
44: ; preds = %38
br label %45
45: ; preds = %77, %76, %44
%46 = load i32*, i32** %4
%47 = call %struct.mntent* @getmntent(i32* %46)
store %struct.mntent* %47, %struct.mntent** %5
%48 = icmp ne %struct.mntent* %47, null
br i1 %48, label %49, label %78
49: ; preds = %45
%50 = load i32, i32* %2
%51 = load i32, i32* @FAN_MARK_ADD
%52 = load i32, i32* @FAN_MARK_MOUNT
%53 = or i32 %51, %52
%54 = load i32, i32* @FAN_ACCESS
%55 = load i32, i32* @FAN_MODIFY
%56 = or i32 %54, %55
%57 = load i32, i32* @FAN_OPEN
%58 = or i32 %56, %57
%59 = load i32, i32* @FAN_CLOSE
%60 = or i32 %58, %59
%61 = load i32, i32* @FAN_ONDIR
%62 = or i32 %60, %61
%63 = load i32, i32* @FAN_EVENT_ON_CHILD
%64 = or i32 %62, %63
%65 = load i32, i32* @AT_FDCWD
%66 = load %struct.mntent*, %struct.mntent** %5
%67 = getelementptr inbounds %struct.mntent, %struct.mntent* %66, i32 0, i32 0
%68 = load i8*, i8** %67
%69 = call i32 @fanotify_mark(i32 %50, i32 %53, i32 %64, i32 %65, i8* %68)
store i32 %69, i32* %3
%70 = load i32, i32* %3
%71 = icmp slt i32 %70, 0
br i1 %71, label %72, label %77
72: ; preds = %49
%73 = load i64, i64* @errno
%74 = load i64, i64* @ENOENT
%75 = icmp ne i64 %73, %74
br i1 %75, label %76, label %77
76: ; preds = %72
br label %45
77: ; preds = %72, %49
br label %45
78: ; preds = %45
%79 = load i32*, i32** %4
%80 = call i32 @endmntent(i32* %79)
%81 = load i32, i32* %2
%82 = load i32, i32* @FAN_MARK_ADD
%83 = load i32, i32* @FAN_ACCESS
%84 = load i32, i32* @FAN_MODIFY
%85 = or i32 %83, %84
%86 = load i32, i32* @AT_FDCWD
%87 = call i32 @fanotify_mark(i32 %81, i32 %82, i32 %85, i32 %86, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%88 = load i32, i32* %2
%89 = load i32, i32* @FAN_MARK_ADD
%90 = load i32, i32* @FAN_ACCESS
%91 = load i32, i32* @FAN_MODIFY
%92 = or i32 %90, %91
%93 = load i32, i32* @AT_FDCWD
%94 = call i32 @fanotify_mark(i32 %88, i32 %89, i32 %92, i32 %93, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%95 = load i32, i32* %2
store i32 %95, i32* %1
br label %96
96: ; preds = %78, %41, %8
%97 = load i32, i32* %1
ret i32 %97
}

LLVM IR (-O2):
%struct.mntent = type { i8* }
@stderr = global i32 0
@.str = [33 x i8] c"Cannot initialize fanotify: %s.\0A\00"
@errno = global i64 0
@FAN_MARK_ADD = global i32 0
@FAN_MARK_MOUNT = global i32 0
@FAN_ACCESS = global i32 0
@FAN_MODIFY = global i32 0
@FAN_OPEN = global i32 0
@FAN_CLOSE = global i32 0
@FAN_ONDIR = global i32 0
@FAN_EVENT_ON_CHILD = global i32 0
@AT_FDCWD = global i32 0
@.str.1 = [2 x i8] c"/\00"
@.str.2 = [37 x i8] c"Cannot add fanotify watch on /: %s.\0A\00"
@.str.3 = [18 x i8] c"/proc/self/mounts\00"
@.str.4 = [2 x i8] c"r\00"
@.str.5 = [26 x i8] c"Cannot get mount points.\0A\00"
@ENOENT = global i64 0
@.str.6 = [21 x i8] c"/sys/power/wake_lock\00"
@.str.7 = [23 x i8] c"/sys/power/wake_unlock\00"
define i32 @fnotify_event_init() {
%1 = tail call i32 @fanotify_init(i32 0, i32 0)
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = load i64, i64* @errno
%6 = tail call i8* @strerror(i64 %5)
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %76
8: ; preds = %0
%9 = load i32, i32* @FAN_MARK_ADD
%10 = load i32, i32* @FAN_MARK_MOUNT
%11 = or i32 %10, %9
%12 = load i32, i32* @FAN_ACCESS
%13 = load i32, i32* @FAN_MODIFY
%14 = or i32 %13, %12
%15 = load i32, i32* @FAN_OPEN
%16 = or i32 %14, %15
%17 = load i32, i32* @FAN_CLOSE
%18 = or i32 %16, %17
%19 = load i32, i32* @FAN_ONDIR
%20 = or i32 %18, %19
%21 = load i32, i32* @FAN_EVENT_ON_CHILD
%22 = or i32 %20, %21
%23 = load i32, i32* @AT_FDCWD
%24 = tail call i32 @fanotify_mark(i32 %1, i32 %11, i32 %22, i32 %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp slt i32 %24, 0
br i1 %25, label %26, label %31
26: ; preds = %8
%27 = load i32, i32* @stderr
%28 = load i64, i64* @errno
%29 = tail call i8* @strerror(i64 %28)
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %29)
br label %31
31: ; preds = %26, %8
%32 = tail call i32* @setmntent(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%33 = icmp eq i32* %32, null
br i1 %33, label %37, label %34
34: ; preds = %31
%35 = tail call %struct.mntent* @getmntent(i32* %32)
%36 = icmp eq %struct.mntent* %35, null
br i1 %36, label %62, label %40
37: ; preds = %31
%38 = load i32, i32* @stderr
%39 = tail call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
br label %76
40: ; preds = %34, %40
%41 = phi %struct.mntent* [ %60, %40 ], [ %35, %34 ]
%42 = load i32, i32* @FAN_MARK_ADD
%43 = load i32, i32* @FAN_MARK_MOUNT
%44 = or i32 %43, %42
%45 = load i32, i32* @FAN_ACCESS
%46 = load i32, i32* @FAN_MODIFY
%47 = or i32 %46, %45
%48 = load i32, i32* @FAN_OPEN
%49 = or i32 %47, %48
%50 = load i32, i32* @FAN_CLOSE
%51 = or i32 %49, %50
%52 = load i32, i32* @FAN_ONDIR
%53 = or i32 %51, %52
%54 = load i32, i32* @FAN_EVENT_ON_CHILD
%55 = or i32 %53, %54
%56 = load i32, i32* @AT_FDCWD
%57 = getelementptr inbounds %struct.mntent, %struct.mntent* %41, i64 0, i32 0
%58 = load i8*, i8** %57
%59 = tail call i32 @fanotify_mark(i32 %1, i32 %44, i32 %55, i32 %56, i8* %58)
%60 = tail call %struct.mntent* @getmntent(i32* %32)
%61 = icmp eq %struct.mntent* %60, null
br i1 %61, label %62, label %40
62: ; preds = %40, %34
%63 = tail call i32 @endmntent(i32* %32)
%64 = load i32, i32* @FAN_MARK_ADD
%65 = load i32, i32* @FAN_ACCESS
%66 = load i32, i32* @FAN_MODIFY
%67 = or i32 %66, %65
%68 = load i32, i32* @AT_FDCWD
%69 = tail call i32 @fanotify_mark(i32 %1, i32 %64, i32 %67, i32 %68, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%70 = load i32, i32* @FAN_MARK_ADD
%71 = load i32, i32* @FAN_ACCESS
%72 = load i32, i32* @FAN_MODIFY
%73 = or i32 %72, %71
%74 = load i32, i32* @AT_FDCWD
%75 = tail call i32 @fanotify_mark(i32 %1, i32 %70, i32 %73, i32 %74, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
br label %76
76: ; preds = %62, %37, %3
%77 = phi i32 [ -1, %3 ], [ -1, %37 ], [ %1, %62 ]
ret i32 %77
}