#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 print_res(int res1, int res2, char *input) {
  printf("\nIs '%s' a Palindrome?\n", input);
  if (res1 == 0)
    printf("\nIterativ function says Yes!\n");
  else
    printf("\nIterativ function says No!\n");
  if (res2 == 0)
    printf("Rekursiv function says Yes!\n\n");
  else
    printf("Rekursiv function says No!\n\n");
}


x86 assembly (clang, -O0):
<print_res>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1151 <print_res+0x41>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    115f <print_res+0x4f>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    117c <print_res+0x6c>
lea    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118a <print_res+0x7a>
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_res>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
lea    0xf2c(%rip),%rax
lea    0xed0(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
test   %ebx,%ebx
lea    0xef6(%rip),%rax
lea    0xed3(%rip),%rdi
cmove  %rax,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"\0AIs '%s' a Palindrome?\0A\00"
@.str.1 = [30 x i8] c"\0AIterativ function says Yes!\0A\00"
@.str.2 = [29 x i8] c"\0AIterativ function says No!\0A\00"
@.str.3 = [30 x i8] c"Rekursiv function says Yes!\0A\0A\00"
@.str.4 = [29 x i8] c"Rekursiv function says No!\0A\0A\00"
define void @print_res(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
br label %15
13: ; preds = %3
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
%16 = load i32, i32* %5
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
br label %22
20: ; preds = %15
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
br label %22
22: ; preds = %20, %18
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"\0AIs '%s' a Palindrome?\0A\00"
@str = [28 x i8] c"\0AIterativ function says No!\00"
@str.5 = [28 x i8] c"Rekursiv function says No!\0A\00"
@str.6 = [29 x i8] c"Rekursiv function says Yes!\0A\00"
@str.7 = [29 x i8] c"\0AIterativ function says Yes!\00"
define void @print_res(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = icmp eq i32 %0, 0
%6 = select i1 %5, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0)
%7 = tail call i32 @puts(i8* dereferenceable(1) %6)
%8 = icmp eq i32 %1, 0
%9 = select i1 %8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.5, i64 0, i64 0)
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
ret void
}