#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*/ flushall();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
main() {
  char vowel1;
  do {
    printf("Please Enter a vowel: \n");
    scanf("%c", &vowel1);
    flushall();
    switch (vowel1) {
    case 'a': {
      printf("You entered a vowel\n");
      break;
    }
    case 'e': {
      printf("You entered a vowel\n");
      break;
    }
    case 'i': {
      printf("You entered a vowel\n");
      break;
    }
    case 'o': {
      printf("You entered a vowel\n");
      break;
    }
    case 'u': {
      printf("You entered a vowel\n");
      break;
    }
    default: {
      printf("You did not enter a vowel\n");
    }
    }
  } while (vowel1 != ' ');
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xefe(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1060 <scanf@plt>
xor    %eax,%eax
call   1040 <flushall@plt>
movsbl -0x5(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x14,%eax
ja     11f1 <main+0xb1>
mov    -0x10(%rbp),%rax
lea    0xe6d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
jmp    11fd <main+0xbd>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
jmp    11fd <main+0xbd>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
jmp    11fd <main+0xbd>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    11fd <main+0xbd>
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
jmp    11fd <main+0xbd>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    1202 <main+0xc2>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jne    114f <main+0xf>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xeaf(%rip),%r14
lea    0xea5(%rip),%r15
lea    0xf(%rsp),%r12
lea    0xec7(%rip),%r13
lea    0xeda(%rip),%rbx
jmp    117c <main+0x3c>
call   1030 <puts@plt>
cmpb   $0x20,0xf(%rsp)
je     11b3 <main+0x73>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1060 <scanf@plt>
xor    %eax,%eax
call   1040 <flushall@plt>
movsbl 0xf(%rsp),%eax
add    $0xffffff9f,%eax
ror    %eax
mov    %r13,%rdi
cmp    $0xa,%eax
ja     1170 <main+0x30>
cltq
movslq (%rbx,%rax,4),%rdi
add    %rbx,%rdi
jmp    1170 <main+0x30>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Please Enter a vowel: \0A\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [21 x i8] c"You entered a vowel\0A\00"
@.str.3 = [27 x i8] c"You did not enter a vowel\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %22, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%6 = call i32 (...) @flushall()
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
switch i32 %8, label %19 [
i32 97, label %9
i32 101, label %11
i32 105, label %13
i32 111, label %15
i32 117, label %17
]
9: ; preds = %3
%10 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %21
11: ; preds = %3
%12 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %21
13: ; preds = %3
%14 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %21
15: ; preds = %3
%16 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %21
17: ; preds = %3
%18 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %21
19: ; preds = %3
%20 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
br label %21
21: ; preds = %19, %17, %15, %13, %11, %9
br label %22
22: ; preds = %21
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 32
br i1 %25, label %3, label %26
26: ; preds = %22
%27 = call i32 (...) @getchar()
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%c\00"
@str = [23 x i8] c"Please Enter a vowel: \00"
@str.8 = [20 x i8] c"You entered a vowel\00"
@str.9 = [26 x i8] c"You did not enter a vowel\00"
@reltable.main = [11 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @str.8 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @str.9 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @str.8 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @str.9 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @str.8 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @str.9 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @str.9 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @str.8 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @str.9 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @str.9 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @str.8 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32)]
define i32 @main() {
%1 = alloca i8
br label %2
2: ; preds = %15, %0
%3 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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* %1)
%5 = call i32 (...) @flushall()
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = add nsw i32 %7, -97
%9 = call i32 @llvm.fshl.i32(i32 %8, i32 %8, i32 31)
%10 = icmp ult i32 %9, 11
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = sext i32 %9 to i64
%13 = shl i64 %12, 2
%14 = call i8* @llvm.load.relative.i64(i8* bitcast ([11 x i32]* @reltable.main to i8*), i64 %13)
br label %15
15: ; preds = %2, %11
%16 = phi i8* [ %14, %11 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @str.9, i64 0, i64 0), %2 ]
%17 = call i32 @puts(i8* dereferenceable(1) %16)
%18 = load i8, i8* %1
%19 = icmp eq i8 %18, 32
br i1 %19, label %20, label %2
20: ; preds = %15
%21 = call i32 (...) @getchar()
ret i32 0
}