#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 /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ barf(char *, char *);
int count_vector_bits(unsigned char *);
int /*<<< orphan*/ crypt(char *, char *);
int enum_hashtriplet(char, char, char);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int get_vector_bit(unsigned char *, int);
int /*<<< orphan*/ merge(unsigned char *, unsigned char *);
int /*<<< orphan*/ print_vector(unsigned char *);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(int /*<<< orphan*/, char *);
int main(int argc, char *argv[]) {
  char *pass, plain[5];
  unsigned char bin_vector1[1129], bin_vector2[1129], temp_vector[1129];
  char prob_vector1[2][9025];
  char prob_vector2[2][9025];
  int a, b, i, j, len, pv1_len = 0, pv2_len = 0;
  FILE *fd;
  if (argc < 1)
    barf("Usage: %s <password hash>  (will use the file 4char.ppm)\n", argv[0]);
  if (!(fd = fopen("4char.ppm", "r")))
    barf("Fatal: Couldn't open PPM file for reading.\n", NULL);
  pass = argv[1];
  printf("Filtering possible plaintext bytes for the first two characters:\n");
  fseek(fd,
        (16384 * 1129 * 0) + enum_hashtriplet(pass[2], pass[3], pass[4]) * 1129,
        SEEK_SET);
  fread(bin_vector1, 1129, 1, fd);
  len = count_vector_bits(bin_vector1);
  printf("only 1 vector of 4:\t%d plaintext pairs, with %0.2f%% saturation\n",
         len, len * 100.0 / 9025.0);
  fseek(fd,
        (16384 * 1129 * 1) + enum_hashtriplet(pass[4], pass[5], pass[6]) * 1129,
        SEEK_SET);
  fread(temp_vector, 1129, 1, fd);
  merge(bin_vector1, temp_vector);
  len = count_vector_bits(bin_vector1);
  printf(
      "vectors 1 AND 2 merged:\t%d plaintext pairs, with %0.2f%% saturation\n",
      len, len * 100.0 / 9025.0);
  fseek(fd,
        (16384 * 1129 * 2) + enum_hashtriplet(pass[6], pass[7], pass[8]) * 1129,
        SEEK_SET);
  fread(temp_vector, 1129, 1, fd);
  merge(bin_vector1, temp_vector);
  len = count_vector_bits(bin_vector1);
  printf(
      "first 3 vectors merged:\t%d plaintext pairs, with %0.2f%% saturation\n",
      len, len * 100.0 / 9025.0);
  fseek(fd,
        (16384 * 1129 * 3) +
            enum_hashtriplet(pass[8], pass[9], pass[10]) * 1129,
        SEEK_SET);
  fread(temp_vector, 1129, 1, fd);
  merge(bin_vector1, temp_vector);
  len = count_vector_bits(bin_vector1);
  printf("all 4 vectors merged:\t%d plaintext pairs, with %0.2f%% saturation\n",
         len, len * 100.0 / 9025.0);
  printf("Possible plaintext pairs for the first two bytes:\n");
  print_vector(bin_vector1);
  printf("\nFiltering possible plaintext bytes for the last two characters:\n");
  fseek(fd,
        (16384 * 1129 * 4) + enum_hashtriplet(pass[2], pass[3], pass[4]) * 1129,
        SEEK_SET);
  fread(bin_vector2, 1129, 1, fd);
  len = count_vector_bits(bin_vector2);
  printf("only 1 vector of 4:\t%d plaintext pairs, with %0.2f%% saturation\n",
         len, len * 100.0 / 9025.0);
  fseek(fd,
        (16384 * 1129 * 5) + enum_hashtriplet(pass[4], pass[5], pass[6]) * 1129,
        SEEK_SET);
  fread(temp_vector, 1129, 1, fd);
  merge(bin_vector2, temp_vector);
  len = count_vector_bits(bin_vector2);
  printf(
      "vectors 1 AND 2 merged:\t%d plaintext pairs, with %0.2f%% saturation\n",
      len, len * 100.0 / 9025.0);
  fseek(fd,
        (16384 * 1129 * 6) + enum_hashtriplet(pass[6], pass[7], pass[8]) * 1129,
        SEEK_SET);
  fread(temp_vector, 1129, 1, fd);
  merge(bin_vector2, temp_vector);
  len = count_vector_bits(bin_vector2);
  printf(
      "first 3 vectors merged:\t%d plaintext pairs, with %0.2f%% saturation\n",
      len, len * 100.0 / 9025.0);
  fseek(fd,
        (16384 * 1129 * 7) +
            enum_hashtriplet(pass[8], pass[9], pass[10]) * 1129,
        SEEK_SET);
  fread(temp_vector, 1129, 1, fd);
  merge(bin_vector2, temp_vector);
  len = count_vector_bits(bin_vector2);
  printf("all 4 vectors merged:\t%d plaintext pairs, with %0.2f%% saturation\n",
         len, len * 100.0 / 9025.0);
  printf("Possible plaintext pairs for the last two bytes:\n");
  print_vector(bin_vector2);
  printf("Building probability vectors...\n");
  for (i = 0; i < 9025; i++) {
    if (get_vector_bit(bin_vector1, i) == 1) {
      ;
      prob_vector1[0][pv1_len] = i / 95;
      prob_vector1[1][pv1_len] = i - (prob_vector1[0][pv1_len] * 95);
      pv1_len++;
    }
  }
  for (i = 0; i < 9025; i++) {
    if (get_vector_bit(bin_vector2, i)) {
      prob_vector2[0][pv2_len] = i / 95;
      prob_vector2[1][pv2_len] = i - (prob_vector2[0][pv2_len] * 95);
      pv2_len++;
    }
  }
  printf("Cracking remaining %d possibilites..\n", pv1_len * pv2_len);
  for (i = 0; i < pv1_len; i++) {
    for (j = 0; j < pv2_len; j++) {
      plain[0] = prob_vector1[0][i] + 32;
      plain[1] = prob_vector1[1][i] + 32;
      plain[2] = prob_vector2[0][j] + 32;
      plain[3] = prob_vector2[1][j] + 32;
      plain[4] = 0;
      if (strcmp(crypt(plain, "je"), pass) == 0) {
        printf("Password :  %s\n", plain);
        i = 31337;
        j = 31337;
      }
    }
  }
  if (i < 31337)
    printf("Password wasn't salted with 'je' or is not 4 chars long.\n");
  fclose(fd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9b00,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x9aa8(%rbp)
movl   $0x0,-0x9aac(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    121a <main+0x4a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdfb(%rip),%rdi
call   1060 <barf@plt>
lea    0xe29(%rip),%rdi
lea    0xe2c(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,-0x9ab8(%rbp)
cmp    $0x0,%rax
jne    124e <main+0x7e>
lea    0xe11(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <barf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x9ab8(%rbp),%rax
mov    %rax,-0x9af8(%rbp)
mov    -0x18(%rbp),%rax
mov    0x2(%rax),%dl
mov    -0x18(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
movsbl %dl,%edi
movsbl %cl,%esi
movsbl 0x4(%rax),%edx
call   1090 <enum_hashtriplet@plt>
mov    -0x9af8(%rbp),%rdi
imul   $0x469,%eax,%esi
add    $0x0,%esi
mov    0x2d32(%rip),%rax
mov    (%rax),%edx
call   10e0 <fseek@plt>
lea    -0x490(%rbp),%rdi
mov    -0x9ab8(%rbp),%rcx
mov    $0x469,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
lea    -0x490(%rbp),%rdi
call   1040 <count_vector_bits@plt>
mov    %eax,-0x9aa4(%rbp)
mov    -0x9aa4(%rbp),%esi
cvtsi2sdl -0x9aa4(%rbp),%xmm0
ff
movsd  0xd0e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcfa(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xdb3(%rip),%rdi
mov    $0x1,%al
call   10a0 <printf@plt>
mov    -0x9ab8(%rbp),%rax
mov    %rax,-0x9af0(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%dl
mov    -0x18(%rbp),%rax
mov    0x5(%rax),%cl
mov    -0x18(%rbp),%rax
movsbl %dl,%edi
movsbl %cl,%esi
movsbl 0x6(%rax),%edx
call   1090 <enum_hashtriplet@plt>
mov    -0x9af0(%rbp),%rdi
imul   $0x469,%eax,%esi
add    $0x11a4000,%esi
mov    0x2c7f(%rip),%rax
mov    (%rax),%edx
call   10e0 <fseek@plt>
lea    -0xd70(%rbp),%rdi
mov    -0x9ab8(%rbp),%rcx
mov    $0x469,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
lea    -0x490(%rbp),%rdi
lea    -0xd70(%rbp),%rsi
call   10c0 <merge@plt>
lea    -0x490(%rbp),%rdi
call   1040 <count_vector_bits@plt>
mov    %eax,-0x9aa4(%rbp)
mov    -0x9aa4(%rbp),%esi
cvtsi2sdl -0x9aa4(%rbp),%xmm0
ff
movsd  0xc48(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc34(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xd2e(%rip),%rdi
mov    $0x1,%al
call   10a0 <printf@plt>
mov    -0x9ab8(%rbp),%rax
mov    %rax,-0x9ae8(%rbp)
mov    -0x18(%rbp),%rax
mov    0x6(%rax),%dl
mov    -0x18(%rbp),%rax
mov    0x7(%rax),%cl
mov    -0x18(%rbp),%rax
movsbl %dl,%edi
movsbl %cl,%esi
movsbl 0x8(%rax),%edx
call   1090 <enum_hashtriplet@plt>
mov    -0x9ae8(%rbp),%rdi
imul   $0x469,%eax,%esi
add    $0x2348000,%esi
mov    0x2bb9(%rip),%rax
mov    (%rax),%edx
call   10e0 <fseek@plt>
lea    -0xd70(%rbp),%rdi
mov    -0x9ab8(%rbp),%rcx
mov    $0x469,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
lea    -0x490(%rbp),%rdi
lea    -0xd70(%rbp),%rsi
call   10c0 <merge@plt>
lea    -0x490(%rbp),%rdi
call   1040 <count_vector_bits@plt>
mov    %eax,-0x9aa4(%rbp)
mov    -0x9aa4(%rbp),%esi
cvtsi2sdl -0x9aa4(%rbp),%xmm0
ff
movsd  0xb82(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb6e(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xcad(%rip),%rdi
mov    $0x1,%al
call   10a0 <printf@plt>
mov    -0x9ab8(%rbp),%rax
mov    %rax,-0x9ae0(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%dl
mov    -0x18(%rbp),%rax
mov    0x9(%rax),%cl
mov    -0x18(%rbp),%rax
movsbl %dl,%edi
movsbl %cl,%esi
movsbl 0xa(%rax),%edx
call   1090 <enum_hashtriplet@plt>
mov    -0x9ae0(%rbp),%rdi
imul   $0x469,%eax,%esi
add    $0x34ec000,%esi
mov    0x2af3(%rip),%rax
mov    (%rax),%edx
call   10e0 <fseek@plt>
lea    -0xd70(%rbp),%rdi
mov    -0x9ab8(%rbp),%rcx
mov    $0x469,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
lea    -0x490(%rbp),%rdi
lea    -0xd70(%rbp),%rsi
call   10c0 <merge@plt>
lea    -0x490(%rbp),%rdi
call   1040 <count_vector_bits@plt>
mov    %eax,-0x9aa4(%rbp)
mov    -0x9aa4(%rbp),%esi
cvtsi2sdl -0x9aa4(%rbp),%xmm0
ff
movsd  0xabc(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xaa8(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xc2c(%rip),%rdi
mov    $0x1,%al
call   10a0 <printf@plt>
lea    0xc61(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x490(%rbp),%rdi
call   10d0 <print_vector@plt>
lea    0xc7a(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x9ab8(%rbp),%rax
mov    %rax,-0x9ad8(%rbp)
mov    -0x18(%rbp),%rax
mov    0x2(%rax),%dl
mov    -0x18(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
movsbl %dl,%edi
movsbl %cl,%esi
movsbl 0x4(%rax),%edx
call   1090 <enum_hashtriplet@plt>
mov    -0x9ad8(%rbp),%rdi
imul   $0x469,%eax,%esi
add    $0x4690000,%esi
mov    0x2a05(%rip),%rax
mov    (%rax),%edx
call   10e0 <fseek@plt>
lea    -0x900(%rbp),%rdi
mov    -0x9ab8(%rbp),%rcx
mov    $0x469,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
lea    -0x900(%rbp),%rdi
call   1040 <count_vector_bits@plt>
mov    %eax,-0x9aa4(%rbp)
mov    -0x9aa4(%rbp),%esi
cvtsi2sdl -0x9aa4(%rbp),%xmm0
ff
movsd  0x9e1(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x9cd(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xa86(%rip),%rdi
mov    $0x1,%al
call   10a0 <printf@plt>
mov    -0x9ab8(%rbp),%rax
mov    %rax,-0x9ad0(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%dl
mov    -0x18(%rbp),%rax
mov    0x5(%rax),%cl
mov    -0x18(%rbp),%rax
movsbl %dl,%edi
movsbl %cl,%esi
movsbl 0x6(%rax),%edx
call   1090 <enum_hashtriplet@plt>
mov    -0x9ad0(%rbp),%rdi
imul   $0x469,%eax,%esi
add    $0x5834000,%esi
mov    0x2952(%rip),%rax
mov    (%rax),%edx
call   10e0 <fseek@plt>
lea    -0xd70(%rbp),%rdi
mov    -0x9ab8(%rbp),%rcx
mov    $0x469,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
lea    -0x900(%rbp),%rdi
lea    -0xd70(%rbp),%rsi
call   10c0 <merge@plt>
lea    -0x900(%rbp),%rdi
call   1040 <count_vector_bits@plt>
mov    %eax,-0x9aa4(%rbp)
mov    -0x9aa4(%rbp),%esi
cvtsi2sdl -0x9aa4(%rbp),%xmm0
ff
movsd  0x91b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x907(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xa01(%rip),%rdi
mov    $0x1,%al
call   10a0 <printf@plt>
mov    -0x9ab8(%rbp),%rax
mov    %rax,-0x9ac8(%rbp)
mov    -0x18(%rbp),%rax
mov    0x6(%rax),%dl
mov    -0x18(%rbp),%rax
mov    0x7(%rax),%cl
mov    -0x18(%rbp),%rax
movsbl %dl,%edi
movsbl %cl,%esi
movsbl 0x8(%rax),%edx
call   1090 <enum_hashtriplet@plt>
mov    -0x9ac8(%rbp),%rdi
imul   $0x469,%eax,%esi
add    $0x69d8000,%esi
mov    0x288c(%rip),%rax
mov    (%rax),%edx
call   10e0 <fseek@plt>
lea    -0xd70(%rbp),%rdi
mov    -0x9ab8(%rbp),%rcx
mov    $0x469,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
lea    -0x900(%rbp),%rdi
lea    -0xd70(%rbp),%rsi
call   10c0 <merge@plt>
lea    -0x900(%rbp),%rdi
call   1040 <count_vector_bits@plt>
mov    %eax,-0x9aa4(%rbp)
mov    -0x9aa4(%rbp),%esi
cvtsi2sdl -0x9aa4(%rbp),%xmm0
ff
movsd  0x855(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x841(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0x980(%rip),%rdi
mov    $0x1,%al
call   10a0 <printf@plt>
mov    -0x9ab8(%rbp),%rax
mov    %rax,-0x9ac0(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%dl
mov    -0x18(%rbp),%rax
mov    0x9(%rax),%cl
mov    -0x18(%rbp),%rax
movsbl %dl,%edi
movsbl %cl,%esi
movsbl 0xa(%rax),%edx
call   1090 <enum_hashtriplet@plt>
mov    -0x9ac0(%rbp),%rdi
imul   $0x469,%eax,%esi
add    $0x7b7c000,%esi
mov    0x27c6(%rip),%rax
mov    (%rax),%edx
call   10e0 <fseek@plt>
lea    -0xd70(%rbp),%rdi
mov    -0x9ab8(%rbp),%rcx
mov    $0x469,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
lea    -0x900(%rbp),%rdi
lea    -0xd70(%rbp),%rsi
call   10c0 <merge@plt>
lea    -0x900(%rbp),%rdi
call   1040 <count_vector_bits@plt>
mov    %eax,-0x9aa4(%rbp)
mov    -0x9aa4(%rbp),%esi
cvtsi2sdl -0x9aa4(%rbp),%xmm0
ff
movsd  0x78f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x77b(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0x8ff(%rip),%rdi
mov    $0x1,%al
call   10a0 <printf@plt>
lea    0x9a9(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x900(%rbp),%rdi
call   10d0 <print_vector@plt>
lea    0x9c1(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x0,-0x9a9c(%rbp)
cmpl   $0x2341,-0x9a9c(%rbp)
jge    1964 <main+0x794>
lea    -0x490(%rbp),%rdi
mov    -0x9a9c(%rbp),%esi
call   1030 <get_vector_bit@plt>
cmp    $0x1,%eax
jne    194b <main+0x77b>
mov    -0x9a9c(%rbp),%eax
mov    $0x5f,%ecx
cltd
idiv   %ecx
mov    %al,%cl
movslq -0x9aa8(%rbp),%rax
mov    %cl,-0x5400(%rbp,%rax,1)
mov    -0x9a9c(%rbp),%eax
movslq -0x9aa8(%rbp),%rcx
movsbl -0x5400(%rbp,%rcx,1),%ecx
ff
imul   $0x5f,%ecx,%ecx
sub    %ecx,%eax
mov    %al,%cl
movslq -0x9aa8(%rbp),%rax
mov    %cl,-0x30bf(%rbp,%rax,1)
mov    -0x9aa8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9aa8(%rbp)
jmp    1950 <main+0x780>
mov    -0x9a9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9a9c(%rbp)
jmp    18c9 <main+0x6f9>
movl   $0x0,-0x9a9c(%rbp)
cmpl   $0x2341,-0x9a9c(%rbp)
jge    1a09 <main+0x839>
lea    -0x900(%rbp),%rdi
mov    -0x9a9c(%rbp),%esi
call   1030 <get_vector_bit@plt>
cmp    $0x0,%eax
je     19f0 <main+0x820>
mov    -0x9a9c(%rbp),%eax
mov    $0x5f,%ecx
cltd
idiv   %ecx
mov    %al,%cl
movslq -0x9aac(%rbp),%rax
mov    %cl,-0x9a90(%rbp,%rax,1)
mov    -0x9a9c(%rbp),%eax
movslq -0x9aac(%rbp),%rcx
movsbl -0x9a90(%rbp,%rcx,1),%ecx
ff
imul   $0x5f,%ecx,%ecx
sub    %ecx,%eax
mov    %al,%cl
movslq -0x9aac(%rbp),%rax
mov    %cl,-0x774f(%rbp,%rax,1)
mov    -0x9aac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9aac(%rbp)
jmp    19f5 <main+0x825>
mov    -0x9a9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9a9c(%rbp)
jmp    196e <main+0x79e>
mov    -0x9aa8(%rbp),%esi
imul   -0x9aac(%rbp),%esi
lea    0x87d(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x0,-0x9a9c(%rbp)
mov    -0x9a9c(%rbp),%eax
cmp    -0x9aa8(%rbp),%eax
jge    1b31 <main+0x961>
movl   $0x0,-0x9aa0(%rbp)
mov    -0x9aa0(%rbp),%eax
cmp    -0x9aac(%rbp),%eax
jge    1b18 <main+0x948>
movslq -0x9a9c(%rbp),%rax
movsbl -0x5400(%rbp,%rax,1),%eax
ff
add    $0x20,%eax
mov    %al,-0x1d(%rbp)
movslq -0x9a9c(%rbp),%rax
movsbl -0x30bf(%rbp,%rax,1),%eax
ff
add    $0x20,%eax
mov    %al,-0x1c(%rbp)
movslq -0x9aa0(%rbp),%rax
movsbl -0x9a90(%rbp,%rax,1),%eax
ff
add    $0x20,%eax
mov    %al,-0x1b(%rbp)
movslq -0x9aa0(%rbp),%rax
movsbl -0x774f(%rbp,%rax,1),%eax
ff
add    $0x20,%eax
mov    %al,-0x1a(%rbp)
movb   $0x0,-0x19(%rbp)
lea    -0x1d(%rbp),%rdi
lea    0x801(%rip),%rsi
call   1070 <crypt@plt>
mov    %eax,%edi
mov    -0x18(%rbp),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    1aff <main+0x92f>
lea    -0x1d(%rbp),%rsi
lea    0x7df(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x7a69,-0x9a9c(%rbp)
movl   $0x7a69,-0x9aa0(%rbp)
jmp    1b04 <main+0x934>
mov    -0x9aa0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9aa0(%rbp)
jmp    1a4a <main+0x87a>
jmp    1b1d <main+0x94d>
mov    -0x9a9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9a9c(%rbp)
jmp    1a2e <main+0x85e>
cmpl   $0x7a69,-0x9a9c(%rbp)
jge    1b4f <main+0x97f>
lea    0x78b(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x9ab8(%rbp),%rdi
call   1080 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x9b00,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x9a88,%rsp
mov    %rsi,%rbx
test   %edi,%edi
jg     1207 <main+0x27>
mov    (%rbx),%rsi
lea    0xe0e(%rip),%rdi
call   1070 <barf@plt>
lea    0xe3c(%rip),%rdi
lea    0xe3f(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,%r12
test   %rax,%rax
jne    1230 <main+0x50>
lea    0xe2d(%rip),%rdi
xor    %esi,%esi
call   1070 <barf@plt>
mov    0x8(%rbx),%r14
lea    0xf8e(%rip),%rdi
call   1050 <puts@plt>
movsbl 0x2(%r14),%edi
movsbl 0x3(%r14),%esi
movsbl 0x4(%r14),%edx
call   10a0 <enum_hashtriplet@plt>
imul   $0x469,%eax,%esi
mov    0x2d7f(%rip),%rbx
mov    (%rbx),%edx
mov    %r12,%rdi
call   10f0 <fseek@plt>
lea    0x900(%rsp),%r13
mov    %r13,%rdi
mov    $0x469,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1060 <fread@plt>
mov    %r13,%rdi
call   1040 <count_vector_bits@plt>
cvtsi2sd %eax,%xmm0
mulsd  0xd64(%rip),%xmm0
divsd  0xd64(%rip),%xmm0
lea    0xdd7(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   10b0 <printf@plt>
movsbl 0x4(%r14),%edi
movsbl 0x5(%r14),%esi
movsbl 0x6(%r14),%edx
call   10a0 <enum_hashtriplet@plt>
imul   $0x469,%eax,%esi
add    $0x11a4000,%esi
mov    (%rbx),%edx
mov    %r12,%rdi
call   10f0 <fseek@plt>
lea    0x490(%rsp),%r15
mov    %r15,%rdi
mov    $0x469,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1060 <fread@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   10d0 <merge@plt>
mov    %r13,%rdi
call   1040 <count_vector_bits@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xce3(%rip),%xmm0
divsd  0xce3(%rip),%xmm0
lea    0xd97(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   10b0 <printf@plt>
movsbl 0x6(%r14),%edi
movsbl 0x7(%r14),%esi
movsbl 0x8(%r14),%edx
call   10a0 <enum_hashtriplet@plt>
imul   $0x469,%eax,%esi
add    $0x2348000,%esi
mov    (%rbx),%edx
mov    %r12,%rdi
call   10f0 <fseek@plt>
mov    %r15,%rdi
mov    $0x469,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1060 <fread@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   10d0 <merge@plt>
mov    %r13,%rdi
call   1040 <count_vector_bits@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xc6a(%rip),%xmm0
divsd  0xc6a(%rip),%xmm0
lea    0xd63(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   10b0 <printf@plt>
movsbl 0x8(%r14),%edi
movsbl 0x9(%r14),%esi
movsbl 0xa(%r14),%edx
call   10a0 <enum_hashtriplet@plt>
imul   $0x469,%eax,%esi
add    $0x34ec000,%esi
mov    (%rbx),%edx
mov    %r12,%rdi
call   10f0 <fseek@plt>
mov    %r15,%rdi
mov    $0x469,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1060 <fread@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   10d0 <merge@plt>
mov    %r13,%rdi
call   1040 <count_vector_bits@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xbf1(%rip),%xmm0
divsd  0xbf1(%rip),%xmm0
lea    0xd2f(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   10b0 <printf@plt>
lea    0xddc(%rip),%rdi
call   1050 <puts@plt>
mov    %r13,%rdi
call   10e0 <print_vector@plt>
lea    0xdfa(%rip),%rdi
call   1050 <puts@plt>
movsbl 0x2(%r14),%edi
movsbl 0x3(%r14),%esi
movsbl 0x4(%r14),%edx
call   10a0 <enum_hashtriplet@plt>
imul   $0x469,%eax,%esi
add    $0x4690000,%esi
mov    (%rbx),%edx
mov    %r12,%rdi
call   10f0 <fseek@plt>
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x469,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1060 <fread@plt>
mov    %rbp,%rdi
call   1040 <count_vector_bits@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xb5e(%rip),%xmm0
divsd  0xb5e(%rip),%xmm0
lea    0xbd1(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   10b0 <printf@plt>
movsbl 0x4(%r14),%edi
movsbl 0x5(%r14),%esi
movsbl 0x6(%r14),%edx
call   10a0 <enum_hashtriplet@plt>
imul   $0x469,%eax,%esi
add    $0x5834000,%esi
mov    (%rbx),%edx
mov    %r12,%rdi
call   10f0 <fseek@plt>
mov    %r15,%rdi
mov    $0x469,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1060 <fread@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
call   10d0 <merge@plt>
mov    %rbp,%rdi
call   1040 <count_vector_bits@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xae5(%rip),%xmm0
divsd  0xae5(%rip),%xmm0
lea    0xb99(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   10b0 <printf@plt>
movsbl 0x6(%r14),%edi
movsbl 0x7(%r14),%esi
movsbl 0x8(%r14),%edx
call   10a0 <enum_hashtriplet@plt>
imul   $0x469,%eax,%esi
add    $0x69d8000,%esi
mov    (%rbx),%edx
mov    %r12,%rdi
call   10f0 <fseek@plt>
mov    %r15,%rdi
mov    $0x469,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1060 <fread@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %r15,%rbx
call   10d0 <merge@plt>
mov    %rbp,%rdi
call   1040 <count_vector_bits@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xa69(%rip),%xmm0
divsd  0xa69(%rip),%xmm0
lea    0xb62(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   10b0 <printf@plt>
movsbl 0x8(%r14),%edi
movsbl 0x9(%r14),%esi
mov    %r14,%r15
movsbl 0xa(%r14),%edx
call   10a0 <enum_hashtriplet@plt>
imul   $0x469,%eax,%esi
add    $0x7b7c000,%esi
mov    0x2a07(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
call   10f0 <fseek@plt>
mov    %rbx,%rdi
mov    $0x469,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1060 <fread@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   10d0 <merge@plt>
mov    %rbp,%rdi
call   1040 <count_vector_bits@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x9e6(%rip),%xmm0
divsd  0x9e6(%rip),%xmm0
lea    0xb24(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   10b0 <printf@plt>
lea    0xc44(%rip),%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
call   10e0 <print_vector@plt>
lea    0xc61(%rip),%rdi
call   1050 <puts@plt>
xor    %ebx,%ebx
xor    %ebp,%ebp
jmp    166b <main+0x48b>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
cmp    $0x2341,%ebx
je     16bc <main+0x4dc>
mov    %r13,%rdi
mov    %ebx,%esi
call   1030 <get_vector_bit@plt>
cmp    $0x1,%eax
jne    1660 <main+0x480>
mov    %ebx,%eax
imul   $0x58ed2309,%rax,%rax
shr    $0x20,%rax
mov    %ebx,%ecx
sub    %eax,%ecx
shr    %ecx
add    %eax,%ecx
shr    $0x6,%ecx
imul   $0xffffffa1,%ecx,%eax
movzbl %al,%eax
movzwl %bx,%ecx
imul   $0xac77,%ecx,%ecx
shr    $0x16,%ecx
movslq %ebp,%rbp
mov    %cl,0x5400(%rsp,%rbp,1)
add    %ebx,%eax
mov    %al,0x7741(%rsp,%rbp,1)
add    $0x1,%ebp
jmp    1660 <main+0x480>
mov    %rbp,0x10(%rsp)
mov    %r12,0x18(%rsp)
xor    %ebx,%ebx
lea    0x20(%rsp),%rbp
xor    %r14d,%r14d
jmp    16eb <main+0x50b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x2341,%ebx
je     173e <main+0x55e>
mov    %rbp,%rdi
mov    %ebx,%esi
call   1030 <get_vector_bit@plt>
test   %eax,%eax
je     16e0 <main+0x500>
mov    %ebx,%eax
imul   $0x58ed2309,%rax,%rax
shr    $0x20,%rax
mov    %ebx,%ecx
sub    %eax,%ecx
shr    %ecx
add    %eax,%ecx
shr    $0x6,%ecx
imul   $0xffffffa1,%ecx,%eax
movzbl %al,%eax
movzwl %bx,%ecx
imul   $0xac77,%ecx,%ecx
shr    $0x16,%ecx
movslq %r14d,%r14
mov    %cl,0xd70(%rsp,%r14,1)
add    %ebx,%eax
mov    %al,0x30b1(%rsp,%r14,1)
add    $0x1,%r14d
jmp    16e0 <main+0x500>
mov    %r14d,%esi
mov    0x10(%rsp),%rbx
imul   %ebx,%esi
lea    0xa40(%rip),%rdi
xor    %eax,%eax
call   10b0 <printf@plt>
test   %ebx,%ebx
jle    1823 <main+0x643>
lea    0xa50(%rip),%rbp
lea    0xb(%rsp),%rbx
xor    %eax,%eax
jmp    1781 <main+0x5a1>
nop
mov    %eax,%r13d
lea    0x1(%r13),%eax
cmp    0x10(%rsp),%eax
jge    181a <main+0x63a>
test   %r14d,%r14d
jle    1770 <main+0x590>
xor    %r12d,%r12d
mov    %eax,%r13d
jmp    1799 <main+0x5b9>
xchg   %ax,%ax
add    $0x1,%r12d
cmp    %r14d,%r12d
jge    1773 <main+0x593>
movslq %r13d,%rax
movzbl 0x5400(%rsp,%rax,1),%ecx
add    $0x20,%cl
mov    %cl,0xb(%rsp)
movzbl 0x7741(%rsp,%rax,1),%eax
add    $0x20,%al
mov    %al,0xc(%rsp)
movslq %r12d,%rax
movzbl 0xd70(%rsp,%rax,1),%ecx
add    $0x20,%cl
mov    %cl,0xd(%rsp)
movzbl 0x30b1(%rsp,%rax,1),%eax
add    $0x20,%al
mov    %al,0xe(%rsp)
movb   $0x0,0xf(%rsp)
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1080 <crypt@plt>
mov    %eax,%edi
mov    %r15,%rsi
call   10c0 <strcmp@plt>
test   %rax,%rax
jne    1790 <main+0x5b0>
lea    0x9ba(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10b0 <printf@plt>
mov    $0x7a69,%r12d
mov    $0x7a69,%r13d
jmp    1790 <main+0x5b0>
cmp    $0x7a67,%r13d
jg     182f <main+0x64f>
lea    0xaa4(%rip),%rdi
call   1050 <puts@plt>
mov    0x18(%rsp),%rdi
call   1090 <fclose@plt>
xor    %eax,%eax
add    $0x9a88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [58 x i8] c"Usage: %s <password hash> (will use the file 4char.ppm)\0A\00"
@.str.1 = [10 x i8] c"4char.ppm\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [44 x i8] c"Fatal: Couldn't open PPM file for reading.\0A\00"
@.str.4 = [66 x i8] c"Filtering possible plaintext bytes for the first two characters:\0A\00"
@SEEK_SET = global i32 0
@.str.5 = [65 x i8] c"only 1 vector of 4:\09%d plaintext pairs, with %0.2f%% saturation\0A\00"
@.str.6 = [69 x i8] c"vectors 1 AND 2 merged:\09%d plaintext pairs, with %0.2f%% saturation\0A\00"
@.str.7 = [69 x i8] c"first 3 vectors merged:\09%d plaintext pairs, with %0.2f%% saturation\0A\00"
@.str.8 = [67 x i8] c"all 4 vectors merged:\09%d plaintext pairs, with %0.2f%% saturation\0A\00"
@.str.9 = [51 x i8] c"Possible plaintext pairs for the first two bytes:\0A\00"
@.str.10 = [66 x i8] c"\0AFiltering possible plaintext bytes for the last two characters:\0A\00"
@.str.11 = [50 x i8] c"Possible plaintext pairs for the last two bytes:\0A\00"
@.str.12 = [33 x i8] c"Building probability vectors...\0A\00"
@.str.13 = [38 x i8] c"Cracking remaining %d possibilites..\0A\00"
@.str.14 = [3 x i8] c"je\00"
@.str.15 = [16 x i8] c"Password : %s\0A\00"
@.str.16 = [58 x i8] c"Password wasn't salted with 'je' or is not 4 chars long.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca [5 x i8]
%8 = alloca [1129 x i8]
%9 = alloca [1129 x i8]
%10 = alloca [1129 x i8]
%11 = alloca [2 x [9025 x i8]]
%12 = alloca [2 x [9025 x i8]]
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %18
store i32 0, i32* %19
%21 = load i32, i32* %4
%22 = icmp slt i32 %21, 1
br i1 %22, label %23, label %28
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 0
%26 = load i8*, i8** %25
%27 = call i32 @barf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %26)
br label %28
28: ; preds = %23, %2
%29 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %29, i32** %20
%30 = icmp ne i32* %29, null
br i1 %30, label %33, label %31
31: ; preds = %28
%32 = call i32 @barf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i8* null)
br label %33
33: ; preds = %31, %28
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = load i8*, i8** %35
store i8* %36, i8** %6
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%38 = load i32*, i32** %20
%39 = load i8*, i8** %6
%40 = getelementptr inbounds i8, i8* %39, i64 2
%41 = load i8, i8* %40
%42 = load i8*, i8** %6
%43 = getelementptr inbounds i8, i8* %42, i64 3
%44 = load i8, i8* %43
%45 = load i8*, i8** %6
%46 = getelementptr inbounds i8, i8* %45, i64 4
%47 = load i8, i8* %46
%48 = call i32 @enum_hashtriplet(i8 signext %41, i8 signext %44, i8 signext %47)
%49 = mul nsw i32 %48, 1129
%50 = add nsw i32 0, %49
%51 = load i32, i32* @SEEK_SET
%52 = call i32 @fseek(i32* %38, i32 %50, i32 %51)
%53 = getelementptr inbounds [1129 x i8], [1129 x i8]* %8, i64 0, i64 0
%54 = load i32*, i32** %20
%55 = call i32 @fread(i8* %53, i32 1129, i32 1, i32* %54)
%56 = getelementptr inbounds [1129 x i8], [1129 x i8]* %8, i64 0, i64 0
%57 = call i32 @count_vector_bits(i8* %56)
store i32 %57, i32* %17
%58 = load i32, i32* %17
%59 = load i32, i32* %17
%60 = sitofp i32 %59 to double
%61 = fmul double %60, 1.000000e+02
%62 = fdiv double %61, 9.025000e+03
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0), i32 %58, double %62)
%64 = load i32*, i32** %20
%65 = load i8*, i8** %6
%66 = getelementptr inbounds i8, i8* %65, i64 4
%67 = load i8, i8* %66
%68 = load i8*, i8** %6
%69 = getelementptr inbounds i8, i8* %68, i64 5
%70 = load i8, i8* %69
%71 = load i8*, i8** %6
%72 = getelementptr inbounds i8, i8* %71, i64 6
%73 = load i8, i8* %72
%74 = call i32 @enum_hashtriplet(i8 signext %67, i8 signext %70, i8 signext %73)
%75 = mul nsw i32 %74, 1129
%76 = add nsw i32 18497536, %75
%77 = load i32, i32* @SEEK_SET
%78 = call i32 @fseek(i32* %64, i32 %76, i32 %77)
%79 = getelementptr inbounds [1129 x i8], [1129 x i8]* %10, i64 0, i64 0
%80 = load i32*, i32** %20
%81 = call i32 @fread(i8* %79, i32 1129, i32 1, i32* %80)
%82 = getelementptr inbounds [1129 x i8], [1129 x i8]* %8, i64 0, i64 0
%83 = getelementptr inbounds [1129 x i8], [1129 x i8]* %10, i64 0, i64 0
%84 = call i32 @merge(i8* %82, i8* %83)
%85 = getelementptr inbounds [1129 x i8], [1129 x i8]* %8, i64 0, i64 0
%86 = call i32 @count_vector_bits(i8* %85)
store i32 %86, i32* %17
%87 = load i32, i32* %17
%88 = load i32, i32* %17
%89 = sitofp i32 %88 to double
%90 = fmul double %89, 1.000000e+02
%91 = fdiv double %90, 9.025000e+03
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0), i32 %87, double %91)
%93 = load i32*, i32** %20
%94 = load i8*, i8** %6
%95 = getelementptr inbounds i8, i8* %94, i64 6
%96 = load i8, i8* %95
%97 = load i8*, i8** %6
%98 = getelementptr inbounds i8, i8* %97, i64 7
%99 = load i8, i8* %98
%100 = load i8*, i8** %6
%101 = getelementptr inbounds i8, i8* %100, i64 8
%102 = load i8, i8* %101
%103 = call i32 @enum_hashtriplet(i8 signext %96, i8 signext %99, i8 signext %102)
%104 = mul nsw i32 %103, 1129
%105 = add nsw i32 36995072, %104
%106 = load i32, i32* @SEEK_SET
%107 = call i32 @fseek(i32* %93, i32 %105, i32 %106)
%108 = getelementptr inbounds [1129 x i8], [1129 x i8]* %10, i64 0, i64 0
%109 = load i32*, i32** %20
%110 = call i32 @fread(i8* %108, i32 1129, i32 1, i32* %109)
%111 = getelementptr inbounds [1129 x i8], [1129 x i8]* %8, i64 0, i64 0
%112 = getelementptr inbounds [1129 x i8], [1129 x i8]* %10, i64 0, i64 0
%113 = call i32 @merge(i8* %111, i8* %112)
%114 = getelementptr inbounds [1129 x i8], [1129 x i8]* %8, i64 0, i64 0
%115 = call i32 @count_vector_bits(i8* %114)
store i32 %115, i32* %17
%116 = load i32, i32* %17
%117 = load i32, i32* %17
%118 = sitofp i32 %117 to double
%119 = fmul double %118, 1.000000e+02
%120 = fdiv double %119, 9.025000e+03
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.7, i64 0, i64 0), i32 %116, double %120)
%122 = load i32*, i32** %20
%123 = load i8*, i8** %6
%124 = getelementptr inbounds i8, i8* %123, i64 8
%125 = load i8, i8* %124
%126 = load i8*, i8** %6
%127 = getelementptr inbounds i8, i8* %126, i64 9
%128 = load i8, i8* %127
%129 = load i8*, i8** %6
%130 = getelementptr inbounds i8, i8* %129, i64 10
%131 = load i8, i8* %130
%132 = call i32 @enum_hashtriplet(i8 signext %125, i8 signext %128, i8 signext %131)
%133 = mul nsw i32 %132, 1129
%134 = add nsw i32 55492608, %133
%135 = load i32, i32* @SEEK_SET
%136 = call i32 @fseek(i32* %122, i32 %134, i32 %135)
%137 = getelementptr inbounds [1129 x i8], [1129 x i8]* %10, i64 0, i64 0
%138 = load i32*, i32** %20
%139 = call i32 @fread(i8* %137, i32 1129, i32 1, i32* %138)
%140 = getelementptr inbounds [1129 x i8], [1129 x i8]* %8, i64 0, i64 0
%141 = getelementptr inbounds [1129 x i8], [1129 x i8]* %10, i64 0, i64 0
%142 = call i32 @merge(i8* %140, i8* %141)
%143 = getelementptr inbounds [1129 x i8], [1129 x i8]* %8, i64 0, i64 0
%144 = call i32 @count_vector_bits(i8* %143)
store i32 %144, i32* %17
%145 = load i32, i32* %17
%146 = load i32, i32* %17
%147 = sitofp i32 %146 to double
%148 = fmul double %147, 1.000000e+02
%149 = fdiv double %148, 9.025000e+03
%150 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.8, i64 0, i64 0), i32 %145, double %149)
%151 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0))
%152 = getelementptr inbounds [1129 x i8], [1129 x i8]* %8, i64 0, i64 0
%153 = call i32 @print_vector(i8* %152)
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0))
%155 = load i32*, i32** %20
%156 = load i8*, i8** %6
%157 = getelementptr inbounds i8, i8* %156, i64 2
%158 = load i8, i8* %157
%159 = load i8*, i8** %6
%160 = getelementptr inbounds i8, i8* %159, i64 3
%161 = load i8, i8* %160
%162 = load i8*, i8** %6
%163 = getelementptr inbounds i8, i8* %162, i64 4
%164 = load i8, i8* %163
%165 = call i32 @enum_hashtriplet(i8 signext %158, i8 signext %161, i8 signext %164)
%166 = mul nsw i32 %165, 1129
%167 = add nsw i32 73990144, %166
%168 = load i32, i32* @SEEK_SET
%169 = call i32 @fseek(i32* %155, i32 %167, i32 %168)
%170 = getelementptr inbounds [1129 x i8], [1129 x i8]* %9, i64 0, i64 0
%171 = load i32*, i32** %20
%172 = call i32 @fread(i8* %170, i32 1129, i32 1, i32* %171)
%173 = getelementptr inbounds [1129 x i8], [1129 x i8]* %9, i64 0, i64 0
%174 = call i32 @count_vector_bits(i8* %173)
store i32 %174, i32* %17
%175 = load i32, i32* %17
%176 = load i32, i32* %17
%177 = sitofp i32 %176 to double
%178 = fmul double %177, 1.000000e+02
%179 = fdiv double %178, 9.025000e+03
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0), i32 %175, double %179)
%181 = load i32*, i32** %20
%182 = load i8*, i8** %6
%183 = getelementptr inbounds i8, i8* %182, i64 4
%184 = load i8, i8* %183
%185 = load i8*, i8** %6
%186 = getelementptr inbounds i8, i8* %185, i64 5
%187 = load i8, i8* %186
%188 = load i8*, i8** %6
%189 = getelementptr inbounds i8, i8* %188, i64 6
%190 = load i8, i8* %189
%191 = call i32 @enum_hashtriplet(i8 signext %184, i8 signext %187, i8 signext %190)
%192 = mul nsw i32 %191, 1129
%193 = add nsw i32 92487680, %192
%194 = load i32, i32* @SEEK_SET
%195 = call i32 @fseek(i32* %181, i32 %193, i32 %194)
%196 = getelementptr inbounds [1129 x i8], [1129 x i8]* %10, i64 0, i64 0
%197 = load i32*, i32** %20
%198 = call i32 @fread(i8* %196, i32 1129, i32 1, i32* %197)
%199 = getelementptr inbounds [1129 x i8], [1129 x i8]* %9, i64 0, i64 0
%200 = getelementptr inbounds [1129 x i8], [1129 x i8]* %10, i64 0, i64 0
%201 = call i32 @merge(i8* %199, i8* %200)
%202 = getelementptr inbounds [1129 x i8], [1129 x i8]* %9, i64 0, i64 0
%203 = call i32 @count_vector_bits(i8* %202)
store i32 %203, i32* %17
%204 = load i32, i32* %17
%205 = load i32, i32* %17
%206 = sitofp i32 %205 to double
%207 = fmul double %206, 1.000000e+02
%208 = fdiv double %207, 9.025000e+03
%209 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0), i32 %204, double %208)
%210 = load i32*, i32** %20
%211 = load i8*, i8** %6
%212 = getelementptr inbounds i8, i8* %211, i64 6
%213 = load i8, i8* %212
%214 = load i8*, i8** %6
%215 = getelementptr inbounds i8, i8* %214, i64 7
%216 = load i8, i8* %215
%217 = load i8*, i8** %6
%218 = getelementptr inbounds i8, i8* %217, i64 8
%219 = load i8, i8* %218
%220 = call i32 @enum_hashtriplet(i8 signext %213, i8 signext %216, i8 signext %219)
%221 = mul nsw i32 %220, 1129
%222 = add nsw i32 110985216, %221
%223 = load i32, i32* @SEEK_SET
%224 = call i32 @fseek(i32* %210, i32 %222, i32 %223)
%225 = getelementptr inbounds [1129 x i8], [1129 x i8]* %10, i64 0, i64 0
%226 = load i32*, i32** %20
%227 = call i32 @fread(i8* %225, i32 1129, i32 1, i32* %226)
%228 = getelementptr inbounds [1129 x i8], [1129 x i8]* %9, i64 0, i64 0
%229 = getelementptr inbounds [1129 x i8], [1129 x i8]* %10, i64 0, i64 0
%230 = call i32 @merge(i8* %228, i8* %229)
%231 = getelementptr inbounds [1129 x i8], [1129 x i8]* %9, i64 0, i64 0
%232 = call i32 @count_vector_bits(i8* %231)
store i32 %232, i32* %17
%233 = load i32, i32* %17
%234 = load i32, i32* %17
%235 = sitofp i32 %234 to double
%236 = fmul double %235, 1.000000e+02
%237 = fdiv double %236, 9.025000e+03
%238 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.7, i64 0, i64 0), i32 %233, double %237)
%239 = load i32*, i32** %20
%240 = load i8*, i8** %6
%241 = getelementptr inbounds i8, i8* %240, i64 8
%242 = load i8, i8* %241
%243 = load i8*, i8** %6
%244 = getelementptr inbounds i8, i8* %243, i64 9
%245 = load i8, i8* %244
%246 = load i8*, i8** %6
%247 = getelementptr inbounds i8, i8* %246, i64 10
%248 = load i8, i8* %247
%249 = call i32 @enum_hashtriplet(i8 signext %242, i8 signext %245, i8 signext %248)
%250 = mul nsw i32 %249, 1129
%251 = add nsw i32 129482752, %250
%252 = load i32, i32* @SEEK_SET
%253 = call i32 @fseek(i32* %239, i32 %251, i32 %252)
%254 = getelementptr inbounds [1129 x i8], [1129 x i8]* %10, i64 0, i64 0
%255 = load i32*, i32** %20
%256 = call i32 @fread(i8* %254, i32 1129, i32 1, i32* %255)
%257 = getelementptr inbounds [1129 x i8], [1129 x i8]* %9, i64 0, i64 0
%258 = getelementptr inbounds [1129 x i8], [1129 x i8]* %10, i64 0, i64 0
%259 = call i32 @merge(i8* %257, i8* %258)
%260 = getelementptr inbounds [1129 x i8], [1129 x i8]* %9, i64 0, i64 0
%261 = call i32 @count_vector_bits(i8* %260)
store i32 %261, i32* %17
%262 = load i32, i32* %17
%263 = load i32, i32* %17
%264 = sitofp i32 %263 to double
%265 = fmul double %264, 1.000000e+02
%266 = fdiv double %265, 9.025000e+03
%267 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.8, i64 0, i64 0), i32 %262, double %266)
%268 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0))
%269 = getelementptr inbounds [1129 x i8], [1129 x i8]* %9, i64 0, i64 0
%270 = call i32 @print_vector(i8* %269)
%271 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0))
store i32 0, i32* %15
br label %272
272: ; preds = %305, %33
%273 = load i32, i32* %15
%274 = icmp slt i32 %273, 9025
br i1 %274, label %275, label %308
275: ; preds = %272
%276 = getelementptr inbounds [1129 x i8], [1129 x i8]* %8, i64 0, i64 0
%277 = load i32, i32* %15
%278 = call i32 @get_vector_bit(i8* %276, i32 %277)
%279 = icmp eq i32 %278, 1
br i1 %279, label %280, label %304
280: ; preds = %275
%281 = load i32, i32* %15
%282 = sdiv i32 %281, 95
%283 = trunc i32 %282 to i8
%284 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %11, i64 0, i64 0
%285 = load i32, i32* %18
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds [9025 x i8], [9025 x i8]* %284, i64 0, i64 %286
store i8 %283, i8* %287
%288 = load i32, i32* %15
%289 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %11, i64 0, i64 0
%290 = load i32, i32* %18
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds [9025 x i8], [9025 x i8]* %289, i64 0, i64 %291
%293 = load i8, i8* %292
%294 = sext i8 %293 to i32
%295 = mul nsw i32 %294, 95
%296 = sub nsw i32 %288, %295
%297 = trunc i32 %296 to i8
%298 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %11, i64 0, i64 1
%299 = load i32, i32* %18
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds [9025 x i8], [9025 x i8]* %298, i64 0, i64 %300
store i8 %297, i8* %301
%302 = load i32, i32* %18
%303 = add nsw i32 %302, 1
store i32 %303, i32* %18
br label %304
304: ; preds = %280, %275
br label %305
305: ; preds = %304
%306 = load i32, i32* %15
%307 = add nsw i32 %306, 1
store i32 %307, i32* %15
br label %272
308: ; preds = %272
store i32 0, i32* %15
br label %309
309: ; preds = %342, %308
%310 = load i32, i32* %15
%311 = icmp slt i32 %310, 9025
br i1 %311, label %312, label %345
312: ; preds = %309
%313 = getelementptr inbounds [1129 x i8], [1129 x i8]* %9, i64 0, i64 0
%314 = load i32, i32* %15
%315 = call i32 @get_vector_bit(i8* %313, i32 %314)
%316 = icmp ne i32 %315, 0
br i1 %316, label %317, label %341
317: ; preds = %312
%318 = load i32, i32* %15
%319 = sdiv i32 %318, 95
%320 = trunc i32 %319 to i8
%321 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %12, i64 0, i64 0
%322 = load i32, i32* %19
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds [9025 x i8], [9025 x i8]* %321, i64 0, i64 %323
store i8 %320, i8* %324
%325 = load i32, i32* %15
%326 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %12, i64 0, i64 0
%327 = load i32, i32* %19
%328 = sext i32 %327 to i64
%329 = getelementptr inbounds [9025 x i8], [9025 x i8]* %326, i64 0, i64 %328
%330 = load i8, i8* %329
%331 = sext i8 %330 to i32
%332 = mul nsw i32 %331, 95
%333 = sub nsw i32 %325, %332
%334 = trunc i32 %333 to i8
%335 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %12, i64 0, i64 1
%336 = load i32, i32* %19
%337 = sext i32 %336 to i64
%338 = getelementptr inbounds [9025 x i8], [9025 x i8]* %335, i64 0, i64 %337
store i8 %334, i8* %338
%339 = load i32, i32* %19
%340 = add nsw i32 %339, 1
store i32 %340, i32* %19
br label %341
341: ; preds = %317, %312
br label %342
342: ; preds = %341
%343 = load i32, i32* %15
%344 = add nsw i32 %343, 1
store i32 %344, i32* %15
br label %309
345: ; preds = %309
%346 = load i32, i32* %18
%347 = load i32, i32* %19
%348 = mul nsw i32 %346, %347
%349 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.13, i64 0, i64 0), i32 %348)
store i32 0, i32* %15
br label %350
350: ; preds = %410, %345
%351 = load i32, i32* %15
%352 = load i32, i32* %18
%353 = icmp slt i32 %351, %352
br i1 %353, label %354, label %413
354: ; preds = %350
store i32 0, i32* %16
br label %355
355: ; preds = %406, %354
%356 = load i32, i32* %16
%357 = load i32, i32* %19
%358 = icmp slt i32 %356, %357
br i1 %358, label %359, label %409
359: ; preds = %355
%360 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %11, i64 0, i64 0
%361 = load i32, i32* %15
%362 = sext i32 %361 to i64
%363 = getelementptr inbounds [9025 x i8], [9025 x i8]* %360, i64 0, i64 %362
%364 = load i8, i8* %363
%365 = sext i8 %364 to i32
%366 = add nsw i32 %365, 32
%367 = trunc i32 %366 to i8
%368 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
store i8 %367, i8* %368
%369 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %11, i64 0, i64 1
%370 = load i32, i32* %15
%371 = sext i32 %370 to i64
%372 = getelementptr inbounds [9025 x i8], [9025 x i8]* %369, i64 0, i64 %371
%373 = load i8, i8* %372
%374 = sext i8 %373 to i32
%375 = add nsw i32 %374, 32
%376 = trunc i32 %375 to i8
%377 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 1
store i8 %376, i8* %377
%378 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %12, i64 0, i64 0
%379 = load i32, i32* %16
%380 = sext i32 %379 to i64
%381 = getelementptr inbounds [9025 x i8], [9025 x i8]* %378, i64 0, i64 %380
%382 = load i8, i8* %381
%383 = sext i8 %382 to i32
%384 = add nsw i32 %383, 32
%385 = trunc i32 %384 to i8
%386 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 2
store i8 %385, i8* %386
%387 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %12, i64 0, i64 1
%388 = load i32, i32* %16
%389 = sext i32 %388 to i64
%390 = getelementptr inbounds [9025 x i8], [9025 x i8]* %387, i64 0, i64 %389
%391 = load i8, i8* %390
%392 = sext i8 %391 to i32
%393 = add nsw i32 %392, 32
%394 = trunc i32 %393 to i8
%395 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 3
store i8 %394, i8* %395
%396 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 4
store i8 0, i8* %396
%397 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%398 = call i32 @crypt(i8* %397, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%399 = load i8*, i8** %6
%400 = call i64 @strcmp(i32 %398, i8* %399)
%401 = icmp eq i64 %400, 0
br i1 %401, label %402, label %405
402: ; preds = %359
%403 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%404 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i8* %403)
store i32 31337, i32* %15
store i32 31337, i32* %16
br label %405
405: ; preds = %402, %359
br label %406
406: ; preds = %405
%407 = load i32, i32* %16
%408 = add nsw i32 %407, 1
store i32 %408, i32* %16
br label %355
409: ; preds = %355
br label %410
410: ; preds = %409
%411 = load i32, i32* %15
%412 = add nsw i32 %411, 1
store i32 %412, i32* %15
br label %350
413: ; preds = %350
%414 = load i32, i32* %15
%415 = icmp slt i32 %414, 31337
br i1 %415, label %416, label %418
416: ; preds = %413
%417 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.16, i64 0, i64 0))
br label %418
418: ; preds = %416, %413
%419 = load i32*, i32** %20
%420 = call i32 @fclose(i32* %419)
%421 = load i32, i32* %3
ret i32 %421
}

LLVM IR (-O2):
@.str = [58 x i8] c"Usage: %s <password hash> (will use the file 4char.ppm)\0A\00"
@.str.1 = [10 x i8] c"4char.ppm\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [44 x i8] c"Fatal: Couldn't open PPM file for reading.\0A\00"
@SEEK_SET = global i32 0
@.str.5 = [65 x i8] c"only 1 vector of 4:\09%d plaintext pairs, with %0.2f%% saturation\0A\00"
@.str.6 = [69 x i8] c"vectors 1 AND 2 merged:\09%d plaintext pairs, with %0.2f%% saturation\0A\00"
@.str.7 = [69 x i8] c"first 3 vectors merged:\09%d plaintext pairs, with %0.2f%% saturation\0A\00"
@.str.8 = [67 x i8] c"all 4 vectors merged:\09%d plaintext pairs, with %0.2f%% saturation\0A\00"
@.str.13 = [38 x i8] c"Cracking remaining %d possibilites..\0A\00"
@.str.14 = [3 x i8] c"je\00"
@.str.15 = [16 x i8] c"Password : %s\0A\00"
@str = [65 x i8] c"Filtering possible plaintext bytes for the first two characters:\00"
@str.17 = [50 x i8] c"Possible plaintext pairs for the first two bytes:\00"
@str.18 = [65 x i8] c"\0AFiltering possible plaintext bytes for the last two characters:\00"
@str.19 = [49 x i8] c"Possible plaintext pairs for the last two bytes:\00"
@str.20 = [32 x i8] c"Building probability vectors...\00"
@str.21 = [57 x i8] c"Password wasn't salted with 'je' or is not 4 chars long.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [5 x i8]
%4 = alloca [1129 x i8]
%5 = alloca [1129 x i8]
%6 = alloca [1129 x i8]
%7 = alloca [2 x [9025 x i8]]
%8 = alloca [2 x [9025 x i8]]
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [1129 x i8], [1129 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [1129 x i8], [1129 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [1129 x i8], [1129 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %7, i64 0, i64 0, i64 0
%14 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %8, i64 0, i64 0, i64 0
%15 = icmp slt i32 %0, 1
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = load i8*, i8** %1
%18 = tail call i32 @barf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %16, %2
%20 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp eq i32* %20, null
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = tail call i32 @barf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i8* null)
br label %24
24: ; preds = %22, %19
%25 = getelementptr inbounds i8*, i8** %1, i64 1
%26 = load i8*, i8** %25
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
%28 = getelementptr inbounds i8, i8* %26, i64 2
%29 = load i8, i8* %28
%30 = getelementptr inbounds i8, i8* %26, i64 3
%31 = load i8, i8* %30
%32 = getelementptr inbounds i8, i8* %26, i64 4
%33 = load i8, i8* %32
%34 = tail call i32 @enum_hashtriplet(i8 signext %29, i8 signext %31, i8 signext %33)
%35 = mul nsw i32 %34, 1129
%36 = load i32, i32* @SEEK_SET
%37 = tail call i32 @fseek(i32* %20, i32 %35, i32 %36)
%38 = call i32 @fread(i8* %10, i32 1129, i32 1, i32* %20)
%39 = call i32 @count_vector_bits(i8* %10)
%40 = sitofp i32 %39 to double
%41 = fmul double %40, 1.000000e+02
%42 = fdiv double %41, 9.025000e+03
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0), i32 %39, double %42)
%44 = load i8, i8* %32
%45 = getelementptr inbounds i8, i8* %26, i64 5
%46 = load i8, i8* %45
%47 = getelementptr inbounds i8, i8* %26, i64 6
%48 = load i8, i8* %47
%49 = call i32 @enum_hashtriplet(i8 signext %44, i8 signext %46, i8 signext %48)
%50 = mul nsw i32 %49, 1129
%51 = add nsw i32 %50, 18497536
%52 = load i32, i32* @SEEK_SET
%53 = call i32 @fseek(i32* %20, i32 %51, i32 %52)
%54 = call i32 @fread(i8* %12, i32 1129, i32 1, i32* %20)
%55 = call i32 @merge(i8* %10, i8* %12)
%56 = call i32 @count_vector_bits(i8* %10)
%57 = sitofp i32 %56 to double
%58 = fmul double %57, 1.000000e+02
%59 = fdiv double %58, 9.025000e+03
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0), i32 %56, double %59)
%61 = load i8, i8* %47
%62 = getelementptr inbounds i8, i8* %26, i64 7
%63 = load i8, i8* %62
%64 = getelementptr inbounds i8, i8* %26, i64 8
%65 = load i8, i8* %64
%66 = call i32 @enum_hashtriplet(i8 signext %61, i8 signext %63, i8 signext %65)
%67 = mul nsw i32 %66, 1129
%68 = add nsw i32 %67, 36995072
%69 = load i32, i32* @SEEK_SET
%70 = call i32 @fseek(i32* %20, i32 %68, i32 %69)
%71 = call i32 @fread(i8* %12, i32 1129, i32 1, i32* %20)
%72 = call i32 @merge(i8* %10, i8* %12)
%73 = call i32 @count_vector_bits(i8* %10)
%74 = sitofp i32 %73 to double
%75 = fmul double %74, 1.000000e+02
%76 = fdiv double %75, 9.025000e+03
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.7, i64 0, i64 0), i32 %73, double %76)
%78 = load i8, i8* %64
%79 = getelementptr inbounds i8, i8* %26, i64 9
%80 = load i8, i8* %79
%81 = getelementptr inbounds i8, i8* %26, i64 10
%82 = load i8, i8* %81
%83 = call i32 @enum_hashtriplet(i8 signext %78, i8 signext %80, i8 signext %82)
%84 = mul nsw i32 %83, 1129
%85 = add nsw i32 %84, 55492608
%86 = load i32, i32* @SEEK_SET
%87 = call i32 @fseek(i32* %20, i32 %85, i32 %86)
%88 = call i32 @fread(i8* %12, i32 1129, i32 1, i32* %20)
%89 = call i32 @merge(i8* %10, i8* %12)
%90 = call i32 @count_vector_bits(i8* %10)
%91 = sitofp i32 %90 to double
%92 = fmul double %91, 1.000000e+02
%93 = fdiv double %92, 9.025000e+03
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.8, i64 0, i64 0), i32 %90, double %93)
%95 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.17, i64 0, i64 0))
%96 = call i32 @print_vector(i8* %10)
%97 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.18, i64 0, i64 0))
%98 = load i8, i8* %28
%99 = load i8, i8* %30
%100 = load i8, i8* %32
%101 = call i32 @enum_hashtriplet(i8 signext %98, i8 signext %99, i8 signext %100)
%102 = mul nsw i32 %101, 1129
%103 = add nsw i32 %102, 73990144
%104 = load i32, i32* @SEEK_SET
%105 = call i32 @fseek(i32* %20, i32 %103, i32 %104)
%106 = call i32 @fread(i8* %11, i32 1129, i32 1, i32* %20)
%107 = call i32 @count_vector_bits(i8* %11)
%108 = sitofp i32 %107 to double
%109 = fmul double %108, 1.000000e+02
%110 = fdiv double %109, 9.025000e+03
%111 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0), i32 %107, double %110)
%112 = load i8, i8* %32
%113 = load i8, i8* %45
%114 = load i8, i8* %47
%115 = call i32 @enum_hashtriplet(i8 signext %112, i8 signext %113, i8 signext %114)
%116 = mul nsw i32 %115, 1129
%117 = add nsw i32 %116, 92487680
%118 = load i32, i32* @SEEK_SET
%119 = call i32 @fseek(i32* %20, i32 %117, i32 %118)
%120 = call i32 @fread(i8* %12, i32 1129, i32 1, i32* %20)
%121 = call i32 @merge(i8* %11, i8* %12)
%122 = call i32 @count_vector_bits(i8* %11)
%123 = sitofp i32 %122 to double
%124 = fmul double %123, 1.000000e+02
%125 = fdiv double %124, 9.025000e+03
%126 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0), i32 %122, double %125)
%127 = load i8, i8* %47
%128 = load i8, i8* %62
%129 = load i8, i8* %64
%130 = call i32 @enum_hashtriplet(i8 signext %127, i8 signext %128, i8 signext %129)
%131 = mul nsw i32 %130, 1129
%132 = add nsw i32 %131, 110985216
%133 = load i32, i32* @SEEK_SET
%134 = call i32 @fseek(i32* %20, i32 %132, i32 %133)
%135 = call i32 @fread(i8* %12, i32 1129, i32 1, i32* %20)
%136 = call i32 @merge(i8* %11, i8* %12)
%137 = call i32 @count_vector_bits(i8* %11)
%138 = sitofp i32 %137 to double
%139 = fmul double %138, 1.000000e+02
%140 = fdiv double %139, 9.025000e+03
%141 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.7, i64 0, i64 0), i32 %137, double %140)
%142 = load i8, i8* %64
%143 = load i8, i8* %79
%144 = load i8, i8* %81
%145 = call i32 @enum_hashtriplet(i8 signext %142, i8 signext %143, i8 signext %144)
%146 = mul nsw i32 %145, 1129
%147 = add nsw i32 %146, 129482752
%148 = load i32, i32* @SEEK_SET
%149 = call i32 @fseek(i32* %20, i32 %147, i32 %148)
%150 = call i32 @fread(i8* %12, i32 1129, i32 1, i32* %20)
%151 = call i32 @merge(i8* %11, i8* %12)
%152 = call i32 @count_vector_bits(i8* %11)
%153 = sitofp i32 %152 to double
%154 = fmul double %153, 1.000000e+02
%155 = fdiv double %154, 9.025000e+03
%156 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.8, i64 0, i64 0), i32 %152, double %155)
%157 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.19, i64 0, i64 0))
%158 = call i32 @print_vector(i8* %11)
%159 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.20, i64 0, i64 0))
br label %160
160: ; preds = %24, %177
%161 = phi i32 [ 0, %24 ], [ %179, %177 ]
%162 = phi i32 [ 0, %24 ], [ %178, %177 ]
%163 = call i32 @get_vector_bit(i8* %10, i32 %161)
%164 = icmp eq i32 %163, 1
br i1 %164, label %165, label %177
165: ; preds = %160
%166 = trunc i32 %161 to i16
%167 = udiv i16 %166, 95
%168 = zext i16 %167 to i32
%169 = trunc i16 %167 to i8
%170 = sext i32 %162 to i64
%171 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %7, i64 0, i64 0, i64 %170
store i8 %169, i8* %171
%172 = mul nsw i32 %168, -95
%173 = add nsw i32 %172, %161
%174 = trunc i32 %173 to i8
%175 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %7, i64 0, i64 1, i64 %170
store i8 %174, i8* %175
%176 = add nsw i32 %162, 1
br label %177
177: ; preds = %160, %165
%178 = phi i32 [ %176, %165 ], [ %162, %160 ]
%179 = add nuw nsw i32 %161, 1
%180 = icmp eq i32 %179, 9025
br i1 %180, label %181, label %160
181: ; preds = %177, %198
%182 = phi i32 [ %200, %198 ], [ 0, %177 ]
%183 = phi i32 [ %199, %198 ], [ 0, %177 ]
%184 = call i32 @get_vector_bit(i8* %11, i32 %182)
%185 = icmp eq i32 %184, 0
br i1 %185, label %198, label %186
186: ; preds = %181
%187 = trunc i32 %182 to i16
%188 = udiv i16 %187, 95
%189 = zext i16 %188 to i32
%190 = trunc i16 %188 to i8
%191 = sext i32 %183 to i64
%192 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %8, i64 0, i64 0, i64 %191
store i8 %190, i8* %192
%193 = mul nsw i32 %189, -95
%194 = add nsw i32 %193, %182
%195 = trunc i32 %194 to i8
%196 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %8, i64 0, i64 1, i64 %191
store i8 %195, i8* %196
%197 = add nsw i32 %183, 1
br label %198
198: ; preds = %181, %186
%199 = phi i32 [ %197, %186 ], [ %183, %181 ]
%200 = add nuw nsw i32 %182, 1
%201 = icmp eq i32 %200, 9025
br i1 %201, label %202, label %181
202: ; preds = %198
%203 = mul nsw i32 %199, %178
%204 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.13, i64 0, i64 0), i32 %203)
%205 = icmp sgt i32 %178, 0
br i1 %205, label %206, label %247
206: ; preds = %202
%207 = icmp sgt i32 %199, 0
%208 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 1
%209 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 2
%210 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 3
%211 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 4
br label %212
212: ; preds = %206, %241
%213 = phi i32 [ 0, %206 ], [ %243, %241 ]
br i1 %207, label %214, label %241
214: ; preds = %212, %236
%215 = phi i32 [ %238, %236 ], [ %213, %212 ]
%216 = phi i32 [ %239, %236 ], [ 0, %212 ]
%217 = sext i32 %215 to i64
%218 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %7, i64 0, i64 0, i64 %217
%219 = load i8, i8* %218
%220 = add i8 %219, 32
store i8 %220, i8* %9
%221 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %7, i64 0, i64 1, i64 %217
%222 = load i8, i8* %221
%223 = add i8 %222, 32
store i8 %223, i8* %208
%224 = sext i32 %216 to i64
%225 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %8, i64 0, i64 0, i64 %224
%226 = load i8, i8* %225
%227 = add i8 %226, 32
store i8 %227, i8* %209
%228 = getelementptr inbounds [2 x [9025 x i8]], [2 x [9025 x i8]]* %8, i64 0, i64 1, i64 %224
%229 = load i8, i8* %228
%230 = add i8 %229, 32
store i8 %230, i8* %210
store i8 0, i8* %211
%231 = call i32 @crypt(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%232 = call i64 @strcmp(i32 %231, i8* %26)
%233 = icmp eq i64 %232, 0
br i1 %233, label %234, label %236
234: ; preds = %214
%235 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i8* %9)
br label %236
236: ; preds = %214, %234
%237 = phi i32 [ 31337, %234 ], [ %216, %214 ]
%238 = phi i32 [ 31337, %234 ], [ %215, %214 ]
%239 = add nsw i32 %237, 1
%240 = icmp slt i32 %239, %199
br i1 %240, label %214, label %241
241: ; preds = %236, %212
%242 = phi i32 [ %213, %212 ], [ %238, %236 ]
%243 = add nsw i32 %242, 1
%244 = icmp slt i32 %243, %178
br i1 %244, label %212, label %245
245: ; preds = %241
%246 = icmp slt i32 %242, 31336
br i1 %246, label %247, label %249
247: ; preds = %202, %245
%248 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.21, i64 0, i64 0))
br label %249
249: ; preds = %247, %245
%250 = call i32 @fclose(i32* %20)
ret i32 0
}