#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 *, char *);
int main() {
  char a, b, c, d, e;
  printf("\nPor favor ingrese una palabra de 5 letras: ");
  scanf("%c%c%c%c%c", &a, &b, &c, &d, &e);
  printf("\nLa palabra ingresada es: \"%c%c%c%c%c\"\n", a, b, c, d, e);
  a = (int)a + 5;
  b = (int)b + 5;
  c = (int)c + 5;
  d = (int)d + 5;
  e = (int)e + 5;
  printf("\nLa nueva palabra es: \"%c%c%c%c%c\"\n\n", a, b, c, d, e);
  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    0xee9(%rip),%rdi
lea    -0x5(%rbp),%rsi
lea    -0x6(%rbp),%rdx
lea    -0x7(%rbp),%rcx
lea    -0x8(%rbp),%r8
lea    -0x9(%rbp),%r9
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%esi
movsbl -0x6(%rbp),%edx
movsbl -0x7(%rbp),%ecx
movsbl -0x8(%rbp),%r8d
movsbl -0x9(%rbp),%r9d
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
add    $0x5,%eax
mov    %al,-0x5(%rbp)
movsbl -0x6(%rbp),%eax
add    $0x5,%eax
mov    %al,-0x6(%rbp)
movsbl -0x7(%rbp),%eax
add    $0x5,%eax
mov    %al,-0x7(%rbp)
movsbl -0x8(%rbp),%eax
add    $0x5,%eax
mov    %al,-0x8(%rbp)
movsbl -0x9(%rbp),%eax
add    $0x5,%eax
mov    %al,-0x9(%rbp)
movsbl -0x5(%rbp),%esi
movsbl -0x6(%rbp),%edx
movsbl -0x7(%rbp),%ecx
movsbl -0x8(%rbp),%r8d
movsbl -0x9(%rbp),%r9d
lea    0xe90(%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    0xef7(%rip),%rdi
lea    0x7(%rsp),%rsi
lea    0x6(%rsp),%rdx
lea    0x5(%rsp),%rcx
lea    0x4(%rsp),%r8
lea    0x3(%rsp),%r9
call   1040 <scanf@plt>
movsbl 0x7(%rsp),%esi
movsbl 0x6(%rsp),%edx
movsbl 0x5(%rsp),%ecx
movsbl 0x4(%rsp),%r8d
movsbl 0x3(%rsp),%r9d
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x7(%rsp),%sil
add    $0x5,%sil
mov    %sil,0x7(%rsp)
mov    0x6(%rsp),%dl
add    $0x5,%dl
mov    %dl,0x6(%rsp)
mov    0x5(%rsp),%cl
add    $0x5,%cl
mov    %cl,0x5(%rsp)
mov    0x4(%rsp),%dil
add    $0x5,%dil
mov    %dil,0x4(%rsp)
mov    0x3(%rsp),%al
add    $0x5,%al
mov    %al,0x3(%rsp)
movsbl %sil,%esi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %dil,%r8d
movsbl %al,%r9d
lea    0xe8e(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"\0APor favor ingrese una palabra de 5 letras: \00"
@.str.1 = [11 x i8] c"%c%c%c%c%c\00"
@.str.2 = [40 x i8] c"\0ALa palabra ingresada es: \22%c%c%c%c%c\22\0A\00"
@.str.3 = [37 x i8] c"\0ALa nueva palabra es: \22%c%c%c%c%c\22\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %2, i8* %3, i8* %4, i8* %5, i8* %6)
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = load i8, i8* %5
%16 = sext i8 %15 to i32
%17 = load i8, i8* %6
%18 = sext i8 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %12, i32 %14, i32 %16, i32 %18)
%20 = load i8, i8* %2
%21 = sext i8 %20 to i32
%22 = add nsw i32 %21, 5
%23 = trunc i32 %22 to i8
store i8 %23, i8* %2
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = add nsw i32 %25, 5
%27 = trunc i32 %26 to i8
store i8 %27, i8* %3
%28 = load i8, i8* %4
%29 = sext i8 %28 to i32
%30 = add nsw i32 %29, 5
%31 = trunc i32 %30 to i8
store i8 %31, i8* %4
%32 = load i8, i8* %5
%33 = sext i8 %32 to i32
%34 = add nsw i32 %33, 5
%35 = trunc i32 %34 to i8
store i8 %35, i8* %5
%36 = load i8, i8* %6
%37 = sext i8 %36 to i32
%38 = add nsw i32 %37, 5
%39 = trunc i32 %38 to i8
store i8 %39, i8* %6
%40 = load i8, i8* %2
%41 = sext i8 %40 to i32
%42 = load i8, i8* %3
%43 = sext i8 %42 to i32
%44 = load i8, i8* %4
%45 = sext i8 %44 to i32
%46 = load i8, i8* %5
%47 = sext i8 %46 to i32
%48 = load i8, i8* %6
%49 = sext i8 %48 to i32
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i32 %41, i32 %43, i32 %45, i32 %47, i32 %49)
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"\0APor favor ingrese una palabra de 5 letras: \00"
@.str.1 = [11 x i8] c"%c%c%c%c%c\00"
@.str.2 = [40 x i8] c"\0ALa palabra ingresada es: \22%c%c%c%c%c\22\0A\00"
@.str.3 = [37 x i8] c"\0ALa nueva palabra es: \22%c%c%c%c%c\22\0A\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %2, i8* %3, i8* %4, i8* %5)
%8 = load i8, i8* %1
%9 = sext i8 %8 to i32
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
%16 = load i8, i8* %5
%17 = sext i8 %16 to i32
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %11, i32 %13, i32 %15, i32 %17)
%19 = load i8, i8* %1
%20 = add i8 %19, 5
store i8 %20, i8* %1
%21 = load i8, i8* %2
%22 = add i8 %21, 5
store i8 %22, i8* %2
%23 = load i8, i8* %3
%24 = add i8 %23, 5
store i8 %24, i8* %3
%25 = load i8, i8* %4
%26 = add i8 %25, 5
store i8 %26, i8* %4
%27 = load i8, i8* %5
%28 = add i8 %27, 5
store i8 %28, i8* %5
%29 = sext i8 %20 to i32
%30 = sext i8 %22 to i32
%31 = sext i8 %24 to i32
%32 = sext i8 %26 to i32
%33 = sext i8 %28 to i32
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i32 %29, i32 %30, i32 %31, i32 %32, i32 %33)
ret i32 0
}