#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_dir;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ endmntent(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
struct mntent *getmntent(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *, ...);
int /*<<< orphan*/ *setmntent(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, ...);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strstr(char *, char *);
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  int i;
  int ret = 0;
  int device_found = 0;
  char input_path[256];
  char output_dev[256];
  char output_path[256];
  char cmd[512];
  struct mntent *ent;
  FILE *aFile;
  for (i = 1; i < argc; i++) {
    if ((strcmp(argv[i], "-I") == 0) && (i + 1 < argc)) {
      strcpy(input_path, argv[i + 1]);
      i++;
    } else if ((strcmp(argv[i], "-O") == 0) && (i + 1 < argc)) {
      strcpy(output_dev, argv[i + 1]);
      i++;
    } else {
      printf("unknown option %s\n", argv[i]);
      ret = -1;
    }
  }
  if (ret == 0) {
    aFile = setmntent("/proc/mounts", "r");
    if (aFile == NULL) {
      perror("setmntent");
      exit(1);
    }
    while (NULL != (ent = getmntent(aFile))) {
      if (strstr(ent->mnt_dir, output_dev)) {
        sprintf(output_path, "%s", ent->mnt_dir);
        device_found = 1;
      }
    }
    endmntent(aFile);
    if (device_found) {
      printf("copying %s to %s\n", input_path, output_path);
      sprintf(cmd, "scp %s %s", input_path, output_path);
      system(cmd);
    } else {
      printf("%s not found. please ensure the device is correctly connected\n",
             output_dev);
      ret = -1;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x530,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12db <main+0x12b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe03(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1246 <main+0x96>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cmp    -0x8(%rbp),%eax
jge    1246 <main+0x96>
lea    -0x120(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
call   1040 <strcpy@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12c8 <main+0x118>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdaa(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    12a2 <main+0xf2>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cmp    -0x8(%rbp),%eax
jge    12a2 <main+0xf2>
lea    -0x220(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
call   1040 <strcpy@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12c3 <main+0x113>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd51(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0xffffffff,-0x18(%rbp)
jmp    12c8 <main+0x118>
jmp    12cd <main+0x11d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11de <main+0x2e>
cmpl   $0x0,-0x18(%rbp)
jne    141b <main+0x26b>
lea    0xd2d(%rip),%rdi
lea    0xd33(%rip),%rsi
call   1090 <setmntent@plt>
mov    %rax,-0x530(%rbp)
cmpq   $0x0,-0x530(%rbp)
jne    1323 <main+0x173>
lea    0xd14(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
jmp    1328 <main+0x178>
mov    -0x530(%rbp),%rdi
call   1080 <getmntent@plt>
mov    %rax,%rcx
mov    %rcx,-0x528(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
je     1394 <main+0x1e4>
mov    -0x528(%rbp),%rax
mov    (%rax),%rdi
lea    -0x220(%rbp),%rsi
call   10d0 <strstr@plt>
cmp    $0x0,%rax
je     138f <main+0x1df>
lea    -0x320(%rbp),%rdi
mov    -0x528(%rbp),%rax
mov    (%rax),%rdx
lea    0xcca(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
movl   $0x1,-0x1c(%rbp)
jmp    1328 <main+0x178>
mov    -0x530(%rbp),%rdi
call   1030 <endmntent@plt>
cmpl   $0x0,-0x1c(%rbp)
je     13fa <main+0x24a>
lea    -0x120(%rbp),%rsi
lea    -0x320(%rbp),%rdx
lea    0xc73(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x520(%rbp),%rdi
lea    -0x120(%rbp),%rdx
lea    -0x320(%rbp),%rcx
lea    0xc62(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
lea    -0x520(%rbp),%rdi
call   1050 <system@plt>
jmp    1416 <main+0x266>
lea    -0x220(%rbp),%rsi
lea    0xc46(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0xffffffff,-0x18(%rbp)
jmp    141b <main+0x26b>
mov    -0x18(%rbp),%eax
add    $0x530,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x518,%rsp
cmp    $0x2,%edi
jl     1284 <main+0xd4>
mov    %rsi,%rbx
mov    %edi,%r15d
mov    $0x1,%r13d
movl   $0x0,0xc(%rsp)
jmp    1203 <main+0x53>
mov    (%rbx,%r12,8),%rsi
lea    0xe1b(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0xffffffff,0xc(%rsp)
ff
add    $0x1,%r13d
cmp    %r15d,%r13d
jge    1274 <main+0xc4>
movslq %r13d,%r12
mov    (%rbx,%r12,8),%rdi
lea    0xdef(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1240 <main+0x90>
lea    0x1(%r13),%r14d
cmp    %r15d,%r14d
jge    1240 <main+0x90>
movslq %r14d,%rax
mov    (%rbx,%rax,8),%rsi
lea    0x210(%rsp),%rdi
call   1040 <strcpy@plt>
mov    %r14d,%r13d
jmp    11fa <main+0x4a>
nopl   (%rax)
mov    (%rbx,%r12,8),%rdi
lea    0xdb8(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    11e0 <main+0x30>
lea    0x1(%r13),%ebp
cmp    %r15d,%ebp
jge    11e0 <main+0x30>
movslq %ebp,%rax
mov    (%rbx,%rax,8),%rsi
lea    0x10(%rsp),%rdi
call   1040 <strcpy@plt>
mov    %ebp,%r13d
jmp    11fa <main+0x4a>
mov    $0xffffffff,%ebx
cmpl   $0x0,0xc(%rsp)
jne    1381 <main+0x1d1>
lea    0xd8e(%rip),%rdi
lea    0xd94(%rip),%rsi
call   1090 <setmntent@plt>
test   %rax,%rax
je     1395 <main+0x1e5>
mov    %rax,%rbx
mov    %rax,%rdi
call   1080 <getmntent@plt>
test   %rax,%rax
je     1361 <main+0x1b1>
mov    %rax,%rbp
xor    %r12d,%r12d
lea    0x10(%rsp),%r15
lea    0x110(%rsp),%r14
jmp    12e0 <main+0x130>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1080 <getmntent@plt>
mov    %rax,%rbp
test   %rax,%rax
je     1305 <main+0x155>
mov    0x0(%rbp),%rdi
mov    %r15,%rsi
call   10d0 <strstr@plt>
test   %rax,%rax
je     12d0 <main+0x120>
mov    0x0(%rbp),%rsi
mov    %r14,%rdi
call   1040 <strcpy@plt>
mov    $0x1,%r12d
jmp    12d0 <main+0x120>
mov    %rbx,%rdi
call   1030 <endmntent@plt>
test   %r12d,%r12d
je     1369 <main+0x1b9>
lea    0xd19(%rip),%rdi
xor    %ebx,%ebx
lea    0x210(%rsp),%r15
lea    0x110(%rsp),%r14
mov    %r15,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd05(%rip),%rsi
lea    0x310(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   10b0 <sprintf@plt>
mov    %rbp,%rdi
call   1050 <system@plt>
jmp    1381 <main+0x1d1>
mov    %rbx,%rdi
call   1030 <endmntent@plt>
lea    0xcde(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x518,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc8c(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
%struct.mntent = type { i8* }
@.str = [3 x i8] c"-I\00"
@.str.1 = [3 x i8] c"-O\00"
@.str.2 = [19 x i8] c"unknown option %s\0A\00"
@.str.3 = [13 x i8] c"/proc/mounts\00"
@.str.4 = [2 x i8] c"r\00"
@.str.5 = [10 x i8] c"setmntent\00"
@.str.6 = [3 x i8] c"%s\00"
@.str.7 = [18 x i8] c"copying %s to %s\0A\00"
@.str.8 = [10 x i8] c"scp %s %s\00"
@.str.9 = [63 x i8] c"%s not found. please ensure the device is correctly connected\0A\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 [256 x i8]
%10 = alloca [256 x i8]
%11 = alloca [256 x i8]
%12 = alloca [512 x i8]
%13 = alloca %struct.mntent*
%14 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 0, i32* %8
store i32 1, i32* %6
br label %15
15: ; preds = %76, %2
%16 = load i32, i32* %6
%17 = load i32, i32* %4
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %79
19: ; preds = %15
%20 = load i8**, i8*** %5
%21 = load i32, i32* %6
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
%25 = call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %43
27: ; preds = %19
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
%30 = load i32, i32* %4
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %43
32: ; preds = %27
%33 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%34 = load i8**, i8*** %5
%35 = load i32, i32* %6
%36 = add nsw i32 %35, 1
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8*, i8** %34, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 @strcpy(i8* %33, i8* %39)
%41 = load i32, i32* %6
%42 = add nsw i32 %41, 1
store i32 %42, i32* %6
br label %75
43: ; preds = %27, %19
%44 = load i8**, i8*** %5
%45 = load i32, i32* %6
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8*, i8** %44, i64 %46
%48 = load i8*, i8** %47
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %67
51: ; preds = %43
%52 = load i32, i32* %6
%53 = add nsw i32 %52, 1
%54 = load i32, i32* %4
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %67
56: ; preds = %51
%57 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%58 = load i8**, i8*** %5
%59 = load i32, i32* %6
%60 = add nsw i32 %59, 1
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i8*, i8** %58, i64 %61
%63 = load i8*, i8** %62
%64 = call i32 @strcpy(i8* %57, i8* %63)
%65 = load i32, i32* %6
%66 = add nsw i32 %65, 1
store i32 %66, i32* %6
br label %74
67: ; preds = %51, %43
%68 = load i8**, i8*** %5
%69 = load i32, i32* %6
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8*, i8** %68, i64 %70
%72 = load i8*, i8** %71
%73 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %72)
store i32 -1, i32* %7
br label %74
74: ; preds = %67, %56
br label %75
75: ; preds = %74, %32
br label %76
76: ; preds = %75
%77 = load i32, i32* %6
%78 = add nsw i32 %77, 1
store i32 %78, i32* %6
br label %15
79: ; preds = %15
%80 = load i32, i32* %7
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %127
82: ; preds = %79
%83 = call i32* @setmntent(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %83, i32** %14
%84 = load i32*, i32** %14
%85 = icmp eq i32* %84, null
br i1 %85, label %86, label %89
86: ; preds = %82
%87 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%88 = call i32 @exit(i32 1)
unreachable
89: ; preds = %82
br label %90
90: ; preds = %107, %89
%91 = load i32*, i32** %14
%92 = call %struct.mntent* @getmntent(i32* %91)
store %struct.mntent* %92, %struct.mntent** %13
%93 = icmp ne %struct.mntent* null, %92
br i1 %93, label %94, label %108
94: ; preds = %90
%95 = load %struct.mntent*, %struct.mntent** %13
%96 = getelementptr inbounds %struct.mntent, %struct.mntent* %95, i32 0, i32 0
%97 = load i8*, i8** %96
%98 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%99 = call i64 @strstr(i8* %97, i8* %98)
%100 = icmp ne i64 %99, 0
br i1 %100, label %101, label %107
101: ; preds = %94
%102 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%103 = load %struct.mntent*, %struct.mntent** %13
%104 = getelementptr inbounds %struct.mntent, %struct.mntent* %103, i32 0, i32 0
%105 = load i8*, i8** %104
%106 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %102, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %105)
store i32 1, i32* %8
br label %107
107: ; preds = %101, %94
br label %90
108: ; preds = %90
%109 = load i32*, i32** %14
%110 = call i32 @endmntent(i32* %109)
%111 = load i32, i32* %8
%112 = icmp ne i32 %111, 0
br i1 %112, label %113, label %123
113: ; preds = %108
%114 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%115 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%116 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i8* %114, i8* %115)
%117 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%118 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%119 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%120 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %117, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* %118, i8* %119)
%121 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%122 = call i32 @system(i8* %121)
br label %126
123: ; preds = %108
%124 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%125 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.9, i64 0, i64 0), i8* %124)
store i32 -1, i32* %7
br label %126
126: ; preds = %123, %113
br label %127
127: ; preds = %126, %79
%128 = load i32, i32* %7
ret i32 %128
}

LLVM IR (-O2):
%struct.mntent = type { i8* }
@.str = [3 x i8] c"-I\00"
@.str.1 = [3 x i8] c"-O\00"
@.str.2 = [19 x i8] c"unknown option %s\0A\00"
@.str.3 = [13 x i8] c"/proc/mounts\00"
@.str.4 = [2 x i8] c"r\00"
@.str.5 = [10 x i8] c"setmntent\00"
@.str.7 = [18 x i8] c"copying %s to %s\0A\00"
@.str.8 = [10 x i8] c"scp %s %s\00"
@.str.9 = [63 x i8] c"%s not found. please ensure the device is correctly connected\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = alloca [256 x i8]
%6 = alloca [512 x i8]
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%11 = icmp sgt i32 %0, 1
br i1 %11, label %12, label %50
12: ; preds = %2, %43
%13 = phi i32 [ %46, %43 ], [ 1, %2 ]
%14 = phi i32 [ %44, %43 ], [ 0, %2 ]
%15 = sext i32 %13 to i64
%16 = getelementptr inbounds i8*, i8** %1, i64 %15
%17 = load i8*, i8** %16
%18 = call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %28
20: ; preds = %12
%21 = add nsw i32 %13, 1
%22 = icmp slt i32 %21, %0
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = sext i32 %21 to i64
%25 = getelementptr inbounds i8*, i8** %1, i64 %24
%26 = load i8*, i8** %25
%27 = call i32 @strcpy(i8* %7, i8* %26)
br label %43
28: ; preds = %20, %12
%29 = load i8*, i8** %16
%30 = call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %40
32: ; preds = %28
%33 = add nsw i32 %13, 1
%34 = icmp slt i32 %33, %0
br i1 %34, label %35, label %40
35: ; preds = %32
%36 = sext i32 %33 to i64
%37 = getelementptr inbounds i8*, i8** %1, i64 %36
%38 = load i8*, i8** %37
%39 = call i32 @strcpy(i8* %8, i8* %38)
br label %43
40: ; preds = %32, %28
%41 = load i8*, i8** %16
%42 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %41)
br label %43
43: ; preds = %23, %40, %35
%44 = phi i32 [ %14, %23 ], [ %14, %35 ], [ -1, %40 ]
%45 = phi i32 [ %21, %23 ], [ %33, %35 ], [ %13, %40 ]
%46 = add nsw i32 %45, 1
%47 = icmp slt i32 %46, %0
br i1 %47, label %12, label %48
48: ; preds = %43
%49 = icmp eq i32 %44, 0
br i1 %49, label %50, label %84
50: ; preds = %2, %48
%51 = call i32* @setmntent(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%52 = icmp eq i32* %51, null
br i1 %52, label %58, label %53
53: ; preds = %50
%54 = call %struct.mntent* @getmntent(i32* %51)
%55 = icmp eq %struct.mntent* %54, null
br i1 %55, label %56, label %61
56: ; preds = %53
%57 = call i32 @endmntent(i32* %51)
br label %82
58: ; preds = %50
%59 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%60 = call i32 @exit(i32 1)
unreachable
61: ; preds = %53, %71
%62 = phi %struct.mntent* [ %73, %71 ], [ %54, %53 ]
%63 = phi i32 [ %72, %71 ], [ 0, %53 ]
%64 = getelementptr inbounds %struct.mntent, %struct.mntent* %62, i64 0, i32 0
%65 = load i8*, i8** %64
%66 = call i64 @strstr(i8* %65, i8* %8)
%67 = icmp eq i64 %66, 0
br i1 %67, label %71, label %68
68: ; preds = %61
%69 = load i8*, i8** %64
%70 = call i8* bitcast (i32 (i8*, i8*)* @strcpy to i8* (i8*, i8*)*)(i8* %9, i8* %69)
br label %71
71: ; preds = %68, %61
%72 = phi i32 [ 1, %68 ], [ %63, %61 ]
%73 = call %struct.mntent* @getmntent(i32* %51)
%74 = icmp eq %struct.mntent* %73, null
br i1 %74, label %75, label %61
75: ; preds = %71
%76 = call i32 @endmntent(i32* %51)
%77 = icmp eq i32 %72, 0
br i1 %77, label %82, label %78
78: ; preds = %75
%79 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i8* %7, i8* %9)
%80 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %10, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* %7, i8* %9)
%81 = call i32 @system(i8* %10)
br label %84
82: ; preds = %56, %75
%83 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.9, i64 0, i64 0), i8* %8)
br label %84
84: ; preds = %78, %82, %48
%85 = phi i32 [ 0, %78 ], [ -1, %82 ], [ -1, %48 ]
ret i32 %85
}