#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;
  scanf(" %f %f %f", &A, &B, &C);
  if ((A < B + C) && (B < A + C) && (C < B + A))
    printf("Perimetro = %0.1f\n", A + B + C);
  else
    printf("Area = %0.1f\n", ((A + B) * C) / 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11af <main+0x8f>
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11af <main+0x8f>
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11af <main+0x8f>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
jmp    11d6 <main+0xb6>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  0xe3a(%rip),%xmm1
divss  %xmm1,%xmm0
lea    0xe50(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed9(%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
movss  0xc(%rsp),%xmm1
movaps %xmm3,%xmm0
addss  %xmm1,%xmm0
ucomiss %xmm2,%xmm0
movaps %xmm2,%xmm0
addss  %xmm3,%xmm0
jbe    117f <main+0x5f>
addss  %xmm1,%xmm2
ucomiss %xmm3,%xmm2
jbe    117f <main+0x5f>
ucomiss %xmm1,%xmm0
jbe    117f <main+0x5f>
addss  %xmm1,%xmm0
lea    0xe91(%rip),%rdi
jmp    1192 <main+0x72>
mulss  %xmm1,%xmm0
mulss  0xe75(%rip),%xmm0
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

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