#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 */
double N_sqrt(int, int, int, int);
double line(int x0, int y0, int x1, int y1, int x2, int y2) {
  double a, b, c, cos_a, temp;
  a = N_sqrt(x0, y0, x1, y1);
  b = N_sqrt(x0, y0, x2, y2);
  c = N_sqrt(x1, y1, x2, y2);
  cos_a = (b * b + c * c - a * a) / (2.0 * b * c);
  return 2 * b * c * (1 - cos_a * cos_a) / a;
}


x86 assembly (clang, -O0):
<line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <N_sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <N_sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <N_sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe4d(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe32(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xdf3(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x20(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,%r13d
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <N_sqrt@plt>
movsd  %xmm0,0x10(%rsp)
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1030 <N_sqrt@plt>
movsd  %xmm0,0x8(%rsp)
mov    %r13d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1030 <N_sqrt@plt>
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm4,%xmm2
addsd  %xmm1,%xmm2
movsd  0x10(%rsp),%xmm3
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
subsd  %xmm1,%xmm2
addsd  %xmm4,%xmm4
mulsd  %xmm4,%xmm0
divsd  %xmm0,%xmm2
mulsd  %xmm2,%xmm2
movsd  0xe5d(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  %xmm3,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @line(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = load i32, i32* %9
%21 = load i32, i32* %10
%22 = call double @N_sqrt(i32 %18, i32 %19, i32 %20, i32 %21)
store double %22, double* %13
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = load i32, i32* %11
%26 = load i32, i32* %12
%27 = call double @N_sqrt(i32 %23, i32 %24, i32 %25, i32 %26)
store double %27, double* %14
%28 = load i32, i32* %9
%29 = load i32, i32* %10
%30 = load i32, i32* %11
%31 = load i32, i32* %12
%32 = call double @N_sqrt(i32 %28, i32 %29, i32 %30, i32 %31)
store double %32, double* %15
%33 = load double, double* %14
%34 = load double, double* %14
%35 = load double, double* %15
%36 = load double, double* %15
%37 = fmul double %35, %36
%38 = call double @llvm.fmuladd.f64(double %33, double %34, double %37)
%39 = load double, double* %13
%40 = load double, double* %13
%41 = fneg double %39
%42 = call double @llvm.fmuladd.f64(double %41, double %40, double %38)
%43 = load double, double* %14
%44 = fmul double 2.000000e+00, %43
%45 = load double, double* %15
%46 = fmul double %44, %45
%47 = fdiv double %42, %46
store double %47, double* %16
%48 = load double, double* %14
%49 = fmul double 2.000000e+00, %48
%50 = load double, double* %15
%51 = fmul double %49, %50
%52 = load double, double* %16
%53 = load double, double* %16
%54 = fneg double %52
%55 = call double @llvm.fmuladd.f64(double %54, double %53, double 1.000000e+00)
%56 = fmul double %51, %55
%57 = load double, double* %13
%58 = fdiv double %56, %57
ret double %58
}

LLVM IR (-O2):
define double @line(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call double @N_sqrt(i32 %0, i32 %1, i32 %2, i32 %3)
%8 = tail call double @N_sqrt(i32 %0, i32 %1, i32 %4, i32 %5)
%9 = tail call double @N_sqrt(i32 %2, i32 %3, i32 %4, i32 %5)
%10 = fmul double %9, %9
%11 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %10)
%12 = fneg double %7
%13 = tail call double @llvm.fmuladd.f64(double %12, double %7, double %11)
%14 = fmul double %8, 2.000000e+00
%15 = fmul double %14, %9
%16 = fdiv double %13, %15
%17 = fneg double %16
%18 = tail call double @llvm.fmuladd.f64(double %17, double %16, double 1.000000e+00)
%19 = fmul double %15, %18
%20 = fdiv double %19, %7
ret double %20
}