#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);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
int main() {
  char s[100];
  scanf("%s", s);
  int l = 0, result = 0;
  l = strlen(s) - 1;
  for (int i = 0; i < l; i++, l--) {
    if (s[i] != s[l]) {
      result = 1;
      break;
    }
  }
  printf("%d", result);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1050 <scanf@plt>
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x78(%rbp)
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x74(%rbp)
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    11c4 <main+0x94>
movslq -0x7c(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
movslq -0x74(%rbp),%rcx
movsbl -0x70(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
je     11a8 <main+0x78>
movl   $0x1,-0x78(%rbp)
jmp    11c4 <main+0x94>
jmp    11ad <main+0x7d>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x74(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x74(%rbp)
jmp    1176 <main+0x46>
mov    -0x78(%rbp),%esi
lea    0xe35(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xec4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
xor    %esi,%esi
cmp    $0x2,%eax
jl     1183 <main+0x53>
mov    %eax,%eax
add    $0xfffffffffffffffe,%rax
xor    %ecx,%ecx
xchg   %ax,%ax
movzbl (%rsp,%rcx,1),%edx
cmp    0x1(%rsp,%rax,1),%dl
jne    117e <main+0x4e>
add    $0x1,%rcx
lea    -0x1(%rax),%rdx
cmp    %rax,%rcx
mov    %rdx,%rax
jl     1160 <main+0x30>
xor    %esi,%esi
jmp    1183 <main+0x53>
mov    $0x1,%esi
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), 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 [100 x i8], [100 x i8]* %1, i64 0, i64 %13
%16 = load i8, i8* %15
%17 = getelementptr inbounds [100 x i8], [100 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 i32 [ 0, %0 ], [ 1, %12 ], [ 0, %9 ]
%23 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %22)
ret i32 0
}