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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int processBytes(FILE *fin, FILE *fout) {
  static int bytes = 0;
  static unsigned char mask0, mask1, mask2, mask3;
  int i, n;
  unsigned char input[1024];
  unsigned char output[768];
  n = fread(input, 4, sizeof(input) / 4, fin);
  if (n < 1) {
    printf("%i bytes processed\n", bytes);
    return 0;
  }
  if (bytes == 0) {
    mask0 = input[0] & 0xC0;
    mask1 = input[1] & 0xC0;
    mask2 = input[2] & 0xC0;
    mask3 = input[3] & 0xC0;
    if (mask1 != ((mask0 + 0x40) & 0xC0)) {
      printf("Bad mask1\n");
      return 0;
    }
    if (mask2 != ((mask1 + 0x40) & 0xC0)) {
      printf("Bad mask2\n");
      return 0;
    }
    if (mask3 != ((mask2 + 0x40) & 0xC0)) {
      printf("Bad mask3\n");
      return 0;
    }
  }
  for (i = 0; i < n; i++) {
    if ((input[i * 4 + 0] & 0xC0) != mask0) {
      printf("mismatch0 %i bytes processed\n", bytes);
      return 0;
    }
    if ((input[i * 4 + 1] & 0xC0) != mask1) {
      printf("mismatch1 %i bytes processed\n", bytes);
      return 0;
    }
    if ((input[i * 4 + 2] & 0xC0) != mask2) {
      printf("mismatch2 %i bytes processed\n", bytes);
      return 0;
    }
    if ((input[i * 4 + 3] & 0xC0) != mask3) {
      printf("mismatch3 %i bytes processed\n", bytes);
      return 0;
    }
  }
  for (i = 0; i < n; i++) {
    output[i * 3 + 0] =
        ((input[i * 4 + 1] & 0x3f) << 6) | ((input[i * 4 + 0] & 0x3f) >> 0);
    output[i * 3 + 1] =
        ((input[i * 4 + 2] & 0x3f) << 4) | ((input[i * 4 + 1] & 0x3f) >> 2);
    output[i * 3 + 2] =
        ((input[i * 4 + 3] & 0x3f) << 2) | ((input[i * 4 + 2] & 0x3f) >> 4);
  }
  if (fwrite(output, 3, n, fout) != n) {
    fprintf(stderr, "Unable to write\n");
    return 0;
  }
  bytes += n * 4;
  return 1;
}


x86 assembly (clang, -O0):
<processBytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x720,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x4,%esi
mov    $0x100,%edx
call   1030 <fread@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x1,-0x20(%rbp)
jge    119a <processBytes+0x5a>
mov    0x2ec4(%rip),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1532 <processBytes+0x3f2>
cmpl   $0x0,0x2ea3(%rip)
jne    129f <processBytes+0x15f>
movzbl -0x420(%rbp),%eax
and    $0xc0,%eax
mov    %al,0x2e8f(%rip)
movzbl -0x41f(%rbp),%eax
and    $0xc0,%eax
mov    %al,0x2e7e(%rip)
movzbl -0x41e(%rbp),%eax
and    $0xc0,%eax
mov    %al,0x2e6d(%rip)
movzbl -0x41d(%rbp),%eax
and    $0xc0,%eax
mov    %al,0x2e5c(%rip)
movzbl 0x2e53(%rip),%eax
movzbl 0x2e4b(%rip),%ecx
add    $0x40,%ecx
and    $0xc0,%ecx
cmp    %ecx,%eax
je     1228 <processBytes+0xe8>
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1532 <processBytes+0x3f2>
movzbl 0x2e1b(%rip),%eax
movzbl 0x2e13(%rip),%ecx
add    $0x40,%ecx
and    $0xc0,%ecx
cmp    %ecx,%eax
je     1261 <processBytes+0x121>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1532 <processBytes+0x3f2>
movzbl 0x2de3(%rip),%eax
movzbl 0x2ddb(%rip),%ecx
add    $0x40,%ecx
and    $0xc0,%ecx
cmp    %ecx,%eax
je     129a <processBytes+0x15a>
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1532 <processBytes+0x3f2>
jmp    129f <processBytes+0x15f>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13e1 <processBytes+0x2a1>
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
add    $0x0,%eax
cltq
movzbl -0x420(%rbp,%rax,1),%eax
ff
and    $0xc0,%eax
movzbl 0x2d77(%rip),%ecx
cmp    %ecx,%eax
je     12f9 <processBytes+0x1b9>
mov    0x2d65(%rip),%esi
lea    0xd3b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1532 <processBytes+0x3f2>
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
add    $0x1,%eax
cltq
movzbl -0x420(%rbp,%rax,1),%eax
ff
and    $0xc0,%eax
movzbl 0x2d31(%rip),%ecx
cmp    %ecx,%eax
je     1340 <processBytes+0x200>
mov    0x2d1e(%rip),%esi
lea    0xd12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1532 <processBytes+0x3f2>
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
add    $0x2,%eax
cltq
movzbl -0x420(%rbp,%rax,1),%eax
ff
and    $0xc0,%eax
movzbl 0x2ceb(%rip),%ecx
cmp    %ecx,%eax
je     1387 <processBytes+0x247>
mov    0x2cd7(%rip),%esi
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1532 <processBytes+0x3f2>
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
add    $0x3,%eax
cltq
movzbl -0x420(%rbp,%rax,1),%eax
ff
and    $0xc0,%eax
movzbl 0x2ca5(%rip),%ecx
cmp    %ecx,%eax
je     13ce <processBytes+0x28e>
mov    0x2c90(%rip),%esi
lea    0xcc0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1532 <processBytes+0x3f2>
jmp    13d3 <processBytes+0x293>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12a6 <processBytes+0x166>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    14d7 <processBytes+0x397>
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
add    $0x1,%eax
cltq
movzbl -0x420(%rbp,%rax,1),%eax
ff
and    $0x3f,%eax
shl    $0x6,%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movzbl -0x420(%rbp,%rcx,1),%ecx
ff
and    $0x3f,%ecx
sar    $0x0,%ecx
or     %ecx,%eax
mov    %al,%cl
imul   $0x3,-0x1c(%rbp),%eax
add    $0x0,%eax
cltq
mov    %cl,-0x720(%rbp,%rax,1)
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
add    $0x2,%eax
cltq
movzbl -0x420(%rbp,%rax,1),%eax
ff
and    $0x3f,%eax
shl    $0x4,%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movzbl -0x420(%rbp,%rcx,1),%ecx
ff
and    $0x3f,%ecx
sar    $0x2,%ecx
or     %ecx,%eax
mov    %al,%cl
imul   $0x3,-0x1c(%rbp),%eax
add    $0x1,%eax
cltq
mov    %cl,-0x720(%rbp,%rax,1)
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
add    $0x3,%eax
cltq
movzbl -0x420(%rbp,%rax,1),%eax
ff
and    $0x3f,%eax
shl    $0x2,%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movzbl -0x420(%rbp,%rcx,1),%ecx
ff
and    $0x3f,%ecx
sar    $0x4,%ecx
or     %ecx,%eax
mov    %al,%cl
imul   $0x3,-0x1c(%rbp),%eax
add    $0x2,%eax
cltq
mov    %cl,-0x720(%rbp,%rax,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13e8 <processBytes+0x2a8>
lea    -0x720(%rbp),%rdi
mov    -0x20(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x3,%esi
call   1060 <fwrite@plt>
cmp    -0x20(%rbp),%eax
je     1519 <processBytes+0x3d9>
mov    0x2ae1(%rip),%rax
mov    (%rax),%edi
lea    0xb91(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1532 <processBytes+0x3f2>
mov    -0x20(%rbp),%eax
shl    $0x2,%eax
add    0x2b1f(%rip),%eax
mov    %eax,0x2b19(%rip)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x720,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processBytes>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x708,%rsp
mov    %rsi,%r14
mov    %rdi,%rcx
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0x100,%edx
call   1040 <fread@plt>
mov    0x2ed1(%rip),%esi
test   %eax,%eax
jle    128f <processBytes+0x13f>
mov    %eax,%r15d
test   %esi,%esi
je     12a4 <processBytes+0x154>
mov    0x2ebc(%rip),%cl
mov    0x2eb7(%rip),%dl
mov    0x2eb1(%rip),%r8b
mov    0x2eac(%rip),%al
mov    %r15d,%edi
xor    %ebp,%ebp
nopl   0x0(%rax)
movzbl (%rsp,%rbp,4),%ebx
and    $0xc0,%bl
cmp    %cl,%bl
jne    1300 <processBytes+0x1b0>
movzbl 0x1(%rsp,%rbp,4),%ebx
and    $0xc0,%bl
cmp    %dl,%bl
jne    1309 <processBytes+0x1b9>
movzbl 0x2(%rsp,%rbp,4),%ebx
and    $0xc0,%bl
cmp    %r8b,%bl
jne    1312 <processBytes+0x1c2>
movzbl 0x3(%rsp,%rbp,4),%ebx
and    $0xc0,%bl
cmp    %al,%bl
jne    131e <processBytes+0x1ce>
add    $0x1,%rbp
cmp    %rbp,%rdi
jne    11b0 <processBytes+0x60>
lea    0x402(%rsp),%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rsp,%rdx,4),%ebx
movzbl 0x1(%rsp,%rdx,4),%eax
mov    %eax,%ecx
shl    $0x6,%cl
and    $0x3f,%bl
or     %cl,%bl
mov    %bl,-0x2(%rsi)
movzbl 0x2(%rsp,%rdx,4),%ecx
mov    %ecx,%ebx
shl    $0x4,%bl
shr    $0x2,%al
and    $0xf,%al
or     %bl,%al
mov    %al,-0x1(%rsi)
movzbl 0x3(%rsp,%rdx,4),%eax
shl    $0x2,%al
shr    $0x4,%cl
and    $0x3,%cl
or     %al,%cl
mov    %cl,(%rsi)
add    $0x1,%rdx
add    $0x3,%rsi
cmp    %rdx,%rdi
jne    1210 <processBytes+0xc0>
lea    0x400(%rsp),%rdi
mov    $0x3,%esi
mov    %r15d,%edx
mov    %r14,%rcx
call   1070 <fwrite@plt>
cmp    %r15d,%eax
jne    1348 <processBytes+0x1f8>
shl    $0x2,%r15d
add    %r15d,0x2dc7(%rip)
mov    $0x1,%ebx
jmp    1338 <processBytes+0x1e8>
lea    0xd74(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1338 <processBytes+0x1e8>
mov    (%rsp),%bl
mov    0x1(%rsp),%al
and    $0xc0,%bl
mov    %bl,0x2d9c(%rip)
and    $0xc0,%al
mov    %al,0x2d95(%rip)
mov    0x2(%rsp),%cl
and    $0xc0,%cl
mov    %cl,0x2d89(%rip)
mov    0x3(%rsp),%dl
and    $0xc0,%dl
mov    %dl,0x2d7d(%rip)
add    $0x40,%bl
cmp    %bl,%al
jne    12f7 <processBytes+0x1a7>
add    $0x40,%al
cmp    %al,%cl
jne    132a <processBytes+0x1da>
add    $0x40,%cl
cmp    %cl,%dl
je     118e <processBytes+0x3e>
lea    0xd94(%rip),%rdi
jmp    1331 <processBytes+0x1e1>
lea    0xd9f(%rip),%rdi
jmp    1331 <processBytes+0x1e1>
lea    0xcf9(%rip),%rdi
jmp    1296 <processBytes+0x146>
lea    0xd0e(%rip),%rdi
jmp    1296 <processBytes+0x146>
lea    0xd23(%rip),%rdi
jmp    1296 <processBytes+0x146>
lea    0xd35(%rip),%rdi
jmp    1296 <processBytes+0x146>
lea    0xd62(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x708,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c91(%rip),%rax
mov    (%rax),%edi
lea    0xd20(%rip),%rsi
call   1060 <fprintf@plt>
jmp    1336 <processBytes+0x1e6>

LLVM IR (-O0):
@processBytes.bytes = internal global i32 0
@processBytes.mask0 = internal global i8 0
@processBytes.mask1 = internal global i8 0
@processBytes.mask2 = internal global i8 0
@processBytes.mask3 = internal global i8 0
@.str = [20 x i8] c"%i bytes processed\0A\00"
@.str.1 = [11 x i8] c"Bad mask1\0A\00"
@.str.2 = [11 x i8] c"Bad mask2\0A\00"
@.str.3 = [11 x i8] c"Bad mask3\0A\00"
@.str.4 = [30 x i8] c"mismatch0 %i bytes processed\0A\00"
@.str.5 = [30 x i8] c"mismatch1 %i bytes processed\0A\00"
@.str.6 = [30 x i8] c"mismatch2 %i bytes processed\0A\00"
@.str.7 = [30 x i8] c"mismatch3 %i bytes processed\0A\00"
@stderr = global i32 0
@.str.8 = [17 x i8] c"Unable to write\0A\00"
define i32 @processBytes(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca [1024 x i8]
%9 = alloca [768 x i8]
store i32* %0, i32** %4
store i32* %1, i32** %5
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%11 = load i32*, i32** %4
%12 = call i32 @fread(i8* %10, i32 4, i32 256, i32* %11)
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = icmp slt i32 %13, 1
br i1 %14, label %15, label %18
15: ; preds = %2
%16 = load i32, i32* @processBytes.bytes
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %16)
store i32 0, i32* %3
br label %240
18: ; preds = %2
%19 = load i32, i32* @processBytes.bytes
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %72
21: ; preds = %18
%22 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = and i32 %24, 192
%26 = trunc i32 %25 to i8
store i8 %26, i8* @processBytes.mask0
%27 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 1
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = and i32 %29, 192
%31 = trunc i32 %30 to i8
store i8 %31, i8* @processBytes.mask1
%32 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 2
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = and i32 %34, 192
%36 = trunc i32 %35 to i8
store i8 %36, i8* @processBytes.mask2
%37 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 3
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = and i32 %39, 192
%41 = trunc i32 %40 to i8
store i8 %41, i8* @processBytes.mask3
%42 = load i8, i8* @processBytes.mask1
%43 = zext i8 %42 to i32
%44 = load i8, i8* @processBytes.mask0
%45 = zext i8 %44 to i32
%46 = add nsw i32 %45, 64
%47 = and i32 %46, 192
%48 = icmp ne i32 %43, %47
br i1 %48, label %49, label %51
49: ; preds = %21
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %240
51: ; preds = %21
%52 = load i8, i8* @processBytes.mask2
%53 = zext i8 %52 to i32
%54 = load i8, i8* @processBytes.mask1
%55 = zext i8 %54 to i32
%56 = add nsw i32 %55, 64
%57 = and i32 %56, 192
%58 = icmp ne i32 %53, %57
br i1 %58, label %59, label %61
59: ; preds = %51
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %240
61: ; preds = %51
%62 = load i8, i8* @processBytes.mask3
%63 = zext i8 %62 to i32
%64 = load i8, i8* @processBytes.mask2
%65 = zext i8 %64 to i32
%66 = add nsw i32 %65, 64
%67 = and i32 %66, 192
%68 = icmp ne i32 %63, %67
br i1 %68, label %69, label %71
69: ; preds = %61
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %3
br label %240
71: ; preds = %61
br label %72
72: ; preds = %71, %18
store i32 0, i32* %6
br label %73
73: ; preds = %138, %72
%74 = load i32, i32* %6
%75 = load i32, i32* %7
%76 = icmp slt i32 %74, %75
br i1 %76, label %77, label %141
77: ; preds = %73
%78 = load i32, i32* %6
%79 = mul nsw i32 %78, 4
%80 = add nsw i32 %79, 0
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %81
%83 = load i8, i8* %82
%84 = zext i8 %83 to i32
%85 = and i32 %84, 192
%86 = load i8, i8* @processBytes.mask0
%87 = zext i8 %86 to i32
%88 = icmp ne i32 %85, %87
br i1 %88, label %89, label %92
89: ; preds = %77
%90 = load i32, i32* @processBytes.bytes
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %90)
store i32 0, i32* %3
br label %240
92: ; preds = %77
%93 = load i32, i32* %6
%94 = mul nsw i32 %93, 4
%95 = add nsw i32 %94, 1
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %96
%98 = load i8, i8* %97
%99 = zext i8 %98 to i32
%100 = and i32 %99, 192
%101 = load i8, i8* @processBytes.mask1
%102 = zext i8 %101 to i32
%103 = icmp ne i32 %100, %102
br i1 %103, label %104, label %107
104: ; preds = %92
%105 = load i32, i32* @processBytes.bytes
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 %105)
store i32 0, i32* %3
br label %240
107: ; preds = %92
%108 = load i32, i32* %6
%109 = mul nsw i32 %108, 4
%110 = add nsw i32 %109, 2
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %111
%113 = load i8, i8* %112
%114 = zext i8 %113 to i32
%115 = and i32 %114, 192
%116 = load i8, i8* @processBytes.mask2
%117 = zext i8 %116 to i32
%118 = icmp ne i32 %115, %117
br i1 %118, label %119, label %122
119: ; preds = %107
%120 = load i32, i32* @processBytes.bytes
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i32 %120)
store i32 0, i32* %3
br label %240
122: ; preds = %107
%123 = load i32, i32* %6
%124 = mul nsw i32 %123, 4
%125 = add nsw i32 %124, 3
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %126
%128 = load i8, i8* %127
%129 = zext i8 %128 to i32
%130 = and i32 %129, 192
%131 = load i8, i8* @processBytes.mask3
%132 = zext i8 %131 to i32
%133 = icmp ne i32 %130, %132
br i1 %133, label %134, label %137
134: ; preds = %122
%135 = load i32, i32* @processBytes.bytes
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 %135)
store i32 0, i32* %3
br label %240
137: ; preds = %122
br label %138
138: ; preds = %137
%139 = load i32, i32* %6
%140 = add nsw i32 %139, 1
store i32 %140, i32* %6
br label %73
141: ; preds = %73
store i32 0, i32* %6
br label %142
142: ; preds = %222, %141
%143 = load i32, i32* %6
%144 = load i32, i32* %7
%145 = icmp slt i32 %143, %144
br i1 %145, label %146, label %225
146: ; preds = %142
%147 = load i32, i32* %6
%148 = mul nsw i32 %147, 4
%149 = add nsw i32 %148, 1
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %150
%152 = load i8, i8* %151
%153 = zext i8 %152 to i32
%154 = and i32 %153, 63
%155 = shl i32 %154, 6
%156 = load i32, i32* %6
%157 = mul nsw i32 %156, 4
%158 = add nsw i32 %157, 0
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %159
%161 = load i8, i8* %160
%162 = zext i8 %161 to i32
%163 = and i32 %162, 63
%164 = ashr i32 %163, 0
%165 = or i32 %155, %164
%166 = trunc i32 %165 to i8
%167 = load i32, i32* %6
%168 = mul nsw i32 %167, 3
%169 = add nsw i32 %168, 0
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds [768 x i8], [768 x i8]* %9, i64 0, i64 %170
store i8 %166, i8* %171
%172 = load i32, i32* %6
%173 = mul nsw i32 %172, 4
%174 = add nsw i32 %173, 2
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %175
%177 = load i8, i8* %176
%178 = zext i8 %177 to i32
%179 = and i32 %178, 63
%180 = shl i32 %179, 4
%181 = load i32, i32* %6
%182 = mul nsw i32 %181, 4
%183 = add nsw i32 %182, 1
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %184
%186 = load i8, i8* %185
%187 = zext i8 %186 to i32
%188 = and i32 %187, 63
%189 = ashr i32 %188, 2
%190 = or i32 %180, %189
%191 = trunc i32 %190 to i8
%192 = load i32, i32* %6
%193 = mul nsw i32 %192, 3
%194 = add nsw i32 %193, 1
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds [768 x i8], [768 x i8]* %9, i64 0, i64 %195
store i8 %191, i8* %196
%197 = load i32, i32* %6
%198 = mul nsw i32 %197, 4
%199 = add nsw i32 %198, 3
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %200
%202 = load i8, i8* %201
%203 = zext i8 %202 to i32
%204 = and i32 %203, 63
%205 = shl i32 %204, 2
%206 = load i32, i32* %6
%207 = mul nsw i32 %206, 4
%208 = add nsw i32 %207, 2
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 %209
%211 = load i8, i8* %210
%212 = zext i8 %211 to i32
%213 = and i32 %212, 63
%214 = ashr i32 %213, 4
%215 = or i32 %205, %214
%216 = trunc i32 %215 to i8
%217 = load i32, i32* %6
%218 = mul nsw i32 %217, 3
%219 = add nsw i32 %218, 2
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds [768 x i8], [768 x i8]* %9, i64 0, i64 %220
store i8 %216, i8* %221
br label %222
222: ; preds = %146
%223 = load i32, i32* %6
%224 = add nsw i32 %223, 1
store i32 %224, i32* %6
br label %142
225: ; preds = %142
%226 = getelementptr inbounds [768 x i8], [768 x i8]* %9, i64 0, i64 0
%227 = load i32, i32* %7
%228 = load i32*, i32** %5
%229 = call i32 @fwrite(i8* %226, i32 3, i32 %227, i32* %228)
%230 = load i32, i32* %7
%231 = icmp ne i32 %229, %230
br i1 %231, label %232, label %235
232: ; preds = %225
%233 = load i32, i32* @stderr
%234 = call i32 @fprintf(i32 %233, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %3
br label %240
235: ; preds = %225
%236 = load i32, i32* %7
%237 = mul nsw i32 %236, 4
%238 = load i32, i32* @processBytes.bytes
%239 = add nsw i32 %238, %237
store i32 %239, i32* @processBytes.bytes
store i32 1, i32* %3
br label %240
240: ; preds = %235, %232, %134, %119, %104, %89, %69, %59, %49, %15
%241 = load i32, i32* %3
ret i32 %241
}

LLVM IR (-O2):
@processBytes.bytes = internal unnamed_addr global i32 0
@processBytes.mask0 = internal unnamed_addr global i8 0
@processBytes.mask1 = internal unnamed_addr global i8 0
@processBytes.mask2 = internal unnamed_addr global i8 0
@processBytes.mask3 = internal unnamed_addr global i8 0
@.str = [20 x i8] c"%i bytes processed\0A\00"
@.str.4 = [30 x i8] c"mismatch0 %i bytes processed\0A\00"
@.str.5 = [30 x i8] c"mismatch1 %i bytes processed\0A\00"
@.str.6 = [30 x i8] c"mismatch2 %i bytes processed\0A\00"
@.str.7 = [30 x i8] c"mismatch3 %i bytes processed\0A\00"
@stderr = global i32 0
@.str.8 = [17 x i8] c"Unable to write\0A\00"
@str = [10 x i8] c"Bad mask3\00"
@str.9 = [10 x i8] c"Bad mask2\00"
@str.10 = [10 x i8] c"Bad mask1\00"
define i32 @processBytes(i32* nocapture %0, i32* nocapture %1) {
%3 = alloca [1024 x i8]
%4 = alloca [768 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [768 x i8], [768 x i8]* %4, i64 0, i64 0
%7 = call i32 @fread(i8* %5, i32 4, i32 256, i32* %0)
%8 = icmp slt i32 %7, 1
%9 = load i32, i32* @processBytes.bytes
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %127
12: ; preds = %2
%13 = icmp eq i32 %9, 0
br i1 %13, label %14, label %40
14: ; preds = %12
%15 = load i8, i8* %5
%16 = and i8 %15, -64
store i8 %16, i8* @processBytes.mask0
%17 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 1
%18 = load i8, i8* %17
%19 = and i8 %18, -64
store i8 %19, i8* @processBytes.mask1
%20 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 2
%21 = load i8, i8* %20
%22 = and i8 %21, -64
store i8 %22, i8* @processBytes.mask2
%23 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 3
%24 = load i8, i8* %23
%25 = and i8 %24, -64
store i8 %25, i8* @processBytes.mask3
%26 = add i8 %16, 64
%27 = icmp eq i8 %19, %26
br i1 %27, label %30, label %28
28: ; preds = %14
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.10, i64 0, i64 0))
br label %127
30: ; preds = %14
%31 = add i8 %19, 64
%32 = icmp eq i8 %22, %31
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.9, i64 0, i64 0))
br label %127
35: ; preds = %30
%36 = add i8 %22, 64
%37 = icmp eq i8 %25, %36
br i1 %37, label %40, label %38
38: ; preds = %35
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %127
40: ; preds = %12, %35
%41 = load i8, i8* @processBytes.mask0
%42 = load i8, i8* @processBytes.mask1
%43 = load i8, i8* @processBytes.mask2
%44 = load i8, i8* @processBytes.mask3
%45 = zext i32 %7 to i64
br label %50
46: ; preds = %75
%47 = icmp eq i64 %81, %45
br i1 %47, label %48, label %50
48: ; preds = %46
%49 = zext i32 %7 to i64
br label %84
50: ; preds = %40, %46
%51 = phi i64 [ 0, %40 ], [ %81, %46 ]
%52 = shl nsw i64 %51, 2
%53 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %52
%54 = load i8, i8* %53
%55 = and i8 %54, -64
%56 = icmp eq i8 %55, %41
br i1 %56, label %59, label %57
57: ; preds = %50
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %9)
br label %127
59: ; preds = %50
%60 = or i64 %52, 1
%61 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %60
%62 = load i8, i8* %61
%63 = and i8 %62, -64
%64 = icmp eq i8 %63, %42
br i1 %64, label %67, label %65
65: ; preds = %59
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 %9)
br label %127
67: ; preds = %59
%68 = or i64 %52, 2
%69 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %68
%70 = load i8, i8* %69
%71 = and i8 %70, -64
%72 = icmp eq i8 %71, %43
br i1 %72, label %75, label %73
73: ; preds = %67
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i32 %9)
br label %127
75: ; preds = %67
%76 = or i64 %52, 3
%77 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %76
%78 = load i8, i8* %77
%79 = and i8 %78, -64
%80 = icmp eq i8 %79, %44
%81 = add nuw nsw i64 %51, 1
br i1 %80, label %46, label %82
82: ; preds = %75
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 %9)
br label %127
84: ; preds = %48, %84
%85 = phi i64 [ 0, %48 ], [ %115, %84 ]
%86 = shl nsw i64 %85, 2
%87 = or i64 %86, 1
%88 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %87
%89 = load i8, i8* %88
%90 = shl i8 %89, 6
%91 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %86
%92 = load i8, i8* %91
%93 = and i8 %92, 63
%94 = or i8 %93, %90
%95 = mul nuw nsw i64 %85, 3
%96 = getelementptr inbounds [768 x i8], [768 x i8]* %4, i64 0, i64 %95
store i8 %94, i8* %96
%97 = or i64 %86, 2
%98 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %97
%99 = load i8, i8* %98
%100 = shl i8 %99, 4
%101 = lshr i8 %89, 2
%102 = and i8 %101, 15
%103 = or i8 %100, %102
%104 = add nuw nsw i64 %95, 1
%105 = getelementptr inbounds [768 x i8], [768 x i8]* %4, i64 0, i64 %104
store i8 %103, i8* %105
%106 = or i64 %86, 3
%107 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %106
%108 = load i8, i8* %107
%109 = shl i8 %108, 2
%110 = lshr i8 %99, 4
%111 = and i8 %110, 3
%112 = or i8 %109, %111
%113 = add nuw nsw i64 %95, 2
%114 = getelementptr inbounds [768 x i8], [768 x i8]* %4, i64 0, i64 %113
store i8 %112, i8* %114
%115 = add nuw nsw i64 %85, 1
%116 = icmp eq i64 %115, %49
br i1 %116, label %117, label %84
117: ; preds = %84
%118 = call i32 @fwrite(i8* %6, i32 3, i32 %7, i32* %1)
%119 = icmp eq i32 %118, %7
br i1 %119, label %123, label %120
120: ; preds = %117
%121 = load i32, i32* @stderr
%122 = tail call i32 @fprintf(i32 %121, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
br label %127
123: ; preds = %117
%124 = shl nsw i32 %7, 2
%125 = load i32, i32* @processBytes.bytes
%126 = add nsw i32 %125, %124
store i32 %126, i32* @processBytes.bytes
br label %127
127: ; preds = %123, %120, %82, %73, %65, %57, %38, %33, %28, %10
%128 = phi i32 [ 0, %10 ], [ 0, %28 ], [ 0, %33 ], [ 0, %38 ], [ 0, %57 ], [ 0, %65 ], [ 0, %73 ], [ 0, %82 ], [ 0, %120 ], [ 1, %123 ]
ret i32 %128
}