#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ stdin;
main() {
  char caractere;
  int vogal;
  vogal = 0;
  do {
    printf("Por favor, digite um caracter: ");
    fflush(stdin);
    scanf("%c", &caractere);
    if (caractere == 'a') {
      vogal++;
    } else if (caractere == 'e') {
      vogal++;
    } else if (caractere == 'i') {
      vogal++;
    } else if (caractere == 'o') {
      vogal++;
    } else if (caractere == 'u') {
      vogal++;
    }
  } while (caractere != '.');
  printf("\nA quantidade de vogal e: %d", vogal);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    0xeb7(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1050 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jne    118d <main+0x5d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1208 <main+0xd8>
movsbl -0x5(%rbp),%eax
cmp    $0x65,%eax
jne    11a8 <main+0x78>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1203 <main+0xd3>
movsbl -0x5(%rbp),%eax
cmp    $0x69,%eax
jne    11c3 <main+0x93>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11fe <main+0xce>
movsbl -0x5(%rbp),%eax
cmp    $0x6f,%eax
jne    11de <main+0xae>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11f9 <main+0xc9>
movsbl -0x5(%rbp),%eax
cmp    $0x75,%eax
jne    11f4 <main+0xc4>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11f9 <main+0xc9>
jmp    11fe <main+0xce>
jmp    1203 <main+0xd3>
jmp    1208 <main+0xd8>
jmp    120d <main+0xdd>
movsbl -0x5(%rbp),%eax
cmp    $0x2e,%eax
jne    1146 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xdff(%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   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xeea(%rip),%r14
mov    0x2e9f(%rip),%r13
lea    0xefc(%rip),%r15
lea    0x7(%rsp),%r12
lea    0xea4(%rip),%rbp
xor    %ebx,%ebx
jmp    1164 <main+0x34>
cmp    $0x2e,%al
je     11a3 <main+0x73>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x0(%r13),%edi
call   1040 <fflush@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
movzbl 0x7(%rsp),%eax
lea    -0x61(%rax),%ecx
ror    %cl
cmp    $0xa,%cl
ja     1160 <main+0x30>
movzbl %cl,%ecx
movslq 0x0(%rbp,%rcx,4),%rcx
add    %rbp,%rcx
jmp    *%rcx
add    $0x1,%ebx
jmp    1160 <main+0x30>
lea    0xea5(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Por favor, digite um caracter: \00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [29 x i8] c"\0AA quantidade de vogal e: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %48, %0
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = call i32 @fflush(i32 %6)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 97
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %47
15: ; preds = %4
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 101
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %46
22: ; preds = %15
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 105
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %45
29: ; preds = %22
%30 = load i8, i8* %2
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 111
br i1 %32, label %33, label %36
33: ; preds = %29
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
br label %44
36: ; preds = %29
%37 = load i8, i8* %2
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 117
br i1 %39, label %40, label %43
40: ; preds = %36
%41 = load i32, i32* %3
%42 = add nsw i32 %41, 1
store i32 %42, i32* %3
br label %43
43: ; preds = %40, %36
br label %44
44: ; preds = %43, %33
br label %45
45: ; preds = %44, %26
br label %46
46: ; preds = %45, %19
br label %47
47: ; preds = %46, %12
br label %48
48: ; preds = %47
%49 = load i8, i8* %2
%50 = sext i8 %49 to i32
%51 = icmp ne i32 %50, 46
br i1 %51, label %4, label %52
52: ; preds = %48
%53 = load i32, i32* %3
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %53)
%55 = load i32, i32* %1
ret i32 %55
}

LLVM IR (-O2):
@.str = [32 x i8] c"Por favor, digite um caracter: \00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [29 x i8] c"\0AA quantidade de vogal e: %d\00"
define i32 @main() {
%1 = alloca i8
br label %2
2: ; preds = %21, %0
%3 = phi i32 [ 0, %0 ], [ %22, %21 ]
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdin
%6 = call i32 @fflush(i32 %5)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%8 = load i8, i8* %1
%9 = add i8 %8, -97
%10 = call i8 @llvm.fshl.i8(i8 %9, i8 %9, i8 7)
switch i8 %10, label %21 [
i8 0, label %11
i8 2, label %13
i8 4, label %15
i8 7, label %17
i8 10, label %19
]
11: ; preds = %2
%12 = add nsw i32 %3, 1
br label %21
13: ; preds = %2
%14 = add nsw i32 %3, 1
br label %21
15: ; preds = %2
%16 = add nsw i32 %3, 1
br label %21
17: ; preds = %2
%18 = add nsw i32 %3, 1
br label %21
19: ; preds = %2
%20 = add nsw i32 %3, 1
br label %21
21: ; preds = %2, %11, %15, %19, %17, %13
%22 = phi i32 [ %12, %11 ], [ %14, %13 ], [ %16, %15 ], [ %18, %17 ], [ %20, %19 ], [ %3, %2 ]
%23 = icmp eq i8 %8, 46
br i1 %23, label %24, label %2
24: ; preds = %21
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %22)
ret i32 0
}