#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(void) {
  char testChar;
  scanf("%c", &testChar);
  if (((((((testChar) >= 'a') && ((testChar) <= 'z'))) ||
        ((((testChar) >= 'A') && ((testChar) <= 'Z'))) ||
        ((((testChar) >= '0') && ((testChar) <= '9'))))
           ? 0
           : 1))
    printf("special character\n");
  else
    printf("alphanumeric character\n");
  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    $0x61,%eax
jl     1159 <main+0x39>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jle    118d <main+0x6d>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1173 <main+0x53>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jle    118d <main+0x6d>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     119c <main+0x7c>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     119c <main+0x7c>
xor    %eax,%eax
test   $0x1,%al
jne    11ab <main+0x8b>
jmp    11bc <main+0x9c>
mov    $0x1,%al
test   $0x1,%al
jne    11ab <main+0x8b>
jmp    11bc <main+0x9c>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
jmp    11c8 <main+0xa8>
lea    0xe53(%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
mov    %eax,%ecx
and    $0xdf,%cl
add    $0xbf,%cl
add    $0xd0,%al
cmp    $0xa,%al
lea    0xecc(%rip),%rax
lea    0xeb3(%rip),%rdi
cmovb  %rax,%rdi
cmp    $0x1a,%cl
cmovb  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [19 x i8] c"special character\0A\00"
@.str.2 = [24 x i8] c"alphanumeric character\0A\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 sge i32 %5, 97
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %27, label %11
11: ; preds = %7, %0
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 90
br i1 %18, label %27, label %19
19: ; preds = %15, %11
%20 = load i8, i8* %2
%21 = sext i8 %20 to i32
%22 = icmp sge i32 %21, 48
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load i8, i8* %2
%25 = sext i8 %24 to i32
%26 = icmp sle i32 %25, 57
br i1 %26, label %27, label %28
27: ; preds = %23, %15, %7
br i1 false, label %29, label %31
28: ; preds = %23, %19
br i1 true, label %29, label %31
29: ; preds = %28, %27
%30 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %33
31: ; preds = %28, %27
%32 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
br label %33
33: ; preds = %31, %29
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@str = [18 x i8] c"special character\00"
@str.3 = [23 x i8] c"alphanumeric character\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 = and i8 %3, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 26
%7 = add i8 %3, -48
%8 = icmp ult i8 %7, 10
%9 = select i1 %6, i1 true, i1 %8
%10 = select i1 %9, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0)
%11 = call i32 @puts(i8* dereferenceable(1) %10)
ret i32 0
}