#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 *, ...);
scalar_t__ strchr(char *, char);
int strlen(char *);
int main() {
  char a[25];
  int nr_siruri, nr_vocale = 0, i;
  printf("Nr sir : ");
  scanf("%d", &nr_siruri);
  while (nr_siruri > 0) {
    scanf("%s", &a);
    for (i = 0; i < strlen(a); i++)
      if (strchr("aeiou", a[i]))
        nr_vocale++;
    printf("%d \n", nr_vocale);
    nr_vocale = 0;
    nr_siruri--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x28(%rbp)
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe9f(%rip),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
cmpl   $0x0,-0x24(%rbp)
jle    1216 <main+0xd6>
lea    0xe86(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
cmp    %ecx,%eax
jge    11f0 <main+0xb0>
movslq -0x2c(%rbp),%rax
lea    0xe50(%rip),%rdi
movsbl -0x20(%rbp,%rax,1),%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     11dd <main+0x9d>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11e2 <main+0xa2>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1199 <main+0x59>
mov    -0x28(%rbp),%esi
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1176 <main+0x36>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea7(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1209 <main+0xc9>
lea    0xe8c(%rip),%r14
lea    0x10(%rsp),%r13
lea    0xe83(%rip),%r15
lea    0xe82(%rip),%r12
jmp    11bc <main+0x7c>
cs nopw 0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
cmp    $0x1,%eax
jle    1209 <main+0xc9>
mov    %r14,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %r13,%rdi
call   1030 <strlen@plt>
mov    $0x0,%ebp
test   %eax,%eax
jle    11a0 <main+0x60>
xor    %ebx,%ebx
xor    %ebp,%ebp
xchg   %ax,%ax
movsbl 0x10(%rsp,%rbx,1),%esi
mov    %r15,%rdi
call   1040 <strchr@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebp
add    $0x1,%rbx
mov    %r13,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     11e0 <main+0xa0>
jmp    11a0 <main+0x60>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Nr sir : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [6 x i8] c"aeiou\00"
@.str.4 = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [25 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
br label %8
8: ; preds = %32, %0
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %37
11: ; preds = %8
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), [25 x i8]* %2)
store i32 0, i32* %5
br label %13
13: ; preds = %29, %11
%14 = load i32, i32* %5
%15 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%16 = call i32 @strlen(i8* %15)
%17 = icmp slt i32 %14, %16
br i1 %17, label %18, label %32
18: ; preds = %13
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = call i64 @strchr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8 signext %22)
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %18
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %28
28: ; preds = %25, %18
br label %29
29: ; preds = %28
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %13
32: ; preds = %13
%33 = load i32, i32* %4
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %33)
store i32 0, i32* %4
%35 = load i32, i32* %3
%36 = add nsw i32 %35, -1
store i32 %36, i32* %3
br label %8
37: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Nr sir : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [6 x i8] c"aeiou\00"
@.str.4 = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = alloca [25 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %32
9: ; preds = %0, %26
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), [25 x i8]* %1)
%11 = call i32 @strlen(i8* %3)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %26
13: ; preds = %9, %13
%14 = phi i64 [ %22, %13 ], [ 0, %9 ]
%15 = phi i32 [ %21, %13 ], [ 0, %9 ]
%16 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 %14
%17 = load i8, i8* %16
%18 = call i64 @strchr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8 signext %17)
%19 = icmp ne i64 %18, 0
%20 = zext i1 %19 to i32
%21 = add nuw nsw i32 %15, %20
%22 = add nuw nsw i64 %14, 1
%23 = call i32 @strlen(i8* %3)
%24 = sext i32 %23 to i64
%25 = icmp slt i64 %22, %24
br i1 %25, label %13, label %26
26: ; preds = %13, %9
%27 = phi i32 [ 0, %9 ], [ %21, %13 ]
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %27)
%29 = load i32, i32* %2
%30 = add nsw i32 %29, -1
store i32 %30, i32* %2
%31 = icmp sgt i32 %29, 1
br i1 %31, label %9, label %32
32: ; preds = %26, %0
ret i32 0
}