#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 *);
main() {
  char ch;
  printf("Please enter character: ");
  scanf("%c", &ch);
  switch (ch) {
  case 'a':
  case 'e':
  case 'i':
  case 'o':
  case 'u':
  case 'A':
  case 'E':
  case 'I':
  case 'O':
  case 'U':
    printf("%c is a vowel.", ch);
    break;
  default:
    printf("%c is not a vowel.", ch);
  }
}


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    0xed5(%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    0xe16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1224 <main+0x104>
movsbl -0x5(%rbp),%esi
lea    0xe0e(%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    0xee3(%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    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb5(%rip),%rdi
jmp    1164 <main+0x44>

LLVM IR (-O0):
@.str = [25 x i8] c"Please enter character: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [15 x i8] c"%c is a vowel.\00"
@.str.3 = [19 x i8] c"%c is not a vowel.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 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 101, label %7
i32 105, label %7
i32 111, label %7
i32 117, label %7
i32 65, label %7
i32 69, label %7
i32 73, label %7
i32 79, 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 ([15 x i8], [15 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 ([19 x i8], [19 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 = [25 x i8] c"Please enter character: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [15 x i8] c"%c is a vowel.\00"
@.str.3 = [19 x i8] c"%c is not a vowel.\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 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 101, label %7
i32 105, label %7
i32 111, label %7
i32 117, label %7
i32 65, label %7
i32 69, label %7
i32 73, label %7
i32 79, 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 ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %0 ]
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %8, i32 %5)
ret i32 0
}