#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 *);
int strlen(char *);
int main() {
  char niz[100];
  int i1, i2, n = 1;
  scanf("%s", niz);
  i1 = 0;
  i2 = strlen(niz) - 1;
  while (i2 > i1) {
    if (niz[i1] == niz[i2]) {
      i1++;
      i2--;
    } else {
      n = 0;
      printf("0");
      break;
    }
  }
  if (n != 0) {
    printf("1");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x7c(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1050 <scanf@plt>
movl   $0x0,-0x74(%rbp)
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jle    11c9 <main+0x99>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
movslq -0x78(%rbp),%rcx
movsbl -0x70(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    11ac <main+0x7c>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x78(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x78(%rbp)
jmp    11c4 <main+0x94>
movl   $0x0,-0x7c(%rbp)
lea    0xe49(%rip),%rdi
call   1040 <printf@plt>
jmp    11c9 <main+0x99>
jmp    116f <main+0x3f>
cmpl   $0x0,-0x7c(%rbp)
je     11df <main+0xaf>
lea    0xe2b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%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   1040 <strlen@plt>
mov    $0x31,%edi
cmp    $0x2,%eax
jl     1196 <main+0x66>
movabs $0x100000000,%r8
mov    %eax,%eax
add    $0xffffffffffffffff,%rax
mov    %r8,%rdx
nopl   0x0(%rax)
movzbl (%rbx),%ecx
cmp    (%rsp,%rax,1),%cl
jne    1191 <main+0x61>
add    $0xffffffffffffffff,%rax
mov    %rdx,%rsi
sar    $0x20,%rsi
add    $0x1,%rbx
add    %r8,%rdx
cmp    %rsi,%rax
jg     1170 <main+0x40>
jmp    1196 <main+0x66>
mov    $0x30,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [2 x i8] c"0\00"
@.str.2 = [2 x i8] c"1\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
store i32 1, i32* %5
%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
%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* %4
br label %11
11: ; preds = %34, %0
%12 = load i32, i32* %4
%13 = load i32, i32* %3
%14 = icmp sgt i32 %12, %13
br i1 %14, label %15, label %35
15: ; preds = %11
%16 = load i32, i32* %3
%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* %4
%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 eq i32 %20, %25
br i1 %26, label %27, label %32
27: ; preds = %15
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
%30 = load i32, i32* %4
%31 = add nsw i32 %30, -1
store i32 %31, i32* %4
br label %34
32: ; preds = %15
store i32 0, i32* %5
%33 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %35
34: ; preds = %27
br label %11
35: ; preds = %32, %11
%36 = load i32, i32* %5
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %40
40: ; preds = %38, %35
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\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 %23
6: ; preds = %0
%7 = zext i32 %4 to i64
%8 = add nsw i64 %7, -1
br label %14
9: ; preds = %14
%10 = add nsw i64 %16, -1
%11 = shl i64 %22, 32
%12 = ashr exact i64 %11, 32
%13 = icmp sgt i64 %10, %12
br i1 %13, label %14, label %23
14: ; preds = %6, %9
%15 = phi i64 [ 0, %6 ], [ %22, %9 ]
%16 = phi i64 [ %8, %6 ], [ %10, %9 ]
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %15
%18 = load i8, i8* %17
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %16
%20 = load i8, i8* %19
%21 = icmp eq i8 %18, %20
%22 = add nuw i64 %15, 1
br i1 %21, label %9, label %23
23: ; preds = %9, %14, %0
%24 = phi i32 [ 49, %0 ], [ 48, %14 ], [ 49, %9 ]
%25 = call i32 @putchar(i32 %24)
ret i32 0
}