#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 */
double dijametar(double);
double perimetar(double);
double ploshtina(double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double radius, D, L, P;
  printf("Vnesete radius na krugot: ");
  scanf("%lf", &radius);
  D = dijametar(radius);
  L = perimetar(radius);
  P = ploshtina(radius);
  printf("Dijametar na krugot = %.2f\n", D);
  printf("Perimetar na krugot = %.2f\n", L);
  printf("Ploshtina na krugot = %.2f\n", P);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea7(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
call   1030 <dijametar@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1070 <perimetar@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <ploshtina@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe69(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xe72(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x28(%rbp),%xmm0
lea    0xe7b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb2(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
movsd  0x8(%rsp),%xmm0
call   1030 <dijametar@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <perimetar@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <ploshtina@plt>
movsd  %xmm0,0x20(%rsp)
lea    0xe72(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe7a(%rip),%rdi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe82(%rip),%rdi
movsd  0x20(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Vnesete radius na krugot: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [28 x i8] c"Dijametar na krugot = %.2f\0A\00"
@.str.3 = [28 x i8] c"Perimetar na krugot = %.2f\0A\00"
@.str.4 = [28 x i8] c"Ploshtina na krugot = %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%8 = load double, double* %2
%9 = call double @dijametar(double %8)
store double %9, double* %3
%10 = load double, double* %2
%11 = call double @perimetar(double %10)
store double %11, double* %4
%12 = load double, double* %2
%13 = call double @ploshtina(double %12)
store double %13, double* %5
%14 = load double, double* %3
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %14)
%16 = load double, double* %4
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), double %16)
%18 = load double, double* %5
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), double %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Vnesete radius na krugot: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [28 x i8] c"Dijametar na krugot = %.2f\0A\00"
@.str.3 = [28 x i8] c"Perimetar na krugot = %.2f\0A\00"
@.str.4 = [28 x i8] c"Ploshtina na krugot = %.2f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = call double @dijametar(double %5)
%7 = load double, double* %1
%8 = call double @perimetar(double %7)
%9 = load double, double* %1
%10 = call double @ploshtina(double %9)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %6)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), double %8)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), double %10)
ret i32 0
}