#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 at least 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' or A'\n", i);
      break;
    case 'e':
    case 'E':
      printf("%d: 'e' or 'E'\n", i);
      break;
    case 'i':
    case 'I':
      printf("%d: 'i' or 'I'\n", i);
      break;
    case 'o':
    case 'O':
      printf("%d: 'o' or 'O'\n", i);
      break;
    case 'u':
    case 'U':
      printf("%d: 'u' or 'U'\n", i);
      break;
    case 'y':
    case 'Y':
      printf("%d: 'y' or '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    1260 <main+0x150>
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     1259 <main+0x149>
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     1231 <main+0x121>
mov    -0x20(%rbp),%rax
lea    0xe5c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x14(%rbp),%esi
lea    0xf56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1246 <main+0x136>
mov    -0x14(%rbp),%esi
lea    0xf4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1246 <main+0x136>
mov    -0x14(%rbp),%esi
lea    0xf49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1246 <main+0x136>
mov    -0x14(%rbp),%esi
lea    0xf43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1246 <main+0x136>
mov    -0x14(%rbp),%esi
lea    0xf3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1246 <main+0x136>
mov    -0x14(%rbp),%esi
lea    0xf37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1246 <main+0x136>
mov    -0x14(%rbp),%esi
movsbl -0x15(%rbp),%edx
lea    0xf2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124b <main+0x13b>
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    11e1 <main+0xc1>
mov    %rsi,%rbx
mov    0x8(%rsi),%rax
mov    (%rax),%al
test   %al,%al
je     11f4 <main+0xd4>
lea    0xeb4(%rip),%r13
lea    0xf50(%rip),%rbp
lea    0xf59(%rip),%r14
lea    0xf62(%rip),%r15
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edx
lea    -0x41(%rdx),%eax
ror    %eax
cmp    $0x1c,%eax
ja     11ce <main+0xae>
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
lea    0xee6(%rip),%rdi
jmp    11b0 <main+0x90>
lea    0xeec(%rip),%rdi
jmp    11b0 <main+0x90>
lea    0xef3(%rip),%rdi
jmp    11b0 <main+0x90>
mov    %rbp,%rdi
jmp    11b0 <main+0x90>
mov    %r14,%rdi
jmp    11b0 <main+0x90>
mov    %r15,%rdi
nop
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rax
movzbl 0x1(%rax,%r12,1),%eax
add    $0x1,%r12
test   %al,%al
jne    1170 <main+0x50>
jmp    11f4 <main+0xd4>
lea    0xefe(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11ba <main+0x9a>
lea    0xf02(%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 = [41 x i8] c"ERROR: You need at least one argument. \0A\00"
@.str.1 = [15 x i8] c"%d: 'a' or A'\0A\00"
@.str.2 = [16 x i8] c"%d: 'e' or 'E'\0A\00"
@.str.3 = [16 x i8] c"%d: 'i' or 'I'\0A\00"
@.str.4 = [16 x i8] c"%d: 'o' or 'O'\0A\00"
@.str.5 = [16 x i8] c"%d: 'u' or 'U'\0A\00"
@.str.6 = [16 x i8] c"%d: 'y' or '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 %12
10: ; preds = %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %61
12: ; preds = %2
store i32 0, i32* %6
store i32 0, i32* %6
br label %13
13: ; preds = %57, %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 %60
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 111, label %42
i32 79, label %42
i32 117, label %45
i32 85, label %45
i32 121, label %48
i32 89, label %48
]
33: ; preds = %23, %23
%34 = load i32, i32* %6
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %34)
br label %56
36: ; preds = %23, %23
%37 = load i32, i32* %6
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %37)
br label %56
39: ; preds = %23, %23
%40 = load i32, i32* %6
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %40)
br label %56
42: ; preds = %23, %23
%43 = load i32, i32* %6
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %43)
br label %56
45: ; preds = %23, %23
%46 = load i32, i32* %6
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %46)
br label %56
48: ; preds = %23, %23
%49 = load i32, i32* %6
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %49)
br label %56
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.7, i64 0, i64 0), i32 %52, i32 %54)
br label %56
56: ; preds = %51, %48, %45, %42, %39, %36, %33
br label %57
57: ; preds = %56
%58 = load i32, i32* %6
%59 = add nsw i32 %58, 1
store i32 %59, i32* %6
br label %13
60: ; preds = %13
store i32 0, i32* %3
br label %61
61: ; preds = %60, %10
%62 = load i32, i32* %3
ret i32 %62
}

LLVM IR (-O2):
@.str.1 = [15 x i8] c"%d: 'a' or A'\0A\00"
@.str.2 = [16 x i8] c"%d: 'e' or 'E'\0A\00"
@.str.3 = [16 x i8] c"%d: 'i' or 'I'\0A\00"
@.str.4 = [16 x i8] c"%d: 'o' or 'O'\0A\00"
@.str.5 = [16 x i8] c"%d: 'u' or 'U'\0A\00"
@.str.6 = [16 x i8] c"%d: 'y' or 'Y'\0A\00"
@.str.7 = [23 x i8] c"%d: %c is not a vowel\0A\00"
@str = [40 x i8] c"ERROR: You need at least one argument. \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 %44, label %11
9: ; preds = %2
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
br label %44
11: ; preds = %4, %38
%12 = phi i64 [ %39, %38 ], [ 0, %4 ]
%13 = phi i8 [ %42, %38 ], [ %7, %4 ]
%14 = sext i8 %13 to i32
%15 = add nsw i32 %14, -65
%16 = tail call i32 @llvm.fshl.i32(i32 %15, i32 %15, i32 31)
switch i32 %16, label %35 [
i32 16, label %17
i32 0, label %17
i32 18, label %20
i32 2, label %20
i32 20, label %23
i32 4, label %23
i32 23, label %26
i32 7, label %26
i32 26, label %29
i32 10, label %29
i32 28, label %32
i32 12, label %32
]
17: ; preds = %11, %11
%18 = trunc i64 %12 to i32
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %18)
br label %38
20: ; preds = %11, %11
%21 = trunc i64 %12 to i32
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %21)
br label %38
23: ; preds = %11, %11
%24 = trunc i64 %12 to i32
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %24)
br label %38
26: ; preds = %11, %11
%27 = trunc i64 %12 to i32
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %27)
br label %38
29: ; preds = %11, %11
%30 = trunc i64 %12 to i32
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %30)
br label %38
32: ; preds = %11, %11
%33 = trunc i64 %12 to i32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %33)
br label %38
35: ; preds = %11
%36 = trunc i64 %12 to i32
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %36, i32 %14)
br label %38
38: ; preds = %35, %32, %29, %26, %23, %20, %17
%39 = add nuw i64 %12, 1
%40 = load i8*, i8** %5
%41 = getelementptr inbounds i8, i8* %40, i64 %39
%42 = load i8, i8* %41
%43 = icmp eq i8 %42, 0
br i1 %43, label %44, label %11
44: ; preds = %38, %4, %9
%45 = phi i32 [ 1, %9 ], [ 0, %4 ], [ 0, %38 ]
ret i32 %45
}