char Curl_raw_toupper(char in) {
  switch (in) {
  case 'a':
    return 'A';
  case 'b':
    return 'B';
  case 'c':
    return 'C';
  case 'd':
    return 'D';
  case 'e':
    return 'E';
  case 'f':
    return 'F';
  case 'g':
    return 'G';
  case 'h':
    return 'H';
  case 'i':
    return 'I';
  case 'j':
    return 'J';
  case 'k':
    return 'K';
  case 'l':
    return 'L';
  case 'm':
    return 'M';
  case 'n':
    return 'N';
  case 'o':
    return 'O';
  case 'p':
    return 'P';
  case 'q':
    return 'Q';
  case 'r':
    return 'R';
  case 's':
    return 'S';
  case 't':
    return 'T';
  case 'u':
    return 'U';
  case 'v':
    return 'V';
  case 'w':
    return 'W';
  case 'x':
    return 'X';
  case 'y':
    return 'Y';
  case 'z':
    return 'Z';
  }
  return in;
}


x86 assembly (clang, -O0):
<Curl_raw_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x19,%eax
ja     121e <Curl_raw_toupper+0x11e>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x41,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x42,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x43,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x44,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x45,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x46,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x47,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x48,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x49,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x4a,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x4b,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x4c,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x4d,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x4e,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x4f,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x50,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x51,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x52,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x53,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x54,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x55,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x56,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x57,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x58,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x59,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
movb   $0x5a,-0x1(%rbp)
jmp    1224 <Curl_raw_toupper+0x124>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Curl_raw_toupper>:
lea    -0x61(%rdi),%eax
lea    0x41(%rax),%ecx
cmp    $0x1a,%eax
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @Curl_raw_toupper(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %32 [
i32 97, label %6
i32 98, label %7
i32 99, label %8
i32 100, label %9
i32 101, label %10
i32 102, label %11
i32 103, label %12
i32 104, label %13
i32 105, label %14
i32 106, label %15
i32 107, label %16
i32 108, label %17
i32 109, label %18
i32 110, label %19
i32 111, label %20
i32 112, label %21
i32 113, label %22
i32 114, label %23
i32 115, label %24
i32 116, label %25
i32 117, label %26
i32 118, label %27
i32 119, label %28
i32 120, label %29
i32 121, label %30
i32 122, label %31
]
6: ; preds = %1
store i8 65, i8* %2
br label %34
7: ; preds = %1
store i8 66, i8* %2
br label %34
8: ; preds = %1
store i8 67, i8* %2
br label %34
9: ; preds = %1
store i8 68, i8* %2
br label %34
10: ; preds = %1
store i8 69, i8* %2
br label %34
11: ; preds = %1
store i8 70, i8* %2
br label %34
12: ; preds = %1
store i8 71, i8* %2
br label %34
13: ; preds = %1
store i8 72, i8* %2
br label %34
14: ; preds = %1
store i8 73, i8* %2
br label %34
15: ; preds = %1
store i8 74, i8* %2
br label %34
16: ; preds = %1
store i8 75, i8* %2
br label %34
17: ; preds = %1
store i8 76, i8* %2
br label %34
18: ; preds = %1
store i8 77, i8* %2
br label %34
19: ; preds = %1
store i8 78, i8* %2
br label %34
20: ; preds = %1
store i8 79, i8* %2
br label %34
21: ; preds = %1
store i8 80, i8* %2
br label %34
22: ; preds = %1
store i8 81, i8* %2
br label %34
23: ; preds = %1
store i8 82, i8* %2
br label %34
24: ; preds = %1
store i8 83, i8* %2
br label %34
25: ; preds = %1
store i8 84, i8* %2
br label %34
26: ; preds = %1
store i8 85, i8* %2
br label %34
27: ; preds = %1
store i8 86, i8* %2
br label %34
28: ; preds = %1
store i8 87, i8* %2
br label %34
29: ; preds = %1
store i8 88, i8* %2
br label %34
30: ; preds = %1
store i8 89, i8* %2
br label %34
31: ; preds = %1
store i8 90, i8* %2
br label %34
32: ; preds = %1
%33 = load i8, i8* %3
store i8 %33, i8* %2
br label %34
34: ; preds = %32, %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
%35 = load i8, i8* %2
ret i8 %35
}

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