#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 input;
  char *output;
  scanf("%c", &input);
  if (((int)input >= 0 && (int)input <= 47) ||
      ((int)input >= 58 && (int)input <= 64) ||
      ((int)input >= 91 && (int)input <= 96 ||
       ((int)input >= 123 && (int)input <= 127)))
    output = "SPL";
  else if (((int)input >= 65 && (int)input <= 90))
    output = "UPR";
  else if (((int)input >= 97 && (int)input <= 122))
    output = "LWR";
  else if (((int)input >= 48 && (int)input <= 57))
    output = "DIG";
  else
    output = "INV";
  printf("%s", output);
}


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    $0x0,%eax
jl     1159 <main+0x39>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jle    11a7 <main+0x87>
movsbl -0x5(%rbp),%eax
cmp    $0x3a,%eax
jl     1173 <main+0x53>
movsbl -0x5(%rbp),%eax
cmp    $0x40,%eax
jle    11a7 <main+0x87>
movsbl -0x5(%rbp),%eax
cmp    $0x5b,%eax
jl     118d <main+0x6d>
movsbl -0x5(%rbp),%eax
cmp    $0x60,%eax
jle    11a7 <main+0x87>
movsbl -0x5(%rbp),%eax
cmp    $0x7b,%eax
jl     11b7 <main+0x97>
movsbl -0x5(%rbp),%eax
cmp    $0x7f,%eax
jg     11b7 <main+0x97>
lea    0xe55(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    124f <main+0x12f>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     11e1 <main+0xc1>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     11e1 <main+0xc1>
lea    0xe2f(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    124a <main+0x12a>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     120b <main+0xeb>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     120b <main+0xeb>
lea    0xe09(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1245 <main+0x125>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1235 <main+0x115>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1235 <main+0x115>
lea    0xde3(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1240 <main+0x120>
lea    0xdd7(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1245 <main+0x125>
jmp    124a <main+0x12a>
jmp    124f <main+0x12f>
mov    -0x10(%rbp),%rsi
lea    0xdbd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%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    0xec6(%rip),%rsi
cmp    $0x30,%al
jb     1164 <main+0x44>
lea    -0x5b(%rax),%ecx
cmp    $0x24,%cl
ja     115c <main+0x3c>
movzbl %cl,%ecx
movabs $0x1f0000003f,%rdx
bt     %rcx,%rdx
jb     1164 <main+0x44>
lea    -0x3a(%rax),%ecx
cmp    $0x7,%cl
jae    1174 <main+0x54>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    -0x41(%rax),%ecx
cmp    $0x1a,%cl
jae    1185 <main+0x65>
lea    0xe84(%rip),%rsi
jmp    1164 <main+0x44>
cmp    $0x60,%al
jle    1192 <main+0x72>
lea    0xe7b(%rip),%rsi
jmp    1164 <main+0x44>
add    $0xd0,%al
cmp    $0xa,%al
lea    0xe72(%rip),%rax
lea    0xe6f(%rip),%rsi
cmovb  %rax,%rsi
jmp    1164 <main+0x44>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"SPL\00"
@.str.2 = [4 x i8] c"UPR\00"
@.str.3 = [4 x i8] c"LWR\00"
@.str.4 = [4 x i8] c"DIG\00"
@.str.5 = [4 x i8] c"INV\00"
@.str.6 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 47
br i1 %11, label %36, label %12
12: ; preds = %8, %0
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 58
br i1 %15, label %16, label %20
16: ; preds = %12
%17 = load i8, i8* %2
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 64
br i1 %19, label %36, label %20
20: ; preds = %16, %12
%21 = load i8, i8* %2
%22 = sext i8 %21 to i32
%23 = icmp sge i32 %22, 91
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load i8, i8* %2
%26 = sext i8 %25 to i32
%27 = icmp sle i32 %26, 96
br i1 %27, label %36, label %28
28: ; preds = %24, %20
%29 = load i8, i8* %2
%30 = sext i8 %29 to i32
%31 = icmp sge i32 %30, 123
br i1 %31, label %32, label %37
32: ; preds = %28
%33 = load i8, i8* %2
%34 = sext i8 %33 to i32
%35 = icmp sle i32 %34, 127
br i1 %35, label %36, label %37
36: ; preds = %32, %24, %16, %8
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %68
37: ; preds = %32, %28
%38 = load i8, i8* %2
%39 = sext i8 %38 to i32
%40 = icmp sge i32 %39, 65
br i1 %40, label %41, label %46
41: ; preds = %37
%42 = load i8, i8* %2
%43 = sext i8 %42 to i32
%44 = icmp sle i32 %43, 90
br i1 %44, label %45, label %46
45: ; preds = %41
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %67
46: ; preds = %41, %37
%47 = load i8, i8* %2
%48 = sext i8 %47 to i32
%49 = icmp sge i32 %48, 97
br i1 %49, label %50, label %55
50: ; preds = %46
%51 = load i8, i8* %2
%52 = sext i8 %51 to i32
%53 = icmp sle i32 %52, 122
br i1 %53, label %54, label %55
54: ; preds = %50
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %66
55: ; preds = %50, %46
%56 = load i8, i8* %2
%57 = sext i8 %56 to i32
%58 = icmp sge i32 %57, 48
br i1 %58, label %59, label %64
59: ; preds = %55
%60 = load i8, i8* %2
%61 = sext i8 %60 to i32
%62 = icmp sle i32 %61, 57
br i1 %62, label %63, label %64
63: ; preds = %59
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %65
64: ; preds = %59, %55
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %65
65: ; preds = %64, %63
br label %66
66: ; preds = %65, %54
br label %67
67: ; preds = %66, %45
br label %68
68: ; preds = %67, %36
%69 = load i8*, i8** %3
%70 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %69)
%71 = load i32, i32* %1
ret i32 %71
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"SPL\00"
@.str.2 = [4 x i8] c"UPR\00"
@.str.3 = [4 x i8] c"LWR\00"
@.str.4 = [4 x i8] c"DIG\00"
@.str.5 = [4 x i8] c"INV\00"
@.str.6 = [3 x i8] c"%s\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 = freeze i8 %3
%5 = icmp ult i8 %4, 48
br i1 %5, label %16, label %6
6: ; preds = %0
switch i8 %4, label %7 [
i8 127, label %16
i8 126, label %16
i8 125, label %16
i8 124, label %16
i8 123, label %16
i8 96, label %16
i8 95, label %16
i8 94, label %16
i8 93, label %16
i8 92, label %16
i8 91, label %16
i8 64, label %16
i8 63, label %16
i8 62, label %16
i8 61, label %16
i8 60, label %16
i8 59, label %16
i8 58, label %16
]
7: ; preds = %6
%8 = add i8 %4, -65
%9 = icmp ult i8 %8, 26
br i1 %9, label %16, label %10
10: ; preds = %7
%11 = icmp sgt i8 %4, 96
br i1 %11, label %16, label %12
12: ; preds = %10
%13 = add i8 %4, -48
%14 = icmp ult i8 %13, 10
%15 = select i1 %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0)
br label %16
16: ; preds = %6, %6, %6, %6, %6, %6, %6, %6, %6, %6, %6, %6, %6, %6, %6, %6, %6, %6, %0, %12, %10, %7
%17 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %7 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), %10 ], [ %15, %12 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %6 ]
%18 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %17)
ret i32 0
}