#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*/ barf(char *, int /*<<< orphan*/ *);
char *crypt(char const *, char const *);
int enum_hashtriplet(char, char, char);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char plain[5];
  char *code, *data;
  int i, j, k, l;
  unsigned int charval, val;
  FILE *handle;
  if (!(handle = fopen("4char.ppm", "w")))
    barf("Error: Couldn't open file '4char.ppm' for writing.\n", NULL);
  data = (char *)malloc(16384 * 1129 * 8);
  if (!(data))
    barf("Error: Couldn't allocate memory.\n", NULL);
  for (i = 32; i < 127; i++) {
    for (j = 32; j < 127; j++) {
      printf("Adding %c%c** to 4char.ppm..\n", i, j);
      for (k = 32; k < 127; k++) {
        for (l = 32; l < 127; l++) {
          plain[0] = (char)i;
          plain[1] = (char)j;
          plain[2] = (char)k;
          plain[3] = (char)l;
          plain[4] = '\0';
          code = crypt((const char *)plain, (const char *)"je");
          val = enum_hashtriplet(code[2], code[3], code[4]);
          charval = (i - 32) * 95 + (j - 32);
          data[(val * 1129) + (charval / 8)] |= (1 << (charval % 8));
          val += (16384 * 4);
          charval = (k - 32) * 95 + (l - 32);
          data[(val * 1129) + (charval / 8)] |= (1 << (charval % 8));
          val = 16384 + enum_hashtriplet(code[4], code[5], code[6]);
          charval = (i - 32) * 95 + (j - 32);
          data[(val * 1129) + (charval / 8)] |= (1 << (charval % 8));
          val += (16384 * 4);
          charval = (k - 32) * 95 + (l - 32);
          data[(val * 1129) + (charval / 8)] |= (1 << (charval % 8));
          val = (2 * 16384) + enum_hashtriplet(code[6], code[7], code[8]);
          charval = (i - 32) * 95 + (j - 32);
          data[(val * 1129) + (charval / 8)] |= (1 << (charval % 8));
          val += (16384 * 4);
          charval = (k - 32) * 95 + (l - 32);
          data[(val * 1129) + (charval / 8)] |= (1 << (charval % 8));
          val = (3 * 16384) + enum_hashtriplet(code[8], code[9], code[10]);
          charval = (i - 32) * 95 + (j - 32);
          data[(val * 1129) + (charval / 8)] |= (1 << (charval % 8));
          val += (16384 * 4);
          charval = (k - 32) * 95 + (l - 32);
          data[(val * 1129) + (charval / 8)] |= (1 << (charval % 8));
        }
      }
    }
  }
  printf("finished.. saving..\n");
  fwrite(data, 16384 * 1129 * 8, 1, handle);
  free(data);
  fclose(handle);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe5a(%rip),%rdi
lea    0xe5d(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
jne    11d0 <main+0x40>
lea    0xe45(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <barf@plt>
mov    $0x8d20000,%edi
call   1090 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11f9 <main+0x69>
lea    0xe50(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <barf@plt>
movl   $0x20,-0x24(%rbp)
cmpl   $0x7f,-0x24(%rbp)
jge    158b <main+0x3fb>
movl   $0x20,-0x28(%rbp)
cmpl   $0x7f,-0x28(%rbp)
jge    1578 <main+0x3e8>
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0x20,-0x2c(%rbp)
cmpl   $0x7f,-0x2c(%rbp)
jge    1565 <main+0x3d5>
movl   $0x20,-0x30(%rbp)
cmpl   $0x7f,-0x30(%rbp)
jge    1552 <main+0x3c2>
mov    -0x24(%rbp),%eax
mov    %al,-0x9(%rbp)
mov    -0x28(%rbp),%eax
mov    %al,-0x8(%rbp)
mov    -0x2c(%rbp),%eax
mov    %al,-0x7(%rbp)
mov    -0x30(%rbp),%eax
mov    %al,-0x6(%rbp)
movb   $0x0,-0x5(%rbp)
lea    -0x9(%rbp),%rdi
lea    0xe08(%rip),%rsi
call   1050 <crypt@plt>
mov    %rax,-0x18(%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   1070 <enum_hashtriplet@plt>
mov    %eax,-0x38(%rbp)
mov    -0x24(%rbp),%eax
sub    $0x20,%eax
imul   $0x5f,%eax,%eax
mov    -0x28(%rbp),%ecx
sub    $0x20,%ecx
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x20(%rbp),%rax
imul   $0x469,-0x38(%rbp),%ecx
mov    -0x34(%rbp),%edx
shr    $0x3,%edx
add    %edx,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x38(%rbp),%eax
add    $0x10000,%eax
mov    %eax,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
sub    $0x20,%eax
imul   $0x5f,%eax,%eax
mov    -0x30(%rbp),%ecx
sub    $0x20,%ecx
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x20(%rbp),%rax
imul   $0x469,-0x38(%rbp),%ecx
mov    -0x34(%rbp),%edx
shr    $0x3,%edx
add    %edx,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
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   1070 <enum_hashtriplet@plt>
add    $0x4000,%eax
mov    %eax,-0x38(%rbp)
mov    -0x24(%rbp),%eax
sub    $0x20,%eax
imul   $0x5f,%eax,%eax
mov    -0x28(%rbp),%ecx
sub    $0x20,%ecx
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x20(%rbp),%rax
imul   $0x469,-0x38(%rbp),%ecx
mov    -0x34(%rbp),%edx
shr    $0x3,%edx
add    %edx,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x38(%rbp),%eax
add    $0x10000,%eax
mov    %eax,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
sub    $0x20,%eax
imul   $0x5f,%eax,%eax
mov    -0x30(%rbp),%ecx
sub    $0x20,%ecx
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x20(%rbp),%rax
imul   $0x469,-0x38(%rbp),%ecx
mov    -0x34(%rbp),%edx
shr    $0x3,%edx
add    %edx,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
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   1070 <enum_hashtriplet@plt>
add    $0x8000,%eax
mov    %eax,-0x38(%rbp)
mov    -0x24(%rbp),%eax
sub    $0x20,%eax
imul   $0x5f,%eax,%eax
mov    -0x28(%rbp),%ecx
sub    $0x20,%ecx
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x20(%rbp),%rax
imul   $0x469,-0x38(%rbp),%ecx
mov    -0x34(%rbp),%edx
shr    $0x3,%edx
add    %edx,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x38(%rbp),%eax
add    $0x10000,%eax
mov    %eax,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
sub    $0x20,%eax
imul   $0x5f,%eax,%eax
mov    -0x30(%rbp),%ecx
sub    $0x20,%ecx
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x20(%rbp),%rax
imul   $0x469,-0x38(%rbp),%ecx
mov    -0x34(%rbp),%edx
shr    $0x3,%edx
add    %edx,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
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   1070 <enum_hashtriplet@plt>
add    $0xc000,%eax
mov    %eax,-0x38(%rbp)
mov    -0x24(%rbp),%eax
sub    $0x20,%eax
imul   $0x5f,%eax,%eax
mov    -0x28(%rbp),%ecx
sub    $0x20,%ecx
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x20(%rbp),%rax
imul   $0x469,-0x38(%rbp),%ecx
mov    -0x34(%rbp),%edx
shr    $0x3,%edx
add    %edx,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x38(%rbp),%eax
add    $0x10000,%eax
mov    %eax,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
sub    $0x20,%eax
imul   $0x5f,%eax,%eax
mov    -0x30(%rbp),%ecx
sub    $0x20,%ecx
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x20(%rbp),%rax
imul   $0x469,-0x38(%rbp),%ecx
mov    -0x34(%rbp),%edx
shr    $0x3,%edx
add    %edx,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1247 <main+0xb7>
jmp    1557 <main+0x3c7>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1236 <main+0xa6>
jmp    156a <main+0x3da>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1211 <main+0x81>
jmp    157d <main+0x3ed>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1200 <main+0x70>
lea    0xaf1(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x40(%rbp),%rcx
mov    $0x8d20000,%esi
mov    $0x1,%edx
call   10b0 <fwrite@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
lea    0xe4b(%rip),%rdi
lea    0xe4e(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,0x20(%rsp)
test   %rax,%rax
jne    11d9 <main+0x39>
lea    0xe3a(%rip),%rdi
xor    %esi,%esi
call   1050 <barf@plt>
mov    $0x8d20000,%edi
call   10a0 <malloc@plt>
mov    %rax,%r13
test   %rax,%rax
jne    11f9 <main+0x59>
lea    0xe4e(%rip),%rdi
xor    %esi,%esi
call   1050 <barf@plt>
mov    $0x20,%ebp
lea    0xe7b(%rip),%rbx
lea    0x3(%rsp),%r14
nopw   0x0(%rax,%rax,1)
imul   $0x5f,%ebp,%eax
mov    %rax,0x28(%rsp)
mov    $0x20,%r15d
mov    %ebp,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %r12d,%r12d
lea    0xe28(%rip),%rdi
mov    %ebp,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x28(%rsp),%rax
lea    (%r15,%rax,1),%ecx
and    $0x7,%cl
mov    $0x1,%edx
shl    %cl,%edx
add    %r15d,%eax
add    $0xfffff400,%eax
shr    $0x3,%eax
lea    0x11a4000(%rax),%ecx
mov    %rcx,0x40(%rsp)
lea    0x2348000(%rax),%ecx
mov    %rcx,0x38(%rsp)
mov    %rax,0x48(%rsp)
lea    0x34ec000(%rax),%esi
mov    $0x20,%ecx
mov    $0xc00,%eax
mov    %r15,0x50(%rsp)
mov    %rsi,0x30(%rsp)
nopl   0x0(%rax)
mov    %rax,0x10(%rsp)
mov    %r12,0x18(%rsp)
xor    %r12d,%r12d
mov    %ecx,0xc(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %bpl,0x3(%rsp)
mov    %r15b,0x4(%rsp)
mov    %cl,0x5(%rsp)
lea    0x20(%r12),%eax
mov    %al,0x6(%rsp)
movb   $0x0,0x7(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %edx,%ebx
call   1060 <crypt@plt>
mov    %rax,%r15
movsbl 0x2(%rax),%edi
movsbl 0x3(%rax),%esi
movsbl 0x4(%rax),%edx
call   1080 <enum_hashtriplet@plt>
imul   $0x469,%eax,%eax
mov    0x48(%rsp),%rcx
add    %eax,%ecx
or     %bl,0x0(%r13,%rcx,1)
mov    0x10(%rsp),%rcx
add    %r12d,%ecx
mov    0x18(%rsp),%rdx
lea    (%rdx,%r12,1),%r14d
and    $0x7,%cl
mov    $0x1,%ebp
shl    %cl,%ebp
shr    $0x3,%r14d
add    %r14d,%eax
add    $0x4690000,%eax
or     %bpl,0x0(%r13,%rax,1)
movsbl 0x4(%r15),%edi
movsbl 0x5(%r15),%esi
movsbl 0x6(%r15),%edx
call   1080 <enum_hashtriplet@plt>
imul   $0x469,%eax,%eax
mov    0x40(%rsp),%rcx
add    %eax,%ecx
or     %bl,0x0(%r13,%rcx,1)
add    %r14d,%eax
add    $0x5834000,%eax
or     %bpl,0x0(%r13,%rax,1)
movsbl 0x6(%r15),%edi
movsbl 0x7(%r15),%esi
movsbl 0x8(%r15),%edx
call   1080 <enum_hashtriplet@plt>
imul   $0x469,%eax,%eax
mov    0x38(%rsp),%rcx
add    %eax,%ecx
or     %bl,0x0(%r13,%rcx,1)
add    %r14d,%eax
add    $0x69d8000,%eax
or     %bpl,0x0(%r13,%rax,1)
movsbl 0x8(%r15),%edi
movsbl 0x9(%r15),%esi
movsbl 0xa(%r15),%edx
mov    0x50(%rsp),%r15
call   1080 <enum_hashtriplet@plt>
mov    0x30(%rsp),%rsi
mov    %ebx,%edx
imul   $0x469,%eax,%eax
lea    (%rsi,%rax,1),%ecx
or     %dl,0x0(%r13,%rcx,1)
mov    0xc(%rsp),%ecx
add    %r14d,%eax
add    $0x7b7c000,%eax
lea    0x3(%rsp),%r14
lea    0xc99(%rip),%rbx
or     %bpl,0x0(%r13,%rax,1)
mov    0x8(%rsp),%ebp
add    $0x1,%r12d
cmp    $0x5f,%r12d
jne    12c0 <main+0x120>
add    $0x1,%ecx
mov    0x10(%rsp),%rdi
add    $0x5f,%edi
mov    0x18(%rsp),%rax
add    $0x5f,%eax
cmp    $0x7f,%ecx
mov    %rax,%r12
mov    %rdi,%rax
jne    12a0 <main+0x100>
add    $0x1,%r15d
cmp    $0x7f,%r15d
jne    1230 <main+0x90>
add    $0x1,%ebp
cmp    $0x7f,%ebp
jne    1210 <main+0x70>
lea    0xc42(%rip),%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
mov    $0x8d20000,%esi
mov    $0x1,%edx
mov    0x20(%rsp),%rbp
mov    %rbp,%rcx
call   10c0 <fwrite@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1070 <fclose@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"4char.ppm\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [52 x i8] c"Error: Couldn't open file '4char.ppm' for writing.\0A\00"
@.str.3 = [34 x i8] c"Error: Couldn't allocate memory.\0A\00"
@.str.4 = [30 x i8] c"Adding %c%c** to 4char.ppm..\0A\00"
@.str.5 = [3 x i8] c"je\00"
@.str.6 = [21 x i8] c"finished.. saving..\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
store i32 0, i32* %1
%12 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %12, i32** %11
%13 = icmp ne i32* %12, null
br i1 %13, label %16, label %14
14: ; preds = %0
%15 = call i32 @barf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), i32* null)
br label %16
16: ; preds = %14, %0
%17 = call i64 @malloc(i32 147980288)
%18 = inttoptr i64 %17 to i8*
store i8* %18, i8** %4
%19 = load i8*, i8** %4
%20 = icmp ne i8* %19, null
br i1 %20, label %23, label %21
21: ; preds = %16
%22 = call i32 @barf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32* null)
br label %23
23: ; preds = %21, %16
store i32 32, i32* %5
br label %24
24: ; preds = %289, %23
%25 = load i32, i32* %5
%26 = icmp slt i32 %25, 127
br i1 %26, label %27, label %292
27: ; preds = %24
store i32 32, i32* %6
br label %28
28: ; preds = %285, %27
%29 = load i32, i32* %6
%30 = icmp slt i32 %29, 127
br i1 %30, label %31, label %288
31: ; preds = %28
%32 = load i32, i32* %5
%33 = load i32, i32* %6
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %32, i32 %33)
store i32 32, i32* %7
br label %35
35: ; preds = %281, %31
%36 = load i32, i32* %7
%37 = icmp slt i32 %36, 127
br i1 %37, label %38, label %284
38: ; preds = %35
store i32 32, i32* %8
br label %39
39: ; preds = %277, %38
%40 = load i32, i32* %8
%41 = icmp slt i32 %40, 127
br i1 %41, label %42, label %280
42: ; preds = %39
%43 = load i32, i32* %5
%44 = trunc i32 %43 to i8
%45 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
store i8 %44, i8* %45
%46 = load i32, i32* %6
%47 = trunc i32 %46 to i8
%48 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 1
store i8 %47, i8* %48
%49 = load i32, i32* %7
%50 = trunc i32 %49 to i8
%51 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 2
store i8 %50, i8* %51
%52 = load i32, i32* %8
%53 = trunc i32 %52 to i8
%54 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 3
store i8 %53, i8* %54
%55 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 4
store i8 0, i8* %55
%56 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%57 = call i8* @crypt(i8* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i8* %57, i8** %3
%58 = load i8*, i8** %3
%59 = getelementptr inbounds i8, i8* %58, i64 2
%60 = load i8, i8* %59
%61 = load i8*, i8** %3
%62 = getelementptr inbounds i8, i8* %61, i64 3
%63 = load i8, i8* %62
%64 = load i8*, i8** %3
%65 = getelementptr inbounds i8, i8* %64, i64 4
%66 = load i8, i8* %65
%67 = call i32 @enum_hashtriplet(i8 signext %60, i8 signext %63, i8 signext %66)
store i32 %67, i32* %10
%68 = load i32, i32* %5
%69 = sub nsw i32 %68, 32
%70 = mul nsw i32 %69, 95
%71 = load i32, i32* %6
%72 = sub nsw i32 %71, 32
%73 = add nsw i32 %70, %72
store i32 %73, i32* %9
%74 = load i32, i32* %9
%75 = urem i32 %74, 8
%76 = shl i32 1, %75
%77 = load i8*, i8** %4
%78 = load i32, i32* %10
%79 = mul i32 %78, 1129
%80 = load i32, i32* %9
%81 = udiv i32 %80, 8
%82 = add i32 %79, %81
%83 = zext i32 %82 to i64
%84 = getelementptr inbounds i8, i8* %77, i64 %83
%85 = load i8, i8* %84
%86 = sext i8 %85 to i32
%87 = or i32 %86, %76
%88 = trunc i32 %87 to i8
store i8 %88, i8* %84
%89 = load i32, i32* %10
%90 = add i32 %89, 65536
store i32 %90, i32* %10
%91 = load i32, i32* %7
%92 = sub nsw i32 %91, 32
%93 = mul nsw i32 %92, 95
%94 = load i32, i32* %8
%95 = sub nsw i32 %94, 32
%96 = add nsw i32 %93, %95
store i32 %96, i32* %9
%97 = load i32, i32* %9
%98 = urem i32 %97, 8
%99 = shl i32 1, %98
%100 = load i8*, i8** %4
%101 = load i32, i32* %10
%102 = mul i32 %101, 1129
%103 = load i32, i32* %9
%104 = udiv i32 %103, 8
%105 = add i32 %102, %104
%106 = zext i32 %105 to i64
%107 = getelementptr inbounds i8, i8* %100, i64 %106
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = or i32 %109, %99
%111 = trunc i32 %110 to i8
store i8 %111, i8* %107
%112 = load i8*, i8** %3
%113 = getelementptr inbounds i8, i8* %112, i64 4
%114 = load i8, i8* %113
%115 = load i8*, i8** %3
%116 = getelementptr inbounds i8, i8* %115, i64 5
%117 = load i8, i8* %116
%118 = load i8*, i8** %3
%119 = getelementptr inbounds i8, i8* %118, i64 6
%120 = load i8, i8* %119
%121 = call i32 @enum_hashtriplet(i8 signext %114, i8 signext %117, i8 signext %120)
%122 = add nsw i32 16384, %121
store i32 %122, i32* %10
%123 = load i32, i32* %5
%124 = sub nsw i32 %123, 32
%125 = mul nsw i32 %124, 95
%126 = load i32, i32* %6
%127 = sub nsw i32 %126, 32
%128 = add nsw i32 %125, %127
store i32 %128, i32* %9
%129 = load i32, i32* %9
%130 = urem i32 %129, 8
%131 = shl i32 1, %130
%132 = load i8*, i8** %4
%133 = load i32, i32* %10
%134 = mul i32 %133, 1129
%135 = load i32, i32* %9
%136 = udiv i32 %135, 8
%137 = add i32 %134, %136
%138 = zext i32 %137 to i64
%139 = getelementptr inbounds i8, i8* %132, i64 %138
%140 = load i8, i8* %139
%141 = sext i8 %140 to i32
%142 = or i32 %141, %131
%143 = trunc i32 %142 to i8
store i8 %143, i8* %139
%144 = load i32, i32* %10
%145 = add i32 %144, 65536
store i32 %145, i32* %10
%146 = load i32, i32* %7
%147 = sub nsw i32 %146, 32
%148 = mul nsw i32 %147, 95
%149 = load i32, i32* %8
%150 = sub nsw i32 %149, 32
%151 = add nsw i32 %148, %150
store i32 %151, i32* %9
%152 = load i32, i32* %9
%153 = urem i32 %152, 8
%154 = shl i32 1, %153
%155 = load i8*, i8** %4
%156 = load i32, i32* %10
%157 = mul i32 %156, 1129
%158 = load i32, i32* %9
%159 = udiv i32 %158, 8
%160 = add i32 %157, %159
%161 = zext i32 %160 to i64
%162 = getelementptr inbounds i8, i8* %155, i64 %161
%163 = load i8, i8* %162
%164 = sext i8 %163 to i32
%165 = or i32 %164, %154
%166 = trunc i32 %165 to i8
store i8 %166, i8* %162
%167 = load i8*, i8** %3
%168 = getelementptr inbounds i8, i8* %167, i64 6
%169 = load i8, i8* %168
%170 = load i8*, i8** %3
%171 = getelementptr inbounds i8, i8* %170, i64 7
%172 = load i8, i8* %171
%173 = load i8*, i8** %3
%174 = getelementptr inbounds i8, i8* %173, i64 8
%175 = load i8, i8* %174
%176 = call i32 @enum_hashtriplet(i8 signext %169, i8 signext %172, i8 signext %175)
%177 = add nsw i32 32768, %176
store i32 %177, i32* %10
%178 = load i32, i32* %5
%179 = sub nsw i32 %178, 32
%180 = mul nsw i32 %179, 95
%181 = load i32, i32* %6
%182 = sub nsw i32 %181, 32
%183 = add nsw i32 %180, %182
store i32 %183, i32* %9
%184 = load i32, i32* %9
%185 = urem i32 %184, 8
%186 = shl i32 1, %185
%187 = load i8*, i8** %4
%188 = load i32, i32* %10
%189 = mul i32 %188, 1129
%190 = load i32, i32* %9
%191 = udiv i32 %190, 8
%192 = add i32 %189, %191
%193 = zext i32 %192 to i64
%194 = getelementptr inbounds i8, i8* %187, i64 %193
%195 = load i8, i8* %194
%196 = sext i8 %195 to i32
%197 = or i32 %196, %186
%198 = trunc i32 %197 to i8
store i8 %198, i8* %194
%199 = load i32, i32* %10
%200 = add i32 %199, 65536
store i32 %200, i32* %10
%201 = load i32, i32* %7
%202 = sub nsw i32 %201, 32
%203 = mul nsw i32 %202, 95
%204 = load i32, i32* %8
%205 = sub nsw i32 %204, 32
%206 = add nsw i32 %203, %205
store i32 %206, i32* %9
%207 = load i32, i32* %9
%208 = urem i32 %207, 8
%209 = shl i32 1, %208
%210 = load i8*, i8** %4
%211 = load i32, i32* %10
%212 = mul i32 %211, 1129
%213 = load i32, i32* %9
%214 = udiv i32 %213, 8
%215 = add i32 %212, %214
%216 = zext i32 %215 to i64
%217 = getelementptr inbounds i8, i8* %210, i64 %216
%218 = load i8, i8* %217
%219 = sext i8 %218 to i32
%220 = or i32 %219, %209
%221 = trunc i32 %220 to i8
store i8 %221, i8* %217
%222 = load i8*, i8** %3
%223 = getelementptr inbounds i8, i8* %222, i64 8
%224 = load i8, i8* %223
%225 = load i8*, i8** %3
%226 = getelementptr inbounds i8, i8* %225, i64 9
%227 = load i8, i8* %226
%228 = load i8*, i8** %3
%229 = getelementptr inbounds i8, i8* %228, i64 10
%230 = load i8, i8* %229
%231 = call i32 @enum_hashtriplet(i8 signext %224, i8 signext %227, i8 signext %230)
%232 = add nsw i32 49152, %231
store i32 %232, i32* %10
%233 = load i32, i32* %5
%234 = sub nsw i32 %233, 32
%235 = mul nsw i32 %234, 95
%236 = load i32, i32* %6
%237 = sub nsw i32 %236, 32
%238 = add nsw i32 %235, %237
store i32 %238, i32* %9
%239 = load i32, i32* %9
%240 = urem i32 %239, 8
%241 = shl i32 1, %240
%242 = load i8*, i8** %4
%243 = load i32, i32* %10
%244 = mul i32 %243, 1129
%245 = load i32, i32* %9
%246 = udiv i32 %245, 8
%247 = add i32 %244, %246
%248 = zext i32 %247 to i64
%249 = getelementptr inbounds i8, i8* %242, i64 %248
%250 = load i8, i8* %249
%251 = sext i8 %250 to i32
%252 = or i32 %251, %241
%253 = trunc i32 %252 to i8
store i8 %253, i8* %249
%254 = load i32, i32* %10
%255 = add i32 %254, 65536
store i32 %255, i32* %10
%256 = load i32, i32* %7
%257 = sub nsw i32 %256, 32
%258 = mul nsw i32 %257, 95
%259 = load i32, i32* %8
%260 = sub nsw i32 %259, 32
%261 = add nsw i32 %258, %260
store i32 %261, i32* %9
%262 = load i32, i32* %9
%263 = urem i32 %262, 8
%264 = shl i32 1, %263
%265 = load i8*, i8** %4
%266 = load i32, i32* %10
%267 = mul i32 %266, 1129
%268 = load i32, i32* %9
%269 = udiv i32 %268, 8
%270 = add i32 %267, %269
%271 = zext i32 %270 to i64
%272 = getelementptr inbounds i8, i8* %265, i64 %271
%273 = load i8, i8* %272
%274 = sext i8 %273 to i32
%275 = or i32 %274, %264
%276 = trunc i32 %275 to i8
store i8 %276, i8* %272
br label %277
277: ; preds = %42
%278 = load i32, i32* %8
%279 = add nsw i32 %278, 1
store i32 %279, i32* %8
br label %39
280: ; preds = %39
br label %281
281: ; preds = %280
%282 = load i32, i32* %7
%283 = add nsw i32 %282, 1
store i32 %283, i32* %7
br label %35
284: ; preds = %35
br label %285
285: ; preds = %284
%286 = load i32, i32* %6
%287 = add nsw i32 %286, 1
store i32 %287, i32* %6
br label %28
288: ; preds = %28
br label %289
289: ; preds = %288
%290 = load i32, i32* %5
%291 = add nsw i32 %290, 1
store i32 %291, i32* %5
br label %24
292: ; preds = %24
%293 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%294 = load i8*, i8** %4
%295 = load i32*, i32** %11
%296 = call i32 @fwrite(i8* %294, i32 147980288, i32 1, i32* %295)
%297 = load i8*, i8** %4
%298 = call i32 @free(i8* %297)
%299 = load i32*, i32** %11
%300 = call i32 @fclose(i32* %299)
%301 = load i32, i32* %1
ret i32 %301
}

LLVM IR (-O2):
@.str = [10 x i8] c"4char.ppm\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [52 x i8] c"Error: Couldn't open file '4char.ppm' for writing.\0A\00"
@.str.3 = [34 x i8] c"Error: Couldn't allocate memory.\0A\00"
@.str.4 = [30 x i8] c"Adding %c%c** to 4char.ppm..\0A\00"
@.str.5 = [3 x i8] c"je\00"
@str = [20 x i8] c"finished.. saving..\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 @barf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), i32* null)
br label %7
7: ; preds = %5, %0
%8 = tail call i64 @malloc(i32 147980288)
%9 = inttoptr i64 %8 to i8*
%10 = icmp eq i64 %8, 0
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = tail call i32 @barf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32* null)
br label %13
13: ; preds = %11, %7
%14 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 1
%15 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 2
%16 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 3
%17 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 4
br label %18
18: ; preds = %13, %130
%19 = phi i32 [ 32, %13 ], [ %131, %130 ]
%20 = trunc i32 %19 to i8
%21 = mul nuw nsw i32 %19, 95
br label %22
22: ; preds = %18, %127
%23 = phi i32 [ 32, %18 ], [ %128, %127 ]
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %19, i32 %23)
%25 = trunc i32 %23 to i8
%26 = add nuw nsw i32 %23, %21
%27 = add nsw i32 %26, -3072
%28 = and i32 %26, 7
%29 = shl nuw nsw i32 1, %28
%30 = lshr i32 %27, 3
%31 = trunc i32 %29 to i8
%32 = add nuw nsw i32 %30, 18497536
%33 = add nuw nsw i32 %30, 36995072
%34 = add nuw nsw i32 %30, 55492608
br label %35
35: ; preds = %22, %124
%36 = phi i32 [ 32, %22 ], [ %125, %124 ]
%37 = trunc i32 %36 to i8
%38 = mul nuw nsw i32 %36, 95
br label %39
39: ; preds = %35, %39
%40 = phi i32 [ 32, %35 ], [ %122, %39 ]
store i8 %20, i8* %2
store i8 %25, i8* %14
store i8 %37, i8* %15
%41 = trunc i32 %40 to i8
store i8 %41, i8* %16
store i8 0, i8* %17
%42 = call i8* @crypt(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%43 = getelementptr inbounds i8, i8* %42, i64 2
%44 = load i8, i8* %43
%45 = getelementptr inbounds i8, i8* %42, i64 3
%46 = load i8, i8* %45
%47 = getelementptr inbounds i8, i8* %42, i64 4
%48 = load i8, i8* %47
%49 = call i32 @enum_hashtriplet(i8 signext %44, i8 signext %46, i8 signext %48)
%50 = mul i32 %49, 1129
%51 = add i32 %50, %30
%52 = zext i32 %51 to i64
%53 = getelementptr inbounds i8, i8* %9, i64 %52
%54 = load i8, i8* %53
%55 = or i8 %54, %31
store i8 %55, i8* %53
%56 = add nuw nsw i32 %40, %38
%57 = add nsw i32 %56, -3072
%58 = and i32 %56, 7
%59 = shl nuw nsw i32 1, %58
%60 = lshr i32 %57, 3
%61 = add nuw nsw i32 %60, 73990144
%62 = add i32 %61, %50
%63 = zext i32 %62 to i64
%64 = getelementptr inbounds i8, i8* %9, i64 %63
%65 = load i8, i8* %64
%66 = trunc i32 %59 to i8
%67 = or i8 %65, %66
store i8 %67, i8* %64
%68 = load i8, i8* %47
%69 = getelementptr inbounds i8, i8* %42, i64 5
%70 = load i8, i8* %69
%71 = getelementptr inbounds i8, i8* %42, i64 6
%72 = load i8, i8* %71
%73 = call i32 @enum_hashtriplet(i8 signext %68, i8 signext %70, i8 signext %72)
%74 = mul i32 %73, 1129
%75 = add i32 %32, %74
%76 = zext i32 %75 to i64
%77 = getelementptr inbounds i8, i8* %9, i64 %76
%78 = load i8, i8* %77
%79 = or i8 %78, %31
store i8 %79, i8* %77
%80 = add nuw nsw i32 %60, 92487680
%81 = add i32 %80, %74
%82 = zext i32 %81 to i64
%83 = getelementptr inbounds i8, i8* %9, i64 %82
%84 = load i8, i8* %83
%85 = or i8 %84, %66
store i8 %85, i8* %83
%86 = load i8, i8* %71
%87 = getelementptr inbounds i8, i8* %42, i64 7
%88 = load i8, i8* %87
%89 = getelementptr inbounds i8, i8* %42, i64 8
%90 = load i8, i8* %89
%91 = call i32 @enum_hashtriplet(i8 signext %86, i8 signext %88, i8 signext %90)
%92 = mul i32 %91, 1129
%93 = add i32 %33, %92
%94 = zext i32 %93 to i64
%95 = getelementptr inbounds i8, i8* %9, i64 %94
%96 = load i8, i8* %95
%97 = or i8 %96, %31
store i8 %97, i8* %95
%98 = add nuw nsw i32 %60, 110985216
%99 = add i32 %98, %92
%100 = zext i32 %99 to i64
%101 = getelementptr inbounds i8, i8* %9, i64 %100
%102 = load i8, i8* %101
%103 = or i8 %102, %66
store i8 %103, i8* %101
%104 = load i8, i8* %89
%105 = getelementptr inbounds i8, i8* %42, i64 9
%106 = load i8, i8* %105
%107 = getelementptr inbounds i8, i8* %42, i64 10
%108 = load i8, i8* %107
%109 = call i32 @enum_hashtriplet(i8 signext %104, i8 signext %106, i8 signext %108)
%110 = mul i32 %109, 1129
%111 = add i32 %34, %110
%112 = zext i32 %111 to i64
%113 = getelementptr inbounds i8, i8* %9, i64 %112
%114 = load i8, i8* %113
%115 = or i8 %114, %31
store i8 %115, i8* %113
%116 = add nuw nsw i32 %60, 129482752
%117 = add i32 %116, %110
%118 = zext i32 %117 to i64
%119 = getelementptr inbounds i8, i8* %9, i64 %118
%120 = load i8, i8* %119
%121 = or i8 %120, %66
store i8 %121, i8* %119
%122 = add nuw nsw i32 %40, 1
%123 = icmp eq i32 %122, 127
br i1 %123, label %124, label %39
124: ; preds = %39
%125 = add nuw nsw i32 %36, 1
%126 = icmp eq i32 %125, 127
br i1 %126, label %127, label %35
127: ; preds = %124
%128 = add nuw nsw i32 %23, 1
%129 = icmp eq i32 %128, 127
br i1 %129, label %130, label %22
130: ; preds = %127
%131 = add nuw nsw i32 %19, 1
%132 = icmp eq i32 %131, 127
br i1 %132, label %133, label %18
133: ; preds = %130
%134 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%135 = call i32 @fwrite(i8* %9, i32 147980288, i32 1, i32* %3)
%136 = call i32 @free(i8* %9)
%137 = call i32 @fclose(i32* %3)
ret i32 0
}