#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 ej2() {
  char letra;
  printf("Ingrese caracter: \n");
  scanf(" %c", &letra);
  switch (letra) {
  case 'a':
  case 'e':
  case 'i':
  case 'o':
  case 'u':
  case 'A':
  case 'E':
  case 'I':
  case 'O':
  case 'U':
    printf("%c es una vocal\n", letra);
    break;
  default:
    printf("El caracter no es una vocal\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<ej2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x41,%eax
je     11f4 <ej2+0xd4>
jmp    115b <ej2+0x3b>
mov    -0x8(%rbp),%eax
sub    $0x45,%eax
je     11f4 <ej2+0xd4>
jmp    116c <ej2+0x4c>
mov    -0x8(%rbp),%eax
sub    $0x49,%eax
je     11f4 <ej2+0xd4>
jmp    117d <ej2+0x5d>
mov    -0x8(%rbp),%eax
sub    $0x4f,%eax
je     11f4 <ej2+0xd4>
jmp    118e <ej2+0x6e>
mov    -0x8(%rbp),%eax
sub    $0x55,%eax
je     11f4 <ej2+0xd4>
jmp    119f <ej2+0x7f>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
je     11f4 <ej2+0xd4>
jmp    11b0 <ej2+0x90>
mov    -0x8(%rbp),%eax
sub    $0x65,%eax
je     11f4 <ej2+0xd4>
jmp    11c1 <ej2+0xa1>
mov    -0x8(%rbp),%eax
sub    $0x69,%eax
je     11f4 <ej2+0xd4>
jmp    11d2 <ej2+0xb2>
mov    -0x8(%rbp),%eax
sub    $0x6f,%eax
je     11f4 <ej2+0xd4>
jmp    11e3 <ej2+0xc3>
mov    -0x8(%rbp),%eax
sub    $0x75,%eax
jne    120b <ej2+0xeb>
jmp    11f4 <ej2+0xd4>
movsbl -0x1(%rbp),%esi
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1219 <ej2+0xf9>
lea    0xe17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ej2>:
push   %rax
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%esi
lea    -0x41(%rsi),%eax
cmp    $0x34,%eax
ja     117d <ej2+0x4d>
movabs $0x10411100104111,%rcx
bt     %rax,%rcx
jae    117d <ej2+0x4d>
lea    0xe92(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xea4(%rip),%rdi
call   1030 <puts@plt>
jmp    1179 <ej2+0x49>

LLVM IR (-O0):
@.str = [20 x i8] c"Ingrese caracter: \0A\00"
@.str.1 = [4 x i8] c" %c\00"
@.str.2 = [17 x i8] c"%c es una vocal\0A\00"
@.str.3 = [29 x i8] c"El caracter no es una vocal\0A\00"
define i32 @ej2() {
%1 = alloca i8
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 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 %10 [
i32 97, label %6
i32 101, label %6
i32 105, label %6
i32 111, label %6
i32 117, label %6
i32 65, label %6
i32 69, label %6
i32 73, label %6
i32 79, label %6
i32 85, label %6
]
6: ; preds = %0, %0, %0, %0, %0, %0, %0, %0, %0, %0
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %8)
br label %12
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
br label %12
12: ; preds = %10, %6
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c" %c\00"
@.str.2 = [17 x i8] c"%c es una vocal\0A\00"
@str = [19 x i8] c"Ingrese caracter: \00"
@str.4 = [28 x i8] c"El caracter no es una vocal\00"
define i32 @ej2() {
%1 = alloca i8
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 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 %8 [
i32 97, label %6
i32 101, label %6
i32 105, label %6
i32 111, label %6
i32 117, label %6
i32 65, label %6
i32 69, label %6
i32 73, label %6
i32 79, label %6
i32 85, label %6
]
6: ; preds = %0, %0, %0, %0, %0, %0, %0, %0, %0, %0
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %5)
br label %10
8: ; preds = %0
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.4, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret i32 0
}