#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);
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 = .5 * A * C;
  CIRCULO = 3.14159 * C * C;
  TRAPEZIO = ((A + B) / 2) * C;
  QUADRADO = B * B;
  RETANGULO = A * B;
  printf("TRIANGULO: %.3lf\n", TRIANGULO);
  printf("CIRCULO: %.3lf\n", CIRCULO);
  printf("TRAPEZIO: %.3lf\n", TRAPEZIO);
  printf("QUADRADO: %.3lf\n", QUADRADO);
  printf("RETANGULO: %.3lf\n", RETANGULO);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
movsd  0xec1(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xea2(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xe79(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%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
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x30(%rbp),%xmm0
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x38(%rbp),%xmm0
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x40(%rbp),%xmm0
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x48(%rbp),%xmm0
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
lea    0xee5(%rip),%rdi
lea    0x30(%rsp),%rsi
lea    0x28(%rsp),%rdx
lea    0x20(%rsp),%rcx
call   1040 <scanf@plt>
movsd  0x30(%rsp),%xmm3
movsd  0xeb3(%rip),%xmm1
movapd %xmm3,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x20(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xea1(%rip),%xmm4
mulsd  %xmm2,%xmm4
mulsd  %xmm2,%xmm4
movsd  %xmm4,0x8(%rsp)
movsd  0x28(%rsp),%xmm4
movapd %xmm3,%xmm5
addsd  %xmm4,%xmm5
mulsd  %xmm1,%xmm5
mulsd  %xmm2,%xmm5
movsd  %xmm5,(%rsp)
mulsd  %xmm4,%xmm3
movsd  %xmm3,0x18(%rsp)
mulsd  %xmm4,%xmm4
movsd  %xmm4,0x10(%rsp)
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe75(%rip),%rdi
movsd  0x8(%rsp),%xmm0
call   1030 <printf@plt>
lea    0xe73(%rip),%rdi
movsd  (%rsp),%xmm0
call   1030 <printf@plt>
lea    0xe73(%rip),%rdi
movsd  0x10(%rsp),%xmm0
call   1030 <printf@plt>
lea    0xe72(%rip),%rdi
movsd  0x18(%rsp),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%lf%lf%lf\00"
@.str.1 = [18 x i8] c"TRIANGULO: %.3lf\0A\00"
@.str.2 = [16 x i8] c"CIRCULO: %.3lf\0A\00"
@.str.3 = [17 x i8] c"TRAPEZIO: %.3lf\0A\00"
@.str.4 = [17 x i8] c"QUADRADO: %.3lf\0A\00"
@.str.5 = [18 x i8] c"RETANGULO: %.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 ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%11 = load double, double* %2
%12 = fmul double 5.000000e-01, %11
%13 = load double, double* %4
%14 = fmul double %12, %13
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 = fdiv double %21, 2.000000e+00
%23 = load double, double* %4
%24 = fmul double %22, %23
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 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %31)
%33 = load double, double* %6
%34 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), double %33)
%35 = load double, double* %7
%36 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %35)
%37 = load double, double* %8
%38 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %37)
%39 = load double, double* %9
%40 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), double %39)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%lf%lf%lf\00"
@.str.1 = [18 x i8] c"TRIANGULO: %.3lf\0A\00"
@.str.2 = [16 x i8] c"CIRCULO: %.3lf\0A\00"
@.str.3 = [17 x i8] c"TRAPEZIO: %.3lf\0A\00"
@.str.4 = [17 x i8] c"QUADRADO: %.3lf\0A\00"
@.str.5 = [18 x i8] c"RETANGULO: %.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 = fmul double %8, 5.000000e-01
%10 = load double, double* %3
%11 = fmul double %9, %10
%12 = fmul double %10, 3.141590e+00
%13 = fmul double %10, %12
%14 = load double, double* %2
%15 = fadd double %8, %14
%16 = fmul double %15, 5.000000e-01
%17 = fmul double %10, %16
%18 = fmul double %14, %14
%19 = fmul double %8, %14
%20 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %11)
%21 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), double %13)
%22 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %17)
%23 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %18)
%24 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), double %19)
ret i32 0
}