#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 *, char *);
void main() {
  char spechar[] = {'a', 'e', 'i', 'o', 'u', '\0'};
  char input[30];
  char store[30];
  int i, j = 0;
  int checkspe(char chchar, char spechar[]);
  gets(input);
  for (i = 0; input[i] != '\0'; i++) {
    if (checkspe(input[i], spechar))
      store[j++] = input[i];
  }
  printf("%s", store);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0xec2(%rip),%eax
mov    %eax,-0x6(%rbp)
mov    0xebc(%rip),%ax
mov    %ax,-0x2(%rbp)
movl   $0x0,-0x58(%rbp)
lea    -0x30(%rbp),%rdi
call   1050 <gets@plt>
movl   $0x0,-0x54(%rbp)
movslq -0x54(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     11be <main+0x8e>
movslq -0x54(%rbp),%rax
mov    -0x30(%rbp,%rax,1),%al
lea    -0x6(%rbp),%rsi
movsbl %al,%edi
call   1040 <checkspe@plt>
cmp    $0x0,%eax
je     11ab <main+0x7b>
movslq -0x54(%rbp),%rax
mov    -0x30(%rbp,%rax,1),%cl
mov    -0x58(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x58(%rbp)
cltq
mov    %cl,-0x50(%rbp,%rax,1)
jmp    11b0 <main+0x80>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1163 <main+0x33>
lea    -0x50(%rbp),%rsi
lea    0xe3d(%rip),%rdi
call   1030 <printf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x50,%rsp
movw   $0x75,0xc(%rsp)
movl   $0x6f696561,0x8(%rsp)
6f
lea    0x10(%rsp),%rdi
call   1050 <gets@plt>
mov    0x10(%rsp),%al
test   %al,%al
je     119a <main+0x6a>
lea    0x11(%rsp),%rbx
xor    %ebp,%ebp
lea    0x8(%rsp),%r14
jmp    117b <main+0x4b>
nopw   0x0(%rax,%rax,1)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     119a <main+0x6a>
movsbl %al,%edi
mov    %r14,%rsi
call   1040 <checkspe@plt>
test   %eax,%eax
je     1170 <main+0x40>
movzbl -0x1(%rbx),%eax
movslq %ebp,%rcx
add    $0x1,%ebp
mov    %al,0x30(%rsp,%rcx,1)
jmp    1170 <main+0x40>
lea    0xe65(%rip),%rdi
lea    0x30(%rsp),%rsi
call   1030 <printf@plt>
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@__const.main.spechar = [6 x i8] c"aeiou\00"
@.str = [3 x i8] c"%s\00"
define void @main() {
%1 = alloca [6 x i8]
%2 = alloca [30 x i8]
%3 = alloca [30 x i8]
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%7 = call i32 @gets(i8* %5)
%8 = load i8, i8* %5
%9 = icmp eq i8 %8, 0
br i1 %9, label %28, label %10
10: ; preds = %0, %22
%11 = phi i64 [ %24, %22 ], [ 0, %0 ]
%12 = phi i8 [ %26, %22 ], [ %8, %0 ]
%13 = phi i8* [ %25, %22 ], [ %5, %0 ]
%14 = phi i32 [ %23, %22 ], [ 0, %0 ]
%15 = call i32 @checkspe(i8 signext %12, i8* %4)
%16 = icmp eq i32 %15, 0
br i1 %16, label %22, label %17
17: ; preds = %10
%18 = load i8, i8* %13
%19 = add nsw i32 %14, 1
%20 = sext i32 %14 to i64
%21 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %20
store i8 %18, i8* %21
br label %22
22: ; preds = %10, %17
%23 = phi i32 [ %19, %17 ], [ %14, %10 ]
%24 = add nuw i64 %11, 1
%25 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = icmp eq i8 %26, 0
br i1 %27, label %28, label %10
28: ; preds = %22, %0
%29 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}