#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(void) {
  float a, b, c;
  scanf("%f %f %f", &a, &b, &c);
  if (a + b > c && a + c > b && b + c > a) {
    printf("Perimetro = %0.1f\n", a + b + c);
  } else {
    float ar = 0.5 * (a + b) * c;
    printf("Area = %0.1f\n", ar);
  }
  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  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    11a3 <main+0x83>
movss  -0x8(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    11a3 <main+0x83>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    11a3 <main+0x83>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
jmp    11e4 <main+0xc4>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe47(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xe45(%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  0x14(%rsp),%xmm2
movss  0x10(%rsp),%xmm3
movaps %xmm2,%xmm0
addss  %xmm3,%xmm0
movss  0xc(%rsp),%xmm1
ucomiss %xmm1,%xmm0
jbe    117f <main+0x5f>
movaps %xmm2,%xmm4
addss  %xmm1,%xmm4
ucomiss %xmm3,%xmm4
jbe    117f <main+0x5f>
addss  %xmm1,%xmm3
ucomiss %xmm2,%xmm3
jbe    117f <main+0x5f>
addss  %xmm1,%xmm0
lea    0xe94(%rip),%rdi
jmp    11a1 <main+0x81>
cvtss2sd %xmm0,%xmm0
mulsd  0xe75(%rip),%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

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