#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 */

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int atoi(char *);
int /*<<< orphan*/ chk(char *, int, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char);
int getopt_long(int, char **, char *);
int /*<<< orphan*/ isprint(char);
char *optarg;
char optopt;
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ usage(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  char *fs_type;
  int opt;
  int cl_mnt;
  bool nag_mode = false;
  while ((opt = getopt_long(argc, argv, "c:t:n")) != -1)
    switch (opt) {
    case 'c':
      cl_mnt = atoi(optarg);
      break;
    case 't':
      fs_type = optarg;
      break;
    case 'n':
      nag_mode = true;
      break;
    case '?':
      if (optopt == 'c')
        fprintf(stderr, "Option -%c requires an argument.\n", optopt);
      else if (optopt == 't')
        fprintf(stderr, "Option -%c requires an argument.\n", optopt);
      else if (isprint(optopt))
        fprintf(stderr, "Unknown option `%-c'.\n", optopt);
      return 1;
    default:
      usage(EXIT_FAILURE);
      break;
    }
  if (argc == 1)
    usage(EXIT_FAILURE);
  else {
    chk(fs_type, cl_mnt, nag_mode);
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe65(%rip),%rdx
call   1040 <getopt_long@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xffffffff,%eax
je     12f6 <main+0x186>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x28(%rbp)
sub    $0x3f,%eax
je     1229 <main+0xb9>
jmp    11c0 <main+0x50>
mov    -0x28(%rbp),%eax
sub    $0x63,%eax
je     11f3 <main+0x83>
jmp    11d1 <main+0x61>
mov    -0x28(%rbp),%eax
sub    $0x6e,%eax
je     121d <main+0xad>
jmp    11e2 <main+0x72>
mov    -0x28(%rbp),%eax
sub    $0x74,%eax
je     120a <main+0x9a>
jmp    12e3 <main+0x173>
mov    0x2dfe(%rip),%rax
mov    (%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x20(%rbp)
jmp    12f1 <main+0x181>
mov    0x2de7(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    12f1 <main+0x181>
movl   $0x1,-0x24(%rbp)
jmp    12f1 <main+0x181>
mov    0x2db0(%rip),%rax
movsbl (%rax),%eax
cmp    $0x63,%eax
jne    1260 <main+0xf0>
mov    0x2d8d(%rip),%rax
mov    (%rax),%edi
lea    0xdba(%rip),%rsi
mov    0x2d8d(%rip),%rax
movsbl (%rax),%edx
call   1050 <fprintf@plt>
jmp    12d8 <main+0x168>
mov    0x2d79(%rip),%rax
movsbl (%rax),%eax
cmp    $0x74,%eax
jne    1297 <main+0x127>
mov    0x2d56(%rip),%rax
mov    (%rax),%edi
lea    0xd83(%rip),%rsi
mov    0x2d56(%rip),%rax
movsbl (%rax),%edx
call   1050 <fprintf@plt>
jmp    12d3 <main+0x163>
mov    0x2d42(%rip),%rax
movsbl (%rax),%edi
call   1070 <isprint@plt>
cmp    $0x0,%eax
je     12ce <main+0x15e>
mov    0x2d1a(%rip),%rax
mov    (%rax),%edi
lea    0xd69(%rip),%rsi
mov    0x2d1a(%rip),%rax
movsbl (%rax),%edx
call   1050 <fprintf@plt>
jmp    12d3 <main+0x163>
jmp    12d8 <main+0x168>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret
mov    0x2cde(%rip),%rax
mov    (%rax),%edi
call   1060 <usage@plt>
jmp    118d <main+0x1d>
cmpl   $0x1,-0x8(%rbp)
jne    1313 <main+0x1a3>
mov    0x2cc1(%rip),%rax
mov    (%rax),%edi
call   1060 <usage@plt>
jmp    1322 <main+0x1b2>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1030 <chk@plt>
mov    0x2c97(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %r14d,%r14d
lea    0xe73(%rip),%r12
mov    0x2e64(%rip),%r13
mov    0x2e2d(%rip),%r15
jmp    11b1 <main+0x41>
nopl   (%rax)
cmp    $0xffffffff,%eax
je     1274 <main+0x104>
mov    (%r15),%edi
call   1060 <usage@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1040 <getopt_long@plt>
cmp    $0x6d,%eax
jg     11e0 <main+0x70>
cmp    $0x3f,%eax
je     11fd <main+0x8d>
cmp    $0x63,%eax
jne    11a0 <main+0x30>
mov    0x0(%r13),%rdi
call   1080 <atoi@plt>
mov    %eax,0xc(%rsp)
jmp    11b1 <main+0x41>
nopl   0x0(%rax)
cmp    $0x6e,%eax
je     11f5 <main+0x85>
cmp    $0x74,%eax
jne    11a9 <main+0x39>
mov    0x0(%r13),%rax
mov    %rax,0x10(%rsp)
jmp    11b1 <main+0x41>
mov    $0x1,%r14d
jmp    11b1 <main+0x41>
mov    0x2ddc(%rip),%rbx
mov    (%rbx),%al
cmp    $0x74,%al
je     1225 <main+0xb5>
cmp    $0x63,%al
jne    123c <main+0xcc>
mov    0x2dbb(%rip),%rax
mov    (%rax),%edi
lea    0xde8(%rip),%rsi
mov    $0x63,%edx
jmp    125b <main+0xeb>
mov    0x2da4(%rip),%rax
mov    (%rax),%edi
lea    0xdd1(%rip),%rsi
mov    $0x74,%edx
jmp    125b <main+0xeb>
movsbl %al,%edi
call   1070 <isprint@plt>
test   %eax,%eax
je     1260 <main+0xf0>
mov    0x2d81(%rip),%rax
mov    (%rax),%edi
movsbl (%rbx),%edx
lea    0xdcd(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    $0x1,%ebp
jne    1283 <main+0x113>
mov    (%r15),%edi
call   1060 <usage@plt>
jmp    1294 <main+0x124>
mov    0x10(%rsp),%rdi
mov    0xc(%rsp),%esi
mov    %r14d,%edx
call   1030 <chk@plt>
mov    0x2d25(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"c:t:n\00"
@optarg = global i8* null
@optopt = global i8 0
@stderr = global i32 0
@.str.1 = [34 x i8] c"Option -%c requires an argument.\0A\00"
@.str.2 = [23 x i8] c"Unknown option `%-c'.\0A\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
br label %10
10: ; preds = %53, %2
%11 = load i32, i32* %4
%12 = load i8**, i8*** %5
%13 = call i32 @getopt_long(i32 %11, i8** %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 %13, i32* %7
%14 = icmp ne i32 %13, -1
br i1 %14, label %15, label %54
15: ; preds = %10
%16 = load i32, i32* %7
switch i32 %16, label %50 [
i32 99, label %17
i32 116, label %20
i32 110, label %22
i32 63, label %23
]
17: ; preds = %15
%18 = load i8*, i8** @optarg
%19 = call i32 @atoi(i8* %18)
store i32 %19, i32* %8
br label %53
20: ; preds = %15
%21 = load i8*, i8** @optarg
store i8* %21, i8** %6
br label %53
22: ; preds = %15
store i32 1, i32* %9
br label %53
23: ; preds = %15
%24 = load i8, i8* @optopt
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 99
br i1 %26, label %27, label %31
27: ; preds = %23
%28 = load i32, i32* @stderr
%29 = load i8, i8* @optopt
%30 = call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8 signext %29)
br label %49
31: ; preds = %23
%32 = load i8, i8* @optopt
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 116
br i1 %34, label %35, label %39
35: ; preds = %31
%36 = load i32, i32* @stderr
%37 = load i8, i8* @optopt
%38 = call i32 @fprintf(i32 %36, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8 signext %37)
br label %48
39: ; preds = %31
%40 = load i8, i8* @optopt
%41 = call i32 @isprint(i8 signext %40)
%42 = icmp ne i32 %41, 0
br i1 %42, label %43, label %47
43: ; preds = %39
%44 = load i32, i32* @stderr
%45 = load i8, i8* @optopt
%46 = call i32 @fprintf(i32 %44, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8 signext %45)
br label %47
47: ; preds = %43, %39
br label %48
48: ; preds = %47, %35
br label %49
49: ; preds = %48, %27
ret i32 1
50: ; preds = %15
%51 = load i32, i32* @EXIT_FAILURE
%52 = call i32 @usage(i32 %51)
br label %53
53: ; preds = %50, %22, %20, %17
br label %10
54: ; preds = %10
%55 = load i32, i32* %4
%56 = icmp eq i32 %55, 1
br i1 %56, label %57, label %60
57: ; preds = %54
%58 = load i32, i32* @EXIT_FAILURE
%59 = call i32 @usage(i32 %58)
br label %65
60: ; preds = %54
%61 = load i8*, i8** %6
%62 = load i32, i32* %8
%63 = load i32, i32* %9
%64 = call i32 @chk(i8* %61, i32 %62, i32 %63)
br label %65
65: ; preds = %60, %57
%66 = load i32, i32* @EXIT_SUCCESS
%67 = call i32 @exit(i32 %66)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"c:t:n\00"
@optarg = global i8* null
@optopt = global i8 0
@stderr = global i32 0
@.str.1 = [34 x i8] c"Option -%c requires an argument.\0A\00"
@.str.2 = [23 x i8] c"Unknown option `%-c'.\0A\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
br label %3
3: ; preds = %17, %2
%4 = phi i8* [ %18, %17 ], [ undef, %2 ]
%5 = phi i32 [ %8, %17 ], [ undef, %2 ]
%6 = phi i32 [ %11, %17 ], [ 0, %2 ]
br label %7
7: ; preds = %3, %14
%8 = phi i32 [ %5, %3 ], [ %16, %14 ]
%9 = phi i32 [ %6, %3 ], [ %11, %14 ]
br label %10
10: ; preds = %12, %7
%11 = phi i32 [ %9, %7 ], [ 1, %12 ]
br label %12
12: ; preds = %10, %35
%13 = tail call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
switch i32 %13, label %35 [
i32 -1, label %38
i32 99, label %14
i32 116, label %17
i32 110, label %10
i32 63, label %19
]
14: ; preds = %12
%15 = load i8*, i8** @optarg
%16 = tail call i32 @atoi(i8* %15)
br label %7
17: ; preds = %12
%18 = load i8*, i8** @optarg
br label %3
19: ; preds = %12
%20 = load i8, i8* @optopt
switch i8 %20, label %27 [
i8 99, label %21
i8 116, label %24
]
21: ; preds = %19
%22 = load i32, i32* @stderr
%23 = tail call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8 signext 99)
br label %34
24: ; preds = %19
%25 = load i32, i32* @stderr
%26 = tail call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8 signext 116)
br label %34
27: ; preds = %19
%28 = tail call i32 @isprint(i8 signext %20)
%29 = icmp eq i32 %28, 0
br i1 %29, label %34, label %30
30: ; preds = %27
%31 = load i32, i32* @stderr
%32 = load i8, i8* @optopt
%33 = tail call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8 signext %32)
br label %34
34: ; preds = %24, %30, %27, %21
ret i32 1
35: ; preds = %12
%36 = load i32, i32* @EXIT_FAILURE
%37 = tail call i32 @usage(i32 %36)
br label %12
38: ; preds = %12
%39 = icmp eq i32 %0, 1
br i1 %39, label %40, label %43
40: ; preds = %38
%41 = load i32, i32* @EXIT_FAILURE
%42 = tail call i32 @usage(i32 %41)
br label %45
43: ; preds = %38
%44 = tail call i32 @chk(i8* %4, i32 %8, i32 %11)
br label %45
45: ; preds = %43, %40
%46 = load i32, i32* @EXIT_SUCCESS
%47 = tail call i32 @exit(i32 %46)
unreachable
}