#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 */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char letter;
  printf("Enter a letter: ");
  scanf("%c", &letter);
  switch (letter) {
  case 'a':
  case 'A':
  case 'e':
  case 'E':
  case 'i':
  case 'I':
  case 'o':
  case 'O':
  case 'u':
  case 'U':
    printf("%c is a vowel.\n", letter);
    break;
  default:
    printf("%c is a consonant.\n", letter);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x41,%eax
je     11fb <main+0xdb>
jmp    1162 <main+0x42>
mov    -0xc(%rbp),%eax
sub    $0x45,%eax
je     11fb <main+0xdb>
jmp    1173 <main+0x53>
mov    -0xc(%rbp),%eax
sub    $0x49,%eax
je     11fb <main+0xdb>
jmp    1184 <main+0x64>
mov    -0xc(%rbp),%eax
sub    $0x4f,%eax
je     11fb <main+0xdb>
jmp    1195 <main+0x75>
mov    -0xc(%rbp),%eax
sub    $0x55,%eax
je     11fb <main+0xdb>
jmp    11a6 <main+0x86>
mov    -0xc(%rbp),%eax
sub    $0x61,%eax
je     11fb <main+0xdb>
jmp    11b7 <main+0x97>
mov    -0xc(%rbp),%eax
sub    $0x65,%eax
je     11fb <main+0xdb>
jmp    11c8 <main+0xa8>
mov    -0xc(%rbp),%eax
sub    $0x69,%eax
je     11fb <main+0xdb>
jmp    11d9 <main+0xb9>
mov    -0xc(%rbp),%eax
sub    $0x6f,%eax
je     11fb <main+0xdb>
jmp    11ea <main+0xca>
mov    -0xc(%rbp),%eax
sub    $0x75,%eax
jne    1212 <main+0xf2>
jmp    11fb <main+0xdb>
movsbl -0x5(%rbp),%esi
lea    0xe0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1224 <main+0x104>
movsbl -0x5(%rbp),%esi
lea    0xe07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
movsbl 0x7(%rsp),%esi
lea    -0x41(%rsi),%eax
cmp    $0x34,%eax
ja     116f <main+0x4f>
movabs $0x10411100104111,%rcx
bt     %rax,%rcx
jae    116f <main+0x4f>
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeae(%rip),%rdi
jmp    1164 <main+0x44>

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a letter: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [16 x i8] c"%c is a vowel.\0A\00"
@.str.3 = [20 x i8] c"%c is a consonant.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
switch i32 %6, label %11 [
i32 97, label %7
i32 65, label %7
i32 101, label %7
i32 69, label %7
i32 105, label %7
i32 73, label %7
i32 111, label %7
i32 79, label %7
i32 117, label %7
i32 85, label %7
]
7: ; preds = %0, %0, %0, %0, %0, %0, %0, %0, %0, %0
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %9)
br label %15
11: ; preds = %0
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %11, %7
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a letter: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [16 x i8] c"%c is a vowel.\0A\00"
@.str.3 = [20 x i8] c"%c is a consonant.\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
switch i32 %5, label %6 [
i32 97, label %7
i32 65, label %7
i32 101, label %7
i32 69, label %7
i32 105, label %7
i32 73, label %7
i32 111, label %7
i32 79, label %7
i32 117, label %7
i32 85, label %7
]
6: ; preds = %0
br label %7
7: ; preds = %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %6
%8 = phi i8* [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), %0 ]
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %8, i32 %5)
ret i32 0
}