#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 */
typedef int uint8_t;
typedef int newDigit;
typedef int /*<<< orphan*/ input;

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ MD5(char *, int *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int main(int argc, char **argv) {
  char input[32];
  char numStr[32];
  char password[8 + 1] = "________";
  char spinners[4] = {'|', '/', '-', '\\'};
  uint8_t md5sum[16];
  long loopCount = 0;
  int num = 0, digitsFound = 0;
  int digIndex, newDigit;
  if (argc != 2) {
    fprintf(stderr, "Usage:\n\tDay5 <input string>\n\n");
    return EXIT_FAILURE;
  }
  printf("\n");
  while (digitsFound < 8) {
    memset(input, '\0', sizeof(input));
    strncpy(input, argv[1], 32 - 1);
    sprintf(numStr, "%d", num);
    strcat(input, numStr);
    MD5(input, md5sum);
    if (md5sum[0] == 0 && md5sum[1] == 0 && md5sum[2] < 0x10) {
      digIndex = md5sum[2];
      if (digIndex < 8 && password[digIndex] == '_') {
        newDigit = md5sum[3] >> 4;
        password[digIndex] =
            (((newDigit) < 0xa) ? '0' + (newDigit) : 'a' + ((newDigit)-0xa));
        digitsFound++;
      }
    }
    if (loopCount % 1000 == 0) {
      printf("DECRYPTING %c ", spinners[(loopCount / 1000) % 4]);
      for (digIndex = 0; digIndex < 8; digIndex++) {
        if (password[digIndex] != '_') {
          printf("%c", password[digIndex]);
        } else {
          printf("%x", (int)(((loopCount / 1000) + digIndex) % 16));
        }
      }
      printf(" %c\r", spinners[(loopCount / 1000) % 4]);
    }
    loopCount++;
    num++;
  }
  printf("DECRYPTED  ! %s !\n", password);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xe70(%rip),%rax
mov    %rax,-0x59(%rbp)
mov    0xe6e(%rip),%al
mov    %al,-0x51(%rbp)
mov    0xeb4(%rip),%eax
mov    %eax,-0x5d(%rbp)
movq   $0x0,-0xa8(%rbp)
movl   $0x0,-0xac(%rbp)
movl   $0x0,-0xb0(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11f5 <main+0x85>
mov    0x2e0a(%rip),%rax
mov    (%rax),%edi
lea    0xe2a(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2ded(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    147b <main+0x30b>
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x8,-0xb0(%rbp)
jge    145d <main+0x2ed>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1050 <memset@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    $0x1f,%edx
call   1030 <strncpy@plt>
lea    -0x50(%rbp),%rdi
mov    -0xac(%rbp),%edx
lea    0xde0(%rip),%rsi
call   1090 <sprintf@plt>
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1080 <strcat@plt>
lea    -0x30(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
call   1070 <MD5@plt>
cmpl   $0x0,-0xa0(%rbp)
jne    1327 <main+0x1b7>
cmpl   $0x0,-0x9c(%rbp)
jne    1327 <main+0x1b7>
cmpl   $0x10,-0x98(%rbp)
jge    1327 <main+0x1b7>
mov    -0x98(%rbp),%eax
mov    %eax,-0xb4(%rbp)
cmpl   $0x8,-0xb4(%rbp)
jge    1322 <main+0x1b2>
movslq -0xb4(%rbp),%rax
movsbl -0x59(%rbp,%rax,1),%eax
cmp    $0x5f,%eax
jne    1322 <main+0x1b2>
mov    -0x94(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0xb8(%rbp)
cmpl   $0xa,-0xb8(%rbp)
jge    12ee <main+0x17e>
mov    -0xb8(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0xbc(%rbp)
jmp    1300 <main+0x190>
mov    -0xb8(%rbp),%eax
sub    $0xa,%eax
add    $0x61,%eax
mov    %eax,-0xbc(%rbp)
mov    -0xbc(%rbp),%eax
mov    %al,%cl
movslq -0xb4(%rbp),%rax
mov    %cl,-0x59(%rbp,%rax,1)
mov    -0xb0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb0(%rbp)
jmp    1327 <main+0x1b7>
mov    -0xa8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    1437 <main+0x2c7>
mov    -0xa8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    $0x4,%ecx
cqto
idiv   %rcx
movsbl -0x5d(%rbp,%rdx,1),%esi
lea    0xcc1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xb4(%rbp)
cmpl   $0x8,-0xb4(%rbp)
jge    1409 <main+0x299>
movslq -0xb4(%rbp),%rax
movsbl -0x59(%rbp,%rax,1),%eax
cmp    $0x5f,%eax
je     13bb <main+0x24b>
movslq -0xb4(%rbp),%rax
movsbl -0x59(%rbp,%rax,1),%esi
lea    0xc8a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13f0 <main+0x280>
mov    -0xa8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
movslq -0xb4(%rbp),%rcx
add    %rcx,%rax
mov    $0x10,%ecx
cqto
idiv   %rcx
mov    %edx,%esi
lea    0xc53(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13f5 <main+0x285>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    137a <main+0x20a>
mov    -0xa8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    $0x4,%ecx
cqto
idiv   %rcx
movsbl -0x5d(%rbp,%rdx,1),%esi
lea    0xc0f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xa8(%rbp)
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
jmp    1203 <main+0x93>
lea    -0x59(%rbp),%rsi
lea    0xbdc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2b5a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rsi,0x18(%rsp)
movabs $0x5f5f5f5f5f5f5f5f,%rax
5f 5f 5f
mov    %rax,0x8(%rsp)
movb   $0x0,0x10(%rsp)
cmp    $0x2,%edi
jne    147d <main+0x2fd>
mov    $0xa,%edi
call   1030 <putchar@plt>
movabs $0x20c49ba5e353f7cf,%r12
9b c4 20
movl   $0x0,0x14(%rsp)
xor    %r15d,%r15d
jmp    1218 <main+0x98>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x7,%r14d
and    $0xf,%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe40(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r15
cmpl   $0x8,0x14(%rsp)
mov    %rbp,%r12
jge    149b <main+0x31b>
mov    %r15,%r14
shr    $0x3,%r14
mov    %r14,%rax
mul    %r12
shr    $0x4,%rdx
imul   $0x3e8,%rdx,%r13
lea    0x80(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1060 <memset@plt>
mov    0x18(%rsp),%rax
mov    0x8(%rax),%rsi
mov    %rbx,%rdi
mov    $0x1f,%edx
call   1040 <strncpy@plt>
lea    0x60(%rsp),%rbp
mov    %rbp,%rdi
lea    0xdbb(%rip),%rsi
mov    %r15d,%edx
call   10a0 <sprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1090 <strcat@plt>
mov    %rbx,%rdi
lea    0x20(%rsp),%rsi
call   1080 <MD5@plt>
cmpl   $0x0,0x20(%rsp)
jne    12d2 <main+0x152>
cmpl   $0x0,0x24(%rsp)
jne    12d2 <main+0x152>
mov    0x28(%rsp),%eax
cmp    $0xf,%eax
jg     12d2 <main+0x152>
cmp    $0x7,%eax
jg     12d2 <main+0x152>
cltq
cmpb   $0x5f,0x8(%rsp,%rax,1)
jne    12d2 <main+0x152>
mov    0x2c(%rsp),%ecx
mov    %ecx,%edx
shr    $0x4,%edx
lea    0x57(%rdx),%esi
add    $0x30,%edx
cmp    $0xa0,%ecx
cmovge %esi,%edx
mov    %dl,0x8(%rsp,%rax,1)
addl   $0x1,0x14(%rsp)
mov    %r14,%rax
mov    %r12,%rbp
mul    %r12
cmp    %r15,%r13
jne    1206 <main+0x86>
mov    %rdx,%r14
shr    $0x4,%r14
mov    %r14d,%eax
and    $0x3,%eax
lea    0xd5c(%rip),%rcx
movsbl (%rax,%rcx,1),%r13d
lea    0xd26(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x8(%rsp),%edi
cmp    $0x5f,%edi
jne    1340 <main+0x1c0>
mov    %r14d,%esi
and    $0xf,%esi
lea    0xd14(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    134c <main+0x1cc>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   1030 <putchar@plt>
lea    0xced(%rip),%rbx
movsbl 0x9(%rsp),%edi
cmp    $0x5f,%edi
jne    1370 <main+0x1f0>
lea    0x1(%r14),%esi
and    $0xf,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1375 <main+0x1f5>
nopl   0x0(%rax)
call   1030 <putchar@plt>
movsbl 0xa(%rsp),%edi
cmp    $0x5f,%edi
jne    13a0 <main+0x220>
lea    0x2(%r14),%esi
and    $0xf,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    13a5 <main+0x225>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
call   1030 <putchar@plt>
movsbl 0xb(%rsp),%edi
cmp    $0x5f,%edi
jne    13d0 <main+0x250>
lea    0x3(%r14),%esi
and    $0xf,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    13d5 <main+0x255>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
call   1030 <putchar@plt>
movsbl 0xc(%rsp),%edi
cmp    $0x5f,%edi
jne    1400 <main+0x280>
lea    0x4(%r14),%esi
and    $0xf,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1405 <main+0x285>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
call   1030 <putchar@plt>
movsbl 0xd(%rsp),%edi
cmp    $0x5f,%edi
jne    1430 <main+0x2b0>
lea    0x5(%r14),%esi
and    $0xf,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1435 <main+0x2b5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
call   1030 <putchar@plt>
movsbl 0xe(%rsp),%edi
cmp    $0x5f,%edi
jne    1460 <main+0x2e0>
lea    0x6(%r14),%esi
and    $0xf,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1465 <main+0x2e5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
call   1030 <putchar@plt>
movsbl 0xf(%rsp),%edi
cmp    $0x5f,%edi
je     11e0 <main+0x60>
call   1030 <putchar@plt>
jmp    11f5 <main+0x75>
mov    0x2b5c(%rip),%rax
mov    (%rax),%edi
lea    0xb7c(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2b3f(%rip),%rax
jmp    14b5 <main+0x335>
lea    0xb9f(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2b1b(%rip),%rax
mov    (%rax),%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.password = [9 x i8] c"________\00"
@__const.main.spinners = [4 x i8] c"|/-\\"
@stderr = global i32 0
@.str = [30 x i8] c"Usage:\0A\09Day5 <input string>\0A\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [15 x i8] c"DECRYPTING %c \00"
@.str.4 = [3 x i8] c"%c\00"
@.str.5 = [3 x i8] c"%x\00"
@.str.6 = [5 x i8] c" %c\0D\00"
@.str.7 = [19 x i8] c"DECRYPTED ! %s !\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [32 x i8]
%7 = alloca [32 x i8]
%8 = alloca [9 x i8]
%9 = alloca [4 x i8]
%10 = alloca [16 x i32]
%11 = alloca i64
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = bitcast [9 x i8]* %8 to i8*
%17 = bitcast [4 x i8]* %9 to i8*
store i64 0, i64* %11
store i32 0, i32* %12
store i32 0, i32* %13
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 2
br i1 %19, label %20, label %24
20: ; preds = %2
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%23 = load i32, i32* @EXIT_FAILURE
store i32 %23, i32* %3
br label %150
24: ; preds = %2
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %26
26: ; preds = %141, %24
%27 = load i32, i32* %13
%28 = icmp slt i32 %27, 8
br i1 %28, label %29, label %146
29: ; preds = %26
%30 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%31 = call i32 @memset(i8* %30, i8 signext 0, i32 32)
%32 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = call i32 @strncpy(i8* %32, i8* %35, i32 31)
%37 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%38 = load i32, i32* %12
%39 = call i32 @sprintf(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %38)
%40 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%41 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%42 = call i32 @strcat(i8* %40, i8* %41)
%43 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%44 = getelementptr inbounds [16 x i32], [16 x i32]* %10, i64 0, i64 0
%45 = call i32 @MD5(i8* %43, i32* %44)
%46 = getelementptr inbounds [16 x i32], [16 x i32]* %10, i64 0, i64 0
%47 = load i32, i32* %46
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %91
49: ; preds = %29
%50 = getelementptr inbounds [16 x i32], [16 x i32]* %10, i64 0, i64 1
%51 = load i32, i32* %50
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %91
53: ; preds = %49
%54 = getelementptr inbounds [16 x i32], [16 x i32]* %10, i64 0, i64 2
%55 = load i32, i32* %54
%56 = icmp slt i32 %55, 16
br i1 %56, label %57, label %91
57: ; preds = %53
%58 = getelementptr inbounds [16 x i32], [16 x i32]* %10, i64 0, i64 2
%59 = load i32, i32* %58
store i32 %59, i32* %14
%60 = load i32, i32* %14
%61 = icmp slt i32 %60, 8
br i1 %61, label %62, label %90
62: ; preds = %57
%63 = load i32, i32* %14
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 %64
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %67, 95
br i1 %68, label %69, label %90
69: ; preds = %62
%70 = getelementptr inbounds [16 x i32], [16 x i32]* %10, i64 0, i64 3
%71 = load i32, i32* %70
%72 = ashr i32 %71, 4
store i32 %72, i32* %15
%73 = load i32, i32* %15
%74 = icmp slt i32 %73, 10
br i1 %74, label %75, label %78
75: ; preds = %69
%76 = load i32, i32* %15
%77 = add nsw i32 48, %76
br label %82
78: ; preds = %69
%79 = load i32, i32* %15
%80 = sub nsw i32 %79, 10
%81 = add nsw i32 97, %80
br label %82
82: ; preds = %78, %75
%83 = phi i32 [ %77, %75 ], [ %81, %78 ]
%84 = trunc i32 %83 to i8
%85 = load i32, i32* %14
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 %86
store i8 %84, i8* %87
%88 = load i32, i32* %13
%89 = add nsw i32 %88, 1
store i32 %89, i32* %13
br label %90
90: ; preds = %82, %62, %57
br label %91
91: ; preds = %90, %53, %49, %29
%92 = load i64, i64* %11
%93 = srem i64 %92, 1000
%94 = icmp eq i64 %93, 0
br i1 %94, label %95, label %141
95: ; preds = %91
%96 = load i64, i64* %11
%97 = sdiv i64 %96, 1000
%98 = srem i64 %97, 4
%99 = getelementptr inbounds [4 x i8], [4 x i8]* %9, i64 0, i64 %98
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %101)
store i32 0, i32* %14
br label %103
103: ; preds = %130, %95
%104 = load i32, i32* %14
%105 = icmp slt i32 %104, 8
br i1 %105, label %106, label %133
106: ; preds = %103
%107 = load i32, i32* %14
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 %108
%110 = load i8, i8* %109
%111 = sext i8 %110 to i32
%112 = icmp ne i32 %111, 95
br i1 %112, label %113, label %120
113: ; preds = %106
%114 = load i32, i32* %14
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 %115
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %118)
br label %129
120: ; preds = %106
%121 = load i64, i64* %11
%122 = sdiv i64 %121, 1000
%123 = load i32, i32* %14
%124 = sext i32 %123 to i64
%125 = add nsw i64 %122, %124
%126 = srem i64 %125, 16
%127 = trunc i64 %126 to i32
%128 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %127)
br label %129
129: ; preds = %120, %113
br label %130
130: ; preds = %129
%131 = load i32, i32* %14
%132 = add nsw i32 %131, 1
store i32 %132, i32* %14
br label %103
133: ; preds = %103
%134 = load i64, i64* %11
%135 = sdiv i64 %134, 1000
%136 = srem i64 %135, 4
%137 = getelementptr inbounds [4 x i8], [4 x i8]* %9, i64 0, i64 %136
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %139)
br label %141
141: ; preds = %133, %91
%142 = load i64, i64* %11
%143 = add nsw i64 %142, 1
store i64 %143, i64* %11
%144 = load i32, i32* %12
%145 = add nsw i32 %144, 1
store i32 %145, i32* %12
br label %26
146: ; preds = %26
%147 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 0
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i8* %147)
%149 = load i32, i32* @EXIT_SUCCESS
store i32 %149, i32* %3
br label %150
150: ; preds = %146, %20
%151 = load i32, i32* %3
ret i32 %151
}

LLVM IR (-O2):
@__const.main.password = [9 x i8] c"________\00"
@__const.main.spinners = [4 x i8] c"|/-\\"
@stderr = global i32 0
@.str = [30 x i8] c"Usage:\0A\09Day5 <input string>\0A\0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [15 x i8] c"DECRYPTING %c \00"
@.str.5 = [3 x i8] c"%x\00"
@.str.6 = [5 x i8] c" %c\0D\00"
@.str.7 = [19 x i8] c"DECRYPTED ! %s !\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [32 x i8]
%4 = alloca [32 x i8]
%5 = alloca [9 x i8]
%6 = alloca [16 x i32]
%7 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 0
%10 = bitcast [16 x i32]* %6 to i8*
%11 = icmp eq i32 %0, 2
br i1 %11, label %15, label %12
12: ; preds = %2
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %159
15: ; preds = %2
%16 = tail call i32 @putchar(i32 10)
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = getelementptr inbounds [16 x i32], [16 x i32]* %6, i64 0, i64 0
%19 = getelementptr inbounds [16 x i32], [16 x i32]* %6, i64 0, i64 1
%20 = getelementptr inbounds [16 x i32], [16 x i32]* %6, i64 0, i64 2
%21 = getelementptr inbounds [16 x i32], [16 x i32]* %6, i64 0, i64 3
%22 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 1
%23 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 2
%24 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 3
%25 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 4
%26 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 5
%27 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 6
%28 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 7
br label %29
29: ; preds = %15, %154
%30 = phi i32 [ 0, %15 ], [ %63, %154 ]
%31 = phi i64 [ 0, %15 ], [ %155, %154 ]
%32 = trunc i64 %31 to i32
%33 = call i32 @memset(i8* %7, i8 signext 0, i32 32)
%34 = load i8*, i8** %17
%35 = call i32 @strncpy(i8* %7, i8* %34, i32 31)
%36 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %32)
%37 = call i32 @strcat(i8* %7, i8* %8)
%38 = call i32 @MD5(i8* %7, i32* %18)
%39 = load i32, i32* %18
%40 = icmp eq i32 %39, 0
%41 = load i32, i32* %19
%42 = icmp eq i32 %41, 0
%43 = select i1 %40, i1 %42, i1 false
%44 = load i32, i32* %20
%45 = icmp slt i32 %44, 16
%46 = select i1 %43, i1 %45, i1 false
%47 = icmp slt i32 %44, 8
%48 = select i1 %46, i1 %47, i1 false
br i1 %48, label %49, label %62
49: ; preds = %29
%50 = sext i32 %44 to i64
%51 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 %50
%52 = load i8, i8* %51
%53 = icmp eq i8 %52, 95
br i1 %53, label %54, label %62
54: ; preds = %49
%55 = load i32, i32* %21
%56 = lshr i32 %55, 4
%57 = icmp slt i32 %55, 160
%58 = select i1 %57, i32 48, i32 87
%59 = add nuw nsw i32 %58, %56
%60 = trunc i32 %59 to i8
store i8 %60, i8* %51
%61 = add nsw i32 %30, 1
br label %62
62: ; preds = %49, %54, %29
%63 = phi i32 [ %61, %54 ], [ %30, %49 ], [ %30, %29 ]
%64 = urem i64 %31, 1000
%65 = udiv i64 %31, 1000
%66 = icmp eq i64 %64, 0
br i1 %66, label %67, label %154
67: ; preds = %62
%68 = and i64 %65, 3
%69 = getelementptr inbounds [4 x i8], [4 x i8]* @__const.main.spinners, i64 0, i64 %68
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %71)
%73 = trunc i64 %65 to i32
%74 = load i8, i8* %9
%75 = icmp eq i8 %74, 95
br i1 %75, label %79, label %76
76: ; preds = %67
%77 = sext i8 %74 to i32
%78 = call i32 @putchar(i32 %77)
br label %82
79: ; preds = %67
%80 = and i32 %73, 15
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %80)
br label %82
82: ; preds = %76, %79
%83 = load i8, i8* %22
%84 = icmp eq i8 %83, 95
br i1 %84, label %88, label %85
85: ; preds = %82
%86 = sext i8 %83 to i32
%87 = call i32 @putchar(i32 %86)
br label %92
88: ; preds = %82
%89 = add i32 %73, 1
%90 = and i32 %89, 15
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %90)
br label %92
92: ; preds = %88, %85
%93 = load i8, i8* %23
%94 = icmp eq i8 %93, 95
br i1 %94, label %98, label %95
95: ; preds = %92
%96 = sext i8 %93 to i32
%97 = call i32 @putchar(i32 %96)
br label %102
98: ; preds = %92
%99 = add i32 %73, 2
%100 = and i32 %99, 15
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %100)
br label %102
102: ; preds = %98, %95
%103 = load i8, i8* %24
%104 = icmp eq i8 %103, 95
br i1 %104, label %108, label %105
105: ; preds = %102
%106 = sext i8 %103 to i32
%107 = call i32 @putchar(i32 %106)
br label %112
108: ; preds = %102
%109 = add i32 %73, 3
%110 = and i32 %109, 15
%111 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %110)
br label %112
112: ; preds = %108, %105
%113 = load i8, i8* %25
%114 = icmp eq i8 %113, 95
br i1 %114, label %118, label %115
115: ; preds = %112
%116 = sext i8 %113 to i32
%117 = call i32 @putchar(i32 %116)
br label %122
118: ; preds = %112
%119 = add i32 %73, 4
%120 = and i32 %119, 15
%121 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %120)
br label %122
122: ; preds = %118, %115
%123 = load i8, i8* %26
%124 = icmp eq i8 %123, 95
br i1 %124, label %128, label %125
125: ; preds = %122
%126 = sext i8 %123 to i32
%127 = call i32 @putchar(i32 %126)
br label %132
128: ; preds = %122
%129 = add i32 %73, 5
%130 = and i32 %129, 15
%131 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %130)
br label %132
132: ; preds = %128, %125
%133 = load i8, i8* %27
%134 = icmp eq i8 %133, 95
br i1 %134, label %138, label %135
135: ; preds = %132
%136 = sext i8 %133 to i32
%137 = call i32 @putchar(i32 %136)
br label %142
138: ; preds = %132
%139 = add i32 %73, 6
%140 = and i32 %139, 15
%141 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %140)
br label %142
142: ; preds = %138, %135
%143 = load i8, i8* %28
%144 = icmp eq i8 %143, 95
br i1 %144, label %148, label %145
145: ; preds = %142
%146 = sext i8 %143 to i32
%147 = call i32 @putchar(i32 %146)
br label %152
148: ; preds = %142
%149 = add i32 %73, 7
%150 = and i32 %149, 15
%151 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %150)
br label %152
152: ; preds = %148, %145
%153 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %71)
br label %154
154: ; preds = %152, %62
%155 = add nuw nsw i64 %31, 1
%156 = icmp slt i32 %63, 8
br i1 %156, label %29, label %157
157: ; preds = %154
%158 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i8* %9)
br label %159
159: ; preds = %157, %12
%160 = phi i32* [ @EXIT_FAILURE, %12 ], [ @EXIT_SUCCESS, %157 ]
%161 = load i32, i32* %160
ret i32 %161
}