#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();
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  int i;
  if (argc == 1)
    MDFilter();
  else
    for (i = 1; i < argc; i++)
      if (argv[i][0] == '-' && argv[i][1] == 's')
        MDString(argv[i] + 2);
      else if (!strcmp(argv[i], "-t"))
        MDTimeTrial();
      else if (!strcmp(argv[i], "-x"))
        MDTestSuite();
      else
        MDFile(argv[i]);
  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)
jne    118c <main+0x2c>
mov    $0x0,%al
call   1070 <MDFilter@plt>
jmp    1277 <main+0x117>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1272 <main+0x112>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    11ea <main+0x8a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x73,%eax
jne    11ea <main+0x8a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x2,%rdi
call   1060 <MDString@plt>
jmp    125f <main+0xff>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe03(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    1217 <main+0xb7>
mov    $0x0,%al
call   1030 <MDTimeTrial@plt>
jmp    125a <main+0xfa>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdd9(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    1244 <main+0xe4>
mov    $0x0,%al
call   1040 <MDTestSuite@plt>
jmp    1255 <main+0xf5>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <MDFile@plt>
jmp    125a <main+0xfa>
jmp    125f <main+0xff>
jmp    1264 <main+0x104>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1193 <main+0x33>
jmp    1277 <main+0x117>
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    $0x1,%edi
jne    117c <main+0x1c>
xor    %eax,%eax
call   1070 <MDFilter@plt>
jmp    1201 <main+0xa1>
jle    1201 <main+0xa1>
mov    %rsi,%r12
mov    %edi,%r13d
mov    $0x1,%ebp
lea    0xe6c(%rip),%r14
lea    0xe68(%rip),%r15
jmp    11b0 <main+0x50>
nopl   (%rax)
xor    %eax,%eax
call   1030 <MDTimeTrial@plt>
add    $0x1,%rbp
cmp    %rbp,%r13
je     1201 <main+0xa1>
mov    (%r12,%rbp,8),%rbx
cmpb   $0x2d,(%rbx)
jne    11d0 <main+0x70>
cmpb   $0x73,0x1(%rbx)
jne    11d0 <main+0x70>
add    $0x2,%rbx
mov    %rbx,%rdi
call   1060 <MDString@plt>
jmp    11a7 <main+0x47>
nopl   (%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     11a0 <main+0x40>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1080 <strcmp@plt>
test   %eax,%eax
je     11f8 <main+0x98>
mov    %rbx,%rdi
call   1050 <MDFile@plt>
jmp    11a7 <main+0x47>
xor    %eax,%eax
call   1040 <MDTestSuite@plt>
jmp    11a7 <main+0x47>
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"
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 eq i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @MDFilter()
br label %78
11: ; preds = %2
store i32 1, i32* %6
br label %12
12: ; preds = %74, %11
%13 = load i32, i32* %6
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %77
16: ; preds = %12
%17 = load i8**, i8*** %5
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
%21 = load i8*, i8** %20
%22 = getelementptr inbounds i8, i8* %21, i64 0
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 45
br i1 %25, label %26, label %44
26: ; preds = %16
%27 = load i8**, i8*** %5
%28 = load i32, i32* %6
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8*, i8** %27, i64 %29
%31 = load i8*, i8** %30
%32 = getelementptr inbounds i8, i8* %31, i64 1
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 115
br i1 %35, label %36, label %44
36: ; preds = %26
%37 = load i8**, i8*** %5
%38 = load i32, i32* %6
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i8*, i8** %37, i64 %39
%41 = load i8*, i8** %40
%42 = getelementptr inbounds i8, i8* %41, i64 2
%43 = call i32 @MDString(i8* %42)
br label %73
44: ; preds = %26, %16
%45 = load i8**, i8*** %5
%46 = load i32, i32* %6
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i8*, i8** %45, i64 %47
%49 = load i8*, i8** %48
%50 = call i32 @strcmp(i8* %49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%51 = icmp ne i32 %50, 0
br i1 %51, label %54, label %52
52: ; preds = %44
%53 = call i32 (...) @MDTimeTrial()
br label %72
54: ; preds = %44
%55 = load i8**, i8*** %5
%56 = load i32, i32* %6
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i8*, i8** %55, i64 %57
%59 = load i8*, i8** %58
%60 = call i32 @strcmp(i8* %59, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%61 = icmp ne i32 %60, 0
br i1 %61, label %64, label %62
62: ; preds = %54
%63 = call i32 (...) @MDTestSuite()
br label %71
64: ; preds = %54
%65 = load i8**, i8*** %5
%66 = load i32, i32* %6
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8*, i8** %65, i64 %67
%69 = load i8*, i8** %68
%70 = call i32 @MDFile(i8* %69)
br label %71
71: ; preds = %64, %62
br label %72
72: ; preds = %71, %52
br label %73
73: ; preds = %72, %36
br label %74
74: ; preds = %73
%75 = load i32, i32* %6
%76 = add nsw i32 %75, 1
store i32 %76, i32* %6
br label %12
77: ; preds = %12
br label %78
78: ; preds = %77, %9
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 eq i32 %0, 1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %38
6: ; preds = %4
%7 = zext i32 %0 to i64
br label %10
8: ; preds = %2
%9 = tail call i32 (...) @MDFilter()
br label %38
10: ; preds = %6, %35
%11 = phi i64 [ 1, %6 ], [ %36, %35 ]
%12 = getelementptr inbounds i8*, i8** %1, i64 %11
%13 = load i8*, i8** %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 45
br i1 %15, label %16, label %23
16: ; preds = %10
%17 = getelementptr inbounds i8, i8* %13, i64 1
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 115
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = getelementptr inbounds i8, i8* %13, i64 2
%22 = tail call i32 @MDString(i8* %21)
br label %35
23: ; preds = %16, %10
%24 = tail call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = tail call i32 (...) @MDTimeTrial()
br label %35
28: ; preds = %23
%29 = tail call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = tail call i32 (...) @MDTestSuite()
br label %35
33: ; preds = %28
%34 = tail call i32 @MDFile(i8* %13)
br label %35
35: ; preds = %20, %31, %33, %26
%36 = add nuw nsw i64 %11, 1
%37 = icmp eq i64 %36, %7
br i1 %37, label %38, label %10
38: ; preds = %35, %4, %8
ret i32 0
}