#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__ is_palindrome_number(int);
scalar_t__ is_palindrome_string(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  char pale[] = "madam";
  int num = 13431;
  if (is_palindrome_number(num)) {
    printf("%d is Palindrome\n", num);
  } else {
    printf("%d is Not Palindrome\n", num);
  }
  if (is_palindrome_string(pale)) {
    printf("%s is Palindrome\n", pale);
  } else {
    printf("%s is Not Palindrome\n", pale);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeb4(%rip),%eax
mov    %eax,-0x16(%rbp)
mov    0xeae(%rip),%ax
mov    %ax,-0x12(%rbp)
movl   $0x3477,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <is_palindrome_number@plt>
cmp    $0x0,%rax
je     1189 <main+0x59>
mov    -0x1c(%rbp),%esi
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119a <main+0x6a>
mov    -0x1c(%rbp),%esi
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x16(%rbp),%rdi
call   1050 <is_palindrome_string@plt>
cmp    $0x0,%rax
je     11c4 <main+0x94>
lea    -0x16(%rbp),%rsi
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d6 <main+0xa6>
lea    -0x16(%rbp),%rsi
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movw   $0x6d,0xc(%rsp)
movl   $0x6164616d,0x8(%rsp)
61
mov    $0x3477,%edi
call   1040 <is_palindrome_number@plt>
test   %rax,%rax
lea    0xec0(%rip),%rax
lea    0xea7(%rip),%rdi
cmove  %rax,%rdi
mov    $0x3477,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <is_palindrome_string@plt>
test   %rax,%rax
lea    0xeba(%rip),%rax
lea    0xea1(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.pale = [6 x i8] c"madam\00"
@.str = [18 x i8] c"%d is Palindrome\0A\00"
@.str.1 = [22 x i8] c"%d is Not Palindrome\0A\00"
@.str.2 = [18 x i8] c"%s is Palindrome\0A\00"
@.str.3 = [22 x i8] c"%s is Not Palindrome\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x i8]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [6 x i8]* %6 to i8*
store i32 13431, i32* %7
%9 = load i32, i32* %7
%10 = call i64 @is_palindrome_number(i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %7
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %18
15: ; preds = %2
%16 = load i32, i32* %7
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15, %12
%19 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%20 = call i64 @is_palindrome_string(i8* %19)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %18
%23 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %23)
br label %28
25: ; preds = %18
%26 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* %26)
br label %28
28: ; preds = %25, %22
ret i32 0
}

LLVM IR (-O2):
@__const.main.pale = [6 x i8] c"madam\00"
@.str = [18 x i8] c"%d is Palindrome\0A\00"
@.str.1 = [22 x i8] c"%d is Not Palindrome\0A\00"
@.str.2 = [18 x i8] c"%s is Palindrome\0A\00"
@.str.3 = [22 x i8] c"%s is Not Palindrome\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i8]
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%5 = tail call i64 @is_palindrome_number(i32 13431)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %7, i32 13431)
%9 = call i64 @is_palindrome_string(i8* %4)
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %11, i8* %4)
ret i32 0
}