#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 */
scalar_t__ isdigit(char);
scalar_t__ islower(char);
scalar_t__ ispunct(char);
scalar_t__ isupper(char);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char inputChar = '.';
  printf("Please enter a character: ");
  scanf("%c", &inputChar);
  if (isupper(inputChar)) {
    printf("The char is an uppercase letter.\n");
    if (inputChar == 65) {
      printf("The char is a vowel.\n");
    } else if (inputChar == 69) {
      printf("The char is a vowel.\n");
    } else if (inputChar == 73) {
      printf("The char is a vowel.\n");
    } else if (inputChar == 79) {
      printf("The char is a vowel.\n");
    } else if (inputChar == 85) {
      printf("The char is a vowel.\n");
    }
  } else if (islower(inputChar)) {
    printf("The char is a lowercase letter.\n");
    if (inputChar == 97) {
      printf("The char is a vowel.\n");
    } else if (inputChar == 101) {
      printf("The char is a vowel.\n");
    } else if (inputChar == 105) {
      printf("The char is a vowel.\n");
    } else if (inputChar == 111) {
      printf("The char is a vowel.\n");
    } else if (inputChar == 117) {
      printf("The char is a vowel.\n");
    }
  } else if (isdigit(inputChar)) {
    printf("The char is a digit.\n");
  } else if (ispunct(inputChar)) {
    printf("The char is punctuation.\n");
    if (inputChar == '\"') {
      printf("The char is a double quote.\n");
    }
  } else if (inputChar == '	') {
    printf("The char is a tab.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x2e,-0x5(%rbp)
lea    0xe86(%rip),%rdi
call   1050 <printf@plt>
lea    0xe95(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1080 <scanf@plt>
movsbl -0x5(%rbp),%edi
call   1070 <isupper@plt>
cmp    $0x0,%rax
je     1258 <main+0xf8>
lea    0xe75(%rip),%rdi
call   1050 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jne    11cc <main+0x6c>
lea    0xe7e(%rip),%rdi
call   1050 <printf@plt>
jmp    1253 <main+0xf3>
movsbl -0x5(%rbp),%eax
cmp    $0x45,%eax
jne    11ea <main+0x8a>
lea    0xe60(%rip),%rdi
call   1050 <printf@plt>
jmp    124e <main+0xee>
movsbl -0x5(%rbp),%eax
cmp    $0x49,%eax
jne    1208 <main+0xa8>
lea    0xe42(%rip),%rdi
call   1050 <printf@plt>
jmp    1249 <main+0xe9>
movsbl -0x5(%rbp),%eax
cmp    $0x4f,%eax
jne    1226 <main+0xc6>
lea    0xe24(%rip),%rdi
call   1050 <printf@plt>
jmp    1244 <main+0xe4>
movsbl -0x5(%rbp),%eax
cmp    $0x55,%eax
jne    123f <main+0xdf>
lea    0xe06(%rip),%rdi
call   1050 <printf@plt>
jmp    1244 <main+0xe4>
jmp    1249 <main+0xe9>
jmp    124e <main+0xee>
jmp    1253 <main+0xf3>
jmp    13af <main+0x24f>
movsbl -0x5(%rbp),%edi
call   1040 <islower@plt>
cmp    $0x0,%rax
je     1321 <main+0x1c1>
lea    0xde4(%rip),%rdi
call   1050 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jne    1295 <main+0x135>
lea    0xdb5(%rip),%rdi
call   1050 <printf@plt>
jmp    131c <main+0x1bc>
movsbl -0x5(%rbp),%eax
cmp    $0x65,%eax
jne    12b3 <main+0x153>
lea    0xd97(%rip),%rdi
call   1050 <printf@plt>
jmp    1317 <main+0x1b7>
movsbl -0x5(%rbp),%eax
cmp    $0x69,%eax
jne    12d1 <main+0x171>
lea    0xd79(%rip),%rdi
call   1050 <printf@plt>
jmp    1312 <main+0x1b2>
movsbl -0x5(%rbp),%eax
cmp    $0x6f,%eax
jne    12ef <main+0x18f>
lea    0xd5b(%rip),%rdi
call   1050 <printf@plt>
jmp    130d <main+0x1ad>
movsbl -0x5(%rbp),%eax
cmp    $0x75,%eax
jne    1308 <main+0x1a8>
lea    0xd3d(%rip),%rdi
call   1050 <printf@plt>
jmp    130d <main+0x1ad>
jmp    1312 <main+0x1b2>
jmp    1317 <main+0x1b7>
jmp    131c <main+0x1bc>
jmp    13aa <main+0x24a>
movsbl -0x5(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1345 <main+0x1e5>
lea    0xd3c(%rip),%rdi
call   1050 <printf@plt>
jmp    13a5 <main+0x245>
movsbl -0x5(%rbp),%edi
call   1060 <ispunct@plt>
cmp    $0x0,%rax
je     1382 <main+0x222>
lea    0xd2e(%rip),%rdi
call   1050 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x22,%eax
jne    137d <main+0x21d>
lea    0xd2f(%rip),%rdi
call   1050 <printf@plt>
jmp    13a0 <main+0x240>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    139b <main+0x23b>
lea    0xd2e(%rip),%rdi
call   1050 <printf@plt>
jmp    13a0 <main+0x240>
jmp    13a5 <main+0x245>
jmp    13aa <main+0x24a>
jmp    13af <main+0x24f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x2e,0x7(%rsp)
lea    0xe83(%rip),%rdi
call   1060 <printf@plt>
lea    0xe92(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1090 <scanf@plt>
movsbl 0x7(%rsp),%edi
call   1080 <isupper@plt>
test   %rax,%rax
je     11b6 <main+0x46>
lea    0xef2(%rip),%rdi
call   1050 <puts@plt>
mov    0x7(%rsp),%al
add    $0xbf,%al
jmp    11d7 <main+0x67>
movsbl 0x7(%rsp),%edi
call   1040 <islower@plt>
test   %rax,%rax
je     11fe <main+0x8e>
lea    0xeaf(%rip),%rdi
call   1050 <puts@plt>
mov    0x7(%rsp),%al
add    $0x9f,%al
ror    %al
cmp    $0xb,%al
jae    1219 <main+0xa9>
movzbl %al,%ecx
mov    $0x495,%edx
bt     %ecx,%edx
jae    1219 <main+0xa9>
movsbq %al,%rax
lea    0x2bd3(%rip),%rcx
lea    (%rcx,%rax,8),%rax
mov    (%rax),%rdi
jmp    1214 <main+0xa4>
movsbl 0x7(%rsp),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     121d <main+0xad>
lea    0xe52(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
movsbl 0x7(%rsp),%edi
call   1070 <ispunct@plt>
test   %rax,%rax
je     1248 <main+0xd8>
lea    0xdfe(%rip),%rdi
call   1050 <puts@plt>
cmpb   $0x22,0x7(%rsp)
jne    1219 <main+0xa9>
lea    0xe04(%rip),%rdi
jmp    1214 <main+0xa4>
cmpb   $0x9,0x7(%rsp)
jne    1219 <main+0xa9>
lea    0xdc8(%rip),%rdi
jmp    1214 <main+0xa4>

LLVM IR (-O0):
@.str = [27 x i8] c"Please enter a character: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [34 x i8] c"The char is an uppercase letter.\0A\00"
@.str.3 = [22 x i8] c"The char is a vowel.\0A\00"
@.str.4 = [33 x i8] c"The char is a lowercase letter.\0A\00"
@.str.5 = [22 x i8] c"The char is a digit.\0A\00"
@.str.6 = [26 x i8] c"The char is punctuation.\0A\00"
@.str.7 = [29 x i8] c"The char is a double quote.\0A\00"
@.str.8 = [20 x i8] c"The char is a tab.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 46, i8* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 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* %2)
%5 = load i8, i8* %2
%6 = call i64 @isupper(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %44
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 65
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %43
15: ; preds = %8
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 69
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %42
21: ; preds = %15
%22 = load i8, i8* %2
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 73
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %41
27: ; preds = %21
%28 = load i8, i8* %2
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 79
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %40
33: ; preds = %27
%34 = load i8, i8* %2
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 85
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %39
39: ; preds = %37, %33
br label %40
40: ; preds = %39, %31
br label %41
41: ; preds = %40, %25
br label %42
42: ; preds = %41, %19
br label %43
43: ; preds = %42, %13
br label %112
44: ; preds = %0
%45 = load i8, i8* %2
%46 = call i64 @islower(i8 signext %45)
%47 = icmp ne i64 %46, 0
br i1 %47, label %48, label %84
48: ; preds = %44
%49 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%50 = load i8, i8* %2
%51 = sext i8 %50 to i32
%52 = icmp eq i32 %51, 97
br i1 %52, label %53, label %55
53: ; preds = %48
%54 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %83
55: ; preds = %48
%56 = load i8, i8* %2
%57 = sext i8 %56 to i32
%58 = icmp eq i32 %57, 101
br i1 %58, label %59, label %61
59: ; preds = %55
%60 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %82
61: ; preds = %55
%62 = load i8, i8* %2
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 105
br i1 %64, label %65, label %67
65: ; preds = %61
%66 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %81
67: ; preds = %61
%68 = load i8, i8* %2
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 111
br i1 %70, label %71, label %73
71: ; preds = %67
%72 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %80
73: ; preds = %67
%74 = load i8, i8* %2
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 117
br i1 %76, label %77, label %79
77: ; preds = %73
%78 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %79
79: ; preds = %77, %73
br label %80
80: ; preds = %79, %71
br label %81
81: ; preds = %80, %65
br label %82
82: ; preds = %81, %59
br label %83
83: ; preds = %82, %53
br label %111
84: ; preds = %44
%85 = load i8, i8* %2
%86 = call i64 @isdigit(i8 signext %85)
%87 = icmp ne i64 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %84
%89 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
br label %110
90: ; preds = %84
%91 = load i8, i8* %2
%92 = call i64 @ispunct(i8 signext %91)
%93 = icmp ne i64 %92, 0
br i1 %93, label %94, label %102
94: ; preds = %90
%95 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%96 = load i8, i8* %2
%97 = sext i8 %96 to i32
%98 = icmp eq i32 %97, 34
br i1 %98, label %99, label %101
99: ; preds = %94
%100 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
br label %101
101: ; preds = %99, %94
br label %109
102: ; preds = %90
%103 = load i8, i8* %2
%104 = sext i8 %103 to i32
%105 = icmp eq i32 %104, 9
br i1 %105, label %106, label %108
106: ; preds = %102
%107 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
br label %108
108: ; preds = %106, %102
br label %109
109: ; preds = %108, %101
br label %110
110: ; preds = %109, %88
br label %111
111: ; preds = %110, %83
br label %112
112: ; preds = %111, %43
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Please enter a character: \00"
@.str.1 = [3 x i8] c"%c\00"
@str = [19 x i8] c"The char is a tab.\00"
@str.9 = [25 x i8] c"The char is punctuation.\00"
@str.10 = [28 x i8] c"The char is a double quote.\00"
@str.11 = [21 x i8] c"The char is a digit.\00"
@str.12 = [32 x i8] c"The char is a lowercase letter.\00"
@str.18 = [33 x i8] c"The char is an uppercase letter.\00"
@str.23 = [21 x i8] c"The char is a vowel.\00"
@switch.table.main.24 = [11 x i8*] [i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0)]
define i32 @main() {
%1 = alloca i8
store i8 46, i8* %1
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = call i64 @isupper(i8 signext %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.18, i64 0, i64 0))
%9 = load i8, i8* %1
%10 = add i8 %9, -65
%11 = call i8 @llvm.fshl.i8(i8 %10, i8 %10, i8 7)
%12 = icmp ult i8 %11, 11
br i1 %12, label %38, label %60
13: ; preds = %0
%14 = load i8, i8* %1
%15 = call i64 @islower(i8 signext %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %23, label %17
17: ; preds = %13
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.12, i64 0, i64 0))
%19 = load i8, i8* %1
%20 = add i8 %19, -97
%21 = call i8 @llvm.fshl.i8(i8 %20, i8 %20, i8 7)
%22 = icmp ult i8 %21, 11
br i1 %22, label %46, label %60
23: ; preds = %13
%24 = load i8, i8* %1
%25 = call i64 @isdigit(i8 signext %24)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %57
27: ; preds = %23
%28 = load i8, i8* %1
%29 = call i64 @ispunct(i8 signext %28)
%30 = icmp eq i64 %29, 0
br i1 %30, label %35, label %31
31: ; preds = %27
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.9, i64 0, i64 0))
%33 = load i8, i8* %1
%34 = icmp eq i8 %33, 34
br i1 %34, label %57, label %60
35: ; preds = %27
%36 = load i8, i8* %1
%37 = icmp eq i8 %36, 9
br i1 %37, label %57, label %60
38: ; preds = %7
%39 = zext i8 %11 to i16
%40 = lshr i16 1173, %39
%41 = and i16 %40, 1
%42 = icmp eq i16 %41, 0
br i1 %42, label %60, label %43
43: ; preds = %38
%44 = sext i8 %11 to i64
%45 = getelementptr inbounds [11 x i8*], [11 x i8*]* @switch.table.main.24, i64 0, i64 %44
br label %54
46: ; preds = %17
%47 = zext i8 %21 to i16
%48 = lshr i16 1173, %47
%49 = and i16 %48, 1
%50 = icmp eq i16 %49, 0
br i1 %50, label %60, label %51
51: ; preds = %46
%52 = sext i8 %21 to i64
%53 = getelementptr inbounds [11 x i8*], [11 x i8*]* @switch.table.main.24, i64 0, i64 %52
br label %54
54: ; preds = %43, %51
%55 = phi i8** [ %53, %51 ], [ %45, %43 ]
%56 = load i8*, i8** %55
br label %57
57: ; preds = %54, %35, %31, %23
%58 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.11, i64 0, i64 0), %23 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @str.10, i64 0, i64 0), %31 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0), %35 ], [ %56, %54 ]
%59 = call i32 @puts(i8* dereferenceable(1) %58)
br label %60
60: ; preds = %46, %17, %38, %7, %57, %31, %35
ret i32 0
}