#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*/ Ogrenci_Ekle(int);
int /*<<< orphan*/ Return(int);
int /*<<< orphan*/ Secim(int);
int /*<<< orphan*/ menu();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int ogrenci_sayisi = 0;
  puts("\tOgrenci Bilgi Sistemine hosh geldiniz...");
  printf("Ogrenci sayisini giriniz: ");
  scanf("%d", &ogrenci_sayisi);
  Ogrenci_Ekle(ogrenci_sayisi);
  menu();
  Secim(ogrenci_sayisi);
  Return(ogrenci_sayisi);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xe73(%rip),%rdi
call   1030 <puts@plt>
lea    0xe91(%rip),%rdi
call   1050 <printf@plt>
lea    0xea0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1080 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1060 <Ogrenci_Ekle@plt>
mov    $0x0,%al
call   1040 <menu@plt>
mov    -0x8(%rbp),%edi
call   1070 <Secim@plt>
mov    -0x8(%rbp),%edi
call   1090 <Return@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xe80(%rip),%rdi
call   1030 <puts@plt>
lea    0xe9e(%rip),%rdi
call   1050 <printf@plt>
lea    0xead(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1080 <scanf@plt>
mov    0x4(%rsp),%edi
call   1060 <Ogrenci_Ekle@plt>
xor    %eax,%eax
call   1040 <menu@plt>
mov    0x4(%rsp),%edi
call   1070 <Secim@plt>
mov    0x4(%rsp),%edi
call   1090 <Return@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"\09Ogrenci Bilgi Sistemine hosh geldiniz...\00"
@.str.1 = [27 x i8] c"Ogrenci sayisini giriniz: \00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @Ogrenci_Ekle(i32 %6)
%8 = call i32 (...) @menu()
%9 = load i32, i32* %2
%10 = call i32 @Secim(i32 %9)
%11 = load i32, i32* %2
%12 = call i32 @Return(i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"\09Ogrenci Bilgi Sistemine hosh geldiniz...\00"
@.str.1 = [27 x i8] c"Ogrenci sayisini giriniz: \00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = call i32 @Ogrenci_Ekle(i32 %6)
%8 = call i32 (...) @menu()
%9 = load i32, i32* %1
%10 = call i32 @Secim(i32 %9)
%11 = load i32, i32* %1
%12 = call i32 @Return(i32 %11)
ret i32 0
}