#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 *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char c = 0;
  scanf("%c", &c);
  if (c >= '0' && c <= '9') {
    printf("%c is numeric\n", c);
  } else if (c >= 'A' && c <= 'Z') {
    printf("%c is uppercase\n", c);
  } else if (c >= 'a' && c <= 'z') {
    printf("%c is lowercase\n", c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
lea    0xec6(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1172 <main+0x52>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1172 <main+0x52>
lea    0xe9f(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
jmp    11d5 <main+0xb5>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     11a1 <main+0x81>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     11a1 <main+0x81>
lea    0xe7f(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
jmp    11d0 <main+0xb0>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     11cb <main+0xab>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     11cb <main+0xab>
lea    0xe61(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
jmp    11d0 <main+0xb0>
jmp    11d5 <main+0xb5>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x0,0x7(%rsp)
lea    0xed3(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x7(%rsp),%al
lea    -0x30(%rax),%ecx
cmp    $0xa,%cl
jae    114c <main+0x2c>
lea    0xeb9(%rip),%rdi
jmp    116c <main+0x4c>
lea    -0x41(%rax),%ecx
cmp    $0x1a,%cl
jae    115d <main+0x3d>
lea    0xeb7(%rip),%rdi
jmp    116c <main+0x4c>
lea    -0x61(%rax),%ecx
cmp    $0x19,%cl
ja     1174 <main+0x54>
lea    0xeb7(%rip),%rdi
movsbl %al,%esi
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"%c is numeric\0A\00"
@.str.2 = [17 x i8] c"%c is uppercase\0A\00"
@.str.3 = [17 x i8] c"%c is lowercase\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 0, i8* %2
%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 sge i32 %5, 48
br i1 %6, label %7, label %14
7: ; preds = %0
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i8, i8* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8 signext %12)
br label %38
14: ; preds = %7, %0
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sge i32 %16, 65
br i1 %17, label %18, label %25
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 %25
22: ; preds = %18
%23 = load i8, i8* %2
%24 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8 signext %23)
br label %37
25: ; preds = %18, %14
%26 = load i8, i8* %2
%27 = sext i8 %26 to i32
%28 = icmp sge i32 %27, 97
br i1 %28, label %29, label %36
29: ; preds = %25
%30 = load i8, i8* %2
%31 = sext i8 %30 to i32
%32 = icmp sle i32 %31, 122
br i1 %32, label %33, label %36
33: ; preds = %29
%34 = load i8, i8* %2
%35 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8 signext %34)
br label %36
36: ; preds = %33, %29, %25
br label %37
37: ; preds = %36, %22
br label %38
38: ; preds = %37, %11
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [15 x i8] c"%c is numeric\0A\00"
@.str.2 = [17 x i8] c"%c is uppercase\0A\00"
@.str.3 = [17 x i8] c"%c is lowercase\0A\00"
define i32 @main() {
%1 = alloca i8
store i8 0, i8* %1
%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, -48
%5 = icmp ult i8 %4, 10
br i1 %5, label %12, label %6
6: ; preds = %0
%7 = add i8 %3, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = add i8 %3, -97
%11 = icmp ult i8 %10, 26
br i1 %11, label %12, label %15
12: ; preds = %9, %6, %0
%13 = phi i8* [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), %6 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), %9 ]
%14 = call i32 @printf(i8* %13, i8 signext %3)
br label %15
15: ; preds = %12, %9
ret i32 0
}