#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 /*<<< orphan*/ scanf(char *, char *);
void vowelOrNot() {
  char z;
  printf("Please press any alphabet key without cps on: ");
  scanf("%c", &z);
  printf("Address of z: %ld", (long int)&z);
  char vowels[10] = {'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'};
  short i, flag = 0;
  for (i = 0; i < 10; i++) {
    printf("Address of vowels[%d] is %ld\n", i, (long int)&vowels + i);
    if (z == vowels[i]) {
      printf("This is a vowel");
      flag = 1;
      break;
    }
  }
  if (flag == 0) {
    printf("This is not a vowel");
  }
}


x86 assembly (clang, -O0):
<vowelOrNot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1040 <scanf@plt>
lea    -0x1(%rbp),%rsi
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0xf27(%rip),%rax
mov    %rax,-0xb(%rbp)
mov    0xf24(%rip),%ax
mov    %ax,-0x3(%rbp)
movw   $0x0,-0x10(%rbp)
movw   $0x0,-0xe(%rbp)
movswl -0xe(%rbp),%eax
cmp    $0xa,%eax
jge    11ea <vowelOrNot+0xca>
movswl -0xe(%rbp),%esi
lea    -0xb(%rbp),%rdx
movswq -0xe(%rbp),%rax
add    %rax,%rdx
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x1(%rbp),%eax
movswq -0xe(%rbp),%rcx
movsbl -0xb(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    11d4 <vowelOrNot+0xb4>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0x1,-0x10(%rbp)
jmp    11ea <vowelOrNot+0xca>
jmp    11d9 <vowelOrNot+0xb9>
mov    -0xe(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xe(%rbp)
jmp    117a <vowelOrNot+0x5a>
movswl -0x10(%rbp),%eax
cmp    $0x0,%eax
jne    1205 <vowelOrNot+0xe5>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vowelOrNot>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
lea    0xf(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xee4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movabs $0x494541756f696561,%rax
41 45 49
mov    %rax,0x10(%rsp)
movw   $0x554f,0x18(%rsp)
lea    0xecf(%rip),%rdi
lea    0x10(%rsp),%rdx
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xf(%rsp),%al
cmp    0x10(%rsp),%al
je     12d7 <vowelOrNot+0x1b7>
lea    0x11(%rsp),%rdx
lea    0xea7(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xf(%rsp),%al
cmp    0x11(%rsp),%al
je     12d7 <vowelOrNot+0x1b7>
lea    0x12(%rsp),%rdx
lea    0xe81(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xf(%rsp),%al
cmp    0x12(%rsp),%al
je     12d7 <vowelOrNot+0x1b7>
lea    0x13(%rsp),%rdx
lea    0xe5b(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xf(%rsp),%al
cmp    0x13(%rsp),%al
je     12d7 <vowelOrNot+0x1b7>
lea    0x14(%rsp),%rdx
lea    0xe35(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xf(%rsp),%al
cmp    0x14(%rsp),%al
je     12d7 <vowelOrNot+0x1b7>
lea    0x15(%rsp),%rdx
lea    0xe0f(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xf(%rsp),%al
cmp    0x15(%rsp),%al
je     12d7 <vowelOrNot+0x1b7>
lea    0x16(%rsp),%rdx
lea    0xde9(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xf(%rsp),%al
cmp    0x16(%rsp),%al
je     12d7 <vowelOrNot+0x1b7>
lea    0x17(%rsp),%rdx
lea    0xdc7(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xf(%rsp),%al
cmp    0x17(%rsp),%al
je     12d7 <vowelOrNot+0x1b7>
lea    0x18(%rsp),%rdx
lea    0xda5(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xf(%rsp),%al
cmp    0x18(%rsp),%al
je     12d7 <vowelOrNot+0x1b7>
lea    0x19(%rsp),%rdx
lea    0xd83(%rip),%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xf(%rsp),%al
cmp    0x19(%rsp),%al
jne    12eb <vowelOrNot+0x1cb>
lea    0xd84(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbx
ret
lea    0xd80(%rip),%rdi
jmp    12de <vowelOrNot+0x1be>

LLVM IR (-O0):
@.str = [47 x i8] c"Please press any alphabet key without cps on: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [18 x i8] c"Address of z: %ld\00"
@__const.vowelOrNot.vowels = [10 x i8] c"aeiouAEIOU"
@.str.3 = [30 x i8] c"Address of vowels[%d] is %ld\0A\00"
@.str.4 = [16 x i8] c"This is a vowel\00"
@.str.5 = [20 x i8] c"This is not a vowel\00"
define void @vowelOrNot() {
%1 = alloca i8
%2 = alloca [10 x i8]
%3 = alloca i16
%4 = alloca i16
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%7 = ptrtoint i8* %1 to i64
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i64 %7)
%9 = bitcast [10 x i8]* %2 to i8*
store i16 0, i16* %4
store i16 0, i16* %3
br label %10
10: ; preds = %33, %0
%11 = load i16, i16* %3
%12 = sext i16 %11 to i32
%13 = icmp slt i32 %12, 10
br i1 %13, label %14, label %36
14: ; preds = %10
%15 = load i16, i16* %3
%16 = sext i16 %15 to i32
%17 = ptrtoint [10 x i8]* %2 to i64
%18 = load i16, i16* %3
%19 = sext i16 %18 to i64
%20 = add nsw i64 %17, %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 %16, i64 %20)
%22 = load i8, i8* %1
%23 = sext i8 %22 to i32
%24 = load i16, i16* %3
%25 = sext i16 %24 to i64
%26 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %23, %28
br i1 %29, label %30, label %32
30: ; preds = %14
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
store i16 1, i16* %4
br label %36
32: ; preds = %14
br label %33
33: ; preds = %32
%34 = load i16, i16* %3
%35 = add i16 %34, 1
store i16 %35, i16* %3
br label %10
36: ; preds = %30, %10
%37 = load i16, i16* %4
%38 = sext i16 %37 to i32
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %42
40: ; preds = %36
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
br label %42
42: ; preds = %40, %36
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"Please press any alphabet key without cps on: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [18 x i8] c"Address of z: %ld\00"
@__const.vowelOrNot.vowels = [10 x i8] c"aeiouAEIOU"
@.str.3 = [30 x i8] c"Address of vowels[%d] is %ld\0A\00"
@.str.4 = [16 x i8] c"This is a vowel\00"
@.str.5 = [20 x i8] c"This is not a vowel\00"
define void @vowelOrNot() {
%1 = alloca i8
%2 = alloca [10 x i8]
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = ptrtoint i8* %1 to i64
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i64 %5)
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%8 = ptrtoint [10 x i8]* %2 to i64
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 0, i64 %8)
%10 = load i8, i8* %1
%11 = load i8, i8* %7
%12 = icmp eq i8 %10, %11
br i1 %12, label %76, label %13
13: ; preds = %0
%14 = add nsw i64 %8, 1
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 1, i64 %14)
%16 = load i8, i8* %1
%17 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 1
%18 = load i8, i8* %17
%19 = icmp eq i8 %16, %18
br i1 %19, label %76, label %20
20: ; preds = %13
%21 = add nsw i64 %8, 2
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 2, i64 %21)
%23 = load i8, i8* %1
%24 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 2
%25 = load i8, i8* %24
%26 = icmp eq i8 %23, %25
br i1 %26, label %76, label %27
27: ; preds = %20
%28 = add nsw i64 %8, 3
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 3, i64 %28)
%30 = load i8, i8* %1
%31 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 3
%32 = load i8, i8* %31
%33 = icmp eq i8 %30, %32
br i1 %33, label %76, label %34
34: ; preds = %27
%35 = add nsw i64 %8, 4
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 4, i64 %35)
%37 = load i8, i8* %1
%38 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 4
%39 = load i8, i8* %38
%40 = icmp eq i8 %37, %39
br i1 %40, label %76, label %41
41: ; preds = %34
%42 = add nsw i64 %8, 5
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 5, i64 %42)
%44 = load i8, i8* %1
%45 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 5
%46 = load i8, i8* %45
%47 = icmp eq i8 %44, %46
br i1 %47, label %76, label %48
48: ; preds = %41
%49 = add nsw i64 %8, 6
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 6, i64 %49)
%51 = load i8, i8* %1
%52 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 6
%53 = load i8, i8* %52
%54 = icmp eq i8 %51, %53
br i1 %54, label %76, label %55
55: ; preds = %48
%56 = add nsw i64 %8, 7
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 7, i64 %56)
%58 = load i8, i8* %1
%59 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 7
%60 = load i8, i8* %59
%61 = icmp eq i8 %58, %60
br i1 %61, label %76, label %62
62: ; preds = %55
%63 = add nsw i64 %8, 8
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 8, i64 %63)
%65 = load i8, i8* %1
%66 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 8
%67 = load i8, i8* %66
%68 = icmp eq i8 %65, %67
br i1 %68, label %76, label %69
69: ; preds = %62
%70 = add nsw i64 %8, 9
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 9, i64 %70)
%72 = load i8, i8* %1
%73 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 9
%74 = load i8, i8* %73
%75 = icmp eq i8 %72, %74
br i1 %75, label %76, label %77
76: ; preds = %69, %62, %55, %48, %41, %34, %27, %20, %13, %0
br label %77
77: ; preds = %69, %76
%78 = phi i8* [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), %76 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), %69 ]
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %78)
ret void
}