#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 any(char *, char *);
int getchar();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char s1[6] = {'a', 'e', 'i', 'o', 'u', '\0'};
  int c, i;
  char s2[1000];
  while ((c = getchar()) != '\n') {
    s2[i++] = c;
  }
  printf("%i\n", any(s1, s2));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeb8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xeb2(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x10(%rbp)
cmp    $0xa,%eax
je     1187 <main+0x57>
mov    -0x10(%rbp),%eax
mov    %al,%cl
mov    -0x14(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
cltq
mov    %cl,-0x400(%rbp,%rax,1)
jmp    1156 <main+0x26>
lea    -0xa(%rbp),%rdi
lea    -0x400(%rbp),%rsi
call   1050 <any@plt>
mov    %eax,%esi
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
movw   $0x75,0xc(%rsp)
movl   $0x6f696561,0x8(%rsp)
6f
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%eax
je     1172 <main+0x42>
lea    0x10(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rbx)
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%rbx
cmp    $0xa,%eax
jne    1160 <main+0x30>
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1050 <any@plt>
lea    0xe7e(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s1 = [6 x i8] c"aeiou\00"
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca [1000 x i8]
store i32 0, i32* %1
%6 = bitcast [6 x i8]* %2 to i8*
br label %7
7: ; preds = %10, %0
%8 = call i32 (...) @getchar()
store i32 %8, i32* %3
%9 = icmp ne i32 %8, 10
br i1 %9, label %10, label %17
10: ; preds = %7
%11 = load i32, i32* %3
%12 = trunc i32 %11 to i8
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %4
%15 = sext i32 %13 to i64
%16 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 %15
store i8 %12, i8* %16
br label %7
17: ; preds = %7
%18 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%19 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%20 = call i32 @any(i8* %18, i8* %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@__const.main.s1 = [6 x i8] c"aeiou\00"
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (...) @getchar()
%6 = icmp eq i32 %5, 10
br i1 %6, label %15, label %7
7: ; preds = %0, %7
%8 = phi i64 [ %11, %7 ], [ 0, %0 ]
%9 = phi i32 [ %13, %7 ], [ %5, %0 ]
%10 = trunc i32 %9 to i8
%11 = add i64 %8, 1
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 %8
store i8 %10, i8* %12
%13 = tail call i32 (...) @getchar()
%14 = icmp eq i32 %13, 10
br i1 %14, label %15, label %7
15: ; preds = %7, %0
%16 = call i32 @any(i8* %3, i8* %4)
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i32 0
}