#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: Program must take ONE argument.\n");
    return 1;
  }
  int i;
  for (i = 0; argv[1][i] != '\0'; i++) {
    char letter = argv[1][i];
    switch (letter) {
    case 'a':
    case 'A':
      printf("%2d: 'A'\n", i);
      break;
    case 'e':
    case 'E':
      printf("%2d: 'E'\n", i);
      break;
    case 'o':
    case 'O':
      printf("%2d: 'O'\n", i);
      break;
    case 'u':
    case 'U':
      printf("%2d: 'U'\n", i);
      break;
    case 'y':
    case 'Y':
      if (i > 2) {
        printf("%2d: 'Y'\n", i);
      }
      break;
    default:
      printf("%2d: %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    124d <main+0x13d>
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     1246 <main+0x136>
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     121e <main+0x10e>
mov    -0x20(%rbp),%rax
lea    0xe63(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x14(%rbp),%esi
lea    0xf5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1233 <main+0x123>
mov    -0x14(%rbp),%esi
lea    0xf50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1233 <main+0x123>
mov    -0x14(%rbp),%esi
lea    0xf44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1233 <main+0x123>
mov    -0x14(%rbp),%esi
lea    0xf38(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1233 <main+0x123>
cmpl   $0x2,-0x14(%rbp)
jle    1219 <main+0x109>
mov    -0x14(%rbp),%esi
lea    0xf22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1233 <main+0x123>
mov    -0x14(%rbp),%esi
movsbl -0x15(%rbp),%edx
lea    0xf12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1238 <main+0x128>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1151 <main+0x41>
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    1165 <main+0x45>
mov    %rsi,%rbx
mov    0x8(%rsi),%rax
movsbl (%rax),%edx
xor    %ebp,%ebp
test   %edx,%edx
je     1176 <main+0x56>
lea    -0x41(%rdx),%eax
cmp    $0x38,%eax
ja     1234 <main+0x114>
lea    0xead(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x122d(%rip),%rdi
jmp    11a0 <main+0x80>
lea    0x126e(%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    0x120c(%rip),%rdi
jmp    11a0 <main+0x80>
lea    0x120d(%rip),%rdi
jmp    11a0 <main+0x80>
lea    0x120e(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rax
movsbl 0x1(%rax),%edx
test   %edx,%edx
je     1176 <main+0x56>
lea    -0x41(%rdx),%eax
cmp    $0x38,%eax
ja     1325 <main+0x205>
lea    0xf1c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x11b8(%rip),%rdi
jmp    11f3 <main+0xd3>
lea    0x11b9(%rip),%rdi
jmp    11f3 <main+0xd3>
lea    0x11ba(%rip),%rdi
jmp    11f3 <main+0xd3>
lea    0x11bb(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rax
movsbl 0x2(%rax),%edx
test   %edx,%edx
je     1176 <main+0x56>
lea    -0x41(%rdx),%eax
cmp    $0x38,%eax
ja     133d <main+0x21d>
lea    0xfa6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x115e(%rip),%rdi
jmp    1262 <main+0x142>
lea    0x1187(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11a9 <main+0x89>
lea    0x114a(%rip),%rdi
jmp    1262 <main+0x142>
lea    0x114b(%rip),%rdi
jmp    1262 <main+0x142>
lea    0x114c(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rax
mov    0x3(%rax),%al
test   %al,%al
je     1176 <main+0x56>
mov    $0x4,%r15d
lea    0x1022(%rip),%r12
lea    0x1113(%rip),%r13
lea    0x1116(%rip),%rbp
lea    0x1119(%rip),%r14
nop
movsbl %al,%edx
lea    -0x41(%rdx),%eax
cmp    $0x38,%eax
ja     130a <main+0x1ea>
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
lea    -0x1(%r15),%esi
lea    0x10d1(%rip),%rdi
jmp    12f0 <main+0x1d0>
lea    -0x1(%r15),%esi
lea    0x10ce(%rip),%rdi
jmp    12f0 <main+0x1d0>
lea    -0x1(%r15),%esi
mov    %r13,%rdi
jmp    12f0 <main+0x1d0>
lea    -0x1(%r15),%esi
mov    %rbp,%rdi
jmp    12f0 <main+0x1d0>
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    12a0 <main+0x180>
jmp    131e <main+0x1fe>
lea    -0x1(%r15),%esi
lea    0x10ad(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    12f7 <main+0x1d7>
xor    %ebp,%ebp
jmp    1176 <main+0x56>
lea    0x1096(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11ff <main+0xdf>
lea    0x107e(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    126e <main+0x14e>

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