#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*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  if (argc != 2) {
    printf("ERROR: You need one argument.\n");
    return 1;
  }
  int i = 0;
  for (i = 0; argv[1][i] != '\0'; i++) {
    char letter = argv[1][i];
    switch (letter) {
    case 'a':
    case 'A':
      printf("%d: 'A'\n", i);
      break;
    case 'e':
    case 'E':
      printf("%d: 'E'\n", i);
      break;
    case 'i':
    case 'I':
      printf("%d: 'O'\n", i);
      break;
    case 'u':
    case 'U':
      printf("%d: 'U'\n", i);
      break;
    case 'y':
    case 'Y':
      if (i > 2) {
        printf("%d: 'Y'\n", i);
        break;
      default:
        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     114a <main+0x3a>
lea    0xfad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1259 <main+0x149>
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     1252 <main+0x142>
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
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x38,%eax
ja     1225 <main+0x115>
mov    -0x20(%rbp),%rax
lea    0xe5c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x14(%rbp),%esi
lea    0xf4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123f <main+0x12f>
mov    -0x14(%rbp),%esi
lea    0xf3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123f <main+0x12f>
mov    -0x14(%rbp),%esi
lea    0xf32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123f <main+0x12f>
mov    -0x14(%rbp),%esi
lea    0xf25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123f <main+0x12f>
cmpl   $0x2,-0x14(%rbp)
jle    123a <main+0x12a>
mov    -0x14(%rbp),%esi
lea    0xf0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123f <main+0x12f>
mov    -0x14(%rbp),%esi
movsbl -0x15(%rbp),%edx
lea    0xefd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123f <main+0x12f>
jmp    1244 <main+0x134>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1158 <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    1168 <main+0x48>
mov    %rsi,%rbx
mov    0x8(%rsi),%rax
movsbl (%rax),%edx
xor    %ebp,%ebp
test   %edx,%edx
je     1179 <main+0x59>
lea    -0x41(%rdx),%eax
rol    $0x1e,%eax
cmp    $0xe,%eax
ja     123d <main+0x11d>
lea    0xeaa(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf8a(%rip),%rdi
jmp    11a3 <main+0x83>
lea    0xfc5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xf68(%rip),%rdi
jmp    11a3 <main+0x83>
lea    0xf68(%rip),%rdi
jmp    11a3 <main+0x83>
lea    0xf68(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rax
movsbl 0x1(%rax),%edx
test   %edx,%edx
je     1179 <main+0x59>
lea    -0x41(%rdx),%eax
rol    $0x1e,%eax
cmp    $0xe,%eax
ja     1335 <main+0x215>
lea    0xe6e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf12(%rip),%rdi
jmp    11f9 <main+0xd9>
lea    0xf12(%rip),%rdi
jmp    11f9 <main+0xd9>
lea    0xf12(%rip),%rdi
jmp    11f9 <main+0xd9>
lea    0xf12(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rax
movsbl 0x2(%rax),%edx
test   %edx,%edx
je     1179 <main+0x59>
lea    -0x41(%rdx),%eax
rol    $0x1e,%eax
cmp    $0xe,%eax
ja     134d <main+0x22d>
lea    0xe4d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeb5(%rip),%rdi
jmp    126b <main+0x14b>
lea    0xed9(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11ac <main+0x8c>
lea    0xea0(%rip),%rdi
jmp    126b <main+0x14b>
lea    0xea0(%rip),%rdi
jmp    126b <main+0x14b>
lea    0xea0(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rax
mov    0x3(%rax),%al
test   %al,%al
je     1179 <main+0x59>
mov    $0x4,%r15d
lea    0xe21(%rip),%r12
lea    0xe68(%rip),%r13
lea    0xe6a(%rip),%rbp
lea    0xe6c(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl %al,%edx
lea    -0x41(%rdx),%eax
rol    $0x1e,%eax
cmp    $0xe,%eax
ja     131a <main+0x1fa>
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
lea    -0x1(%r15),%esi
lea    0xe1e(%rip),%rdi
jmp    1300 <main+0x1e0>
lea    -0x1(%r15),%esi
lea    0xe1a(%rip),%rdi
jmp    1300 <main+0x1e0>
lea    -0x1(%r15),%esi
mov    %r13,%rdi
jmp    1300 <main+0x1e0>
lea    -0x1(%r15),%esi
mov    %rbp,%rdi
jmp    1300 <main+0x1e0>
lea    -0x1(%r15),%esi
mov    %r14,%rdi
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rax
movzbl (%rax,%r15,1),%eax
add    $0x1,%r15
test   %al,%al
jne    12b0 <main+0x190>
jmp    132e <main+0x20e>
lea    -0x1(%r15),%esi
lea    0xdf8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1307 <main+0x1e7>
xor    %ebp,%ebp
jmp    1179 <main+0x59>
lea    0xde1(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1205 <main+0xe5>
lea    0xdc9(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1277 <main+0x157>

LLVM IR (-O0):
@.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: 'O'\0A\00"
@.str.4 = [9 x i8] c"%d: 'U'\0A\00"
@.str.5 = [9 x i8] c"%d: 'Y'\0A\00"
@.str.6 = [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 %12
10: ; preds = %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %62
12: ; preds = %2
store i32 0, i32* %6
store i32 0, i32* %6
br label %13
13: ; preds = %58, %12
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %61
23: ; preds = %13
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = load i32, i32* %6
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %26, i64 %28
%30 = load i8, i8* %29
store i8 %30, i8* %7
%31 = load i8, i8* %7
%32 = sext i8 %31 to i32
switch i32 %32, label %51 [
i32 97, label %33
i32 65, label %33
i32 101, label %36
i32 69, label %36
i32 105, label %39
i32 73, label %39
i32 117, label %42
i32 85, label %42
i32 121, label %45
i32 89, label %45
]
33: ; preds = %23, %23
%34 = load i32, i32* %6
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %34)
br label %57
36: ; preds = %23, %23
%37 = load i32, i32* %6
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %37)
br label %57
39: ; preds = %23, %23
%40 = load i32, i32* %6
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %40)
br label %57
42: ; preds = %23, %23
%43 = load i32, i32* %6
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %43)
br label %57
45: ; preds = %23, %23
%46 = load i32, i32* %6
%47 = icmp sgt i32 %46, 2
br i1 %47, label %48, label %56
48: ; preds = %45
%49 = load i32, i32* %6
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %49)
br label %57
51: ; preds = %23
%52 = load i32, i32* %6
%53 = load i8, i8* %7
%54 = sext i8 %53 to i32
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %52, i32 %54)
br label %56
56: ; preds = %51, %45
br label %57
57: ; preds = %56, %48, %42, %39, %36, %33
br label %58
58: ; preds = %57
%59 = load i32, i32* %6
%60 = add nsw i32 %59, 1
store i32 %60, i32* %6
br label %13
61: ; preds = %13
store i32 0, i32* %3
br label %62
62: ; preds = %61, %10
%63 = load i32, i32* %3
ret i32 %63
}

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