#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_s(char *, int *);
float sqrt(int);
int /*<<< orphan*/ system(char *);
main() {
  int a, b, c;
  float AO, karekok;
  printf("Birinci sayiyi giriniz: ");
  scanf_s("%d", &a);
  printf("Ikinci sayiyi giriniz: ");
  scanf_s("%d", &b);
  printf("Ucuncu sayiyi giriniz: ");
  scanf_s("%d", &c);
  AO = (a + b + c) / 3.0;
  karekok = sqrt(a * b * c);
  printf("#########################\n");
  printf("##ArtOrt\tKarekok##\n");
  printf("##-----\t\t-------##\n");
  printf("###%.2f#\t#%.2f###\n", AO, karekok);
  printf("###################################\n");
  if (a > AO)
    printf("###Birinci sayi AO'dan buyuktur.###\n");
  if (b > AO)
    printf("###Ikinci sayi AO'dan buyuktur.####\n");
  if (c > AO)
    printf("###Ucuncu sayi AO'dan buyuktur.####\n");
  printf("###################################\n");
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf_s@plt>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe9f(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf_s@plt>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe81(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf_s@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xe42(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%edi
imul   -0xc(%rbp),%edi
imul   -0x10(%rbp),%edi
call   1060 <sqrt@plt>
movss  %xmm0,-0x18(%rbp)
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe59(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cvtsi2ssl -0x8(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1255 <main+0x115>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cvtsi2ssl -0xc(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1272 <main+0x132>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cvtsi2ssl -0x10(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    128f <main+0x14f>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe7f(%rip),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xeac(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb7(%rip),%rbx
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf_s@plt>
lea    0xea6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf_s@plt>
lea    0xea3(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf_s@plt>
mov    0x18(%rsp),%eax
mov    0x14(%rsp),%edi
lea    (%rdi,%rax,1),%ecx
mov    0x10(%rsp),%edx
add    %edx,%ecx
cvtsi2sd %ecx,%xmm0
divsd  0xe36(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
imul   %eax,%edi
imul   %edx,%edi
call   1070 <sqrt@plt>
movss  %xmm0,0x1c(%rsp)
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
lea    0xe75(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7c(%rip),%rdi
call   1030 <puts@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x1c(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe30(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
lea    0xe61(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x18(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jbe    1253 <main+0x103>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x14(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jbe    126f <main+0x11f>
lea    0xe71(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x10(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jbe    128b <main+0x13b>
lea    0xe31(%rip),%rdi
call   1030 <puts@plt>
lea    0xe01(%rip),%rdi
call   1030 <puts@plt>
lea    0xdc9(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Birinci sayiyi giriniz: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"Ikinci sayiyi giriniz: \00"
@.str.3 = [24 x i8] c"Ucuncu sayiyi giriniz: \00"
@.str.4 = [27 x i8] c"#########################\0A\00"
@.str.5 = [20 x i8] c"##ArtOrt\09Karekok##\0A\00"
@.str.6 = [20 x i8] c"##-----\09\09-------##\0A\00"
@.str.7 = [19 x i8] c"###%.2f#\09#%.2f###\0A\00"
@.str.8 = [37 x i8] c"###################################\0A\00"
@.str.9 = [37 x i8] c"###Birinci sayi AO'dan buyuktur.###\0A\00"
@.str.10 = [37 x i8] c"###Ikinci sayi AO'dan buyuktur.####\0A\00"
@.str.11 = [37 x i8] c"###Ucuncu sayi AO'dan buyuktur.####\0A\00"
@.str.12 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %4
%17 = add nsw i32 %15, %16
%18 = sitofp i32 %17 to double
%19 = fdiv double %18, 3.000000e+00
%20 = fptrunc double %19 to float
store float %20, float* %5
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = mul nsw i32 %21, %22
%24 = load i32, i32* %4
%25 = mul nsw i32 %23, %24
%26 = call float @sqrt(i32 %25)
store float %26, float* %6
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%30 = load float, float* %5
%31 = fpext float %30 to double
%32 = load float, float* %6
%33 = fpext float %32 to double
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), double %31, double %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%36 = load i32, i32* %2
%37 = sitofp i32 %36 to float
%38 = load float, float* %5
%39 = fcmp ogt float %37, %38
br i1 %39, label %40, label %42
40: ; preds = %0
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
br label %42
42: ; preds = %40, %0
%43 = load i32, i32* %3
%44 = sitofp i32 %43 to float
%45 = load float, float* %5
%46 = fcmp ogt float %44, %45
br i1 %46, label %47, label %49
47: ; preds = %42
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
br label %49
49: ; preds = %47, %42
%50 = load i32, i32* %4
%51 = sitofp i32 %50 to float
%52 = load float, float* %5
%53 = fcmp ogt float %51, %52
br i1 %53, label %54, label %56
54: ; preds = %49
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0))
br label %56
56: ; preds = %54, %49
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%58 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
%59 = load i32, i32* %1
ret i32 %59
}

LLVM IR (-O2):
@.str = [25 x i8] c"Birinci sayiyi giriniz: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"Ikinci sayiyi giriniz: \00"
@.str.3 = [24 x i8] c"Ucuncu sayiyi giriniz: \00"
@.str.7 = [19 x i8] c"###%.2f#\09#%.2f###\0A\00"
@.str.12 = [6 x i8] c"pause\00"
@str = [26 x i8] c"#########################\00"
@str.13 = [19 x i8] c"##ArtOrt\09Karekok##\00"
@str.14 = [19 x i8] c"##-----\09\09-------##\00"
@str.16 = [36 x i8] c"###################################\00"
@str.17 = [36 x i8] c"###Ucuncu sayi AO'dan buyuktur.####\00"
@str.18 = [36 x i8] c"###Ikinci sayi AO'dan buyuktur.####\00"
@str.19 = [36 x i8] c"###Birinci sayi AO'dan buyuktur.###\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = add nsw i32 %14, %13
%16 = load i32, i32* %3
%17 = add nsw i32 %15, %16
%18 = sitofp i32 %17 to double
%19 = fdiv double %18, 3.000000e+00
%20 = fptrunc double %19 to float
%21 = mul nsw i32 %14, %13
%22 = mul nsw i32 %21, %16
%23 = call float @sqrt(i32 %22)
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.13, i64 0, i64 0))
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.14, i64 0, i64 0))
%27 = fpext float %20 to double
%28 = fpext float %23 to double
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), double %27, double %28)
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.16, i64 0, i64 0))
%31 = load i32, i32* %1
%32 = sitofp i32 %31 to float
%33 = fcmp ogt float %32, %20
br i1 %33, label %34, label %36
34: ; preds = %0
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.19, i64 0, i64 0))
br label %36
36: ; preds = %34, %0
%37 = load i32, i32* %2
%38 = sitofp i32 %37 to float
%39 = fcmp ogt float %38, %20
br i1 %39, label %40, label %42
40: ; preds = %36
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.18, i64 0, i64 0))
br label %42
42: ; preds = %40, %36
%43 = load i32, i32* %3
%44 = sitofp i32 %43 to float
%45 = fcmp ogt float %44, %20
br i1 %45, label %46, label %48
46: ; preds = %42
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.17, i64 0, i64 0))
br label %48
48: ; preds = %46, %42
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.16, i64 0, i64 0))
%50 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
ret i32 0
}