#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(int /*<<< orphan*/);
int /*<<< orphan*/ file_md5(char *, char *);
int /*<<< orphan*/ get_md5(char *);
int /*<<< orphan*/ int_md5(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ str_md5(char *);
scalar_t__ strstr(char *, char *);
int main(int argc, char *argv[]) {
  if ((argc == 2) && (strstr(argv[1], "-h"))) {
    printf("\n ========================= \n");
    printf(" -h View this help \n");
    printf(" -i [hash] try to broot this hash in desimail format from 0 to "
           "99999999.\n");
    printf("    if you suspect that password must be not symbolic \n");
    printf(" -s [hash] try to broot this hash in string form. From 1 to 6 "
           "simbols in password \n");
    printf(" -f [hash] [file_name] broot passwords from text file \n");
    printf(" -m [text] get md5 hash from your's text\n");
    printf(" -v get version number\n");
    exit(0);
  }
  if (argc > 2) {
    if (strstr(argv[1], "-i")) {
      int_md5(argv[2]);
    }
    if (strstr(argv[1], "-s")) {
      str_md5(argv[2]);
    }
    if (strstr(argv[1], "-f")) {
      file_md5(argv[2], argv[3]);
    }
    if (strstr(argv[1], "-m")) {
      get_md5(argv[2]);
    }
  }
  if (argc > 1) {
    if (strstr(argv[1], "-v")) {
      printf("Md5-Hasher ver. 0.1\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1215 <main+0xa5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe61(%rip),%rsi
call   1090 <strstr@plt>
cmp    $0x0,%rax
je     1215 <main+0xa5>
lea    0xe4e(%rip),%rdi
call   1040 <printf@plt>
lea    0xe60(%rip),%rdi
call   1040 <printf@plt>
lea    0xe69(%rip),%rdi
call   1040 <printf@plt>
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
call   1040 <printf@plt>
lea    0xf1b(%rip),%rdi
call   1040 <printf@plt>
lea    0xf47(%rip),%rdi
call   1040 <printf@plt>
lea    0xf65(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1080 <exit@plt>
cmpl   $0x2,-0x8(%rbp)
jle    12d8 <main+0x168>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xf58(%rip),%rsi
call   1090 <strstr@plt>
cmp    $0x0,%rax
je     124a <main+0xda>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <int_md5@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xf30(%rip),%rsi
call   1090 <strstr@plt>
cmp    $0x0,%rax
je     1275 <main+0x105>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <str_md5@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xf08(%rip),%rsi
call   1090 <strstr@plt>
cmp    $0x0,%rax
je     12a8 <main+0x138>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
call   1030 <file_md5@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xed8(%rip),%rsi
call   1090 <strstr@plt>
cmp    $0x0,%rax
je     12d3 <main+0x163>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1070 <get_md5@plt>
jmp    12d8 <main+0x168>
cmpl   $0x1,-0x8(%rbp)
jle    1311 <main+0x1a1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xea1(%rip),%rsi
call   1090 <strstr@plt>
cmp    $0x0,%rax
je     130c <main+0x19c>
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
jmp    1311 <main+0x1a1>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
jne    11fd <main+0x8d>
mov    0x8(%rbx),%rdi
lea    0xe78(%rip),%rsi
call   1090 <strstr@plt>
test   %rax,%rax
je     127f <main+0x10f>
lea    0xe89(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9a(%rip),%rdi
call   1040 <puts@plt>
lea    0xea2(%rip),%rdi
call   1040 <puts@plt>
lea    0xedf(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf51(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7c(%rip),%rdi
call   1040 <puts@plt>
lea    0xf99(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <exit@plt>
jle    12a0 <main+0x130>
mov    0x8(%rbx),%rdi
lea    0xdf5(%rip),%rsi
call   1090 <strstr@plt>
test   %rax,%rax
je     1221 <main+0xb1>
mov    0x10(%rbx),%rdi
call   1060 <int_md5@plt>
mov    0x8(%rbx),%rdi
lea    0xdda(%rip),%rsi
call   1090 <strstr@plt>
test   %rax,%rax
je     123f <main+0xcf>
mov    0x10(%rbx),%rdi
call   1050 <str_md5@plt>
mov    0x8(%rbx),%rdi
lea    0xdbf(%rip),%rsi
call   1090 <strstr@plt>
test   %rax,%rax
je     1261 <main+0xf1>
mov    0x10(%rbx),%rdi
mov    0x18(%rbx),%rsi
call   1030 <file_md5@plt>
mov    0x8(%rbx),%rdi
lea    0xda0(%rip),%rsi
call   1090 <strstr@plt>
test   %rax,%rax
je     127f <main+0x10f>
mov    0x10(%rbx),%rdi
call   1070 <get_md5@plt>
mov    0x8(%rbx),%rdi
lea    0xd85(%rip),%rsi
call   1090 <strstr@plt>
test   %rax,%rax
je     12a0 <main+0x130>
lea    0xd77(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-h\00"
@.str.1 = [30 x i8] c"\0A ========================= \0A\00"
@.str.2 = [21 x i8] c" -h View this help \0A\00"
@.str.3 = [74 x i8] c" -i [hash] try to broot this hash in desimail format from 0 to 99999999.\0A\00"
@.str.4 = [56 x i8] c" if you suspect that password must be not symbolic \0A\00"
@.str.5 = [84 x i8] c" -s [hash] try to broot this hash in string form. From 1 to 6 simbols in password \0A\00"
@.str.6 = [56 x i8] c" -f [hash] [file_name] broot passwords from text file \0A\00"
@.str.7 = [42 x i8] c" -m [text] get md5 hash from your's text\0A\00"
@.str.8 = [24 x i8] c" -v get version number\0A\00"
@.str.9 = [3 x i8] c"-i\00"
@.str.10 = [3 x i8] c"-s\00"
@.str.11 = [3 x i8] c"-f\00"
@.str.12 = [3 x i8] c"-m\00"
@.str.13 = [3 x i8] c"-v\00"
@.str.14 = [21 x i8] c"Md5-Hasher ver. 0.1\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %24
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @strstr(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %24
14: ; preds = %8
%15 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.3, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.5, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.6, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%23 = call i32 @exit(i32 0)
unreachable
24: ; preds = %8, %2
%25 = load i32, i32* %4
%26 = icmp sgt i32 %25, 2
br i1 %26, label %27, label %75
27: ; preds = %24
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
%31 = call i64 @strstr(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%32 = icmp ne i64 %31, 0
br i1 %32, label %33, label %38
33: ; preds = %27
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 2
%36 = load i8*, i8** %35
%37 = call i32 @int_md5(i8* %36)
br label %38
38: ; preds = %33, %27
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = load i8*, i8** %40
%42 = call i64 @strstr(i8* %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%43 = icmp ne i64 %42, 0
br i1 %43, label %44, label %49
44: ; preds = %38
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 2
%47 = load i8*, i8** %46
%48 = call i32 @str_md5(i8* %47)
br label %49
49: ; preds = %44, %38
%50 = load i8**, i8*** %5
%51 = getelementptr inbounds i8*, i8** %50, i64 1
%52 = load i8*, i8** %51
%53 = call i64 @strstr(i8* %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %63
55: ; preds = %49
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 2
%58 = load i8*, i8** %57
%59 = load i8**, i8*** %5
%60 = getelementptr inbounds i8*, i8** %59, i64 3
%61 = load i8*, i8** %60
%62 = call i32 @file_md5(i8* %58, i8* %61)
br label %63
63: ; preds = %55, %49
%64 = load i8**, i8*** %5
%65 = getelementptr inbounds i8*, i8** %64, i64 1
%66 = load i8*, i8** %65
%67 = call i64 @strstr(i8* %66, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%68 = icmp ne i64 %67, 0
br i1 %68, label %69, label %74
69: ; preds = %63
%70 = load i8**, i8*** %5
%71 = getelementptr inbounds i8*, i8** %70, i64 2
%72 = load i8*, i8** %71
%73 = call i32 @get_md5(i8* %72)
br label %74
74: ; preds = %69, %63
br label %75
75: ; preds = %74, %24
%76 = load i32, i32* %4
%77 = icmp sgt i32 %76, 1
br i1 %77, label %78, label %87
78: ; preds = %75
%79 = load i8**, i8*** %5
%80 = getelementptr inbounds i8*, i8** %79, i64 1
%81 = load i8*, i8** %80
%82 = call i64 @strstr(i8* %81, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%83 = icmp ne i64 %82, 0
br i1 %83, label %84, label %86
84: ; preds = %78
%85 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0))
br label %86
86: ; preds = %84, %78
br label %87
87: ; preds = %86, %75
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-h\00"
@.str.9 = [3 x i8] c"-i\00"
@.str.10 = [3 x i8] c"-s\00"
@.str.11 = [3 x i8] c"-f\00"
@.str.12 = [3 x i8] c"-m\00"
@.str.13 = [3 x i8] c"-v\00"
@str = [20 x i8] c"Md5-Hasher ver. 0.1\00"
@str.15 = [29 x i8] c"\0A ========================= \00"
@str.16 = [20 x i8] c" -h View this help \00"
@str.17 = [73 x i8] c" -i [hash] try to broot this hash in desimail format from 0 to 99999999.\00"
@str.18 = [55 x i8] c" if you suspect that password must be not symbolic \00"
@str.19 = [83 x i8] c" -s [hash] try to broot this hash in string form. From 1 to 6 simbols in password \00"
@str.20 = [55 x i8] c" -f [hash] [file_name] broot passwords from text file \00"
@str.21 = [41 x i8] c" -m [text] get md5 hash from your's text\00"
@str.22 = [23 x i8] c" -v get version number\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %19
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strstr(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %56, label %9
9: ; preds = %4
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.15, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.16, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.17, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.18, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str.19, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.20, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.21, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.22, i64 0, i64 0))
%18 = tail call i32 @exit(i32 0)
unreachable
19: ; preds = %2
%20 = icmp sgt i32 %0, 2
br i1 %20, label %21, label %63
21: ; preds = %19
%22 = getelementptr inbounds i8*, i8** %1, i64 1
%23 = load i8*, i8** %22
%24 = tail call i64 @strstr(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %30, label %26
26: ; preds = %21
%27 = getelementptr inbounds i8*, i8** %1, i64 2
%28 = load i8*, i8** %27
%29 = tail call i32 @int_md5(i8* %28)
br label %30
30: ; preds = %26, %21
%31 = load i8*, i8** %22
%32 = tail call i64 @strstr(i8* %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %38, label %34
34: ; preds = %30
%35 = getelementptr inbounds i8*, i8** %1, i64 2
%36 = load i8*, i8** %35
%37 = tail call i32 @str_md5(i8* %36)
br label %38
38: ; preds = %34, %30
%39 = load i8*, i8** %22
%40 = tail call i64 @strstr(i8* %39, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%41 = icmp eq i64 %40, 0
br i1 %41, label %48, label %42
42: ; preds = %38
%43 = getelementptr inbounds i8*, i8** %1, i64 2
%44 = load i8*, i8** %43
%45 = getelementptr inbounds i8*, i8** %1, i64 3
%46 = load i8*, i8** %45
%47 = tail call i32 @file_md5(i8* %44, i8* %46)
br label %48
48: ; preds = %42, %38
%49 = load i8*, i8** %22
%50 = tail call i64 @strstr(i8* %49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%51 = icmp eq i64 %50, 0
br i1 %51, label %56, label %52
52: ; preds = %48
%53 = getelementptr inbounds i8*, i8** %1, i64 2
%54 = load i8*, i8** %53
%55 = tail call i32 @get_md5(i8* %54)
br label %56
56: ; preds = %4, %48, %52
%57 = getelementptr inbounds i8*, i8** %1, i64 1
%58 = load i8*, i8** %57
%59 = tail call i64 @strstr(i8* %58, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%60 = icmp eq i64 %59, 0
br i1 %60, label %63, label %61
61: ; preds = %56
%62 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
br label %63
63: ; preds = %19, %56, %61
ret i32 0
}