#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 *, float);
int /*<<< orphan*/ scanf(char *, float *, float *, float *);
int main() {
  float a, b, c, p, area;
  scanf("%f%f%f", &a, &b, &c);
  if (b + c > a && c + b > a && a + c > b) {
    p = a + b + c;
    printf("Perimetro = %0.1f\n", p);
  } else {
    area = (0.5 * (a + b) * c);
    printf("Area = %0.1f\n", area);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    11ad <main+0x8d>
movss  -0x10(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    11ad <main+0x8d>
movss  -0x8(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    11ad <main+0x8d>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
jmp    11ee <main+0xce>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe3d(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xedd(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
movss  0x10(%rsp),%xmm2
movss  0xc(%rsp),%xmm0
movaps %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  0x14(%rsp),%xmm3
ucomiss %xmm3,%xmm1
movaps %xmm2,%xmm1
addss  %xmm3,%xmm1
jbe    117a <main+0x5a>
addss  %xmm0,%xmm3
ucomiss %xmm2,%xmm3
jbe    117a <main+0x5a>
addss  %xmm1,%xmm0
lea    0xe97(%rip),%rdi
jmp    1199 <main+0x79>
cvtss2sd %xmm1,%xmm1
mulsd  0xe7a(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%f%f%f\00"
@.str.1 = [19 x i8] c"Perimetro = %0.1f\0A\00"
@.str.2 = [14 x i8] c"Area = %0.1f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3)
%8 = load float, float* %2
%9 = load float, float* %3
%10 = fadd float %8, %9
%11 = load float, float* %1
%12 = fcmp ogt float %10, %11
%13 = fadd float %9, %11
%14 = fcmp ogt float %13, %8
%15 = and i1 %12, %14
%16 = fadd float %8, %11
br i1 %15, label %17, label %20
17: ; preds = %0
%18 = fadd float %9, %16
%19 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), float %18)
br label %27
20: ; preds = %0
%21 = fpext float %16 to double
%22 = fmul double %21, 5.000000e-01
%23 = fpext float %9 to double
%24 = fmul double %22, %23
%25 = fptrunc double %24 to float
%26 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), float %25)
br label %27
27: ; preds = %20, %17
ret i32 0
}