#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 /*<<< orphan*/ uid_t;
typedef int u_int;
struct passwd {
  int /*<<< orphan*/ pw_uid;
};
typedef int /*<<< orphan*/ gid_t;
typedef int /*<<< orphan*/ filesystems;

/* Variables and functions */
int /*<<< orphan*/ MS_BIND;
int /*<<< orphan*/ MS_MGC_VAL;
int chown(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
struct passwd *getpwnam(char *);
int mount(char *, char *, char *, int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ strcmp(char *, char *);
int umount(char *);
int main(int argc, char **argv) {
  u_int i = 0;
  int rc = 0;
  uid_t uid = 0;
  char *source = NULL;
  char *target = NULL;
  char *extra = NULL;
  char *filesystems[] = {"ext4", "ext3", "ext2"};
  struct passwd *pass = NULL;
  if (argc < 2) {
    exit(1);
  }
  if (!strcmp("mount", argv[1])) {
    if (argc < 4) {
      exit(1);
    }
    source = argv[2];
    target = argv[3];
    if (argc > 4)
      extra = argv[4];
    if (extra && !strcmp("--bind", extra)) {
      if ((rc = mount(source, target, NULL, MS_BIND, NULL)) != 0) {
        perror("mount");
        exit(1);
      }
    } else {
      for (i = 0; i < (sizeof(filesystems) / sizeof(char *)); i++) {
        if ((rc = mount(source, target, filesystems[i], MS_MGC_VAL, NULL)) !=
            0) {
          perror("mount");
        } else {
          break;
        }
      }
      if (rc) {
        exit(1);
      }
      if (extra) {
        if ((pass = getpwnam(extra)) == NULL) {
          perror("getpwnam");
          exit(1);
        }
        uid = pass->pw_uid;
        if ((rc = chown(target, uid, (gid_t)-1)) != 0) {
          perror("chown");
          exit(1);
        }
      }
    }
  } else if (!strcmp("umount", argv[1])) {
    if (argc < 3) {
      exit(1);
    }
    if ((rc = umount(argv[2])) != 0) {
      perror("umount");
      exit(1);
    }
  } else {
    exit(1);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
mov    0x2c36(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0x2c33(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0x2c30(%rip),%rax
mov    %rax,-0x40(%rbp)
movq   $0x0,-0x58(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11f0 <main+0x80>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe27(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    13bd <main+0x24d>
cmpl   $0x4,-0x8(%rbp)
jge    1221 <main+0xb1>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x4,-0x8(%rbp)
jle    124f <main+0xdf>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     12b8 <main+0x148>
mov    -0x38(%rbp),%rsi
lea    0xdaa(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    12b8 <main+0x148>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    0x2d5e(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rdx
call   1040 <mount@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
je     12b3 <main+0x143>
lea    0xd82(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
jmp    13b8 <main+0x248>
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0x3,%rax
jae    1326 <main+0x1b6>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
movslq -0x14(%rbp),%rax
mov    -0x50(%rbp,%rax,8),%rdx
mov    0x2ceb(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1040 <mount@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
je     130e <main+0x19e>
lea    0xd22(%rip),%rdi
call   1080 <perror@plt>
jmp    1313 <main+0x1a3>
jmp    1326 <main+0x1b6>
jmp    1318 <main+0x1a8>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12bf <main+0x14f>
cmpl   $0x0,-0x18(%rbp)
je     133a <main+0x1ca>
mov    $0x1,%edi
call   1090 <exit@plt>
cmpq   $0x0,-0x38(%rbp)
je     13b3 <main+0x243>
mov    -0x38(%rbp),%rdi
call   1060 <getpwnam@plt>
mov    %rax,-0x58(%rbp)
cmp    $0x0,%rax
jne    1372 <main+0x202>
lea    0xcb3(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x58(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    $0xffffffff,%edx
call   1070 <chown@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
je     13ae <main+0x23e>
lea    0xc80(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
jmp    13b3 <main+0x243>
jmp    13b8 <main+0x248>
jmp    1431 <main+0x2c1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xc59(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1422 <main+0x2b2>
cmpl   $0x3,-0x8(%rbp)
jge    13ee <main+0x27e>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <umount@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
je     141d <main+0x2ad>
lea    0xc17(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
jmp    142c <main+0x2bc>
mov    $0x1,%edi
call   1090 <exit@plt>
jmp    1431 <main+0x2c1>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x1,%edi
jle    12af <main+0x13f>
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%r14
lea    0xe92(%rip),%rdi
mov    %r14,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
jne    1297 <main+0x127>
cmp    $0x3,%ebp
jbe    12af <main+0x13f>
mov    0x10(%rbx),%r12
mov    0x18(%rbx),%r15
mov    $0x1,%r13b
cmp    $0x4,%ebp
je     11c6 <main+0x56>
mov    0x20(%rbx),%r14
test   %r14,%r14
jne    11cb <main+0x5b>
xor    %r14d,%r14d
jmp    11e5 <main+0x75>
lea    0xe3d(%rip),%rdi
mov    %r14,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12cf <main+0x15f>
xor    %r13d,%r13d
mov    0x2dec(%rip),%rbx
mov    (%rbx),%ecx
lea    0xe0b(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %r8d,%r8d
call   1040 <mount@plt>
test   %eax,%eax
je     1259 <main+0xe9>
lea    0xe18(%rip),%rdi
call   1080 <perror@plt>
mov    (%rbx),%ecx
lea    0xde9(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %r8d,%r8d
call   1040 <mount@plt>
test   %eax,%eax
je     1259 <main+0xe9>
lea    0xdf1(%rip),%rdi
call   1080 <perror@plt>
mov    (%rbx),%ecx
lea    0xdc7(%rip),%rdx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %r8d,%r8d
call   1040 <mount@plt>
test   %eax,%eax
jne    12f0 <main+0x180>
test   %r13b,%r13b
je     1265 <main+0xf5>
xor    %edi,%edi
call   1090 <exit@plt>
mov    %r14,%rdi
call   1060 <getpwnam@plt>
test   %rax,%rax
jne    127b <main+0x10b>
lea    0xd9d(%rip),%rdi
jmp    12f7 <main+0x187>
mov    (%rax),%esi
mov    %r15,%rdi
mov    $0xffffffff,%edx
call   1070 <chown@plt>
test   %eax,%eax
je     125e <main+0xee>
lea    0xd8a(%rip),%rdi
jmp    12f7 <main+0x187>
lea    0xd87(%rip),%rdi
mov    %r14,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
jne    12af <main+0x13f>
cmp    $0x2,%ebp
ja     12b9 <main+0x149>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    0x10(%rbx),%rdi
call   1030 <umount@plt>
test   %eax,%eax
je     125e <main+0xee>
lea    0xd58(%rip),%rdi
jmp    12f7 <main+0x187>
mov    0x2d12(%rip),%rax
mov    (%rax),%ecx
mov    %r12,%rdi
mov    %r15,%rsi
xor    %edx,%edx
xor    %r8d,%r8d
call   1040 <mount@plt>
test   %eax,%eax
je     125e <main+0xee>
lea    0xd2f(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
%struct.passwd = type { i32 }
@.str = [5 x i8] c"ext4\00"
@.str.1 = [5 x i8] c"ext3\00"
@.str.2 = [5 x i8] c"ext2\00"
@__const.main.filesystems = [3 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [6 x i8] c"mount\00"
@.str.4 = [7 x i8] c"--bind\00"
@MS_BIND = global i32 0
@MS_MGC_VAL = global i32 0
@.str.5 = [9 x i8] c"getpwnam\00"
@.str.6 = [6 x i8] c"chown\00"
@.str.7 = [7 x i8] c"umount\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca [3 x i8*]
%13 = alloca %struct.passwd*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i8* null, i8** %9
store i8* null, i8** %10
store i8* null, i8** %11
%14 = bitcast [3 x i8*]* %12 to i8*
store %struct.passwd* null, %struct.passwd** %13
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 2
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = call i32 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %22)
%24 = icmp ne i32 %23, 0
br i1 %24, label %111, label %25
25: ; preds = %19
%26 = load i32, i32* %4
%27 = icmp slt i32 %26, 4
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @exit(i32 1)
unreachable
30: ; preds = %25
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 2
%33 = load i8*, i8** %32
store i8* %33, i8** %9
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 3
%36 = load i8*, i8** %35
store i8* %36, i8** %10
%37 = load i32, i32* %4
%38 = icmp sgt i32 %37, 4
br i1 %38, label %39, label %43
39: ; preds = %30
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 4
%42 = load i8*, i8** %41
store i8* %42, i8** %11
br label %43
43: ; preds = %39, %30
%44 = load i8*, i8** %11
%45 = icmp ne i8* %44, null
br i1 %45, label %46, label %60
46: ; preds = %43
%47 = load i8*, i8** %11
%48 = call i32 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %47)
%49 = icmp ne i32 %48, 0
br i1 %49, label %60, label %50
50: ; preds = %46
%51 = load i8*, i8** %9
%52 = load i8*, i8** %10
%53 = load i32, i32* @MS_BIND
%54 = call i32 @mount(i8* %51, i8* %52, i8* null, i32 %53, i32* null)
store i32 %54, i32* %7
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %59
56: ; preds = %50
%57 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%58 = call i32 @exit(i32 1)
unreachable
59: ; preds = %50
br label %110
60: ; preds = %46, %43
store i32 0, i32* %6
br label %61
61: ; preds = %79, %60
%62 = load i32, i32* %6
%63 = sext i32 %62 to i64
%64 = icmp ult i64 %63, 3
br i1 %64, label %65, label %82
65: ; preds = %61
%66 = load i8*, i8** %9
%67 = load i8*, i8** %10
%68 = load i32, i32* %6
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [3 x i8*], [3 x i8*]* %12, i64 0, i64 %69
%71 = load i8*, i8** %70
%72 = load i32, i32* @MS_MGC_VAL
%73 = call i32 @mount(i8* %66, i8* %67, i8* %71, i32 %72, i32* null)
store i32 %73, i32* %7
%74 = icmp ne i32 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %65
%76 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %78
77: ; preds = %65
br label %82
78: ; preds = %75
br label %79
79: ; preds = %78
%80 = load i32, i32* %6
%81 = add nsw i32 %80, 1
store i32 %81, i32* %6
br label %61
82: ; preds = %77, %61
%83 = load i32, i32* %7
%84 = icmp ne i32 %83, 0
br i1 %84, label %85, label %87
85: ; preds = %82
%86 = call i32 @exit(i32 1)
unreachable
87: ; preds = %82
%88 = load i8*, i8** %11
%89 = icmp ne i8* %88, null
br i1 %89, label %90, label %109
90: ; preds = %87
%91 = load i8*, i8** %11
%92 = call %struct.passwd* @getpwnam(i8* %91)
store %struct.passwd* %92, %struct.passwd** %13
%93 = icmp eq %struct.passwd* %92, null
br i1 %93, label %94, label %97
94: ; preds = %90
%95 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%96 = call i32 @exit(i32 1)
unreachable
97: ; preds = %90
%98 = load %struct.passwd*, %struct.passwd** %13
%99 = getelementptr inbounds %struct.passwd, %struct.passwd* %98, i32 0, i32 0
%100 = load i32, i32* %99
store i32 %100, i32* %8
%101 = load i8*, i8** %10
%102 = load i32, i32* %8
%103 = call i32 @chown(i8* %101, i32 %102, i32 -1)
store i32 %103, i32* %7
%104 = icmp ne i32 %103, 0
br i1 %104, label %105, label %108
105: ; preds = %97
%106 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%107 = call i32 @exit(i32 1)
unreachable
108: ; preds = %97
br label %109
109: ; preds = %108, %87
br label %110
110: ; preds = %109, %59
br label %135
111: ; preds = %19
%112 = load i8**, i8*** %5
%113 = getelementptr inbounds i8*, i8** %112, i64 1
%114 = load i8*, i8** %113
%115 = call i32 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* %114)
%116 = icmp ne i32 %115, 0
br i1 %116, label %132, label %117
117: ; preds = %111
%118 = load i32, i32* %4
%119 = icmp slt i32 %118, 3
br i1 %119, label %120, label %122
120: ; preds = %117
%121 = call i32 @exit(i32 1)
unreachable
122: ; preds = %117
%123 = load i8**, i8*** %5
%124 = getelementptr inbounds i8*, i8** %123, i64 2
%125 = load i8*, i8** %124
%126 = call i32 @umount(i8* %125)
store i32 %126, i32* %7
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %131
128: ; preds = %122
%129 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%130 = call i32 @exit(i32 1)
unreachable
131: ; preds = %122
br label %134
132: ; preds = %111
%133 = call i32 @exit(i32 1)
unreachable
134: ; preds = %131
br label %135
135: ; preds = %134, %110
%136 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
@.str = [5 x i8] c"ext4\00"
@.str.1 = [5 x i8] c"ext3\00"
@.str.2 = [5 x i8] c"ext2\00"
@.str.3 = [6 x i8] c"mount\00"
@.str.4 = [7 x i8] c"--bind\00"
@MS_BIND = global i32 0
@MS_MGC_VAL = global i32 0
@.str.5 = [9 x i8] c"getpwnam\00"
@.str.6 = [6 x i8] c"chown\00"
@.str.7 = [7 x i8] c"umount\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @strcmp(i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* dereferenceable(1) %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %69
11: ; preds = %6
%12 = icmp ult i32 %0, 4
br i1 %12, label %13, label %15
13: ; preds = %11
%14 = tail call i32 @exit(i32 1)
unreachable
15: ; preds = %11
%16 = getelementptr inbounds i8*, i8** %1, i64 2
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i8*, i8** %1, i64 3
%19 = load i8*, i8** %18
%20 = icmp eq i32 %0, 4
br i1 %20, label %35, label %21
21: ; preds = %15
%22 = getelementptr inbounds i8*, i8** %1, i64 4
%23 = load i8*, i8** %22
%24 = icmp eq i8* %23, null
br i1 %24, label %35, label %25
25: ; preds = %21
%26 = tail call i32 @strcmp(i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %23)
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %35
28: ; preds = %25
%29 = load i32, i32* @MS_BIND
%30 = tail call i32 @mount(i8* %17, i8* %19, i8* null, i32 %29, i32* null)
%31 = icmp eq i32 %30, 0
br i1 %31, label %86, label %32
32: ; preds = %28
%33 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%34 = tail call i32 @exit(i32 1)
unreachable
35: ; preds = %15, %25, %21
%36 = phi i1 [ false, %25 ], [ true, %21 ], [ true, %15 ]
%37 = phi i8* [ %23, %25 ], [ null, %21 ], [ null, %15 ]
%38 = load i32, i32* @MS_MGC_VAL
%39 = tail call i32 @mount(i8* %17, i8* %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %38, i32* null)
%40 = icmp eq i32 %39, 0
br i1 %40, label %54, label %41
41: ; preds = %35
%42 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%43 = load i32, i32* @MS_MGC_VAL
%44 = tail call i32 @mount(i8* %17, i8* %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %43, i32* null)
%45 = icmp eq i32 %44, 0
br i1 %45, label %54, label %46
46: ; preds = %41
%47 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%48 = load i32, i32* @MS_MGC_VAL
%49 = tail call i32 @mount(i8* %17, i8* %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %48, i32* null)
%50 = icmp eq i32 %49, 0
br i1 %50, label %54, label %51
51: ; preds = %46
%52 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%53 = tail call i32 @exit(i32 1)
unreachable
54: ; preds = %46, %41, %35
br i1 %36, label %86, label %55
55: ; preds = %54
%56 = tail call %struct.passwd* @getpwnam(i8* %37)
%57 = icmp eq %struct.passwd* %56, null
br i1 %57, label %58, label %61
58: ; preds = %55
%59 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%60 = tail call i32 @exit(i32 1)
unreachable
61: ; preds = %55
%62 = getelementptr inbounds %struct.passwd, %struct.passwd* %56, i64 0, i32 0
%63 = load i32, i32* %62
%64 = tail call i32 @chown(i8* %19, i32 %63, i32 -1)
%65 = icmp eq i32 %64, 0
br i1 %65, label %86, label %66
66: ; preds = %61
%67 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%68 = tail call i32 @exit(i32 1)
unreachable
69: ; preds = %6
%70 = tail call i32 @strcmp(i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* dereferenceable(1) %8)
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %84
72: ; preds = %69
%73 = icmp ult i32 %0, 3
br i1 %73, label %74, label %76
74: ; preds = %72
%75 = tail call i32 @exit(i32 1)
unreachable
76: ; preds = %72
%77 = getelementptr inbounds i8*, i8** %1, i64 2
%78 = load i8*, i8** %77
%79 = tail call i32 @umount(i8* %78)
%80 = icmp eq i32 %79, 0
br i1 %80, label %86, label %81
81: ; preds = %76
%82 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%83 = tail call i32 @exit(i32 1)
unreachable
84: ; preds = %69
%85 = tail call i32 @exit(i32 1)
unreachable
86: ; preds = %76, %28, %61, %54
%87 = tail call i32 @exit(i32 0)
unreachable
}