#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 *, double);
int /*<<< orphan*/ scanf(char *, double *);
double sqrt(double);
int main() {
  double l1, l2, l3;
  scanf("%lf", &l1);
  scanf("%lf", &l2);
  scanf("%lf", &l3);
  double t = (l1 + l2 + l3) / 2;
  double x = t * (t - l1) * (t - l2) * (t - l3);
  double a = sqrt(x);
  printf("A AREA DO TRIANGULO E = %0.2f\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb2(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea2(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  0xe7a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xecc(%rip),%rbx
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movapd %xmm1,%xmm0
addsd  %xmm2,%xmm0
movsd  0x8(%rsp),%xmm3
addsd  %xmm3,%xmm0
mulsd  0xe77(%rip),%xmm0
movapd %xmm0,%xmm4
subsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm0,%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm4,%xmm1
subsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11b9 <main+0x89>
sqrtsd %xmm0,%xmm0
jmp    11be <main+0x8e>
call   1050 <sqrt@plt>
lea    0xe47(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [31 x i8] c"A AREA DO TRIANGULO E = %0.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %4)
%11 = load double, double* %2
%12 = load double, double* %3
%13 = fadd double %11, %12
%14 = load double, double* %4
%15 = fadd double %13, %14
%16 = fdiv double %15, 2.000000e+00
store double %16, double* %5
%17 = load double, double* %5
%18 = load double, double* %5
%19 = load double, double* %2
%20 = fsub double %18, %19
%21 = fmul double %17, %20
%22 = load double, double* %5
%23 = load double, double* %3
%24 = fsub double %22, %23
%25 = fmul double %21, %24
%26 = load double, double* %5
%27 = load double, double* %4
%28 = fsub double %26, %27
%29 = fmul double %25, %28
store double %29, double* %6
%30 = load double, double* %6
%31 = call double @sqrt(double %30)
store double %31, double* %7
%32 = load double, double* %7
%33 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), double %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [31 x i8] c"A AREA DO TRIANGULO E = %0.2f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%10 = load double, double* %1
%11 = load double, double* %2
%12 = fadd double %10, %11
%13 = load double, double* %3
%14 = fadd double %12, %13
%15 = fmul double %14, 5.000000e-01
%16 = fsub double %15, %10
%17 = fmul double %15, %16
%18 = fsub double %15, %11
%19 = fmul double %18, %17
%20 = fsub double %15, %13
%21 = fmul double %20, %19
%22 = call double @sqrt(double %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), double %22)
ret i32 0
}