#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;
  printf("unsigned char tb1_font[256][8]={\n");
  for (i = 0; i < 256; i++) {
    if ((i >= 0x20) && (i < 127)) {
      printf("/* Char : 0x%x %c */\n", i, i);
    } else {
      printf("/* Char : 0x%x */\n", i);
    }
    printf("{\n");
    for (j = 0; j < 16; j++) {
      if (fread(&temp, 1, 1, stdin) < 1)
        return -1;
      if (j < 16) {
        fprintf(stdout, "\t0x%02x,\t", temp);
        fprintf(stdout, "/* ");
        for (k = 0; k < 8; k++) {
          if ((1 << (7 - k)) & temp) {
            printf("#");
          } else {
            printf(" ");
          }
        }
        printf("*/\n");
      }
    }
    printf("},\n");
  }
  printf("};\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)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jge    12cf <main+0x19f>
cmpl   $0x20,-0x14(%rbp)
jl     1195 <main+0x65>
cmpl   $0x7f,-0x14(%rbp)
jge    1195 <main+0x65>
mov    -0x14(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11a6 <main+0x76>
mov    -0x14(%rbp),%esi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x10,-0x18(%rbp)
jge    12b3 <main+0x183>
mov    0x2e1c(%rip),%rax
mov    (%rax),%ecx
lea    -0x1d(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
cmp    $0x1,%eax
jge    11f3 <main+0xc3>
movl   $0xffffffff,-0x4(%rbp)
jmp    12e4 <main+0x1b4>
cmpl   $0x10,-0x18(%rbp)
jge    12a0 <main+0x170>
mov    0x2dd4(%rip),%rax
mov    (%rax),%edi
movzbl -0x1d(%rbp),%edx
lea    0xe3a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2db9(%rip),%rax
mov    (%rax),%edi
lea    0xe2d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x8,-0x1c(%rbp)
jge    1292 <main+0x162>
mov    $0x7,%ecx
sub    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
movzbl -0x1d(%rbp),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1271 <main+0x141>
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    127f <main+0x14f>
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1284 <main+0x154>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1236 <main+0x106>
lea    0xd9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12a5 <main+0x175>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11bb <main+0x8b>
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115b <main+0x2b>
lea    0xd89(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
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
sub    $0x18,%rsp
lea    0xed2(%rip),%rdi
call   1040 <puts@plt>
lea    0xee5(%rip),%rbx
lea    0xf(%rsp),%rbp
mov    0x2e5b(%rip),%r14
lea    0xeaf(%rip),%r13
lea    0xed3(%rip),%r15
xor    %esi,%esi
lea    -0x20(%rsi),%eax
cmp    $0x5e,%eax
mov    %rsi,0x10(%rsp)
ja     11b0 <main+0x60>
lea    0xe5f(%rip),%rdi
mov    %rsi,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    11be <main+0x6e>
nopl   (%rax)
lea    0xe5f(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x10,%r12d
mov    0x2e15(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rbx),%ecx
mov    %rbp,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
test   %eax,%eax
jle    1320 <main+0x1d0>
mov    (%r14),%edi
movzbl 0xf(%rsp),%edx
lea    0xe1e(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%r14),%edi
mov    %r13,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
movzbl 0xf(%rsp),%eax
shr    $0x7,%al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0xf(%rsp),%eax
and    $0x40,%al
shr    $0x6,%al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0xf(%rsp),%eax
and    $0x20,%al
shr    $0x5,%al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0xf(%rsp),%eax
and    $0x10,%al
shr    $0x4,%al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0xf(%rsp),%eax
and    $0x8,%al
shr    $0x3,%al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0xf(%rsp),%eax
and    $0x4,%al
shr    $0x2,%al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0xf(%rsp),%eax
and    $0x2,%al
shr    %al
movzbl %al,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
movzbl 0xf(%rsp),%eax
and    $0x1,%eax
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
add    $0xffffffff,%r12d
jne    11e0 <main+0x90>
lea    0xd6b(%rip),%rdi
call   1040 <puts@plt>
mov    0x10(%rsp),%rsi
add    $0x1,%esi
cmp    $0x100,%esi
lea    0xd4c(%rip),%rbx
jne    118d <main+0x3d>
lea    0xd41(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
jmp    1325 <main+0x1d5>
mov    $0xffffffff,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"unsigned char tb1_font[256][8]={\0A\00"
@.str.1 = [22 x i8] c"/* Char : 0x%x %c */\0A\00"
@.str.2 = [19 x i8] c"/* Char : 0x%x */\0A\00"
@.str.3 = [3 x i8] c"{\0A\00"
@stdin = global i32 0
@stdout = global i32 0
@.str.4 = [10 x i8] c"\090x%02x,\09\00"
@.str.5 = [4 x i8] c"/* \00"
@.str.6 = [2 x i8] c"#\00"
@.str.7 = [2 x i8] c" \00"
@.str.8 = [4 x i8] c"*/\0A\00"
@.str.9 = [4 x i8] c"},\0A\00"
@.str.10 = [4 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
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
br label %11
11: ; preds = %74, %2
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 256
br i1 %13, label %14, label %77
14: ; preds = %11
%15 = load i32, i32* %6
%16 = icmp sge i32 %15, 32
br i1 %16, label %17, label %24
17: ; preds = %14
%18 = load i32, i32* %6
%19 = icmp slt i32 %18, 127
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load i32, i32* %6
%22 = load i32, i32* %6
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %21, i32 %22)
br label %27
24: ; preds = %17, %14
%25 = load i32, i32* %6
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %24, %20
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %7
br label %29
29: ; preds = %69, %27
%30 = load i32, i32* %7
%31 = icmp slt i32 %30, 16
br i1 %31, label %32, label %72
32: ; preds = %29
%33 = load i32, i32* @stdin
%34 = call i32 @fread(i8* %9, i32 1, i32 1, i32 %33)
%35 = icmp slt i32 %34, 1
br i1 %35, label %36, label %37
36: ; preds = %32
store i32 -1, i32* %3
br label %79
37: ; preds = %32
%38 = load i32, i32* %7
%39 = icmp slt i32 %38, 16
br i1 %39, label %40, label %68
40: ; preds = %37
%41 = load i32, i32* @stdout
%42 = load i8, i8* %9
%43 = zext i8 %42 to i32
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %43)
%45 = load i32, i32* @stdout
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %8
br label %47
47: ; preds = %63, %40
%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.6, 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.7, 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 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
br label %68
68: ; preds = %66, %37
br label %69
69: ; preds = %68
%70 = load i32, i32* %7
%71 = add nsw i32 %70, 1
store i32 %71, i32* %7
br label %29
72: ; preds = %29
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
br label %74
74: ; preds = %72
%75 = load i32, i32* %6
%76 = add nsw i32 %75, 1
store i32 %76, i32* %6
br label %11
77: ; preds = %11
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %3
br label %79
79: ; preds = %77, %36
%80 = load i32, i32* %3
ret i32 %80
}

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