int main(argc, argv)
int argc;
char *argv[];
{
  int i;
  unsigned char fingerprint[128 >> 3];
  if (argc <= 1) {
    haval_stdin();
  }
  for (i = 1; i < argc; i++) {
    if ((argv[i][0] == '?') || (argv[i][0] == '-' && argv[i][1] == '?')) {
      printf(" (none)     hash input from stdin\n");
      printf(" ? or -?    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("HAVAL(\"%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 TW_LITTLE_ENDIAN to speed up processing.\n");
      } else {
        printf("Your machine is NOT little-endian.\n");
        printf("You must NOT define TW_LITTLE_ENDIAN.\n");
      }
    } else {
      if (haval_file(argv[i], fingerprint)) {
        printf("%s can not be opened !\n= ", argv[i]);
      } else {
        printf("HAVAL(File %s) = ", argv[i]);
        haval_print(fingerprint);
        printf("\n");
      }
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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    146d <main+0x2dd>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x3f,%eax
je     1213 <main+0x83>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    127a <main+0xea>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x3f,%eax
jne    127a <main+0xea>
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xdfb(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    145a <main+0x2ca>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1302 <main+0x172>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x6d,%eax
jne    1302 <main+0x172>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x2,%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   10a0 <haval_string@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
add    $0x2,%rsi
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1090 <haval_print@plt>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1455 <main+0x2c5>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdc3(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    132f <main+0x19f>
mov    $0x0,%al
call   1030 <haval_cert@plt>
jmp    1450 <main+0x2c0>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd99(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    135c <main+0x1cc>
mov    $0x0,%al
call   1070 <haval_speed@plt>
jmp    144b <main+0x2bb>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd6f(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    13cf <main+0x23f>
mov    $0x0,%al
call   1050 <little_endian@plt>
cmp    $0x0,%eax
je     13ae <main+0x21e>
lea    0xd4d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd5f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13ca <main+0x23a>
lea    0xd85(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd9b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1446 <main+0x2b6>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   10b0 <haval_file@plt>
cmp    $0x0,%eax
je     140e <main+0x27e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd83(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1441 <main+0x2b1>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd7e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1090 <haval_print@plt>
lea    0xd49(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1446 <main+0x2b6>
jmp    144b <main+0x2bb>
jmp    1450 <main+0x2c0>
jmp    1455 <main+0x2c5>
jmp    145a <main+0x2ca>
jmp    145f <main+0x2cf>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11be <main+0x2e>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
cmp    $0x1,%edi
jg     11db <main+0x2b>
xor    %eax,%eax
call   1060 <haval_stdin@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rsi,%rbx
mov    %edi,%r15d
mov    $0x1,%r14d
mov    %rsp,%rbp
lea    0xe1e(%rip),%r12
jmp    1209 <main+0x59>
xor    %eax,%eax
call   1030 <haval_cert@plt>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r14
cmp    %r14,%r15
je     11ca <main+0x1a>
mov    (%rbx,%r14,8),%r13
movzbl 0x0(%r13),%eax
cmp    $0x3f,%al
je     122b <main+0x7b>
cmp    $0x2d,%al
jne    1290 <main+0xe0>
movzbl 0x1(%r13),%eax
cmp    $0x6d,%al
je     12f1 <main+0x141>
cmp    $0x3f,%al
jne    1290 <main+0xe0>
lea    0xeb2(%rip),%rdi
call   1050 <puts@plt>
lea    0xec8(%rip),%rdi
call   1050 <puts@plt>
lea    0xed7(%rip),%rdi
call   1050 <puts@plt>
lea    0xeef(%rip),%rdi
call   1050 <puts@plt>
lea    0xefe(%rip),%rdi
call   1050 <puts@plt>
lea    0xf0b(%rip),%rdi
call   1050 <puts@plt>
lea    0xf16(%rip),%rdi
call   1050 <puts@plt>
jmp    1200 <main+0x50>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%rdi
mov    %r12,%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     11f3 <main+0x43>
mov    %r13,%rdi
lea    0xd65(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     1313 <main+0x163>
mov    %r13,%rdi
lea    0xd55(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     131f <main+0x16f>
mov    %r13,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10d0 <haval_file@plt>
mov    (%rbx,%r14,8),%rsi
test   %eax,%eax
je     1342 <main+0x192>
lea    0xd33(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
jmp    1200 <main+0x50>
add    $0x2,%r13
mov    %r13,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10c0 <haval_string@plt>
mov    (%rbx,%r14,8),%rsi
add    $0x2,%rsi
lea    0xcef(%rip),%rdi
jmp    1349 <main+0x199>
xor    %eax,%eax
call   1090 <haval_speed@plt>
jmp    1200 <main+0x50>
xor    %eax,%eax
call   1070 <little_endian@plt>
test   %eax,%eax
je     1369 <main+0x1b9>
lea    0xd5c(%rip),%rdi
call   1050 <puts@plt>
lea    0xd6f(%rip),%rdi
jmp    127a <main+0xca>
lea    0xce9(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   10b0 <haval_print@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
jmp    1200 <main+0x50>
lea    0xcd4(%rip),%rdi
call   1050 <puts@plt>
lea    0xceb(%rip),%rdi
jmp    127a <main+0xca>

LLVM IR (-O0):
@.str = [35 x i8] c" (none) hash input from stdin\0A\00"
@.str.1 = [28 x i8] c" ? or -? 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 = [15 x i8] c"HAVAL(\22%s\22) = \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 = [57 x i8] c"You may define TW_LITTLE_ENDIAN to speed up processing.\0A\00"
@.str.14 = [36 x i8] c"Your machine is NOT little-endian.\0A\00"
@.str.15 = [39 x i8] c"You must NOT define TW_LITTLE_ENDIAN.\0A\00"
@.str.16 = [26 x i8] c"%s can not be opened !\0A= \00"
@.str.17 = [18 x i8] c"HAVAL(File %s) = \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [16 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 = %164, %12
%14 = load i32, i32* %6
%15 = load i32, i32* %4
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %167
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 %47, 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 %55
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 %47, label %55
47: ; preds = %37, %17
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
br label %163
55: ; preds = %37, %27
%56 = load i8**, i8*** %5
%57 = load i32, i32* %6
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8*, i8** %56, i64 %58
%60 = load i8*, i8** %59
%61 = getelementptr inbounds i8, i8* %60, i64 0
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 45
br i1 %64, label %65, label %94
65: ; preds = %55
%66 = load i8**, i8*** %5
%67 = load i32, i32* %6
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i8*, i8** %66, i64 %68
%70 = load i8*, i8** %69
%71 = getelementptr inbounds i8, i8* %70, i64 1
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = icmp eq i32 %73, 109
br i1 %74, label %75, label %94
75: ; preds = %65
%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 2
%82 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%83 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @haval_string to i32 (i8*, i8*, ...)*)(i8* %81, i8* %82)
%84 = load i8**, i8*** %5
%85 = load i32, i32* %6
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i8*, i8** %84, i64 %86
%88 = load i8*, i8** %87
%89 = getelementptr inbounds i8, i8* %88, i64 2
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %89)
%91 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%92 = call i32 (i8*, ...) bitcast (i32 (...)* @haval_print to i32 (i8*, ...)*)(i8* %91)
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %162
94: ; preds = %65, %55
%95 = load i8**, i8*** %5
%96 = load i32, i32* %6
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i8*, i8** %95, i64 %97
%99 = load i8*, i8** %98
%100 = call i32 @strcmp(i8* %99, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%101 = icmp eq i32 %100, 0
br i1 %101, label %102, label %104
102: ; preds = %94
%103 = call i32 (...) @haval_cert()
br label %161
104: ; preds = %94
%105 = load i8**, i8*** %5
%106 = load i32, i32* %6
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i8*, i8** %105, i64 %107
%109 = load i8*, i8** %108
%110 = call i32 @strcmp(i8* %109, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%111 = icmp eq i32 %110, 0
br i1 %111, label %112, label %114
112: ; preds = %104
%113 = call i32 (...) @haval_speed()
br label %160
114: ; preds = %104
%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 i32 @strcmp(i8* %119, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%121 = icmp eq i32 %120, 0
br i1 %121, label %122, label %132
122: ; preds = %114
%123 = call i32 (...) @little_endian()
%124 = icmp ne i32 %123, 0
br i1 %124, label %125, label %128
125: ; preds = %122
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0))
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.13, i64 0, i64 0))
br label %131
128: ; preds = %122
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0))
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0))
br label %131
131: ; preds = %128, %125
br label %159
132: ; preds = %114
%133 = load i8**, i8*** %5
%134 = load i32, i32* %6
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i8*, i8** %133, i64 %135
%137 = load i8*, i8** %136
%138 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%139 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @haval_file to i32 (i8*, i8*, ...)*)(i8* %137, i8* %138)
%140 = icmp ne i32 %139, 0
br i1 %140, label %141, label %148
141: ; preds = %132
%142 = load i8**, i8*** %5
%143 = load i32, i32* %6
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds i8*, i8** %142, i64 %144
%146 = load i8*, i8** %145
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i8* %146)
br label %158
148: ; preds = %132
%149 = load i8**, i8*** %5
%150 = load i32, i32* %6
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds i8*, i8** %149, i64 %151
%153 = load i8*, i8** %152
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i8* %153)
%155 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%156 = call i32 (i8*, ...) bitcast (i32 (...)* @haval_print to i32 (i8*, ...)*)(i8* %155)
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %158
158: ; preds = %148, %141
br label %159
159: ; preds = %158, %131
br label %160
160: ; preds = %159, %112
br label %161
161: ; preds = %160, %102
br label %162
162: ; preds = %161, %75
br label %163
163: ; preds = %162, %47
br label %164
164: ; preds = %163
%165 = load i32, i32* %6
%166 = add nsw i32 %165, 1
store i32 %166, i32* %6
br label %13
167: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
@.str.7 = [15 x i8] c"HAVAL(\22%s\22) = \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 = [18 x i8] c"HAVAL(File %s) = \00"
@str = [35 x i8] c"Your machine is NOT little-endian.\00"
@str.18 = [38 x i8] c"You must NOT define TW_LITTLE_ENDIAN.\00"
@str.19 = [31 x i8] c"Your machine is little-endian.\00"
@str.20 = [56 x i8] c"You may define TW_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" ? or -? 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 [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 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 %69
8: ; preds = %2
%9 = zext i32 %0 to i64
br label %10
10: ; preds = %8, %66
%11 = phi i64 [ 1, %8 ], [ %67, %66 ]
%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 109, label %26
]
18: ; preds = %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 %66
26: ; preds = %15
%27 = getelementptr inbounds i8, i8* %13, i64 2
%28 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @haval_string to i32 (i8*, i8*, ...)*)(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 ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %30)
%32 = call i32 (i8*, ...) bitcast (i32 (...)* @haval_print to i32 (i8*, ...)*)(i8* %4)
%33 = call i32 @putchar(i32 10)
br label %66
34: ; preds = %15, %10
%35 = call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = call i32 (...) @haval_cert()
br label %66
39: ; preds = %34
%40 = call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = call i32 (...) @haval_speed()
br label %66
44: ; preds = %39
%45 = call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %56
47: ; preds = %44
%48 = call i32 (...) @little_endian()
%49 = icmp eq i32 %48, 0
br i1 %49, label %53, label %50
50: ; preds = %47
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.19, i64 0, i64 0))
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.20, i64 0, i64 0))
br label %66
53: ; preds = %47
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.18, i64 0, i64 0))
br label %66
56: ; preds = %44
%57 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @haval_file to i32 (i8*, i8*, ...)*)(i8* %13, i8* %4)
%58 = icmp eq i32 %57, 0
%59 = load i8*, i8** %12
br i1 %58, label %62, label %60
60: ; preds = %56
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i8* %59)
br label %66
62: ; preds = %56
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i8* %59)
%64 = call i32 (i8*, ...) bitcast (i32 (...)* @haval_print to i32 (i8*, ...)*)(i8* %4)
%65 = call i32 @putchar(i32 10)
br label %66
66: ; preds = %18, %37, %53, %50, %62, %60, %42, %26
%67 = add nuw nsw i64 %11, 1
%68 = icmp eq i64 %67, %9
br i1 %68, label %69, label %10
69: ; preds = %66, %6
ret i32 0
}