#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 check_palindrome(char s[], int x, int y, char *z) {
  if (x == y / 2)
    printf("Yes");
  if (*s == *(z + x - 1))
    check_palindrome(s + 1, x - 1, y, z);
  else
    printf("No");
}


x86 assembly (clang, -O0):
<check_palindrome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
cmp    %ecx,%eax
jne    1160 <check_palindrome+0x40>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movsbl -0x1(%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    119b <check_palindrome+0x7b>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1040 <check_palindrome@plt>
jmp    11a7 <check_palindrome+0x87>
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_palindrome>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rcx,%r14
mov    %rdi,%r12
mov    %edx,%eax
shr    $0x1f,%eax
add    %edx,%eax
sar    %eax
movslq %esi,%rbx
movslq %eax,%r13
lea    0xecb(%rip),%r15
cmp    %rbx,%r13
jne    1148 <check_palindrome+0x38>
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1030 <printf@plt>
movzbl (%r12),%eax
cmp    -0x1(%r14,%rbx,1),%al
jne    1163 <check_palindrome+0x53>
add    $0x1,%r12
add    $0xffffffffffffffff,%rbx
cmp    %rbx,%r13
je     1140 <check_palindrome+0x30>
jmp    1148 <check_palindrome+0x38>
lea    0xe9a(%rip),%rdi
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <printf@plt>

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

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