#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(void) {
  double A, B, C, TRI, CIR, TRA, QUA, RET, PI = 3.14159;
  scanf("%lf%lf%lf", &A, &B, &C);
  TRI = A * C / 2;
  CIR = PI * C * C;
  TRA = (A + B) * C / 2;
  QUA = B * B;
  RET = A * B;
  printf("TRIANGULO: %.3lf\nCIRCULO: %.3lf\nTRAPEZIO: %.3lf\nQUADRADO: "
         "%.3lf\nRETANGULO: %.3lf\n",
         TRI, CIR, TRA, QUA, RET);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
lea    0xed4(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xea1(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe6d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
lea    0xe40(%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    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 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 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double 3.141590e+00, double* %9
%10 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%11 = load double, double* %1
%12 = load double, double* %3
%13 = fmul double %11, %12
%14 = fdiv double %13, 2.000000e+00
store double %14, double* %4
%15 = load double, double* %9
%16 = load double, double* %3
%17 = fmul double %15, %16
%18 = load double, double* %3
%19 = fmul double %17, %18
store double %19, double* %5
%20 = load double, double* %1
%21 = load double, double* %2
%22 = fadd double %20, %21
%23 = load double, double* %3
%24 = fmul double %22, %23
%25 = fdiv double %24, 2.000000e+00
store double %25, double* %6
%26 = load double, double* %2
%27 = load double, double* %2
%28 = fmul double %26, %27
store double %28, double* %7
%29 = load double, double* %1
%30 = load double, double* %2
%31 = fmul double %29, %30
store double %31, double* %8
%32 = load double, double* %4
%33 = load double, double* %5
%34 = load double, double* %6
%35 = load double, double* %7
%36 = load double, double* %8
%37 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0), double %32, double %33, double %34, double %35, double %36)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 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 ([10 x i8], [10 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
}