#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*/ MDFile(char *);
int /*<<< orphan*/ MDFilter();
int /*<<< orphan*/ MDString(char *);
int /*<<< orphan*/ MDTestSuite();
int /*<<< orphan*/ MDTimeTrial();
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ usage(char *);
int main(int argc, char *argv[]) {
  int argi;
  if (argc > 1) {
    for (argi = 1; argi < argc; argi++) {
      if (argv[argi][0] == '-' && argv[argi][1] == 's')
        MDString(argv[argi] + 2);
      else if (strcmp(argv[argi], "-t") == 0)
        MDTimeTrial();
      else if (strcmp(argv[argi], "-x") == 0)
        MDTestSuite();
      else if (strcmp(argv[argi], "--help") == 0)
        usage(argv[0]);
      else
        MDFile(argv[argi]);
    }
  } else {
    MDFilter();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    12b5 <main+0x145>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12b0 <main+0x140>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    11ee <main+0x7e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x73,%eax
jne    11ee <main+0x7e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x2,%rdi
call   1060 <MDString@plt>
jmp    129d <main+0x12d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdff(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    121c <main+0xac>
mov    $0x0,%al
call   1030 <MDTimeTrial@plt>
jmp    1298 <main+0x128>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdd4(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    124a <main+0xda>
mov    $0x0,%al
call   1040 <MDTestSuite@plt>
jmp    1293 <main+0x123>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xda9(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    127d <main+0x10d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1090 <usage@plt>
jmp    128e <main+0x11e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <MDFile@plt>
jmp    1293 <main+0x123>
jmp    1298 <main+0x128>
jmp    129d <main+0x12d>
jmp    12a2 <main+0x132>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1197 <main+0x27>
jmp    12bc <main+0x14c>
mov    $0x0,%al
call   1070 <MDFilter@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     122d <main+0xbd>
mov    %rsi,%rbx
mov    %edi,%r13d
mov    $0x1,%ebp
lea    0xe6a(%rip),%r14
lea    0xe66(%rip),%r15
lea    0xe62(%rip),%r12
jmp    11c0 <main+0x50>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <MDTimeTrial@plt>
add    $0x1,%rbp
cmp    %rbp,%r13
je     1234 <main+0xc4>
mov    (%rbx,%rbp,8),%rdi
cmpb   $0x2d,(%rdi)
jne    11e0 <main+0x70>
cmpb   $0x73,0x1(%rdi)
jne    11e0 <main+0x70>
add    $0x2,%rdi
call   1060 <MDString@plt>
jmp    11b7 <main+0x47>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     11b0 <main+0x40>
mov    (%rbx,%rbp,8),%rdi
mov    %r15,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     121a <main+0xaa>
mov    (%rbx,%rbp,8),%rdi
mov    %r12,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1223 <main+0xb3>
mov    (%rbx,%rbp,8),%rdi
call   1050 <MDFile@plt>
jmp    11b7 <main+0x47>
xor    %eax,%eax
call   1040 <MDTestSuite@plt>
jmp    11b7 <main+0x47>
mov    (%rbx),%rdi
call   1090 <usage@plt>
jmp    11b7 <main+0x47>
xor    %eax,%eax
call   1070 <MDFilter@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-t\00"
@.str.1 = [3 x i8] c"-x\00"
@.str.2 = [7 x i8] c"--help\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %90
9: ; preds = %2
store i32 1, i32* %6
br label %10
10: ; preds = %86, %9
%11 = load i32, i32* %6
%12 = load i32, i32* %4
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %89
14: ; preds = %10
%15 = load i8**, i8*** %5
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i64 0
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 45
br i1 %23, label %24, label %42
24: ; preds = %14
%25 = load i8**, i8*** %5
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8*, i8** %25, i64 %27
%29 = load i8*, i8** %28
%30 = getelementptr inbounds i8, i8* %29, i64 1
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 115
br i1 %33, label %34, label %42
34: ; preds = %24
%35 = load i8**, i8*** %5
%36 = load i32, i32* %6
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8*, i8** %35, i64 %37
%39 = load i8*, i8** %38
%40 = getelementptr inbounds i8, i8* %39, i64 2
%41 = call i32 @MDString(i8* %40)
br label %85
42: ; preds = %24, %14
%43 = load i8**, i8*** %5
%44 = load i32, i32* %6
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8*, i8** %43, i64 %45
%47 = load i8*, i8** %46
%48 = call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %42
%51 = call i32 (...) @MDTimeTrial()
br label %84
52: ; preds = %42
%53 = load i8**, i8*** %5
%54 = load i32, i32* %6
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8*, i8** %53, i64 %55
%57 = load i8*, i8** %56
%58 = call i64 @strcmp(i8* %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %52
%61 = call i32 (...) @MDTestSuite()
br label %83
62: ; preds = %52
%63 = load i8**, i8*** %5
%64 = load i32, i32* %6
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i8*, i8** %63, i64 %65
%67 = load i8*, i8** %66
%68 = call i64 @strcmp(i8* %67, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %75
70: ; preds = %62
%71 = load i8**, i8*** %5
%72 = getelementptr inbounds i8*, i8** %71, i64 0
%73 = load i8*, i8** %72
%74 = call i32 @usage(i8* %73)
br label %82
75: ; preds = %62
%76 = load i8**, i8*** %5
%77 = load i32, i32* %6
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8*, i8** %76, i64 %78
%80 = load i8*, i8** %79
%81 = call i32 @MDFile(i8* %80)
br label %82
82: ; preds = %75, %70
br label %83
83: ; preds = %82, %60
br label %84
84: ; preds = %83, %50
br label %85
85: ; preds = %84, %34
br label %86
86: ; preds = %85
%87 = load i32, i32* %6
%88 = add nsw i32 %87, 1
store i32 %88, i32* %6
br label %10
89: ; preds = %10
br label %92
90: ; preds = %2
%91 = call i32 (...) @MDFilter()
br label %92
92: ; preds = %90, %89
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-t\00"
@.str.1 = [3 x i8] c"-x\00"
@.str.2 = [7 x i8] c"--help\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %43
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %40
%7 = phi i64 [ 1, %4 ], [ %41, %40 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 45
br i1 %11, label %12, label %19
12: ; preds = %6
%13 = getelementptr inbounds i8, i8* %9, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 115
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = getelementptr inbounds i8, i8* %9, i64 2
%18 = tail call i32 @MDString(i8* %17)
br label %40
19: ; preds = %12, %6
%20 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = tail call i32 (...) @MDTimeTrial()
br label %40
24: ; preds = %19
%25 = load i8*, i8** %8
%26 = tail call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = tail call i32 (...) @MDTestSuite()
br label %40
30: ; preds = %24
%31 = load i8*, i8** %8
%32 = tail call i64 @strcmp(i8* %31, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %30
%35 = load i8*, i8** %1
%36 = tail call i32 @usage(i8* %35)
br label %40
37: ; preds = %30
%38 = load i8*, i8** %8
%39 = tail call i32 @MDFile(i8* %38)
br label %40
40: ; preds = %16, %28, %37, %34, %22
%41 = add nuw nsw i64 %7, 1
%42 = icmp eq i64 %41, %5
br i1 %42, label %45, label %6
43: ; preds = %2
%44 = tail call i32 (...) @MDFilter()
br label %45
45: ; preds = %40, %43
ret i32 0
}