#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 main(int argc, char *argv[]) {
  int i;
  if (argc > 1)
    for (i = 1; i < argc; i++)
      if (argv[i][0] == '-' && argv[i][1] == 's')
        MDString(argv[i] + 2);
      else if (strcmp(argv[i], "-t") == 0)
        MDTimeTrial();
      else if (strcmp(argv[i], "-x") == 0)
        MDTestSuite();
      else
        MDFile(argv[i]);
  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    126d <main+0x10d>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1268 <main+0x108>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    11de <main+0x7e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x73,%eax
jne    11de <main+0x7e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x2,%rdi
call   1060 <MDString@plt>
jmp    1255 <main+0xf5>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe0f(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    120c <main+0xac>
mov    $0x0,%al
call   1030 <MDTimeTrial@plt>
jmp    1250 <main+0xf0>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xde4(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    123a <main+0xda>
mov    $0x0,%al
call   1040 <MDTestSuite@plt>
jmp    124b <main+0xeb>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <MDFile@plt>
jmp    1250 <main+0xf0>
jmp    1255 <main+0xf5>
jmp    125a <main+0xfa>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1187 <main+0x27>
jmp    1274 <main+0x114>
mov    $0x0,%al
call   1070 <MDFilter@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
cmp    $0x2,%edi
jl     11f4 <main+0x94>
mov    %rsi,%r13
mov    %edi,%r12d
mov    $0x1,%ebx
lea    0xe7c(%rip),%r14
lea    0xe78(%rip),%r15
jmp    11a0 <main+0x40>
nopl   (%rax)
xor    %eax,%eax
call   1030 <MDTimeTrial@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
je     11fb <main+0x9b>
mov    0x0(%r13,%rbx,8),%rdi
cmpb   $0x2d,(%rdi)
jne    11c0 <main+0x60>
cmpb   $0x73,0x1(%rdi)
jne    11c0 <main+0x60>
add    $0x2,%rdi
call   1060 <MDString@plt>
jmp    1197 <main+0x37>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1190 <main+0x30>
mov    0x0(%r13,%rbx,8),%rdi
mov    %r15,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     11eb <main+0x8b>
mov    0x0(%r13,%rbx,8),%rdi
call   1050 <MDFile@plt>
jmp    1197 <main+0x37>
xor    %eax,%eax
call   1040 <MDTestSuite@plt>
jmp    1197 <main+0x37>
xor    %eax,%eax
call   1070 <MDFilter@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-t\00"
@.str.1 = [3 x i8] c"-x\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 %76
9: ; preds = %2
store i32 1, i32* %6
br label %10
10: ; preds = %72, %9
%11 = load i32, i32* %6
%12 = load i32, i32* %4
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %75
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 %71
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 %70
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 %69
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 i32 @MDFile(i8* %67)
br label %69
69: ; preds = %62, %60
br label %70
70: ; preds = %69, %50
br label %71
71: ; preds = %70, %34
br label %72
72: ; preds = %71
%73 = load i32, i32* %6
%74 = add nsw i32 %73, 1
store i32 %74, i32* %6
br label %10
75: ; preds = %10
br label %78
76: ; preds = %2
%77 = call i32 (...) @MDFilter()
br label %78
78: ; preds = %76, %75
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-t\00"
@.str.1 = [3 x i8] c"-x\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %36
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %33
%7 = phi i64 [ 1, %4 ], [ %34, %33 ]
%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 %33
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 %33
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 %33
30: ; preds = %24
%31 = load i8*, i8** %8
%32 = tail call i32 @MDFile(i8* %31)
br label %33
33: ; preds = %16, %28, %30, %22
%34 = add nuw nsw i64 %7, 1
%35 = icmp eq i64 %34, %5
br i1 %35, label %38, label %6
36: ; preds = %2
%37 = tail call i32 (...) @MDFilter()
br label %38
38: ; preds = %33, %36
ret i32 0
}