#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");
  else {
    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    1165 <check_palindrome+0x45>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    11b1 <check_palindrome+0x91>
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    11a0 <check_palindrome+0x80>
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    11ac <check_palindrome+0x8c>
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
jmp    11b1 <check_palindrome+0x91>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_palindrome>:
mov    %rdi,%r9
mov    %edx,%eax
shr    $0x1f,%eax
add    %edx,%eax
sar    %eax
lea    0xedd(%rip),%rdi
cmp    %esi,%eax
je     1155 <check_palindrome+0x45>
movslq %esi,%rdx
add    %rdx,%rcx
add    $0xffffffffffffffff,%rcx
sub    %eax,%esi
xor    %edx,%edx
lea    0xec8(%rip),%r8
nopl   0x0(%rax)
movzbl (%r9,%rdx,1),%eax
cmp    (%rcx),%al
jne    115a <check_palindrome+0x4a>
add    $0xffffffffffffffff,%rcx
add    $0x1,%rdx
cmp    %edx,%esi
jne    1140 <check_palindrome+0x30>
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 @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 %37
15: ; preds = %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
br label %37
37: ; preds = %36, %13
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 = icmp eq i32 %5, %1
br i1 %6, label %22, label %7
7: ; preds = %4
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i8, i8* %3, i64 -1
br label %10
10: ; preds = %7, %17
%11 = phi i64 [ %8, %7 ], [ %19, %17 ]
%12 = phi i8* [ %0, %7 ], [ %18, %17 ]
%13 = load i8, i8* %12
%14 = getelementptr inbounds i8, i8* %9, i64 %11
%15 = load i8, i8* %14
%16 = icmp eq i8 %13, %15
br i1 %16, label %17, label %22
17: ; preds = %10
%18 = getelementptr inbounds i8, i8* %12, i64 1
%19 = add nsw i64 %11, -1
%20 = trunc i64 %19 to i32
%21 = icmp eq i32 %5, %20
br i1 %21, label %22, label %10
22: ; preds = %10, %17, %4
%23 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %4 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %17 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %10 ]
%24 = tail call i32 @printf(i8* dereferenceable(1) %23)
ret void
}