#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int i, j, count = 0;
  unsigned char c[16] = {0};
  FILE *fp;
  fp = fopen(argv[1], "rb");
  while ((j = fread(c, 1, 16, fp)) > 0) {
    for (i = 0; i < 16; i++) {
      if (c[i] == 0)
        printf("%d 00\n", count);
      if (c[i] == 255)
        printf("%d FF\n", count);
    }
    count++;
  }
  fclose(fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1060 <memset@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe74(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rcx
mov    $0x1,%esi
mov    $0x10,%edx
call   1030 <fread@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jle    122e <main+0xde>
movl   $0x0,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jge    1220 <main+0xd0>
movslq -0x14(%rbp),%rax
movzbl -0x30(%rbp,%rax,1),%eax
cmp    $0x0,%eax
jne    11ea <main+0x9a>
mov    -0x1c(%rbp),%esi
lea    0xe1e(%rip),%rdi
call   1050 <printf@plt>
movslq -0x14(%rbp),%rax
movzbl -0x30(%rbp,%rax,1),%eax
cmp    $0xff,%eax
jne    120d <main+0xbd>
mov    -0x1c(%rbp),%esi
lea    0xe02(%rip),%rdi
call   1050 <printf@plt>
jmp    1212 <main+0xc2>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11bf <main+0x6f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1195 <main+0x45>
mov    -0x38(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    0x8(%rsi),%rdi
lea    0xea2(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r15
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x10,%edx
mov    %rax,%rcx
call   1030 <fread@plt>
test   %eax,%eax
jle    136c <main+0x22c>
xor    %ebp,%ebp
lea    0xe77(%rip),%rbx
mov    %rsp,%r14
lea    0xe74(%rip),%r12
jmp    11c7 <main+0x87>
nopl   0x0(%rax,%rax,1)
mov    %ebp,%esi
call   1050 <printf@plt>
add    $0x1,%ebp
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x10,%edx
mov    %r15,%rcx
call   1030 <fread@plt>
test   %eax,%eax
jle    136c <main+0x22c>
movzbl (%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     11d9 <main+0x99>
cmp    $0xff,%al
jne    11e0 <main+0xa0>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0x1(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     11f3 <main+0xb3>
cmp    $0xff,%al
jne    11fa <main+0xba>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0x2(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     120d <main+0xcd>
cmp    $0xff,%al
jne    1214 <main+0xd4>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0x3(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     1227 <main+0xe7>
cmp    $0xff,%al
jne    122e <main+0xee>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0x4(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     1241 <main+0x101>
cmp    $0xff,%al
jne    1248 <main+0x108>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0x5(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     125b <main+0x11b>
cmp    $0xff,%al
jne    1262 <main+0x122>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0x6(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     1275 <main+0x135>
cmp    $0xff,%al
jne    127c <main+0x13c>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0x7(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     128f <main+0x14f>
cmp    $0xff,%al
jne    1296 <main+0x156>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0x8(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     12a9 <main+0x169>
cmp    $0xff,%al
jne    12b0 <main+0x170>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0x9(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     12c3 <main+0x183>
cmp    $0xff,%al
jne    12ca <main+0x18a>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0xa(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     12dd <main+0x19d>
cmp    $0xff,%al
jne    12e4 <main+0x1a4>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0xb(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     12f7 <main+0x1b7>
cmp    $0xff,%al
jne    12fe <main+0x1be>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0xc(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     1311 <main+0x1d1>
cmp    $0xff,%al
jne    1318 <main+0x1d8>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0xd(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     132b <main+0x1eb>
cmp    $0xff,%al
jne    1332 <main+0x1f2>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0xe(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     1345 <main+0x205>
cmp    $0xff,%al
jne    134c <main+0x20c>
mov    %r12,%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
movzbl 0xf(%rsp),%eax
mov    %rbx,%rdi
test   %al,%al
je     11a0 <main+0x60>
cmp    $0xff,%al
jne    11a7 <main+0x67>
mov    %r12,%rdi
jmp    11a0 <main+0x60>
mov    %r15,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@.str.1 = [7 x i8] c"%d 00\0A\00"
@.str.2 = [7 x i8] c"%d FF\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [16 x i8]
%10 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
%11 = bitcast [16 x i8]* %9 to i8*
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32* @fopen(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %15, i32** %10
br label %16
16: ; preds = %49, %2
%17 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%18 = load i32*, i32** %10
%19 = call i32 @fread(i8* %17, i32 1, i32 16, i32* %18)
store i32 %19, i32* %7
%20 = icmp sgt i32 %19, 0
br i1 %20, label %21, label %52
21: ; preds = %16
store i32 0, i32* %6
br label %22
22: ; preds = %46, %21
%23 = load i32, i32* %6
%24 = icmp slt i32 %23, 16
br i1 %24, label %25, label %49
25: ; preds = %22
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 %27
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %25
%33 = load i32, i32* %8
%34 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %32, %25
%36 = load i32, i32* %6
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 %37
%39 = load i8, i8* %38
%40 = zext i8 %39 to i32
%41 = icmp eq i32 %40, 255
br i1 %41, label %42, label %45
42: ; preds = %35
%43 = load i32, i32* %8
%44 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %43)
br label %45
45: ; preds = %42, %35
br label %46
46: ; preds = %45
%47 = load i32, i32* %6
%48 = add nsw i32 %47, 1
store i32 %48, i32* %6
br label %22
49: ; preds = %22
%50 = load i32, i32* %8
%51 = add nsw i32 %50, 1
store i32 %51, i32* %8
br label %16
52: ; preds = %16
%53 = load i32*, i32** %10
%54 = call i32 @fclose(i32* %53)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@.str.1 = [7 x i8] c"%d 00\0A\00"
@.str.2 = [7 x i8] c"%d FF\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32* @fopen(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @fread(i8* %4, i32 1, i32 16, i32* %7)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %128
10: ; preds = %2
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 1
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 2
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 3
%15 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 4
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 5
%17 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 6
%18 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 7
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 8
%20 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 9
%21 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 10
%22 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 11
%23 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 12
%24 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 13
%25 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 14
%26 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 15
br label %27
27: ; preds = %10, %124
%28 = phi i32 [ %125, %124 ], [ 0, %10 ]
%29 = load i8, i8* %11
switch i8 %29, label %34 [
i8 0, label %31
i8 -1, label %30
]
30: ; preds = %27
br label %31
31: ; preds = %27, %30
%32 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %30 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %27 ]
%33 = tail call i32 @printf(i8* %32, i32 %28)
br label %34
34: ; preds = %31, %27
%35 = load i8, i8* %12
switch i8 %35, label %40 [
i8 0, label %37
i8 -1, label %36
]
36: ; preds = %34
br label %37
37: ; preds = %36, %34
%38 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %36 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %34 ]
%39 = tail call i32 @printf(i8* %38, i32 %28)
br label %40
40: ; preds = %37, %34
%41 = load i8, i8* %13
switch i8 %41, label %46 [
i8 0, label %43
i8 -1, label %42
]
42: ; preds = %40
br label %43
43: ; preds = %42, %40
%44 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %42 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %40 ]
%45 = tail call i32 @printf(i8* %44, i32 %28)
br label %46
46: ; preds = %43, %40
%47 = load i8, i8* %14
switch i8 %47, label %52 [
i8 0, label %49
i8 -1, label %48
]
48: ; preds = %46
br label %49
49: ; preds = %48, %46
%50 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %48 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %46 ]
%51 = tail call i32 @printf(i8* %50, i32 %28)
br label %52
52: ; preds = %49, %46
%53 = load i8, i8* %15
switch i8 %53, label %58 [
i8 0, label %55
i8 -1, label %54
]
54: ; preds = %52
br label %55
55: ; preds = %54, %52
%56 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %54 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %52 ]
%57 = tail call i32 @printf(i8* %56, i32 %28)
br label %58
58: ; preds = %55, %52
%59 = load i8, i8* %16
switch i8 %59, label %64 [
i8 0, label %61
i8 -1, label %60
]
60: ; preds = %58
br label %61
61: ; preds = %60, %58
%62 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %60 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %58 ]
%63 = tail call i32 @printf(i8* %62, i32 %28)
br label %64
64: ; preds = %61, %58
%65 = load i8, i8* %17
switch i8 %65, label %70 [
i8 0, label %67
i8 -1, label %66
]
66: ; preds = %64
br label %67
67: ; preds = %66, %64
%68 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %66 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %64 ]
%69 = tail call i32 @printf(i8* %68, i32 %28)
br label %70
70: ; preds = %67, %64
%71 = load i8, i8* %18
switch i8 %71, label %76 [
i8 0, label %73
i8 -1, label %72
]
72: ; preds = %70
br label %73
73: ; preds = %72, %70
%74 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %72 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %70 ]
%75 = tail call i32 @printf(i8* %74, i32 %28)
br label %76
76: ; preds = %73, %70
%77 = load i8, i8* %19
switch i8 %77, label %82 [
i8 0, label %79
i8 -1, label %78
]
78: ; preds = %76
br label %79
79: ; preds = %78, %76
%80 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %78 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %76 ]
%81 = tail call i32 @printf(i8* %80, i32 %28)
br label %82
82: ; preds = %79, %76
%83 = load i8, i8* %20
switch i8 %83, label %88 [
i8 0, label %85
i8 -1, label %84
]
84: ; preds = %82
br label %85
85: ; preds = %84, %82
%86 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %84 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %82 ]
%87 = tail call i32 @printf(i8* %86, i32 %28)
br label %88
88: ; preds = %85, %82
%89 = load i8, i8* %21
switch i8 %89, label %94 [
i8 0, label %91
i8 -1, label %90
]
90: ; preds = %88
br label %91
91: ; preds = %90, %88
%92 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %90 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %88 ]
%93 = tail call i32 @printf(i8* %92, i32 %28)
br label %94
94: ; preds = %91, %88
%95 = load i8, i8* %22
switch i8 %95, label %100 [
i8 0, label %97
i8 -1, label %96
]
96: ; preds = %94
br label %97
97: ; preds = %96, %94
%98 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %96 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %94 ]
%99 = tail call i32 @printf(i8* %98, i32 %28)
br label %100
100: ; preds = %97, %94
%101 = load i8, i8* %23
switch i8 %101, label %106 [
i8 0, label %103
i8 -1, label %102
]
102: ; preds = %100
br label %103
103: ; preds = %102, %100
%104 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %102 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %100 ]
%105 = tail call i32 @printf(i8* %104, i32 %28)
br label %106
106: ; preds = %103, %100
%107 = load i8, i8* %24
switch i8 %107, label %112 [
i8 0, label %109
i8 -1, label %108
]
108: ; preds = %106
br label %109
109: ; preds = %108, %106
%110 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %108 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %106 ]
%111 = tail call i32 @printf(i8* %110, i32 %28)
br label %112
112: ; preds = %109, %106
%113 = load i8, i8* %25
switch i8 %113, label %118 [
i8 0, label %115
i8 -1, label %114
]
114: ; preds = %112
br label %115
115: ; preds = %114, %112
%116 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %114 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %112 ]
%117 = tail call i32 @printf(i8* %116, i32 %28)
br label %118
118: ; preds = %115, %112
%119 = load i8, i8* %26
switch i8 %119, label %124 [
i8 0, label %121
i8 -1, label %120
]
120: ; preds = %118
br label %121
121: ; preds = %120, %118
%122 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %120 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %118 ]
%123 = tail call i32 @printf(i8* %122, i32 %28)
br label %124
124: ; preds = %121, %118
%125 = add nuw nsw i32 %28, 1
%126 = call i32 @fread(i8* %4, i32 1, i32 16, i32* %7)
%127 = icmp sgt i32 %126, 0
br i1 %127, label %27, label %128
128: ; preds = %124, %2
%129 = tail call i32 @fclose(i32* %7)
ret i32 0
}