#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 *);
void palindrome(char *s, int l) {
  int count = 0;
  for (int i = 0; i < ((l) / 2); i++) {
    if (*(s + i) != *(s + l - i)) {
      count = 1;
      break;
    }
  }
  if (count == 0)
    printf("Yes");
  else
    printf("No");
}


x86 assembly (clang, -O0):
<palindrome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    1196 <palindrome+0x86>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
add    %rdx,%rcx
movslq -0x14(%rbp),%rsi
xor    %edx,%edx
sub    %rsi,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1183 <palindrome+0x73>
movl   $0x1,-0x10(%rbp)
jmp    1196 <palindrome+0x86>
jmp    1188 <palindrome+0x78>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <palindrome+0x1d>
cmpl   $0x0,-0x10(%rbp)
jne    11b1 <palindrome+0xa1>
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
jmp    11bd <palindrome+0xad>
lea    0xe4c(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<palindrome>:
mov    %rdi,%r9
lea    0xee6(%rip),%rdi
cmp    $0x2,%esi
jl     1146 <palindrome+0x36>
mov    %esi,%ecx
shr    %esi
add    %r9,%rcx
xor    %edx,%edx
lea    0xed5(%rip),%r8
nop
movzbl (%r9,%rdx,1),%eax
cmp    (%rcx),%al
jne    114b <palindrome+0x3b>
add    $0x1,%rdx
add    $0xffffffffffffffff,%rcx
cmp    %rdx,%rsi
jne    1130 <palindrome+0x20>
jmp    1030 <printf@plt>
mov    %r8,%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"Yes\00"
@.str.1 = [3 x i8] c"No\00"
define void @palindrome(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %20
4: ; preds = %2
%5 = lshr i32 %1, 1
%6 = zext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = zext i32 %5 to i64
br label %11
9: ; preds = %11
%10 = icmp eq i64 %19, %8
br i1 %10, label %20, label %11
11: ; preds = %4, %9
%12 = phi i64 [ 0, %4 ], [ %19, %9 ]
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = sub nsw i64 0, %12
%16 = getelementptr inbounds i8, i8* %7, i64 %15
%17 = load i8, i8* %16
%18 = icmp eq i8 %14, %17
%19 = add nuw nsw i64 %12, 1
br i1 %18, label %9, label %20
20: ; preds = %11, %9, %2
%21 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %2 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %9 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %11 ]
%22 = tail call i32 @printf(i8* dereferenceable(1) %21)
ret void
}