#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 */
char convert_to_lower(char);
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];
    if (letter >= 65 && letter <= 90) {
      letter = convert_to_lower(letter);
    } else if (letter >= 97 && letter <= 122) {
      letter = letter;
    } else {
      printf("ERROR: You need to use a letter of the alphabet.\n");
      return 1;
    }
    switch (letter) {
    case 'a':
      printf("%d: 'A'\n", i);
      break;
    case 'e':
      printf("%d: 'E'\n", i);
      break;
    case 'i':
      printf("%d: 'I'\n", i);
      break;
    case 'o':
      printf("%d: 'O'\n", i);
      break;
    case 'u':
      printf("%d: 'U'\n", i);
      break;
    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     115a <main+0x3a>
lea    0xf1d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    12e9 <main+0x1c9>
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     12e2 <main+0x1c2>
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
cmp    $0x41,%eax
jl     11be <main+0x9e>
movsbl -0x15(%rbp),%eax
cmp    $0x5a,%eax
jg     11be <main+0x9e>
movsbl -0x15(%rbp),%edi
call   1030 <convert_to_lower@plt>
mov    %al,-0x15(%rbp)
jmp    1202 <main+0xe2>
movsbl -0x15(%rbp),%eax
cmp    $0x61,%eax
jl     11e3 <main+0xc3>
movsbl -0x15(%rbp),%eax
cmp    $0x7a,%eax
jg     11e3 <main+0xc3>
mov    -0x15(%rbp),%al
mov    %al,-0x15(%rbp)
jmp    11fd <main+0xdd>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    12e9 <main+0x1c9>
jmp    1202 <main+0xe2>
movsbl -0x15(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x18,%eax
ja     12ba <main+0x19a>
mov    -0x20(%rbp),%rax
lea    0xddd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x14(%rbp),%esi
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12cf <main+0x1af>
mov    -0x14(%rbp),%esi
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12cf <main+0x1af>
mov    -0x14(%rbp),%esi
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12cf <main+0x1af>
mov    -0x14(%rbp),%esi
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12cf <main+0x1af>
mov    -0x14(%rbp),%esi
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12cf <main+0x1af>
cmpl   $0x2,-0x14(%rbp)
jle    12b5 <main+0x195>
mov    -0x14(%rbp),%esi
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12cf <main+0x1af>
mov    -0x14(%rbp),%esi
movsbl -0x15(%rbp),%edx
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12d4 <main+0x1b4>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%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    1229 <main+0xf9>
mov    %rsi,%rbx
mov    0x8(%rsi),%rax
mov    (%rax),%al
test   %al,%al
je     123f <main+0x10f>
lea    0xea4(%rip),%r15
lea    0xee3(%rip),%rbp
lea    0xeee(%rip),%r13
lea    0xf10(%rip),%r14
xor    %r12d,%r12d
jmp    11a0 <main+0x70>
lea    0xeb7(%rip),%rdi
nopl   (%rax)
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rbx),%rax
movzbl 0x1(%rax,%r12,1),%eax
add    $0x1,%r12
test   %al,%al
je     123f <main+0x10f>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     11c0 <main+0x90>
movsbl %al,%edi
call   1040 <convert_to_lower@plt>
jmp    11c8 <main+0x98>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x61(%rax),%ecx
cmp    $0x19,%cl
ja     1230 <main+0x100>
movsbl %al,%edx
lea    -0x61(%rdx),%eax
ror    %eax
cmp    $0xc,%eax
ja     11e7 <main+0xb7>
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
lea    0xe58(%rip),%rdi
jmp    1180 <main+0x50>
lea    0xe7c(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    118a <main+0x5a>
mov    %rbp,%rdi
jmp    1180 <main+0x50>
lea    0xe49(%rip),%rdi
jmp    1180 <main+0x50>
mov    %r13,%rdi
jmp    1180 <main+0x50>
cmp    $0x3,%r12
jb     118a <main+0x5a>
lea    0xe3d(%rip),%rdi
jmp    1180 <main+0x50>
lea    0xe82(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
jmp    1241 <main+0x111>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"ERROR: You need one argument.\0A\00"
@.str.1 = [50 x i8] c"ERROR: You need to use a letter of the alphabet.\0A\00"
@.str.2 = [9 x i8] c"%d: 'A'\0A\00"
@.str.3 = [9 x i8] c"%d: 'E'\0A\00"
@.str.4 = [9 x i8] c"%d: 'I'\0A\00"
@.str.5 = [9 x i8] c"%d: 'O'\0A\00"
@.str.6 = [9 x i8] c"%d: 'U'\0A\00"
@.str.7 = [9 x i8] c"%d: 'Y'\0A\00"
@.str.8 = [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 %89
12: ; preds = %2
store i32 0, i32* %6
store i32 0, i32* %6
br label %13
13: ; preds = %85, %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 %88
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
%33 = icmp sge i32 %32, 65
br i1 %33, label %34, label %41
34: ; preds = %23
%35 = load i8, i8* %7
%36 = sext i8 %35 to i32
%37 = icmp sle i32 %36, 90
br i1 %37, label %38, label %41
38: ; preds = %34
%39 = load i8, i8* %7
%40 = call signext i8 @convert_to_lower(i8 signext %39)
store i8 %40, i8* %7
br label %54
41: ; preds = %34, %23
%42 = load i8, i8* %7
%43 = sext i8 %42 to i32
%44 = icmp sge i32 %43, 97
br i1 %44, label %45, label %51
45: ; preds = %41
%46 = load i8, i8* %7
%47 = sext i8 %46 to i32
%48 = icmp sle i32 %47, 122
br i1 %48, label %49, label %51
49: ; preds = %45
%50 = load i8, i8* %7
store i8 %50, i8* %7
br label %53
51: ; preds = %45, %41
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
br label %89
53: ; preds = %49
br label %54
54: ; preds = %53, %38
%55 = load i8, i8* %7
%56 = sext i8 %55 to i32
switch i32 %56, label %79 [
i32 97, label %57
i32 101, label %60
i32 105, label %63
i32 111, label %66
i32 117, label %69
i32 121, label %72
]
57: ; preds = %54
%58 = load i32, i32* %6
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %58)
br label %84
60: ; preds = %54
%61 = load i32, i32* %6
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %61)
br label %84
63: ; preds = %54
%64 = load i32, i32* %6
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %64)
br label %84
66: ; preds = %54
%67 = load i32, i32* %6
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %67)
br label %84
69: ; preds = %54
%70 = load i32, i32* %6
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %70)
br label %84
72: ; preds = %54
%73 = load i32, i32* %6
%74 = icmp sgt i32 %73, 2
br i1 %74, label %75, label %78
75: ; preds = %72
%76 = load i32, i32* %6
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %76)
br label %78
78: ; preds = %75, %72
br label %84
79: ; preds = %54
%80 = load i32, i32* %6
%81 = load i8, i8* %7
%82 = sext i8 %81 to i32
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %80, i32 %82)
br label %84
84: ; preds = %79, %78, %69, %66, %63, %60, %57
br label %85
85: ; preds = %84
%86 = load i32, i32* %6
%87 = add nsw i32 %86, 1
store i32 %87, i32* %6
br label %13
88: ; preds = %13
store i32 0, i32* %3
br label %89
89: ; preds = %88, %51, %10
%90 = load i32, i32* %3
ret i32 %90
}

LLVM IR (-O2):
@.str.2 = [9 x i8] c"%d: 'A'\0A\00"
@.str.3 = [9 x i8] c"%d: 'E'\0A\00"
@.str.4 = [9 x i8] c"%d: 'I'\0A\00"
@.str.5 = [9 x i8] c"%d: 'O'\0A\00"
@.str.6 = [9 x i8] c"%d: 'U'\0A\00"
@.str.7 = [9 x i8] c"%d: 'Y'\0A\00"
@.str.8 = [23 x i8] c"%d: %c is not a vowel\0A\00"
@str = [49 x i8] c"ERROR: You need to use a letter of the alphabet.\00"
@str.9 = [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 %53
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 %56, label %9
9: ; preds = %4, %47
%10 = phi i64 [ %48, %47 ], [ 0, %4 ]
%11 = phi i8 [ %51, %47 ], [ %7, %4 ]
%12 = add i8 %11, -65
%13 = icmp ult i8 %12, 26
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = tail call signext i8 @convert_to_lower(i8 signext %11)
br label %19
16: ; preds = %9
%17 = add i8 %11, -97
%18 = icmp ult i8 %17, 26
br i1 %18, label %19, label %53
19: ; preds = %16, %14
%20 = phi i8 [ %15, %14 ], [ %11, %16 ]
%21 = sext i8 %20 to i32
%22 = add nsw i32 %21, -97
%23 = tail call i32 @llvm.fshl.i32(i32 %22, i32 %22, i32 31)
switch i32 %23, label %44 [
i32 0, label %24
i32 2, label %27
i32 4, label %30
i32 7, label %33
i32 10, label %36
i32 12, label %39
]
24: ; preds = %19
%25 = trunc i64 %10 to i32
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %25)
br label %47
27: ; preds = %19
%28 = trunc i64 %10 to i32
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %28)
br label %47
30: ; preds = %19
%31 = trunc i64 %10 to i32
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %31)
br label %47
33: ; preds = %19
%34 = trunc i64 %10 to i32
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %34)
br label %47
36: ; preds = %19
%37 = trunc i64 %10 to i32
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %37)
br label %47
39: ; preds = %19
%40 = icmp ugt i64 %10, 2
br i1 %40, label %41, label %47
41: ; preds = %39
%42 = trunc i64 %10 to i32
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %42)
br label %47
44: ; preds = %19
%45 = trunc i64 %10 to i32
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %45, i32 %21)
br label %47
47: ; preds = %39, %41, %44, %36, %33, %30, %27, %24
%48 = add nuw i64 %10, 1
%49 = load i8*, i8** %5
%50 = getelementptr inbounds i8, i8* %49, i64 %48
%51 = load i8, i8* %50
%52 = icmp eq i8 %51, 0
br i1 %52, label %56, label %9
53: ; preds = %16, %2
%54 = phi i8* [ getelementptr inbounds ([30 x i8], [30 x i8]* @str.9, i64 0, i64 0), %2 ], [ getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0), %16 ]
%55 = tail call i32 @puts(i8* dereferenceable(1) %54)
br label %56
56: ; preds = %47, %53, %4
%57 = phi i32 [ 0, %4 ], [ 1, %53 ], [ 0, %47 ]
ret i32 %57
}