#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 */

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int fread(unsigned char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  int i, j, k;
  unsigned char temp;
  for (i = 0; i < 128; i++) {
    if ((i >= 0x20) && (i < 127))
      printf("; Char : 0x%x %c\n", i, i);
    else
      printf("; Char : 0x%x\n", i);
    for (j = 0; j < 16; j++) {
      if (fread(&temp, 1, 1, stdin) < 1)
        return -1;
      if (j < 8) {
        fprintf(stdout, ".byte $%02x,$%02x\t", temp, temp);
        fprintf(stdout, "; ");
        for (k = 0; k < 8; k++) {
          if ((1 << (7 - k)) & temp) {
            printf("#");
          } else {
            printf(" ");
          }
        }
        fprintf(stdout, "\n");
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x80,-0x14(%rbp)
jge    12b7 <main+0x187>
cmpl   $0x20,-0x14(%rbp)
jl     1187 <main+0x57>
cmpl   $0x7f,-0x14(%rbp)
jge    1187 <main+0x57>
mov    -0x14(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1198 <main+0x68>
mov    -0x14(%rbp),%esi
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x10,-0x18(%rbp)
jge    12a4 <main+0x174>
mov    0x2e38(%rip),%rax
mov    (%rax),%ecx
lea    -0x1d(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
cmp    $0x1,%eax
jge    11d7 <main+0xa7>
movl   $0xffffffff,-0x4(%rbp)
jmp    12be <main+0x18e>
cmpl   $0x8,-0x18(%rbp)
jge    1291 <main+0x161>
mov    0x2df0(%rip),%rax
mov    (%rax),%edi
movzbl -0x1d(%rbp),%edx
movzbl -0x1d(%rbp),%ecx
lea    0xe28(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2dd1(%rip),%rax
mov    (%rax),%edi
lea    0xe24(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x8,-0x1c(%rbp)
jge    127a <main+0x14a>
mov    $0x7,%ecx
sub    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
movzbl -0x1d(%rbp),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1259 <main+0x129>
lea    0xdea(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1267 <main+0x137>
lea    0xdd5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    126c <main+0x13c>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    121e <main+0xee>
mov    0x2d57(%rip),%rax
mov    (%rax),%edi
lea    0xd86(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1296 <main+0x166>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    119f <main+0x6f>
jmp    12a9 <main+0x179>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114d <main+0x1d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e96(%rip),%rbp
lea    0x7(%rsp),%rbx
mov    0x2e7a(%rip),%r15
lea    0xeab(%rip),%r13
xor    %r14d,%r14d
cmp    $0x20,%r14d
jb     1190 <main+0x50>
cmp    $0x7f,%r14d
je     1190 <main+0x50>
lea    0xe85(%rip),%rdi
mov    %r14d,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11a1 <main+0x61>
nopw   0x0(%rax,%rax,1)
lea    0xe7b(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %r12d,%r12d
jmp    11be <main+0x7e>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%r12d
cmp    $0x10,%r12d
je     12e0 <main+0x1a0>
mov    0x0(%rbp),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
test   %eax,%eax
jle    12f5 <main+0x1b5>
cmp    $0x7,%r12d
ja     11b0 <main+0x70>
mov    (%r15),%edi
movzbl 0x7(%rsp),%ecx
lea    0xe31(%rip),%rsi
mov    %ecx,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%r15),%edi
lea    0xe31(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
movzbl 0x7(%rsp),%eax
shr    $0x7,%al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0x7(%rsp),%eax
and    $0x40,%al
shr    $0x6,%al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0x7(%rsp),%eax
and    $0x20,%al
shr    $0x5,%al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0x7(%rsp),%eax
and    $0x10,%al
shr    $0x4,%al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0x7(%rsp),%eax
and    $0x8,%al
shr    $0x3,%al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0x7(%rsp),%eax
and    $0x4,%al
shr    $0x2,%al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0x7(%rsp),%eax
and    $0x2,%al
shr    %al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0x7(%rsp),%eax
and    $0x1,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
mov    (%r15),%edi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    11b0 <main+0x70>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r14d
cmp    $0x80,%r14d
jne    1168 <main+0x28>
xor    %eax,%eax
jmp    12fa <main+0x1ba>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"; Char : 0x%x %c\0A\00"
@.str.1 = [15 x i8] c"; Char : 0x%x\0A\00"
@stdin = global i32 0
@stdout = global i32 0
@.str.2 = [19 x i8] c".byte $%02x,$%02x\09\00"
@.str.3 = [3 x i8] c"; \00"
@.str.4 = [2 x i8] c"#\00"
@.str.5 = [2 x i8] c" \00"
@.str.6 = [2 x i8] c"\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 i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %10
10: ; preds = %74, %2
%11 = load i32, i32* %6
%12 = icmp slt i32 %11, 128
br i1 %12, label %13, label %77
13: ; preds = %10
%14 = load i32, i32* %6
%15 = icmp sge i32 %14, 32
br i1 %15, label %16, label %23
16: ; preds = %13
%17 = load i32, i32* %6
%18 = icmp slt i32 %17, 127
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = load i32, i32* %6
%21 = load i32, i32* %6
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %21)
br label %26
23: ; preds = %16, %13
%24 = load i32, i32* %6
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %24)
br label %26
26: ; preds = %23, %19
store i32 0, i32* %7
br label %27
27: ; preds = %70, %26
%28 = load i32, i32* %7
%29 = icmp slt i32 %28, 16
br i1 %29, label %30, label %73
30: ; preds = %27
%31 = load i32, i32* @stdin
%32 = call i32 @fread(i8* %9, i32 1, i32 1, i32 %31)
%33 = icmp slt i32 %32, 1
br i1 %33, label %34, label %35
34: ; preds = %30
store i32 -1, i32* %3
br label %78
35: ; preds = %30
%36 = load i32, i32* %7
%37 = icmp slt i32 %36, 8
br i1 %37, label %38, label %69
38: ; preds = %35
%39 = load i32, i32* @stdout
%40 = load i8, i8* %9
%41 = zext i8 %40 to i32
%42 = load i8, i8* %9
%43 = zext i8 %42 to i32
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %41, i32 %43)
%45 = load i32, i32* @stdout
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %8
br label %47
47: ; preds = %63, %38
%48 = load i32, i32* %8
%49 = icmp slt i32 %48, 8
br i1 %49, label %50, label %66
50: ; preds = %47
%51 = load i32, i32* %8
%52 = sub nsw i32 7, %51
%53 = shl i32 1, %52
%54 = load i8, i8* %9
%55 = zext i8 %54 to i32
%56 = and i32 %53, %55
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %60
58: ; preds = %50
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %62
60: ; preds = %50
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %62
62: ; preds = %60, %58
br label %63
63: ; preds = %62
%64 = load i32, i32* %8
%65 = add nsw i32 %64, 1
store i32 %65, i32* %8
br label %47
66: ; preds = %47
%67 = load i32, i32* @stdout
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %69
69: ; preds = %66, %35
br label %70
70: ; preds = %69
%71 = load i32, i32* %7
%72 = add nsw i32 %71, 1
store i32 %72, i32* %7
br label %27
73: ; preds = %27
br label %74
74: ; preds = %73
%75 = load i32, i32* %6
%76 = add nsw i32 %75, 1
store i32 %76, i32* %6
br label %10
77: ; preds = %10
store i32 0, i32* %3
br label %78
78: ; preds = %77, %34
%79 = load i32, i32* %3
ret i32 %79
}

LLVM IR (-O2):
@.str = [18 x i8] c"; Char : 0x%x %c\0A\00"
@.str.1 = [15 x i8] c"; Char : 0x%x\0A\00"
@stdin = global i32 0
@stdout = global i32 0
@.str.2 = [19 x i8] c".byte $%02x,$%02x\09\00"
@.str.3 = [3 x i8] c"; \00"
@.str.6 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
br label %4
4: ; preds = %2, %72
%5 = phi i32 [ 0, %2 ], [ %73, %72 ]
%6 = icmp ugt i32 %5, 31
%7 = icmp ne i32 %5, 127
%8 = and i1 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %5)
br label %13
11: ; preds = %4
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %13
13: ; preds = %11, %9
br label %14
14: ; preds = %13, %69
%15 = phi i32 [ %70, %69 ], [ 0, %13 ]
%16 = load i32, i32* @stdin
%17 = call i32 @fread(i8* %3, i32 1, i32 1, i32 %16)
%18 = icmp slt i32 %17, 1
br i1 %18, label %75, label %19
19: ; preds = %14
%20 = icmp ult i32 %15, 8
br i1 %20, label %21, label %69
21: ; preds = %19
%22 = load i32, i32* @stdout
%23 = load i8, i8* %3
%24 = zext i8 %23 to i32
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %24, i32 %24)
%26 = load i32, i32* @stdout
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%28 = load i8, i8* %3
%29 = icmp sgt i8 %28, -1
%30 = select i1 %29, i32 32, i32 35
%31 = call i32 @putchar(i32 %30)
%32 = load i8, i8* %3
%33 = and i8 %32, 64
%34 = icmp eq i8 %33, 0
%35 = select i1 %34, i32 32, i32 35
%36 = call i32 @putchar(i32 %35)
%37 = load i8, i8* %3
%38 = and i8 %37, 32
%39 = icmp eq i8 %38, 0
%40 = select i1 %39, i32 32, i32 35
%41 = call i32 @putchar(i32 %40)
%42 = load i8, i8* %3
%43 = and i8 %42, 16
%44 = icmp eq i8 %43, 0
%45 = select i1 %44, i32 32, i32 35
%46 = call i32 @putchar(i32 %45)
%47 = load i8, i8* %3
%48 = and i8 %47, 8
%49 = icmp eq i8 %48, 0
%50 = select i1 %49, i32 32, i32 35
%51 = call i32 @putchar(i32 %50)
%52 = load i8, i8* %3
%53 = and i8 %52, 4
%54 = icmp eq i8 %53, 0
%55 = select i1 %54, i32 32, i32 35
%56 = call i32 @putchar(i32 %55)
%57 = load i8, i8* %3
%58 = and i8 %57, 2
%59 = icmp eq i8 %58, 0
%60 = select i1 %59, i32 32, i32 35
%61 = call i32 @putchar(i32 %60)
%62 = load i8, i8* %3
%63 = and i8 %62, 1
%64 = icmp eq i8 %63, 0
%65 = select i1 %64, i32 32, i32 35
%66 = call i32 @putchar(i32 %65)
%67 = load i32, i32* @stdout
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %69
69: ; preds = %19, %21
%70 = add nuw nsw i32 %15, 1
%71 = icmp eq i32 %70, 16
br i1 %71, label %72, label %14
72: ; preds = %69
%73 = add nuw nsw i32 %5, 1
%74 = icmp eq i32 %73, 128
br i1 %74, label %75, label %4
75: ; preds = %72, %14
%76 = phi i32 [ -1, %14 ], [ 0, %72 ]
ret i32 %76
}