#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*/ PreOrderAl(int, int *, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
void InOrderAl(int node, int *BST, int elemanSayisi) {
  if (node < elemanSayisi) {
    PreOrderAl(2 * node + 1, BST, elemanSayisi);
    printf("%d. elemani girin> ", node);
    scanf("%d", &BST[node]);
    PreOrderAl(2 * node + 2, BST, elemanSayisi);
  }
}


x86 assembly (clang, -O0):
<InOrderAl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11a2 <InOrderAl+0x72>
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
add    $0x1,%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <PreOrderAl@plt>
mov    -0x4(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe8c(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
add    $0x2,%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <PreOrderAl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InOrderAl>:
cmp    %edx,%edi
jge    117f <InOrderAl+0x4f>
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %edi,%ebx
lea    (%rbx,%rbx,1),%edi
add    $0x1,%edi
call   1050 <PreOrderAl@plt>
lea    0xeaf(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movslq %ebx,%rax
lea    (%r14,%rax,4),%rsi
lea    0xeae(%rip),%rdi
call   1040 <scanf@plt>
lea    (%rbx,%rbx,1),%edi
add    $0x2,%edi
mov    %r14,%rsi
mov    %ebp,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <PreOrderAl@plt>
ret

LLVM IR (-O0):
@.str = [20 x i8] c"%d. elemani girin> \00"
@.str.1 = [3 x i8] c"%d\00"
define void @InOrderAl(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 = load i32, i32* %4
%8 = load i32, i32* %6
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %30
10: ; preds = %3
%11 = load i32, i32* %4
%12 = mul nsw i32 2, %11
%13 = add nsw i32 %12, 1
%14 = load i32*, i32** %5
%15 = load i32, i32* %6
%16 = call i32 @PreOrderAl(i32 %13, i32* %14, i32 %15)
%17 = load i32, i32* %4
%18 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32*, i32** %5
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %19, i64 %21
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %22)
%24 = load i32, i32* %4
%25 = mul nsw i32 2, %24
%26 = add nsw i32 %25, 2
%27 = load i32*, i32** %5
%28 = load i32, i32* %6
%29 = call i32 @PreOrderAl(i32 %26, i32* %27, i32 %28)
br label %30
30: ; preds = %10, %3
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"%d. elemani girin> \00"
@.str.1 = [3 x i8] c"%d\00"
define void @InOrderAl(i32 %0, i32* %1, i32 %2) {
%4 = icmp slt i32 %0, %2
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = shl nsw i32 %0, 1
%7 = or i32 %6, 1
%8 = tail call i32 @PreOrderAl(i32 %7, i32* %1, i32 %2)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
%10 = sext i32 %0 to i64
%11 = getelementptr inbounds i32, i32* %1, i64 %10
%12 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %11)
%13 = add nsw i32 %6, 2
%14 = tail call i32 @PreOrderAl(i32 %13, i32* %1, i32 %2)
br label %15
15: ; preds = %5, %3
ret void
}