#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*/ solve2(double **, double *, double *);
void getcenter(double xs, double ys, double xi, double yi, double xe, double ye,
               double *xc, double *yc) {
  double c[2] = {0, 0};
  double x2, y2, x3, y3, m[2][2], b[2];
  x2 = xi - xs;
  y2 = yi - ys;
  x3 = xe - xs;
  y3 = ye - ys;
  m[0][0] = 2 * x2;
  m[1][0] = 2 * y2;
  m[0][1] = 2 * x3;
  m[1][1] = 2 * y3;
  b[0] = x2 * x2 + y2 * y2;
  b[1] = x3 * x3 + y3 * y3;
  solve2(m, b, c);
  *xc = c[0] + xs;
  *yc = c[1] + ys;
}


x86 assembly (clang, -O0):
<getcenter>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
mov    %rdi,-0x38(%rbp)
mov    %rsi,-0x40(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xe5b(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xe46(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xe34(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xe1f(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
lea    -0x90(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0x50(%rbp),%rdx
call   1040 <solve2@plt>
movsd  -0x50(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getcenter>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movapd %xmm1,0x10(%rsp)
movapd %xmm0,0x20(%rsp)
xorps  %xmm6,%xmm6
movaps %xmm6,(%rsp)
unpcklpd %xmm4,%xmm2
movapd %xmm0,%xmm4
unpcklpd %xmm0,%xmm4
subpd  %xmm4,%xmm2
unpcklpd %xmm5,%xmm3
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
subpd  %xmm0,%xmm3
movapd %xmm2,%xmm0
addpd  %xmm2,%xmm0
movapd %xmm0,0x40(%rsp)
movapd %xmm3,%xmm0
addpd  %xmm3,%xmm0
movapd %xmm0,0x50(%rsp)
mulpd  %xmm3,%xmm3
mulpd  %xmm2,%xmm2
addpd  %xmm3,%xmm2
movapd %xmm2,0x30(%rsp)
lea    0x40(%rsp),%rdi
lea    0x30(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <solve2@plt>
movapd 0x20(%rsp),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rbx)
movapd 0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @getcenter(double %0, double %1, double %2, double %3, double %4, double %5, double* nocapture writeonly %6, double* nocapture writeonly %7) {
%9 = alloca [2 x double]
%10 = alloca [2 x [2 x double]]
%11 = alloca <2 x double>
%12 = bitcast [2 x double]* %9 to i8*
%13 = bitcast [2 x [2 x double]]* %10 to i8*
%14 = bitcast <2 x double>* %11 to i8*
%15 = insertelement <2 x double> poison, double %2, i64 0
%16 = insertelement <2 x double> %15, double %4, i64 1
%17 = insertelement <2 x double> poison, double %0, i64 0
%18 = shufflevector <2 x double> %17, <2 x double> poison, <2 x i32> zeroinitializer
%19 = fsub <2 x double> %16, %18
%20 = insertelement <2 x double> poison, double %3, i64 0
%21 = insertelement <2 x double> %20, double %5, i64 1
%22 = insertelement <2 x double> poison, double %1, i64 0
%23 = shufflevector <2 x double> %22, <2 x double> poison, <2 x i32> zeroinitializer
%24 = fsub <2 x double> %21, %23
%25 = getelementptr inbounds [2 x [2 x double]], [2 x [2 x double]]* %10, i64 0, i64 1, i64 0
%26 = fmul <2 x double> %19, <double 2.000000e+00, double 2.000000e+00>
%27 = bitcast [2 x [2 x double]]* %10 to <2 x double>*
store <2 x double> %26, <2 x double>* %27
%28 = fmul <2 x double> %24, <double 2.000000e+00, double 2.000000e+00>
%29 = bitcast double* %25 to <2 x double>*
store <2 x double> %28, <2 x double>* %29
%30 = getelementptr inbounds <2 x double>, <2 x double>* %11, i64 0, i64 0
%31 = fmul <2 x double> %24, %24
%32 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %19, <2 x double> %19, <2 x double> %31)
store <2 x double> %32, <2 x double>* %11
%33 = bitcast [2 x [2 x double]]* %10 to double**
%34 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
%35 = call i32 @solve2(double** %33, double* %30, double* %34)
%36 = load double, double* %34
%37 = fadd double %36, %0
store double %37, double* %6
%38 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 1
%39 = load double, double* %38
%40 = fadd double %39, %1
store double %40, double* %7
ret void
}