#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*/ printdecrypted(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char text[64];
  scanf("%64s", text);
  int len = 0;
  int i;
  while (text[len] != '\0')
    len++;
  for (i = 0; i < len / 2; i++) {
    char tmp = text[i];
    text[i] = text[len - i - 1];
    text[len - i - 1] = tmp;
  }
  printdecrypted(text);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1050 <scanf@plt>
movl   $0x0,-0x54(%rbp)
movslq -0x54(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     1176 <main+0x46>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1156 <main+0x26>
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x54(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x60(%rbp),%eax
cmp    %ecx,%eax
jge    11dd <main+0xad>
movslq -0x58(%rbp),%rax
mov    -0x50(%rbp,%rax,1),%al
mov    %al,-0x59(%rbp)
mov    -0x54(%rbp),%eax
sub    -0x58(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x50(%rbp,%rax,1),%cl
movslq -0x58(%rbp),%rax
mov    %cl,-0x50(%rbp,%rax,1)
mov    -0x59(%rbp),%cl
mov    -0x54(%rbp),%eax
sub    -0x58(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %cl,-0x50(%rbp,%rax,1)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    117d <main+0x4d>
lea    -0x50(%rbp),%rdi
call   1030 <printdecrypted@plt>
lea    0xe18(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
lea    0xec5(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    $0xffffffffffffffff,%rcx
movabs $0xffffffff00000000,%rax
ff ff ff
movabs $0x100000000,%rdx
xchg   %ax,%ax
add    %rdx,%rax
cmpb   $0x0,0x1(%rsp,%rcx,1)
lea    0x1(%rcx),%rcx
jne    1160 <main+0x30>
test   $0xfffffffe,%ecx
je     120f <main+0xdf>
mov    %rcx,%r8
shr    %r8
mov    %r8d,%edx
and    $0x7fffffff,%edx
cmp    $0x1,%edx
jne    1198 <main+0x68>
xor    %edx,%edx
test   $0x1,%r8b
jne    11f6 <main+0xc6>
jmp    120f <main+0xdf>
lea    0x1(%rsp),%rsi
movslq %ecx,%rcx
lea    (%rsp,%rcx,1),%rdi
add    $0xffffffffffffffff,%rdi
mov    %r8d,%r9d
and    $0x1,%r9d
mov    %r8d,%edx
and    $0x7fffffff,%edx
sub    %rdx,%r9
xor    %edx,%edx
nopl   (%rax)
movzbl -0x1(%rsi),%r10d
movzbl (%rdi,%rdx,1),%ecx
mov    %cl,-0x1(%rsi)
mov    %r10b,(%rdi,%rdx,1)
movzbl (%rsi),%r10d
movzbl -0x1(%rdi,%rdx,1),%ecx
mov    %cl,(%rsi)
mov    %r10b,-0x1(%rdi,%rdx,1)
add    $0x2,%rsi
add    $0xfffffffffffffffe,%rdx
cmp    %rdx,%r9
jne    11c0 <main+0x90>
neg    %rdx
test   $0x1,%r8b
je     120f <main+0xdf>
sar    $0x20,%rax
mov    (%rsp,%rdx,1),%cl
mov    %rdx,%rsi
not    %rsi
add    %rax,%rsi
mov    (%rsp,%rsi,1),%al
mov    %al,(%rsp,%rdx,1)
mov    %cl,(%rsp,%rsi,1)
mov    %rsp,%rdi
call   1040 <printdecrypted@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%64s\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i32 0, i32* %1
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %6)
store i32 0, i32* %3
br label %8
8: ; preds = %15, %0
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %8
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %8
18: ; preds = %8
store i32 0, i32* %4
br label %19
19: ; preds = %46, %18
%20 = load i32, i32* %4
%21 = load i32, i32* %3
%22 = sdiv i32 %21, 2
%23 = icmp slt i32 %20, %22
br i1 %23, label %24, label %49
24: ; preds = %19
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 %26
%28 = load i8, i8* %27
store i8 %28, i8* %5
%29 = load i32, i32* %3
%30 = load i32, i32* %4
%31 = sub nsw i32 %29, %30
%32 = sub nsw i32 %31, 1
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = load i32, i32* %4
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 %37
store i8 %35, i8* %38
%39 = load i8, i8* %5
%40 = load i32, i32* %3
%41 = load i32, i32* %4
%42 = sub nsw i32 %40, %41
%43 = sub nsw i32 %42, 1
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 %44
store i8 %39, i8* %45
br label %46
46: ; preds = %24
%47 = load i32, i32* %4
%48 = add nsw i32 %47, 1
store i32 %48, i32* %4
br label %19
49: ; preds = %19
%50 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%51 = call i32 @printdecrypted(i8* %50)
%52 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%64s\00"
define i32 @main() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %4
4: ; preds = %4, %0
%5 = phi i64 [ %9, %4 ], [ 0, %0 ]
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
%9 = add nuw i64 %5, 1
br i1 %8, label %10, label %4
10: ; preds = %4
%11 = and i64 %5, 4294967294
%12 = icmp eq i64 %11, 0
br i1 %12, label %51, label %13
13: ; preds = %10
%14 = lshr i64 %5, 1
%15 = shl i64 %5, 32
%16 = ashr exact i64 %15, 32
%17 = and i64 %14, 2147483647
%18 = and i64 %14, 1
%19 = icmp eq i64 %17, 1
br i1 %19, label %41, label %20
20: ; preds = %13
%21 = sub nsw i64 %17, %18
br label %22
22: ; preds = %22, %20
%23 = phi i64 [ 0, %20 ], [ %38, %22 ]
%24 = phi i64 [ 0, %20 ], [ %39, %22 ]
%25 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 %23
%26 = load i8, i8* %25
%27 = xor i64 %23, -1
%28 = add nsw i64 %16, %27
%29 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 %28
%30 = load i8, i8* %29
store i8 %30, i8* %25
store i8 %26, i8* %29
%31 = or i64 %23, 1
%32 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = sub nuw nsw i64 -2, %23
%35 = add nsw i64 %16, %34
%36 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 %35
%37 = load i8, i8* %36
store i8 %37, i8* %32
store i8 %33, i8* %36
%38 = add nuw nsw i64 %23, 2
%39 = add i64 %24, 2
%40 = icmp eq i64 %39, %21
br i1 %40, label %41, label %22
41: ; preds = %22, %13
%42 = phi i64 [ 0, %13 ], [ %38, %22 ]
%43 = icmp eq i64 %18, 0
br i1 %43, label %51, label %44
44: ; preds = %41
%45 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 %42
%46 = load i8, i8* %45
%47 = xor i64 %42, -1
%48 = add nsw i64 %16, %47
%49 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 %48
%50 = load i8, i8* %49
store i8 %50, i8* %45
store i8 %46, i8* %49
br label %51
51: ; preds = %44, %41, %10
%52 = call i32 @printdecrypted(i8* %2)
%53 = call i32 @putchar(i32 10)
ret i32 0
}