#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 checkVowel(char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char x;
  printf("Digite uma letra: ");
  scanf("%c", &x);
  if (checkVowel(x) == 1)
    printf("\nA letra [ %c ] eh uma vogal: ", x);
  else
    printf("\nA letra [ %c ] eh uma constante: ", x);
  printf("\n\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1050 <scanf@plt>
movsbl -0x5(%rbp),%edi
call   1030 <checkVowel@plt>
cmp    $0x1,%eax
jne    1186 <main+0x56>
movsbl -0x5(%rbp),%esi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1198 <main+0x68>
movsbl -0x5(%rbp),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xebd(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1060 <scanf@plt>
movsbl 0x7(%rsp),%edi
call   1040 <checkVowel@plt>
cmp    $0x1,%eax
movsbl 0x7(%rsp),%esi
lea    0xe9d(%rip),%rax
lea    0xeb5(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Digite uma letra: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [31 x i8] c"\0AA letra [ %c ] eh uma vogal: \00"
@.str.3 = [35 x i8] c"\0AA letra [ %c ] eh uma constante: \00"
@.str.4 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 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 = call i32 @checkVowel(i8 signext %5)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %10)
br label %16
12: ; preds = %0
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %12, %8
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Digite uma letra: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [31 x i8] c"\0AA letra [ %c ] eh uma vogal: \00"
@.str.3 = [35 x i8] c"\0AA letra [ %c ] eh uma constante: \00"
@str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 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 = call i32 @checkVowel(i8 signext %4)
%6 = icmp eq i32 %5, 1
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
%9 = select i1 %6, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %9, i32 %8)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}