#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*/ diagd(int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ diagu(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ horizontal(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ vertical(int /*<<< orphan*/, int, int /*<<< orphan*/);
void drawTens(int v) {
  switch (v) {
  case 1:
    horizontal(0, 4, 0);
    break;
  case 2:
    horizontal(0, 4, 4);
    break;
  case 3:
    diagu(0, 4, 4);
    break;
  case 4:
    diagd(0, 4, 0);
    break;
  case 5:
    drawTens(1);
    drawTens(4);
    break;
  case 6:
    vertical(0, 4, 0);
    break;
  case 7:
    drawTens(1);
    drawTens(6);
    break;
  case 8:
    drawTens(2);
    drawTens(6);
    break;
  case 9:
    drawTens(1);
    drawTens(8);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<drawTens>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x8,%eax
ja     1247 <drawTens+0xf7>
mov    -0x10(%rbp),%rax
lea    0xe85(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %edx,%edx
mov    $0x4,%esi
mov    %edx,%edi
call   1050 <horizontal@plt>
jmp    124c <drawTens+0xfc>
xor    %edi,%edi
mov    $0x4,%edx
mov    %edx,%esi
call   1050 <horizontal@plt>
jmp    124c <drawTens+0xfc>
xor    %edi,%edi
mov    $0x4,%edx
mov    %edx,%esi
call   1040 <diagu@plt>
jmp    124c <drawTens+0xfc>
xor    %edx,%edx
mov    $0x4,%esi
mov    %edx,%edi
call   1070 <diagd@plt>
jmp    124c <drawTens+0xfc>
mov    $0x1,%edi
call   1060 <drawTens@plt>
mov    $0x4,%edi
call   1060 <drawTens@plt>
jmp    124c <drawTens+0xfc>
xor    %edx,%edx
mov    $0x4,%esi
mov    %edx,%edi
call   1030 <vertical@plt>
jmp    124c <drawTens+0xfc>
mov    $0x1,%edi
call   1060 <drawTens@plt>
mov    $0x6,%edi
call   1060 <drawTens@plt>
jmp    124c <drawTens+0xfc>
mov    $0x2,%edi
call   1060 <drawTens@plt>
mov    $0x6,%edi
call   1060 <drawTens@plt>
jmp    124c <drawTens+0xfc>
mov    $0x1,%edi
call   1060 <drawTens@plt>
mov    $0x8,%edi
call   1060 <drawTens@plt>
jmp    124c <drawTens+0xfc>
jmp    124c <drawTens+0xfc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawTens>:
push   %rax
add    $0xffffffff,%edi
cmp    $0x8,%edi
ja     1168 <drawTens+0x28>
lea    0xeb0(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
xor    %edi,%edi
mov    $0x4,%esi
xor    %edx,%edx
pop    %rax
jmp    1050 <horizontal@plt>
pop    %rax
ret
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x4,%edx
pop    %rax
jmp    1050 <horizontal@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x4,%edx
pop    %rax
jmp    1040 <diagu@plt>
xor    %edi,%edi
mov    $0x4,%esi
xor    %edx,%edx
call   1050 <horizontal@plt>
xor    %edi,%edi
mov    $0x4,%esi
xor    %edx,%edx
pop    %rax
jmp    1060 <diagd@plt>
xor    %edi,%edi
mov    $0x4,%esi
xor    %edx,%edx
jmp    11d0 <drawTens+0x90>
xor    %edi,%edi
mov    $0x4,%esi
xor    %edx,%edx
call   1050 <horizontal@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x4,%edx
call   1050 <horizontal@plt>
xor    %edi,%edi
mov    $0x4,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <vertical@plt>

LLVM IR (-O0):
define void @drawTens(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %18 [
i32 1, label %4
i32 2, label %6
i32 3, label %8
i32 4, label %10
i32 5, label %12
i32 6, label %13
i32 7, label %15
i32 8, label %16
i32 9, label %17
]
4: ; preds = %1
%5 = call i32 @horizontal(i32 0, i32 4, i32 0)
br label %19
6: ; preds = %1
%7 = call i32 @horizontal(i32 0, i32 4, i32 4)
br label %19
8: ; preds = %1
%9 = call i32 @diagu(i32 0, i32 4, i32 4)
br label %19
10: ; preds = %1
%11 = call i32 @diagd(i32 0, i32 4, i32 0)
br label %19
12: ; preds = %1
br label %19
13: ; preds = %1
%14 = call i32 @vertical(i32 0, i32 4, i32 0)
br label %19
15: ; preds = %1
br label %19
16: ; preds = %1
br label %19
17: ; preds = %1
br label %19
18: ; preds = %1
br label %19
19: ; preds = %18, %17, %16, %15, %13, %12, %10, %8, %6, %4
ret void
}

LLVM IR (-O2):
define void @drawTens(i32 %0) {
switch i32 %0, label %25 [
i32 1, label %2
i32 2, label %4
i32 3, label %6
i32 4, label %8
i32 5, label %10
i32 6, label %13
i32 7, label %15
i32 8, label %18
i32 9, label %21
]
2: ; preds = %1
%3 = tail call i32 @horizontal(i32 0, i32 4, i32 0)
br label %25
4: ; preds = %1
%5 = tail call i32 @horizontal(i32 0, i32 4, i32 4)
br label %25
6: ; preds = %1
%7 = tail call i32 @diagu(i32 0, i32 4, i32 4)
br label %25
8: ; preds = %1
%9 = tail call i32 @diagd(i32 0, i32 4, i32 0)
br label %25
10: ; preds = %1
%11 = tail call i32 @horizontal(i32 0, i32 4, i32 0)
%12 = tail call i32 @diagd(i32 0, i32 4, i32 0)
br label %25
13: ; preds = %1
%14 = tail call i32 @vertical(i32 0, i32 4, i32 0)
br label %25
15: ; preds = %1
%16 = tail call i32 @horizontal(i32 0, i32 4, i32 0)
%17 = tail call i32 @vertical(i32 0, i32 4, i32 0)
br label %25
18: ; preds = %1
%19 = tail call i32 @horizontal(i32 0, i32 4, i32 4)
%20 = tail call i32 @vertical(i32 0, i32 4, i32 0)
br label %25
21: ; preds = %1
%22 = tail call i32 @horizontal(i32 0, i32 4, i32 0)
%23 = tail call i32 @horizontal(i32 0, i32 4, i32 4)
%24 = tail call i32 @vertical(i32 0, i32 4, i32 0)
br label %25
25: ; preds = %1, %21, %18, %15, %13, %10, %8, %6, %4, %2
ret void
}