unsigned char num_to_lcd(unsigned char a) {
  switch (a) {
  case 0x00:
    return 0;
  case 0x01:
    return 0x24;
  case 0x02:
    return 1 + 4 + 8 + 16 + 64;
  case 0x03:
    return 1 + 4 + 8 + 32 + 64;
  case 0x04:
    return 2 + 4 + 8 + 32;
  case 0x05:
    return 1 + 4 + 8 + 16 + 64;
  case 0x06:
    return 1 + 2 + 8 + 16 + 32 + 64;
  case 0x07:
    return 1 + 4 + 32;
  case 0x08:
    return 0x7F;
  case 0x09:
    return 0x0F + 32 + 64;
  case 0x0A:
    return 0x0F + 16 + 32;
  case 0x0B:
    return 2 + 8 + 16 + 32 + 64;
  case 0x0C:
    return 1 + 2 + 16 + 64;
  case 0x0D:
    return 4 + 8 + 16 + 32 + 64;
  case 0x0E:
    return 1 + 2 + 8 + 16 + 64;
  case 0x0F:
    return 1 + 2 + 8 + 16;
  }
  return 0;
}


x86 assembly (clang, -O0):
<num_to_lcd>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0xf,%rax
ja     11c0 <num_to_lcd+0xc0>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x0,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x24,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x5d,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x6d,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x2e,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x5d,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x7b,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x25,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x7f,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x6f,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x3f,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x7a,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x53,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x7c,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x5b,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x1b,-0x1(%rbp)
jmp    11c4 <num_to_lcd+0xc4>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_to_lcd>:
add    $0xff,%dil
cmp    $0xe,%dil
ja     1119 <num_to_lcd+0x19>
movsbq %dil,%rax
lea    0xeeb(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define zeroext i8 @num_to_lcd(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
switch i32 %5, label %22 [
i32 0, label %6
i32 1, label %7
i32 2, label %8
i32 3, label %9
i32 4, label %10
i32 5, label %11
i32 6, label %12
i32 7, label %13
i32 8, label %14
i32 9, label %15
i32 10, label %16
i32 11, label %17
i32 12, label %18
i32 13, label %19
i32 14, label %20
i32 15, label %21
]
6: ; preds = %1
store i8 0, i8* %2
br label %23
7: ; preds = %1
store i8 36, i8* %2
br label %23
8: ; preds = %1
store i8 93, i8* %2
br label %23
9: ; preds = %1
store i8 109, i8* %2
br label %23
10: ; preds = %1
store i8 46, i8* %2
br label %23
11: ; preds = %1
store i8 93, i8* %2
br label %23
12: ; preds = %1
store i8 123, i8* %2
br label %23
13: ; preds = %1
store i8 37, i8* %2
br label %23
14: ; preds = %1
store i8 127, i8* %2
br label %23
15: ; preds = %1
store i8 111, i8* %2
br label %23
16: ; preds = %1
store i8 63, i8* %2
br label %23
17: ; preds = %1
store i8 122, i8* %2
br label %23
18: ; preds = %1
store i8 83, i8* %2
br label %23
19: ; preds = %1
store i8 124, i8* %2
br label %23
20: ; preds = %1
store i8 91, i8* %2
br label %23
21: ; preds = %1
store i8 27, i8* %2
br label %23
22: ; preds = %1
store i8 0, i8* %2
br label %23
23: ; preds = %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%24 = load i8, i8* %2
ret i8 %24
}

LLVM IR (-O2):
@switch.table.num_to_lcd = [15 x i8] c"$]m.]{%\7Fo?zS|[\1B"
define zeroext i8 @num_to_lcd(i8 zeroext %0) {
%2 = add i8 %0, -1
%3 = icmp ult i8 %2, 15
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [15 x i8], [15 x i8]* @switch.table.num_to_lcd, i64 0, i64 %5
%7 = load i8, i8* %6
br label %8
8: ; preds = %4, %1
%9 = phi i8 [ 0, %1 ], [ %7, %4 ]
ret i8 %9
}