#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*/ print1();
int /*<<< orphan*/ print2();
int /*<<< orphan*/ print3();
int /*<<< orphan*/ print4();
int /*<<< orphan*/ print5();
int /*<<< orphan*/ print6();
int /*<<< orphan*/ print7();
void viewnumber(int number) {
  switch (number) {
  case 0:
    print2();
    print3();
    print4();
    print5();
    print6();
    print7();
    break;
  case 1:
    print4();
    print5();
    break;
  case 2:
    print1();
    print2();
    print3();
    print4();
    print7();
    break;
  case 3:
    print1();
    print2();
    print3();
    print4();
    print5();
    break;
  case 4:
    print1();
    print6();
    print4();
    print5();
    break;
  case 5:
    print1();
    print2();
    print3();
    print5();
    print6();
    break;
  case 6:
    print1();
    print2();
    print3();
    print6();
    print5();
    print7();
    break;
  case 7:
    print2();
    print4();
    print5();
    break;
  case 8:
    print1();
    print2();
    print3();
    print4();
    print5();
    print6();
    print7();
    break;
  case 9:
    print1();
    print2();
    print3();
    print4();
    print6();
    print5();
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<viewnumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x9,%rax
ja     1329 <viewnumber+0x1b9>
mov    -0x10(%rbp),%rax
lea    0xe69(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1090 <print2@plt>
mov    $0x0,%al
call   1050 <print3@plt>
mov    $0x0,%al
call   1080 <print4@plt>
mov    $0x0,%al
call   1040 <print5@plt>
mov    $0x0,%al
call   1030 <print6@plt>
mov    $0x0,%al
call   1070 <print7@plt>
jmp    132e <viewnumber+0x1be>
mov    $0x0,%al
call   1080 <print4@plt>
mov    $0x0,%al
call   1040 <print5@plt>
jmp    132e <viewnumber+0x1be>
mov    $0x0,%al
call   1060 <print1@plt>
mov    $0x0,%al
call   1090 <print2@plt>
mov    $0x0,%al
call   1050 <print3@plt>
mov    $0x0,%al
call   1080 <print4@plt>
mov    $0x0,%al
call   1070 <print7@plt>
jmp    132e <viewnumber+0x1be>
mov    $0x0,%al
call   1060 <print1@plt>
mov    $0x0,%al
call   1090 <print2@plt>
mov    $0x0,%al
call   1050 <print3@plt>
mov    $0x0,%al
call   1080 <print4@plt>
mov    $0x0,%al
call   1040 <print5@plt>
jmp    132e <viewnumber+0x1be>
mov    $0x0,%al
call   1060 <print1@plt>
mov    $0x0,%al
call   1030 <print6@plt>
mov    $0x0,%al
call   1080 <print4@plt>
mov    $0x0,%al
call   1040 <print5@plt>
jmp    132e <viewnumber+0x1be>
mov    $0x0,%al
call   1060 <print1@plt>
mov    $0x0,%al
call   1090 <print2@plt>
mov    $0x0,%al
call   1050 <print3@plt>
mov    $0x0,%al
call   1040 <print5@plt>
mov    $0x0,%al
call   1030 <print6@plt>
jmp    132e <viewnumber+0x1be>
mov    $0x0,%al
call   1060 <print1@plt>
mov    $0x0,%al
call   1090 <print2@plt>
mov    $0x0,%al
call   1050 <print3@plt>
mov    $0x0,%al
call   1030 <print6@plt>
mov    $0x0,%al
call   1040 <print5@plt>
mov    $0x0,%al
call   1070 <print7@plt>
jmp    132e <viewnumber+0x1be>
mov    $0x0,%al
call   1090 <print2@plt>
mov    $0x0,%al
call   1080 <print4@plt>
mov    $0x0,%al
call   1040 <print5@plt>
jmp    132e <viewnumber+0x1be>
mov    $0x0,%al
call   1060 <print1@plt>
mov    $0x0,%al
call   1090 <print2@plt>
mov    $0x0,%al
call   1050 <print3@plt>
mov    $0x0,%al
call   1080 <print4@plt>
mov    $0x0,%al
call   1040 <print5@plt>
mov    $0x0,%al
call   1030 <print6@plt>
mov    $0x0,%al
call   1070 <print7@plt>
jmp    132e <viewnumber+0x1be>
mov    $0x0,%al
call   1060 <print1@plt>
mov    $0x0,%al
call   1090 <print2@plt>
mov    $0x0,%al
call   1050 <print3@plt>
mov    $0x0,%al
call   1080 <print4@plt>
mov    $0x0,%al
call   1030 <print6@plt>
mov    $0x0,%al
call   1040 <print5@plt>
jmp    132e <viewnumber+0x1be>
jmp    132e <viewnumber+0x1be>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<viewnumber>:
push   %rax
cmp    $0x9,%edi
ja     11a9 <viewnumber+0x39>
mov    %edi,%eax
lea    0xe81(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %eax,%eax
call   1060 <print1@plt>
xor    %eax,%eax
call   1090 <print2@plt>
xor    %eax,%eax
call   1050 <print3@plt>
xor    %eax,%eax
call   1080 <print4@plt>
jmp    1280 <viewnumber+0x110>
pop    %rax
ret
xor    %eax,%eax
call   1060 <print1@plt>
xor    %eax,%eax
call   1090 <print2@plt>
xor    %eax,%eax
call   1050 <print3@plt>
jmp    1222 <viewnumber+0xb2>
xor    %eax,%eax
call   1060 <print1@plt>
xor    %eax,%eax
call   1030 <print6@plt>
jmp    1222 <viewnumber+0xb2>
xor    %eax,%eax
call   1060 <print1@plt>
xor    %eax,%eax
call   1090 <print2@plt>
xor    %eax,%eax
call   1050 <print3@plt>
xor    %eax,%eax
call   1040 <print5@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <print6@plt>
xor    %eax,%eax
call   1060 <print1@plt>
xor    %eax,%eax
call   1090 <print2@plt>
xor    %eax,%eax
call   1050 <print3@plt>
xor    %eax,%eax
call   1030 <print6@plt>
xor    %eax,%eax
call   1040 <print5@plt>
jmp    1280 <viewnumber+0x110>
xor    %eax,%eax
call   1090 <print2@plt>
xor    %eax,%eax
call   1080 <print4@plt>
jmp    124e <viewnumber+0xde>
xor    %eax,%eax
call   1060 <print1@plt>
xor    %eax,%eax
call   1090 <print2@plt>
xor    %eax,%eax
call   1050 <print3@plt>
xor    %eax,%eax
call   1080 <print4@plt>
xor    %eax,%eax
call   1030 <print6@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <print5@plt>
xor    %eax,%eax
call   1060 <print1@plt>
xor    %eax,%eax
call   1090 <print2@plt>
xor    %eax,%eax
call   1050 <print3@plt>
xor    %eax,%eax
call   1080 <print4@plt>
xor    %eax,%eax
call   1040 <print5@plt>
xor    %eax,%eax
call   1030 <print6@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <print7@plt>

LLVM IR (-O0):
define void @viewnumber(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %63 [
i32 0, label %4
i32 1, label %11
i32 2, label %14
i32 3, label %20
i32 4, label %26
i32 5, label %31
i32 6, label %37
i32 7, label %44
i32 8, label %48
i32 9, label %56
]
4: ; preds = %1
%5 = call i32 (...) @print2()
%6 = call i32 (...) @print3()
%7 = call i32 (...) @print4()
%8 = call i32 (...) @print5()
%9 = call i32 (...) @print6()
%10 = call i32 (...) @print7()
br label %64
11: ; preds = %1
%12 = call i32 (...) @print4()
%13 = call i32 (...) @print5()
br label %64
14: ; preds = %1
%15 = call i32 (...) @print1()
%16 = call i32 (...) @print2()
%17 = call i32 (...) @print3()
%18 = call i32 (...) @print4()
%19 = call i32 (...) @print7()
br label %64
20: ; preds = %1
%21 = call i32 (...) @print1()
%22 = call i32 (...) @print2()
%23 = call i32 (...) @print3()
%24 = call i32 (...) @print4()
%25 = call i32 (...) @print5()
br label %64
26: ; preds = %1
%27 = call i32 (...) @print1()
%28 = call i32 (...) @print6()
%29 = call i32 (...) @print4()
%30 = call i32 (...) @print5()
br label %64
31: ; preds = %1
%32 = call i32 (...) @print1()
%33 = call i32 (...) @print2()
%34 = call i32 (...) @print3()
%35 = call i32 (...) @print5()
%36 = call i32 (...) @print6()
br label %64
37: ; preds = %1
%38 = call i32 (...) @print1()
%39 = call i32 (...) @print2()
%40 = call i32 (...) @print3()
%41 = call i32 (...) @print6()
%42 = call i32 (...) @print5()
%43 = call i32 (...) @print7()
br label %64
44: ; preds = %1
%45 = call i32 (...) @print2()
%46 = call i32 (...) @print4()
%47 = call i32 (...) @print5()
br label %64
48: ; preds = %1
%49 = call i32 (...) @print1()
%50 = call i32 (...) @print2()
%51 = call i32 (...) @print3()
%52 = call i32 (...) @print4()
%53 = call i32 (...) @print5()
%54 = call i32 (...) @print6()
%55 = call i32 (...) @print7()
br label %64
56: ; preds = %1
%57 = call i32 (...) @print1()
%58 = call i32 (...) @print2()
%59 = call i32 (...) @print3()
%60 = call i32 (...) @print4()
%61 = call i32 (...) @print6()
%62 = call i32 (...) @print5()
br label %64
63: ; preds = %1
br label %64
64: ; preds = %63, %56, %48, %44, %37, %31, %26, %20, %14, %11, %4
ret void
}

LLVM IR (-O2):
define void @viewnumber(i32 %0) {
switch i32 %0, label %61 [
i32 0, label %2
i32 1, label %9
i32 2, label %12
i32 3, label %18
i32 4, label %24
i32 5, label %29
i32 6, label %35
i32 7, label %42
i32 8, label %46
i32 9, label %54
]
2: ; preds = %1
%3 = tail call i32 (...) @print2()
%4 = tail call i32 (...) @print3()
%5 = tail call i32 (...) @print4()
%6 = tail call i32 (...) @print5()
%7 = tail call i32 (...) @print6()
%8 = tail call i32 (...) @print7()
br label %61
9: ; preds = %1
%10 = tail call i32 (...) @print4()
%11 = tail call i32 (...) @print5()
br label %61
12: ; preds = %1
%13 = tail call i32 (...) @print1()
%14 = tail call i32 (...) @print2()
%15 = tail call i32 (...) @print3()
%16 = tail call i32 (...) @print4()
%17 = tail call i32 (...) @print7()
br label %61
18: ; preds = %1
%19 = tail call i32 (...) @print1()
%20 = tail call i32 (...) @print2()
%21 = tail call i32 (...) @print3()
%22 = tail call i32 (...) @print4()
%23 = tail call i32 (...) @print5()
br label %61
24: ; preds = %1
%25 = tail call i32 (...) @print1()
%26 = tail call i32 (...) @print6()
%27 = tail call i32 (...) @print4()
%28 = tail call i32 (...) @print5()
br label %61
29: ; preds = %1
%30 = tail call i32 (...) @print1()
%31 = tail call i32 (...) @print2()
%32 = tail call i32 (...) @print3()
%33 = tail call i32 (...) @print5()
%34 = tail call i32 (...) @print6()
br label %61
35: ; preds = %1
%36 = tail call i32 (...) @print1()
%37 = tail call i32 (...) @print2()
%38 = tail call i32 (...) @print3()
%39 = tail call i32 (...) @print6()
%40 = tail call i32 (...) @print5()
%41 = tail call i32 (...) @print7()
br label %61
42: ; preds = %1
%43 = tail call i32 (...) @print2()
%44 = tail call i32 (...) @print4()
%45 = tail call i32 (...) @print5()
br label %61
46: ; preds = %1
%47 = tail call i32 (...) @print1()
%48 = tail call i32 (...) @print2()
%49 = tail call i32 (...) @print3()
%50 = tail call i32 (...) @print4()
%51 = tail call i32 (...) @print5()
%52 = tail call i32 (...) @print6()
%53 = tail call i32 (...) @print7()
br label %61
54: ; preds = %1
%55 = tail call i32 (...) @print1()
%56 = tail call i32 (...) @print2()
%57 = tail call i32 (...) @print3()
%58 = tail call i32 (...) @print4()
%59 = tail call i32 (...) @print6()
%60 = tail call i32 (...) @print5()
br label %61
61: ; preds = %1, %54, %46, %42, %35, %29, %24, %18, %12, %9, %2
ret void
}