#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *, float *, float *);
float sqrt(float);
void main() {
  float x, y, z, s, dime;
  scanf("%f%f%f", &x, &y, &z);
  if (x + y > z && x + z > y && y + z > x) {
    s = (x + y + z) / 2;
    dime = sqrt(s * (s - x) * (s - y) * (s - z));
    printf("三角形面积为%f\n", dime);
  } else
    printf("无法构成三角形");
  getchar();
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xeb5(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1050 <scanf@plt>
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1211 <main+0xd1>
movss  -0x4(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1211 <main+0xd1>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1211 <main+0xd1>
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  0xe4d(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
mulss  %xmm1,%xmm0
call   1060 <sqrt@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe06(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    121f <main+0xdf>
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeb9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm3
movss  0x10(%rsp),%xmm2
movaps %xmm3,%xmm0
addss  %xmm2,%xmm0
movss  0xc(%rsp),%xmm1
ucomiss %xmm1,%xmm0
jbe    11cd <main+0x8d>
movaps %xmm3,%xmm4
addss  %xmm1,%xmm4
ucomiss %xmm2,%xmm4
jbe    11cd <main+0x8d>
movaps %xmm2,%xmm4
addss  %xmm1,%xmm4
ucomiss %xmm3,%xmm4
jbe    11cd <main+0x8d>
addss  %xmm1,%xmm0
mulss  0xe5f(%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     11dd <main+0x9d>
sqrtss %xmm0,%xmm0
jmp    11e2 <main+0xa2>
lea    0xe4d(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    11f4 <main+0xb4>
call   1060 <sqrt@plt>
cvtss2sd %xmm0,%xmm0
lea    0xe1e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%f%f%f\00"
@.str.1 = [22 x i8] c"\E4\B8\89\E8\A7\92\E5\BD\A2\E9\9D\A2\E7\A7\AF\E4\B8\BA%f\0A\00"
@.str.2 = [22 x i8] c"\E6\97\A0\E6\B3\95\E6\9E\84\E6\88\90\E4\B8\89\E8\A7\92\E5\BD\A2\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3)
%7 = load float, float* %1
%8 = load float, float* %2
%9 = fadd float %7, %8
%10 = load float, float* %3
%11 = fcmp ogt float %9, %10
br i1 %11, label %12, label %48
12: ; preds = %0
%13 = load float, float* %1
%14 = load float, float* %3
%15 = fadd float %13, %14
%16 = load float, float* %2
%17 = fcmp ogt float %15, %16
br i1 %17, label %18, label %48
18: ; preds = %12
%19 = load float, float* %2
%20 = load float, float* %3
%21 = fadd float %19, %20
%22 = load float, float* %1
%23 = fcmp ogt float %21, %22
br i1 %23, label %24, label %48
24: ; preds = %18
%25 = load float, float* %1
%26 = load float, float* %2
%27 = fadd float %25, %26
%28 = load float, float* %3
%29 = fadd float %27, %28
%30 = fdiv float %29, 2.000000e+00
store float %30, float* %4
%31 = load float, float* %4
%32 = load float, float* %4
%33 = load float, float* %1
%34 = fsub float %32, %33
%35 = fmul float %31, %34
%36 = load float, float* %4
%37 = load float, float* %2
%38 = fsub float %36, %37
%39 = fmul float %35, %38
%40 = load float, float* %4
%41 = load float, float* %3
%42 = fsub float %40, %41
%43 = fmul float %39, %42
%44 = call float @sqrt(float %43)
store float %44, float* %5
%45 = load float, float* %5
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %46)
br label %50
48: ; preds = %18, %12, %0
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
br label %50
50: ; preds = %48, %24
%51 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%f%f%f\00"
@.str.1 = [22 x i8] c"\E4\B8\89\E8\A7\92\E5\BD\A2\E9\9D\A2\E7\A7\AF\E4\B8\BA%f\0A\00"
@.str.2 = [22 x i8] c"\E6\97\A0\E6\B3\95\E6\9E\84\E6\88\90\E4\B8\89\E8\A7\92\E5\BD\A2\00"
define void @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* %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 %31
19: ; preds = %0
%20 = fadd float %10, %11
%21 = fmul float %20, 5.000000e-01
%22 = fsub float %21, %8
%23 = fmul float %21, %22
%24 = fsub float %21, %9
%25 = fmul float %24, %23
%26 = fsub float %21, %11
%27 = fmul float %26, %25
%28 = call float @sqrt(float %27)
%29 = fpext float %28 to double
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %29)
br label %33
31: ; preds = %0
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
br label %33
33: ; preds = %31, %19
%34 = call i32 (...) @getchar()
ret void
}