#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*/ haval_cert();
scalar_t__ haval_file(char *, unsigned char *);
int /*<<< orphan*/ haval_print(unsigned char *);
int /*<<< orphan*/ haval_speed();
int /*<<< orphan*/ haval_stdin();
int /*<<< orphan*/ haval_string(char *, unsigned char *);
scalar_t__ little_endian();
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  int i;
  unsigned char fingerprint[256 >> 3];
  if (argc <= 1) {
    haval_stdin();
  }
  for (i = 1; i < argc; i++) {
    if ((argv[i][0] == '?') || (argv[i][0] == '-' && argv[i][1] == '?') ||
        (argv[i][0] == '-' && argv[i][1] == 'h')) {
      printf(" (none)     hash input from stdin\n");
      printf(" ?/-?/-h    show help menu\n");
      printf(" -c         hash certification data\n");
      printf(" -e         test endianity\n");
      printf(" -mstring   hash message\n");
      printf(" -s         test speed\n");
      printf(" file_name  hash file\n");
    } else if (argv[i][0] == '-' && argv[i][1] == 'm') {
      haval_string(argv[i] + 2, fingerprint);
      printf("%s  ", argv[i] + 2);
      haval_print(fingerprint);
      printf("\n");
    } else if (strcmp(argv[i], "-c") == 0) {
      haval_cert();
    } else if (strcmp(argv[i], "-s") == 0) {
      haval_speed();
    } else if (strcmp(argv[i], "-e") == 0) {
      if (little_endian()) {
        printf("Your machine is little-endian.\n");
        printf("You may define LITTLE_ENDIAN to speed up processing.\n");
      } else {
        printf("Your machine is NOT little-endian.\n");
        printf("You must NOT define LITTLE_ENDIAN.\n");
      }
    } else {
      if (haval_file(argv[i], fingerprint)) {
        printf("%s can not be opened !\n= ", argv[i]);
      } else {
        haval_print(fingerprint);
        printf("  %s", argv[i]);
        printf("\n");
      }
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     11b7 <main+0x27>
mov    $0x0,%al
call   1040 <haval_stdin@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    149b <main+0x30b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x3f,%eax
je     1244 <main+0xb4>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1213 <main+0x83>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x3f,%eax
je     1244 <main+0xb4>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    12ab <main+0x11b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x68,%eax
jne    12ab <main+0x11b>
lea    0xdb5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xdca(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xdd8(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xdef(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1488 <main+0x2f8>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    132f <main+0x19f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x6d,%eax
jne    132f <main+0x19f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x2,%rdi
lea    -0x40(%rbp),%rsi
call   10a0 <haval_string@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
add    $0x2,%rsi
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x40(%rbp),%rdi
call   1090 <haval_print@plt>
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1483 <main+0x2f3>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd8c(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    135d <main+0x1cd>
mov    $0x0,%al
call   1030 <haval_cert@plt>
jmp    147e <main+0x2ee>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd61(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    138b <main+0x1fb>
mov    $0x0,%al
call   1070 <haval_speed@plt>
jmp    1479 <main+0x2e9>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd36(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1400 <main+0x270>
mov    $0x0,%al
call   1050 <little_endian@plt>
cmp    $0x0,%rax
je     13df <main+0x24f>
lea    0xd12(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd24(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13fb <main+0x26b>
lea    0xd47(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd5d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1474 <main+0x2e4>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x40(%rbp),%rsi
call   10b0 <haval_file@plt>
cmp    $0x0,%rax
je     143e <main+0x2ae>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd43(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    146f <main+0x2df>
lea    -0x40(%rbp),%rdi
call   1090 <haval_print@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd35(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1474 <main+0x2e4>
jmp    1479 <main+0x2e9>
jmp    147e <main+0x2ee>
jmp    1483 <main+0x2f3>
jmp    1488 <main+0x2f8>
jmp    148d <main+0x2fd>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11be <main+0x2e>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
cmp    $0x1,%edi
jg     11db <main+0x2b>
xor    %eax,%eax
call   1060 <haval_stdin@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rsi,%rbx
mov    %edi,%r12d
mov    $0x1,%r13d
lea    0xf55(%rip),%r14
lea    0xf67(%rip),%r15
lea    0xf77(%rip),%rbp
jmp    1219 <main+0x69>
xor    %eax,%eax
call   1030 <haval_cert@plt>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r13
cmp    %r13,%r12
je     11ca <main+0x1a>
mov    (%rbx,%r13,8),%rdi
movzbl (%rdi),%eax
cmp    $0x3f,%al
je     1240 <main+0x90>
cmp    $0x2d,%al
jne    1290 <main+0xe0>
movzbl 0x1(%rdi),%eax
cmp    $0x3f,%al
je     1240 <main+0x90>
cmp    $0x6d,%al
je     130a <main+0x15a>
cmp    $0x68,%al
jne    1290 <main+0xe0>
nopl   0x0(%rax)
lea    0xe80(%rip),%rdi
call   1050 <puts@plt>
lea    0xe96(%rip),%rdi
call   1050 <puts@plt>
lea    0xea5(%rip),%rdi
call   1050 <puts@plt>
lea    0xebd(%rip),%rdi
call   1050 <puts@plt>
mov    %r14,%rdi
call   1050 <puts@plt>
mov    %r15,%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
call   1050 <puts@plt>
jmp    1210 <main+0x60>
nopw   0x0(%rax,%rax,1)
lea    0xd6e(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     11fe <main+0x4e>
mov    (%rbx,%r13,8),%rdi
lea    0xd58(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     12fe <main+0x14e>
mov    (%rbx,%r13,8),%rdi
lea    0xd46(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1343 <main+0x193>
mov    (%rbx,%r13,8),%rdi
mov    %rsp,%rbp
mov    %rbp,%rsi
call   10d0 <haval_file@plt>
test   %rax,%rax
je     1367 <main+0x1b7>
mov    (%rbx,%r13,8),%rsi
lea    0xd1c(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
jmp    138b <main+0x1db>
xor    %eax,%eax
call   1090 <haval_speed@plt>
jmp    1210 <main+0x60>
add    $0x2,%rdi
mov    %rsp,%rsi
call   10c0 <haval_string@plt>
mov    (%rbx,%r13,8),%rsi
add    $0x2,%rsi
lea    0xcdb(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rsp,%rdi
call   10b0 <haval_print@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
jmp    1210 <main+0x60>
xor    %eax,%eax
call   1070 <little_endian@plt>
test   %rax,%rax
je     1397 <main+0x1e7>
lea    0xd1d(%rip),%rdi
call   1050 <puts@plt>
lea    0xd30(%rip),%rdi
jmp    1283 <main+0xd3>
mov    %rbp,%rdi
call   10b0 <haval_print@plt>
mov    (%rbx,%r13,8),%rsi
lea    0xcae(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0xde1(%rip),%rbp
jmp    1210 <main+0x60>
lea    0xc8f(%rip),%rdi
call   1050 <puts@plt>
lea    0xca6(%rip),%rdi
jmp    1283 <main+0xd3>

LLVM IR (-O0):
@.str = [35 x i8] c" (none) hash input from stdin\0A\00"
@.str.1 = [28 x i8] c" ?/-?/-h show help menu\0A\00"
@.str.2 = [37 x i8] c" -c hash certification data\0A\00"
@.str.3 = [28 x i8] c" -e test endianity\0A\00"
@.str.4 = [26 x i8] c" -mstring hash message\0A\00"
@.str.5 = [24 x i8] c" -s test speed\0A\00"
@.str.6 = [23 x i8] c" file_name hash file\0A\00"
@.str.7 = [5 x i8] c"%s \00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [3 x i8] c"-c\00"
@.str.10 = [3 x i8] c"-s\00"
@.str.11 = [3 x i8] c"-e\00"
@.str.12 = [32 x i8] c"Your machine is little-endian.\0A\00"
@.str.13 = [54 x i8] c"You may define LITTLE_ENDIAN to speed up processing.\0A\00"
@.str.14 = [36 x i8] c"Your machine is NOT little-endian.\0A\00"
@.str.15 = [36 x i8] c"You must NOT define LITTLE_ENDIAN.\0A\00"
@.str.16 = [26 x i8] c"%s can not be opened !\0A= \00"
@.str.17 = [5 x i8] c" %s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [32 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @haval_stdin()
br label %12
12: ; preds = %10, %2
store i32 1, i32* %6
br label %13
13: ; preds = %184, %12
%14 = load i32, i32* %6
%15 = load i32, i32* %4
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %187
17: ; preds = %13
%18 = load i8**, i8*** %5
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
%22 = load i8*, i8** %21
%23 = getelementptr inbounds i8, i8* %22, i64 0
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 63
br i1 %26, label %67, label %27
27: ; preds = %17
%28 = load i8**, i8*** %5
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8*, i8** %28, i64 %30
%32 = load i8*, i8** %31
%33 = getelementptr inbounds i8, i8* %32, i64 0
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 45
br i1 %36, label %37, label %47
37: ; preds = %27
%38 = load i8**, i8*** %5
%39 = load i32, i32* %6
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8*, i8** %38, i64 %40
%42 = load i8*, i8** %41
%43 = getelementptr inbounds i8, i8* %42, i64 1
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 63
br i1 %46, label %67, label %47
47: ; preds = %37, %27
%48 = load i8**, i8*** %5
%49 = load i32, i32* %6
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8*, i8** %48, i64 %50
%52 = load i8*, i8** %51
%53 = getelementptr inbounds i8, i8* %52, i64 0
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = icmp eq i32 %55, 45
br i1 %56, label %57, label %75
57: ; preds = %47
%58 = load i8**, i8*** %5
%59 = load i32, i32* %6
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8*, i8** %58, i64 %60
%62 = load i8*, i8** %61
%63 = getelementptr inbounds i8, i8* %62, i64 1
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = icmp eq i32 %65, 104
br i1 %66, label %67, label %75
67: ; preds = %57, %37, %17
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
br label %183
75: ; preds = %57, %47
%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 = getelementptr inbounds i8, i8* %80, i64 0
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = icmp eq i32 %83, 45
br i1 %84, label %85, label %114
85: ; preds = %75
%86 = load i8**, i8*** %5
%87 = load i32, i32* %6
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i8*, i8** %86, i64 %88
%90 = load i8*, i8** %89
%91 = getelementptr inbounds i8, i8* %90, i64 1
%92 = load i8, i8* %91
%93 = sext i8 %92 to i32
%94 = icmp eq i32 %93, 109
br i1 %94, label %95, label %114
95: ; preds = %85
%96 = load i8**, i8*** %5
%97 = load i32, i32* %6
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds i8*, i8** %96, i64 %98
%100 = load i8*, i8** %99
%101 = getelementptr inbounds i8, i8* %100, i64 2
%102 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%103 = call i32 @haval_string(i8* %101, i8* %102)
%104 = load i8**, i8*** %5
%105 = load i32, i32* %6
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i8*, i8** %104, i64 %106
%108 = load i8*, i8** %107
%109 = getelementptr inbounds i8, i8* %108, i64 2
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %109)
%111 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%112 = call i32 @haval_print(i8* %111)
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %182
114: ; preds = %85, %75
%115 = load i8**, i8*** %5
%116 = load i32, i32* %6
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds i8*, i8** %115, i64 %117
%119 = load i8*, i8** %118
%120 = call i64 @strcmp(i8* %119, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%121 = icmp eq i64 %120, 0
br i1 %121, label %122, label %124
122: ; preds = %114
%123 = call i32 (...) @haval_cert()
br label %181
124: ; preds = %114
%125 = load i8**, i8*** %5
%126 = load i32, i32* %6
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i8*, i8** %125, i64 %127
%129 = load i8*, i8** %128
%130 = call i64 @strcmp(i8* %129, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%131 = icmp eq i64 %130, 0
br i1 %131, label %132, label %134
132: ; preds = %124
%133 = call i32 (...) @haval_speed()
br label %180
134: ; preds = %124
%135 = load i8**, i8*** %5
%136 = load i32, i32* %6
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds i8*, i8** %135, i64 %137
%139 = load i8*, i8** %138
%140 = call i64 @strcmp(i8* %139, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%141 = icmp eq i64 %140, 0
br i1 %141, label %142, label %152
142: ; preds = %134
%143 = call i64 (...) @little_endian()
%144 = icmp ne i64 %143, 0
br i1 %144, label %145, label %148
145: ; preds = %142
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0))
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.13, i64 0, i64 0))
br label %151
148: ; preds = %142
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0))
%150 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.15, i64 0, i64 0))
br label %151
151: ; preds = %148, %145
br label %179
152: ; preds = %134
%153 = load i8**, i8*** %5
%154 = load i32, i32* %6
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds i8*, i8** %153, i64 %155
%157 = load i8*, i8** %156
%158 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%159 = call i64 @haval_file(i8* %157, i8* %158)
%160 = icmp ne i64 %159, 0
br i1 %160, label %161, label %168
161: ; preds = %152
%162 = load i8**, i8*** %5
%163 = load i32, i32* %6
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds i8*, i8** %162, i64 %164
%166 = load i8*, i8** %165
%167 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i8* %166)
br label %178
168: ; preds = %152
%169 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%170 = call i32 @haval_print(i8* %169)
%171 = load i8**, i8*** %5
%172 = load i32, i32* %6
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds i8*, i8** %171, i64 %173
%175 = load i8*, i8** %174
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* %175)
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %178
178: ; preds = %168, %161
br label %179
179: ; preds = %178, %151
br label %180
180: ; preds = %179, %132
br label %181
181: ; preds = %180, %122
br label %182
182: ; preds = %181, %95
br label %183
183: ; preds = %182, %67
br label %184
184: ; preds = %183
%185 = load i32, i32* %6
%186 = add nsw i32 %185, 1
store i32 %186, i32* %6
br label %13
187: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
@.str.7 = [5 x i8] c"%s \00"
@.str.9 = [3 x i8] c"-c\00"
@.str.10 = [3 x i8] c"-s\00"
@.str.11 = [3 x i8] c"-e\00"
@.str.16 = [26 x i8] c"%s can not be opened !\0A= \00"
@.str.17 = [5 x i8] c" %s\00"
@str = [35 x i8] c"Your machine is NOT little-endian.\00"
@str.18 = [35 x i8] c"You must NOT define LITTLE_ENDIAN.\00"
@str.19 = [31 x i8] c"Your machine is little-endian.\00"
@str.20 = [53 x i8] c"You may define LITTLE_ENDIAN to speed up processing.\00"
@str.21 = [34 x i8] c" (none) hash input from stdin\00"
@str.22 = [27 x i8] c" ?/-?/-h show help menu\00"
@str.23 = [36 x i8] c" -c hash certification data\00"
@str.24 = [27 x i8] c" -e test endianity\00"
@str.25 = [25 x i8] c" -mstring hash message\00"
@str.26 = [23 x i8] c" -s test speed\00"
@str.27 = [22 x i8] c" file_name hash file\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @haval_stdin()
br label %73
8: ; preds = %2
%9 = zext i32 %0 to i64
br label %10
10: ; preds = %8, %70
%11 = phi i64 [ 1, %8 ], [ %71, %70 ]
%12 = getelementptr inbounds i8*, i8** %1, i64 %11
%13 = load i8*, i8** %12
%14 = load i8, i8* %13
switch i8 %14, label %34 [
i8 63, label %18
i8 45, label %15
]
15: ; preds = %10
%16 = getelementptr inbounds i8, i8* %13, i64 1
%17 = load i8, i8* %16
switch i8 %17, label %34 [
i8 63, label %18
i8 104, label %18
i8 109, label %26
]
18: ; preds = %15, %15, %10
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.21, i64 0, i64 0))
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.22, i64 0, i64 0))
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.23, i64 0, i64 0))
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.24, i64 0, i64 0))
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.25, i64 0, i64 0))
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.26, i64 0, i64 0))
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.27, i64 0, i64 0))
br label %70
26: ; preds = %15
%27 = getelementptr inbounds i8, i8* %13, i64 2
%28 = call i32 @haval_string(i8* %27, i8* %4)
%29 = load i8*, i8** %12
%30 = getelementptr inbounds i8, i8* %29, i64 2
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %30)
%32 = call i32 @haval_print(i8* %4)
%33 = call i32 @putchar(i32 10)
br label %70
34: ; preds = %15, %10
%35 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = call i32 (...) @haval_cert()
br label %70
39: ; preds = %34
%40 = load i8*, i8** %12
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %39
%44 = call i32 (...) @haval_speed()
br label %70
45: ; preds = %39
%46 = load i8*, i8** %12
%47 = call i64 @strcmp(i8* %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %58
49: ; preds = %45
%50 = call i64 (...) @little_endian()
%51 = icmp eq i64 %50, 0
br i1 %51, label %55, label %52
52: ; preds = %49
%53 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.19, i64 0, i64 0))
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
br label %70
55: ; preds = %49
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.18, i64 0, i64 0))
br label %70
58: ; preds = %45
%59 = load i8*, i8** %12
%60 = call i64 @haval_file(i8* %59, i8* %4)
%61 = icmp eq i64 %60, 0
br i1 %61, label %65, label %62
62: ; preds = %58
%63 = load i8*, i8** %12
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i8* %63)
br label %70
65: ; preds = %58
%66 = call i32 @haval_print(i8* %4)
%67 = load i8*, i8** %12
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* %67)
%69 = call i32 @putchar(i32 10)
br label %70
70: ; preds = %18, %37, %55, %52, %65, %62, %43, %26
%71 = add nuw nsw i64 %11, 1
%72 = icmp eq i64 %71, %9
br i1 %72, label %73, label %10
73: ; preds = %70, %6
ret i32 0
}