#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 */
char getchar();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int k = 0;
  char s;
  while ((s = getchar()) != '\n') {
    switch (s) {
    case 'a':
    case 'e':
    case 'i':
    case 'o':
    case 'u':
      k++;
      break;
    }
  }
  printf("aantal klinkers: %d\n", k);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0xa,%eax
je     11b3 <main+0x93>
movsbl -0x9(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x61,%eax
je     11a5 <main+0x85>
jmp    1161 <main+0x41>
mov    -0x10(%rbp),%eax
sub    $0x65,%eax
je     11a5 <main+0x85>
jmp    1172 <main+0x52>
mov    -0x10(%rbp),%eax
sub    $0x69,%eax
je     11a5 <main+0x85>
jmp    1183 <main+0x63>
mov    -0x10(%rbp),%eax
sub    $0x6f,%eax
je     11a5 <main+0x85>
jmp    1194 <main+0x74>
mov    -0x10(%rbp),%eax
sub    $0x75,%eax
jne    11ae <main+0x8e>
jmp    11a5 <main+0x85>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x8(%rbp),%esi
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%al
jne    1147 <main+0x27>
lea    0xec9(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    $0x495,%ebp
xor    %ebx,%ebx
jmp    115b <main+0x3b>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%al
je     1130 <main+0x10>
movsbl %al,%eax
add    $0xffffff9f,%eax
ror    %eax
cmp    $0xa,%eax
ja     1150 <main+0x30>
bt     %eax,%ebp
jae    1150 <main+0x30>
add    $0x1,%ebx
jmp    1150 <main+0x30>

LLVM IR (-O0):
@.str = [21 x i8] c"aantal klinkers: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %14, %0
%5 = call signext i8 (...) @getchar()
store i8 %5, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 10
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
switch i32 %10, label %14 [
i32 97, label %11
i32 101, label %11
i32 105, label %11
i32 111, label %11
i32 117, label %11
]
11: ; preds = %8, %8, %8, %8, %8
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %14
14: ; preds = %8, %11
br label %4
15: ; preds = %4
%16 = load i32, i32* %2
%17 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@.str = [21 x i8] c"aantal klinkers: %d\0A\00"
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = icmp eq i8 %1, 10
br i1 %2, label %15, label %3
3: ; preds = %0, %11
%4 = phi i8 [ %13, %11 ], [ %1, %0 ]
%5 = phi i32 [ %12, %11 ], [ 0, %0 ]
%6 = sext i8 %4 to i32
%7 = add nsw i32 %6, -97
%8 = tail call i32 @llvm.fshl.i32(i32 %7, i32 %7, i32 31)
switch i32 %8, label %11 [
i32 0, label %9
i32 2, label %9
i32 4, label %9
i32 7, label %9
i32 10, label %9
]
9: ; preds = %3, %3, %3, %3, %3
%10 = add nsw i32 %5, 1
br label %11
11: ; preds = %3, %9
%12 = phi i32 [ %5, %3 ], [ %10, %9 ]
%13 = tail call signext i8 (...) @getchar()
%14 = icmp eq i8 %13, 10
br i1 %14, label %15, label %3
15: ; preds = %11, %0
%16 = phi i32 [ 0, %0 ], [ %12, %11 ]
%17 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i32 0
}