#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;
  printf("Enter any English Alphabet:");
  scanf("%c", &ch);
  if (ch >= 'a' && ch <= 'z') {
    printf("It's an small letter.\n");
  } else if (ch >= 'A' && ch <= 'Z') {
    printf("It's an capital letter.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1176 <main+0x56>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1176 <main+0x56>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    11a1 <main+0x81>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     119c <main+0x7c>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     119c <main+0x7c>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
jmp    11a1 <main+0x81>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x7(%rsp),%al
lea    -0x61(%rax),%ecx
cmp    $0x1a,%cl
jae    1163 <main+0x33>
lea    0xed6(%rip),%rdi
jmp    1170 <main+0x40>
add    $0xbf,%al
cmp    $0x19,%al
ja     1175 <main+0x45>
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Enter any English Alphabet:\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [23 x i8] c"It's an small letter.\0A\00"
@.str.3 = [25 x i8] c"It's an capital letter.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 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 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 97
br i1 %7, label %8, label %14
8: ; preds = %0
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 122
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
br label %25
14: ; preds = %8, %0
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sge i32 %16, 65
br i1 %17, label %18, label %24
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sle i32 %20, 90
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %24
24: ; preds = %22, %18, %14
br label %25
25: ; preds = %24, %12
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Enter any English Alphabet:\00"
@.str.1 = [3 x i8] c"%c\00"
@str = [24 x i8] c"It's an capital letter.\00"
@str.4 = [22 x i8] c"It's an small letter.\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 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 = add i8 %4, -97
%6 = icmp ult i8 %5, 26
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = add i8 %4, -65
%9 = icmp ult i8 %8, 26
br i1 %9, label %10, label %13
10: ; preds = %7, %0
%11 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.4, i64 0, i64 0), %0 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0), %7 ]
%12 = call i32 @puts(i8* dereferenceable(1) %11)
br label %13
13: ; preds = %10, %7
ret i32 0
}