#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 *, double, double, double, double, double);
int /*<<< orphan*/ scanf(char *, double *, double *, double *);
int main() {
  double a, b, c, TRIANGULO, CIRCULO, TRAPEZIO, QUADRADO, RETANGULO;
  scanf("%lf %lf %lf", &a, &b, &c);
  TRIANGULO = a * c / 2;
  CIRCULO = (3.14159 * c * c);
  TRAPEZIO = ((a + b) * c) / 2;
  QUADRADO = b * b;
  RETANGULO = a * b;
  printf("TRIANGULO: %.3lf\nCIRCULO: %.3lf\nTRAPEZIO: %.3lf\nQUADRADO: "
         "%.3lf\nRETANGULO: %.3lf\n",
         TRIANGULO, CIRCULO, TRAPEZIO, QUADRADO, RETANGULO);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xea7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe9e(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xe70(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm4
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm4
movsd  (%rsp),%xmm5
movapd %xmm4,%xmm0
mulsd  %xmm5,%xmm0
movsd  0xea8(%rip),%xmm6
mulsd  %xmm6,%xmm0
movsd  0xea4(%rip),%xmm1
mulsd  %xmm5,%xmm1
mulsd  %xmm5,%xmm1
movsd  0x8(%rsp),%xmm3
movapd %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm5,%xmm2
mulsd  %xmm6,%xmm2
mulsd  %xmm3,%xmm4
mulsd  %xmm3,%xmm3
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [82 x i8] c"TRIANGULO: %.3lf\0ACIRCULO: %.3lf\0ATRAPEZIO: %.3lf\0AQUADRADO: %.3lf\0ARETANGULO: %.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store i32 0, i32* %1
%10 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%11 = load double, double* %2
%12 = load double, double* %4
%13 = fmul double %11, %12
%14 = fdiv double %13, 2.000000e+00
store double %14, double* %5
%15 = load double, double* %4
%16 = fmul double 3.141590e+00, %15
%17 = load double, double* %4
%18 = fmul double %16, %17
store double %18, double* %6
%19 = load double, double* %2
%20 = load double, double* %3
%21 = fadd double %19, %20
%22 = load double, double* %4
%23 = fmul double %21, %22
%24 = fdiv double %23, 2.000000e+00
store double %24, double* %7
%25 = load double, double* %3
%26 = load double, double* %3
%27 = fmul double %25, %26
store double %27, double* %8
%28 = load double, double* %2
%29 = load double, double* %3
%30 = fmul double %28, %29
store double %30, double* %9
%31 = load double, double* %5
%32 = load double, double* %6
%33 = load double, double* %7
%34 = load double, double* %8
%35 = load double, double* %9
%36 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0), double %31, double %32, double %33, double %34, double %35)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [82 x i8] c"TRIANGULO: %.3lf\0ACIRCULO: %.3lf\0ATRAPEZIO: %.3lf\0AQUADRADO: %.3lf\0ARETANGULO: %.3lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = load double, double* %1
%9 = load double, double* %3
%10 = fmul double %8, %9
%11 = fmul double %10, 5.000000e-01
%12 = fmul double %9, 3.141590e+00
%13 = fmul double %9, %12
%14 = load double, double* %2
%15 = fadd double %8, %14
%16 = fmul double %9, %15
%17 = fmul double %16, 5.000000e-01
%18 = fmul double %14, %14
%19 = fmul double %8, %14
%20 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0), double %11, double %13, double %17, double %18, double %19)
ret i32 0
}