#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 *);
int main() {
  char ch;
  scanf("%c", &ch);
  if (ch <= 'Z' && ch >= 'A')
    printf("Capital Letter");
  if (ch <= 'z' && ch >= 'a')
    printf("Small Letter");
  if (ch >= '1' && ch <= '9')
    printf("Digit");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1165 <main+0x45>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1165 <main+0x45>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     118b <main+0x6b>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     118b <main+0x6b>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x31,%eax
jl     11b1 <main+0x91>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     11b1 <main+0x91>
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x7(%rsp),%al
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     114e <main+0x2e>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    0x7(%rsp),%al
lea    -0x61(%rax),%ecx
cmp    $0x19,%cl
ja     1166 <main+0x46>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    0x7(%rsp),%al
add    $0xcf,%al
cmp    $0x8,%al
ja     1178 <main+0x58>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [15 x i8] c"Capital Letter\00"
@.str.2 = [13 x i8] c"Small Letter\00"
@.str.3 = [6 x i8] c"Digit\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sle i32 %5, 90
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sge i32 %9, 65
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %7, %0
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = icmp sle i32 %15, 122
br i1 %16, label %17, label %23
17: ; preds = %13
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = icmp sge i32 %19, 97
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %23
23: ; preds = %21, %17, %13
%24 = load i8, i8* %2
%25 = sext i8 %24 to i32
%26 = icmp sge i32 %25, 49
br i1 %26, label %27, label %33
27: ; preds = %23
%28 = load i8, i8* %2
%29 = sext i8 %28 to i32
%30 = icmp sle i32 %29, 57
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %33
33: ; preds = %31, %27, %23
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [15 x i8] c"Capital Letter\00"
@.str.2 = [13 x i8] c"Small Letter\00"
@.str.3 = [6 x i8] c"Digit\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = add i8 %3, -65
%5 = icmp ult i8 %4, 26
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%8 = load i8, i8* %1
br label %9
9: ; preds = %6, %0
%10 = phi i8 [ %8, %6 ], [ %3, %0 ]
%11 = add i8 %10, -97
%12 = icmp ult i8 %11, 26
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%15 = load i8, i8* %1
br label %16
16: ; preds = %13, %9
%17 = phi i8 [ %15, %13 ], [ %10, %9 ]
%18 = add i8 %17, -49
%19 = icmp ult i8 %18, 9
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %22
22: ; preds = %20, %16
ret i32 0
}