#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 dirent {
  scalar_t__ d_type;
  int /*<<< orphan*/ d_name;
};
typedef size_t ssize_t;
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
scalar_t__ DT_DIR;
scalar_t__ DT_LNK;
scalar_t__ DT_UNKNOWN;
int MS_BIND;
int MS_RDONLY;
int MS_REC;
int O_CREAT;
int O_WRONLY;
int PATH_MAX;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assert_perror(int /*<<< orphan*/);
int /*<<< orphan*/ close(int /*<<< orphan*/);
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
char *concat(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ free(char *);
int mkdir(char *, int);
int mount(char *, char *, char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ open(char *, int);
int /*<<< orphan*/ *opendir(char const *);
struct dirent *readdir(int /*<<< orphan*/ *);
size_t readlink(char *, char *, int);
scalar_t__ strcmp(int /*<<< orphan*/, char *);
int symlink(char *, char *);
void bind_mount(const char *source, const char *target) {
  DIR *stream = opendir(source);
  for (struct dirent *entry = readdir(stream); entry != NULL;
       entry = readdir(stream)) {
    assert(entry->d_type != DT_UNKNOWN);
    if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0)
      continue;
    char *abs_source = concat(source, entry->d_name);
    char *new_entry = concat(target, entry->d_name);
    if (entry->d_type == DT_LNK) {
      char target[PATH_MAX];
      ssize_t result = readlink(abs_source, target, sizeof target - 1);
      if (result > 0) {
        target[result] = '\0';
        int err = symlink(target, new_entry);
        if (err < 0)
          assert_perror(errno);
      }
    } else {
      if (entry->d_type == DT_DIR) {
        int err = mkdir(new_entry, 0700);
        if (err != 0)
          assert_perror(errno);
      } else
        close(open(new_entry, O_WRONLY | O_CREAT));
      int err = mount(abs_source, new_entry, "none",
                      MS_BIND | MS_REC | MS_RDONLY, NULL);
      if (err != 0 && entry->d_type != DT_DIR)
        assert_perror(errno);
      free(new_entry);
      free(abs_source);
    }
  }
  closedir(stream);
}


x86 assembly (clang, -O0):
<bind_mount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <opendir@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   10f0 <readdir@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1432 <bind_mount+0x252>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    0x2db5(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   10e0 <assert@plt>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%edi
lea    0xdc0(%rip),%rsi
call   10d0 <strcmp@plt>
cmp    $0x0,%rax
je     126d <bind_mount+0x8d>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%edi
lea    0xda2(%rip),%rsi
call   10d0 <strcmp@plt>
cmp    $0x0,%rax
jne    1272 <bind_mount+0x92>
jmp    1420 <bind_mount+0x240>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%esi
call   10a0 <concat@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%esi
call   10a0 <concat@plt>
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    0x2cf8(%rip),%rcx
cmp    (%rcx),%rax
jne    133c <bind_mount+0x15c>
mov    0x2d30(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x60(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rdi
sub    $0x1,%rax
mov    %eax,%edx
call   1050 <readlink@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jbe    1330 <bind_mount+0x150>
mov    -0x60(%rbp),%rdi
mov    -0x48(%rbp),%rax
movb   $0x0,(%rdi,%rax,1)
mov    -0x30(%rbp),%rsi
call   1090 <symlink@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jge    132b <bind_mount+0x14b>
mov    0x2c84(%rip),%rax
mov    (%rax),%edi
call   1070 <assert_perror@plt>
jmp    1330 <bind_mount+0x150>
mov    -0x38(%rbp),%rax
mov    %rax,%rsp
jmp    141b <bind_mount+0x23b>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    0x2c66(%rip),%rcx
cmp    (%rcx),%rax
jne    1381 <bind_mount+0x1a1>
mov    -0x30(%rbp),%rdi
mov    $0x1c0,%esi
call   1040 <mkdir@plt>
mov    %eax,-0x50(%rbp)
cmpl   $0x0,-0x50(%rbp)
je     137c <bind_mount+0x19c>
mov    0x2c33(%rip),%rax
mov    (%rax),%edi
call   1070 <assert_perror@plt>
jmp    13a3 <bind_mount+0x1c3>
mov    -0x30(%rbp),%rdi
mov    0x2c04(%rip),%rax
mov    (%rax),%esi
mov    0x2c63(%rip),%rax
or     (%rax),%esi
call   1100 <open@plt>
mov    %eax,%edi
call   10b0 <close@plt>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    0x2c1e(%rip),%rax
mov    (%rax),%ecx
mov    0x2c0d(%rip),%rax
or     (%rax),%ecx
mov    0x2bfc(%rip),%rax
or     (%rax),%ecx
lea    0xc36(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1080 <mount@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x0,-0x54(%rbp)
je     1409 <bind_mount+0x229>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    0x2bbe(%rip),%rcx
cmp    (%rcx),%rax
je     1409 <bind_mount+0x229>
mov    0x2ba6(%rip),%rax
mov    (%rax),%edi
call   1070 <assert_perror@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
jmp    1420 <bind_mount+0x240>
mov    -0x18(%rbp),%rdi
call   10f0 <readdir@plt>
mov    %rax,-0x20(%rbp)
jmp    120a <bind_mount+0x2a>
mov    -0x18(%rbp),%rdi
call   10c0 <closedir@plt>
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bind_mount>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,-0x40(%rbp)
mov    %rdi,%r12
call   1060 <opendir@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   10f0 <readdir@plt>
test   %rax,%rax
je     13d6 <bind_mount+0x1f6>
mov    %rax,%r13
mov    0x2dbd(%rip),%r15
lea    0xddf(%rip),%rbx
mov    %r12,-0x38(%rbp)
mov    %r14,-0x30(%rbp)
jmp    1262 <bind_mount+0x82>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%r14
mov    0x2d91(%rip),%r15
lea    0xdb3(%rip),%rbx
mov    %r14,%rdi
call   10f0 <readdir@plt>
mov    %rax,%r13
test   %rax,%rax
je     13d6 <bind_mount+0x1f6>
mov    0x0(%r13),%rax
xor    %edi,%edi
cmp    (%r15),%rax
setne  %dil
call   10e0 <assert@plt>
mov    0x8(%r13),%edi
mov    %rbx,%rsi
call   10d0 <strcmp@plt>
test   %rax,%rax
je     124e <bind_mount+0x6e>
mov    0x8(%r13),%edi
lea    0xd70(%rip),%rsi
call   10d0 <strcmp@plt>
test   %rax,%rax
je     124e <bind_mount+0x6e>
mov    0x8(%r13),%esi
mov    %r12,%rdi
call   10a0 <concat@plt>
mov    %rax,%r15
mov    0x8(%r13),%esi
mov    -0x40(%rbp),%rdi
call   10a0 <concat@plt>
mov    %rax,%r14
mov    0x0(%r13),%rax
mov    0x2cdc(%rip),%rcx
cmp    (%rcx),%rax
jne    1329 <bind_mount+0x149>
mov    %rsp,%r13
mov    0x2d15(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rbx
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%rbx
mov    %rbx,%rsp
lea    -0x1(%rax),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <readlink@plt>
test   %rax,%rax
je     131d <bind_mount+0x13d>
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1090 <symlink@plt>
test   %eax,%eax
jns    131d <bind_mount+0x13d>
mov    0x2c92(%rip),%rax
mov    (%rax),%edi
call   1070 <assert_perror@plt>
mov    %r13,%rsp
mov    -0x38(%rbp),%r12
jmp    123c <bind_mount+0x5c>
mov    0x2c80(%rip),%rcx
cmp    (%rcx),%rax
jne    1356 <bind_mount+0x176>
mov    %r14,%rdi
mov    $0x1c0,%esi
call   1040 <mkdir@plt>
test   %eax,%eax
je     1377 <bind_mount+0x197>
mov    0x2c5b(%rip),%rax
mov    (%rax),%edi
call   1070 <assert_perror@plt>
jmp    1377 <bind_mount+0x197>
mov    0x2c9b(%rip),%rax
mov    (%rax),%esi
mov    0x2c2a(%rip),%rax
or     (%rax),%esi
mov    %r14,%rdi
call   1100 <open@plt>
mov    %eax,%edi
call   10b0 <close@plt>
mov    0x2c4a(%rip),%rax
mov    (%rax),%ecx
mov    0x2c49(%rip),%rax
or     (%rax),%ecx
mov    0x2c30(%rip),%rax
or     (%rax),%ecx
mov    %r15,%rdi
mov    %r14,%rsi
lea    0xc64(%rip),%rdx
xor    %r8d,%r8d
call   1080 <mount@plt>
test   %eax,%eax
je     122c <bind_mount+0x4c>
mov    0x0(%r13),%rax
mov    0x2bf6(%rip),%rcx
cmp    (%rcx),%rax
je     122c <bind_mount+0x4c>
mov    0x2bde(%rip),%rax
mov    (%rax),%edi
call   1070 <assert_perror@plt>
jmp    122c <bind_mount+0x4c>
mov    %r14,%rdi
call   10c0 <closedir@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.dirent = type { i64, i32 }
@DT_UNKNOWN = global i64 0
@.str = [2 x i8] c".\00"
@.str.1 = [3 x i8] c"..\00"
@DT_LNK = global i64 0
@PATH_MAX = global i32 0
@errno = global i32 0
@DT_DIR = global i64 0
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@.str.2 = [5 x i8] c"none\00"
@MS_BIND = global i32 0
@MS_REC = global i32 0
@MS_RDONLY = global i32 0
define void @bind_mount(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca %struct.dirent*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i64
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%15 = load i8*, i8** %3
%16 = call i32* @opendir(i8* %15)
store i32* %16, i32** %5
%17 = load i32*, i32** %5
%18 = call %struct.dirent* @readdir(i32* %17)
store %struct.dirent* %18, %struct.dirent** %6
br label %19
19: ; preds = %130, %2
%20 = load %struct.dirent*, %struct.dirent** %6
%21 = icmp ne %struct.dirent* %20, null
br i1 %21, label %22, label %133
22: ; preds = %19
%23 = load %struct.dirent*, %struct.dirent** %6
%24 = getelementptr inbounds %struct.dirent, %struct.dirent* %23, i32 0, i32 0
%25 = load i64, i64* %24
%26 = load i64, i64* @DT_UNKNOWN
%27 = icmp ne i64 %25, %26
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = load %struct.dirent*, %struct.dirent** %6
%31 = getelementptr inbounds %struct.dirent, %struct.dirent* %30, i32 0, i32 1
%32 = load i32, i32* %31
%33 = call i64 @strcmp(i32 %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %41, label %35
35: ; preds = %22
%36 = load %struct.dirent*, %struct.dirent** %6
%37 = getelementptr inbounds %struct.dirent, %struct.dirent* %36, i32 0, i32 1
%38 = load i32, i32* %37
%39 = call i64 @strcmp(i32 %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %35, %22
br label %130
42: ; preds = %35
%43 = load i8*, i8** %3
%44 = load %struct.dirent*, %struct.dirent** %6
%45 = getelementptr inbounds %struct.dirent, %struct.dirent* %44, i32 0, i32 1
%46 = load i32, i32* %45
%47 = call i8* @concat(i8* %43, i32 %46)
store i8* %47, i8** %7
%48 = load i8*, i8** %4
%49 = load %struct.dirent*, %struct.dirent** %6
%50 = getelementptr inbounds %struct.dirent, %struct.dirent* %49, i32 0, i32 1
%51 = load i32, i32* %50
%52 = call i8* @concat(i8* %48, i32 %51)
store i8* %52, i8** %8
%53 = load %struct.dirent*, %struct.dirent** %6
%54 = getelementptr inbounds %struct.dirent, %struct.dirent* %53, i32 0, i32 0
%55 = load i64, i64* %54
%56 = load i64, i64* @DT_LNK
%57 = icmp eq i64 %55, %56
br i1 %57, label %58, label %82
58: ; preds = %42
%59 = load i32, i32* @PATH_MAX
%60 = zext i32 %59 to i64
%61 = call i8* @llvm.stacksave()
store i8* %61, i8** %9
%62 = alloca i8, i64 %60
store i64 %60, i64* %10
%63 = load i8*, i8** %7
%64 = sub i64 %60, 1
%65 = trunc i64 %64 to i32
%66 = call i64 @readlink(i8* %63, i8* %62, i32 %65)
store i64 %66, i64* %11
%67 = load i64, i64* %11
%68 = icmp ugt i64 %67, 0
br i1 %68, label %69, label %80
69: ; preds = %58
%70 = load i64, i64* %11
%71 = getelementptr inbounds i8, i8* %62, i64 %70
store i8 0, i8* %71
%72 = load i8*, i8** %8
%73 = call i32 @symlink(i8* %62, i8* %72)
store i32 %73, i32* %12
%74 = load i32, i32* %12
%75 = icmp slt i32 %74, 0
br i1 %75, label %76, label %79
76: ; preds = %69
%77 = load i32, i32* @errno
%78 = call i32 @assert_perror(i32 %77)
br label %79
79: ; preds = %76, %69
br label %80
80: ; preds = %79, %58
%81 = load i8*, i8** %9
br label %129
82: ; preds = %42
%83 = load %struct.dirent*, %struct.dirent** %6
%84 = getelementptr inbounds %struct.dirent, %struct.dirent* %83, i32 0, i32 0
%85 = load i64, i64* %84
%86 = load i64, i64* @DT_DIR
%87 = icmp eq i64 %85, %86
br i1 %87, label %88, label %97
88: ; preds = %82
%89 = load i8*, i8** %8
%90 = call i32 @mkdir(i8* %89, i32 448)
store i32 %90, i32* %13
%91 = load i32, i32* %13
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %96
93: ; preds = %88
%94 = load i32, i32* @errno
%95 = call i32 @assert_perror(i32 %94)
br label %96
96: ; preds = %93, %88
br label %104
97: ; preds = %82
%98 = load i8*, i8** %8
%99 = load i32, i32* @O_WRONLY
%100 = load i32, i32* @O_CREAT
%101 = or i32 %99, %100
%102 = call i32 @open(i8* %98, i32 %101)
%103 = call i32 @close(i32 %102)
br label %104
104: ; preds = %97, %96
%105 = load i8*, i8** %7
%106 = load i8*, i8** %8
%107 = load i32, i32* @MS_BIND
%108 = load i32, i32* @MS_REC
%109 = or i32 %107, %108
%110 = load i32, i32* @MS_RDONLY
%111 = or i32 %109, %110
%112 = call i32 @mount(i8* %105, i8* %106, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %111, i32* null)
store i32 %112, i32* %14
%113 = load i32, i32* %14
%114 = icmp ne i32 %113, 0
br i1 %114, label %115, label %124
115: ; preds = %104
%116 = load %struct.dirent*, %struct.dirent** %6
%117 = getelementptr inbounds %struct.dirent, %struct.dirent* %116, i32 0, i32 0
%118 = load i64, i64* %117
%119 = load i64, i64* @DT_DIR
%120 = icmp ne i64 %118, %119
br i1 %120, label %121, label %124
121: ; preds = %115
%122 = load i32, i32* @errno
%123 = call i32 @assert_perror(i32 %122)
br label %124
124: ; preds = %121, %115, %104
%125 = load i8*, i8** %8
%126 = call i32 @free(i8* %125)
%127 = load i8*, i8** %7
%128 = call i32 @free(i8* %127)
br label %129
129: ; preds = %124, %80
br label %130
130: ; preds = %129, %41
%131 = load i32*, i32** %5
%132 = call %struct.dirent* @readdir(i32* %131)
store %struct.dirent* %132, %struct.dirent** %6
br label %19
133: ; preds = %19
%134 = load i32*, i32** %5
%135 = call i32 @closedir(i32* %134)
ret void
}

LLVM IR (-O2):
%struct.dirent = type { i64, i32 }
@DT_UNKNOWN = global i64 0
@.str = [2 x i8] c".\00"
@.str.1 = [3 x i8] c"..\00"
@DT_LNK = global i64 0
@PATH_MAX = global i32 0
@errno = global i32 0
@DT_DIR = global i64 0
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@.str.2 = [5 x i8] c"none\00"
@MS_BIND = global i32 0
@MS_REC = global i32 0
@MS_RDONLY = global i32 0
define void @bind_mount(i8* %0, i8* %1) {
%3 = tail call i32* @opendir(i8* %0)
%4 = tail call %struct.dirent* @readdir(i32* %3)
%5 = icmp eq %struct.dirent* %4, null
br i1 %5, label %6, label %8
6: ; preds = %81, %2
%7 = call i32 @closedir(i32* %3)
ret void
8: ; preds = %2, %81
%9 = phi %struct.dirent* [ %82, %81 ], [ %4, %2 ]
%10 = getelementptr inbounds %struct.dirent, %struct.dirent* %9, i64 0, i32 0
%11 = load i64, i64* %10
%12 = load i64, i64* @DT_UNKNOWN
%13 = icmp ne i64 %11, %12
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = getelementptr inbounds %struct.dirent, %struct.dirent* %9, i64 0, i32 1
%17 = load i32, i32* %16
%18 = call i64 @strcmp(i32 %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %81, label %20
20: ; preds = %8
%21 = load i32, i32* %16
%22 = call i64 @strcmp(i32 %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %81, label %24
24: ; preds = %20
%25 = load i32, i32* %16
%26 = call i8* @concat(i8* %0, i32 %25)
%27 = load i32, i32* %16
%28 = call i8* @concat(i8* %1, i32 %27)
%29 = load i64, i64* %10
%30 = load i64, i64* @DT_LNK
%31 = icmp eq i64 %29, %30
br i1 %31, label %32, label %48
32: ; preds = %24
%33 = load i32, i32* @PATH_MAX
%34 = zext i32 %33 to i64
%35 = call i8* @llvm.stacksave()
%36 = alloca i8, i64 %34
%37 = add i32 %33, -1
%38 = call i64 @readlink(i8* %26, i8* %36, i32 %37)
%39 = icmp eq i64 %38, 0
br i1 %39, label %47, label %40
40: ; preds = %32
%41 = getelementptr inbounds i8, i8* %36, i64 %38
store i8 0, i8* %41
%42 = call i32 @symlink(i8* %36, i8* %28)
%43 = icmp slt i32 %42, 0
br i1 %43, label %44, label %47
44: ; preds = %40
%45 = load i32, i32* @errno
%46 = call i32 @assert_perror(i32 %45)
br label %47
47: ; preds = %40, %44, %32
br label %81
48: ; preds = %24
%49 = load i64, i64* @DT_DIR
%50 = icmp eq i64 %29, %49
br i1 %50, label %51, label %57
51: ; preds = %48
%52 = call i32 @mkdir(i8* %28, i32 448)
%53 = icmp eq i32 %52, 0
br i1 %53, label %63, label %54
54: ; preds = %51
%55 = load i32, i32* @errno
%56 = call i32 @assert_perror(i32 %55)
br label %63
57: ; preds = %48
%58 = load i32, i32* @O_WRONLY
%59 = load i32, i32* @O_CREAT
%60 = or i32 %59, %58
%61 = call i32 @open(i8* %28, i32 %60)
%62 = call i32 @close(i32 %61)
br label %63
63: ; preds = %51, %54, %57
%64 = load i32, i32* @MS_BIND
%65 = load i32, i32* @MS_REC
%66 = or i32 %65, %64
%67 = load i32, i32* @MS_RDONLY
%68 = or i32 %66, %67
%69 = call i32 @mount(i8* %26, i8* %28, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %68, i32* null)
%70 = icmp eq i32 %69, 0
br i1 %70, label %78, label %71
71: ; preds = %63
%72 = load i64, i64* %10
%73 = load i64, i64* @DT_DIR
%74 = icmp eq i64 %72, %73
br i1 %74, label %78, label %75
75: ; preds = %71
%76 = load i32, i32* @errno
%77 = call i32 @assert_perror(i32 %76)
br label %78
78: ; preds = %75, %71, %63
%79 = call i32 @free(i8* %28)
%80 = call i32 @free(i8* %26)
br label %81
81: ; preds = %47, %78, %8, %20
%82 = call %struct.dirent* @readdir(i32* %3)
%83 = icmp eq %struct.dirent* %82, null
br i1 %83, label %6, label %8
}