#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*/ Display0(int);
int /*<<< orphan*/ Display1(int);
int /*<<< orphan*/ Display2(int);
int /*<<< orphan*/ Display3(int);
int /*<<< orphan*/ Display4(int);
int /*<<< orphan*/ Display5(int);
int /*<<< orphan*/ Display6(int);
int /*<<< orphan*/ Display7(int);
int /*<<< orphan*/ Display8(int);
int /*<<< orphan*/ Display9(int);
void DisplayDigit(int DigitToDisplay, int Pos) {
  switch (DigitToDisplay) {
  case 48:
    Display0(Pos);
    break;
  case 49:
    Display1(Pos);
    break;
  case 50:
    Display2(Pos);
    break;
  case 51:
    Display3(Pos);
    break;
  case 52:
    Display4(Pos);
    break;
  case 53:
    Display5(Pos);
    break;
  case 54:
    Display6(Pos);
    break;
  case 55:
    Display7(Pos);
    break;
  case 56:
    Display8(Pos);
    break;
  case 57:
    Display9(Pos);
    break;
  }
}


x86 assembly (clang, -O0):
<DisplayDigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x9,%eax
ja     1254 <DisplayDigit+0xb4>
mov    -0x10(%rbp),%rax
lea    0xe32(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%edi
call   10a0 <Display0@plt>
jmp    1254 <DisplayDigit+0xb4>
mov    -0x8(%rbp),%edi
call   1050 <Display1@plt>
jmp    1254 <DisplayDigit+0xb4>
mov    -0x8(%rbp),%edi
call   1090 <Display2@plt>
jmp    1254 <DisplayDigit+0xb4>
mov    -0x8(%rbp),%edi
call   1040 <Display3@plt>
jmp    1254 <DisplayDigit+0xb4>
mov    -0x8(%rbp),%edi
call   1080 <Display4@plt>
jmp    1254 <DisplayDigit+0xb4>
mov    -0x8(%rbp),%edi
call   1030 <Display5@plt>
jmp    1254 <DisplayDigit+0xb4>
mov    -0x8(%rbp),%edi
call   1070 <Display6@plt>
jmp    1254 <DisplayDigit+0xb4>
mov    -0x8(%rbp),%edi
call   10b0 <Display7@plt>
jmp    1254 <DisplayDigit+0xb4>
mov    -0x8(%rbp),%edi
call   1060 <Display8@plt>
jmp    1254 <DisplayDigit+0xb4>
mov    -0x8(%rbp),%edi
call   10c0 <Display9@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DisplayDigit>:
add    $0xffffffd0,%edi
cmp    $0x9,%edi
ja     11bf <DisplayDigit+0x1f>
lea    0xe51(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    %esi,%edi
jmp    10a0 <Display0@plt>
ret
mov    %esi,%edi
jmp    1050 <Display1@plt>
mov    %esi,%edi
jmp    1090 <Display2@plt>
mov    %esi,%edi
jmp    1040 <Display3@plt>
mov    %esi,%edi
jmp    1080 <Display4@plt>
mov    %esi,%edi
jmp    1030 <Display5@plt>
mov    %esi,%edi
jmp    1070 <Display6@plt>
mov    %esi,%edi
jmp    10b0 <Display7@plt>
mov    %esi,%edi
jmp    10c0 <Display9@plt>
mov    %esi,%edi
jmp    1060 <Display8@plt>

LLVM IR (-O0):
define void @DisplayDigit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
switch i32 %5, label %36 [
i32 48, label %6
i32 49, label %9
i32 50, label %12
i32 51, label %15
i32 52, label %18
i32 53, label %21
i32 54, label %24
i32 55, label %27
i32 56, label %30
i32 57, label %33
]
6: ; preds = %2
%7 = load i32, i32* %4
%8 = call i32 @Display0(i32 %7)
br label %36
9: ; preds = %2
%10 = load i32, i32* %4
%11 = call i32 @Display1(i32 %10)
br label %36
12: ; preds = %2
%13 = load i32, i32* %4
%14 = call i32 @Display2(i32 %13)
br label %36
15: ; preds = %2
%16 = load i32, i32* %4
%17 = call i32 @Display3(i32 %16)
br label %36
18: ; preds = %2
%19 = load i32, i32* %4
%20 = call i32 @Display4(i32 %19)
br label %36
21: ; preds = %2
%22 = load i32, i32* %4
%23 = call i32 @Display5(i32 %22)
br label %36
24: ; preds = %2
%25 = load i32, i32* %4
%26 = call i32 @Display6(i32 %25)
br label %36
27: ; preds = %2
%28 = load i32, i32* %4
%29 = call i32 @Display7(i32 %28)
br label %36
30: ; preds = %2
%31 = load i32, i32* %4
%32 = call i32 @Display8(i32 %31)
br label %36
33: ; preds = %2
%34 = load i32, i32* %4
%35 = call i32 @Display9(i32 %34)
br label %36
36: ; preds = %2, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6
ret void
}

LLVM IR (-O2):
define void @DisplayDigit(i32 %0, i32 %1) {
switch i32 %0, label %23 [
i32 48, label %3
i32 49, label %5
i32 50, label %7
i32 51, label %9
i32 52, label %11
i32 53, label %13
i32 54, label %15
i32 55, label %17
i32 56, label %19
i32 57, label %21
]
3: ; preds = %2
%4 = tail call i32 @Display0(i32 %1)
br label %23
5: ; preds = %2
%6 = tail call i32 @Display1(i32 %1)
br label %23
7: ; preds = %2
%8 = tail call i32 @Display2(i32 %1)
br label %23
9: ; preds = %2
%10 = tail call i32 @Display3(i32 %1)
br label %23
11: ; preds = %2
%12 = tail call i32 @Display4(i32 %1)
br label %23
13: ; preds = %2
%14 = tail call i32 @Display5(i32 %1)
br label %23
15: ; preds = %2
%16 = tail call i32 @Display6(i32 %1)
br label %23
17: ; preds = %2
%18 = tail call i32 @Display7(i32 %1)
br label %23
19: ; preds = %2
%20 = tail call i32 @Display8(i32 %1)
br label %23
21: ; preds = %2
%22 = tail call i32 @Display9(i32 %1)
br label %23
23: ; preds = %2, %21, %19, %17, %15, %13, %11, %9, %7, %5, %3
ret void
}