#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 /*<<< orphan*/ MNT_DETACH;
int MS_NODEV;
int MS_NOEXEC;
int MS_NOSUID;
int MS_PRIVATE;
int MS_RDONLY;
int MS_REC;
int MS_REMOUNT;
scalar_t__ chdir(char *);
scalar_t__ mkdir(char *, int /*<<< orphan*/);
scalar_t__ mount(char *, char *, char *, int, char *);
scalar_t__ rmdir(char *);
scalar_t__ setdomainname(char *, int /*<<< orphan*/);
scalar_t__ sethostname(char *, int /*<<< orphan*/);
scalar_t__ umount2(char *, int /*<<< orphan*/);
int /*<<< orphan*/ xerror(char *);
int /*<<< orphan*/ xopen_proc(char *);
int /*<<< orphan*/ xpivot_root(char *, char *);
void furnish_namespaces(void) {
  if (sethostname("", 0) != 0)
    xerror("sethostname to empty string");
  if (setdomainname("", 0) != 0)
    xerror("setdomainname to empty string");
  if (mount("", "/", "", MS_PRIVATE | MS_REC, NULL) != 0)
    xerror("remount old root as private recursively");
  int mount_options = MS_NODEV | MS_NOEXEC | MS_NOSUID;
  if (mount("tmpfs", "/tmp", "tmpfs", mount_options,
            "mode=0,nr_blocks=1,nr_inodes=2") != 0)
    xerror("mount small tmpfs at /tmp");
  if (mkdir("/tmp/proc", 0) != 0)
    xerror("mkdir /tmp/proc");
  if (mount("proc", "/tmp/proc", "proc", mount_options, "hidepid=2") != 0)
    xerror("mount /tmp/proc");
  xopen_proc("/tmp/proc");
  if (umount2("/tmp/proc", MNT_DETACH) != 0)
    xerror("umount /tmp/proc");
  if (rmdir("/tmp/proc") != 0)
    xerror("rmdir /tmp/proc");
  if (mkdir("/tmp/x", 0) != 0)
    xerror("mkdir inside small tmpfs");
  xpivot_root("/tmp", "/tmp/x");
  if (chdir("/") != 0)
    xerror("chdir to new root");
  if (umount2("/x", MNT_DETACH) != 0)
    xerror("umount old root");
  if (chdir("/x") != 0)
    xerror("chdir to subdir");
  mount_options |= MS_RDONLY;
  if (mount("", "/", "", MS_REMOUNT | mount_options, NULL) != 0)
    xerror("remount new root as read-only");
}


x86 assembly (clang, -O0):
<furnish_namespaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe8c(%rip),%rdi
xor    %esi,%esi
call   10a0 <sethostname@plt>
cmp    $0x0,%rax
je     11cc <furnish_namespaces+0x2c>
lea    0xe39(%rip),%rdi
call   1080 <xerror@plt>
lea    0xe68(%rip),%rdi
xor    %esi,%esi
call   10b0 <setdomainname@plt>
cmp    $0x0,%rax
je     11f0 <furnish_namespaces+0x50>
lea    0xe31(%rip),%rdi
call   1080 <xerror@plt>
mov    0x2dc9(%rip),%rax
mov    (%rax),%ecx
mov    0x2dd8(%rip),%rax
or     (%rax),%ecx
lea    0xe32(%rip),%rdx
lea    0xe2a(%rip),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %rdx,%rdi
call   1060 <mount@plt>
cmp    $0x0,%rax
je     1233 <furnish_namespaces+0x93>
lea    0xe0e(%rip),%rdi
call   1080 <xerror@plt>
mov    0x2db6(%rip),%rax
mov    (%rax),%eax
mov    0x2d5d(%rip),%rcx
or     (%rcx),%eax
mov    0x2d94(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xe97(%rip),%rdx
lea    0xe36(%rip),%rsi
lea    0xdfb(%rip),%r8
mov    %rdx,%rdi
call   1060 <mount@plt>
cmp    $0x0,%rax
je     1287 <furnish_namespaces+0xe7>
lea    0xe01(%rip),%rdi
call   1080 <xerror@plt>
lea    0xe15(%rip),%rdi
xor    %esi,%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
je     12ab <furnish_namespaces+0x10b>
lea    0xdf7(%rip),%rdi
call   1080 <xerror@plt>
mov    -0x4(%rbp),%ecx
lea    0xdf3(%rip),%rdx
lea    0xde7(%rip),%rsi
lea    0xdea(%rip),%r8
mov    %rdx,%rdi
call   1060 <mount@plt>
cmp    $0x0,%rax
je     12e1 <furnish_namespaces+0x141>
lea    0xddc(%rip),%rdi
call   1080 <xerror@plt>
lea    0xdbb(%rip),%rdi
call   10c0 <xopen_proc@plt>
mov    0x2cc4(%rip),%rax
mov    (%rax),%esi
lea    0xda6(%rip),%rdi
call   1040 <umount2@plt>
cmp    $0x0,%rax
je     1318 <furnish_namespaces+0x178>
lea    0xda4(%rip),%rdi
call   1080 <xerror@plt>
lea    0xd84(%rip),%rdi
call   1050 <rmdir@plt>
cmp    $0x0,%rax
je     133a <furnish_namespaces+0x19a>
lea    0xd93(%rip),%rdi
call   1080 <xerror@plt>
lea    0xd97(%rip),%rdi
xor    %esi,%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
je     135e <furnish_namespaces+0x1be>
lea    0xd86(%rip),%rdi
call   1080 <xerror@plt>
lea    0xd33(%rip),%rdi
lea    0xd6c(%rip),%rsi
call   1090 <xpivot_root@plt>
lea    0xcc2(%rip),%rdi
call   1070 <chdir@plt>
cmp    $0x0,%rax
je     1393 <furnish_namespaces+0x1f3>
lea    0xd6a(%rip),%rdi
call   1080 <xerror@plt>
mov    0x2c1e(%rip),%rax
mov    (%rax),%esi
lea    0xd39(%rip),%rdi
call   1040 <umount2@plt>
cmp    $0x0,%rax
je     13be <furnish_namespaces+0x21e>
lea    0xd51(%rip),%rdi
call   1080 <xerror@plt>
lea    0xd17(%rip),%rdi
call   1070 <chdir@plt>
cmp    $0x0,%rax
je     13e0 <furnish_namespaces+0x240>
lea    0xd3f(%rip),%rdi
call   1080 <xerror@plt>
mov    0x2be9(%rip),%rax
mov    (%rax),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    0x2bba(%rip),%rax
mov    (%rax),%ecx
or     -0x4(%rbp),%ecx
lea    0xc39(%rip),%rdx
lea    0xc31(%rip),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %rdx,%rdi
call   1060 <mount@plt>
cmp    $0x0,%rax
je     142c <furnish_namespaces+0x28c>
lea    0xd03(%rip),%rdi
call   1080 <xerror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<furnish_namespaces>:
push   %r15
push   %r14
push   %rbx
lea    0xe8f(%rip),%rdi
xor    %esi,%esi
call   10a0 <sethostname@plt>
test   %rax,%rax
je     11c4 <furnish_namespaces+0x24>
lea    0xe41(%rip),%rdi
call   1080 <xerror@plt>
lea    0xe70(%rip),%rdi
xor    %esi,%esi
call   10b0 <setdomainname@plt>
test   %rax,%rax
je     11e3 <furnish_namespaces+0x43>
lea    0xe3e(%rip),%rdi
call   1080 <xerror@plt>
mov    0x2dd6(%rip),%rax
mov    0x2de7(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
lea    0xe3e(%rip),%rsi
lea    0xe38(%rip),%rdi
mov    %rdi,%rdx
xor    %r8d,%r8d
call   1060 <mount@plt>
test   %rax,%rax
je     121f <furnish_namespaces+0x7f>
lea    0xe22(%rip),%rdi
call   1080 <xerror@plt>
mov    0x2dca(%rip),%rax
mov    0x2d73(%rip),%rcx
mov    (%rcx),%ebx
or     (%rax),%ebx
mov    0x2da8(%rip),%rax
or     (%rax),%ebx
lea    0xe57(%rip),%rsi
lea    0xeaa(%rip),%rdi
lea    0xe15(%rip),%r8
mov    %rdi,%rdx
mov    %ebx,%ecx
call   1060 <mount@plt>
test   %rax,%rax
je     126a <furnish_namespaces+0xca>
lea    0xe1e(%rip),%rdi
call   1080 <xerror@plt>
lea    0xe32(%rip),%rdi
xor    %esi,%esi
call   1030 <mkdir@plt>
test   %rax,%rax
je     1289 <furnish_namespaces+0xe9>
lea    0xe19(%rip),%rdi
call   1080 <xerror@plt>
lea    0xe13(%rip),%rsi
lea    0xe11(%rip),%rdi
lea    0xe0f(%rip),%r8
mov    %rdi,%rdx
mov    %ebx,%ecx
call   1060 <mount@plt>
test   %rax,%rax
je     12b9 <furnish_namespaces+0x119>
lea    0xe04(%rip),%rdi
call   1080 <xerror@plt>
lea    0xde3(%rip),%r14
mov    %r14,%rdi
call   10c0 <xopen_proc@plt>
mov    0x2ce9(%rip),%r15
mov    (%r15),%esi
mov    %r14,%rdi
call   1040 <umount2@plt>
test   %rax,%rax
je     12eb <furnish_namespaces+0x14b>
lea    0xdd1(%rip),%rdi
call   1080 <xerror@plt>
lea    0xdb1(%rip),%rdi
call   1050 <rmdir@plt>
test   %rax,%rax
je     1308 <furnish_namespaces+0x168>
lea    0xdc5(%rip),%rdi
call   1080 <xerror@plt>
lea    0xdc9(%rip),%rdi
xor    %esi,%esi
call   1030 <mkdir@plt>
test   %rax,%rax
je     1327 <furnish_namespaces+0x187>
lea    0xdbd(%rip),%rdi
call   1080 <xerror@plt>
lea    0xd6a(%rip),%rdi
lea    0xda3(%rip),%rsi
call   1090 <xpivot_root@plt>
lea    0xcf9(%rip),%rdi
call   1070 <chdir@plt>
test   %rax,%rax
je     1357 <furnish_namespaces+0x1b7>
lea    0xda6(%rip),%rdi
call   1080 <xerror@plt>
mov    (%r15),%esi
lea    0xd7b(%rip),%rdi
call   1040 <umount2@plt>
test   %rax,%rax
je     1377 <furnish_namespaces+0x1d7>
lea    0xd98(%rip),%rdi
call   1080 <xerror@plt>
lea    0xd5e(%rip),%rdi
call   1070 <chdir@plt>
test   %rax,%rax
je     1394 <furnish_namespaces+0x1f4>
lea    0xd8b(%rip),%rdi
call   1080 <xerror@plt>
mov    0x2c35(%rip),%rax
or     (%rax),%ebx
mov    0x2c0c(%rip),%rax
or     (%rax),%ebx
lea    0xc8d(%rip),%rsi
lea    0xc87(%rip),%rdi
mov    %rdi,%rdx
mov    %ebx,%ecx
xor    %r8d,%r8d
call   1060 <mount@plt>
test   %rax,%rax
je     13d7 <furnish_namespaces+0x237>
lea    0xd5d(%rip),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1080 <xerror@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [28 x i8] c"sethostname to empty string\00"
@.str.2 = [30 x i8] c"setdomainname to empty string\00"
@.str.3 = [2 x i8] c"/\00"
@MS_PRIVATE = global i32 0
@MS_REC = global i32 0
@.str.4 = [40 x i8] c"remount old root as private recursively\00"
@MS_NODEV = global i32 0
@MS_NOEXEC = global i32 0
@MS_NOSUID = global i32 0
@.str.5 = [6 x i8] c"tmpfs\00"
@.str.6 = [5 x i8] c"/tmp\00"
@.str.7 = [31 x i8] c"mode=0,nr_blocks=1,nr_inodes=2\00"
@.str.8 = [26 x i8] c"mount small tmpfs at /tmp\00"
@.str.9 = [10 x i8] c"/tmp/proc\00"
@.str.10 = [16 x i8] c"mkdir /tmp/proc\00"
@.str.11 = [5 x i8] c"proc\00"
@.str.12 = [10 x i8] c"hidepid=2\00"
@.str.13 = [16 x i8] c"mount /tmp/proc\00"
@MNT_DETACH = global i32 0
@.str.14 = [17 x i8] c"umount /tmp/proc\00"
@.str.15 = [16 x i8] c"rmdir /tmp/proc\00"
@.str.16 = [7 x i8] c"/tmp/x\00"
@.str.17 = [25 x i8] c"mkdir inside small tmpfs\00"
@.str.18 = [18 x i8] c"chdir to new root\00"
@.str.19 = [3 x i8] c"/x\00"
@.str.20 = [16 x i8] c"umount old root\00"
@.str.21 = [16 x i8] c"chdir to subdir\00"
@MS_RDONLY = global i32 0
@MS_REMOUNT = global i32 0
@.str.22 = [30 x i8] c"remount new root as read-only\00"
define void @furnish_namespaces() {
%1 = alloca i32
%2 = call i64 @sethostname(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @xerror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = call i64 @setdomainname(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @xerror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* @MS_PRIVATE
%13 = load i32, i32* @MS_REC
%14 = or i32 %12, %13
%15 = call i64 @mount(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %14, i8* null)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = call i32 @xerror(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
br label %19
19: ; preds = %17, %11
%20 = load i32, i32* @MS_NODEV
%21 = load i32, i32* @MS_NOEXEC
%22 = or i32 %20, %21
%23 = load i32, i32* @MS_NOSUID
%24 = or i32 %22, %23
store i32 %24, i32* %1
%25 = load i32, i32* %1
%26 = call i64 @mount(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %25, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0))
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %19
%29 = call i32 @xerror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0))
br label %30
30: ; preds = %28, %19
%31 = call i64 @mkdir(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 0)
%32 = icmp ne i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 @xerror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
br label %35
35: ; preds = %33, %30
%36 = load i32, i32* %1
%37 = call i64 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 %36, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = call i32 @xerror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0))
br label %41
41: ; preds = %39, %35
%42 = call i32 @xopen_proc(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%43 = load i32, i32* @MNT_DETACH
%44 = call i64 @umount2(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %43)
%45 = icmp ne i64 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %41
%47 = call i32 @xerror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
br label %48
48: ; preds = %46, %41
%49 = call i64 @rmdir(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %48
%52 = call i32 @xerror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
br label %53
53: ; preds = %51, %48
%54 = call i64 @mkdir(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i32 0)
%55 = icmp ne i64 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %53
%57 = call i32 @xerror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.17, i64 0, i64 0))
br label %58
58: ; preds = %56, %53
%59 = call i32 @xpivot_root(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
%60 = call i64 @chdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%61 = icmp ne i64 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %58
%63 = call i32 @xerror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0))
br label %64
64: ; preds = %62, %58
%65 = load i32, i32* @MNT_DETACH
%66 = call i64 @umount2(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i32 %65)
%67 = icmp ne i64 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %64
%69 = call i32 @xerror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0))
br label %70
70: ; preds = %68, %64
%71 = call i64 @chdir(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0))
%72 = icmp ne i64 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %70
%74 = call i32 @xerror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0))
br label %75
75: ; preds = %73, %70
%76 = load i32, i32* @MS_RDONLY
%77 = load i32, i32* %1
%78 = or i32 %77, %76
store i32 %78, i32* %1
%79 = load i32, i32* @MS_REMOUNT
%80 = load i32, i32* %1
%81 = or i32 %79, %80
%82 = call i64 @mount(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %81, i8* null)
%83 = icmp ne i64 %82, 0
br i1 %83, label %84, label %86
84: ; preds = %75
%85 = call i32 @xerror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.22, i64 0, i64 0))
br label %86
86: ; preds = %84, %75
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [28 x i8] c"sethostname to empty string\00"
@.str.2 = [30 x i8] c"setdomainname to empty string\00"
@.str.3 = [2 x i8] c"/\00"
@MS_PRIVATE = global i32 0
@MS_REC = global i32 0
@.str.4 = [40 x i8] c"remount old root as private recursively\00"
@MS_NODEV = global i32 0
@MS_NOEXEC = global i32 0
@MS_NOSUID = global i32 0
@.str.5 = [6 x i8] c"tmpfs\00"
@.str.6 = [5 x i8] c"/tmp\00"
@.str.7 = [31 x i8] c"mode=0,nr_blocks=1,nr_inodes=2\00"
@.str.8 = [26 x i8] c"mount small tmpfs at /tmp\00"
@.str.9 = [10 x i8] c"/tmp/proc\00"
@.str.10 = [16 x i8] c"mkdir /tmp/proc\00"
@.str.11 = [5 x i8] c"proc\00"
@.str.12 = [10 x i8] c"hidepid=2\00"
@.str.13 = [16 x i8] c"mount /tmp/proc\00"
@MNT_DETACH = global i32 0
@.str.14 = [17 x i8] c"umount /tmp/proc\00"
@.str.15 = [16 x i8] c"rmdir /tmp/proc\00"
@.str.16 = [7 x i8] c"/tmp/x\00"
@.str.17 = [25 x i8] c"mkdir inside small tmpfs\00"
@.str.18 = [18 x i8] c"chdir to new root\00"
@.str.19 = [3 x i8] c"/x\00"
@.str.20 = [16 x i8] c"umount old root\00"
@.str.21 = [16 x i8] c"chdir to subdir\00"
@MS_RDONLY = global i32 0
@MS_REMOUNT = global i32 0
@.str.22 = [30 x i8] c"remount new root as read-only\00"
define void @furnish_namespaces() {
%1 = tail call i64 @sethostname(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @xerror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i64 @setdomainname(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @xerror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = load i32, i32* @MS_PRIVATE
%12 = load i32, i32* @MS_REC
%13 = or i32 %12, %11
%14 = tail call i64 @mount(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %13, i8* null)
%15 = icmp eq i64 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %10
%17 = tail call i32 @xerror(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
br label %18
18: ; preds = %16, %10
%19 = load i32, i32* @MS_NODEV
%20 = load i32, i32* @MS_NOEXEC
%21 = or i32 %20, %19
%22 = load i32, i32* @MS_NOSUID
%23 = or i32 %21, %22
%24 = tail call i64 @mount(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %23, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %28, label %26
26: ; preds = %18
%27 = tail call i32 @xerror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0))
br label %28
28: ; preds = %26, %18
%29 = tail call i64 @mkdir(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 0)
%30 = icmp eq i64 %29, 0
br i1 %30, label %33, label %31
31: ; preds = %28
%32 = tail call i32 @xerror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
br label %33
33: ; preds = %31, %28
%34 = tail call i64 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 %23, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %38, label %36
36: ; preds = %33
%37 = tail call i32 @xerror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0))
br label %38
38: ; preds = %36, %33
%39 = tail call i32 @xopen_proc(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%40 = load i32, i32* @MNT_DETACH
%41 = tail call i64 @umount2(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %40)
%42 = icmp eq i64 %41, 0
br i1 %42, label %45, label %43
43: ; preds = %38
%44 = tail call i32 @xerror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
br label %45
45: ; preds = %43, %38
%46 = tail call i64 @rmdir(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %50, label %48
48: ; preds = %45
%49 = tail call i32 @xerror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
br label %50
50: ; preds = %48, %45
%51 = tail call i64 @mkdir(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i32 0)
%52 = icmp eq i64 %51, 0
br i1 %52, label %55, label %53
53: ; preds = %50
%54 = tail call i32 @xerror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.17, i64 0, i64 0))
br label %55
55: ; preds = %53, %50
%56 = tail call i32 @xpivot_root(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
%57 = tail call i64 @chdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%58 = icmp eq i64 %57, 0
br i1 %58, label %61, label %59
59: ; preds = %55
%60 = tail call i32 @xerror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0))
br label %61
61: ; preds = %59, %55
%62 = load i32, i32* @MNT_DETACH
%63 = tail call i64 @umount2(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i32 %62)
%64 = icmp eq i64 %63, 0
br i1 %64, label %67, label %65
65: ; preds = %61
%66 = tail call i32 @xerror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0))
br label %67
67: ; preds = %65, %61
%68 = tail call i64 @chdir(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0))
%69 = icmp eq i64 %68, 0
br i1 %69, label %72, label %70
70: ; preds = %67
%71 = tail call i32 @xerror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.21, i64 0, i64 0))
br label %72
72: ; preds = %70, %67
%73 = load i32, i32* @MS_RDONLY
%74 = or i32 %73, %23
%75 = load i32, i32* @MS_REMOUNT
%76 = or i32 %74, %75
%77 = tail call i64 @mount(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %76, i8* null)
%78 = icmp eq i64 %77, 0
br i1 %78, label %81, label %79
79: ; preds = %72
%80 = tail call i32 @xerror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.22, i64 0, i64 0))
br label %81
81: ; preds = %79, %72
ret void
}