#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*/ exit(int);
scalar_t__ ferror(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int, ...);
int /*<<< orphan*/ stdout;
int main() {
  int i1, i2, i3;
  for (i1 = 0; i1 < 0x80; i1++)
    printf("0x%02X\t0x%04X\n", i1, i1);
  for (i1 = 2; i1 < 32; i1++)
    for (i2 = 0; i2 < 64; i2++)
      printf("0x%02X%02X\t0x%04X\n", 0xc0 + i1, 0x80 + i2, (i1 << 6) + i2);
  for (i1 = 0; i1 < 16; i1++)
    for (i2 = (i1 == 0 ? 32 : 0); i2 < 64; i2++)
      for (i3 = 0; i3 < 64; i3++)
        printf("0x%02X%02X%02X\t0x%04X\n", 0xe0 + i1, 0x80 + i2, 0x80 + i3,
               (i1 << 12) + (i2 << 6) + i3);
  fflush(stdout);
  if (ferror(stdout))
    exit(1);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    1185 <main+0x45>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <main+0x16>
movl   $0x2,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    11f1 <main+0xb1>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    11de <main+0x9e>
mov    -0x8(%rbp),%esi
add    $0xc0,%esi
mov    -0xc(%rbp),%edx
add    $0x80,%edx
mov    -0x8(%rbp),%ecx
shl    $0x6,%ecx
add    -0xc(%rbp),%ecx
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    119d <main+0x5d>
jmp    11e3 <main+0xa3>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    118c <main+0x4c>
movl   $0x0,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jge    12a2 <main+0x162>
mov    -0x8(%rbp),%edx
xor    %eax,%eax
mov    $0x20,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    128f <main+0x14f>
movl   $0x0,-0x10(%rbp)
cmpl   $0x40,-0x10(%rbp)
jge    127c <main+0x13c>
mov    -0x8(%rbp),%esi
add    $0xe0,%esi
mov    -0xc(%rbp),%edx
add    $0x80,%edx
mov    -0x10(%rbp),%ecx
add    $0x80,%ecx
mov    -0x8(%rbp),%r8d
shl    $0xc,%r8d
mov    -0xc(%rbp),%eax
shl    $0x6,%eax
add    %eax,%r8d
add    -0x10(%rbp),%r8d
lea    0xdbb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1226 <main+0xe6>
jmp    1281 <main+0x141>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1215 <main+0xd5>
jmp    1294 <main+0x154>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11f8 <main+0xb8>
mov    0x2d37(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2d29(%rip),%rax
mov    (%rax),%edi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     12d2 <main+0x192>
mov    $0x1,%edi
call   1060 <exit@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeab(%rip),%rbx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x80,%ebp
jne    1160 <main+0x20>
mov    $0x2,%r15d
lea    0xe89(%rip),%r14
xor    %r12d,%r12d
nopl   0x0(%rax)
lea    0xc0(%r15),%ebp
mov    $0x80,%ebx
nopl   0x0(%rax)
lea    (%r12,%rbx,1),%ecx
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0xc0,%ebx
jne    11a0 <main+0x60>
add    $0x1,%r15d
add    $0x40,%r12d
cmp    $0x20,%r15d
jne    1190 <main+0x50>
lea    0xe50(%rip),%r14
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xor    %ebp,%ebp
test   %ecx,%ecx
sete   %bpl
mov    %ebp,%r15d
shl    $0x5,%r15d
mov    %rcx,0x10(%rsp)
lea    0xe0(%rcx),%r13d
shl    $0xb,%ebp
mov    %eax,0xc(%rsp)
add    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x80(%r15),%ebx
xor    %r12d,%r12d
nopw   0x0(%rax,%rax,1)
lea    0x80(%r12),%ecx
lea    (%r12,%rbp,1),%r8d
mov    %r14,%rdi
mov    %r13d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r12d
cmp    $0x40,%r12d
jne    1220 <main+0xe0>
add    $0x1,%r15d
add    $0x40,%ebp
cmp    $0x40,%r15d
jne    1210 <main+0xd0>
mov    0x10(%rsp),%rcx
add    $0x1,%ecx
mov    0xc(%rsp),%eax
add    $0x1000,%eax
cmp    $0x10,%ecx
jne    11e0 <main+0xa0>
mov    0x2d6d(%rip),%rbx
mov    (%rbx),%edi
call   1050 <fflush@plt>
mov    (%rbx),%edi
call   1030 <ferror@plt>
test   %rax,%rax
jne    128d <main+0x14d>
xor    %edi,%edi
call   1060 <exit@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"0x%02X\090x%04X\0A\00"
@.str.1 = [19 x i8] c"0x%02X%02X\090x%04X\0A\00"
@.str.2 = [23 x i8] c"0x%02X%02X%02X\090x%04X\0A\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %5
5: ; preds = %12, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 128
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
br label %12
12: ; preds = %8
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %5
15: ; preds = %5
store i32 2, i32* %2
br label %16
16: ; preds = %37, %15
%17 = load i32, i32* %2
%18 = icmp slt i32 %17, 32
br i1 %18, label %19, label %40
19: ; preds = %16
store i32 0, i32* %3
br label %20
20: ; preds = %33, %19
%21 = load i32, i32* %3
%22 = icmp slt i32 %21, 64
br i1 %22, label %23, label %36
23: ; preds = %20
%24 = load i32, i32* %2
%25 = add nsw i32 192, %24
%26 = load i32, i32* %3
%27 = add nsw i32 128, %26
%28 = load i32, i32* %2
%29 = shl i32 %28, 6
%30 = load i32, i32* %3
%31 = add nsw i32 %29, %30
%32 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %25, i32 %27, i32 %31)
br label %33
33: ; preds = %23
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
br label %20
36: ; preds = %20
br label %37
37: ; preds = %36
%38 = load i32, i32* %2
%39 = add nsw i32 %38, 1
store i32 %39, i32* %2
br label %16
40: ; preds = %16
store i32 0, i32* %2
br label %41
41: ; preds = %79, %40
%42 = load i32, i32* %2
%43 = icmp slt i32 %42, 16
br i1 %43, label %44, label %82
44: ; preds = %41
%45 = load i32, i32* %2
%46 = icmp eq i32 %45, 0
%47 = zext i1 %46 to i64
%48 = select i1 %46, i32 32, i32 0
store i32 %48, i32* %3
br label %49
49: ; preds = %75, %44
%50 = load i32, i32* %3
%51 = icmp slt i32 %50, 64
br i1 %51, label %52, label %78
52: ; preds = %49
store i32 0, i32* %4
br label %53
53: ; preds = %71, %52
%54 = load i32, i32* %4
%55 = icmp slt i32 %54, 64
br i1 %55, label %56, label %74
56: ; preds = %53
%57 = load i32, i32* %2
%58 = add nsw i32 224, %57
%59 = load i32, i32* %3
%60 = add nsw i32 128, %59
%61 = load i32, i32* %4
%62 = add nsw i32 128, %61
%63 = load i32, i32* %2
%64 = shl i32 %63, 12
%65 = load i32, i32* %3
%66 = shl i32 %65, 6
%67 = add nsw i32 %64, %66
%68 = load i32, i32* %4
%69 = add nsw i32 %67, %68
%70 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %58, i32 %60, i32 %62, i32 %69)
br label %71
71: ; preds = %56
%72 = load i32, i32* %4
%73 = add nsw i32 %72, 1
store i32 %73, i32* %4
br label %53
74: ; preds = %53
br label %75
75: ; preds = %74
%76 = load i32, i32* %3
%77 = add nsw i32 %76, 1
store i32 %77, i32* %3
br label %49
78: ; preds = %49
br label %79
79: ; preds = %78
%80 = load i32, i32* %2
%81 = add nsw i32 %80, 1
store i32 %81, i32* %2
br label %41
82: ; preds = %41
%83 = load i32, i32* @stdout
%84 = call i32 @fflush(i32 %83)
%85 = load i32, i32* @stdout
%86 = call i64 @ferror(i32 %85)
%87 = icmp ne i64 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %82
%89 = call i32 @exit(i32 1)
unreachable
90: ; preds = %82
%91 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"0x%02X\090x%04X\0A\00"
@.str.1 = [19 x i8] c"0x%02X%02X\090x%04X\0A\00"
@.str.2 = [23 x i8] c"0x%02X%02X%02X\090x%04X\0A\00"
@stdout = global i32 0
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 128
br i1 %5, label %6, label %1
6: ; preds = %1, %17
%7 = phi i32 [ %18, %17 ], [ 2, %1 ]
%8 = add nuw nsw i32 %7, 192
%9 = shl i32 %7, 6
br label %10
10: ; preds = %6, %10
%11 = phi i32 [ 0, %6 ], [ %15, %10 ]
%12 = add nuw nsw i32 %11, 128
%13 = add nuw nsw i32 %11, %9
%14 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %12, i32 %13)
%15 = add nuw nsw i32 %11, 1
%16 = icmp eq i32 %15, 64
br i1 %16, label %17, label %10
17: ; preds = %10
%18 = add nuw nsw i32 %7, 1
%19 = icmp eq i32 %18, 32
br i1 %19, label %20, label %6
20: ; preds = %17, %41
%21 = phi i32 [ %42, %41 ], [ 0, %17 ]
%22 = icmp eq i32 %21, 0
%23 = select i1 %22, i32 32, i32 0
%24 = add nuw nsw i32 %21, 224
%25 = shl i32 %21, 12
br label %26
26: ; preds = %20, %38
%27 = phi i32 [ %23, %20 ], [ %39, %38 ]
%28 = add nuw nsw i32 %27, 128
%29 = shl i32 %27, 6
%30 = add nuw nsw i32 %29, %25
br label %31
31: ; preds = %26, %31
%32 = phi i32 [ 0, %26 ], [ %36, %31 ]
%33 = add nuw nsw i32 %32, 128
%34 = add nuw nsw i32 %30, %32
%35 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %24, i32 %28, i32 %33, i32 %34)
%36 = add nuw nsw i32 %32, 1
%37 = icmp eq i32 %36, 64
br i1 %37, label %38, label %31
38: ; preds = %31
%39 = add nuw nsw i32 %27, 1
%40 = icmp eq i32 %39, 64
br i1 %40, label %41, label %26
41: ; preds = %38
%42 = add nuw nsw i32 %21, 1
%43 = icmp eq i32 %42, 16
br i1 %43, label %44, label %20
44: ; preds = %41
%45 = load i32, i32* @stdout
%46 = tail call i32 @fflush(i32 %45)
%47 = load i32, i32* @stdout
%48 = tail call i64 @ferror(i32 %47)
%49 = icmp eq i64 %48, 0
br i1 %49, label %52, label %50
50: ; preds = %44
%51 = tail call i32 @exit(i32 1)
unreachable
52: ; preds = %44
%53 = tail call i32 @exit(i32 0)
unreachable
}