#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
bool is_vowel(char ch) {
  switch (ch) {
  case 'A':
  case 'E':
  case 'I':
  case 'O':
  case 'U':
  case 'Y':
  case 'a':
  case 'e':
  case 'i':
  case 'o':
  case 'u':
  case 'y':
    return true;
  default:
    return false;
  }
}


x86 assembly (clang, -O0):
<is_vowel>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x41,%eax
je     11da <is_vowel+0xda>
jmp    111f <is_vowel+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x45,%eax
je     11da <is_vowel+0xda>
jmp    1130 <is_vowel+0x30>
mov    -0xc(%rbp),%eax
sub    $0x49,%eax
je     11da <is_vowel+0xda>
jmp    1141 <is_vowel+0x41>
mov    -0xc(%rbp),%eax
sub    $0x4f,%eax
je     11da <is_vowel+0xda>
jmp    1152 <is_vowel+0x52>
mov    -0xc(%rbp),%eax
sub    $0x55,%eax
je     11da <is_vowel+0xda>
jmp    1163 <is_vowel+0x63>
mov    -0xc(%rbp),%eax
sub    $0x59,%eax
je     11da <is_vowel+0xda>
jmp    1174 <is_vowel+0x74>
mov    -0xc(%rbp),%eax
sub    $0x61,%eax
je     11da <is_vowel+0xda>
jmp    1185 <is_vowel+0x85>
mov    -0xc(%rbp),%eax
sub    $0x65,%eax
je     11da <is_vowel+0xda>
jmp    1196 <is_vowel+0x96>
mov    -0xc(%rbp),%eax
sub    $0x69,%eax
je     11da <is_vowel+0xda>
jmp    11a7 <is_vowel+0xa7>
mov    -0xc(%rbp),%eax
sub    $0x6f,%eax
je     11da <is_vowel+0xda>
jmp    11b8 <is_vowel+0xb8>
mov    -0xc(%rbp),%eax
sub    $0x75,%eax
je     11da <is_vowel+0xda>
jmp    11c9 <is_vowel+0xc9>
mov    -0xc(%rbp),%eax
sub    $0x79,%eax
jne    11e6 <is_vowel+0xe6>
jmp    11da <is_vowel+0xda>
movl   $0x1,-0x4(%rbp)
jmp    11ed <is_vowel+0xed>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_vowel>:
add    $0xffffffbf,%edi
ror    %edi
xor    %eax,%eax
cmp    $0x1c,%edi
ja     1119 <is_vowel+0x19>
movslq %edi,%rax
lea    0xeea(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @is_vowel(i8 signext %0) {
%2 = alloca i32
%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 65, label %6
i32 69, label %6
i32 73, label %6
i32 79, label %6
i32 85, label %6
i32 89, label %6
i32 97, label %6
i32 101, label %6
i32 105, label %6
i32 111, label %6
i32 117, label %6
i32 121, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@switch.table.is_vowel = [29 x i32] [i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1]
define i32 @is_vowel(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -65
%4 = tail call i32 @llvm.fshl.i32(i32 %3, i32 %3, i32 31)
%5 = icmp ult i32 %4, 29
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds [29 x i32], [29 x i32]* @switch.table.is_vowel, i64 0, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}