#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 for this program.\n");
    return 1;
  }
  for (int i = 0; argv[1][i]; 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: 'I'\n", i);
      break;
    case 'o':
    case 'O':
      printf("%d: 'O'\n", i);
      break;
    case 'u':
    case 'U':
      printf("%d: 'U'\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    0xf9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1240 <main+0x130>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1239 <main+0x129>
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    $0x34,%eax
ja     1211 <main+0x101>
mov    -0x20(%rbp),%rax
lea    0xe66(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x14(%rbp),%esi
lea    0xf57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1226 <main+0x116>
mov    -0x14(%rbp),%esi
lea    0xf4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1226 <main+0x116>
mov    -0x14(%rbp),%esi
lea    0xf3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1226 <main+0x116>
mov    -0x14(%rbp),%esi
lea    0xf30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1226 <main+0x116>
mov    -0x14(%rbp),%esi
lea    0xf23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1226 <main+0x116>
mov    -0x14(%rbp),%esi
movsbl -0x15(%rbp),%edx
lea    0xf12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122b <main+0x11b>
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    11e1 <main+0xc1>
mov    %rsi,%rbx
mov    0x8(%rsi),%rax
mov    (%rax),%al
test   %al,%al
je     11f4 <main+0xd4>
lea    0xeb4(%rip),%r12
lea    0xf93(%rip),%r13
lea    0xf95(%rip),%rbp
lea    0xf97(%rip),%r14
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edx
lea    -0x41(%rdx),%eax
cmp    $0x34,%eax
ja     11ce <main+0xae>
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
lea    0xf49(%rip),%rdi
jmp    11b0 <main+0x90>
lea    0xf49(%rip),%rdi
jmp    11b0 <main+0x90>
mov    %r13,%rdi
jmp    11b0 <main+0x90>
mov    %rbp,%rdi
jmp    11b0 <main+0x90>
mov    %r14,%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rax
movzbl 0x1(%rax,%r15,1),%eax
add    $0x1,%r15
test   %al,%al
jne    1170 <main+0x50>
jmp    11f4 <main+0xd4>
lea    0xf2c(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11ba <main+0x9a>
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
jmp    11f6 <main+0xd6>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"ERROR: You need one argument for this program.\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 = [22 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 ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %57
12: ; preds = %2
store i32 0, i32* %6
br label %13
13: ; preds = %53, %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 = icmp ne i8 %20, 0
br i1 %21, label %22, label %56
22: ; preds = %13
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
%29 = load i8, i8* %28
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = sext i8 %30 to i32
switch i32 %31, label %47 [
i32 97, label %32
i32 65, label %32
i32 101, label %35
i32 69, label %35
i32 105, label %38
i32 73, label %38
i32 111, label %41
i32 79, label %41
i32 117, label %44
i32 85, label %44
]
32: ; preds = %22, %22
%33 = load i32, i32* %6
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %33)
br label %52
35: ; preds = %22, %22
%36 = load i32, i32* %6
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %36)
br label %52
38: ; preds = %22, %22
%39 = load i32, i32* %6
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %39)
br label %52
41: ; preds = %22, %22
%42 = load i32, i32* %6
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %42)
br label %52
44: ; preds = %22, %22
%45 = load i32, i32* %6
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %45)
br label %52
47: ; preds = %22
%48 = load i32, i32* %6
%49 = load i8, i8* %7
%50 = sext i8 %49 to i32
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %48, i32 %50)
br label %52
52: ; preds = %47, %44, %41, %38, %35, %32
br label %53
53: ; preds = %52
%54 = load i32, i32* %6
%55 = add nsw i32 %54, 1
store i32 %55, i32* %6
br label %13
56: ; preds = %13
store i32 0, i32* %3
br label %57
57: ; preds = %56, %10
%58 = load i32, i32* %3
ret i32 %58
}

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: '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 = [22 x i8] c"%d %c is not a vowel\0A\00"
@str = [47 x i8] c"ERROR: You need one argument for this program.\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 %39, label %11
9: ; preds = %2
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
br label %39
11: ; preds = %4, %33
%12 = phi i64 [ %34, %33 ], [ 0, %4 ]
%13 = phi i8 [ %37, %33 ], [ %7, %4 ]
%14 = sext i8 %13 to i32
switch i32 %14, label %30 [
i32 97, label %15
i32 65, label %15
i32 101, label %18
i32 69, label %18
i32 105, label %21
i32 73, label %21
i32 111, label %24
i32 79, label %24
i32 117, label %27
i32 85, label %27
]
15: ; preds = %11, %11
%16 = trunc i64 %12 to i32
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %33
18: ; preds = %11, %11
%19 = trunc i64 %12 to i32
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %19)
br label %33
21: ; preds = %11, %11
%22 = trunc i64 %12 to i32
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %22)
br label %33
24: ; preds = %11, %11
%25 = trunc i64 %12 to i32
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %25)
br label %33
27: ; preds = %11, %11
%28 = trunc i64 %12 to i32
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %28)
br label %33
30: ; preds = %11
%31 = trunc i64 %12 to i32
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %31, i32 %14)
br label %33
33: ; preds = %30, %27, %24, %21, %18, %15
%34 = add nuw i64 %12, 1
%35 = load i8*, i8** %5
%36 = getelementptr inbounds i8, i8* %35, i64 %34
%37 = load i8, i8* %36
%38 = icmp eq i8 %37, 0
br i1 %38, label %39, label %11
39: ; preds = %33, %4, %9
%40 = phi i32 [ 1, %9 ], [ 0, %4 ], [ 0, %33 ]
ret i32 %40
}