#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*/ printf(char *, ...);
void print_number(int val) {
  switch (val) {
  case 0:
    printf("\033[46;1m          \033[0m");
    break;
  case 2:
    printf("\033[31;42;1m%6d%s\033[0m", val, "    ");
    break;
  case 4:
    printf("\033[32;43;1m%6d%s\033[0m", val, "    ");
    break;
  case 8:
    printf("\033[33;44;1m%6d%s\033[0m", val, "    ");
    break;
  case 16:
    printf("\033[34;45;1m%6d%s\033[0m", val, "    ");
    break;
  case 32:
    printf("\033[35;46;1m%6d%s\033[0m", val, "    ");
    break;
  case 64:
    printf("\033[36;41;1m%6d%s\033[0m", val, "    ");
    break;
  case 128:
    printf("\033[35;46;1m%6d%s\033[0m", val, "    ");
    break;
  case 256:
    printf("\033[34;45;1m%6d%s\033[0m", val, "    ");
    break;
  case 512:
    printf("\033[33;44;1m%6d%s\033[0m", val, "    ");
    break;
  case 1024:
    printf("\033[35;46;1m%6d%s\033[0m", val, "    ");
    break;
  case 2048:
    printf("\033[36;41;1m%6d%s\033[0m", val, "    ");
    break;
  }
}


x86 assembly (clang, -O0):
<print_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     11f3 <print_number+0xe3>
jmp    112e <print_number+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     1206 <print_number+0xf6>
jmp    113f <print_number+0x2f>
mov    -0x8(%rbp),%eax
sub    $0x4,%eax
je     1223 <print_number+0x113>
jmp    1150 <print_number+0x40>
mov    -0x8(%rbp),%eax
sub    $0x8,%eax
je     1240 <print_number+0x130>
jmp    1161 <print_number+0x51>
mov    -0x8(%rbp),%eax
sub    $0x10,%eax
je     125d <print_number+0x14d>
jmp    1172 <print_number+0x62>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
je     127a <print_number+0x16a>
jmp    1183 <print_number+0x73>
mov    -0x8(%rbp),%eax
sub    $0x40,%eax
je     1297 <print_number+0x187>
jmp    1194 <print_number+0x84>
mov    -0x8(%rbp),%eax
sub    $0x80,%eax
je     12b4 <print_number+0x1a4>
jmp    11a7 <print_number+0x97>
mov    -0x8(%rbp),%eax
sub    $0x100,%eax
je     12d1 <print_number+0x1c1>
jmp    11ba <print_number+0xaa>
mov    -0x8(%rbp),%eax
sub    $0x200,%eax
je     12ee <print_number+0x1de>
jmp    11cd <print_number+0xbd>
mov    -0x8(%rbp),%eax
sub    $0x400,%eax
je     130b <print_number+0x1fb>
jmp    11e0 <print_number+0xd0>
mov    -0x8(%rbp),%eax
sub    $0x800,%eax
je     1328 <print_number+0x218>
jmp    1340 <print_number+0x230>
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1340 <print_number+0x230>
mov    -0x4(%rbp),%esi
lea    0xe06(%rip),%rdi
lea    0xe13(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1340 <print_number+0x230>
mov    -0x4(%rbp),%esi
lea    0xe02(%rip),%rdi
lea    0xdf6(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1340 <print_number+0x230>
mov    -0x4(%rbp),%esi
lea    0xdf9(%rip),%rdi
lea    0xdd9(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1340 <print_number+0x230>
mov    -0x4(%rbp),%esi
lea    0xdf0(%rip),%rdi
lea    0xdbc(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1340 <print_number+0x230>
mov    -0x4(%rbp),%esi
lea    0xde7(%rip),%rdi
lea    0xd9f(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1340 <print_number+0x230>
mov    -0x4(%rbp),%esi
lea    0xdde(%rip),%rdi
lea    0xd82(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1340 <print_number+0x230>
mov    -0x4(%rbp),%esi
lea    0xdad(%rip),%rdi
lea    0xd65(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1340 <print_number+0x230>
mov    -0x4(%rbp),%esi
lea    0xd7c(%rip),%rdi
lea    0xd48(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1340 <print_number+0x230>
mov    -0x4(%rbp),%esi
lea    0xd4b(%rip),%rdi
lea    0xd2b(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1340 <print_number+0x230>
mov    -0x4(%rbp),%esi
lea    0xd56(%rip),%rdi
lea    0xd0e(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1340 <print_number+0x230>
mov    -0x4(%rbp),%esi
lea    0xd4d(%rip),%rdi
lea    0xcf1(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_number>:
cmp    $0x7f,%edi
jg     113e <print_number+0x2e>
cmp    $0x40,%edi
ja     12a0 <print_number+0x190>
mov    %edi,%eax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfcd(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>
cmp    $0x1ff,%edi
jle    1184 <print_number+0x74>
cmp    $0x200,%edi
je     1252 <print_number+0x142>
cmp    $0x400,%edi
je     126c <print_number+0x15c>
cmp    $0x800,%edi
jne    12a0 <print_number+0x190>
lea    0x1012(%rip),%rdi
lea    0xfb6(%rip),%rdx
mov    $0x800,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
cmp    $0x80,%edi
je     1286 <print_number+0x176>
cmp    $0x100,%edi
jne    12a0 <print_number+0x190>
lea    0xfb8(%rip),%rdi
lea    0xf84(%rip),%rdx
mov    $0x100,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xf5d(%rip),%rdi
lea    0xf6a(%rip),%rdx
mov    $0x2,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xf5c(%rip),%rdi
lea    0xf50(%rip),%rdx
mov    $0x4,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xf56(%rip),%rdi
lea    0xf36(%rip),%rdx
mov    $0x8,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xf50(%rip),%rdi
lea    0xf1c(%rip),%rdx
mov    $0x10,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xf4a(%rip),%rdi
lea    0xf02(%rip),%rdx
mov    $0x20,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xf44(%rip),%rdi
lea    0xee8(%rip),%rdx
mov    $0x40,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xeee(%rip),%rdi
lea    0xece(%rip),%rdx
mov    $0x200,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xefc(%rip),%rdi
lea    0xeb4(%rip),%rdx
mov    $0x400,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    0xe9a(%rip),%rdx
mov    $0x80,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\1B[46;1m \1B[0m\00"
@.str.1 = [20 x i8] c"\1B[31;42;1m%6d%s\1B[0m\00"
@.str.2 = [5 x i8] c" \00"
@.str.3 = [20 x i8] c"\1B[32;43;1m%6d%s\1B[0m\00"
@.str.4 = [20 x i8] c"\1B[33;44;1m%6d%s\1B[0m\00"
@.str.5 = [20 x i8] c"\1B[34;45;1m%6d%s\1B[0m\00"
@.str.6 = [20 x i8] c"\1B[35;46;1m%6d%s\1B[0m\00"
@.str.7 = [20 x i8] c"\1B[36;41;1m%6d%s\1B[0m\00"
define void @print_number(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %39 [
i32 0, label %4
i32 2, label %6
i32 4, label %9
i32 8, label %12
i32 16, label %15
i32 32, label %18
i32 64, label %21
i32 128, label %24
i32 256, label %27
i32 512, label %30
i32 1024, label %33
i32 2048, label %36
]
4: ; preds = %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %39
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %39
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %39
12: ; preds = %1
%13 = load i32, i32* %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %39
15: ; preds = %1
%16 = load i32, i32* %2
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %39
18: ; preds = %1
%19 = load i32, i32* %2
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %39
21: ; preds = %1
%22 = load i32, i32* %2
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %39
24: ; preds = %1
%25 = load i32, i32* %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %39
27: ; preds = %1
%28 = load i32, i32* %2
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %28, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %39
30: ; preds = %1
%31 = load i32, i32* %2
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %39
33: ; preds = %1
%34 = load i32, i32* %2
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %39
36: ; preds = %1
%37 = load i32, i32* %2
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %39
39: ; preds = %1, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6, %4
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"\1B[46;1m \1B[0m\00"
@.str.1 = [20 x i8] c"\1B[31;42;1m%6d%s\1B[0m\00"
@.str.2 = [5 x i8] c" \00"
@.str.3 = [20 x i8] c"\1B[32;43;1m%6d%s\1B[0m\00"
@.str.4 = [20 x i8] c"\1B[33;44;1m%6d%s\1B[0m\00"
@.str.5 = [20 x i8] c"\1B[34;45;1m%6d%s\1B[0m\00"
@.str.6 = [20 x i8] c"\1B[35;46;1m%6d%s\1B[0m\00"
@.str.7 = [20 x i8] c"\1B[36;41;1m%6d%s\1B[0m\00"
define void @print_number(i32 %0) {
switch i32 %0, label %26 [
i32 0, label %2
i32 2, label %4
i32 4, label %6
i32 8, label %8
i32 16, label %10
i32 32, label %12
i32 64, label %14
i32 128, label %16
i32 256, label %18
i32 512, label %20
i32 1024, label %22
i32 2048, label %24
]
2: ; preds = %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %26
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
6: ; preds = %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
8: ; preds = %1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
10: ; preds = %1
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
12: ; preds = %1
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
14: ; preds = %1
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 64, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
16: ; preds = %1
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 128, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
18: ; preds = %1
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 256, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
20: ; preds = %1
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 512, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
22: ; preds = %1
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 1024, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
24: ; preds = %1
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 2048, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %1, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6, %4, %2
ret void
}