#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 */
char getchar();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char lt;
  printf("entre com uma letra, maiúscula ou minúscula: ");
  lt = getchar();
  printf("\n caracter lido=%c", lt);
  if (lt < 91 && lt > 64)
    printf("\nletra maisúcula");
  else if (lt < 123 && lt > 96)
    printf("\nletra minuscula");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%esi
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x5b,%eax
jge    1186 <main+0x66>
movsbl -0x5(%rbp),%eax
cmp    $0x40,%eax
jle    1186 <main+0x66>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b3 <main+0x93>
movsbl -0x5(%rbp),%eax
cmp    $0x7b,%eax
jge    11ae <main+0x8e>
movsbl -0x5(%rbp),%eax
cmp    $0x60,%eax
jle    11ae <main+0x8e>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b3 <main+0x93>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
movsbl %al,%ebp
lea    0xeec(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xbf,%bpl
cmp    $0x1a,%bpl
jae    1160 <main+0x40>
lea    0xee5(%rip),%rdi
jmp    116f <main+0x4f>
add    $0x9f,%bl
cmp    $0x19,%bl
ja     1176 <main+0x56>
lea    0xee6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"entre com uma letra, mai\C3\BAscula ou min\C3\BAscula: \00"
@.str.1 = [19 x i8] c"\0A caracter lido=%c\00"
@.str.2 = [18 x i8] c"\0Aletra mais\C3\BAcula\00"
@.str.3 = [17 x i8] c"\0Aletra minuscula\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp slt i32 %9, 91
br i1 %10, label %11, label %17
11: ; preds = %0
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp sgt i32 %13, 64
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
br label %28
17: ; preds = %11, %0
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = icmp slt i32 %19, 123
br i1 %20, label %21, label %27
21: ; preds = %17
%22 = load i8, i8* %2
%23 = sext i8 %22 to i32
%24 = icmp sgt i32 %23, 96
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %27
27: ; preds = %25, %21, %17
br label %28
28: ; preds = %27, %15
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"entre com uma letra, mai\C3\BAscula ou min\C3\BAscula: \00"
@.str.1 = [19 x i8] c"\0A caracter lido=%c\00"
@.str.2 = [18 x i8] c"\0Aletra mais\C3\BAcula\00"
@.str.3 = [17 x i8] c"\0Aletra minuscula\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = add i8 %2, -65
%6 = icmp ult i8 %5, 26
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = add i8 %2, -97
%9 = icmp ult i8 %8, 26
br i1 %9, label %10, label %13
10: ; preds = %7, %0
%11 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), %7 ]
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %11)
br label %13
13: ; preds = %10, %7
ret i32 0
}