#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_RDONLY;
int MS_REC;
int MS_SLAVE;
scalar_t__ WEXITSTATUS(int);
int /*<<< orphan*/ WIFEXITED(int);
int /*<<< orphan*/ die(char *, ...);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(scalar_t__);
int fork();
int mount(char *, char *, char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ trigger_fw(char const *, char const *);
int /*<<< orphan*/ umount(char *);
scalar_t__ unshare(int);
int waitpid(int, int *, int /*<<< orphan*/);
bool test_fw_in_ns(const char *fw_name, const char *sys_path,
                   bool block_fw_in_parent_ns) {
  pid_t child;
  if (block_fw_in_parent_ns)
    if (mount("test", "/lib/firmware", "tmpfs", MS_RDONLY, NULL) == -1)
      die("blocking firmware in parent ns failed\n");
  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");
    }
    if (block_fw_in_parent_ns)
      umount("/lib/firmware");
    return WEXITSTATUS(status) == EXIT_SUCCESS;
  }
  if (unshare(0x00020000) != 0) {
    die("unshare(CLONE_NEWNS) failed: %s\n", strerror(errno));
  }
  if (mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL) == -1)
    die("remount root in child ns failed\n");
  if (!block_fw_in_parent_ns) {
    if (mount("test", "/lib/firmware", "tmpfs", MS_RDONLY, NULL) == -1)
      die("blocking firmware in child ns failed\n");
  } else
    umount("/lib/firmware");
  trigger_fw(fw_name, sys_path);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<test_fw_in_ns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1211 <test_fw_in_ns+0x61>
mov    0x2e0c(%rip),%rax
mov    (%rax),%ecx
lea    0xe23(%rip),%rdi
lea    0xe21(%rip),%rsi
lea    0xe28(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1060 <mount@plt>
cmp    $0xffffffff,%eax
jne    120c <test_fw_in_ns+0x5c>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1090 <die@plt>
jmp    1211 <test_fw_in_ns+0x61>
mov    $0x0,%al
call   10d0 <fork@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1243 <test_fw_in_ns+0x93>
mov    0x2da4(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    %eax,%esi
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1090 <die@plt>
cmpl   $0x0,-0x18(%rbp)
je     12fb <test_fw_in_ns+0x14b>
mov    -0x18(%rbp),%edi
lea    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1080 <waitpid@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    1286 <test_fw_in_ns+0xd6>
mov    0x2d61(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    %eax,%esi
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1090 <die@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
je     12a6 <test_fw_in_ns+0xf6>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xdc6(%rip),%rdi
mov    $0x0,%al
call   1090 <die@plt>
mov    -0x20(%rbp),%edi
call   10a0 <WIFEXITED@plt>
cmp    $0x0,%eax
jne    12c5 <test_fw_in_ns+0x115>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1090 <die@plt>
cmpl   $0x0,-0x14(%rbp)
je     12db <test_fw_in_ns+0x12b>
lea    0xd2f(%rip),%rdi
call   1030 <umount@plt>
mov    -0x20(%rbp),%edi
call   1070 <WEXITSTATUS@plt>
mov    0x2cd6(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret
mov    $0x20000,%edi
call   1040 <unshare@plt>
cmp    $0x0,%rax
je     132d <test_fw_in_ns+0x17d>
mov    0x2cba(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    %eax,%esi
lea    0xd76(%rip),%rdi
mov    $0x0,%al
call   1090 <die@plt>
mov    0x2c94(%rip),%rax
mov    (%rax),%ecx
mov    0x2cab(%rip),%rax
or     (%rax),%ecx
xor    %eax,%eax
mov    %eax,%r8d
lea    0xd72(%rip),%rsi
mov    %r8,%rdi
mov    %r8,%rdx
call   1060 <mount@plt>
cmp    $0xffffffff,%eax
jne    136d <test_fw_in_ns+0x1bd>
lea    0xd59(%rip),%rdi
mov    $0x0,%al
call   1090 <die@plt>
cmpl   $0x0,-0x14(%rbp)
jne    13bb <test_fw_in_ns+0x20b>
mov    0x2c62(%rip),%rax
mov    (%rax),%ecx
lea    0xc79(%rip),%rdi
lea    0xc77(%rip),%rsi
lea    0xc7e(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1060 <mount@plt>
cmp    $0xffffffff,%eax
jne    13b6 <test_fw_in_ns+0x206>
lea    0xd31(%rip),%rdi
mov    $0x0,%al
call   1090 <die@plt>
jmp    13c7 <test_fw_in_ns+0x217>
lea    0xc43(%rip),%rdi
call   1030 <umount@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <trigger_fw@plt>
mov    0x2be5(%rip),%rax
mov    (%rax),%rdi
call   10b0 <exit@plt>

x86 assembly (clang, -O2):
<test_fw_in_ns>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %edx,%r12d
mov    %rsi,%r14
mov    %rdi,%r15
test   %edx,%edx
je     1202 <test_fw_in_ns+0x52>
mov    0x2e10(%rip),%rax
mov    (%rax),%ecx
lea    0xe27(%rip),%rdi
lea    0xe25(%rip),%rsi
lea    0xe2c(%rip),%rdx
xor    %r8d,%r8d
call   1060 <mount@plt>
cmp    $0xffffffff,%eax
jne    1202 <test_fw_in_ns+0x52>
lea    0xe1e(%rip),%rdi
xor    %eax,%eax
call   1090 <die@plt>
xor    %eax,%eax
call   10d0 <fork@plt>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
je     12cc <test_fw_in_ns+0x11c>
test   %ebp,%ebp
jne    12ea <test_fw_in_ns+0x13a>
mov    $0x20000,%edi
call   1040 <unshare@plt>
test   %rax,%rax
je     1249 <test_fw_in_ns+0x99>
mov    0x2d9e(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xe5c(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1090 <die@plt>
mov    0x2d78(%rip),%rax
mov    0x2d91(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
lea    0xe5b(%rip),%rsi
xor    %edi,%edi
xor    %edx,%edx
xor    %r8d,%r8d
call   1060 <mount@plt>
cmp    $0xffffffff,%eax
jne    1281 <test_fw_in_ns+0xd1>
lea    0xe45(%rip),%rdi
xor    %eax,%eax
call   1090 <die@plt>
test   %r12d,%r12d
jne    1390 <test_fw_in_ns+0x1e0>
mov    0x2d4f(%rip),%rax
mov    (%rax),%ecx
lea    0xd66(%rip),%rdi
lea    0xd64(%rip),%rsi
lea    0xd6b(%rip),%rdx
xor    %r8d,%r8d
call   1060 <mount@plt>
cmp    $0xffffffff,%eax
jne    139c <test_fw_in_ns+0x1ec>
lea    0xe20(%rip),%rdi
xor    %eax,%eax
call   1090 <die@plt>
jmp    139c <test_fw_in_ns+0x1ec>
mov    0x2cfd(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xd5f(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1090 <die@plt>
lea    0xc(%rsp),%rsi
mov    %ebp,%edi
xor    %edx,%edx
call   1080 <waitpid@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     1368 <test_fw_in_ns+0x1b8>
cmp    %ebp,%ebx
je     1315 <test_fw_in_ns+0x165>
lea    0xd5b(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1090 <die@plt>
mov    0xc(%rsp),%edi
call   10a0 <WIFEXITED@plt>
test   %eax,%eax
jne    1330 <test_fw_in_ns+0x180>
lea    0xd52(%rip),%rdi
xor    %eax,%eax
call   1090 <die@plt>
test   %r12d,%r12d
je     1341 <test_fw_in_ns+0x191>
lea    0xcc9(%rip),%rdi
call   1030 <umount@plt>
mov    0xc(%rsp),%edi
call   1070 <WEXITSTATUS@plt>
mov    0x2c6f(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
sete   %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c61(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xcd4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1090 <die@plt>
cmp    %ebp,%ebx
jne    1303 <test_fw_in_ns+0x153>
jmp    1315 <test_fw_in_ns+0x165>
lea    0xc6e(%rip),%rdi
call   1030 <umount@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <trigger_fw@plt>
mov    0x2c12(%rip),%rax
mov    (%rax),%rdi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"test\00"
@.str.1 = [14 x i8] c"/lib/firmware\00"
@.str.2 = [6 x i8] c"tmpfs\00"
@MS_RDONLY = global i32 0
@.str.3 = [39 x i8] c"blocking firmware in parent ns failed\0A\00"
@.str.4 = [17 x i8] c"fork failed: %s\0A\00"
@errno = global i32 0
@.str.5 = [20 x i8] c"waitpid failed: %s\0A\00"
@.str.6 = [22 x i8] c"waited for %d got %d\0A\00"
@.str.7 = [33 x i8] c"child did not terminate cleanly\0A\00"
@EXIT_SUCCESS = global i64 0
@.str.8 = [33 x i8] c"unshare(CLONE_NEWNS) failed: %s\0A\00"
@.str.9 = [2 x i8] c"/\00"
@MS_SLAVE = global i32 0
@MS_REC = global i32 0
@.str.10 = [33 x i8] c"remount root in child ns failed\0A\00"
@.str.11 = [38 x i8] c"blocking firmware in child ns failed\0A\00"
define i32 @test_fw_in_ns(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %3
%13 = load i32, i32* @MS_RDONLY
%14 = call i32 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %13, i32* null)
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
br label %18
18: ; preds = %16, %12
br label %19
19: ; preds = %18, %3
%20 = call i32 (...) @fork()
store i32 %20, i32* %7
%21 = load i32, i32* %7
%22 = icmp eq i32 %21, -1
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i32, i32* @errno
%25 = call i32 @strerror(i32 %24)
%26 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %23, %19
%28 = load i32, i32* %7
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %64
30: ; preds = %27
%31 = load i32, i32* %7
%32 = call i32 @waitpid(i32 %31, i32* %9, i32 0)
store i32 %32, i32* %8
%33 = load i32, i32* %8
%34 = icmp eq i32 %33, -1
br i1 %34, label %35, label %39
35: ; preds = %30
%36 = load i32, i32* @errno
%37 = call i32 @strerror(i32 %36)
%38 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %37)
br label %39
39: ; preds = %35, %30
%40 = load i32, i32* %8
%41 = load i32, i32* %7
%42 = icmp ne i32 %40, %41
br i1 %42, label %43, label %47
43: ; preds = %39
%44 = load i32, i32* %7
%45 = load i32, i32* %8
%46 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %44, i32 %45)
br label %47
47: ; preds = %43, %39
%48 = load i32, i32* %9
%49 = call i32 @WIFEXITED(i32 %48)
%50 = icmp ne i32 %49, 0
br i1 %50, label %53, label %51
51: ; preds = %47
%52 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
br label %53
53: ; preds = %51, %47
%54 = load i32, i32* %6
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %53
%57 = call i32 @umount(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %58
58: ; preds = %56, %53
%59 = load i32, i32* %9
%60 = call i64 @WEXITSTATUS(i32 %59)
%61 = load i64, i64* @EXIT_SUCCESS
%62 = icmp eq i64 %60, %61
%63 = zext i1 %62 to i32
ret i32 %63
64: ; preds = %27
%65 = call i64 @unshare(i32 131072)
%66 = icmp ne i64 %65, 0
br i1 %66, label %67, label %71
67: ; preds = %64
%68 = load i32, i32* @errno
%69 = call i32 @strerror(i32 %68)
%70 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i32 %69)
br label %71
71: ; preds = %67, %64
%72 = load i32, i32* @MS_SLAVE
%73 = load i32, i32* @MS_REC
%74 = or i32 %72, %73
%75 = call i32 @mount(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* null, i32 %74, i32* null)
%76 = icmp eq i32 %75, -1
br i1 %76, label %77, label %79
77: ; preds = %71
%78 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0))
br label %79
79: ; preds = %77, %71
%80 = load i32, i32* %6
%81 = icmp ne i32 %80, 0
br i1 %81, label %89, label %82
82: ; preds = %79
%83 = load i32, i32* @MS_RDONLY
%84 = call i32 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %83, i32* null)
%85 = icmp eq i32 %84, -1
br i1 %85, label %86, label %88
86: ; preds = %82
%87 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0))
br label %88
88: ; preds = %86, %82
br label %91
89: ; preds = %79
%90 = call i32 @umount(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %91
91: ; preds = %89, %88
%92 = load i8*, i8** %4
%93 = load i8*, i8** %5
%94 = call i32 @trigger_fw(i8* %92, i8* %93)
%95 = load i64, i64* @EXIT_SUCCESS
%96 = call i32 @exit(i64 %95)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
@.str.1 = [14 x i8] c"/lib/firmware\00"
@.str.2 = [6 x i8] c"tmpfs\00"
@MS_RDONLY = global i32 0
@.str.3 = [39 x i8] c"blocking firmware in parent ns failed\0A\00"
@.str.4 = [17 x i8] c"fork failed: %s\0A\00"
@errno = global i32 0
@.str.5 = [20 x i8] c"waitpid failed: %s\0A\00"
@.str.6 = [22 x i8] c"waited for %d got %d\0A\00"
@.str.7 = [33 x i8] c"child did not terminate cleanly\0A\00"
@EXIT_SUCCESS = global i64 0
@.str.8 = [33 x i8] c"unshare(CLONE_NEWNS) failed: %s\0A\00"
@.str.9 = [2 x i8] c"/\00"
@MS_SLAVE = global i32 0
@MS_REC = global i32 0
@.str.10 = [33 x i8] c"remount root in child ns failed\0A\00"
@.str.11 = [38 x i8] c"blocking firmware in child ns failed\0A\00"
define i32 @test_fw_in_ns(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = icmp eq i32 %2, 0
br i1 %5, label %12, label %6
6: ; preds = %3
%7 = load i32, i32* @MS_RDONLY
%8 = tail call i32 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32* null)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
br label %12
12: ; preds = %6, %10, %3
%13 = tail call i32 (...) @fork()
switch i32 %13, label %18 [
i32 -1, label %14
i32 0, label %45
]
14: ; preds = %12
%15 = load i32, i32* @errno
%16 = tail call i32 @strerror(i32 %15)
%17 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %14, %12
%19 = bitcast i32* %4 to i8*
%20 = call i32 @waitpid(i32 %13, i32* %4, i32 0)
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i32, i32* @errno
%24 = call i32 @strerror(i32 %23)
%25 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %24)
br label %26
26: ; preds = %22, %18
%27 = icmp eq i32 %20, %13
br i1 %27, label %30, label %28
28: ; preds = %26
%29 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %13, i32 %20)
br label %30
30: ; preds = %28, %26
%31 = load i32, i32* %4
%32 = call i32 @WIFEXITED(i32 %31)
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
br label %36
36: ; preds = %34, %30
br i1 %5, label %39, label %37
37: ; preds = %36
%38 = call i32 @umount(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %39
39: ; preds = %37, %36
%40 = load i32, i32* %4
%41 = call i64 @WEXITSTATUS(i32 %40)
%42 = load i64, i64* @EXIT_SUCCESS
%43 = icmp eq i64 %41, %42
%44 = zext i1 %43 to i32
ret i32 %44
45: ; preds = %12
%46 = tail call i64 @unshare(i32 131072)
%47 = icmp eq i64 %46, 0
br i1 %47, label %52, label %48
48: ; preds = %45
%49 = load i32, i32* @errno
%50 = tail call i32 @strerror(i32 %49)
%51 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i32 %50)
br label %52
52: ; preds = %48, %45
%53 = load i32, i32* @MS_SLAVE
%54 = load i32, i32* @MS_REC
%55 = or i32 %54, %53
%56 = tail call i32 @mount(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* null, i32 %55, i32* null)
%57 = icmp eq i32 %56, -1
br i1 %57, label %58, label %60
58: ; preds = %52
%59 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0))
br label %60
60: ; preds = %58, %52
br i1 %5, label %61, label %67
61: ; preds = %60
%62 = load i32, i32* @MS_RDONLY
%63 = tail call i32 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %62, i32* null)
%64 = icmp eq i32 %63, -1
br i1 %64, label %65, label %69
65: ; preds = %61
%66 = tail call i32 (i8*, ...) @die(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0))
br label %69
67: ; preds = %60
%68 = tail call i32 @umount(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %69
69: ; preds = %61, %65, %67
%70 = tail call i32 @trigger_fw(i8* %0, i8* %1)
%71 = load i64, i64* @EXIT_SUCCESS
%72 = tail call i32 @exit(i64 %71)
unreachable
}