// File: /workspace/github_cpp_makefile_star2_O3/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 0x35e4a
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3a14e
movsd %xmm0, 0x28(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3a0a8
movsd 0x28(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x350b6(%rip), %xmm0    # 0x6ea70
ucomisd %xmm1, %xmm0
jae 0x39d27
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0xc(%rsp)
movl 0x50(%rbx), %eax
testl %eax, %eax
jle 0x39a45
xorl %ecx, %ecx
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
movslq %ecx, %rsi
movq 0x30(%rsp), %rdx
cmpl $-0x1, (%rdx,%rsi,4)
je 0x39a3b
leal (%rax,%rcx), %esi
movslq %esi, %rsi
cmpl $-0x1, (%rdx,%rsi,4)
jne 0x39a3b
movq (%r14), %r13
movq 0x8(%r14), %rbp
cmpq %rbp, %r13
je 0x39a3b
movq (%r13), %rsi
addq $0x28, %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x3a37c
addq $0x8, %r13
cmpq %rbp, %r13
jne 0x39a18
movl 0xc(%rsp), %ecx
movl 0x50(%rbx), %eax
incl %ecx
movl %ecx, 0xc(%rsp)
cmpl %eax, %ecx
jl 0x399f2
leaq 0x58(%rbx), %r15
movq %r15, %rdi
callq 0x94f0
testl %eax, %eax
jne 0x39d4d
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
movq (%r14), %rsi
movq 0x8(%r14), %rax
movq 0x80(%rbx), %rdx
movq %rax, %r8
subq %rsi, %r8
movq %r8, %rdi
sarq $0x5, %rdi
testq %rdi, %rdi
jle 0x39ba9
andq $-0x20, %r8
movq %r8, %rcx
addq %rsi, %rcx
incq %rdi
addq $0x10, %rsi
leaq 0x3f(%r12), %r8
movq -0x10(%rsi), %r9
movslq 0x28(%r9), %r9
leal 0x3f(%r9), %r10d
testq %r9, %r9
cmovnsl %r9d, %r10d
sarl $0x6, %r10d
movslq %r10d, %r10
leaq (%rdx,%r10,8), %r10
movq %r9, %r11
andq %r8, %r11
xorl %r13d, %r13d
cmpq %r12, %r11
setbe %r13b
movq -0x8(%r10,%r13,8), %r10
btq %r9, %r10
jae 0x39c7e
movq -0x8(%rsi), %r9
movslq 0x28(%r9), %r9
leal 0x3f(%r9), %r10d
testq %r9, %r9
cmovnsl %r9d, %r10d
sarl $0x6, %r10d
movslq %r10d, %r10
leaq (%rdx,%r10,8), %r10
movq %r9, %r11
andq %r8, %r11
xorl %r13d, %r13d
cmpq %r12, %r11
setbe %r13b
movq -0x8(%r10,%r13,8), %r10
btq %r9, %r10
jae 0x39c84
movq (%rsi), %r9
movslq 0x28(%r9), %r9
leal 0x3f(%r9), %r10d
testq %r9, %r9
cmovnsl %r9d, %r10d
sarl $0x6, %r10d
movslq %r10d, %r10
leaq (%rdx,%r10,8), %r10
movq %r9, %r11
andq %r8, %r11
xorl %r13d, %r13d
cmpq %r12, %r11
setbe %r13b
movq -0x8(%r10,%r13,8), %r10
btq %r9, %r10
jae 0x39c8e
movq 0x8(%rsi), %r9
movslq 0x28(%r9), %r9
leal 0x3f(%r9), %r10d
testq %r9, %r9
cmovnsl %r9d, %r10d
sarl $0x6, %r10d
movslq %r10d, %r10
leaq (%rdx,%r10,8), %r10
movq %r9, %r11
andq %r8, %r11
xorl %r13d, %r13d
cmpq %r12, %r11
setbe %r13b
movq -0x8(%r10,%r13,8), %r10
btq %r9, %r10
jae 0x39c8a
decq %rdi
addq $0x20, %rsi
cmpq $0x1, %rdi
jg 0x39a9d
movq %rax, %r8
subq %rcx, %r8
jmp 0x39bac
movq %rsi, %rcx
sarq $0x3, %r8
cmpq $0x1, %r8
je 0x39c40
cmpq $0x2, %r8
je 0x39c05
cmpq $0x3, %r8
jne 0x39d08
movq (%rcx), %rsi
movslq 0x28(%rsi), %rsi
leal 0x3f(%rsi), %edi
testq %rsi, %rsi
cmovnsl %esi, %edi
sarl $0x6, %edi
movslq %edi, %rdi
leaq (%rdx,%rdi,8), %rdi
leaq 0x3f(%r12), %r8
andq %rsi, %r8
xorl %r9d, %r9d
cmpq %r12, %r8
setbe %r9b
movq -0x8(%rdi,%r9,8), %rdi
btq %rsi, %rdi
jae 0x39c79
addq $0x8, %rcx
movq (%rcx), %rsi
movslq 0x28(%rsi), %rsi
leal 0x3f(%rsi), %edi
testq %rsi, %rsi
cmovnsl %esi, %edi
sarl $0x6, %edi
movslq %edi, %rdi
leaq (%rdx,%rdi,8), %rdi
leaq 0x3f(%r12), %r8
andq %rsi, %r8
xorl %r9d, %r9d
cmpq %r12, %r8
setbe %r9b
movq -0x8(%rdi,%r9,8), %rdi
btq %rsi, %rdi
jae 0x39c79
addq $0x8, %rcx
movq (%rcx), %rsi
movslq 0x28(%rsi), %rsi
leal 0x3f(%rsi), %edi
testq %rsi, %rsi
cmovnsl %esi, %edi
sarl $0x6, %edi
movslq %edi, %rdi
leaq (%rdx,%rdi,8), %rdx
leaq 0x3f(%r12), %rdi
andq %rsi, %rdi
xorl %r8d, %r8d
cmpq %r12, %rdi
setbe %r8b
movq -0x8(%rdx,%r8,8), %rdx
btq %rsi, %rdx
cmovbq %rax, %rcx
movq %rcx, %rsi
jmp 0x39c8e
addq $-0x10, %rsi
jmp 0x39c8e
addq $-0x8, %rsi
jmp 0x39c8e
addq $0x8, %rsi
cmpq %rax, %rsi
je 0x39d08
movl 0x40(%rbx), %esi
leal 0x1(%rsi), %eax
movl %eax, 0x40(%rbx)
addl 0x44(%rbx), %esi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3ab7e
movq (%r14), %rax
movq 0x8(%r14), %rdx
cmpq %rdx, %rax
je 0x39d08
movq 0x80(%rbx), %rsi
leaq 0x3f(%r12), %rdi
movq (%rax), %rcx
movslq 0x28(%rcx), %rcx
leal 0x3f(%rcx), %r8d
testq %rcx, %rcx
cmovnsl %ecx, %r8d
sarl $0x6, %r8d
movslq %r8d, %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 0x39cc4
movq %r15, %rdi
callq 0x9280
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x39d27
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x9350
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x39d3e
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x9350
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x9220
movq %rax, %rbx
movq %r15, %rdi
callq 0x9280
jmp 0x39d6b
jmp 0x39d68
movq %rax, %rbx
jmp 0x39d82
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x39d82
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x9350
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x39d99
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x9350
movq %rbx, %rdi
callq 0x9680
nop