// File: /workspace/github_cpp_makefile_star2_O1/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 $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x54(%rdi), %rsi
leaq 0x10(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
leaq 0x30(%rsp), %r12
leaq 0xc(%rsp), %rcx
movq %r12, %rdi
callq 0x3697a
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3a990
movsd %xmm0, 0x28(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3a8d4
movsd 0x28(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x35bfe(%rip), %xmm0    # 0x6fdd0
ucomisd %xmm1, %xmm0
jae 0x3a547
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0xc(%rsp)
movl 0x50(%rbx), %eax
testl %eax, %eax
jle 0x3a25a
xorl %ecx, %ecx
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
movslq %ecx, %rsi
movq 0x30(%rsp), %rdx
cmpl $-0x1, (%rdx,%rsi,4)
je 0x3a222
addl %ecx, %eax
cltq
cmpl $-0x1, (%rdx,%rax,4)
je 0x3a235
movl 0xc(%rsp), %ecx
incl %ecx
movl %ecx, 0xc(%rsp)
movl 0x50(%rbx), %eax
cmpl %eax, %ecx
jl 0x3a20a
jmp 0x3a25a
movq (%r14), %r13
movq 0x8(%r14), %rbp
cmpq %rbp, %r13
je 0x3a222
movq (%r13), %rsi
addq $0x28, %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x3abf8
addq $0x8, %r13
jmp 0x3a23c
leaq 0x58(%rbx), %r15
movq %r15, %rdi
callq 0x94e0
testl %eax, %eax
jne 0x3a56d
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
movq (%r14), %rcx
movq 0x8(%r14), %rax
movq %rax, %rsi
subq %rcx, %rsi
movq %rsi, %rdi
sarq $0x5, %rdi
testq %rdi, %rdi
jle 0x3a3ad
movq 0x80(%rbx), %r8
andq $-0x20, %rsi
addq %rcx, %rsi
incq %rdi
addq $0x10, %rcx
leaq 0x3f(%r12), %r9
movq %rcx, %rdx
movq -0x10(%rdx), %rcx
movslq 0x28(%rcx), %rcx
leaq 0x3f(%rcx), %r10
testq %rcx, %rcx
cmovnsq %rcx, %r10
sarq $0x6, %r10
leaq (%r8,%r10,8), %r10
movq %rcx, %r11
andq %r9, %r11
xorl %r13d, %r13d
cmpq %r12, %r11
setbe %r13b
movq -0x8(%r10,%r13,8), %r10
btq %rcx, %r10
jae 0x3a4a1
movq -0x8(%rdx), %rcx
movslq 0x28(%rcx), %rcx
leaq 0x3f(%rcx), %r10
testq %rcx, %rcx
cmovnsq %rcx, %r10
sarq $0x6, %r10
leaq (%r8,%r10,8), %r10
movq %rcx, %r11
andq %r9, %r11
xorl %r13d, %r13d
cmpq %r12, %r11
setbe %r13b
movq -0x8(%r10,%r13,8), %r10
btq %rcx, %r10
jae 0x3a4a7
movq (%rdx), %rcx
movslq 0x28(%rcx), %rcx
leaq 0x3f(%rcx), %r10
testq %rcx, %rcx
cmovnsq %rcx, %r10
sarq $0x6, %r10
leaq (%r8,%r10,8), %r10
movq %rcx, %r11
andq %r9, %r11
xorl %r13d, %r13d
cmpq %r12, %r11
setbe %r13b
movq -0x8(%r10,%r13,8), %r10
btq %rcx, %r10
jae 0x3a4b1
movq 0x8(%rdx), %rcx
movslq 0x28(%rcx), %rcx
leaq 0x3f(%rcx), %r10
testq %rcx, %rcx
cmovnsq %rcx, %r10
sarq $0x6, %r10
leaq (%r8,%r10,8), %r10
movq %rcx, %r11
andq %r9, %r11
xorl %r13d, %r13d
cmpq %r12, %r11
setbe %r13b
movq -0x8(%r10,%r13,8), %r10
btq %rcx, %r10
jae 0x3a4ad
decq %rdi
addq $0x20, %rdx
cmpq $0x1, %rdi
jg 0x3a2b2
movq %rsi, %rcx
movq %rax, %rsi
subq %rcx, %rsi
sarq $0x3, %rsi
cmpq $0x1, %rsi
je 0x3a45c
cmpq $0x2, %rsi
je 0x3a41a
movq %rax, %rdx
cmpq $0x3, %rsi
jne 0x3a4b1
movq (%rcx), %rdx
movslq 0x28(%rdx), %rdx
leaq 0x3f(%rdx), %rsi
testq %rdx, %rdx
cmovnsq %rdx, %rsi
sarq $0x6, %rsi
shlq $0x3, %rsi
addq 0x80(%rbx), %rsi
leaq 0x3f(%r12), %rdi
andq %rdx, %rdi
xorl %r8d, %r8d
cmpq %r12, %rdi
setbe %r8b
movq -0x8(%rsi,%r8,8), %rsi
btq %rdx, %rsi
jae 0x3a49c
addq $0x8, %rcx
movq (%rcx), %rdx
movslq 0x28(%rdx), %rdx
leaq 0x3f(%rdx), %rsi
testq %rdx, %rdx
cmovnsq %rdx, %rsi
sarq $0x6, %rsi
shlq $0x3, %rsi
addq 0x80(%rbx), %rsi
leaq 0x3f(%r12), %rdi
andq %rdx, %rdi
xorl %r8d, %r8d
cmpq %r12, %rdi
setbe %r8b
movq -0x8(%rsi,%r8,8), %rsi
btq %rdx, %rsi
jae 0x3a49c
addq $0x8, %rcx
movq (%rcx), %rdx
movslq 0x28(%rdx), %rdx
leaq 0x3f(%rdx), %rsi
testq %rdx, %rdx
cmovnsq %rdx, %rsi
sarq $0x6, %rsi
shlq $0x3, %rsi
addq 0x80(%rbx), %rsi
leaq 0x3f(%r12), %rdi
andq %rdx, %rdi
xorl %r8d, %r8d
cmpq %r12, %rdi
setbe %r8b
movq -0x8(%rsi,%r8,8), %rsi
btq %rdx, %rsi
cmovbq %rax, %rcx
movq %rcx, %rdx
jmp 0x3a4b1
addq $-0x10, %rdx
jmp 0x3a4b1
addq $-0x8, %rdx
jmp 0x3a4b1
addq $0x8, %rdx
cmpq %rax, %rdx
je 0x3a528
movl 0x40(%rbx), %esi
leal 0x1(%rsi), %eax
movl %eax, 0x40(%rbx)
addl 0x44(%rbx), %esi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3b406
movq (%r14), %rax
movq 0x8(%r14), %rdx
cmpq %rdx, %rax
je 0x3a528
movq 0x80(%rbx), %rsi
leaq 0x3f(%r12), %rdi
movq (%rax), %rcx
movslq 0x28(%rcx), %rcx
leaq 0x3f(%rcx), %r8
testq %rcx, %rcx
cmovnsq %rcx, %r8
sarq $0x6, %r8
movq %rcx, %r9
andq %rdi, %r9
xorl %r10d, %r10d
cmpq %r12, %r9
setbe %r10b
movl $0x1, %r9d
shlq %cl, %r9
leaq (%rsi,%r8,8), %rcx
orq %r9, -0x8(%rcx,%r10,8)
addq $0x8, %rax
cmpq %rdx, %rax
jne 0x3a4e7
movq %r15, %rdi
callq 0x9270
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3a547
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x9340
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x3a55e
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x9340
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x9210
movq %rax, %rbx
movq %r15, %rdi
callq 0x9270
jmp 0x3a58b
jmp 0x3a588
movq %rax, %rbx
jmp 0x3a5a2
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3a5a2
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x9340
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x3a5b9
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x9340
movq %rbx, %rdi
callq 0x9670
nop