#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 getchar();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Ingresar un caracter:\n");
  int c = getchar();
  if (c >= 'a' && c <= 'z')
    printf("El caracter es una minuscula.\n");
  else if (c >= 'A' && c <= 'Z')
    printf("El caracter es una mayuscula.\n");
  else if (c >= '0' && c <= '9')
    printf("Es un numero.\n");
  else
    printf("Es un simbolo.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     116a <main+0x4a>
cmpl   $0x7a,-0x8(%rbp)
jg     116a <main+0x4a>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
jmp    11ca <main+0xaa>
cmpl   $0x41,-0x8(%rbp)
jl     118f <main+0x6f>
cmpl   $0x5a,-0x8(%rbp)
jg     118f <main+0x6f>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
jmp    11c5 <main+0xa5>
cmpl   $0x30,-0x8(%rbp)
jl     11b4 <main+0x94>
cmpl   $0x39,-0x8(%rbp)
jg     11b4 <main+0x94>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
jmp    11c0 <main+0xa0>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    11c5 <main+0xa5>
jmp    11ca <main+0xaa>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
lea    -0x61(%rax),%ecx
cmp    $0x1a,%ecx
jae    1145 <main+0x25>
lea    0xf0e(%rip),%rdi
jmp    116e <main+0x4e>
lea    -0x41(%rax),%ecx
cmp    $0x1a,%ecx
jae    1156 <main+0x36>
lea    0xedf(%rip),%rdi
jmp    116e <main+0x4e>
add    $0xffffffd0,%eax
cmp    $0xa,%eax
lea    0xec2(%rip),%rax
lea    0xeac(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Ingresar un caracter:\0A\00"
@.str.1 = [31 x i8] c"El caracter es una minuscula.\0A\00"
@.str.2 = [31 x i8] c"El caracter es una mayuscula.\0A\00"
@.str.3 = [15 x i8] c"Es un numero.\0A\00"
@.str.4 = [16 x i8] c"Es un simbolo.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 122
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %32
12: ; preds = %7, %0
%13 = load i32, i32* %2
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp sle i32 %16, 90
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
br label %31
20: ; preds = %15, %12
%21 = load i32, i32* %2
%22 = icmp sge i32 %21, 48
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp sle i32 %24, 57
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %30
28: ; preds = %23, %20
%29 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %30
30: ; preds = %28, %26
br label %31
31: ; preds = %30, %18
br label %32
32: ; preds = %31, %10
ret i32 0
}

LLVM IR (-O2):
@str = [22 x i8] c"Ingresar un caracter:\00"
@str.5 = [15 x i8] c"Es un simbolo.\00"
@str.6 = [14 x i8] c"Es un numero.\00"
@str.7 = [30 x i8] c"El caracter es una mayuscula.\00"
@str.8 = [30 x i8] c"El caracter es una minuscula.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
%3 = add i32 %2, -97
%4 = icmp ult i32 %3, 26
br i1 %4, label %12, label %5
5: ; preds = %0
%6 = add i32 %2, -65
%7 = icmp ult i32 %6, 26
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = add i32 %2, -48
%10 = icmp ult i32 %9, 10
%11 = select i1 %10, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.5, i64 0, i64 0)
br label %12
12: ; preds = %8, %5, %0
%13 = phi i8* [ getelementptr inbounds ([30 x i8], [30 x i8]* @str.8, i64 0, i64 0), %0 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @str.7, i64 0, i64 0), %5 ], [ %11, %8 ]
%14 = tail call i32 @puts(i8* dereferenceable(1) %13)
ret i32 0
}