// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: doIntersect(vec const&, vec const&, vec const&, vec const&)
static bool doIntersect(const PointType &p1, const PointType &q1, const PointType &p2, const PointType &q2)
{
    // Find the four orientations needed for general and
    // special cases
    int o1 = orientation(p1, q1, p2);
    int o2 = orientation(p1, q1, q2);
    int o3 = orientation(p2, q2, p1);
    int o4 = orientation(p2, q2, q1);
  
    // General case
    if (o1 != o2 && o3 != o4)
        return true;
  
    // Special Cases
    // p1, q1 and p2 are colinear and p2 lies on segment p1q1
    if (o1 == 0 && onSegment(p1, p2, q1)) return true;
  
    // p1, q1 and q2 are colinear and q2 lies on segment p1q1
    if (o2 == 0 && onSegment(p1, q2, q1)) return true;
  
    // p2, q2 and p1 are colinear and p1 lies on segment p2q2
    if (o3 == 0 && onSegment(p2, p1, q2)) return true;
  
     // p2, q2 and q1 are colinear and q1 lies on segment p2q2
    if (o4 == 0 && onSegment(p2, q1, q2)) return true;
  
    return false; // Doesn't fall in any of the above cases
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r15
movq %rdi, %r12
movss (%rdi), %xmm8
movss 0x4(%rdi), %xmm9
movss (%rsi), %xmm7
movss 0x4(%rsi), %xmm5
movss (%rdx), %xmm0
movss 0x4(%rdx), %xmm1
movss (%rcx), %xmm10
movss 0x4(%rcx), %xmm11
movaps %xmm1, %xmm2
unpcklps %xmm9, %xmm2            # xmm2 = xmm2[0],xmm9[0],xmm2[1],xmm9[1]
movlhps %xmm2, %xmm2            # xmm2 = xmm2[0,0]
movaps %xmm11, %xmm3
unpcklps %xmm5, %xmm3            # xmm3 = xmm3[0],xmm5[0],xmm3[1],xmm5[1]
movlhps %xmm3, %xmm3            # xmm3 = xmm3[0,0]
movaps %xmm9, %xmm4
unpcklps %xmm1, %xmm4            # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
movaps %xmm5, 0x50(%rsp)
unpcklps %xmm11, %xmm5           # xmm5 = xmm5[0],xmm11[0],xmm5[1],xmm11[1]
movlhps %xmm4, %xmm5            # xmm5 = xmm5[0],xmm4[0]
subps %xmm3, %xmm5
subps %xmm2, %xmm3
movaps %xmm8, %xmm4
unpcklps %xmm0, %xmm4            # xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1]
movaps %xmm7, %xmm2
unpcklps %xmm10, %xmm2           # xmm2 = xmm2[0],xmm10[0],xmm2[1],xmm10[1]
movaps %xmm2, %xmm6
subps %xmm4, %xmm6
shufps $0x11, %xmm6, %xmm6     # xmm6 = xmm6[1,0,1,0]
movlhps %xmm4, %xmm2            # xmm2 = xmm2[0],xmm4[0]
movaps %xmm10, %xmm4
movaps %xmm7, 0x60(%rsp)
unpcklps %xmm7, %xmm4            # xmm4 = xmm4[0],xmm7[0],xmm4[1],xmm7[1]
movlhps %xmm4, %xmm4            # xmm4 = xmm4[0,0]
subps %xmm4, %xmm2
mulps %xmm3, %xmm2
mulps %xmm6, %xmm5
subps %xmm5, %xmm2
xorps %xmm3, %xmm3
cmpeqps %xmm2, %xmm3
movmskps %xmm3, %r13d
movl %r13d, %ebx
andb $0x4, %bl
shrb $0x2, %bl
movl %r13d, %eax
shrb $0x3, %al
movl %r13d, %edx
andb $0x2, %dl
movl %edx, %r14d
shrb %r14b
testb %dl, %dl
sete %dil
movaps %xmm2, %xmm3
shufps $0x55, %xmm2, %xmm3     # xmm3 = xmm3[1,1],xmm2[1,1]
xorps %xmm4, %xmm4
cmpnltps %xmm3, %xmm4
movaps %xmm2, %xmm3
shufps $0xff, %xmm2, %xmm3     # xmm3 = xmm3[3,3],xmm2[3,3]
xorps %xmm5, %xmm5
cmpltps %xmm3, %xmm5
xorps %xmm4, %xmm5
movd %xmm5, %edx
andb %dil, %dl
movzbl %dl, %edi
movzbl %r14b, %edx
testb %al, %al
cmovel %edi, %edx
xorps %xmm3, %xmm3
xorps %xmm4, %xmm4
cmpnltps %xmm2, %xmm4
movhlps %xmm2, %xmm2            # xmm2 = xmm2[1,1]
cmpltps %xmm2, %xmm3
xorps %xmm4, %xmm3
movd %xmm3, %edi
movl %r13d, %r8d
xorb $0x1, %r8b
andb %dil, %r8b
movzbl %r8b, %edi
testb %bl, %bl
cmovnel %r13d, %edi
movb $0x1, %bpl
testb %dl, %dl
jne 0x2659
testb $0x1, %dil
je 0x2728
testb %al, %al
je 0x26b1
movq %r12, %rdi
movq %r15, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movaps %xmm8, 0x10(%rsp)
movaps %xmm9, (%rsp)
movq %rsi, %r15
movaps %xmm10, 0x40(%rsp)
movaps %xmm11, 0x30(%rsp)
callq 0x93ec
movaps 0x30(%rsp), %xmm11
movaps 0x40(%rsp), %xmm10
movq %r15, %rsi
movaps (%rsp), %xmm9
movaps 0x10(%rsp), %xmm8
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r15
testb %al, %al
jne 0x2728
testb %r14b, %r14b
je 0x26e6
movq %r12, %rdi
movaps %xmm10, %xmm0
movaps %xmm11, %xmm1
movq %rcx, %r14
movaps %xmm8, 0x10(%rsp)
movaps %xmm9, (%rsp)
callq 0x93ec
movaps (%rsp), %xmm9
movaps 0x10(%rsp), %xmm8
movq %r14, %rcx
testb %al, %al
jne 0x2728
testb %bl, %bl
je 0x2707
movq %r15, %rdi
movaps %xmm8, %xmm0
movaps %xmm9, %xmm1
movq %rcx, %rsi
movq %rcx, %rbx
callq 0x93ec
movq %rbx, %rcx
testb %al, %al
jne 0x2728
testb $0x1, %r13b
je 0x2726
movq %r15, %rdi
movaps 0x60(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movq %rcx, %rsi
callq 0x93ec
testb %al, %al
jne 0x2728
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop