#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 */
scalar_t__ palindrome(int);
int test_palindrome() {
  return palindrome(0x00000000) && palindrome(0xFFFFFFFF) &&
         palindrome(0xF000000F) && palindrome(0xFF0000FF) &&
         palindrome(0xFFF00FFF) && palindrome(0x0FFFFFF0) &&
         palindrome(0x00FFFF00) && palindrome(0x000FF000);
}


x86 assembly (clang, -O0):
<test_palindrome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <palindrome@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     11ed <test_palindrome+0xdd>
mov    $0xffffffff,%edi
call   1030 <palindrome@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     11ed <test_palindrome+0xdd>
mov    $0xf000000f,%edi
call   1030 <palindrome@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     11ed <test_palindrome+0xdd>
mov    $0xff0000ff,%edi
call   1030 <palindrome@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     11ed <test_palindrome+0xdd>
mov    $0xfff00fff,%edi
call   1030 <palindrome@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     11ed <test_palindrome+0xdd>
mov    $0xffffff0,%edi
call   1030 <palindrome@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     11ed <test_palindrome+0xdd>
mov    $0xffff00,%edi
call   1030 <palindrome@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     11ed <test_palindrome+0xdd>
mov    $0xff000,%edi
call   1030 <palindrome@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_palindrome>:
push   %rbx
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <palindrome@plt>
test   %rax,%rax
je     118b <test_palindrome+0x7b>
mov    $0xffffffff,%edi
call   1030 <palindrome@plt>
test   %rax,%rax
je     118b <test_palindrome+0x7b>
mov    $0xf000000f,%edi
call   1030 <palindrome@plt>
test   %rax,%rax
je     118b <test_palindrome+0x7b>
mov    $0xff0000ff,%edi
call   1030 <palindrome@plt>
test   %rax,%rax
je     118b <test_palindrome+0x7b>
mov    $0xfff00fff,%edi
call   1030 <palindrome@plt>
test   %rax,%rax
je     118b <test_palindrome+0x7b>
mov    $0xffffff0,%edi
call   1030 <palindrome@plt>
test   %rax,%rax
je     118b <test_palindrome+0x7b>
mov    $0xffff00,%edi
call   1030 <palindrome@plt>
test   %rax,%rax
je     118b <test_palindrome+0x7b>
mov    $0xff000,%edi
call   1030 <palindrome@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_palindrome() {
%1 = call i64 @palindrome(i32 0)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %24
3: ; preds = %0
%4 = call i64 @palindrome(i32 -1)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %24
6: ; preds = %3
%7 = call i64 @palindrome(i32 -268435441)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = call i64 @palindrome(i32 -16776961)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %24
12: ; preds = %9
%13 = call i64 @palindrome(i32 -1044481)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %24
15: ; preds = %12
%16 = call i64 @palindrome(i32 268435440)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = call i64 @palindrome(i32 16776960)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = call i64 @palindrome(i32 1044480)
%23 = icmp ne i64 %22, 0
br label %24
24: ; preds = %21, %18, %15, %12, %9, %6, %3, %0
%25 = phi i1 [ false, %18 ], [ false, %15 ], [ false, %12 ], [ false, %9 ], [ false, %6 ], [ false, %3 ], [ false, %0 ], [ %23, %21 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @test_palindrome() {
%1 = tail call i64 @palindrome(i32 0)
%2 = icmp eq i64 %1, 0
br i1 %2, label %25, label %3
3: ; preds = %0
%4 = tail call i64 @palindrome(i32 -1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %25, label %6
6: ; preds = %3
%7 = tail call i64 @palindrome(i32 -268435441)
%8 = icmp eq i64 %7, 0
br i1 %8, label %25, label %9
9: ; preds = %6
%10 = tail call i64 @palindrome(i32 -16776961)
%11 = icmp eq i64 %10, 0
br i1 %11, label %25, label %12
12: ; preds = %9
%13 = tail call i64 @palindrome(i32 -1044481)
%14 = icmp eq i64 %13, 0
br i1 %14, label %25, label %15
15: ; preds = %12
%16 = tail call i64 @palindrome(i32 268435440)
%17 = icmp eq i64 %16, 0
br i1 %17, label %25, label %18
18: ; preds = %15
%19 = tail call i64 @palindrome(i32 16776960)
%20 = icmp eq i64 %19, 0
br i1 %20, label %25, label %21
21: ; preds = %18
%22 = tail call i64 @palindrome(i32 1044480)
%23 = icmp ne i64 %22, 0
%24 = zext i1 %23 to i32
br label %25
25: ; preds = %21, %18, %15, %12, %9, %6, %3, %0
%26 = phi i32 [ 0, %18 ], [ 0, %15 ], [ 0, %12 ], [ 0, %9 ], [ 0, %6 ], [ 0, %3 ], [ 0, %0 ], [ %24, %21 ]
ret i32 %26
}