#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*/ DiziOlarakGoster(int *, int);
int /*<<< orphan*/ InOrderGoster(int, int *, int);
int /*<<< orphan*/ PostOrderGoster(int, int *, int);
int /*<<< orphan*/ PreOrderGoster(int, int *, int);
int /*<<< orphan*/ printf(char *);
void EkranaGoster(int *BST, int elemanSayisi, int baslangic) {
  printf("\n\nBinary Search Tree\n");
  printf("-------------------------\n\n");
  printf("Dizi:       ");
  DiziOlarakGoster(BST, elemanSayisi);
  printf("\n");
  printf("Pre-order:  ");
  PreOrderGoster(baslangic, BST, elemanSayisi);
  printf("\n");
  printf("In-order:   ");
  InOrderGoster(baslangic, BST, elemanSayisi);
  printf("\n");
  printf("Post-order: ");
  PostOrderGoster(baslangic, BST, elemanSayisi);
  printf("\n");
  printf("\n-------------------------");
}


x86 assembly (clang, -O0):
<EkranaGoster>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <DiziOlarakGoster@plt>
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <PreOrderGoster@plt>
lea    0xe70(%rip),%rdi
call   1040 <printf@plt>
lea    0xe80(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1060 <InOrderGoster@plt>
lea    0xe49(%rip),%rdi
call   1040 <printf@plt>
lea    0xe66(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1070 <PostOrderGoster@plt>
lea    0xe22(%rip),%rdi
call   1040 <printf@plt>
lea    0xe4c(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EkranaGoster>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebx
mov    %rdi,%rbp
lea    0xecc(%rip),%rdi
call   1050 <puts@plt>
lea    0xed5(%rip),%rdi
call   1050 <puts@plt>
lea    0xe65(%rip),%rdi
call   1060 <printf@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
call   1070 <DiziOlarakGoster@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe52(%rip),%rdi
call   1060 <printf@plt>
mov    %r14d,%edi
mov    %rbp,%rsi
mov    %ebx,%edx
call   1040 <PreOrderGoster@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe3c(%rip),%rdi
call   1060 <printf@plt>
mov    %r14d,%edi
mov    %rbp,%rsi
mov    %ebx,%edx
call   1080 <InOrderGoster@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe26(%rip),%rdi
call   1060 <printf@plt>
mov    %r14d,%edi
mov    %rbp,%rsi
mov    %ebx,%edx
call   1090 <PostOrderGoster@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe10(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1060 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"\0A\0ABinary Search Tree\0A\00"
@.str.1 = [28 x i8] c"-------------------------\0A\0A\00"
@.str.2 = [13 x i8] c"Dizi: \00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [13 x i8] c"Pre-order: \00"
@.str.5 = [13 x i8] c"In-order: \00"
@.str.6 = [13 x i8] c"Post-order: \00"
@.str.7 = [27 x i8] c"\0A-------------------------\00"
define void @EkranaGoster(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = call i32 @DiziOlarakGoster(i32* %10, i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%15 = load i32, i32* %6
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = call i32 @PreOrderGoster(i32 %15, i32* %16, i32 %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%21 = load i32, i32* %6
%22 = load i32*, i32** %4
%23 = load i32, i32* %5
%24 = call i32 @InOrderGoster(i32 %21, i32* %22, i32 %23)
%25 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%27 = load i32, i32* %6
%28 = load i32*, i32** %4
%29 = load i32, i32* %5
%30 = call i32 @PostOrderGoster(i32 %27, i32* %28, i32 %29)
%31 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%32 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.2 = [13 x i8] c"Dizi: \00"
@.str.4 = [13 x i8] c"Pre-order: \00"
@.str.5 = [13 x i8] c"In-order: \00"
@.str.6 = [13 x i8] c"Post-order: \00"
@.str.7 = [27 x i8] c"\0A-------------------------\00"
@str = [21 x i8] c"\0A\0ABinary Search Tree\00"
@str.8 = [27 x i8] c"-------------------------\0A\00"
define void @EkranaGoster(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.8, i64 0, i64 0))
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @DiziOlarakGoster(i32* %0, i32 %1)
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @PreOrderGoster(i32 %2, i32* %0, i32 %1)
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%13 = tail call i32 @InOrderGoster(i32 %2, i32* %0, i32 %1)
%14 = tail call i32 @putchar(i32 10)
%15 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%16 = tail call i32 @PostOrderGoster(i32 %2, i32* %0, i32 %1)
%17 = tail call i32 @putchar(i32 10)
%18 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
ret void
}