#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 Duma[100];
  int l, c;
  printf("Vuvedete duma:\n");
  scanf("%s", Duma);
  l = strlen(Duma);
  int f = 1;
  for (c = 0; c < l / 2 && f; c++) {
    if (Duma[c] != Duma[l - c - 1]) {
      f = 0;
      break;
    }
  }
  if (f) {
    printf(" 1 \n");
  } else {
    printf(" 0 \n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xeb7(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x74(%rbp)
movl   $0x1,-0x7c(%rbp)
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%ecx
mov    -0x74(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x7d(%rbp)
jge    119f <main+0x6f>
cmpl   $0x0,-0x7c(%rbp)
setne  %al
mov    %al,-0x7d(%rbp)
mov    -0x7d(%rbp),%al
test   $0x1,%al
jne    11af <main+0x7f>
jmp    11f0 <main+0xc0>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
mov    -0x74(%rbp),%ecx
sub    -0x78(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl -0x70(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
je     11dd <main+0xad>
movl   $0x0,-0x7c(%rbp)
jmp    11f0 <main+0xc0>
jmp    11e2 <main+0xb2>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1178 <main+0x48>
cmpl   $0x0,-0x7c(%rbp)
je     120b <main+0xdb>
lea    0xe12(%rip),%rdi
call   1040 <printf@plt>
jmp    1217 <main+0xe7>
lea    0xe06(%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    0xec7(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xeb4(%rip),%rdi
cmp    $0x2,%eax
jl     119d <main+0x6d>
mov    %eax,%ecx
shr    %ecx
add    $0xffffffff,%eax
xor    %edx,%edx
lea    0xe9b(%rip),%r8
nopw   0x0(%rax,%rax,1)
movzbl (%rsp,%rdx,1),%ebx
movslq %eax,%rsi
cmp    (%rsp,%rsi,1),%bl
jne    119a <main+0x6a>
add    $0x1,%rdx
add    $0xffffffff,%eax
cmp    %rdx,%rcx
jne    1180 <main+0x50>
jmp    119d <main+0x6d>
mov    %r8,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Vuvedete duma:\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [5 x i8] c" 1 \0A\00"
@.str.3 = [5 x i8] c" 0 \0A\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 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%10 = call i32 @strlen(i8* %9)
store i32 %10, i32* %3
store i32 1, i32* %5
store i32 0, i32* %4
br label %11
11: ; preds = %38, %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 %19
16: ; preds = %11
%17 = load i32, i32* %5
%18 = icmp ne i32 %17, 0
br label %19
19: ; preds = %16, %11
%20 = phi i1 [ false, %11 ], [ %18, %16 ]
br i1 %20, label %21, label %41
21: ; preds = %19
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = sub nsw i32 %27, %28
%30 = sub nsw i32 %29, 1
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp ne i32 %26, %34
br i1 %35, label %36, label %37
36: ; preds = %21
store i32 0, i32* %5
br label %41
37: ; preds = %21
br label %38
38: ; preds = %37
%39 = load i32, i32* %4
%40 = add nsw i32 %39, 1
store i32 %40, i32* %4
br label %11
41: ; preds = %36, %19
%42 = load i32, i32* %5
%43 = icmp ne i32 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %48
46: ; preds = %41
%47 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %48
48: ; preds = %46, %44
%49 = load i32, i32* %1
ret i32 %49
}

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