#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 */
int MS_BIND;
int MS_NOATIME;
int MS_NODIRATIME;
int MS_NOSUID;
int /*<<< orphan*/ mount(char *, char *, char *, int, void *);
int /*<<< orphan*/ umount(char *);
int /*<<< orphan*/ umount2(char *, int);
int main() {
  mount("mount_source", "mount_target", "ext2",
        MS_NOSUID | MS_NOATIME | MS_NODIRATIME | MS_BIND, "some arguments");
  umount("umount_target");
  umount2("umount2_target", 0x00000001);
  umount2("umount2_target", 0x00000002);
  umount2("umount2_target", 0x00000004);
  mount((char *)-1, "mount_target", "ext2",
        MS_NOSUID | MS_NOATIME | MS_NODIRATIME | MS_BIND, "some arguments");
  mount("mount_source", (char *)-1, "ext2",
        MS_NOSUID | MS_NOATIME | MS_NODIRATIME | MS_BIND, "some arguments");
  mount("mount_source", "mount_target", (char *)-1,
        MS_NOSUID | MS_NOATIME | MS_NODIRATIME | MS_BIND, "some arguments");
  mount("mount_source", "mount_target", "ext2", (unsigned long)-1,
        "some arguments");
  mount("mount_source", "mount_target", "ext2",
        MS_NOSUID | MS_NOATIME | MS_NODIRATIME | MS_BIND, (void *)-1);
  umount2((char *)-1, 0x00000001);
  umount2("umount2_target", -1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea1(%rip),%rax
or     (%rax),%ecx
mov    0x2e70(%rip),%rax
or     (%rax),%ecx
mov    0x2e77(%rip),%rax
or     (%rax),%ecx
lea    0xe96(%rip),%rdi
lea    0xeb1(%rip),%rsi
lea    0xe95(%rip),%rdx
lea    0xe93(%rip),%r8
call   1050 <mount@plt>
lea    0xe96(%rip),%rdi
call   1030 <umount@plt>
lea    0xe98(%rip),%rdi
mov    $0x1,%esi
call   1040 <umount2@plt>
lea    0xe87(%rip),%rdi
mov    $0x2,%esi
call   1040 <umount2@plt>
lea    0xe76(%rip),%rdi
mov    $0x4,%esi
call   1040 <umount2@plt>
mov    0x2e16(%rip),%rax
mov    (%rax),%ecx
mov    0x2e1d(%rip),%rax
or     (%rax),%ecx
mov    0x2dec(%rip),%rax
or     (%rax),%ecx
mov    0x2df3(%rip),%rax
or     (%rax),%ecx
mov    $0xffffffffffffffff,%rdi
lea    0xe2d(%rip),%rsi
lea    0xe11(%rip),%rdx
lea    0xe0f(%rip),%r8
call   1050 <mount@plt>
mov    0x2dd1(%rip),%rax
mov    (%rax),%ecx
mov    0x2dd8(%rip),%rax
or     (%rax),%ecx
mov    0x2da7(%rip),%rax
or     (%rax),%ecx
mov    0x2dae(%rip),%rax
or     (%rax),%ecx
lea    0xdcd(%rip),%rdi
mov    $0xffffffffffffffff,%rsi
lea    0xdcc(%rip),%rdx
lea    0xdca(%rip),%r8
call   1050 <mount@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%ecx
mov    0x2d93(%rip),%rax
or     (%rax),%ecx
mov    0x2d62(%rip),%rax
or     (%rax),%ecx
mov    0x2d69(%rip),%rax
or     (%rax),%ecx
lea    0xd88(%rip),%rdi
lea    0xda3(%rip),%rsi
mov    $0xffffffffffffffff,%rdx
lea    0xd85(%rip),%r8
call   1050 <mount@plt>
lea    0xd67(%rip),%rdi
lea    0xd82(%rip),%rsi
lea    0xd66(%rip),%rdx
mov    $0xffffffff,%ecx
lea    0xd5f(%rip),%r8
call   1050 <mount@plt>
mov    0x2d21(%rip),%rax
mov    (%rax),%ecx
mov    0x2d28(%rip),%rax
or     (%rax),%ecx
mov    0x2cf7(%rip),%rax
or     (%rax),%ecx
mov    0x2cfe(%rip),%rax
or     (%rax),%ecx
lea    0xd1d(%rip),%rdi
lea    0xd38(%rip),%rsi
lea    0xd1c(%rip),%rdx
mov    $0xffffffffffffffff,%r8
call   1050 <mount@plt>
mov    $0xffffffffffffffff,%rdi
mov    $0x1,%esi
call   1040 <umount2@plt>
lea    0xd1a(%rip),%rdi
mov    $0xffffffff,%esi
call   1040 <umount2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e9e(%rip),%rax
mov    0x2ea7(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    %rax,%r13
mov    0x2e71(%rip),%r15
or     (%r15),%ecx
mov    0x2e77(%rip),%r14
or     (%r14),%ecx
lea    0xe95(%rip),%rdi
lea    0xeb0(%rip),%rsi
lea    0xe94(%rip),%rbx
lea    0xe92(%rip),%r8
mov    %rbx,%rdx
mov    %r8,%r12
call   1050 <mount@plt>
lea    0xe8f(%rip),%rdi
call   1030 <umount@plt>
lea    0xe91(%rip),%rbp
mov    %rbp,%rdi
mov    $0x1,%esi
call   1040 <umount2@plt>
mov    %rbp,%rdi
mov    $0x2,%esi
call   1040 <umount2@plt>
mov    %rbp,%rdi
mov    $0x4,%esi
call   1040 <umount2@plt>
mov    0x2e24(%rip),%rbp
mov    0x0(%rbp),%ecx
or     0x0(%r13),%ecx
or     (%r15),%ecx
or     (%r14),%ecx
mov    $0xffffffffffffffff,%rdi
lea    0xe3b(%rip),%rsi
mov    %rbx,%rdx
mov    %r12,%rbx
mov    %r12,%r8
call   1050 <mount@plt>
mov    0x0(%rbp),%ecx
mov    %rbp,%r12
or     0x0(%r13),%ecx
or     (%r15),%ecx
or     (%r14),%ecx
lea    0xdf4(%rip),%rbp
mov    %rbp,%rdi
mov    $0xffffffffffffffff,%rsi
lea    0xdf0(%rip),%rdx
mov    %rbx,%r8
call   1050 <mount@plt>
mov    (%r12),%ecx
mov    0x2db0(%rip),%rax
or     (%rax),%ecx
or     (%r15),%ecx
or     (%r14),%ecx
mov    %r14,%r15
mov    %rbp,%rdi
lea    0xddd(%rip),%r14
mov    %r14,%rsi
mov    $0xffffffffffffffff,%rdx
mov    %rbx,%r8
call   1050 <mount@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
lea    0xda9(%rip),%rdx
mov    $0xffffffff,%ecx
mov    %rbx,%r8
call   1050 <mount@plt>
mov    (%r12),%ecx
mov    0x2d64(%rip),%rax
or     (%rax),%ecx
mov    0x2d43(%rip),%rax
or     (%rax),%ecx
or     (%r15),%ecx
mov    %rbp,%rdi
mov    %r14,%rsi
lea    0xd76(%rip),%rdx
mov    $0xffffffffffffffff,%r8
call   1050 <mount@plt>
mov    $0xffffffffffffffff,%rdi
mov    $0x1,%esi
call   1040 <umount2@plt>
lea    0xd74(%rip),%rdi
mov    $0xffffffff,%esi
call   1040 <umount2@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"mount_source\00"
@.str.1 = [13 x i8] c"mount_target\00"
@.str.2 = [5 x i8] c"ext2\00"
@MS_NOSUID = global i32 0
@MS_NOATIME = global i32 0
@MS_NODIRATIME = global i32 0
@MS_BIND = global i32 0
@.str.3 = [15 x i8] c"some arguments\00"
@.str.4 = [14 x i8] c"umount_target\00"
@.str.5 = [15 x i8] c"umount2_target\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @MS_NOSUID
%3 = load i32, i32* @MS_NOATIME
%4 = or i32 %2, %3
%5 = load i32, i32* @MS_NODIRATIME
%6 = or i32 %4, %5
%7 = load i32, i32* @MS_BIND
%8 = or i32 %6, %7
%9 = call i32 @mount(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %8, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @umount(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 @umount2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 1)
%12 = call i32 @umount2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 2)
%13 = call i32 @umount2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 4)
%14 = load i32, i32* @MS_NOSUID
%15 = load i32, i32* @MS_NOATIME
%16 = or i32 %14, %15
%17 = load i32, i32* @MS_NODIRATIME
%18 = or i32 %16, %17
%19 = load i32, i32* @MS_BIND
%20 = or i32 %18, %19
%21 = call i32 @mount(i8* inttoptr (i64 -1 to i8*), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %20, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%22 = load i32, i32* @MS_NOSUID
%23 = load i32, i32* @MS_NOATIME
%24 = or i32 %22, %23
%25 = load i32, i32* @MS_NODIRATIME
%26 = or i32 %24, %25
%27 = load i32, i32* @MS_BIND
%28 = or i32 %26, %27
%29 = call i32 @mount(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* inttoptr (i64 -1 to i8*), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %28, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%30 = load i32, i32* @MS_NOSUID
%31 = load i32, i32* @MS_NOATIME
%32 = or i32 %30, %31
%33 = load i32, i32* @MS_NODIRATIME
%34 = or i32 %32, %33
%35 = load i32, i32* @MS_BIND
%36 = or i32 %34, %35
%37 = call i32 @mount(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* inttoptr (i64 -1 to i8*), i32 %36, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%38 = call i32 @mount(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 -1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%39 = load i32, i32* @MS_NOSUID
%40 = load i32, i32* @MS_NOATIME
%41 = or i32 %39, %40
%42 = load i32, i32* @MS_NODIRATIME
%43 = or i32 %41, %42
%44 = load i32, i32* @MS_BIND
%45 = or i32 %43, %44
%46 = call i32 @mount(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %45, i8* inttoptr (i64 -1 to i8*))
%47 = call i32 @umount2(i8* inttoptr (i64 -1 to i8*), i32 1)
%48 = call i32 @umount2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 -1)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"mount_source\00"
@.str.1 = [13 x i8] c"mount_target\00"
@.str.2 = [5 x i8] c"ext2\00"
@MS_NOSUID = global i32 0
@MS_NOATIME = global i32 0
@MS_NODIRATIME = global i32 0
@MS_BIND = global i32 0
@.str.3 = [15 x i8] c"some arguments\00"
@.str.4 = [14 x i8] c"umount_target\00"
@.str.5 = [15 x i8] c"umount2_target\00"
define i32 @main() {
%1 = load i32, i32* @MS_NOSUID
%2 = load i32, i32* @MS_NOATIME
%3 = or i32 %2, %1
%4 = load i32, i32* @MS_NODIRATIME
%5 = or i32 %3, %4
%6 = load i32, i32* @MS_BIND
%7 = or i32 %5, %6
%8 = tail call i32 @mount(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 @umount(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @umount2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 1)
%11 = tail call i32 @umount2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 2)
%12 = tail call i32 @umount2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 4)
%13 = load i32, i32* @MS_NOSUID
%14 = load i32, i32* @MS_NOATIME
%15 = or i32 %14, %13
%16 = load i32, i32* @MS_NODIRATIME
%17 = or i32 %15, %16
%18 = load i32, i32* @MS_BIND
%19 = or i32 %17, %18
%20 = tail call i32 @mount(i8* inttoptr (i64 -1 to i8*), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %19, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%21 = load i32, i32* @MS_NOSUID
%22 = load i32, i32* @MS_NOATIME
%23 = or i32 %22, %21
%24 = load i32, i32* @MS_NODIRATIME
%25 = or i32 %23, %24
%26 = load i32, i32* @MS_BIND
%27 = or i32 %25, %26
%28 = tail call i32 @mount(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* inttoptr (i64 -1 to i8*), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %27, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%29 = load i32, i32* @MS_NOSUID
%30 = load i32, i32* @MS_NOATIME
%31 = or i32 %30, %29
%32 = load i32, i32* @MS_NODIRATIME
%33 = or i32 %31, %32
%34 = load i32, i32* @MS_BIND
%35 = or i32 %33, %34
%36 = tail call i32 @mount(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* inttoptr (i64 -1 to i8*), i32 %35, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%37 = tail call i32 @mount(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 -1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%38 = load i32, i32* @MS_NOSUID
%39 = load i32, i32* @MS_NOATIME
%40 = or i32 %39, %38
%41 = load i32, i32* @MS_NODIRATIME
%42 = or i32 %40, %41
%43 = load i32, i32* @MS_BIND
%44 = or i32 %42, %43
%45 = tail call i32 @mount(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %44, i8* inttoptr (i64 -1 to i8*))
%46 = tail call i32 @umount2(i8* inttoptr (i64 -1 to i8*), i32 1)
%47 = tail call i32 @umount2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 -1)
ret i32 0
}