#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 /*<<< orphan*/ system(char *);
main() {
  double A, B, C;
  scanf("%lf %lf %lf", &A, &B, &C);
  system("clear");
  if (A + B > C && B + C > A && C + A > B)
    printf("Perimetro = %.1lf\n", A + B + C);
  else
    printf("Area = %.1lf\n", (A + B) * C / 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1050 <scanf@plt>
lea    0xeb6(%rip),%rdi
call   1030 <system@plt>
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    11c2 <main+0x92>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11c2 <main+0x92>
movsd  -0x20(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11c2 <main+0x92>
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
lea    0xe62(%rip),%rdi
call   1040 <printf@plt>
jmp    11e9 <main+0xb9>
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xe27(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xe49(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xecd(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1050 <scanf@plt>
lea    0xec0(%rip),%rdi
call   1030 <system@plt>
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
movapd %xmm2,%xmm0
addsd  %xmm3,%xmm0
movsd  (%rsp),%xmm1
ucomisd %xmm1,%xmm0
jbe    119d <main+0x6d>
movapd %xmm3,%xmm4
addsd  %xmm1,%xmm4
ucomisd %xmm2,%xmm4
jbe    119d <main+0x6d>
addsd  %xmm1,%xmm2
ucomisd %xmm3,%xmm2
jbe    119d <main+0x6d>
addsd  %xmm1,%xmm0
lea    0xe7f(%rip),%rdi
jmp    11b0 <main+0x80>
mulsd  %xmm1,%xmm0
mulsd  0xe57(%rip),%xmm0
lea    0xe7d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [6 x i8] c"clear\00"
@.str.2 = [19 x i8] c"Perimetro = %.1lf\0A\00"
@.str.3 = [14 x i8] c"Area = %.1lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%6 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%7 = load double, double* %2
%8 = load double, double* %3
%9 = fadd double %7, %8
%10 = load double, double* %4
%11 = fcmp ogt double %9, %10
br i1 %11, label %12, label %31
12: ; preds = %0
%13 = load double, double* %3
%14 = load double, double* %4
%15 = fadd double %13, %14
%16 = load double, double* %2
%17 = fcmp ogt double %15, %16
br i1 %17, label %18, label %31
18: ; preds = %12
%19 = load double, double* %4
%20 = load double, double* %2
%21 = fadd double %19, %20
%22 = load double, double* %3
%23 = fcmp ogt double %21, %22
br i1 %23, label %24, label %31
24: ; preds = %18
%25 = load double, double* %2
%26 = load double, double* %3
%27 = fadd double %25, %26
%28 = load double, double* %4
%29 = fadd double %27, %28
%30 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %29)
br label %39
31: ; preds = %18, %12, %0
%32 = load double, double* %2
%33 = load double, double* %3
%34 = fadd double %32, %33
%35 = load double, double* %4
%36 = fmul double %34, %35
%37 = fdiv double %36, 2.000000e+00
%38 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), double %37)
br label %39
39: ; preds = %31, %24
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [6 x i8] c"clear\00"
@.str.2 = [19 x i8] c"Perimetro = %.1lf\0A\00"
@.str.3 = [14 x i8] c"Area = %.1lf\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 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%9 = load double, double* %1
%10 = load double, double* %2
%11 = fadd double %9, %10
%12 = load double, double* %3
%13 = fcmp ogt double %11, %12
%14 = fadd double %10, %12
%15 = fcmp ogt double %14, %9
%16 = and i1 %13, %15
%17 = fadd double %9, %12
%18 = fcmp ogt double %17, %10
%19 = select i1 %16, i1 %18, i1 false
br i1 %19, label %20, label %23
20: ; preds = %0
%21 = fadd double %11, %12
%22 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %21)
br label %27
23: ; preds = %0
%24 = fmul double %11, %12
%25 = fmul double %24, 5.000000e-01
%26 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), double %25)
br label %27
27: ; preds = %23, %20
ret i32 0
}