#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 *);
void seven(const char *a) {
  if (*a >= 91 && *a <= 96)
    printf("a is not a letter.\n");
  else if (*a >= 'A' && *a <= 'z')
    printf("a is a letter.\n");
  else
    printf("a is not a letter.\n");
}


x86 assembly (clang, -O0):
<seven>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jl     114d <seven+0x3d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x60,%eax
jg     114d <seven+0x3d>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
jmp    118f <seven+0x7f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     117e <seven+0x6e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jg     117e <seven+0x6e>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
jmp    118a <seven+0x7a>
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
jmp    118f <seven+0x7f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seven>:
mov    (%rdi),%al
lea    -0x5b(%rax),%ecx
add    $0xbf,%al
cmp    $0x3a,%al
lea    0xee0(%rip),%rdi
lea    0xee8(%rip),%rax
cmovae %rax,%rdi
cmp    $0x6,%cl
cmovb  %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"a is not a letter.\0A\00"
@.str.1 = [16 x i8] c"a is a letter.\0A\00"
define void @seven(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 91
br i1 %6, label %7, label %14
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 96
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %29
14: ; preds = %7, %1
%15 = load i8*, i8** %2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp sge i32 %17, 65
br i1 %18, label %19, label %26
19: ; preds = %14
%20 = load i8*, i8** %2
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp sle i32 %22, 122
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %28
26: ; preds = %19, %14
%27 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %28
28: ; preds = %26, %24
br label %29
29: ; preds = %28, %12
ret void
}

LLVM IR (-O2):
@str.2 = [15 x i8] c"a is a letter.\00"
@str.3 = [19 x i8] c"a is not a letter.\00"
define void @seven(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -91
%4 = icmp ult i8 %3, 6
%5 = add i8 %2, -65
%6 = icmp ult i8 %5, 58
%7 = select i1 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.3, i64 0, i64 0)
%8 = select i1 %4, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.3, i64 0, i64 0), i8* %7
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
ret void
}