#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 getchar();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char character;
  printf("Enter character: ");
  character = getchar();
  switch (character) {
  case 'a':
  case 'A':
  case 'e':
  case 'E':
  case 'i':
  case 'I':
  case 'o':
  case 'O':
  case 'u':
  case 'U':
    printf("Vowel is entered: %c\n", character);
    break;
  case '0':
  case '1':
  case '2':
  case '3':
  case '4':
  case '5':
  case '6':
  case '7':
  case '8':
  case '9':
    printf("Digit is entered: %c\n", character);
    break;
  default:
    printf("Character is entered: %c\n", character);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xfe2(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x11(%rbp)
call   1030 <printf@plt>
mov    -0x11(%rbp),%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x45,%eax
ja     11a3 <main+0x83>
mov    -0x10(%rbp),%rax
lea    0xe94(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsbl -0x5(%rbp),%esi
lea    0xfaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b5 <main+0x95>
movsbl -0x5(%rbp),%esi
lea    0xfa9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b5 <main+0x95>
movsbl -0x5(%rbp),%esi
lea    0xfa8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xff0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
movsbl %al,%esi
lea    -0x30(%rsi),%eax
cmp    $0x45,%eax
ja     116a <main+0x4a>
lea    0xfe2(%rip),%rdi
lea    0xeb1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfe1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xfe5(%rip),%rdi
jmp    115f <main+0x3f>

LLVM IR (-O0):
@.str = [18 x i8] c"Enter character: \00"
@.str.1 = [22 x i8] c"Vowel is entered: %c\0A\00"
@.str.2 = [22 x i8] c"Digit is entered: %c\0A\00"
@.str.3 = [26 x i8] c"Character is entered: %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
switch i32 %6, label %15 [
i32 97, label %7
i32 65, label %7
i32 101, label %7
i32 69, label %7
i32 105, label %7
i32 73, label %7
i32 111, label %7
i32 79, label %7
i32 117, label %7
i32 85, label %7
i32 48, label %11
i32 49, label %11
i32 50, label %11
i32 51, label %11
i32 52, label %11
i32 53, label %11
i32 54, label %11
i32 55, label %11
i32 56, label %11
i32 57, label %11
]
7: ; preds = %0, %0, %0, %0, %0, %0, %0, %0, %0, %0
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %9)
br label %19
11: ; preds = %0, %0, %0, %0, %0, %0, %0, %0, %0, %0
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %13)
br label %19
15: ; preds = %0
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %15, %11, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter character: \00"
@.str.1 = [22 x i8] c"Vowel is entered: %c\0A\00"
@.str.2 = [22 x i8] c"Digit is entered: %c\0A\00"
@.str.3 = [26 x i8] c"Character is entered: %c\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
switch i32 %3, label %5 [
i32 97, label %6
i32 65, label %6
i32 101, label %6
i32 69, label %6
i32 105, label %6
i32 73, label %6
i32 111, label %6
i32 79, label %6
i32 117, label %6
i32 85, label %6
i32 48, label %4
i32 49, label %4
i32 50, label %4
i32 51, label %4
i32 52, label %4
i32 53, label %4
i32 54, label %4
i32 55, label %4
i32 56, label %4
i32 57, label %4
]
4: ; preds = %0, %0, %0, %0, %0, %0, %0, %0, %0, %0
br label %6
5: ; preds = %0
br label %6
6: ; preds = %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %5, %4
%7 = phi i8* [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %0 ]
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %7, i32 %3)
ret i32 0
}