char intToChar(int cpop) {
  switch (cpop) {
  case 0:
    return ('A');
    break;
  case 1:
    return ('B');
    break;
  case 2:
    return ('C');
    break;
  case 3:
    return ('D');
    break;
  case 4:
    return ('E');
    break;
  case 5:
    return ('F');
    break;
  case 6:
    return ('G');
    break;
  case 7:
    return ('H');
    break;
  case 8:
    return ('I');
    break;
  case 9:
    return ('J');
    break;
  case 10:
    return ('K');
    break;
  case 11:
    return ('L');
    break;
  case 12:
    return ('M');
    break;
  case 13:
    return ('N');
    break;
  case 14:
    return ('O');
    break;
  case 15:
    return ('P');
    break;
  case 16:
    return ('Q');
    break;
  case 17:
    return ('R');
    break;
  case 18:
    return ('S');
    break;
  case 19:
    return ('T');
    break;
  case 20:
    return ('U');
    break;
  case 21:
    return ('V');
    break;
  case 22:
    return ('W');
    break;
  case 23:
    return ('X');
    break;
  case 24:
    return ('Y');
    break;
  case 25:
    return ('Z');
    break;
  default:
    return ('\0');
  }
}


x86 assembly (clang, -O0):
<intToChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x19,%rax
ja     1216 <intToChar+0x116>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x41,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x42,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x43,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x44,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x45,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x46,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x47,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x48,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x49,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x4a,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x4b,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x4c,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x4d,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x4e,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x4f,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x50,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x51,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x52,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x53,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x54,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x55,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x56,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x57,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x58,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x59,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x5a,-0x1(%rbp)
jmp    121a <intToChar+0x11a>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intToChar>:
lea    0x41(%rdi),%eax
xor    %ecx,%ecx
cmp    $0x1a,%edi
movzbl %al,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @intToChar(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %31 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
i32 6, label %11
i32 7, label %12
i32 8, label %13
i32 9, label %14
i32 10, label %15
i32 11, label %16
i32 12, label %17
i32 13, label %18
i32 14, label %19
i32 15, label %20
i32 16, label %21
i32 17, label %22
i32 18, label %23
i32 19, label %24
i32 20, label %25
i32 21, label %26
i32 22, label %27
i32 23, label %28
i32 24, label %29
i32 25, label %30
]
5: ; preds = %1
store i8 65, i8* %2
br label %32
6: ; preds = %1
store i8 66, i8* %2
br label %32
7: ; preds = %1
store i8 67, i8* %2
br label %32
8: ; preds = %1
store i8 68, i8* %2
br label %32
9: ; preds = %1
store i8 69, i8* %2
br label %32
10: ; preds = %1
store i8 70, i8* %2
br label %32
11: ; preds = %1
store i8 71, i8* %2
br label %32
12: ; preds = %1
store i8 72, i8* %2
br label %32
13: ; preds = %1
store i8 73, i8* %2
br label %32
14: ; preds = %1
store i8 74, i8* %2
br label %32
15: ; preds = %1
store i8 75, i8* %2
br label %32
16: ; preds = %1
store i8 76, i8* %2
br label %32
17: ; preds = %1
store i8 77, i8* %2
br label %32
18: ; preds = %1
store i8 78, i8* %2
br label %32
19: ; preds = %1
store i8 79, i8* %2
br label %32
20: ; preds = %1
store i8 80, i8* %2
br label %32
21: ; preds = %1
store i8 81, i8* %2
br label %32
22: ; preds = %1
store i8 82, i8* %2
br label %32
23: ; preds = %1
store i8 83, i8* %2
br label %32
24: ; preds = %1
store i8 84, i8* %2
br label %32
25: ; preds = %1
store i8 85, i8* %2
br label %32
26: ; preds = %1
store i8 86, i8* %2
br label %32
27: ; preds = %1
store i8 87, i8* %2
br label %32
28: ; preds = %1
store i8 88, i8* %2
br label %32
29: ; preds = %1
store i8 89, i8* %2
br label %32
30: ; preds = %1
store i8 90, i8* %2
br label %32
31: ; preds = %1
store i8 0, i8* %2
br label %32
32: ; preds = %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%33 = load i8, i8* %2
ret i8 %33
}

LLVM IR (-O2):
define signext i8 @intToChar(i32 %0) {
%2 = icmp ult i32 %0, 26
%3 = trunc i32 %0 to i8
%4 = add i8 %3, 65
%5 = select i1 %2, i8 %4, i8 0
ret i8 %5
}