#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 *, double *, double *,
                         double *, double *);
double sqrt(double);
int main() {
  double x1, y1, x2, y2, x3, y3, a, b, c, p, s;
  scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);
  a = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  b = sqrt((x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3));
  c = sqrt((x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3));
  p = (a + b + c) / 2;
  s = sqrt(p * (p - a) * (p - b) * (p - c));
  printf("Area:%lf", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
lea    -0x30(%rbp),%r9
lea    -0x38(%rbp),%rax
mov    %rax,(%rsp)
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
subsd  -0x20(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm3
subsd  -0x28(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
subsd  -0x30(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
subsd  -0x38(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm3
subsd  -0x38(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
subsd  -0x30(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
subsd  -0x38(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm3
subsd  -0x38(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  0xdc8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
subsd  -0x40(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x58(%rbp),%xmm1
subsd  -0x48(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x58(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
lea    0xd95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
lea    0x10(%rsp),%rax
mov    %rax,(%rsp)
lea    0xec4(%rip),%rdi
lea    0x38(%rsp),%rsi
lea    0x30(%rsp),%rdx
lea    0x28(%rsp),%rcx
lea    0x20(%rsp),%r8
lea    0x18(%rsp),%r9
call   1040 <scanf@plt>
movsd  0x38(%rsp),%xmm0
subsd  0x28(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
subsd  0x20(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jb     1196 <main+0x66>
sqrtsd %xmm0,%xmm0
jmp    119f <main+0x6f>
call   1050 <sqrt@plt>
xorpd  %xmm2,%xmm2
movsd  %xmm0,0x8(%rsp)
movsd  0x38(%rsp),%xmm0
subsd  0x18(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
subsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     11d5 <main+0xa5>
sqrtsd %xmm0,%xmm4
jmp    11de <main+0xae>
call   1050 <sqrt@plt>
movapd %xmm0,%xmm4
movsd  0x28(%rsp),%xmm0
subsd  0x18(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
subsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm5,%xmm5
ucomisd %xmm5,%xmm0
jb     1215 <main+0xe5>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    122e <main+0xfe>
movsd  %xmm4,0x40(%rsp)
call   1050 <sqrt@plt>
xorpd  %xmm5,%xmm5
movsd  0x40(%rsp),%xmm4
movapd %xmm0,%xmm1
movsd  0x8(%rsp),%xmm3
movapd %xmm3,%xmm0
addsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
mulsd  0xdb8(%rip),%xmm0
movapd %xmm0,%xmm2
subsd  %xmm3,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm0,%xmm3
subsd  %xmm4,%xmm3
mulsd  %xmm2,%xmm3
subsd  %xmm1,%xmm0
mulsd  %xmm3,%xmm0
ucomisd %xmm5,%xmm0
jb     1274 <main+0x144>
sqrtsd %xmm0,%xmm0
jmp    1279 <main+0x149>
call   1050 <sqrt@plt>
lea    0xd9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"%lf%lf%lf%lf%lf%lf\00"
@.str.1 = [9 x i8] c"Area:%lf\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
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store i32 0, i32* %1
%13 = call i32 @scanf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4, double* %5, double* %6, double* %7)
%14 = load double, double* %2
%15 = load double, double* %4
%16 = fsub double %14, %15
%17 = load double, double* %2
%18 = load double, double* %4
%19 = fsub double %17, %18
%20 = load double, double* %3
%21 = load double, double* %5
%22 = fsub double %20, %21
%23 = load double, double* %3
%24 = load double, double* %5
%25 = fsub double %23, %24
%26 = fmul double %22, %25
%27 = call double @llvm.fmuladd.f64(double %16, double %19, double %26)
%28 = call double @sqrt(double %27)
store double %28, double* %8
%29 = load double, double* %2
%30 = load double, double* %6
%31 = fsub double %29, %30
%32 = load double, double* %2
%33 = load double, double* %6
%34 = fsub double %32, %33
%35 = load double, double* %3
%36 = load double, double* %7
%37 = fsub double %35, %36
%38 = load double, double* %3
%39 = load double, double* %7
%40 = fsub double %38, %39
%41 = fmul double %37, %40
%42 = call double @llvm.fmuladd.f64(double %31, double %34, double %41)
%43 = call double @sqrt(double %42)
store double %43, double* %9
%44 = load double, double* %4
%45 = load double, double* %6
%46 = fsub double %44, %45
%47 = load double, double* %4
%48 = load double, double* %6
%49 = fsub double %47, %48
%50 = load double, double* %5
%51 = load double, double* %7
%52 = fsub double %50, %51
%53 = load double, double* %5
%54 = load double, double* %7
%55 = fsub double %53, %54
%56 = fmul double %52, %55
%57 = call double @llvm.fmuladd.f64(double %46, double %49, double %56)
%58 = call double @sqrt(double %57)
store double %58, double* %10
%59 = load double, double* %8
%60 = load double, double* %9
%61 = fadd double %59, %60
%62 = load double, double* %10
%63 = fadd double %61, %62
%64 = fdiv double %63, 2.000000e+00
store double %64, double* %11
%65 = load double, double* %11
%66 = load double, double* %11
%67 = load double, double* %8
%68 = fsub double %66, %67
%69 = fmul double %65, %68
%70 = load double, double* %11
%71 = load double, double* %9
%72 = fsub double %70, %71
%73 = fmul double %69, %72
%74 = load double, double* %11
%75 = load double, double* %10
%76 = fsub double %74, %75
%77 = fmul double %73, %76
%78 = call double @sqrt(double %77)
store double %78, double* %12
%79 = load double, double* %12
%80 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %79)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"%lf%lf%lf%lf%lf%lf\00"
@.str.1 = [9 x i8] c"Area:%lf\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %1 to i8*
%8 = bitcast double* %2 to i8*
%9 = bitcast double* %3 to i8*
%10 = bitcast double* %4 to i8*
%11 = bitcast double* %5 to i8*
%12 = bitcast double* %6 to i8*
%13 = call i32 @scanf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3, double* %4, double* %5, double* %6)
%14 = load double, double* %1
%15 = load double, double* %3
%16 = fsub double %14, %15
%17 = load double, double* %2
%18 = load double, double* %4
%19 = fsub double %17, %18
%20 = fmul double %19, %19
%21 = call double @llvm.fmuladd.f64(double %16, double %16, double %20)
%22 = call double @sqrt(double %21)
%23 = load double, double* %1
%24 = load double, double* %5
%25 = fsub double %23, %24
%26 = load double, double* %2
%27 = load double, double* %6
%28 = fsub double %26, %27
%29 = fmul double %28, %28
%30 = call double @llvm.fmuladd.f64(double %25, double %25, double %29)
%31 = call double @sqrt(double %30)
%32 = load double, double* %3
%33 = load double, double* %5
%34 = fsub double %32, %33
%35 = load double, double* %4
%36 = load double, double* %6
%37 = fsub double %35, %36
%38 = fmul double %37, %37
%39 = call double @llvm.fmuladd.f64(double %34, double %34, double %38)
%40 = call double @sqrt(double %39)
%41 = fadd double %22, %31
%42 = fadd double %41, %40
%43 = fmul double %42, 5.000000e-01
%44 = fsub double %43, %22
%45 = fmul double %43, %44
%46 = fsub double %43, %31
%47 = fmul double %46, %45
%48 = fsub double %43, %40
%49 = fmul double %48, %47
%50 = call double @sqrt(double %49)
%51 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %50)
ret i32 0
}