#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*/ gets(char *);
int /*<<< orphan*/ printf(char *, int);
int strlen(char *);
int main(void) {
  char a[80 + 1];
  int i, contador;
  printf("Introduce una cadena (max %d cars): ", 80);
  gets(a);
  contador = 0;
  for (i = 0; i < strlen(a); i++) {
    if (a[i] == 'a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' ||
        a[i] == 'u') {
      contador++;
    }
  }
  printf("vocales minusculas: %d\n", contador);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x50,%esi
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
call   1050 <gets@plt>
movl   $0x0,-0x68(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x6c(%rbp)
lea    -0x60(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x6c(%rbp),%eax
cmp    %ecx,%eax
jge    11f9 <main+0xc9>
movslq -0x64(%rbp),%rax
movsbl -0x60(%rbp,%rax,1),%eax
cmp    $0x61,%eax
je     11dd <main+0xad>
movslq -0x64(%rbp),%rax
movsbl -0x60(%rbp,%rax,1),%eax
cmp    $0x65,%eax
je     11dd <main+0xad>
movslq -0x64(%rbp),%rax
movsbl -0x60(%rbp,%rax,1),%eax
cmp    $0x69,%eax
je     11dd <main+0xad>
movslq -0x64(%rbp),%rax
movsbl -0x60(%rbp,%rax,1),%eax
cmp    $0x6f,%eax
je     11dd <main+0xad>
movslq -0x64(%rbp),%rax
movsbl -0x60(%rbp,%rax,1),%eax
cmp    $0x75,%eax
jne    11e6 <main+0xb6>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    11eb <main+0xbb>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1167 <main+0x37>
mov    -0x68(%rbp),%esi
lea    0xe22(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x58,%rsp
lea    0xebf(%rip),%rdi
mov    $0x50,%esi
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    11ad <main+0x7d>
xor    %ebx,%ebx
mov    %rsp,%r14
mov    $0x495,%r15d
xor    %ebp,%ebp
jmp    1193 <main+0x63>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jge    11af <main+0x7f>
movzbl (%rsp,%rbx,1),%eax
add    $0x9f,%al
ror    %al
cmp    $0xa,%al
ja     1180 <main+0x50>
movzbl %al,%eax
bt     %rax,%r15
jae    1180 <main+0x50>
add    $0x1,%ebp
jmp    1180 <main+0x50>
xor    %ebp,%ebp
lea    0xe6f(%rip),%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Introduce una cadena (max %d cars): \00"
@.str.1 = [24 x i8] c"vocales minusculas: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [81 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 80)
%6 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%7 = call i32 @gets(i8* %6)
store i32 0, i32* %4
store i32 0, i32* %3
br label %8
8: ; preds = %52, %0
%9 = load i32, i32* %3
%10 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%11 = call i32 @strlen(i8* %10)
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %55
13: ; preds = %8
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 97
br i1 %19, label %48, label %20
20: ; preds = %13
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 101
br i1 %26, label %48, label %27
27: ; preds = %20
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 %29
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 105
br i1 %33, label %48, label %34
34: ; preds = %27
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 %36
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = icmp eq i32 %39, 111
br i1 %40, label %48, label %41
41: ; preds = %34
%42 = load i32, i32* %3
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 %43
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp eq i32 %46, 117
br i1 %47, label %48, label %51
48: ; preds = %41, %34, %27, %20, %13
%49 = load i32, i32* %4
%50 = add nsw i32 %49, 1
store i32 %50, i32* %4
br label %51
51: ; preds = %48, %41
br label %52
52: ; preds = %51
%53 = load i32, i32* %3
%54 = add nsw i32 %53, 1
store i32 %54, i32* %3
br label %8
55: ; preds = %8
%56 = load i32, i32* %4
%57 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %56)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"Introduce una cadena (max %d cars): \00"
@.str.1 = [24 x i8] c"vocales minusculas: %d\0A\00"
define i32 @main() {
%1 = alloca [81 x i8]
%2 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 80)
%4 = call i32 @gets(i8* %2)
%5 = call i32 @strlen(i8* %2)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %22
7: ; preds = %0, %16
%8 = phi i64 [ %18, %16 ], [ 0, %0 ]
%9 = phi i32 [ %17, %16 ], [ 0, %0 ]
%10 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 %8
%11 = load i8, i8* %10
%12 = add i8 %11, -97
%13 = call i8 @llvm.fshl.i8(i8 %12, i8 %12, i8 7)
switch i8 %13, label %16 [
i8 0, label %14
i8 2, label %14
i8 4, label %14
i8 7, label %14
i8 10, label %14
]
14: ; preds = %7, %7, %7, %7, %7
%15 = add nsw i32 %9, 1
br label %16
16: ; preds = %7, %14
%17 = phi i32 [ %15, %14 ], [ %9, %7 ]
%18 = add nuw nsw i64 %8, 1
%19 = call i32 @strlen(i8* %2)
%20 = sext i32 %19 to i64
%21 = icmp slt i64 %18, %20
br i1 %21, label %7, label %22
22: ; preds = %16, %0
%23 = phi i32 [ 0, %0 ], [ %17, %16 ]
%24 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %23)
ret i32 0
}