char *article(char firstLetterOfNoun) {
  switch (firstLetterOfNoun) {
  case 'a':
  case 'e':
  case 'i':
  case 'o':
  case 'u':
    return "An";
  default:
    return "A";
  }
}


x86 assembly (clang, -O0):
<article>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x61,%eax
je     1163 <article+0x63>
jmp    111f <article+0x1f>
mov    -0x10(%rbp),%eax
sub    $0x65,%eax
je     1163 <article+0x63>
jmp    1130 <article+0x30>
mov    -0x10(%rbp),%eax
sub    $0x69,%eax
je     1163 <article+0x63>
jmp    1141 <article+0x41>
mov    -0x10(%rbp),%eax
sub    $0x6f,%eax
je     1163 <article+0x63>
jmp    1152 <article+0x52>
mov    -0x10(%rbp),%eax
sub    $0x75,%eax
jne    1173 <article+0x73>
jmp    1163 <article+0x63>
lea    0xe96(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117e <article+0x7e>
lea    0xe89(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<article>:
add    $0xffffff9f,%edi
ror    %edi
cmp    $0xa,%edi
ja     111c <article+0x1c>
movslq %edi,%rax
lea    0xef4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xee0(%rip),%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"An\00"
@.str.1 = [2 x i8] c"A\00"
define i8* @article(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 %7 [
i32 97, label %6
i32 101, label %6
i32 105, label %6
i32 111, label %6
i32 117, label %6
]
6: ; preds = %1, %1, %1, %1, %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"An\00"
@.str.1 = [2 x i8] c"A\00"
@reltable.article = [11 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([11 x i32]* @reltable.article to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.1 to i64), i64 ptrtoint ([11 x i32]* @reltable.article to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([11 x i32]* @reltable.article to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.1 to i64), i64 ptrtoint ([11 x i32]* @reltable.article to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([11 x i32]* @reltable.article to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.1 to i64), i64 ptrtoint ([11 x i32]* @reltable.article to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.1 to i64), i64 ptrtoint ([11 x i32]* @reltable.article to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([11 x i32]* @reltable.article to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.1 to i64), i64 ptrtoint ([11 x i32]* @reltable.article to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.1 to i64), i64 ptrtoint ([11 x i32]* @reltable.article to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([11 x i32]* @reltable.article to i64)) to i32)]
define i8* @article(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -97
%4 = tail call i32 @llvm.fshl.i32(i32 %3, i32 %3, i32 31)
%5 = icmp ult i32 %4, 11
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = sext i32 %4 to i64
%8 = shl i64 %7, 2
%9 = call i8* @llvm.load.relative.i64(i8* bitcast ([11 x i32]* @reltable.article to i8*), i64 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i8* [ %9, %6 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %1 ]
ret i8* %11
}