// File: /workspace/github_cpp_makefile_star2_O2/canzarlab[P]Trajan/src/AntichainConstraint.cpp
// Function: AntichainConstraint::Antichain(std::vector<newick_node*, std::allocator<newick_node*>>&, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&)
void AntichainConstraint::Antichain(vn& P, vvd& R)
{
    vi D(SZ, -1);
    double max = Reset(P, R);
    double flow = MaxFlow(D, R);
    if (max - flow <= 1 + EPS)
        return;

    vii PN;
    for (int i = 0; i < Z; ++i)
        if (D[i] != -1 && D[i + Z] == -1)
            for (newick_node* nodel : P)
                PN.emplace_back(nodel->taxoni, i);

    lock_guard<mutex> g(qmutex);
    if (!all_of(P.begin(), P.end(), [&](newick_node* node){return B[node->taxoni];}))
    {
        AddConstraint(nr_rows + ncr++, PN);
        for (newick_node* node : P)
            B[node->taxoni] = true;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x54(%rdi), %rsi
leaq 0x20(%rsp), %rdx
orl $-0x1, (%rdx)
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rcx
callq 0x332b8
movq %rbx, %rdi
movq %r14, 0x18(%rsp)
movq %r14, %rsi
movq %r15, %rdx
callq 0x36974
movsd %xmm0, 0x10(%rsp)
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x368dc
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x379b1(%rip), %xmm0    # 0x6de48
ucomisd %xmm1, %xmm0
jae 0x36648
leaq 0x20(%rsp), %r15
andq $0x0, 0x10(%r15)
xorpd %xmm0, %xmm0
movapd %xmm0, (%r15)
xorl %eax, %eax
leaq 0x8(%rsp), %r12
movl %eax, 0x8(%rsp)
movl 0x50(%rbx), %ecx
cmpl %ecx, %eax
jge 0x36510
movslq %eax, %rsi
movq 0x40(%rsp), %rdx
cmpl $-0x1, (%rdx,%rsi,4)
je 0x3650c
addl %eax, %ecx
movslq %ecx, %rcx
cmpl $-0x1, (%rdx,%rcx,4)
jne 0x3650c
movq 0x18(%rsp), %rax
movq (%rax), %r14
movq 0x8(%rax), %r13
cmpq %r13, %r14
je 0x36508
movq (%r14), %rsi
addq $0x28, %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x36ba6
addq $0x8, %r14
jmp 0x364eb
movl 0x8(%rsp), %eax
incl %eax
jmp 0x364bb
leaq 0x58(%rbx), %rdi
movq %rdi, 0x10(%rsp)
callq 0x36f8c
movq 0x18(%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %r14
leaq 0x8(%rsp), %r13
movq %rbx, (%r13)
movq %r14, (%rsp)
subq %r12, %r14
movq %r14, %r15
sarq $0x5, %r15
testq %r15, %r15
jle 0x365a2
movq %r13, %rdi
movq %r12, %rsi
callq 0x36ade
testb %al, %al
jne 0x365e2
leaq 0x8(%r12), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x36ade
testb %al, %al
jne 0x365e5
leaq 0x10(%r12), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x36ade
testb %al, %al
jne 0x365e5
leaq 0x18(%r12), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x36ade
testb %al, %al
jne 0x365e5
addq $0x20, %r12
decq %r15
addq $-0x20, %r14
jmp 0x36541
sarq $0x3, %r14
cmpq $0x1, %r14
je 0x3667c
cmpq $0x2, %r14
je 0x36661
cmpq $0x3, %r14
jne 0x36634
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x36ade
movq (%rsp), %r14
testb %al, %al
jne 0x36693
addq $0x8, %r12
jmp 0x36665
movq %r12, %rbp
movq (%rsp), %r14
cmpq %r14, %rbp
je 0x36634
movl 0x40(%rbx), %esi
leal 0x1(%rsi), %eax
movl %eax, 0x40(%rbx)
addl 0x44(%rbx), %esi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x37556
movq 0x18(%rsp), %rax
movq (%rax), %r14
movq 0x8(%rax), %r15
subq $-0x80, %rbx
cmpq %r15, %r14
je 0x36634
movq (%r14), %rax
movslq 0x28(%rax), %rsi
movq %rbx, %rdi
callq 0x2ddae
orq %rdx, (%rax)
addq $0x8, %r14
jmp 0x36617
movq 0x10(%rsp), %rdi
callq 0x9280
leaq 0x20(%rsp), %rdi
callq 0x3137c
leaq 0x40(%rsp), %rdi
callq 0xd85a
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %r14
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x36ade
testb %al, %al
jne 0x36693
addq $0x8, %r12
jmp 0x36680
movq (%rsp), %r14
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x36ade
testb %al, %al
cmoveq %r14, %r12
movq %r12, %rbp
jmp 0x365e9
jmp 0x366a8
jmp 0x366b7
jmp 0x366a1
movq %rax, %rbx
jmp 0x366c4
jmp 0x366a8
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x9280
jmp 0x366ba
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3137c
leaq 0x40(%rsp), %rdi
callq 0xd85a
movq %rbx, %rdi
callq 0x9640