#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 *);
int main() {
  float r, kup, kure;
  printf("Yaricapi giriniz... \n");
  scanf("%f", &r);
  kup = r * r * r;
  kure = (4 * 3.14 * kup) / 3;
  printf("Kurenin hacminin kupun hacmine orani: %f / %f = %f\n", kure, kup,
         kure / kup);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe96(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe82(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x10(%rbp),%xmm2
divss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe77(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
movaps %xmm0,%xmm2
mulss  %xmm0,%xmm2
mulss  %xmm0,%xmm2
cvtss2sd %xmm2,%xmm1
movsd  0xe95(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  0xe91(%rip),%xmm0
cvtsd2ss %xmm0,%xmm3
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
divss  %xmm2,%xmm3
xorps  %xmm2,%xmm2
cvtss2sd %xmm3,%xmm2
lea    0xe7f(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Yaricapi giriniz... \0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [52 x i8] c"Kurenin hacminin kupun hacmine orani: %f / %f = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 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), float* %2)
%7 = load float, float* %2
%8 = load float, float* %2
%9 = fmul float %7, %8
%10 = load float, float* %2
%11 = fmul float %9, %10
store float %11, float* %3
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = fmul double 1.256000e+01, %13
%15 = fdiv double %14, 3.000000e+00
%16 = fptrunc double %15 to float
store float %16, float* %4
%17 = load float, float* %4
%18 = fpext float %17 to double
%19 = load float, float* %3
%20 = fpext float %19 to double
%21 = load float, float* %4
%22 = load float, float* %3
%23 = fdiv float %21, %22
%24 = fpext float %23 to double
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), double %18, double %20, double %24)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [52 x i8] c"Kurenin hacminin kupun hacmine orani: %f / %f = %f\0A\00"
@str = [21 x i8] c"Yaricapi giriniz... \00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fmul float %5, %5
%7 = fmul float %5, %6
%8 = fpext float %7 to double
%9 = fmul double %8, 1.256000e+01
%10 = fdiv double %9, 3.000000e+00
%11 = fptrunc double %10 to float
%12 = fpext float %11 to double
%13 = fdiv float %11, %7
%14 = fpext float %13 to double
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), double %12, double %8, double %14)
ret i32 0
}