#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 BUFSIZ;
int /*<<< orphan*/ giris(int *, int *, int);
int /*<<< orphan*/ goruntu(int *, int *, int);
float ortalama(int *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int N;
  int OgrNo[BUFSIZ], BNotu[BUFSIZ];
  float ort;
  printf("Ogrenci sayisini giriniz: ");
  scanf("%d", &N);
  giris(OgrNo, BNotu, N);
  goruntu(OgrNo, BNotu, N);
  ort = ortalama(BNotu, N);
  printf("Not ortalaması:%5.2f\n", ort);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e7a(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rdx
mov    %rdx,-0x10(%rbp)
lea    0xf(,%rcx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x38(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x18(%rbp)
mov    (%rax),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe5b(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x8(%rbp),%edx
call   1060 <giris@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x8(%rbp),%edx
call   1070 <goruntu@plt>
mov    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <ortalama@plt>
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe14(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsp,%r15
mov    0x2e7c(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%r14
lea    0xf(,%rcx,4),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%r14
mov    %r14,%rsp
mov    (%rax),%eax
mov    %rsp,%rbx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
lea    0xe67(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe74(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x1c(%rbp),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <giris@plt>
mov    -0x1c(%rbp),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1070 <goruntu@plt>
mov    -0x1c(%rbp),%esi
mov    %rbx,%rdi
call   1030 <ortalama@plt>
cvtss2sd %xmm0,%xmm0
lea    0xe3c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r15,%rsp
xor    %eax,%eax
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@BUFSIZ = global i32 0
@.str = [27 x i8] c"Ogrenci sayisini giriniz: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"Not ortalamas\C4\B1:%5.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
%6 = alloca float
store i32 0, i32* %1
%7 = load i32, i32* @BUFSIZ
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %3
%10 = alloca i32, i64 %8
store i64 %8, i64* %4
%11 = load i32, i32* @BUFSIZ
%12 = zext i32 %11 to i64
%13 = alloca i32, i64 %12
store i64 %12, i64* %5
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%16 = load i32, i32* %2
%17 = call i32 @giris(i32* %10, i32* %13, i32 %16)
%18 = load i32, i32* %2
%19 = call i32 @goruntu(i32* %10, i32* %13, i32 %18)
%20 = load i32, i32* %2
%21 = call float @ortalama(i32* %13, i32 %20)
store float %21, float* %6
%22 = load float, float* %6
%23 = fpext float %22 to double
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %23)
store i32 0, i32* %1
%25 = load i8*, i8** %3
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
@.str = [27 x i8] c"Ogrenci sayisini giriniz: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"Not ortalamas\C4\B1:%5.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @BUFSIZ
%4 = zext i32 %3 to i64
%5 = tail call i8* @llvm.stacksave()
%6 = alloca i32, i64 %4
%7 = load i32, i32* @BUFSIZ
%8 = zext i32 %7 to i64
%9 = alloca i32, i64 %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%12 = load i32, i32* %1
%13 = call i32 @giris(i32* %6, i32* %9, i32 %12)
%14 = load i32, i32* %1
%15 = call i32 @goruntu(i32* %6, i32* %9, i32 %14)
%16 = load i32, i32* %1
%17 = call float @ortalama(i32* %9, i32 %16)
%18 = fpext float %17 to double
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %18)
ret i32 0
}