#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*/ clr();
int /*<<< orphan*/ gotoxy(int, int);
int isalpha(char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
char tolower(char);
int main() {
  char c, evalC;
  int isVowel;
  clr();
  gotoxy(10, 10);
  do {
    printf("Enter a letter of the alphabet: ");
    scanf("%c", &evalC);
    printf("Result of isalpha: %d", isalpha(evalC));
  } while (!isalpha(evalC));
  c = tolower(evalC);
  isVowel = (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u');
  clr();
  gotoxy(10, 10);
  printf("You entered %c, ", evalC);
  if (isVowel == 1) {
    printf("it is a vowel.");
  } else {
    printf("it is a consonant.");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <clr@plt>
mov    $0xa,%esi
mov    %esi,%edi
call   1080 <gotoxy@plt>
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe8a(%rip),%rdi
lea    -0x6(%rbp),%rsi
call   1070 <scanf@plt>
movsbl -0x6(%rbp),%edi
call   1060 <isalpha@plt>
mov    %eax,%esi
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsbl -0x6(%rbp),%edi
call   1060 <isalpha@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1182 <main+0x22>
movsbl -0x6(%rbp),%edi
call   1050 <tolower@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x61,%ecx
mov    %al,-0xd(%rbp)
je     1233 <main+0xd3>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x65,%ecx
mov    %al,-0xd(%rbp)
je     1233 <main+0xd3>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x69,%ecx
mov    %al,-0xd(%rbp)
je     1233 <main+0xd3>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x6f,%ecx
mov    %al,-0xd(%rbp)
je     1233 <main+0xd3>
movsbl -0x5(%rbp),%eax
cmp    $0x75,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <clr@plt>
mov    $0xa,%esi
mov    %esi,%edi
call   1080 <gotoxy@plt>
movsbl -0x6(%rbp),%esi
lea    0xdde(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x1,-0xc(%rbp)
jne    1280 <main+0x120>
lea    0xdd7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128e <main+0x12e>
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <clr@plt>
mov    $0xa,%edi
mov    $0xa,%esi
call   1080 <gotoxy@plt>
lea    0xe7b(%rip),%r14
lea    0xe95(%rip),%r15
lea    0x7(%rsp),%r12
lea    0xe8c(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1070 <scanf@plt>
movsbl 0x7(%rsp),%edi
call   1060 <isalpha@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x7(%rsp),%edi
call   1060 <isalpha@plt>
test   %eax,%eax
je     11a0 <main+0x40>
movsbl 0x7(%rsp),%edi
call   1050 <tolower@plt>
add    $0x9f,%al
ror    %al
cmp    $0xa,%al
ja     11ff <main+0x9f>
movsbq %al,%rax
lea    0xe7a(%rip),%rcx
movslq (%rcx,%rax,4),%rbx
add    %rcx,%rbx
jmp    1206 <main+0xa6>
lea    0xe54(%rip),%rbx
xor    %eax,%eax
call   1030 <clr@plt>
mov    $0xa,%edi
mov    $0xa,%esi
call   1080 <gotoxy@plt>
movsbl 0x7(%rsp),%esi
lea    0xe12(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Enter a letter of the alphabet: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [22 x i8] c"Result of isalpha: %d\00"
@.str.3 = [17 x i8] c"You entered %c, \00"
@.str.4 = [15 x i8] c"it is a vowel.\00"
@.str.5 = [19 x i8] c"it is a consonant.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @clr()
%6 = call i32 @gotoxy(i32 10, i32 10)
br label %7
7: ; preds = %13, %0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%10 = load i8, i8* %3
%11 = call i32 @isalpha(i8 signext %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %7
%14 = load i8, i8* %3
%15 = call i32 @isalpha(i8 signext %14)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
br i1 %17, label %7, label %18
18: ; preds = %13
%19 = load i8, i8* %3
%20 = call signext i8 @tolower(i8 signext %19)
store i8 %20, i8* %2
%21 = load i8, i8* %2
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 97
br i1 %23, label %40, label %24
24: ; preds = %18
%25 = load i8, i8* %2
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 101
br i1 %27, label %40, label %28
28: ; preds = %24
%29 = load i8, i8* %2
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 105
br i1 %31, label %40, label %32
32: ; preds = %28
%33 = load i8, i8* %2
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 111
br i1 %35, label %40, label %36
36: ; preds = %32
%37 = load i8, i8* %2
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 117
br label %40
40: ; preds = %36, %32, %28, %24, %18
%41 = phi i1 [ true, %32 ], [ true, %28 ], [ true, %24 ], [ true, %18 ], [ %39, %36 ]
%42 = zext i1 %41 to i32
store i32 %42, i32* %4
%43 = call i32 (...) @clr()
%44 = call i32 @gotoxy(i32 10, i32 10)
%45 = load i8, i8* %3
%46 = sext i8 %45 to i32
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %46)
%48 = load i32, i32* %4
%49 = icmp eq i32 %48, 1
br i1 %49, label %50, label %52
50: ; preds = %40
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %54
52: ; preds = %40
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
br label %54
54: ; preds = %52, %50
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Enter a letter of the alphabet: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [22 x i8] c"Result of isalpha: %d\00"
@.str.3 = [17 x i8] c"You entered %c, \00"
@.str.4 = [15 x i8] c"it is a vowel.\00"
@.str.5 = [19 x i8] c"it is a consonant.\00"
@reltable.main = [11 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.4 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.5 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.4 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.5 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.4 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.5 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.5 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.4 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.5 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.5 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.4 to i64), i64 ptrtoint ([11 x i32]* @reltable.main to i64)) to i32)]
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 (...) @clr()
%3 = tail call i32 @gotoxy(i32 10, i32 10)
br label %4
4: ; preds = %4, %0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 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 = load i8, i8* %1
%8 = call i32 @isalpha(i8 signext %7)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = load i8, i8* %1
%11 = call i32 @isalpha(i8 signext %10)
%12 = icmp eq i32 %11, 0
br i1 %12, label %4, label %13
13: ; preds = %4
%14 = load i8, i8* %1
%15 = call signext i8 @tolower(i8 signext %14)
%16 = add i8 %15, -97
%17 = call i8 @llvm.fshl.i8(i8 %16, i8 %16, i8 7)
%18 = icmp ult i8 %17, 11
br i1 %18, label %19, label %23
19: ; preds = %13
%20 = sext i8 %17 to i64
%21 = shl i64 %20, 2
%22 = call i8* @llvm.load.relative.i64(i8* bitcast ([11 x i32]* @reltable.main to i8*), i64 %21)
br label %23
23: ; preds = %13, %19
%24 = phi i8* [ %22, %19 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), %13 ]
%25 = call i32 (...) @clr()
%26 = call i32 @gotoxy(i32 10, i32 10)
%27 = load i8, i8* %1
%28 = sext i8 %27 to i32
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %28)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %24)
ret i32 0
}