#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*/ LC_ALL;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
main() {
  setlocale(LC_ALL, "");
  char car;
  printf("Entre com um caractere: ");
  scanf("%c", &car);
  switch (car) {
  case 'a':
    printf("Vogal a \n");
    break;
  case 'e':
    printf("Vogal e \n");
    break;
  case 'i':
    printf("Vogal i \n");
    break;
  case 'o':
    printf("Vogal o \n");
    break;
  case 'u':
    printf("Vogal u \n");
    break;
  default:
    printf("Não é vogal \n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xf2a(%rip),%rsi
call   1040 <setlocale@plt>
lea    0xef9(%rip),%rdi
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1050 <scanf@plt>
movsbl -0x5(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x14,%eax
ja     11ef <main+0xbf>
mov    -0x10(%rbp),%rax
lea    0xe6f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
jmp    11fb <main+0xcb>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
jmp    11fb <main+0xcb>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
jmp    11fb <main+0xcb>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    11fb <main+0xcb>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    11fb <main+0xcb>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1050 <setlocale@plt>
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1060 <scanf@plt>
movsbl 0x7(%rsp),%eax
add    $0xffffff9f,%eax
ror    %eax
cmp    $0xa,%eax
ja     1194 <main+0x54>
cltq
lea    0xecd(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    119b <main+0x5b>
lea    0xeae(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [25 x i8] c"Entre com um caractere: \00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [10 x i8] c"Vogal a \0A\00"
@.str.4 = [10 x i8] c"Vogal e \0A\00"
@.str.5 = [10 x i8] c"Vogal i \0A\00"
@.str.6 = [10 x i8] c"Vogal o \0A\00"
@.str.7 = [10 x i8] c"Vogal u \0A\00"
@.str.8 = [16 x i8] c"N\C3\A3o \C3\A9 vogal \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = load i32, i32* @LC_ALL
%4 = call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%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 = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %21
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %21
13: ; preds = %0
%14 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
br label %21
15: ; preds = %0
%16 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
br label %21
17: ; preds = %0
%18 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
br label %21
19: ; preds = %0
%20 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
br label %21
21: ; preds = %19, %17, %15, %13, %11, %9
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [25 x i8] c"Entre com um caractere: \00"
@.str.2 = [3 x i8] c"%c\00"
@str = [9 x i8] c"Vogal u \00"
@str.9 = [9 x i8] c"Vogal o \00"
@str.10 = [9 x i8] c"Vogal i \00"
@str.11 = [9 x i8] c"Vogal e \00"
@str.12 = [9 x i8] c"Vogal a \00"
@str.13 = [15 x i8] c"N\C3\A3o \C3\A9 vogal \00"
@reltable.main = [11 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @str.12 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @str.13 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @str.11 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @str.13 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @str.10 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @str.13 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @str.13 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @str.9 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @str.13 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @str.13 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @str to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32)]
define i32 @main() {
%1 = alloca i8
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%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 = %0
%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 = %0, %11
%16 = phi i8* [ %14, %11 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @str.13, i64 0, i64 0), %0 ]
%17 = call i32 @puts(i8* dereferenceable(1) %16)
ret i32 0
}