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

/* Variables and functions */
scalar_t__ EXIT_SUCCESS;
int MS_BIND;
int MS_REMOUNT;
scalar_t__ WEXITSTATUS(int);
int /*<<< orphan*/ WIFEXITED(int);
int /*<<< orphan*/ create_and_enter_userns();
int /*<<< orphan*/ die(char *, ...);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(scalar_t__);
int fork();
scalar_t__ mount(char *, char *, char const *, int, char const *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
scalar_t__ unshare(int);
int waitpid(int, int *, int /*<<< orphan*/);
bool test_unpriv_remount(const char *fstype, const char *mount_options,
                         int mount_flags, int remount_flags,
                         int invalid_flags) {
  pid_t child;
  child = fork();
  if (child == -1) {
    die("fork failed: %s\n", strerror(errno));
  }
  if (child != 0) {
    pid_t pid;
    int status;
    pid = waitpid(child, &status, 0);
    if (pid == -1) {
      die("waitpid failed: %s\n", strerror(errno));
    }
    if (pid != child) {
      die("waited for %d got %d\n", child, pid);
    }
    if (!WIFEXITED(status)) {
      die("child did not terminate cleanly\n");
    }
    return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false;
  }
  create_and_enter_userns();
  if (unshare(0x00020000) != 0) {
    die("unshare(CLONE_NEWNS) failed: %s\n", strerror(errno));
  }
  if (mount("testing", "/tmp", fstype, mount_flags, mount_options) != 0) {
    die("mount of %s with options '%s' on /tmp failed: %s\n", fstype,
        mount_options ? mount_options : "", strerror(errno));
  }
  create_and_enter_userns();
  if (unshare(0x00020000) != 0) {
    die("unshare(CLONE_NEWNS) failed: %s\n", strerror(errno));
  }
  if (mount("/tmp", "/tmp", "none", MS_REMOUNT | MS_BIND | remount_flags,
            NULL) != 0) {
    die("remount of /tmp failed: %s\n", strerror(errno));
  }
  if (mount("/tmp", "/tmp", "none", MS_REMOUNT | MS_BIND | invalid_flags,
            NULL) == 0) {
    die("remount of /tmp with invalid flags "
        "succeeded unexpectedly\n");
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<test_unpriv_remount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    $0x0,%al
call   10c0 <fork@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0xffffffff,-0x20(%rbp)
jne    11ec <test_unpriv_remount+0x4c>
mov    0x2e03(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    %eax,%esi
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1080 <die@plt>
cmpl   $0x0,-0x20(%rbp)
je     1296 <test_unpriv_remount+0xf6>
mov    -0x20(%rbp),%edi
lea    -0x28(%rbp),%rsi
xor    %edx,%edx
call   1060 <waitpid@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xffffffff,-0x24(%rbp)
jne    122f <test_unpriv_remount+0x8f>
mov    0x2dc0(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    %eax,%esi
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1080 <die@plt>
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
je     124f <test_unpriv_remount+0xaf>
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xddd(%rip),%rdi
mov    $0x0,%al
call   1080 <die@plt>
mov    -0x28(%rbp),%edi
call   1090 <WIFEXITED@plt>
cmp    $0x0,%eax
jne    126e <test_unpriv_remount+0xce>
lea    0xdd4(%rip),%rdi
mov    $0x0,%al
call   1080 <die@plt>
mov    -0x28(%rbp),%edi
call   1050 <WEXITSTATUS@plt>
mov    %rax,%rdx
mov    0x2d50(%rip),%rax
mov    (%rax),%rsi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
add    $0x40,%rsp
pop    %rbp
ret
mov    $0x0,%al
call   1070 <create_and_enter_userns@plt>
mov    $0x20000,%edi
call   1030 <unshare@plt>
cmp    $0x0,%rax
je     12cf <test_unpriv_remount+0x12f>
mov    0x2d20(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    %eax,%esi
lea    0xd94(%rip),%rdi
mov    $0x0,%al
call   1080 <die@plt>
mov    -0x8(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8
lea    0xd9c(%rip),%rdi
lea    0xd9d(%rip),%rsi
call   1040 <mount@plt>
cmp    $0x0,%rax
je     1355 <test_unpriv_remount+0x1b5>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1317 <test_unpriv_remount+0x177>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    1327 <test_unpriv_remount+0x187>
lea    0xd1c(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    1327 <test_unpriv_remount+0x187>
mov    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    0x2ca2(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x30(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    %eax,%ecx
lea    0xd3c(%rip),%rdi
mov    $0x0,%al
call   1080 <die@plt>
mov    $0x0,%al
call   1070 <create_and_enter_userns@plt>
mov    $0x20000,%edi
call   1030 <unshare@plt>
cmp    $0x0,%rax
je     138e <test_unpriv_remount+0x1ee>
mov    0x2c61(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    %eax,%esi
lea    0xcd5(%rip),%rdi
mov    $0x0,%al
call   1080 <die@plt>
mov    0x2c33(%rip),%rax
mov    (%rax),%ecx
mov    0x2c4a(%rip),%rax
or     (%rax),%ecx
or     -0x18(%rbp),%ecx
lea    0xcdb(%rip),%rsi
lea    0xd0b(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
mov    %rsi,%rdi
call   1040 <mount@plt>
cmp    $0x0,%rax
je     13e6 <test_unpriv_remount+0x246>
mov    0x2c09(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    %eax,%esi
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1080 <die@plt>
mov    0x2bdb(%rip),%rax
mov    (%rax),%ecx
mov    0x2bf2(%rip),%rax
or     (%rax),%ecx
or     -0x1c(%rbp),%ecx
lea    0xc83(%rip),%rsi
lea    0xcb3(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
mov    %rsi,%rdi
call   1040 <mount@plt>
cmp    $0x0,%rax
jne    142e <test_unpriv_remount+0x28e>
lea    0xcb6(%rip),%rdi
mov    $0x0,%al
call   1080 <die@plt>
mov    0x2b9b(%rip),%rax
mov    (%rax),%rdi
call   10a0 <exit@plt>

x86 assembly (clang, -O2):
<test_unpriv_remount>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%ebp
mov    %rsi,%r13
mov    %rdi,%r12
xor    %eax,%eax
call   10c0 <fork@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     1326 <test_unpriv_remount+0x186>
test   %ebx,%ebx
jne    1344 <test_unpriv_remount+0x1a4>
xor    %eax,%eax
call   1070 <create_and_enter_userns@plt>
mov    $0x20000,%edi
call   1030 <unshare@plt>
test   %rax,%rax
je     1207 <test_unpriv_remount+0x67>
mov    0x2de8(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xe5e(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1080 <die@plt>
lea    0xe6f(%rip),%rdi
lea    0xe70(%rip),%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
mov    %r13,%r8
call   1040 <mount@plt>
test   %rax,%rax
je     1259 <test_unpriv_remount+0xb9>
test   %r13,%r13
lea    0xe09(%rip),%rbx
cmovne %r13,%rbx
mov    0x2d9c(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xe40(%rip),%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1080 <die@plt>
xor    %eax,%eax
call   1070 <create_and_enter_userns@plt>
mov    $0x20000,%edi
call   1030 <unshare@plt>
test   %rax,%rax
je     128d <test_unpriv_remount+0xed>
mov    0x2d62(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xdd8(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1080 <die@plt>
mov    0x2d34(%rip),%rbp
mov    0x2d4d(%rip),%rbx
or     0x0(%rbp),%r15d
or     (%rbx),%r15d
lea    0xddc(%rip),%rdi
lea    0xe0c(%rip),%rdx
mov    %rdi,%rsi
mov    %r15d,%ecx
xor    %r8d,%r8d
call   1040 <mount@plt>
test   %rax,%rax
je     12e1 <test_unpriv_remount+0x141>
mov    0x2d0e(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xde9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1080 <die@plt>
or     0x0(%rbp),%r14d
or     (%rbx),%r14d
lea    0xd96(%rip),%rdi
lea    0xdc6(%rip),%rdx
mov    %rdi,%rsi
mov    %r14d,%ecx
xor    %r8d,%r8d
call   1040 <mount@plt>
test   %rax,%rax
jne    1317 <test_unpriv_remount+0x177>
lea    0xdcd(%rip),%rdi
xor    %eax,%eax
call   1080 <die@plt>
mov    0x2cb2(%rip),%rax
mov    (%rax),%rdi
call   10a0 <exit@plt>
mov    0x2cab(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xcc5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1080 <die@plt>
lea    0x4(%rsp),%rsi
mov    %ebx,%edi
xor    %edx,%edx
call   1060 <waitpid@plt>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
je     13b3 <test_unpriv_remount+0x213>
cmp    %ebx,%ebp
je     136f <test_unpriv_remount+0x1cf>
lea    0xcc1(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1080 <die@plt>
mov    0x4(%rsp),%edi
call   1090 <WIFEXITED@plt>
test   %eax,%eax
jne    138a <test_unpriv_remount+0x1ea>
lea    0xcb8(%rip),%rdi
xor    %eax,%eax
call   1080 <die@plt>
mov    0x4(%rsp),%edi
call   1050 <WEXITSTATUS@plt>
mov    0x2c36(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c1e(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xc49(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1080 <die@plt>
cmp    %ebx,%ebp
jne    135d <test_unpriv_remount+0x1bd>
jmp    136f <test_unpriv_remount+0x1cf>

LLVM IR (-O0):
@.str = [17 x i8] c"fork failed: %s\0A\00"
@errno = global i32 0
@.str.1 = [20 x i8] c"waitpid failed: %s\0A\00"
@.str.2 = [22 x i8] c"waited for %d got %d\0A\00"
@.str.3 = [33 x i8] c"child did not terminate cleanly\0A\00"
@EXIT_SUCCESS = global i64 0
@.str.4 = [33 x i8] c"unshare(CLONE_NEWNS) failed: %s\0A\00"
@.str.5 = [8 x i8] c"testing\00"
@.str.6 = [5 x i8] c"/tmp\00"
@.str.7 = [50 x i8] c"mount of %s with options '%s' on /tmp failed: %s\0A\00"
@.str.8 = [1 x i8] zeroinitializer
@.str.9 = [5 x i8] c"none\00"
@MS_REMOUNT = global i32 0
@MS_BIND = global i32 0
@.str.10 = [28 x i8] c"remount of /tmp failed: %s\0A\00"
@.str.11 = [59 x i8] c"remount of /tmp with invalid flags succeeded unexpectedly\0A\00"
define i32 @test_unpriv_remount(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%14 = call i32 (...) @fork()
store i32 %14, i32* %11
%15 = load i32, i32* %11
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %21
17: ; preds = %5
%18 = load i32, i32* @errno
%19 = call i32 @strerror(i32 %18)
%20 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %17, %5
%22 = load i32, i32* %11
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %54
24: ; preds = %21
%25 = load i32, i32* %11
%26 = call i32 @waitpid(i32 %25, i32* %13, i32 0)
store i32 %26, i32* %12
%27 = load i32, i32* %12
%28 = icmp eq i32 %27, -1
br i1 %28, label %29, label %33
29: ; preds = %24
%30 = load i32, i32* @errno
%31 = call i32 @strerror(i32 %30)
%32 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %31)
br label %33
33: ; preds = %29, %24
%34 = load i32, i32* %12
%35 = load i32, i32* %11
%36 = icmp ne i32 %34, %35
br i1 %36, label %37, label %41
37: ; preds = %33
%38 = load i32, i32* %11
%39 = load i32, i32* %12
%40 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %38, i32 %39)
br label %41
41: ; preds = %37, %33
%42 = load i32, i32* %13
%43 = call i32 @WIFEXITED(i32 %42)
%44 = icmp ne i32 %43, 0
br i1 %44, label %47, label %45
45: ; preds = %41
%46 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %47
47: ; preds = %45, %41
%48 = load i32, i32* %13
%49 = call i64 @WEXITSTATUS(i32 %48)
%50 = load i64, i64* @EXIT_SUCCESS
%51 = icmp eq i64 %49, %50
%52 = zext i1 %51 to i64
%53 = select i1 %51, i32 1, i32 0
ret i32 %53
54: ; preds = %21
%55 = call i32 (...) @create_and_enter_userns()
%56 = call i64 @unshare(i32 131072)
%57 = icmp ne i64 %56, 0
br i1 %57, label %58, label %62
58: ; preds = %54
%59 = load i32, i32* @errno
%60 = call i32 @strerror(i32 %59)
%61 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %60)
br label %62
62: ; preds = %58, %54
%63 = load i8*, i8** %6
%64 = load i32, i32* %8
%65 = load i8*, i8** %7
%66 = call i64 @mount(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %63, i32 %64, i8* %65)
%67 = icmp ne i64 %66, 0
br i1 %67, label %68, label %80
68: ; preds = %62
%69 = load i8*, i8** %6
%70 = load i8*, i8** %7
%71 = icmp ne i8* %70, null
br i1 %71, label %72, label %74
72: ; preds = %68
%73 = load i8*, i8** %7
br label %75
74: ; preds = %68
br label %75
75: ; preds = %74, %72
%76 = phi i8* [ %73, %72 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0), %74 ]
%77 = load i32, i32* @errno
%78 = call i32 @strerror(i32 %77)
%79 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0), i8* %69, i8* %76, i32 %78)
br label %80
80: ; preds = %75, %62
%81 = call i32 (...) @create_and_enter_userns()
%82 = call i64 @unshare(i32 131072)
%83 = icmp ne i64 %82, 0
br i1 %83, label %84, label %88
84: ; preds = %80
%85 = load i32, i32* @errno
%86 = call i32 @strerror(i32 %85)
%87 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %86)
br label %88
88: ; preds = %84, %80
%89 = load i32, i32* @MS_REMOUNT
%90 = load i32, i32* @MS_BIND
%91 = or i32 %89, %90
%92 = load i32, i32* %9
%93 = or i32 %91, %92
%94 = call i64 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %93, i8* null)
%95 = icmp ne i64 %94, 0
br i1 %95, label %96, label %100
96: ; preds = %88
%97 = load i32, i32* @errno
%98 = call i32 @strerror(i32 %97)
%99 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i32 %98)
br label %100
100: ; preds = %96, %88
%101 = load i32, i32* @MS_REMOUNT
%102 = load i32, i32* @MS_BIND
%103 = or i32 %101, %102
%104 = load i32, i32* %10
%105 = or i32 %103, %104
%106 = call i64 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %105, i8* null)
%107 = icmp eq i64 %106, 0
br i1 %107, label %108, label %110
108: ; preds = %100
%109 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.11, i64 0, i64 0))
br label %110
110: ; preds = %108, %100
%111 = load i64, i64* @EXIT_SUCCESS
%112 = call i32 @exit(i64 %111)
unreachable
}

LLVM IR (-O2):
@.str = [17 x i8] c"fork failed: %s\0A\00"
@errno = global i32 0
@.str.1 = [20 x i8] c"waitpid failed: %s\0A\00"
@.str.2 = [22 x i8] c"waited for %d got %d\0A\00"
@.str.3 = [33 x i8] c"child did not terminate cleanly\0A\00"
@EXIT_SUCCESS = global i64 0
@.str.4 = [33 x i8] c"unshare(CLONE_NEWNS) failed: %s\0A\00"
@.str.5 = [8 x i8] c"testing\00"
@.str.6 = [5 x i8] c"/tmp\00"
@.str.7 = [50 x i8] c"mount of %s with options '%s' on /tmp failed: %s\0A\00"
@.str.8 = [1 x i8] zeroinitializer
@.str.9 = [5 x i8] c"none\00"
@MS_REMOUNT = global i32 0
@MS_BIND = global i32 0
@.str.10 = [28 x i8] c"remount of /tmp failed: %s\0A\00"
@.str.11 = [59 x i8] c"remount of /tmp with invalid flags succeeded unexpectedly\0A\00"
define i32 @test_unpriv_remount(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = tail call i32 (...) @fork()
switch i32 %7, label %12 [
i32 -1, label %8
i32 0, label %36
]
8: ; preds = %5
%9 = load i32, i32* @errno
%10 = tail call i32 @strerror(i32 %9)
%11 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8, %5
%13 = bitcast i32* %6 to i8*
%14 = call i32 @waitpid(i32 %7, i32* %6, i32 0)
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %20
16: ; preds = %12
%17 = load i32, i32* @errno
%18 = call i32 @strerror(i32 %17)
%19 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %16, %12
%21 = icmp eq i32 %14, %7
br i1 %21, label %24, label %22
22: ; preds = %20
%23 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %14)
br label %24
24: ; preds = %22, %20
%25 = load i32, i32* %6
%26 = call i32 @WIFEXITED(i32 %25)
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %30
30: ; preds = %28, %24
%31 = load i32, i32* %6
%32 = call i64 @WEXITSTATUS(i32 %31)
%33 = load i64, i64* @EXIT_SUCCESS
%34 = icmp eq i64 %32, %33
%35 = zext i1 %34 to i32
ret i32 %35
36: ; preds = %5
%37 = tail call i32 (...) @create_and_enter_userns()
%38 = tail call i64 @unshare(i32 131072)
%39 = icmp eq i64 %38, 0
br i1 %39, label %44, label %40
40: ; preds = %36
%41 = load i32, i32* @errno
%42 = tail call i32 @strerror(i32 %41)
%43 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %42)
br label %44
44: ; preds = %40, %36
%45 = tail call i64 @mount(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %0, i32 %2, i8* %1)
%46 = icmp eq i64 %45, 0
br i1 %46, label %53, label %47
47: ; preds = %44
%48 = icmp eq i8* %1, null
%49 = select i1 %48, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0), i8* %1
%50 = load i32, i32* @errno
%51 = tail call i32 @strerror(i32 %50)
%52 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0), i8* %0, i8* %49, i32 %51)
br label %53
53: ; preds = %47, %44
%54 = tail call i32 (...) @create_and_enter_userns()
%55 = tail call i64 @unshare(i32 131072)
%56 = icmp eq i64 %55, 0
br i1 %56, label %61, label %57
57: ; preds = %53
%58 = load i32, i32* @errno
%59 = tail call i32 @strerror(i32 %58)
%60 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %59)
br label %61
61: ; preds = %57, %53
%62 = load i32, i32* @MS_REMOUNT
%63 = load i32, i32* @MS_BIND
%64 = or i32 %62, %3
%65 = or i32 %64, %63
%66 = tail call i64 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %65, i8* null)
%67 = icmp eq i64 %66, 0
br i1 %67, label %72, label %68
68: ; preds = %61
%69 = load i32, i32* @errno
%70 = tail call i32 @strerror(i32 %69)
%71 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i32 %70)
br label %72
72: ; preds = %68, %61
%73 = load i32, i32* @MS_REMOUNT
%74 = load i32, i32* @MS_BIND
%75 = or i32 %73, %4
%76 = or i32 %75, %74
%77 = tail call i64 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %76, i8* null)
%78 = icmp eq i64 %77, 0
br i1 %78, label %79, label %81
79: ; preds = %72
%80 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.11, i64 0, i64 0))
br label %81
81: ; preds = %79, %72
%82 = load i64, i64* @EXIT_SUCCESS
%83 = tail call i32 @exit(i64 %82)
unreachable
}