#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 /*<<< orphan*/ scanf(char *, char *, char *, char *, char *);
int main() {
  char a, b, c, d;
  printf("Ingrese cuatro letras, separadas por un espacio: ");
  scanf("%c %c %c %c", &a, &b, &c, &d);
  do {
    printf("\"%c%c%c%c\"\n", d, c, b, a);
  } while (0);
  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>
lea    0xeee(%rip),%rdi
lea    -0x5(%rbp),%rsi
lea    -0x6(%rbp),%rdx
lea    -0x7(%rbp),%rcx
lea    -0x8(%rbp),%r8
call   1040 <scanf@plt>
movsbl -0x8(%rbp),%esi
movsbl -0x7(%rbp),%edx
movsbl -0x6(%rbp),%ecx
movsbl -0x5(%rbp),%r8d
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
lea    0x7(%rsp),%rsi
lea    0x6(%rsp),%rdx
lea    0x5(%rsp),%rcx
lea    0x4(%rsp),%r8
call   1040 <scanf@plt>
movsbl 0x4(%rsp),%esi
movsbl 0x5(%rsp),%edx
movsbl 0x6(%rsp),%ecx
movsbl 0x7(%rsp),%r8d
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Ingrese cuatro letras, separadas por un espacio: \00"
@.str.1 = [12 x i8] c"%c %c %c %c\00"
@.str.2 = [12 x i8] c"\22%c%c%c%c\22\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %2, i8* %3, i8* %4, i8* %5)
br label %8
8: ; preds = %0
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
%11 = load i8, i8* %4
%12 = sext i8 %11 to i32
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %12, i32 %14, i32 %16)
br label %18
18: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [50 x i8] c"Ingrese cuatro letras, separadas por un espacio: \00"
@.str.1 = [12 x i8] c"%c %c %c %c\00"
@.str.2 = [12 x i8] c"\22%c%c%c%c\22\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %2, i8* %3, i8* %4)
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = load i8, i8* %1
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 %10, i32 %12, i32 %14)
ret i32 0
}