char *d7_name(int x) {
  int d7[64] = {0, 1, 2, 3, 4,  5,  6,  7,  1, 2, 3, 4,  5,  6,  7,  8,
                2, 3, 4, 5, 6,  7,  8,  9,  3, 4, 5, 6,  7,  8,  9,  10,
                4, 5, 6, 7, 8,  9,  10, 11, 5, 6, 7, 8,  9,  10, 11, 12,
                6, 7, 8, 9, 10, 11, 12, 13, 7, 8, 9, 10, 11, 12, 13, 14};
  static char s[15][5] = {"",     "",     "B2B2", "C2B3", "D2B4",
                          "E2B5", "F2B6", "G2B7", "G3C7", "G4D7",
                          "G5E7", "G6F7", "G7G7", "",     ""};
  return s[d7[x]];
}


x86 assembly (clang, -O0):
<d7_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
lea    0xed4(%rip),%rsi
mov    $0x100,%edx
call   1030 <memcpy@plt>
movslq -0x4(%rbp),%rax
movslq -0x110(%rbp,%rax,4),%rcx
ff
lea    0x2ee7(%rip),%rax
imul   $0x5,%rcx,%rcx
add    %rcx,%rax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d7_name>:
movslq %edi,%rax
lea    0xef6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
lea    (%rax,%rax,4),%rcx
lea    0x2f17(%rip),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
@__const.d7_name.d7 = [64 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14]
@d7_name.s = internal global [15 x [5 x i8]] [[5 x i8] zeroinitializer, [5 x i8] zeroinitializer, [5 x i8] c"B2B2\00", [5 x i8] c"C2B3\00", [5 x i8] c"D2B4\00", [5 x i8] c"E2B5\00", [5 x i8] c"F2B6\00", [5 x i8] c"G2B7\00", [5 x i8] c"G3C7\00", [5 x i8] c"G4D7\00", [5 x i8] c"G5E7\00", [5 x i8] c"G6F7\00", [5 x i8] c"G7G7\00", [5 x i8] zeroinitializer, [5 x i8] zeroinitializer]
define i8* @d7_name(i32 %0) {
%2 = alloca i32
%3 = alloca [64 x i32]
store i32 %0, i32* %2
%4 = bitcast [64 x i32]* %3 to i8*
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 %6
%8 = load i32, i32* %7
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [15 x [5 x i8]], [15 x [5 x i8]]* @d7_name.s, i64 0, i64 %9
%11 = getelementptr inbounds [5 x i8], [5 x i8]* %10, i64 0, i64 0
ret i8* %11
}

LLVM IR (-O2):
@__const.d7_name.d7 = [64 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14]
@d7_name.s = internal global [15 x [5 x i8]] [[5 x i8] zeroinitializer, [5 x i8] zeroinitializer, [5 x i8] c"B2B2\00", [5 x i8] c"C2B3\00", [5 x i8] c"D2B4\00", [5 x i8] c"E2B5\00", [5 x i8] c"F2B6\00", [5 x i8] c"G2B7\00", [5 x i8] c"G3C7\00", [5 x i8] c"G4D7\00", [5 x i8] c"G5E7\00", [5 x i8] c"G6F7\00", [5 x i8] c"G7G7\00", [5 x i8] zeroinitializer, [5 x i8] zeroinitializer]
define i8* @d7_name(i32 %0) {
%2 = sext i32 %0 to i64
%3 = getelementptr inbounds [64 x i32], [64 x i32]* @__const.d7_name.d7, i64 0, i64 %2
%4 = load i32, i32* %3
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [15 x [5 x i8]], [15 x [5 x i8]]* @d7_name.s, i64 0, i64 %5, i64 0
ret i8* %6
}