#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 md5_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):
<md5_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1266 <md5_main+0x106>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1261 <md5_main+0x101>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    11d7 <md5_main+0x77>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x73,%eax
jne    11d7 <md5_main+0x77>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x2,%rdi
call   1060 <MDString@plt>
jmp    124e <md5_main+0xee>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe16(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1205 <md5_main+0xa5>
mov    $0x0,%al
call   1030 <MDTimeTrial@plt>
jmp    1249 <md5_main+0xe9>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdeb(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1233 <md5_main+0xd3>
mov    $0x0,%al
call   1040 <MDTestSuite@plt>
jmp    1244 <md5_main+0xe4>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <MDFile@plt>
jmp    1249 <md5_main+0xe9>
jmp    124e <md5_main+0xee>
jmp    1253 <md5_main+0xf3>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1180 <md5_main+0x20>
jmp    126d <md5_main+0x10d>
mov    $0x0,%al
call   1070 <MDFilter@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md5_main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
cmp    $0x2,%edi
jl     11f4 <md5_main+0x94>
mov    %rsi,%r13
mov    %edi,%r12d
mov    $0x1,%ebx
lea    0xe7c(%rip),%r14
lea    0xe78(%rip),%r15
jmp    11a0 <md5_main+0x40>
nopl   (%rax)
xor    %eax,%eax
call   1030 <MDTimeTrial@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
je     11fb <md5_main+0x9b>
mov    0x0(%r13,%rbx,8),%rdi
cmpb   $0x2d,(%rdi)
jne    11c0 <md5_main+0x60>
cmpb   $0x73,0x1(%rdi)
jne    11c0 <md5_main+0x60>
add    $0x2,%rdi
call   1060 <MDString@plt>
jmp    1197 <md5_main+0x37>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1190 <md5_main+0x30>
mov    0x0(%r13,%rbx,8),%rdi
mov    %r15,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     11eb <md5_main+0x8b>
mov    0x0(%r13,%rbx,8),%rdi
call   1050 <MDFile@plt>
jmp    1197 <md5_main+0x37>
xor    %eax,%eax
call   1040 <MDTestSuite@plt>
jmp    1197 <md5_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 @md5_main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %75
8: ; preds = %2
store i32 1, i32* %5
br label %9
9: ; preds = %71, %8
%10 = load i32, i32* %5
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %74
13: ; preds = %9
%14 = load i8**, i8*** %4
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
%18 = load i8*, i8** %17
%19 = getelementptr inbounds i8, i8* %18, i64 0
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 45
br i1 %22, label %23, label %41
23: ; preds = %13
%24 = load i8**, i8*** %4
%25 = load i32, i32* %5
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = getelementptr inbounds i8, i8* %28, i64 1
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 115
br i1 %32, label %33, label %41
33: ; preds = %23
%34 = load i8**, i8*** %4
%35 = load i32, i32* %5
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8*, i8** %34, i64 %36
%38 = load i8*, i8** %37
%39 = getelementptr inbounds i8, i8* %38, i64 2
%40 = call i32 @MDString(i8* %39)
br label %70
41: ; preds = %23, %13
%42 = load i8**, i8*** %4
%43 = load i32, i32* %5
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8*, i8** %42, i64 %44
%46 = load i8*, i8** %45
%47 = call i64 @strcmp(i8* %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %41
%50 = call i32 (...) @MDTimeTrial()
br label %69
51: ; preds = %41
%52 = load i8**, i8*** %4
%53 = load i32, i32* %5
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i8*, i8** %52, i64 %54
%56 = load i8*, i8** %55
%57 = call i64 @strcmp(i8* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %51
%60 = call i32 (...) @MDTestSuite()
br label %68
61: ; preds = %51
%62 = load i8**, i8*** %4
%63 = load i32, i32* %5
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8*, i8** %62, i64 %64
%66 = load i8*, i8** %65
%67 = call i32 @MDFile(i8* %66)
br label %68
68: ; preds = %61, %59
br label %69
69: ; preds = %68, %49
br label %70
70: ; preds = %69, %33
br label %71
71: ; preds = %70
%72 = load i32, i32* %5
%73 = add nsw i32 %72, 1
store i32 %73, i32* %5
br label %9
74: ; preds = %9
br label %77
75: ; preds = %2
%76 = call i32 (...) @MDFilter()
br label %77
77: ; preds = %75, %74
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-t\00"
@.str.1 = [3 x i8] c"-x\00"
define i32 @md5_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
}