#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 *);
void main() {
  float PI = 3.14159;
  float radio;
  printf("Ingrese el radio de un circulo\n");
  scanf("%f", &radio);
  printf("El diametro del circulo es: %f\nEl circunferencia del circulo es: "
         "%f\nEl area del circulo es: %f\n",
         radio * 2, PI * radio * 2, PI * radio * radio);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xed4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xea5(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xe8a(%rip),%xmm2
mulss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x4(%rbp),%xmm2
mulss  -0x8(%rbp),%xmm2
mulss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe93(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm2
movaps %xmm2,%xmm0
addss  %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
movss  0xe99(%rip),%xmm1
mulss  %xmm2,%xmm1
mulss  %xmm1,%xmm2
addss  %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
lea    0xe85(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Ingrese el radio de un circulo\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [96 x i8] c"El diametro del circulo es: %f\0AEl circunferencia del circulo es: %f\0AEl area del circulo es: %f\0A\00"
define void @main() {
%1 = alloca float
%2 = alloca float
store float 0x400921FA00000000, float* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 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* %2)
%5 = load float, float* %2
%6 = fmul float %5, 2.000000e+00
%7 = fpext float %6 to double
%8 = load float, float* %1
%9 = load float, float* %2
%10 = fmul float %8, %9
%11 = fmul float %10, 2.000000e+00
%12 = fpext float %11 to double
%13 = load float, float* %1
%14 = load float, float* %2
%15 = fmul float %13, %14
%16 = load float, float* %2
%17 = fmul float %15, %16
%18 = fpext float %17 to double
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.2, i64 0, i64 0), double %7, double %12, double %18)
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [96 x i8] c"El diametro del circulo es: %f\0AEl circunferencia del circulo es: %f\0AEl area del circulo es: %f\0A\00"
@str = [31 x i8] c"Ingrese el radio de un circulo\00"
define void @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 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, 2.000000e+00
%7 = fpext float %6 to double
%8 = fmul float %5, 0x400921FA00000000
%9 = fmul float %8, 2.000000e+00
%10 = fpext float %9 to double
%11 = fmul float %5, %8
%12 = fpext float %11 to double
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @.str.2, i64 0, i64 0), double %7, double %10, double %12)
ret void
}