#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*/ gets(char *);
int /*<<< orphan*/ puts(char *);
int strlen(char *);
int main() {
  char str[80];
  int i, len, flag = 0;
  int left, right;
  gets(str);
  len = strlen(str);
  left = 0;
  right = len - 1;
  while (left < right) {
    if (str[left] != str[right]) {
      puts("NO");
      return 0;
    }
    left++;
    right--;
  }
  puts("YES");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x6c(%rbp)
lea    -0x60(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x60(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x68(%rbp)
movl   $0x0,-0x70(%rbp)
mov    -0x68(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    11c3 <main+0x93>
movslq -0x70(%rbp),%rax
movsbl -0x60(%rbp,%rax,1),%eax
movslq -0x74(%rbp),%rcx
movsbl -0x60(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
je     11ac <main+0x7c>
lea    0xe65(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    11d6 <main+0xa6>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
mov    -0x74(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x74(%rbp)
jmp    116e <main+0x3e>
lea    0xe39(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xeb4(%rip),%rdi
cmp    $0x2,%eax
jl     118f <main+0x5f>
mov    %eax,%eax
add    $0xfffffffffffffffe,%rax
xor    %ecx,%ecx
lea    0xe9d(%rip),%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rsp,%rcx,1),%ebx
cmp    0x1(%rsp,%rax,1),%bl
jne    118c <main+0x5c>
add    $0x1,%rcx
lea    -0x1(%rax),%rsi
cmp    %rax,%rcx
mov    %rsi,%rax
jl     1170 <main+0x40>
jmp    118f <main+0x5f>
mov    %rdx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"NO\00"
@.str.1 = [4 x i8] c"YES\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%9 = call i32 @gets(i8* %8)
%10 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%11 = call i32 @strlen(i8* %10)
store i32 %11, i32* %4
store i32 0, i32* %6
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %7
br label %14
14: ; preds = %32, %0
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %37
18: ; preds = %14
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp ne i32 %23, %28
br i1 %29, label %30, label %32
30: ; preds = %18
%31 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %39
32: ; preds = %18
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 1
store i32 %34, i32* %6
%35 = load i32, i32* %7
%36 = add nsw i32 %35, -1
store i32 %36, i32* %7
br label %14
37: ; preds = %14
%38 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %39
39: ; preds = %37, %30
%40 = load i32, i32* %1
ret i32 %40
}

LLVM IR (-O2):
@.str = [3 x i8] c"NO\00"
@.str.1 = [4 x i8] c"YES\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = call i32 @strlen(i8* %2)
%5 = icmp sgt i32 %4, 1
br i1 %5, label %6, label %21
6: ; preds = %0
%7 = zext i32 %4 to i64
%8 = add nsw i64 %7, -1
br label %12
9: ; preds = %12
%10 = add nsw i64 %14, -1
%11 = icmp slt i64 %20, %10
br i1 %11, label %12, label %21
12: ; preds = %6, %9
%13 = phi i64 [ 0, %6 ], [ %20, %9 ]
%14 = phi i64 [ %8, %6 ], [ %10, %9 ]
%15 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 %13
%16 = load i8, i8* %15
%17 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 %14
%18 = load i8, i8* %17
%19 = icmp eq i8 %16, %18
%20 = add nuw nsw i64 %13, 1
br i1 %19, label %9, label %21
21: ; preds = %9, %12, %0
%22 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %12 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %9 ]
%23 = call i32 @puts(i8* dereferenceable(1) %22)
ret i32 0
}