#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 main(void) {
  char c;
  int flag;
  printf("1 is uppercase, 0 is lower\n");
  c = 'a';
  if ((c) >= 65 && (c) <= 90) {
    (flag) = 1;
  } else {
    (flag) = 0;
  }
  printf("\'%c\' = %i\n", c, flag);
  c = 'A';
  if ((c) >= 65 && (c) <= 90) {
    (flag) = 1;
  } else {
    (flag) = 0;
  }
  printf("\'%c\' = %i\n", c, flag);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x61,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1157 <main+0x47>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1157 <main+0x47>
movl   $0x1,-0xc(%rbp)
jmp    115e <main+0x4e>
movl   $0x0,-0xc(%rbp)
movsbl -0x5(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x41,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     119d <main+0x8d>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     119d <main+0x8d>
movl   $0x1,-0xc(%rbp)
jmp    11a4 <main+0x94>
movl   $0x0,-0xc(%rbp)
movsbl -0x5(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
mov    $0x61,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x41,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.1 = [11 x i8] c"'%c' = %i\0A\00"
@str = [27 x i8] c"1 is uppercase, 0 is lower\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 97, i32 0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 65, i32 1)
ret i32 0
}