#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(void) {
  float raggioCerchio;
  printf("%s", "Prego inserire il diametro del cerchio: ");
  scanf("%f", &raggioCerchio);
  printf("\nIl Diametro del Cerchio e' pari a: %f \n", raggioCerchio * 2);
  printf("La Circonferenza del Cerchio e' pari a: %f \n",
         ((raggioCerchio * 2) * 3.14159));
  printf("L'Area del Cerchio e' pari a: %f \n",
         ((raggioCerchio * raggioCerchio) * 3.14159));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed6(%rip),%rdi
lea    0xed2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xeac(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xecf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0xe8d(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe74(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xecd(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe4c(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xed2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
lea    0xedc(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
addss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xedb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
addss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe87(%rip),%xmm0
lea    0xee0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe63(%rip),%xmm0
lea    0xee9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [41 x i8] c"Prego inserire il diametro del cerchio: \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [41 x i8] c"\0AIl Diametro del Cerchio e' pari a: %f \0A\00"
@.str.4 = [45 x i8] c"La Circonferenza del Cerchio e' pari a: %f \0A\00"
@.str.5 = [35 x i8] c"L'Area del Cerchio e' pari a: %f \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fmul float %5, 2.000000e+00
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), double %7)
%9 = load float, float* %2
%10 = fmul float %9, 2.000000e+00
%11 = fpext float %10 to double
%12 = fmul double %11, 3.141590e+00
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), double %12)
%14 = load float, float* %2
%15 = load float, float* %2
%16 = fmul float %14, %15
%17 = fpext float %16 to double
%18 = fmul double %17, 3.141590e+00
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), double %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [41 x i8] c"Prego inserire il diametro del cerchio: \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [41 x i8] c"\0AIl Diametro del Cerchio e' pari a: %f \0A\00"
@.str.4 = [45 x i8] c"La Circonferenza del Cerchio e' pari a: %f \0A\00"
@.str.5 = [35 x i8] c"L'Area del Cerchio e' pari a: %f \0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fmul float %5, 2.000000e+00
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), double %7)
%9 = load float, float* %1
%10 = fmul float %9, 2.000000e+00
%11 = fpext float %10 to double
%12 = fmul double %11, 3.141590e+00
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), double %12)
%14 = load float, float* %1
%15 = fmul float %14, %14
%16 = fpext float %15 to double
%17 = fmul double %16, 3.141590e+00
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), double %17)
ret i32 0
}