#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, char);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc != 2) {
    fprintf(stderr, "ERROR: you need one argument.\n");
    return 1;
  }
  int i;
  char letter;
  for (i = 0; argv[1][i] != '\0'; letter = argv[1][i++])
    switch (letter) {
    case 'a':
    case 'A':
      printf("%i: %c\n", i, letter);
      break;
    case 'e':
    case 'E':
      printf("%i: %c\n", i, letter);
      break;
    case 'i':
    case 'I':
      printf("%i: %c\n", i, letter);
      break;
    case 'o':
    case 'O':
      printf("%i: %c\n", i, letter);
      break;
    case 'u':
    case 'U':
      printf("%i: %c\n", i, letter);
      break;
    case 'y':
    case 'Y':
      if (i > 2)
        printf("%i: %c\n", i, letter);
      break;
    default:
      printf("%i: %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    0xf94(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1285 <main+0x165>
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     127e <main+0x15e>
movsbl -0x15(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x38,%eax
ja     1245 <main+0x125>
mov    -0x20(%rbp),%rax
lea    0xe5e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x14(%rbp),%esi
lea    0xf4e(%rip),%rdi
movsbl -0x15(%rbp),%edx
call   1030 <printf@plt>
jmp    1258 <main+0x138>
mov    -0x14(%rbp),%esi
lea    0xf36(%rip),%rdi
movsbl -0x15(%rbp),%edx
call   1030 <printf@plt>
jmp    1258 <main+0x138>
mov    -0x14(%rbp),%esi
lea    0xf1e(%rip),%rdi
movsbl -0x15(%rbp),%edx
call   1030 <printf@plt>
jmp    1258 <main+0x138>
mov    -0x14(%rbp),%esi
lea    0xf06(%rip),%rdi
movsbl -0x15(%rbp),%edx
call   1030 <printf@plt>
jmp    1258 <main+0x138>
mov    -0x14(%rbp),%esi
lea    0xeee(%rip),%rdi
movsbl -0x15(%rbp),%edx
call   1030 <printf@plt>
jmp    1258 <main+0x138>
cmpl   $0x2,-0x14(%rbp)
jle    1240 <main+0x120>
mov    -0x14(%rbp),%esi
lea    0xecc(%rip),%rdi
movsbl -0x15(%rbp),%edx
call   1030 <printf@plt>
jmp    1258 <main+0x138>
mov    -0x14(%rbp),%esi
lea    0xebc(%rip),%rdi
movsbl -0x15(%rbp),%edx
call   1030 <printf@plt>
jmp    125d <main+0x13d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x15(%rbp)
jmp    1168 <main+0x48>
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    11f4 <main+0xd4>
mov    %rsi,%rbx
mov    0x8(%rsi),%rax
cmpb   $0x0,(%rax)
je     1211 <main+0xf1>
lea    0xedc(%rip),%r14
xor    %r15d,%r15d
mov    %r14,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    0x8(%rbx),%rax
cmpb   $0x0,0x1(%rax)
je     1214 <main+0xf4>
movsbl (%rax),%edx
lea    -0x41(%rdx),%eax
ror    %eax
cmp    $0x1c,%eax
ja     1270 <main+0x150>
mov    $0x4950495,%ecx
bt     %eax,%ecx
jae    1262 <main+0x142>
lea    0xe91(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    0x8(%rbx),%rax
cmpb   $0x0,0x2(%rax)
je     1214 <main+0xf4>
movsbl 0x1(%rax),%edx
lea    -0x41(%rdx),%eax
ror    %eax
cmp    $0x1c,%eax
ja     128a <main+0x16a>
mov    $0x4950495,%ecx
bt     %eax,%ecx
jae    127c <main+0x15c>
lea    0xe56(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    0x8(%rbx),%rax
cmpb   $0x0,0x3(%rax)
je     1214 <main+0xf4>
mov    0x2(%rax),%al
mov    $0x3,%ebp
lea    0xe33(%rip),%r12
mov    $0x14951495,%r13d
jmp    124a <main+0x12a>
mov    0x2de5(%rip),%rax
mov    (%rax),%edi
lea    0xdfc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%r15d
jmp    1214 <main+0xf4>
xor    %r15d,%r15d
mov    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r14,%rdi
nopl   0x0(%rax)
mov    %ebp,%esi
call   1030 <printf@plt>
mov    0x8(%rbx),%rcx
movzbl (%rcx,%rbp,1),%eax
cmpb   $0x0,0x1(%rcx,%rbp,1)
lea    0x1(%rbp),%rbp
je     1214 <main+0xf4>
movsbl %al,%edx
lea    -0x41(%rdx),%eax
ror    %eax
cmp    $0x1c,%eax
ja     1226 <main+0x106>
bt     %eax,%r13d
mov    %r12,%rdi
jb     1230 <main+0x110>
jmp    1226 <main+0x106>
mov    $0x10001000,%ecx
bt     %eax,%ecx
jb     1198 <main+0x78>
lea    0xdb0(%rip),%rdi
jmp    118e <main+0x6e>
mov    $0x10001000,%ecx
bt     %eax,%ecx
jb     11d3 <main+0xb3>
lea    0xd96(%rip),%rdi
jmp    11c9 <main+0xa9>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"ERROR: you need one argument.\0A\00"
@.str.1 = [8 x i8] c"%i: %c\0A\00"
@.str.2 = [23 x i8] c"%i: %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 %70
13: ; preds = %2
store i32 0, i32* %6
br label %14
14: ; preds = %60, %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 %69
24: ; preds = %14
%25 = load i8, i8* %7
%26 = sext i8 %25 to i32
switch i32 %26, label %55 [
i32 97, label %27
i32 65, label %27
i32 101, label %31
i32 69, label %31
i32 105, label %35
i32 73, label %35
i32 111, label %39
i32 79, label %39
i32 117, label %43
i32 85, label %43
i32 121, label %47
i32 89, label %47
]
27: ; preds = %24, %24
%28 = load i32, i32* %6
%29 = load i8, i8* %7
%30 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %28, i8 signext %29)
br label %59
31: ; preds = %24, %24
%32 = load i32, i32* %6
%33 = load i8, i8* %7
%34 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %32, i8 signext %33)
br label %59
35: ; preds = %24, %24
%36 = load i32, i32* %6
%37 = load i8, i8* %7
%38 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %36, i8 signext %37)
br label %59
39: ; preds = %24, %24
%40 = load i32, i32* %6
%41 = load i8, i8* %7
%42 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %40, i8 signext %41)
br label %59
43: ; preds = %24, %24
%44 = load i32, i32* %6
%45 = load i8, i8* %7
%46 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %44, i8 signext %45)
br label %59
47: ; preds = %24, %24
%48 = load i32, i32* %6
%49 = icmp sgt i32 %48, 2
br i1 %49, label %50, label %54
50: ; preds = %47
%51 = load i32, i32* %6
%52 = load i8, i8* %7
%53 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %51, i8 signext %52)
br label %54
54: ; preds = %50, %47
br label %59
55: ; preds = %24
%56 = load i32, i32* %6
%57 = load i8, i8* %7
%58 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %56, i8 signext %57)
br label %59
59: ; preds = %55, %54, %43, %39, %35, %31, %27
br label %60
60: ; preds = %59
%61 = load i8**, i8*** %5
%62 = getelementptr inbounds i8*, i8** %61, i64 1
%63 = load i8*, i8** %62
%64 = load i32, i32* %6
%65 = add nsw i32 %64, 1
store i32 %65, i32* %6
%66 = sext i32 %64 to i64
%67 = getelementptr inbounds i8, i8* %63, i64 %66
%68 = load i8, i8* %67
store i8 %68, i8* %7
br label %14
69: ; preds = %14
store i32 0, i32* %3
br label %70
70: ; preds = %69, %10
%71 = load i32, i32* %3
ret i32 %71
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"ERROR: you need one argument.\0A\00"
@.str.1 = [8 x i8] c"%i: %c\0A\00"
@.str.2 = [23 x i8] c"%i: %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 %46
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 %67, label %9
9: ; preds = %4
%10 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 0, i8 signext undef)
%11 = load i8*, i8** %5
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %11, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %67, label %16
16: ; preds = %9
%17 = sext i8 %12 to i32
%18 = add nsw i32 %17, -65
%19 = tail call i32 @llvm.fshl.i32(i32 %18, i32 %18, i32 31)
switch i32 %19, label %20 [
i32 16, label %21
i32 0, label %21
i32 18, label %21
i32 2, label %21
i32 20, label %21
i32 4, label %21
i32 23, label %21
i32 7, label %21
i32 26, label %21
i32 10, label %21
i32 28, label %24
i32 12, label %24
]
20: ; preds = %16
br label %21
21: ; preds = %20, %16, %16, %16, %16, %16, %16, %16, %16, %16, %16
%22 = phi i8* [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), %20 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %16 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %16 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %16 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %16 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %16 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %16 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %16 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %16 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %16 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %16 ]
%23 = tail call i32 @printf(i8* %22, i32 1, i8 signext %12)
br label %24
24: ; preds = %16, %16, %21
%25 = load i8*, i8** %5
%26 = getelementptr inbounds i8, i8* %25, i64 1
%27 = load i8, i8* %26
%28 = getelementptr inbounds i8, i8* %25, i64 2
%29 = load i8, i8* %28
%30 = icmp eq i8 %29, 0
br i1 %30, label %67, label %31
31: ; preds = %24
%32 = sext i8 %27 to i32
%33 = add nsw i32 %32, -65
%34 = tail call i32 @llvm.fshl.i32(i32 %33, i32 %33, i32 31)
switch i32 %34, label %35 [
i32 16, label %36
i32 0, label %36
i32 18, label %36
i32 2, label %36
i32 20, label %36
i32 4, label %36
i32 23, label %36
i32 7, label %36
i32 26, label %36
i32 10, label %36
i32 28, label %39
i32 12, label %39
]
35: ; preds = %31
br label %36
36: ; preds = %35, %31, %31, %31, %31, %31, %31, %31, %31, %31, %31
%37 = phi i8* [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), %35 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %31 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %31 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %31 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %31 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %31 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %31 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %31 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %31 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %31 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %31 ]
%38 = tail call i32 @printf(i8* %37, i32 2, i8 signext %27)
br label %39
39: ; preds = %31, %31, %36
%40 = load i8*, i8** %5
%41 = getelementptr inbounds i8, i8* %40, i64 2
%42 = load i8, i8* %41
%43 = getelementptr inbounds i8, i8* %40, i64 3
%44 = load i8, i8* %43
%45 = icmp eq i8 %44, 0
br i1 %45, label %67, label %49
46: ; preds = %2
%47 = load i32, i32* @stderr
%48 = tail call i32 @fprintf(i32 %47, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %67
49: ; preds = %39, %56
%50 = phi i64 [ %61, %56 ], [ 3, %39 ]
%51 = phi i8 [ %63, %56 ], [ %42, %39 ]
%52 = sext i8 %51 to i32
%53 = add nsw i32 %52, -65
%54 = tail call i32 @llvm.fshl.i32(i32 %53, i32 %53, i32 31)
switch i32 %54, label %55 [
i32 16, label %56
i32 0, label %56
i32 18, label %56
i32 2, label %56
i32 20, label %56
i32 4, label %56
i32 23, label %56
i32 7, label %56
i32 26, label %56
i32 10, label %56
i32 28, label %56
i32 12, label %56
]
55: ; preds = %49
br label %56
56: ; preds = %49, %49, %49, %49, %49, %49, %49, %49, %49, %49, %49, %49, %55
%57 = phi i8* [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), %55 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %49 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %49 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %49 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %49 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %49 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %49 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %49 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %49 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %49 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %49 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %49 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %49 ]
%58 = trunc i64 %50 to i32
%59 = tail call i32 @printf(i8* %57, i32 %58, i8 signext %51)
%60 = load i8*, i8** %5
%61 = add nuw i64 %50, 1
%62 = getelementptr inbounds i8, i8* %60, i64 %50
%63 = load i8, i8* %62
%64 = getelementptr inbounds i8, i8* %60, i64 %61
%65 = load i8, i8* %64
%66 = icmp eq i8 %65, 0
br i1 %66, label %67, label %49
67: ; preds = %9, %24, %39, %56, %4, %46
%68 = phi i32 [ 1, %46 ], [ 0, %4 ], [ 0, %56 ], [ 0, %39 ], [ 0, %24 ], [ 0, %9 ]
ret i32 %68
}