#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*/ intersection2DLSSFCT(double, double, double, double, double,
                                        double, double, double, double *);
void find_center_circularArc(double p1_x, double p1_y, double p2_x, double p2_y,
                             double p3_x, double p3_y, double *center) {
  int p1Eqp2 = (p1_x == p2_x && p1_y == p2_y) ? 1 : 0;
  int p1Eqp3 = (p1_x == p3_x && p1_y == p3_y) ? 1 : 0;
  int p2Eqp3 = (p2_x == p3_x && p2_y == p3_y) ? 1 : 0;
  if (p1Eqp2 && p1Eqp3 && p2Eqp3) {
    center[0] = p1_x;
    center[1] = p1_y;
  } else if (p1Eqp2 || p1Eqp3 || p2Eqp3) {
    if (p1Eqp2) {
      center[0] = (p1_x + p3_x) / 2.0;
      center[1] = (p1_y + p3_y) / 2.0;
    } else {
      center[0] = (p1_x + p2_x) / 2.0;
      center[1] = (p1_y + p2_y) / 2.0;
    }
  } else {
    double center1X = (p1_x + p2_x) / 2.0;
    double center1Y = (p1_y + p2_y) / 2.0;
    double center2X = (p2_x + p3_x) / 2.0;
    double center2Y = (p2_y + p3_y) / 2.0;
    double delta1X = p2_x - p1_x;
    double delta1Y = p2_y - p1_y;
    double delta2X = p3_x - p2_x;
    double delta2Y = p3_y - p2_y;
    intersection2DLSSFCT(center1X, center1Y, center1X + delta1Y,
                         center1Y - delta1X, center2X, center2Y,
                         center2X + delta2Y, center2Y - delta2X, center);
  }
}


x86 assembly (clang, -O0):
<find_center_circularArc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%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)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x18(%rbp),%xmm0
mov    %al,-0x89(%rbp)
jne    1173 <find_center_circularArc+0x63>
jp     1173 <find_center_circularArc+0x63>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x89(%rbp)
mov    -0x89(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x3c(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x28(%rbp),%xmm0
mov    %al,-0x8a(%rbp)
jne    11bf <find_center_circularArc+0xaf>
jp     11bf <find_center_circularArc+0xaf>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x8a(%rbp)
mov    -0x8a(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x28(%rbp),%xmm0
mov    %al,-0x8b(%rbp)
jne    120b <find_center_circularArc+0xfb>
jp     120b <find_center_circularArc+0xfb>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x8b(%rbp)
mov    -0x8b(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x3c(%rbp)
je     125f <find_center_circularArc+0x14f>
cmpl   $0x0,-0x40(%rbp)
je     125f <find_center_circularArc+0x14f>
cmpl   $0x0,-0x44(%rbp)
je     125f <find_center_circularArc+0x14f>
movsd  -0x8(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x8(%rax)
jmp    1403 <find_center_circularArc+0x2f3>
cmpl   $0x0,-0x3c(%rbp)
jne    127d <find_center_circularArc+0x16d>
cmpl   $0x0,-0x40(%rbp)
jne    127d <find_center_circularArc+0x16d>
cmpl   $0x0,-0x44(%rbp)
je     130b <find_center_circularArc+0x1fb>
cmpl   $0x0,-0x3c(%rbp)
je     12c9 <find_center_circularArc+0x1b9>
movsd  -0x8(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  0xd67(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  0xd49(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x8(%rax)
jmp    1306 <find_center_circularArc+0x1f6>
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xd25(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  0xd07(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x8(%rax)
jmp    13fe <find_center_circularArc+0x2ee>
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xce3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  0xcc8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  0xcad(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  0xc92(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
addsd  -0x78(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm3
subsd  -0x70(%rbp),%xmm3
movsd  -0x60(%rbp),%xmm4
movsd  -0x68(%rbp),%xmm5
movsd  -0x60(%rbp),%xmm6
addsd  -0x88(%rbp),%xmm6
ff
movsd  -0x68(%rbp),%xmm7
subsd  -0x80(%rbp),%xmm7
mov    -0x38(%rbp),%rdi
call   1030 <intersection2DLSSFCT@plt>
jmp    1403 <find_center_circularArc+0x2f3>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_center_circularArc>:
ucomisd %xmm2,%xmm0
setnp  %al
sete   %cl
and    %al,%cl
ucomisd %xmm3,%xmm1
movapd %xmm5,%xmm6
setnp  %dl
sete   %r8b
and    %dl,%r8b
and    %cl,%r8b
ucomisd %xmm4,%xmm0
setnp  %cl
sete   %dl
and    %cl,%dl
ucomisd %xmm5,%xmm1
setnp  %sil
sete   %cl
and    %sil,%cl
and    %dl,%cl
ucomisd %xmm4,%xmm2
setnp  %dl
sete   %al
and    %dl,%al
ucomisd %xmm5,%xmm3
setnp  %sil
sete   %dl
and    %sil,%dl
and    %al,%dl
cmp    $0x1,%dl
jne    1181 <find_center_circularArc+0x71>
test   %r8b,%r8b
je     1181 <find_center_circularArc+0x71>
test   %cl,%cl
je     1181 <find_center_circularArc+0x71>
movsd  %xmm0,(%rdi)
movsd  %xmm1,0x8(%rdi)
ret
or     %r8b,%cl
or     %cl,%dl
cmp    $0x1,%dl
jne    11ad <find_center_circularArc+0x9d>
unpcklpd %xmm1,%xmm0
test   %r8b,%r8b
je     1227 <find_center_circularArc+0x117>
unpcklpd %xmm6,%xmm4
addpd  %xmm0,%xmm4
mulpd  0xe68(%rip),%xmm4
movupd %xmm4,(%rdi)
ret
movapd %xmm2,%xmm7
subsd  %xmm0,%xmm7
addsd  %xmm2,%xmm0
movsd  0xe3e(%rip),%xmm10
mulsd  %xmm10,%xmm0
movapd %xmm3,%xmm8
subsd  %xmm1,%xmm8
addsd  %xmm3,%xmm1
mulsd  %xmm10,%xmm1
movapd %xmm2,%xmm9
addsd  %xmm4,%xmm9
mulsd  %xmm10,%xmm9
movapd %xmm3,%xmm5
addsd  %xmm6,%xmm5
mulsd  %xmm10,%xmm5
subsd  %xmm2,%xmm4
subsd  %xmm3,%xmm6
addsd  %xmm0,%xmm8
movapd %xmm1,%xmm3
subsd  %xmm7,%xmm3
addsd  %xmm9,%xmm6
movapd %xmm5,%xmm7
subsd  %xmm4,%xmm7
movapd %xmm8,%xmm2
movapd %xmm9,%xmm4
jmp    1030 <intersection2DLSSFCT@plt>
unpcklpd %xmm3,%xmm2
addpd  %xmm0,%xmm2
mulpd  0xdd9(%rip),%xmm2
movupd %xmm2,(%rdi)
ret

LLVM IR (-O0):
define void @find_center_circularArc(double %0, double %1, double %2, double %3, double %4, double %5, double* %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double* %6, double** %14
%26 = load double, double* %8
%27 = load double, double* %10
%28 = fcmp oeq double %26, %27
br i1 %28, label %29, label %33
29: ; preds = %7
%30 = load double, double* %9
%31 = load double, double* %11
%32 = fcmp oeq double %30, %31
br label %33
33: ; preds = %29, %7
%34 = phi i1 [ false, %7 ], [ %32, %29 ]
%35 = zext i1 %34 to i64
%36 = select i1 %34, i32 1, i32 0
store i32 %36, i32* %15
%37 = load double, double* %8
%38 = load double, double* %12
%39 = fcmp oeq double %37, %38
br i1 %39, label %40, label %44
40: ; preds = %33
%41 = load double, double* %9
%42 = load double, double* %13
%43 = fcmp oeq double %41, %42
br label %44
44: ; preds = %40, %33
%45 = phi i1 [ false, %33 ], [ %43, %40 ]
%46 = zext i1 %45 to i64
%47 = select i1 %45, i32 1, i32 0
store i32 %47, i32* %16
%48 = load double, double* %10
%49 = load double, double* %12
%50 = fcmp oeq double %48, %49
br i1 %50, label %51, label %55
51: ; preds = %44
%52 = load double, double* %11
%53 = load double, double* %13
%54 = fcmp oeq double %52, %53
br label %55
55: ; preds = %51, %44
%56 = phi i1 [ false, %44 ], [ %54, %51 ]
%57 = zext i1 %56 to i64
%58 = select i1 %56, i32 1, i32 0
store i32 %58, i32* %17
%59 = load i32, i32* %15
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %74
61: ; preds = %55
%62 = load i32, i32* %16
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %74
64: ; preds = %61
%65 = load i32, i32* %17
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %74
67: ; preds = %64
%68 = load double, double* %8
%69 = load double*, double** %14
%70 = getelementptr inbounds double, double* %69, i64 0
store double %68, double* %70
%71 = load double, double* %9
%72 = load double*, double** %14
%73 = getelementptr inbounds double, double* %72, i64 1
store double %71, double* %73
br label %161
74: ; preds = %64, %61, %55
%75 = load i32, i32* %15
%76 = icmp ne i32 %75, 0
br i1 %76, label %83, label %77
77: ; preds = %74
%78 = load i32, i32* %16
%79 = icmp ne i32 %78, 0
br i1 %79, label %83, label %80
80: ; preds = %77
%81 = load i32, i32* %17
%82 = icmp ne i32 %81, 0
br i1 %82, label %83, label %113
83: ; preds = %80, %77, %74
%84 = load i32, i32* %15
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %99
86: ; preds = %83
%87 = load double, double* %8
%88 = load double, double* %12
%89 = fadd double %87, %88
%90 = fdiv double %89, 2.000000e+00
%91 = load double*, double** %14
%92 = getelementptr inbounds double, double* %91, i64 0
store double %90, double* %92
%93 = load double, double* %9
%94 = load double, double* %13
%95 = fadd double %93, %94
%96 = fdiv double %95, 2.000000e+00
%97 = load double*, double** %14
%98 = getelementptr inbounds double, double* %97, i64 1
store double %96, double* %98
br label %112
99: ; preds = %83
%100 = load double, double* %8
%101 = load double, double* %10
%102 = fadd double %100, %101
%103 = fdiv double %102, 2.000000e+00
%104 = load double*, double** %14
%105 = getelementptr inbounds double, double* %104, i64 0
store double %103, double* %105
%106 = load double, double* %9
%107 = load double, double* %11
%108 = fadd double %106, %107
%109 = fdiv double %108, 2.000000e+00
%110 = load double*, double** %14
%111 = getelementptr inbounds double, double* %110, i64 1
store double %109, double* %111
br label %112
112: ; preds = %99, %86
br label %160
113: ; preds = %80
%114 = load double, double* %8
%115 = load double, double* %10
%116 = fadd double %114, %115
%117 = fdiv double %116, 2.000000e+00
store double %117, double* %18
%118 = load double, double* %9
%119 = load double, double* %11
%120 = fadd double %118, %119
%121 = fdiv double %120, 2.000000e+00
store double %121, double* %19
%122 = load double, double* %10
%123 = load double, double* %12
%124 = fadd double %122, %123
%125 = fdiv double %124, 2.000000e+00
store double %125, double* %20
%126 = load double, double* %11
%127 = load double, double* %13
%128 = fadd double %126, %127
%129 = fdiv double %128, 2.000000e+00
store double %129, double* %21
%130 = load double, double* %10
%131 = load double, double* %8
%132 = fsub double %130, %131
store double %132, double* %22
%133 = load double, double* %11
%134 = load double, double* %9
%135 = fsub double %133, %134
store double %135, double* %23
%136 = load double, double* %12
%137 = load double, double* %10
%138 = fsub double %136, %137
store double %138, double* %24
%139 = load double, double* %13
%140 = load double, double* %11
%141 = fsub double %139, %140
store double %141, double* %25
%142 = load double, double* %18
%143 = load double, double* %19
%144 = load double, double* %18
%145 = load double, double* %23
%146 = fadd double %144, %145
%147 = load double, double* %19
%148 = load double, double* %22
%149 = fsub double %147, %148
%150 = load double, double* %20
%151 = load double, double* %21
%152 = load double, double* %20
%153 = load double, double* %25
%154 = fadd double %152, %153
%155 = load double, double* %21
%156 = load double, double* %24
%157 = fsub double %155, %156
%158 = load double*, double** %14
%159 = call i32 @intersection2DLSSFCT(double %142, double %143, double %146, double %149, double %150, double %151, double %154, double %157, double* %158)
br label %160
160: ; preds = %113, %112
br label %161
161: ; preds = %160, %67
ret void
}

LLVM IR (-O2):
define void @find_center_circularArc(double %0, double %1, double %2, double %3, double %4, double %5, double* %6) {
%8 = fcmp oeq double %0, %2
%9 = fcmp oeq double %1, %3
%10 = and i1 %8, %9
%11 = fcmp oeq double %0, %4
%12 = fcmp oeq double %1, %5
%13 = and i1 %11, %12
%14 = fcmp oeq double %2, %4
%15 = fcmp oeq double %3, %5
%16 = and i1 %14, %15
%17 = and i1 %10, %13
%18 = and i1 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %7
store double %0, double* %6
%20 = getelementptr inbounds double, double* %6, i64 1
store double %1, double* %20
br label %59
21: ; preds = %7
%22 = or i1 %10, %13
%23 = or i1 %16, %22
br i1 %23, label %24, label %41
24: ; preds = %21
br i1 %10, label %25, label %33
25: ; preds = %24
%26 = insertelement <2 x double> poison, double %0, i64 0
%27 = insertelement <2 x double> %26, double %1, i64 1
%28 = insertelement <2 x double> poison, double %4, i64 0
%29 = insertelement <2 x double> %28, double %5, i64 1
%30 = fadd <2 x double> %27, %29
%31 = fmul <2 x double> %30, <double 5.000000e-01, double 5.000000e-01>
%32 = bitcast double* %6 to <2 x double>*
store <2 x double> %31, <2 x double>* %32
br label %59
33: ; preds = %24
%34 = insertelement <2 x double> poison, double %0, i64 0
%35 = insertelement <2 x double> %34, double %1, i64 1
%36 = insertelement <2 x double> poison, double %2, i64 0
%37 = insertelement <2 x double> %36, double %3, i64 1
%38 = fadd <2 x double> %35, %37
%39 = fmul <2 x double> %38, <double 5.000000e-01, double 5.000000e-01>
%40 = bitcast double* %6 to <2 x double>*
store <2 x double> %39, <2 x double>* %40
br label %59
41: ; preds = %21
%42 = fadd double %0, %2
%43 = fmul double %42, 5.000000e-01
%44 = fadd double %1, %3
%45 = fmul double %44, 5.000000e-01
%46 = fadd double %2, %4
%47 = fmul double %46, 5.000000e-01
%48 = fadd double %3, %5
%49 = fmul double %48, 5.000000e-01
%50 = fsub double %2, %0
%51 = fsub double %3, %1
%52 = fsub double %4, %2
%53 = fsub double %5, %3
%54 = fadd double %43, %51
%55 = fsub double %45, %50
%56 = fadd double %47, %53
%57 = fsub double %49, %52
%58 = tail call i32 @intersection2DLSSFCT(double %43, double %45, double %54, double %55, double %47, double %49, double %56, double %57, double* %6)
br label %59
59: ; preds = %41, %33, %25, %19
ret void
}