#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*/ printf(char *);
int strlen(char *);
int main() {
  char i[100];
  char s[100];
  int j, len, mid, next, top;
  gets(i);
  len = strlen(i);
  if (len == 0) {
    printf("FALSE\n");
    return -1;
  }
  top = 0;
  mid = len / 2 - 1;
  for (j = 0; j <= mid; j++)
    s[top++] = i[j];
  if (len % 2 == 0)
    next = mid + 1;
  else
    next = mid + 2;
  for (j = next; j < len; j++) {
    if (s[--top] != i[j]) {
      printf("FALSE\n");
      return 0;
    }
  }
  printf("TRUE\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xe8(%rbp)
cmpl   $0x0,-0xe8(%rbp)
jne    117f <main+0x4f>
lea    0xe92(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    12be <main+0x18e>
movl   $0x0,-0xf4(%rbp)
mov    -0xe8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0xec(%rbp)
movl   $0x0,-0xe4(%rbp)
mov    -0xe4(%rbp),%eax
cmp    -0xec(%rbp),%eax
jg     11f5 <main+0xc5>
movslq -0xe4(%rbp),%rax
mov    -0x70(%rbp,%rax,1),%cl
mov    -0xf4(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0xf4(%rbp)
cltq
mov    %cl,-0xe0(%rbp,%rax,1)
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    11aa <main+0x7a>
mov    -0xe8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1220 <main+0xf0>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    122f <main+0xff>
mov    -0xec(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xf0(%rbp)
mov    -0xf0(%rbp),%eax
mov    %eax,-0xe4(%rbp)
mov    -0xe4(%rbp),%eax
cmp    -0xe8(%rbp),%eax
jge    12ab <main+0x17b>
mov    -0xf4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xf4(%rbp)
cltq
movsbl -0xe0(%rbp,%rax,1),%eax
ff
movslq -0xe4(%rbp),%rcx
movsbl -0x70(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
je     1292 <main+0x162>
lea    0xd7f(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12be <main+0x18e>
jmp    1297 <main+0x167>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    123b <main+0x10b>
lea    0xd55(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xe0,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <gets@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xe9c(%rip),%r15
test   %eax,%eax
je     119d <main+0x5d>
mov    %eax,%ebp
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
xor    %r14d,%r14d
cmp    $0x2,%eax
jl     11a5 <main+0x65>
lea    -0x1(%rbx),%r12d
add    $0x1,%r12
lea    0x70(%rsp),%rdi
mov    %rsp,%rsi
mov    %r12,%rdx
call   1050 <memcpy@plt>
movslq %r12d,%rsi
jmp    11a7 <main+0x67>
mov    $0xffffffff,%r14d
jmp    11e8 <main+0xa8>
xor    %esi,%esi
mov    %ebp,%eax
and    $0x1,%eax
add    %eax,%ebx
lea    0xe4b(%rip),%rax
cmp    %ebp,%ebx
jge    11e5 <main+0xa5>
movslq %ebx,%rcx
movslq %ebp,%rdx
lea    0x70(%rsp),%rdi
add    %rdi,%rsi
add    $0xffffffffffffffff,%rsi
nopl   0x0(%rax,%rax,1)
movzbl (%rsi),%ebx
cmp    (%rsp,%rcx,1),%bl
jne    11e8 <main+0xa8>
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
cmp    %rdx,%rcx
jl     11d0 <main+0x90>
mov    %rax,%r15
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r14d,%eax
add    $0xe0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"FALSE\0A\00"
@.str.1 = [6 x i8] c"TRUE\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%10 = call i32 @gets(i8* %9)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%12 = call i32 @strlen(i8* %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %1
br label %74
17: ; preds = %0
store i32 0, i32* %8
%18 = load i32, i32* %5
%19 = sdiv i32 %18, 2
%20 = sub nsw i32 %19, 1
store i32 %20, i32* %6
store i32 0, i32* %4
br label %21
21: ; preds = %34, %17
%22 = load i32, i32* %4
%23 = load i32, i32* %6
%24 = icmp sle i32 %22, %23
br i1 %24, label %25, label %37
25: ; preds = %21
%26 = load i32, i32* %4
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %27
%29 = load i8, i8* %28
%30 = load i32, i32* %8
%31 = add nsw i32 %30, 1
store i32 %31, i32* %8
%32 = sext i32 %30 to i64
%33 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %32
store i8 %29, i8* %33
br label %34
34: ; preds = %25
%35 = load i32, i32* %4
%36 = add nsw i32 %35, 1
store i32 %36, i32* %4
br label %21
37: ; preds = %21
%38 = load i32, i32* %5
%39 = srem i32 %38, 2
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %37
%42 = load i32, i32* %6
%43 = add nsw i32 %42, 1
store i32 %43, i32* %7
br label %47
44: ; preds = %37
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 2
store i32 %46, i32* %7
br label %47
47: ; preds = %44, %41
%48 = load i32, i32* %7
store i32 %48, i32* %4
br label %49
49: ; preds = %69, %47
%50 = load i32, i32* %4
%51 = load i32, i32* %5
%52 = icmp slt i32 %50, %51
br i1 %52, label %53, label %72
53: ; preds = %49
%54 = load i32, i32* %8
%55 = add nsw i32 %54, -1
store i32 %55, i32* %8
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %56
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = load i32, i32* %4
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %61
%63 = load i8, i8* %62
%64 = sext i8 %63 to i32
%65 = icmp ne i32 %59, %64
br i1 %65, label %66, label %68
66: ; preds = %53
%67 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %74
68: ; preds = %53
br label %69
69: ; preds = %68
%70 = load i32, i32* %4
%71 = add nsw i32 %70, 1
store i32 %71, i32* %4
br label %49
72: ; preds = %49
%73 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %74
74: ; preds = %72, %66, %15
%75 = load i32, i32* %1
ret i32 %75
}

LLVM IR (-O2):
@str = [5 x i8] c"TRUE\00"
@str.3 = [6 x i8] c"FALSE\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = call i32 @gets(i8* %5)
%8 = call i32 @strlen(i8* %5)
%9 = icmp eq i32 %8, 0
br i1 %9, label %39, label %10
10: ; preds = %0
%11 = sdiv i32 %8, 2
%12 = icmp sgt i32 %8, 1
br i1 %12, label %13, label %19
13: ; preds = %10
%14 = add nsw i32 %11, -1
%15 = zext i32 %14 to i64
%16 = add nuw nsw i64 %15, 1
%17 = shl i64 %16, 32
%18 = ashr exact i64 %17, 32
br label %19
19: ; preds = %13, %10
%20 = phi i64 [ 0, %10 ], [ %18, %13 ]
%21 = and i32 %8, 1
%22 = add nsw i32 %11, %21
%23 = icmp slt i32 %22, %8
br i1 %23, label %24, label %39
24: ; preds = %19
%25 = sext i32 %22 to i64
%26 = sext i32 %8 to i64
br label %29
27: ; preds = %29
%28 = icmp slt i64 %38, %26
br i1 %28, label %29, label %39
29: ; preds = %24, %27
%30 = phi i64 [ %25, %24 ], [ %38, %27 ]
%31 = phi i64 [ %20, %24 ], [ %32, %27 ]
%32 = add nsw i64 %31, -1
%33 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %32
%34 = load i8, i8* %33
%35 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %30
%36 = load i8, i8* %35
%37 = icmp eq i8 %34, %36
%38 = add nsw i64 %30, 1
br i1 %37, label %27, label %39
39: ; preds = %27, %29, %19, %0
%40 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.3, i64 0, i64 0), %0 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0), %19 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.3, i64 0, i64 0), %29 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0), %27 ]
%41 = phi i32 [ -1, %0 ], [ 0, %19 ], [ 0, %29 ], [ 0, %27 ]
%42 = call i32 @puts(i8* dereferenceable(1) %40)
ret i32 %41
}