#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 */
scalar_t__ eVogal(char);
char getchar();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
main() {
  char c;
  int count = 0;
  puts("Digite uma sequencia de caracteres: ");
  c = getchar();
  while (c != '.') {
    if (eVogal(c)) {
      count++;
    }
    c = getchar();
  }
  printf("Você digitou um total de %d vogais", count);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2e,%eax
je     11a4 <main+0x64>
movsbl -0x5(%rbp),%edi
call   1040 <eVogal@plt>
cmp    $0x0,%rax
je     1195 <main+0x55>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %al,-0x5(%rbp)
jmp    116c <main+0x2c>
mov    -0xc(%rbp),%esi
lea    0xe77(%rip),%rdi
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <getchar@plt>
cmp    $0x2e,%al
je     117a <main+0x3a>
xor    %ebx,%ebx
nopl   0x0(%rax)
movsbl %al,%edi
call   1040 <eVogal@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
xor    %eax,%eax
call   1060 <getchar@plt>
cmp    $0x2e,%al
jne    1160 <main+0x20>
lea    0xea4(%rip),%rdi
mov    %ebx,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Digite uma sequencia de caracteres: \00"
@.str.1 = [36 x i8] c"Voc\C3\AA digitou um total de %d vogais\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%4 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%5 = call signext i8 (...) @getchar()
store i8 %5, i8* %2
br label %6
6: ; preds = %17, %0
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 46
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i8, i8* %2
%12 = call i64 @eVogal(i8 signext %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %17
17: ; preds = %14, %10
%18 = call signext i8 (...) @getchar()
store i8 %18, i8* %2
br label %6
19: ; preds = %6
%20 = load i32, i32* %3
%21 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@.str = [37 x i8] c"Digite uma sequencia de caracteres: \00"
@.str.1 = [36 x i8] c"Voc\C3\AA digitou um total de %d vogais\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 46
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ 0, %0 ]
%6 = phi i8 [ %11, %4 ], [ %2, %0 ]
%7 = tail call i64 @eVogal(i8 signext %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
%10 = add nuw nsw i32 %5, %9
%11 = tail call signext i8 (...) @getchar()
%12 = icmp eq i8 %11, 46
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i32 [ 0, %0 ], [ %10, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %14)
ret i32 0
}