#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 mntent {
  char *mnt_type;
  char *mnt_dir;
  int /*<<< orphan*/ mnt_fsname;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned int FIFREEZE;
unsigned int FITHAW;
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ MNTOPT_RO;
#define VSS_OP_FREEZE 129
#define VSS_OP_THAW 128
int /*<<< orphan*/ endmntent(int /*<<< orphan*/ *);
int errno;
struct mntent *getmntent(int /*<<< orphan*/ *);
int /*<<< orphan*/ *hasmntopt(struct mntent *, int /*<<< orphan*/);
int /*<<< orphan*/ *setmntent(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strerror(int);
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, ...);
int vss_do_freeze(char *, unsigned int);
int vss_operate(int operation) {
  char match[] = "/dev/";
  FILE *mounts;
  struct mntent *ent;
  unsigned int cmd;
  int error = 0, root_seen = 0, save_errno = 0;
  switch (operation) {
  case VSS_OP_FREEZE:
    cmd = FIFREEZE;
    break;
  case VSS_OP_THAW:
    cmd = FITHAW;
    break;
  default:
    return -1;
  }
  mounts = setmntent("/proc/mounts", "r");
  if (mounts == NULL)
    return -1;
  while ((ent = getmntent(mounts))) {
    if (strncmp(ent->mnt_fsname, match, strlen(match)))
      continue;
    if (hasmntopt(ent, MNTOPT_RO) != NULL)
      continue;
    if (strcmp(ent->mnt_type, "vfat") == 0)
      continue;
    if (strcmp(ent->mnt_dir, "/") == 0) {
      root_seen = 1;
      continue;
    }
    error |= vss_do_freeze(ent->mnt_dir, cmd);
    if (error && operation == VSS_OP_FREEZE)
      goto err;
  }
  if (root_seen) {
    error |= vss_do_freeze("/", cmd);
    if (error && operation == VSS_OP_FREEZE)
      goto err;
  }
  goto out;
err:
  save_errno = errno;
  vss_operate(VSS_OP_THAW);
  if (ent)
    syslog(LOG_ERR, "FREEZE of %s failed; error:%d %s", ent->mnt_dir,
           save_errno, strerror(save_errno));
  else
    syslog(LOG_ERR, "FREEZE of / failed; error:%d %s", save_errno,
           strerror(save_errno));
out:
  endmntent(mounts);
  return error;
}


x86 assembly (clang, -O0):
<vss_operate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x8(%rbp)
movw   $0x2f,-0xc(%rbp)
movl   $0x7665642f,-0x10(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x34(%rbp)
sub    $0x80,%eax
je     1217 <vss_operate+0x67>
jmp    11f3 <vss_operate+0x43>
mov    -0x34(%rbp),%eax
sub    $0x81,%eax
jne    1228 <vss_operate+0x78>
jmp    1206 <vss_operate+0x56>
mov    0x2dd3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
jmp    1234 <vss_operate+0x84>
mov    0x2da2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
jmp    1234 <vss_operate+0x84>
movl   $0xffffffff,-0x4(%rbp)
jmp    144a <vss_operate+0x29a>
lea    0xdcb(%rip),%rdi
lea    0xdd1(%rip),%rsi
call   1090 <setmntent@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1262 <vss_operate+0xb2>
movl   $0xffffffff,-0x4(%rbp)
jmp    144a <vss_operate+0x29a>
jmp    1267 <vss_operate+0xb7>
mov    -0x18(%rbp),%rdi
call   1080 <getmntent@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     135a <vss_operate+0x1aa>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%eax
mov    %eax,-0x44(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
lea    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x44(%rbp),%edi
mov    -0x40(%rbp),%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     12b6 <vss_operate+0x106>
jmp    1267 <vss_operate+0xb7>
mov    -0x20(%rbp),%rdi
mov    0x2d27(%rip),%rax
mov    (%rax),%esi
call   10d0 <hasmntopt@plt>
cmp    $0x0,%rax
je     12d7 <vss_operate+0x127>
jmp    1267 <vss_operate+0xb7>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
lea    0xd30(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    12f9 <vss_operate+0x149>
jmp    1267 <vss_operate+0xb7>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xcfc(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1323 <vss_operate+0x173>
movl   $0x1,-0x2c(%rbp)
jmp    1267 <vss_operate+0xb7>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x24(%rbp),%esi
call   1060 <vss_do_freeze@plt>
or     -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
je     1355 <vss_operate+0x1a5>
cmpl   $0x81,-0x8(%rbp)
jne    1355 <vss_operate+0x1a5>
jmp    139f <vss_operate+0x1ef>
jmp    1267 <vss_operate+0xb7>
cmpl   $0x0,-0x2c(%rbp)
je     139a <vss_operate+0x1ea>
mov    -0x24(%rbp),%esi
lea    0xc96(%rip),%rdi
call   1060 <vss_do_freeze@plt>
or     -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
je     1395 <vss_operate+0x1e5>
cmpl   $0x81,-0x8(%rbp)
jne    1395 <vss_operate+0x1e5>
jmp    139f <vss_operate+0x1ef>
jmp    139a <vss_operate+0x1ea>
jmp    143b <vss_operate+0x28b>
mov    0x2c2a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    $0x80,%edi
call   10b0 <vss_operate@plt>
cmpq   $0x0,-0x20(%rbp)
je     1406 <vss_operate+0x256>
mov    0x2bf1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x50(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x30(%rbp),%edi
call   10c0 <strerror@plt>
mov    -0x54(%rbp),%edi
mov    -0x50(%rbp),%rdx
mov    -0x48(%rbp),%ecx
mov    %eax,%r8d
lea    0xc20(%rip),%rsi
mov    $0x0,%al
call   10a0 <syslog@plt>
jmp    1436 <vss_operate+0x286>
mov    0x2bab(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x30(%rbp),%edi
call   10c0 <strerror@plt>
mov    -0x5c(%rbp),%edi
mov    -0x58(%rbp),%edx
mov    %eax,%ecx
lea    0xc0c(%rip),%rsi
mov    $0x0,%al
call   10a0 <syslog@plt>
jmp    143b <vss_operate+0x28b>
mov    -0x18(%rbp),%rdi
call   1030 <endmntent@plt>
mov    -0x28(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vss_operate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebx
movw   $0x2f,0x14(%rsp)
movl   $0x7665642f,0x10(%rsp)
76
mov    $0xffffffff,%r12d
cmp    $0x81,%edi
je     11f2 <vss_operate+0x42>
cmp    $0x80,%ebx
jne    13b9 <vss_operate+0x209>
mov    0x2dd0(%rip),%rax
jmp    11f9 <vss_operate+0x49>
mov    0x2de7(%rip),%rax
mov    (%rax),%ebp
lea    0xe04(%rip),%rdi
lea    0xe0a(%rip),%rsi
call   1090 <setmntent@plt>
test   %rax,%rax
je     13b9 <vss_operate+0x209>
mov    %rax,%r13
mov    %ebp,0x8(%rsp)
mov    %ebx,0xc(%rsp)
xor    %eax,%eax
lea    0x10(%rsp),%rbp
xor    %r15d,%r15d
mov    %eax,0x4(%rsp)
mov    %r15d,%ecx
mov    0x2dae(%rip),%r12
mov    %ecx,%r15d
mov    %r13,%rdi
call   1080 <getmntent@plt>
test   %rax,%rax
je     1347 <vss_operate+0x197>
mov    %rax,%r14
jmp    1274 <vss_operate+0xc4>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r13,%rdi
call   1080 <getmntent@plt>
mov    %rax,%r14
test   %rax,%rax
je     1347 <vss_operate+0x197>
mov    0x10(%r14),%ebx
mov    %rbp,%rdi
call   1050 <strlen@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    1260 <vss_operate+0xb0>
mov    (%r12),%esi
mov    %r14,%rdi
call   10d0 <hasmntopt@plt>
test   %rax,%rax
jne    1260 <vss_operate+0xb0>
mov    (%r14),%rdi
lea    0xd69(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1260 <vss_operate+0xb0>
mov    0x8(%r14),%rdi
lea    0xd43(%rip),%rsi
call   1070 <strcmp@plt>
mov    $0x1,%ecx
test   %rax,%rax
je     123a <vss_operate+0x8a>
mov    0x8(%r14),%rdi
mov    0x8(%rsp),%esi
call   1060 <vss_do_freeze@plt>
mov    %eax,%r12d
or     0x4(%rsp),%r12d
mov    %r12d,%eax
cmpl   $0x81,0xc(%rsp)
jne    122c <vss_operate+0x7c>
mov    %r12d,%eax
test   %r12d,%r12d
je     122c <vss_operate+0x7c>
mov    0x2cc3(%rip),%rax
mov    (%rax),%ebx
mov    $0x80,%edi
call   10b0 <vss_operate@plt>
mov    0x2c98(%rip),%rax
mov    (%rax),%ebp
mov    0x8(%r14),%r14
mov    %ebx,%edi
call   10c0 <strerror@plt>
lea    0xce6(%rip),%rsi
mov    %ebp,%edi
mov    %r14,%rdx
mov    %ebx,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   10a0 <syslog@plt>
jmp    13b1 <vss_operate+0x201>
test   %r15d,%r15d
je     13ac <vss_operate+0x1fc>
lea    0xcb1(%rip),%rdi
mov    0x8(%rsp),%esi
call   1060 <vss_do_freeze@plt>
mov    %eax,%r12d
or     0x4(%rsp),%r12d
cmpl   $0x81,0xc(%rsp)
jne    13b1 <vss_operate+0x201>
test   %r12d,%r12d
je     13b1 <vss_operate+0x201>
mov    0x2c56(%rip),%rax
mov    (%rax),%ebx
mov    $0x80,%edi
call   10b0 <vss_operate@plt>
mov    0x2c2b(%rip),%rax
mov    (%rax),%ebp
mov    %ebx,%edi
call   10c0 <strerror@plt>
lea    0xc9e(%rip),%rsi
mov    %ebp,%edi
mov    %ebx,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   10a0 <syslog@plt>
jmp    13b1 <vss_operate+0x201>
mov    0x4(%rsp),%r12d
mov    %r13,%rdi
call   1030 <endmntent@plt>
mov    %r12d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.mntent = type { i8*, i8*, i32 }
@__const.vss_operate.match = [6 x i8] c"/dev/\00"
@FIFREEZE = global i32 0
@FITHAW = global i32 0
@.str = [13 x i8] c"/proc/mounts\00"
@.str.1 = [2 x i8] c"r\00"
@MNTOPT_RO = global i32 0
@.str.2 = [5 x i8] c"vfat\00"
@.str.3 = [2 x i8] c"/\00"
@errno = global i32 0
@LOG_ERR = global i32 0
@.str.4 = [33 x i8] c"FREEZE of %s failed; error:%d %s\00"
@.str.5 = [32 x i8] c"FREEZE of / failed; error:%d %s\00"
define i32 @vss_operate(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [6 x i8]
%5 = alloca i32*
%6 = alloca %struct.mntent*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %3
%11 = bitcast [6 x i8]* %4 to i8*
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
%12 = load i32, i32* %3
switch i32 %12, label %17 [
i32 129, label %13
i32 128, label %15
]
13: ; preds = %1
%14 = load i32, i32* @FIFREEZE
store i32 %14, i32* %7
br label %18
15: ; preds = %1
%16 = load i32, i32* @FITHAW
store i32 %16, i32* %7
br label %18
17: ; preds = %1
store i32 -1, i32* %2
br label %114
18: ; preds = %15, %13
%19 = call i32* @setmntent(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %19, i32** %5
%20 = load i32*, i32** %5
%21 = icmp eq i32* %20, null
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 -1, i32* %2
br label %114
23: ; preds = %18
br label %24
24: ; preds = %72, %57, %50, %43, %37, %23
%25 = load i32*, i32** %5
%26 = call %struct.mntent* @getmntent(i32* %25)
store %struct.mntent* %26, %struct.mntent** %6
%27 = icmp ne %struct.mntent* %26, null
br i1 %27, label %28, label %73
28: ; preds = %24
%29 = load %struct.mntent*, %struct.mntent** %6
%30 = getelementptr inbounds %struct.mntent, %struct.mntent* %29, i32 0, i32 2
%31 = load i32, i32* %30
%32 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%33 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%34 = call i32 @strlen(i8* %33)
%35 = call i64 @strncmp(i32 %31, i8* %32, i32 %34)
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %38
37: ; preds = %28
br label %24
38: ; preds = %28
%39 = load %struct.mntent*, %struct.mntent** %6
%40 = load i32, i32* @MNTOPT_RO
%41 = call i32* @hasmntopt(%struct.mntent* %39, i32 %40)
%42 = icmp ne i32* %41, null
br i1 %42, label %43, label %44
43: ; preds = %38
br label %24
44: ; preds = %38
%45 = load %struct.mntent*, %struct.mntent** %6
%46 = getelementptr inbounds %struct.mntent, %struct.mntent* %45, i32 0, i32 0
%47 = load i8*, i8** %46
%48 = call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %51
50: ; preds = %44
br label %24
51: ; preds = %44
%52 = load %struct.mntent*, %struct.mntent** %6
%53 = getelementptr inbounds %struct.mntent, %struct.mntent* %52, i32 0, i32 1
%54 = load i8*, i8** %53
%55 = call i64 @strcmp(i8* %54, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %58
57: ; preds = %51
store i32 1, i32* %9
br label %24
58: ; preds = %51
%59 = load %struct.mntent*, %struct.mntent** %6
%60 = getelementptr inbounds %struct.mntent, %struct.mntent* %59, i32 0, i32 1
%61 = load i8*, i8** %60
%62 = load i32, i32* %7
%63 = call i32 @vss_do_freeze(i8* %61, i32 %62)
%64 = load i32, i32* %8
%65 = or i32 %64, %63
store i32 %65, i32* %8
%66 = load i32, i32* %8
%67 = icmp ne i32 %66, 0
br i1 %67, label %68, label %72
68: ; preds = %58
%69 = load i32, i32* %3
%70 = icmp eq i32 %69, 129
br i1 %70, label %71, label %72
71: ; preds = %68
br label %89
72: ; preds = %68, %58
br label %24
73: ; preds = %24
%74 = load i32, i32* %9
%75 = icmp ne i32 %74, 0
br i1 %75, label %76, label %88
76: ; preds = %73
%77 = load i32, i32* %7
%78 = call i32 @vss_do_freeze(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %77)
%79 = load i32, i32* %8
%80 = or i32 %79, %78
store i32 %80, i32* %8
%81 = load i32, i32* %8
%82 = icmp ne i32 %81, 0
br i1 %82, label %83, label %87
83: ; preds = %76
%84 = load i32, i32* %3
%85 = icmp eq i32 %84, 129
br i1 %85, label %86, label %87
86: ; preds = %83
br label %89
87: ; preds = %83, %76
br label %88
88: ; preds = %87, %73
br label %110
89: ; preds = %86, %71
%90 = load i32, i32* @errno
store i32 %90, i32* %10
%91 = call i32 @vss_operate(i32 128)
%92 = load %struct.mntent*, %struct.mntent** %6
%93 = icmp ne %struct.mntent* %92, null
br i1 %93, label %94, label %103
94: ; preds = %89
%95 = load i32, i32* @LOG_ERR
%96 = load %struct.mntent*, %struct.mntent** %6
%97 = getelementptr inbounds %struct.mntent, %struct.mntent* %96, i32 0, i32 1
%98 = load i8*, i8** %97
%99 = load i32, i32* %10
%100 = load i32, i32* %10
%101 = call i32 @strerror(i32 %100)
%102 = call i32 (i32, i8*, ...) @syslog(i32 %95, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i8* %98, i32 %99, i32 %101)
br label %109
103: ; preds = %89
%104 = load i32, i32* @LOG_ERR
%105 = load i32, i32* %10
%106 = load i32, i32* %10
%107 = call i32 @strerror(i32 %106)
%108 = call i32 (i32, i8*, ...) @syslog(i32 %104, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i32 %105, i32 %107)
br label %109
109: ; preds = %103, %94
br label %110
110: ; preds = %109, %88
%111 = load i32*, i32** %5
%112 = call i32 @endmntent(i32* %111)
%113 = load i32, i32* %8
store i32 %113, i32* %2
br label %114
114: ; preds = %110, %22, %17
%115 = load i32, i32* %2
ret i32 %115
}

LLVM IR (-O2):
%struct.mntent = type { i8*, i8*, i32 }
@__const.vss_operate.match = [6 x i8] c"/dev/\00"
@FIFREEZE = global i32 0
@FITHAW = global i32 0
@.str = [13 x i8] c"/proc/mounts\00"
@.str.1 = [2 x i8] c"r\00"
@MNTOPT_RO = global i32 0
@.str.2 = [5 x i8] c"vfat\00"
@.str.3 = [2 x i8] c"/\00"
@errno = global i32 0
@LOG_ERR = global i32 0
@.str.4 = [33 x i8] c"FREEZE of %s failed; error:%d %s\00"
@.str.5 = [32 x i8] c"FREEZE of / failed; error:%d %s\00"
define i32 @vss_operate(i32 %0) {
%2 = alloca [6 x i8]
%3 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
switch i32 %0, label %74 [
i32 129, label %5
i32 128, label %4
]
4: ; preds = %1
br label %5
5: ; preds = %1, %4
%6 = phi i32* [ @FITHAW, %4 ], [ @FIFREEZE, %1 ]
%7 = load i32, i32* %6
%8 = tail call i32* @setmntent(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32* %8, null
br i1 %9, label %74, label %10
10: ; preds = %5
%11 = icmp eq i32 %0, 129
br label %12
12: ; preds = %10, %43
%13 = phi i32 [ 0, %10 ], [ %47, %43 ]
%14 = phi i32 [ 0, %10 ], [ %16, %43 ]
br label %15
15: ; preds = %12, %38
%16 = phi i32 [ %14, %12 ], [ 1, %38 ]
%17 = call %struct.mntent* @getmntent(i32* %8)
%18 = icmp eq %struct.mntent* %17, null
br i1 %18, label %50, label %19
19: ; preds = %15, %26
%20 = phi %struct.mntent* [ %27, %26 ], [ %17, %15 ]
%21 = getelementptr inbounds %struct.mntent, %struct.mntent* %20, i64 0, i32 2
%22 = load i32, i32* %21
%23 = call i32 @strlen(i8* %3)
%24 = call i64 @strncmp(i32 %22, i8* %3, i32 %23)
%25 = icmp eq i64 %24, 0
br i1 %25, label %29, label %26
26: ; preds = %19, %29, %33
%27 = call %struct.mntent* @getmntent(i32* %8)
%28 = icmp eq %struct.mntent* %27, null
br i1 %28, label %50, label %19
29: ; preds = %19
%30 = load i32, i32* @MNTOPT_RO
%31 = call i32* @hasmntopt(%struct.mntent* %20, i32 %30)
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %26
33: ; preds = %29
%34 = getelementptr inbounds %struct.mntent, %struct.mntent* %20, i64 0, i32 0
%35 = load i8*, i8** %34
%36 = call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %26, label %38
38: ; preds = %33
%39 = getelementptr inbounds %struct.mntent, %struct.mntent* %20, i64 0, i32 1
%40 = load i8*, i8** %39
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %15, label %43
43: ; preds = %38
%44 = getelementptr inbounds %struct.mntent, %struct.mntent* %20, i64 0, i32 1
%45 = load i8*, i8** %44
%46 = call i32 @vss_do_freeze(i8* %45, i32 %7)
%47 = or i32 %46, %13
%48 = icmp ne i32 %47, 0
%49 = and i1 %11, %48
br i1 %49, label %57, label %12
50: ; preds = %15, %26
%51 = icmp eq i32 %16, 0
br i1 %51, label %71, label %52
52: ; preds = %50
%53 = call i32 @vss_do_freeze(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%54 = or i32 %53, %13
%55 = icmp ne i32 %54, 0
%56 = and i1 %11, %55
br i1 %56, label %65, label %71
57: ; preds = %43
%58 = getelementptr inbounds %struct.mntent, %struct.mntent* %20, i64 0, i32 1
%59 = load i32, i32* @errno
%60 = call i32 @vss_operate(i32 128)
%61 = load i32, i32* @LOG_ERR
%62 = load i8*, i8** %58
%63 = call i32 @strerror(i32 %59)
%64 = call i32 (i32, i8*, ...) @syslog(i32 %61, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i8* %62, i32 %59, i32 %63)
br label %71
65: ; preds = %52
%66 = load i32, i32* @errno
%67 = call i32 @vss_operate(i32 128)
%68 = load i32, i32* @LOG_ERR
%69 = call i32 @strerror(i32 %66)
%70 = call i32 (i32, i8*, ...) @syslog(i32 %68, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i32 %66, i32 %69)
br label %71
71: ; preds = %57, %65, %50, %52
%72 = phi i32 [ %47, %57 ], [ %54, %65 ], [ %54, %52 ], [ %13, %50 ]
%73 = call i32 @endmntent(i32* %8)
br label %74
74: ; preds = %5, %1, %71
%75 = phi i32 [ %72, %71 ], [ -1, %1 ], [ -1, %5 ]
ret i32 %75
}