#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 *, ...);
int /*<<< orphan*/ scanf(char *, float *, float *, float *);
float sqrt(float);
main() {
  float a, b, c, A, B, H;
  printf("Введите длины сторон a,b,c");
  scanf("%f%f%f", &a, &b, &c);
  if (a < b + c && b < a + c && c < a + b) {
    if (a <= 0 && b <= 0 && c <= 0)
      printf("Неверное условие, введите числа больше 0");
    else
      A = (a + b + c) / 2;
    B = sqrt(A * (A - a) * (A - b) * (A - c));
    H = ((2 * B) / a) * ((2 * B) / b) * ((2 * B) / c);
    printf("Произведение высот = %f", H);
  } else
    printf("Эти длины сторон не являются сторонами треугольника");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%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    129f <main+0x16f>
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    129f <main+0x16f>
movss  -0x10(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    129f <main+0x16f>
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11e7 <main+0xb7>
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     11e7 <main+0xb7>
xorps  %xmm0,%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     11e7 <main+0xb7>
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1207 <main+0xd7>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  0xe02(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
subss  -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sqrt@plt>
movss  %xmm0,-0x18(%rbp)
movss  0xdb8(%rip),%xmm0
mulss  -0x18(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  0xda6(%rip),%xmm1
mulss  -0x18(%rbp),%xmm1
divss  -0xc(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xd90(%rip),%xmm1
mulss  -0x18(%rbp),%xmm1
divss  -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdef(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    12ad <main+0x17d>
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm3
movss  0x10(%rsp),%xmm2
movss  0xc(%rsp),%xmm1
movaps %xmm2,%xmm0
addss  %xmm1,%xmm0
ucomiss %xmm3,%xmm0
jbe    11ca <main+0x9a>
movaps %xmm3,%xmm0
addss  %xmm1,%xmm0
ucomiss %xmm2,%xmm0
jbe    11ca <main+0x9a>
movaps %xmm3,%xmm0
addss  %xmm2,%xmm0
ucomiss %xmm1,%xmm0
jbe    11ca <main+0x9a>
xorps  %xmm4,%xmm4
ucomiss %xmm3,%xmm4
jb     11da <main+0xaa>
ucomiss %xmm2,%xmm4
jb     11da <main+0xaa>
xorps  %xmm4,%xmm4
ucomiss %xmm1,%xmm4
jb     11da <main+0xaa>
lea    0xe89(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0x14(%rsp),%xmm3
movss  0x10(%rsp),%xmm2
movss  0xc(%rsp),%xmm1
jmp    11e6 <main+0xb6>
lea    0xeda(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1258 <main+0x128>
addss  %xmm1,%xmm0
mulss  0xe1a(%rip),%xmm0
movaps %xmm0,%xmm4
subss  %xmm3,%xmm4
mulss  %xmm0,%xmm4
movaps %xmm0,%xmm3
subss  %xmm2,%xmm3
mulss  %xmm4,%xmm3
subss  %xmm1,%xmm0
mulss  %xmm3,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1212 <main+0xe2>
sqrtss %xmm0,%xmm0
jmp    1217 <main+0xe7>
call   1050 <sqrt@plt>
addss  %xmm0,%xmm0
movaps %xmm0,%xmm1
divss  0x10(%rsp),%xmm1
shufps $0x0,%xmm0,%xmm0
movss  0xc(%rsp),%xmm2
movss  0x14(%rsp),%xmm3
unpcklps %xmm2,%xmm3
divps  %xmm3,%xmm0
mulss  %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm0
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe31(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [45 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\B4\D0\BB\D0\B8\D0\BD\D1\8B \D1\81\D1\82\D0\BE\D1\80\D0\BE\D0\BD a,b,c\00"
@.str.1 = [7 x i8] c"%f%f%f\00"
@.str.2 = [74 x i8] c"\D0\9D\D0\B5\D0\B2\D0\B5\D1\80\D0\BD\D0\BE\D0\B5 \D1\83\D1\81\D0\BB\D0\BE\D0\B2\D0\B8\D0\B5, \D0\B2\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D1\87\D0\B8\D1\81\D0\BB\D0\B0 \D0\B1\D0\BE\D0\BB\D1\8C\D1\88\D0\B5 0\00"
@.str.3 = [41 x i8] c"\D0\9F\D1\80\D0\BE\D0\B8\D0\B7\D0\B2\D0\B5\D0\B4\D0\B5\D0\BD\D0\B8\D0\B5 \D0\B2\D1\8B\D1\81\D0\BE\D1\82 = %f\00"
@.str.4 = [97 x i8] c"\D0\AD\D1\82\D0\B8 \D0\B4\D0\BB\D0\B8\D0\BD\D1\8B \D1\81\D1\82\D0\BE\D1\80\D0\BE\D0\BD \D0\BD\D0\B5 \D1\8F\D0\B2\D0\BB\D1\8F\D1\8E\D1\82\D1\81\D1\8F \D1\81\D1\82\D0\BE\D1\80\D0\BE\D0\BD\D0\B0\D0\BC\D0\B8 \D1\82\D1\80\D0\B5\D1\83\D0\B3\D0\BE\D0\BB\D1\8C\D0\BD\D0\B8\D0\BA\D0\B0\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float* %2, float* %3, float* %4)
%10 = load float, float* %2
%11 = load float, float* %3
%12 = load float, float* %4
%13 = fadd float %11, %12
%14 = fcmp olt float %10, %13
br i1 %14, label %15, label %77
15: ; preds = %0
%16 = load float, float* %3
%17 = load float, float* %2
%18 = load float, float* %4
%19 = fadd float %17, %18
%20 = fcmp olt float %16, %19
br i1 %20, label %21, label %77
21: ; preds = %15
%22 = load float, float* %4
%23 = load float, float* %2
%24 = load float, float* %3
%25 = fadd float %23, %24
%26 = fcmp olt float %22, %25
br i1 %26, label %27, label %77
27: ; preds = %21
%28 = load float, float* %2
%29 = fcmp ole float %28, 0.000000e+00
br i1 %29, label %30, label %38
30: ; preds = %27
%31 = load float, float* %3
%32 = fcmp ole float %31, 0.000000e+00
br i1 %32, label %33, label %38
33: ; preds = %30
%34 = load float, float* %4
%35 = fcmp ole float %34, 0.000000e+00
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.2, i64 0, i64 0))
br label %45
38: ; preds = %33, %30, %27
%39 = load float, float* %2
%40 = load float, float* %3
%41 = fadd float %39, %40
%42 = load float, float* %4
%43 = fadd float %41, %42
%44 = fdiv float %43, 2.000000e+00
store float %44, float* %5
br label %45
45: ; preds = %38, %36
%46 = load float, float* %5
%47 = load float, float* %5
%48 = load float, float* %2
%49 = fsub float %47, %48
%50 = fmul float %46, %49
%51 = load float, float* %5
%52 = load float, float* %3
%53 = fsub float %51, %52
%54 = fmul float %50, %53
%55 = load float, float* %5
%56 = load float, float* %4
%57 = fsub float %55, %56
%58 = fmul float %54, %57
%59 = call float @sqrt(float %58)
store float %59, float* %6
%60 = load float, float* %6
%61 = fmul float 2.000000e+00, %60
%62 = load float, float* %2
%63 = fdiv float %61, %62
%64 = load float, float* %6
%65 = fmul float 2.000000e+00, %64
%66 = load float, float* %3
%67 = fdiv float %65, %66
%68 = fmul float %63, %67
%69 = load float, float* %6
%70 = fmul float 2.000000e+00, %69
%71 = load float, float* %4
%72 = fdiv float %70, %71
%73 = fmul float %68, %72
store float %73, float* %7
%74 = load float, float* %7
%75 = fpext float %74 to double
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), double %75)
br label %79
77: ; preds = %21, %15, %0
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.4, i64 0, i64 0))
br label %79
79: ; preds = %77, %45
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\B4\D0\BB\D0\B8\D0\BD\D1\8B \D1\81\D1\82\D0\BE\D1\80\D0\BE\D0\BD a,b,c\00"
@.str.1 = [7 x i8] c"%f%f%f\00"
@.str.2 = [74 x i8] c"\D0\9D\D0\B5\D0\B2\D0\B5\D1\80\D0\BD\D0\BE\D0\B5 \D1\83\D1\81\D0\BB\D0\BE\D0\B2\D0\B8\D0\B5, \D0\B2\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D1\87\D0\B8\D1\81\D0\BB\D0\B0 \D0\B1\D0\BE\D0\BB\D1\8C\D1\88\D0\B5 0\00"
@.str.3 = [41 x i8] c"\D0\9F\D1\80\D0\BE\D0\B8\D0\B7\D0\B2\D0\B5\D0\B4\D0\B5\D0\BD\D0\B8\D0\B5 \D0\B2\D1\8B\D1\81\D0\BE\D1\82 = %f\00"
@.str.4 = [97 x i8] c"\D0\AD\D1\82\D0\B8 \D0\B4\D0\BB\D0\B8\D0\BD\D1\8B \D1\81\D1\82\D0\BE\D1\80\D0\BE\D0\BD \D0\BD\D0\B5 \D1\8F\D0\B2\D0\BB\D1\8F\D1\8E\D1\82\D1\81\D1\8F \D1\81\D1\82\D0\BE\D1\80\D0\BE\D0\BD\D0\B0\D0\BC\D0\B8 \D1\82\D1\80\D0\B5\D1\83\D0\B3\D0\BE\D0\BB\D1\8C\D0\BD\D0\B8\D0\BA\D0\B0\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 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, float* %3)
%9 = load float, float* %1
%10 = load float, float* %2
%11 = load float, float* %3
%12 = fadd float %10, %11
%13 = fcmp olt float %9, %12
%14 = fadd float %9, %11
%15 = fcmp olt float %10, %14
%16 = and i1 %13, %15
br i1 %16, label %17, label %62
17: ; preds = %0
%18 = fadd float %9, %10
%19 = fcmp olt float %11, %18
br i1 %19, label %20, label %62
20: ; preds = %17
%21 = fcmp ole float %9, 0.000000e+00
%22 = fcmp ole float %10, 0.000000e+00
%23 = select i1 %21, i1 %22, i1 false
%24 = fcmp ole float %11, 0.000000e+00
%25 = select i1 %23, i1 %24, i1 false
br i1 %25, label %26, label %31
26: ; preds = %20
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str.2, i64 0, i64 0))
%28 = load float, float* %1
%29 = load float, float* %2
%30 = load float, float* %3
br label %34
31: ; preds = %20
%32 = fadd float %18, %11
%33 = fmul float %32, 5.000000e-01
br label %34
34: ; preds = %31, %26
%35 = phi float [ %30, %26 ], [ %11, %31 ]
%36 = phi float [ %29, %26 ], [ %10, %31 ]
%37 = phi float [ %28, %26 ], [ %9, %31 ]
%38 = phi float [ undef, %26 ], [ %33, %31 ]
%39 = fsub float %38, %37
%40 = fmul float %38, %39
%41 = fsub float %38, %36
%42 = fmul float %40, %41
%43 = fsub float %38, %35
%44 = fmul float %42, %43
%45 = call float @sqrt(float %44)
%46 = fmul float %45, 2.000000e+00
%47 = load float, float* %1
%48 = load float, float* %2
%49 = fdiv float %46, %48
%50 = load float, float* %3
%51 = insertelement <2 x float> poison, float %46, i64 0
%52 = shufflevector <2 x float> %51, <2 x float> poison, <2 x i32> zeroinitializer
%53 = insertelement <2 x float> poison, float %47, i64 0
%54 = insertelement <2 x float> %53, float %50, i64 1
%55 = fdiv <2 x float> %52, %54
%56 = extractelement <2 x float> %55, i64 0
%57 = fmul float %56, %49
%58 = extractelement <2 x float> %55, i64 1
%59 = fmul float %57, %58
%60 = fpext float %59 to double
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), double %60)
br label %64
62: ; preds = %17, %0
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @.str.4, i64 0, i64 0))
br label %64
64: ; preds = %62, %34
ret i32 0
}