#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 *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int sayi, en_buyuk, sayici = 1;
  printf("1. sayiyi giriniz:");
  scanf("%d", &en_buyuk);
  while (sayici < 10) {
    printf("%d. sayiyi giriniz:", sayici + 1);
    scanf("%d", &sayi);
    if (en_buyuk < sayi) {
      en_buyuk = sayi;
    } else {
      en_buyuk = en_buyuk;
    }
    sayici++;
  }
  printf("En buyuk sayi %d dir.", en_buyuk);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0xa,-0x10(%rbp)
jge    11ad <main+0x8d>
mov    -0x10(%rbp),%esi
add    $0x1,%esi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9a(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1199 <main+0x79>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    119f <main+0x7f>
mov    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1154 <main+0x34>
mov    -0xc(%rbp),%esi
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed9(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xec8(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    %eax,0x8(%rsp)
jge    1175 <main+0x55>
mov    %eax,0x8(%rsp)
lea    0xe9a(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    %eax,0x8(%rsp)
jge    11a7 <main+0x87>
mov    %eax,0x8(%rsp)
lea    0xe68(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe52(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    %eax,0x8(%rsp)
jge    11d9 <main+0xb9>
mov    %eax,0x8(%rsp)
lea    0xe36(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe20(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    %eax,0x8(%rsp)
jge    120b <main+0xeb>
mov    %eax,0x8(%rsp)
lea    0xe04(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xdee(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    %eax,0x8(%rsp)
jge    123d <main+0x11d>
mov    %eax,0x8(%rsp)
lea    0xdd2(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xdbc(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    %eax,0x8(%rsp)
jge    126f <main+0x14f>
mov    %eax,0x8(%rsp)
lea    0xda0(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd8a(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    %eax,0x8(%rsp)
jge    12a1 <main+0x181>
mov    %eax,0x8(%rsp)
lea    0xd6e(%rip),%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd58(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    %eax,0x8(%rsp)
jge    12d3 <main+0x1b3>
mov    %eax,0x8(%rsp)
lea    0xd3c(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd26(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%eax
cmp    %eax,%esi
jge    1309 <main+0x1e9>
mov    %eax,0x8(%rsp)
mov    %eax,%esi
lea    0xd1a(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"1. sayiyi giriniz:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"%d. sayiyi giriniz:\00"
@.str.3 = [22 x i8] c"En buyuk sayi %d dir.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
br label %7
7: ; preds = %22, %0
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %25
10: ; preds = %7
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 1
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %20
18: ; preds = %10
%19 = load i32, i32* %2
store i32 %19, i32* %3
br label %22
20: ; preds = %10
%21 = load i32, i32* %3
store i32 %21, i32* %3
br label %22
22: ; preds = %20, %18
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %7
25: ; preds = %7
%26 = load i32, i32* %3
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %26)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"1. sayiyi giriniz:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"%d. sayiyi giriniz:\00"
@.str.3 = [22 x i8] c"En buyuk sayi %d dir.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 2)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %2
%10 = load i32, i32* %1
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %0
store i32 %10, i32* %2
br label %13
13: ; preds = %0, %12
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 3)
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%16 = load i32, i32* %2
%17 = load i32, i32* %1
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %20
19: ; preds = %13
store i32 %17, i32* %2
br label %20
20: ; preds = %19, %13
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 4)
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%23 = load i32, i32* %2
%24 = load i32, i32* %1
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %27
26: ; preds = %20
store i32 %24, i32* %2
br label %27
27: ; preds = %26, %20
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 5)
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%30 = load i32, i32* %2
%31 = load i32, i32* %1
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %34
33: ; preds = %27
store i32 %31, i32* %2
br label %34
34: ; preds = %33, %27
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 6)
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%37 = load i32, i32* %2
%38 = load i32, i32* %1
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %41
40: ; preds = %34
store i32 %38, i32* %2
br label %41
41: ; preds = %40, %34
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 7)
%43 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%44 = load i32, i32* %2
%45 = load i32, i32* %1
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %48
47: ; preds = %41
store i32 %45, i32* %2
br label %48
48: ; preds = %47, %41
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 8)
%50 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%51 = load i32, i32* %2
%52 = load i32, i32* %1
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %55
54: ; preds = %48
store i32 %52, i32* %2
br label %55
55: ; preds = %54, %48
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 9)
%57 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%58 = load i32, i32* %2
%59 = load i32, i32* %1
%60 = icmp slt i32 %58, %59
br i1 %60, label %61, label %62
61: ; preds = %55
store i32 %59, i32* %2
br label %62
62: ; preds = %61, %55
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 10)
%64 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%65 = load i32, i32* %2
%66 = load i32, i32* %1
%67 = icmp slt i32 %65, %66
br i1 %67, label %68, label %69
68: ; preds = %62
store i32 %66, i32* %2
br label %69
69: ; preds = %68, %62
%70 = phi i32 [ %66, %68 ], [ %65, %62 ]
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %70)
ret i32 0
}