#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 *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(int argc, const char *argv[]) {
  int n, i = 0;
  char temp[51], in[101];
  scanf("%s", in);
  while (in[i] != '\0') {
    temp[i] = in[i];
    i++;
  }
  n = i;
  while (i >= 0) {
    in[n] = temp[--i];
    n++;
  }
  in[n] = '\0';
  printf("%s\n", in);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
lea    -0xc0(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x18(%rbp),%rax
movsbl -0xc0(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     1189 <main+0x69>
movslq -0x18(%rbp),%rax
mov    -0xc0(%rbp,%rax,1),%cl
movslq -0x18(%rbp),%rax
mov    %cl,-0x50(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1153 <main+0x33>
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     11c1 <main+0xa1>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
cltq
mov    -0x50(%rbp,%rax,1),%cl
movslq -0x14(%rbp),%rax
mov    %cl,-0xc0(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118f <main+0x6f>
movslq -0x14(%rbp),%rax
movb   $0x0,-0xc0(%rbp,%rax,1)
lea    -0xc0(%rbp),%rsi
lea    0xe28(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xb0,%rsp
lea    0xed1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%cl
xor    %eax,%eax
test   %cl,%cl
je     1169 <main+0x49>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %cl,0x70(%rsp,%rax,1)
movzbl 0x1(%rsp,%rax,1),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1150 <main+0x30>
test   %eax,%eax
js     1255 <main+0x135>
mov    %eax,%edx
cmp    $0x1f,%eax
jae    117b <main+0x5b>
mov    %rdx,%rax
mov    %rdx,%rcx
jmp    1232 <main+0x112>
lea    0x1(%rdx),%r8
mov    %r8,%rsi
and    $0xffffffffffffffe0,%rsi
lea    (%rsi,%rdx,1),%rax
mov    %rdx,%rcx
sub    %rsi,%rcx
lea    0x70(%rsp),%rdi
add    %rdx,%rdi
add    $0xfffffffffffffff0,%rdi
add    %rdx,%rbx
add    $0x10,%rbx
xor    %edx,%edx
pxor   %xmm0,%xmm0
nopl   0x0(%rax)
movdqu -0x10(%rdi),%xmm1
movdqu (%rdi),%xmm2
movdqa %xmm2,%xmm3
punpcklbw %xmm0,%xmm3
pshufd $0x4e,%xmm3,%xmm3
pshuflw $0x1b,%xmm3,%xmm3
pshufhw $0x1b,%xmm3,%xmm3
punpckhbw %xmm0,%xmm2
pshufd $0x4e,%xmm2,%xmm2
pshuflw $0x1b,%xmm2,%xmm2
pshufhw $0x1b,%xmm2,%xmm2
packuswb %xmm3,%xmm2
movdqa %xmm1,%xmm3
punpcklbw %xmm0,%xmm3
pshufd $0x4e,%xmm3,%xmm3
pshuflw $0x1b,%xmm3,%xmm3
pshufhw $0x1b,%xmm3,%xmm3
punpckhbw %xmm0,%xmm1
pshufd $0x4e,%xmm1,%xmm1
pshuflw $0x1b,%xmm1,%xmm1
pshufhw $0x1b,%xmm1,%xmm1
packuswb %xmm3,%xmm1
movdqu %xmm2,-0x10(%rbx,%rdx,1)
movdqu %xmm1,(%rbx,%rdx,1)
add    $0x20,%rdx
add    $0xffffffffffffffe0,%rdi
cmp    %rdx,%rsi
jne    11b0 <main+0x90>
cmp    %rsi,%r8
je     1255 <main+0x135>
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x1(%rdx),%rax
movzbl 0x6f(%rsp,%rcx,1),%ebx
mov    %bl,(%rsp,%rdx,1)
mov    %rax,%rdx
add    $0xffffffffffffffff,%rcx
jb     1240 <main+0x120>
mov    %eax,%eax
movb   $0x0,(%rsp,%rax,1)
lea    0xda1(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [51 x i8]
%4 = alloca [101 x i8]
%5 = getelementptr inbounds [51 x i8], [51 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [101 x i8], [101 x i8]* %4, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8, i8* %6
%9 = icmp eq i8 %8, 0
br i1 %9, label %13, label %48
10: ; preds = %48
%11 = trunc i64 %52 to i32
%12 = icmp sgt i32 %11, -1
br i1 %12, label %13, label %65
13: ; preds = %2, %10
%14 = phi i32 [ %11, %10 ], [ 0, %2 ]
%15 = zext i32 %14 to i64
%16 = zext i32 %14 to i64
%17 = add nuw nsw i64 %15, 1
%18 = icmp ult i32 %14, 31
br i1 %18, label %45, label %19
19: ; preds = %13
%20 = and i64 %17, 8589934560
%21 = add nuw nsw i64 %20, %16
%22 = sub nsw i64 %15, %20
br label %23
23: ; preds = %23, %19
%24 = phi i64 [ 0, %19 ], [ %41, %23 ]
%25 = add i64 %24, %16
%26 = xor i64 %24, -1
%27 = add i64 %26, %15
%28 = getelementptr inbounds [51 x i8], [51 x i8]* %3, i64 0, i64 %27
%29 = getelementptr inbounds i8, i8* %28, i64 -15
%30 = bitcast i8* %29 to <16 x i8>*
%31 = load <16 x i8>, <16 x i8>* %30
%32 = shufflevector <16 x i8> %31, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
%33 = getelementptr inbounds i8, i8* %28, i64 -31
%34 = bitcast i8* %33 to <16 x i8>*
%35 = load <16 x i8>, <16 x i8>* %34
%36 = shufflevector <16 x i8> %35, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
%37 = getelementptr inbounds [101 x i8], [101 x i8]* %4, i64 0, i64 %25
%38 = bitcast i8* %37 to <16 x i8>*
store <16 x i8> %32, <16 x i8>* %38
%39 = getelementptr inbounds i8, i8* %37, i64 16
%40 = bitcast i8* %39 to <16 x i8>*
store <16 x i8> %36, <16 x i8>* %40
%41 = add nuw i64 %24, 32
%42 = icmp eq i64 %41, %20
br i1 %42, label %43, label %23
43: ; preds = %23
%44 = icmp eq i64 %17, %20
br i1 %44, label %65, label %45
45: ; preds = %13, %43
%46 = phi i64 [ %16, %13 ], [ %21, %43 ]
%47 = phi i64 [ %15, %13 ], [ %22, %43 ]
br label %56
48: ; preds = %2, %48
%49 = phi i64 [ %52, %48 ], [ 0, %2 ]
%50 = phi i8 [ %54, %48 ], [ %8, %2 ]
%51 = getelementptr inbounds [51 x i8], [51 x i8]* %3, i64 0, i64 %49
store i8 %50, i8* %51
%52 = add nuw nsw i64 %49, 1
%53 = getelementptr inbounds [101 x i8], [101 x i8]* %4, i64 0, i64 %52
%54 = load i8, i8* %53
%55 = icmp eq i8 %54, 0
br i1 %55, label %10, label %48
56: ; preds = %45, %56
%57 = phi i64 [ %63, %56 ], [ %46, %45 ]
%58 = phi i64 [ %59, %56 ], [ %47, %45 ]
%59 = add nsw i64 %58, -1
%60 = getelementptr inbounds [51 x i8], [51 x i8]* %3, i64 0, i64 %59
%61 = load i8, i8* %60
%62 = getelementptr inbounds [101 x i8], [101 x i8]* %4, i64 0, i64 %57
store i8 %61, i8* %62
%63 = add nuw nsw i64 %57, 1
%64 = icmp eq i64 %58, 0
br i1 %64, label %65, label %56
65: ; preds = %56, %43, %10
%66 = phi i64 [ %52, %10 ], [ %21, %43 ], [ %63, %56 ]
%67 = and i64 %66, 4294967295
%68 = getelementptr inbounds [101 x i8], [101 x i8]* %4, i64 0, i64 %67
store i8 0, i8* %68
%69 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret i32 0
}