#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 stringa[100];
  int contatore = 0, i, quanti = 0;
  scanf("%s", stringa);
  contatore = strlen(stringa) - 1;
  for (i = 0; i < contatore / 2; i++)
    if (stringa[i] == stringa[contatore - i])
      quanti++;
  if (quanti == contatore / 2)
    printf("Palindromo");
  else
    printf("Non Palindromo");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x7c(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x74(%rbp)
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x74(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x80(%rbp),%eax
cmp    %ecx,%eax
jge    11cf <main+0x9f>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
mov    -0x74(%rbp),%ecx
sub    -0x78(%rbp),%ecx
movslq %ecx,%rcx
movsbl -0x70(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    11bc <main+0x8c>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    11c1 <main+0x91>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1176 <main+0x46>
mov    -0x7c(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x74(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x84(%rbp),%eax
cmp    %ecx,%eax
jne    1204 <main+0xd4>
lea    0xe0d(%rip),%rdi
call   1040 <printf@plt>
jmp    1210 <main+0xe0>
lea    0xdf8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xed4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    -0x1(%rax),%edx
mov    %edx,%ecx
shr    $0x1f,%ecx
lea    (%rax,%rcx,1),%r9d
add    $0xffffffff,%r9d
sar    %r9d
xor    %ecx,%ecx
cmp    $0x3,%eax
jl     127b <main+0x14b>
mov    %edx,%r8d
cmp    $0x2,%r9d
mov    $0x1,%esi
cmovge %r9d,%esi
cmp    $0x8,%esi
jae    118b <main+0x5b>
xor    %edx,%edx
xor    %ecx,%ecx
jmp    124e <main+0x11e>
mov    %esi,%edx
and    $0x7ffffff8,%edx
lea    0x4(%rsp),%rdi
add    %r8,%rbx
add    $0xfffffffffffffffd,%rbx
mov    %esi,%eax
and    $0xfffffff8,%eax
neg    %rax
pxor   %xmm0,%xmm0
xor    %ecx,%ecx
movdqa 0xe4b(%rip),%xmm2
pxor   %xmm1,%xmm1
nopl   0x0(%rax)
movq   -0x4(%rdi),%xmm3
punpcklbw %xmm3,%xmm3
punpcklwd %xmm3,%xmm3
movd   (%rdi),%xmm4
punpcklbw %xmm4,%xmm4
punpcklwd %xmm4,%xmm4
movd   (%rbx,%rcx,1),%xmm5
punpcklbw %xmm5,%xmm5
movd   -0x4(%rbx,%rcx,1),%xmm6
punpcklbw %xmm6,%xmm6
pshufd $0xc4,%xmm5,%xmm5
pshuflw $0xe7,%xmm5,%xmm5
pshufhw $0xc5,%xmm5,%xmm5
pcmpeqb %xmm3,%xmm5
pand   %xmm2,%xmm5
paddd  %xmm5,%xmm0
pshufd $0xc4,%xmm6,%xmm3
pshuflw $0xe7,%xmm3,%xmm3
pshufhw $0xc5,%xmm3,%xmm3
pcmpeqb %xmm4,%xmm3
pand   %xmm2,%xmm3
paddd  %xmm3,%xmm1
add    $0x8,%rdi
add    $0xfffffffffffffff8,%rcx
cmp    %rcx,%rax
jne    11c0 <main+0x90>
paddd  %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%ecx
cmp    %rsi,%rdx
je     127b <main+0x14b>
sub    %rdx,%r8
lea    (%rsp,%r8,1),%rax
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsp,%rdx,1),%ebx
xor    %edi,%edi
cmp    (%rax),%bl
sete   %dil
add    %edi,%ecx
add    $0x1,%rdx
add    $0xffffffffffffffff,%rax
cmp    %rdx,%rsi
jne    1260 <main+0x130>
cmp    %r9d,%ecx
lea    0xd92(%rip),%rax
lea    0xd87(%rip),%rdi
cmove  %rax,%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 = [11 x i8] c"Palindromo\00"
@.str.2 = [15 x i8] c"Non Palindromo\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 0, i32* %3
store i32 0, 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)
%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* %4
br label %11
11: ; preds = %34, %0
%12 = load i32, i32* %4
%13 = load i32, i32* %3
%14 = sdiv i32 %13, 2
%15 = icmp slt i32 %12, %14
br i1 %15, label %16, label %37
16: ; preds = %11
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = sub nsw i32 %22, %23
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %21, %28
br i1 %29, label %30, label %33
30: ; preds = %16
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
br label %33
33: ; preds = %30, %16
br label %34
34: ; preds = %33
%35 = load i32, i32* %4
%36 = add nsw i32 %35, 1
store i32 %36, i32* %4
br label %11
37: ; preds = %11
%38 = load i32, i32* %5
%39 = load i32, i32* %3
%40 = sdiv i32 %39, 2
%41 = icmp eq i32 %38, %40
br i1 %41, label %42, label %44
42: ; preds = %37
%43 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %46
44: ; preds = %37
%45 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %46
46: ; preds = %44, %42
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [11 x i8] c"Palindromo\00"
@.str.2 = [15 x i8] c"Non Palindromo\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 = add nsw i32 %4, -1
%6 = sdiv i32 %5, 2
%7 = icmp sgt i32 %4, 2
br i1 %7, label %8, label %63
8: ; preds = %0
%9 = zext i32 %5 to i64
%10 = call i32 @llvm.smax.i32(i32 %6, i32 1)
%11 = zext i32 %10 to i64
%12 = icmp ult i32 %10, 8
br i1 %12, label %47, label %13
13: ; preds = %8
%14 = and i64 %11, 2147483640
br label %15
15: ; preds = %15, %13
%16 = phi i64 [ 0, %13 ], [ %41, %15 ]
%17 = phi <4 x i32> [ zeroinitializer, %13 ], [ %39, %15 ]
%18 = phi <4 x i32> [ zeroinitializer, %13 ], [ %40, %15 ]
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %16
%20 = bitcast i8* %19 to <4 x i8>*
%21 = load <4 x i8>, <4 x i8>* %20
%22 = getelementptr inbounds i8, i8* %19, i64 4
%23 = bitcast i8* %22 to <4 x i8>*
%24 = load <4 x i8>, <4 x i8>* %23
%25 = sub nsw i64 %9, %16
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %25
%27 = getelementptr inbounds i8, i8* %26, i64 -3
%28 = bitcast i8* %27 to <4 x i8>*
%29 = load <4 x i8>, <4 x i8>* %28
%30 = shufflevector <4 x i8> %29, <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%31 = getelementptr inbounds i8, i8* %26, i64 -7
%32 = bitcast i8* %31 to <4 x i8>*
%33 = load <4 x i8>, <4 x i8>* %32
%34 = shufflevector <4 x i8> %33, <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%35 = icmp eq <4 x i8> %21, %30
%36 = icmp eq <4 x i8> %24, %34
%37 = zext <4 x i1> %35 to <4 x i32>
%38 = zext <4 x i1> %36 to <4 x i32>
%39 = add <4 x i32> %17, %37
%40 = add <4 x i32> %18, %38
%41 = add nuw i64 %16, 8
%42 = icmp eq i64 %41, %14
br i1 %42, label %43, label %15
43: ; preds = %15
%44 = add <4 x i32> %40, %39
%45 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %44)
%46 = icmp eq i64 %14, %11
br i1 %46, label %63, label %47
47: ; preds = %8, %43
%48 = phi i64 [ 0, %8 ], [ %14, %43 ]
%49 = phi i32 [ 0, %8 ], [ %45, %43 ]
br label %50
50: ; preds = %47, %50
%51 = phi i64 [ %61, %50 ], [ %48, %47 ]
%52 = phi i32 [ %60, %50 ], [ %49, %47 ]
%53 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %51
%54 = load i8, i8* %53
%55 = sub nsw i64 %9, %51
%56 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %55
%57 = load i8, i8* %56
%58 = icmp eq i8 %54, %57
%59 = zext i1 %58 to i32
%60 = add nuw nsw i32 %52, %59
%61 = add nuw nsw i64 %51, 1
%62 = icmp eq i64 %61, %11
br i1 %62, label %63, label %50
63: ; preds = %50, %43, %0
%64 = phi i32 [ 0, %0 ], [ %45, %43 ], [ %60, %50 ]
%65 = icmp eq i32 %64, %6
%66 = select i1 %65, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0)
%67 = call i32 @printf(i8* dereferenceable(1) %66)
ret i32 0
}