#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 alphaNumeric(char ch) {
  if (ch >= '0' && ch <= '9') {
    printf("|%c| is alphanumeric.\n", ch);
  } else if (ch >= 'A' && ch <= 'Z') {
    printf("|%c| is alphanumeric.\n", ch);
  } else if (ch >= 'a' && ch <= 'z') {
    printf("|%c| is alphanumeric.\n", ch);
  } else {
    printf("%c is not alphanumeric.\n", ch);
  }
  return 0;
}


x86 assembly (clang, -O0):
<alphaNumeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     114d <alphaNumeric+0x3d>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jg     114d <alphaNumeric+0x3d>
lea    0xec1(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
jmp    11c5 <alphaNumeric+0xb5>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     117c <alphaNumeric+0x6c>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
jg     117c <alphaNumeric+0x6c>
lea    0xe92(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
jmp    11c0 <alphaNumeric+0xb0>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     11ab <alphaNumeric+0x9b>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     11ab <alphaNumeric+0x9b>
lea    0xe63(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
jmp    11bb <alphaNumeric+0xab>
lea    0xe65(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
jmp    11c0 <alphaNumeric+0xb0>
jmp    11c5 <alphaNumeric+0xb5>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alphaNumeric>:
push   %rax
mov    %edi,%esi
lea    -0x30(%rsi),%eax
mov    %esi,%ecx
and    $0xdf,%cl
add    $0xbf,%cl
cmp    $0xa,%al
lea    0xed9(%rip),%rax
lea    0xee9(%rip),%rdi
cmovb  %rax,%rdi
cmp    $0x1a,%cl
cmovb  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"|%c| is alphanumeric.\0A\00"
@.str.1 = [25 x i8] c"%c is not alphanumeric.\0A\00"
define i32 @alphaNumeric(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i8, i8* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8 signext %11)
br label %40
13: ; preds = %6, %1
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = icmp sge i32 %15, 65
br i1 %16, label %17, label %24
17: ; preds = %13
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = icmp sle i32 %19, 90
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = load i8, i8* %2
%23 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8 signext %22)
br label %39
24: ; preds = %17, %13
%25 = load i8, i8* %2
%26 = sext i8 %25 to i32
%27 = icmp sge i32 %26, 97
br i1 %27, label %28, label %35
28: ; preds = %24
%29 = load i8, i8* %2
%30 = sext i8 %29 to i32
%31 = icmp sle i32 %30, 122
br i1 %31, label %32, label %35
32: ; preds = %28
%33 = load i8, i8* %2
%34 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8 signext %33)
br label %38
35: ; preds = %28, %24
%36 = load i8, i8* %2
%37 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8 signext %36)
br label %38
38: ; preds = %35, %32
br label %39
39: ; preds = %38, %21
br label %40
40: ; preds = %39, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"|%c| is alphanumeric.\0A\00"
@.str.1 = [25 x i8] c"%c is not alphanumeric.\0A\00"
define i32 @alphaNumeric(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 26
%7 = or i1 %6, %3
%8 = select i1 %7, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0)
%9 = tail call i32 @printf(i8* %8, i8 signext %0)
ret i32 0
}