#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*/ isalpha(char);
scalar_t__ islower(char);
int /*<<< orphan*/ printf(char *, ...);
int tolower(char);
int toupper(char);
void main() {
  char letra;
  printf("Introduzca una letra:");
  letra = getchar();
  if (!isalpha(letra)) {
    printf("No has introducido una letra!!!");
    return;
  }
  if (islower(letra)) {
    printf("Tu letra es minuscula \nAHORA MIRA COMO LA TRANSFORMO CON MIS "
           "PODERES \nwiiiiiiiiiiiiiiiiuuuuaaaiii: %c\n",
           toupper(letra));
  } else {
    printf("Tu letra es una mayuscula\n wiiiiiiiuuuuuaaaa : %c\n",
           tolower(letra));
  }
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1080 <isalpha@plt>
cmp    $0x0,%eax
jne    11a5 <main+0x45>
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    11f4 <main+0x94>
movsbl -0x1(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     11d6 <main+0x76>
movsbl -0x1(%rbp),%edi
call   1040 <toupper@plt>
mov    %eax,%esi
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    11ef <main+0x8f>
movsbl -0x1(%rbp),%edi
call   1070 <tolower@plt>
mov    %eax,%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    11f4 <main+0x94>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xe98(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
movsbl %al,%ebx
mov    %ebx,%edi
call   1080 <isalpha@plt>
test   %eax,%eax
je     11a0 <main+0x40>
mov    %ebx,%edi
call   1030 <islower@plt>
mov    %ebx,%edi
test   %rax,%rax
je     11af <main+0x4f>
call   1040 <toupper@plt>
lea    0xe98(%rip),%rdi
jmp    11bb <main+0x5b>
lea    0xe6f(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1050 <printf@plt>
call   1070 <tolower@plt>
lea    0xee2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
pop    %rbx
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Introduzca una letra:\00"
@.str.1 = [32 x i8] c"No has introducido una letra!!!\00"
@.str.2 = [103 x i8] c"Tu letra es minuscula \0AAHORA MIRA COMO LA TRANSFORMO CON MIS PODERES \0Awiiiiiiiiiiiiiiiiuuuuaaaiii: %c\0A\00"
@.str.3 = [51 x i8] c"Tu letra es una mayuscula\0A wiiiiiiiuuuuuaaaa : %c\0A\00"
define void @main() {
%1 = alloca i8
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %1
%4 = load i8, i8* %1
%5 = call i32 @isalpha(i8 signext %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %22
9: ; preds = %0
%10 = load i8, i8* %1
%11 = call i64 @islower(i8 signext %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load i8, i8* %1
%15 = call i32 @toupper(i8 signext %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.2, i64 0, i64 0), i32 %15)
br label %21
17: ; preds = %9
%18 = load i8, i8* %1
%19 = call i32 @tolower(i8 signext %18)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %17, %13
br label %22
22: ; preds = %21, %7
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Introduzca una letra:\00"
@.str.1 = [32 x i8] c"No has introducido una letra!!!\00"
@.str.2 = [103 x i8] c"Tu letra es minuscula \0AAHORA MIRA COMO LA TRANSFORMO CON MIS PODERES \0Awiiiiiiiiiiiiiiiiuuuuaaaiii: %c\0A\00"
@.str.3 = [51 x i8] c"Tu letra es una mayuscula\0A wiiiiiiiuuuuuaaaa : %c\0A\00"
define void @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getchar()
%3 = tail call i32 @isalpha(i8 signext %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %16
7: ; preds = %0
%8 = tail call i64 @islower(i8 signext %2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = tail call i32 @toupper(i8 signext %2)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([103 x i8], [103 x i8]* @.str.2, i64 0, i64 0), i32 %11)
br label %16
13: ; preds = %7
%14 = tail call i32 @tolower(i8 signext %2)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %10, %13, %5
ret void
}