#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 *, float *);
main() {
  float sayi_1, sayi_2, sayi_3, ara_deger_tutucu;
  printf("Cıkmak icin -1 giriniz.\n");
  printf("Birinci sayiyi giriniz:");
  scanf("%f", &sayi_1);
  while (sayi_1 != -1) {
    printf("Ikinci sayiyi giriniz:");
    scanf("%f", &sayi_2);
    printf("Ucuncu sayiyi giriniz:");
    scanf("%f", &sayi_3);
    while (sayi_1 > sayi_2 || sayi_2 > sayi_3 || sayi_1 > sayi_3) {
      if (sayi_1 > sayi_2) {
        ara_deger_tutucu = sayi_1;
        sayi_1 = sayi_2;
        sayi_2 = ara_deger_tutucu;
      }
      if (sayi_2 > sayi_3) {
        ara_deger_tutucu = sayi_2;
        sayi_2 = sayi_3;
        sayi_3 = ara_deger_tutucu;
      }
    }
    printf("Sayilarin kucukten buyuge siralanisi %.2f\t%.2f\t%.2f\n", sayi_1,
           sayi_2, sayi_3);
    printf("Birinci sayiyi giriniz:");
    scanf("%f", &sayi_1);
  }
  printf("Programdan ciktiniz.");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe98(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    117c <main+0x5c>
jp     117c <main+0x5c>
jmp    12aa <main+0x18a>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea5(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe87(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
mov    $0x1,%al
ucomiss -0xc(%rbp),%xmm0
mov    %al,-0x15(%rbp)
ja     11ef <main+0xcf>
movss  -0xc(%rbp),%xmm0
mov    $0x1,%al
ucomiss -0x10(%rbp),%xmm0
mov    %al,-0x15(%rbp)
ja     11ef <main+0xcf>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
seta   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    11ff <main+0xdf>
jmp    125e <main+0x13e>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    122c <main+0x10c>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1259 <main+0x139>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    11b8 <main+0x98>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x10(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xde7(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd9a(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    115b <main+0x3b>
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xf52(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebd(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
ucomiss 0xe8a(%rip),%xmm0
jne    117e <main+0x4e>
jnp    12a1 <main+0x171>
lea    0xe97(%rip),%rbx
lea    0xeaa(%rip),%r12
lea    0x14(%rsp),%r13
lea    0xeb5(%rip),%rbp
lea    0xe65(%rip),%r14
lea    0xc(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xe68(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
lea    0x10(%rsp),%rsi
call   1050 <scanf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm2
movss  0x14(%rsp),%xmm1
jmp    120c <main+0xdc>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  %xmm2,0x10(%rsp)
movss  %xmm1,0x14(%rsp)
movaps %xmm2,%xmm3
movaps %xmm1,%xmm2
movaps %xmm3,%xmm1
jmp    1248 <main+0x118>
nopw   0x0(%rax,%rax,1)
movss  %xmm3,0xc(%rsp)
movss  %xmm0,0x10(%rsp)
movaps %xmm0,%xmm1
movaps %xmm3,%xmm0
ucomiss %xmm2,%xmm1
jbe    1248 <main+0x118>
jmp    1200 <main+0xd0>
nopl   0x0(%rax)
movaps %xmm3,%xmm1
ucomiss %xmm2,%xmm1
ja     1200 <main+0xd0>
movaps %xmm1,%xmm3
ucomiss %xmm1,%xmm0
ja     1220 <main+0xf0>
ucomiss %xmm2,%xmm3
ja     1240 <main+0x110>
ucomiss %xmm2,%xmm0
ja     1240 <main+0x110>
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm3,%xmm1
cvtss2sd %xmm2,%xmm2
mov    %rbp,%rdi
mov    $0x3,%al
call   1040 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
ucomiss 0xd6b(%rip),%xmm0
jne    11b0 <main+0x80>
jp     11b0 <main+0x80>
lea    0xdda(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"C\C4\B1kmak icin -1 giriniz.\0A\00"
@.str.1 = [24 x i8] c"Birinci sayiyi giriniz:\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [23 x i8] c"Ikinci sayiyi giriniz:\00"
@.str.4 = [23 x i8] c"Ucuncu sayiyi giriniz:\00"
@.str.5 = [53 x i8] c"Sayilarin kucukten buyuge siralanisi %.2f\09%.2f\09%.2f\0A\00"
@.str.6 = [21 x i8] c"Programdan ciktiniz.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
br label %9
9: ; preds = %48, %0
%10 = load float, float* %2
%11 = fcmp une float %10, -1.000000e+00
br i1 %11, label %12, label %58
12: ; preds = %9
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %4)
br label %17
17: ; preds = %47, %12
%18 = load float, float* %2
%19 = load float, float* %3
%20 = fcmp ogt float %18, %19
br i1 %20, label %29, label %21
21: ; preds = %17
%22 = load float, float* %3
%23 = load float, float* %4
%24 = fcmp ogt float %22, %23
br i1 %24, label %29, label %25
25: ; preds = %21
%26 = load float, float* %2
%27 = load float, float* %4
%28 = fcmp ogt float %26, %27
br label %29
29: ; preds = %25, %21, %17
%30 = phi i1 [ true, %21 ], [ true, %17 ], [ %28, %25 ]
br i1 %30, label %31, label %48
31: ; preds = %29
%32 = load float, float* %2
%33 = load float, float* %3
%34 = fcmp ogt float %32, %33
br i1 %34, label %35, label %39
35: ; preds = %31
%36 = load float, float* %2
store float %36, float* %5
%37 = load float, float* %3
store float %37, float* %2
%38 = load float, float* %5
store float %38, float* %3
br label %39
39: ; preds = %35, %31
%40 = load float, float* %3
%41 = load float, float* %4
%42 = fcmp ogt float %40, %41
br i1 %42, label %43, label %47
43: ; preds = %39
%44 = load float, float* %3
store float %44, float* %5
%45 = load float, float* %4
store float %45, float* %3
%46 = load float, float* %5
store float %46, float* %4
br label %47
47: ; preds = %43, %39
br label %17
48: ; preds = %29
%49 = load float, float* %2
%50 = fpext float %49 to double
%51 = load float, float* %3
%52 = fpext float %51 to double
%53 = load float, float* %4
%54 = fpext float %53 to double
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0), double %50, double %52, double %54)
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%57 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
br label %9
58: ; preds = %9
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [24 x i8] c"Birinci sayiyi giriniz:\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [23 x i8] c"Ikinci sayiyi giriniz:\00"
@.str.4 = [23 x i8] c"Ucuncu sayiyi giriniz:\00"
@.str.5 = [53 x i8] c"Sayilarin kucukten buyuge siralanisi %.2f\09%.2f\09%.2f\0A\00"
@.str.6 = [21 x i8] c"Programdan ciktiniz.\00"
@str = [25 x i8] c"C\C4\B1kmak icin -1 giriniz.\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%10 = load float, float* %1
%11 = fcmp une float %10, -1.000000e+00
br i1 %11, label %12, label %47
12: ; preds = %0, %38
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%17 = load float, float* %1
%18 = load float, float* %2
%19 = load float, float* %3
br label %20
20: ; preds = %37, %12
%21 = phi float [ %34, %37 ], [ %19, %12 ]
%22 = phi float [ %21, %37 ], [ %18, %12 ]
%23 = phi float [ %35, %37 ], [ %17, %12 ]
br label %24
24: ; preds = %20, %33
%25 = phi float [ %34, %33 ], [ %22, %20 ]
%26 = phi float [ %35, %33 ], [ %23, %20 ]
%27 = fcmp ogt float %26, %25
br i1 %27, label %32, label %28
28: ; preds = %24
%29 = fcmp ogt float %25, %21
%30 = fcmp ogt float %26, %21
%31 = select i1 %29, i1 true, i1 %30
br i1 %31, label %33, label %38
32: ; preds = %24
store float %25, float* %1
store float %26, float* %2
br label %33
33: ; preds = %28, %32
%34 = phi float [ %25, %28 ], [ %26, %32 ]
%35 = phi float [ %26, %28 ], [ %25, %32 ]
%36 = fcmp ogt float %34, %21
br i1 %36, label %37, label %24
37: ; preds = %33
store float %21, float* %2
store float %34, float* %3
br label %20
38: ; preds = %28
%39 = fpext float %26 to double
%40 = fpext float %25 to double
%41 = fpext float %21 to double
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0), double %39, double %40, double %41)
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%44 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%45 = load float, float* %1
%46 = fcmp une float %45, -1.000000e+00
br i1 %46, label %12, label %47
47: ; preds = %38, %0
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}