#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, int, ...);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 2) {
    fprintf(stderr, "ERROR: You need one argument.\n");
    return 1;
  }
  int i = 0;
  for (i = 0; argv[1][i] != '\0'; i++) {
    char letter = argv[1][i];
    letter &= ~(1 << 5);
    if (letter == 'A') {
      printf("%d: 'A'\n", i);
    } else if (letter == 'E') {
      printf("%d: 'E'\n", i);
    } else if (letter == 'I') {
      printf("%d: 'I'\n", i);
    } else if (letter == 'O') {
      printf("%d: 'O'\n", i);
    } else if (letter == 'U') {
      printf("%d: 'U'\n", i);
    } else if (letter == 'Y') {
      if (i > 2) {
        printf("%d: 'Y'\n", i);
      }
    } else {
      printf("%d: %c is not a vowel\n", i, letter);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1161 <main+0x41>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    12c8 <main+0x1a8>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     12c1 <main+0x1a1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x15(%rbp)
movsbl -0x15(%rbp),%eax
and    $0xffffffdf,%eax
mov    %al,-0x15(%rbp)
movsbl -0x15(%rbp),%eax
cmp    $0x41,%eax
jne    11c7 <main+0xa7>
mov    -0x14(%rbp),%esi
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12ae <main+0x18e>
movsbl -0x15(%rbp),%eax
cmp    $0x45,%eax
jne    11ea <main+0xca>
mov    -0x14(%rbp),%esi
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12a9 <main+0x189>
movsbl -0x15(%rbp),%eax
cmp    $0x49,%eax
jne    120d <main+0xed>
mov    -0x14(%rbp),%esi
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12a4 <main+0x184>
movsbl -0x15(%rbp),%eax
cmp    $0x4f,%eax
jne    1230 <main+0x110>
mov    -0x14(%rbp),%esi
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    129f <main+0x17f>
movsbl -0x15(%rbp),%eax
cmp    $0x55,%eax
jne    1253 <main+0x133>
mov    -0x14(%rbp),%esi
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    129a <main+0x17a>
movsbl -0x15(%rbp),%eax
cmp    $0x59,%eax
jne    1280 <main+0x160>
cmpl   $0x2,-0x14(%rbp)
jle    127b <main+0x15b>
mov    -0x14(%rbp),%esi
lea    0xdd8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1295 <main+0x175>
mov    -0x14(%rbp),%esi
movsbl -0x15(%rbp),%edx
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    129a <main+0x17a>
jmp    129f <main+0x17f>
jmp    12a4 <main+0x184>
jmp    12a9 <main+0x189>
jmp    12ae <main+0x18e>
jmp    12b3 <main+0x193>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116f <main+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jne    11e1 <main+0xc1>
mov    %rsi,%rbx
mov    0x8(%rsi),%rax
mov    (%rax),%al
test   %al,%al
je     11fd <main+0xdd>
lea    0xeb4(%rip),%r12
lea    0xf12(%rip),%r13
lea    0xf14(%rip),%rbp
lea    0xf16(%rip),%r14
xor    %r15d,%r15d
jmp    118c <main+0x6c>
lea    0xee6(%rip),%rdi
nopl   (%rax)
mov    %r15d,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rbx),%rax
movzbl 0x1(%rax,%r15,1),%eax
add    $0x1,%r15
test   %al,%al
je     11fd <main+0xdd>
and    $0xdf,%al
lea    -0x41(%rax),%ecx
ror    %cl
cmp    $0xc,%cl
ja     11ad <main+0x8d>
movzbl %cl,%ecx
movslq (%r12,%rcx,4),%rcx
add    %r12,%rcx
jmp    *%rcx
lea    0xeb1(%rip),%rdi
jmp    1170 <main+0x50>
movsbl %al,%edx
lea    0xed2(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    117a <main+0x5a>
mov    %r13,%rdi
jmp    1170 <main+0x50>
mov    %rbp,%rdi
jmp    1170 <main+0x50>
mov    %r14,%rdi
jmp    1170 <main+0x50>
cmp    $0x3,%r15
jb     117a <main+0x5a>
lea    0xea1(%rip),%rdi
jmp    1170 <main+0x50>
mov    0x2df8(%rip),%rax
mov    (%rax),%edi
lea    0xe43(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%eax
jmp    11ff <main+0xdf>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"ERROR: You need one argument.\0A\00"
@.str.1 = [9 x i8] c"%d: 'A'\0A\00"
@.str.2 = [9 x i8] c"%d: 'E'\0A\00"
@.str.3 = [9 x i8] c"%d: 'I'\0A\00"
@.str.4 = [9 x i8] c"%d: 'O'\0A\00"
@.str.5 = [9 x i8] c"%d: 'U'\0A\00"
@.str.6 = [9 x i8] c"%d: 'Y'\0A\00"
@.str.7 = [23 x i8] c"%d: %c is not a vowel\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 2
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %96
13: ; preds = %2
store i32 0, i32* %6
store i32 0, i32* %6
br label %14
14: ; preds = %92, %13
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %95
24: ; preds = %14
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = load i32, i32* %6
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = load i8, i8* %30
store i8 %31, i8* %7
%32 = load i8, i8* %7
%33 = sext i8 %32 to i32
%34 = and i32 %33, -33
%35 = trunc i32 %34 to i8
store i8 %35, i8* %7
%36 = load i8, i8* %7
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 65
br i1 %38, label %39, label %42
39: ; preds = %24
%40 = load i32, i32* %6
%41 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %40)
br label %91
42: ; preds = %24
%43 = load i8, i8* %7
%44 = sext i8 %43 to i32
%45 = icmp eq i32 %44, 69
br i1 %45, label %46, label %49
46: ; preds = %42
%47 = load i32, i32* %6
%48 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %47)
br label %90
49: ; preds = %42
%50 = load i8, i8* %7
%51 = sext i8 %50 to i32
%52 = icmp eq i32 %51, 73
br i1 %52, label %53, label %56
53: ; preds = %49
%54 = load i32, i32* %6
%55 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %54)
br label %89
56: ; preds = %49
%57 = load i8, i8* %7
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 79
br i1 %59, label %60, label %63
60: ; preds = %56
%61 = load i32, i32* %6
%62 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %61)
br label %88
63: ; preds = %56
%64 = load i8, i8* %7
%65 = sext i8 %64 to i32
%66 = icmp eq i32 %65, 85
br i1 %66, label %67, label %70
67: ; preds = %63
%68 = load i32, i32* %6
%69 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %68)
br label %87
70: ; preds = %63
%71 = load i8, i8* %7
%72 = sext i8 %71 to i32
%73 = icmp eq i32 %72, 89
br i1 %73, label %74, label %81
74: ; preds = %70
%75 = load i32, i32* %6
%76 = icmp sgt i32 %75, 2
br i1 %76, label %77, label %80
77: ; preds = %74
%78 = load i32, i32* %6
%79 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %78)
br label %80
80: ; preds = %77, %74
br label %86
81: ; preds = %70
%82 = load i32, i32* %6
%83 = load i8, i8* %7
%84 = sext i8 %83 to i32
%85 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %82, i32 %84)
br label %86
86: ; preds = %81, %80
br label %87
87: ; preds = %86, %67
br label %88
88: ; preds = %87, %60
br label %89
89: ; preds = %88, %53
br label %90
90: ; preds = %89, %46
br label %91
91: ; preds = %90, %39
br label %92
92: ; preds = %91
%93 = load i32, i32* %6
%94 = add nsw i32 %93, 1
store i32 %94, i32* %6
br label %14
95: ; preds = %14
store i32 0, i32* %3
br label %96
96: ; preds = %95, %10
%97 = load i32, i32* %3
ret i32 %97
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"ERROR: You need one argument.\0A\00"
@.str.1 = [9 x i8] c"%d: 'A'\0A\00"
@.str.2 = [9 x i8] c"%d: 'E'\0A\00"
@.str.3 = [9 x i8] c"%d: 'I'\0A\00"
@.str.4 = [9 x i8] c"%d: 'O'\0A\00"
@.str.5 = [9 x i8] c"%d: 'U'\0A\00"
@.str.6 = [9 x i8] c"%d: 'Y'\0A\00"
@.str.7 = [23 x i8] c"%d: %c is not a vowel\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %48, label %12
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %48
12: ; preds = %4, %42
%13 = phi i64 [ %43, %42 ], [ 0, %4 ]
%14 = phi i8 [ %46, %42 ], [ %7, %4 ]
%15 = and i8 %14, -33
%16 = add i8 %15, -65
%17 = tail call i8 @llvm.fshl.i8(i8 %16, i8 %16, i8 7)
switch i8 %17, label %38 [
i8 0, label %18
i8 2, label %21
i8 4, label %24
i8 7, label %27
i8 10, label %30
i8 12, label %33
]
18: ; preds = %12
%19 = trunc i64 %13 to i32
%20 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %19)
br label %42
21: ; preds = %12
%22 = trunc i64 %13 to i32
%23 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %22)
br label %42
24: ; preds = %12
%25 = trunc i64 %13 to i32
%26 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %25)
br label %42
27: ; preds = %12
%28 = trunc i64 %13 to i32
%29 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %28)
br label %42
30: ; preds = %12
%31 = trunc i64 %13 to i32
%32 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %31)
br label %42
33: ; preds = %12
%34 = icmp ugt i64 %13, 2
br i1 %34, label %35, label %42
35: ; preds = %33
%36 = trunc i64 %13 to i32
%37 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %36)
br label %42
38: ; preds = %12
%39 = sext i8 %15 to i32
%40 = trunc i64 %13 to i32
%41 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %40, i32 %39)
br label %42
42: ; preds = %21, %27, %38, %35, %33, %30, %24, %18
%43 = add nuw i64 %13, 1
%44 = load i8*, i8** %5
%45 = getelementptr inbounds i8, i8* %44, i64 %43
%46 = load i8, i8* %45
%47 = icmp eq i8 %46, 0
br i1 %47, label %48, label %12
48: ; preds = %42, %4, %9
%49 = phi i32 [ 1, %9 ], [ 0, %4 ], [ 0, %42 ]
ret i32 %49
}