// File: canzarlab[P]Trajan/src/IndependentSetConstraint.cpp
// Function: IndependentSetConstraint::AddTriplets(int)
int IndependentSetConstraint::AddTriplets(int nr_rows)
{
    DFSRight(t2.GetRoot());
    int ncr = 0;
    for (newick_node* node : t1.L)
    {
        dLN L = DFSRight(node, t2.GetRoot());
        if (L.first - EPS <= 1)
            continue;

        vii P;
        for (newick_node* noder : L.second)
            for (newick_node* nodel = node; nodel; nodel = nodel->parent ? nodel->parent->node : nullptr)
                P.emplace_back(nodel->taxoni, noder->taxoni);

        AddConstraint(nr_rows + ncr++, P);
    }
    return ncr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq 0x18(%rax), %rdi
callq 0xa8ec0
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
callq 0xc0aa0
movq -0xb0(%rbp), %rax
movl $0x0, -0x10(%rbp)
movq 0x10(%rax), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x99a50
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x99a80
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x99ab0
testb $0x1, %al
jne 0xc08af
jmp 0xc0a87
leaq -0x20(%rbp), %rdi
callq 0x99af0
movq %rax, %rcx
movq -0xb0(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq %rcx, -0xb8(%rbp)
movq 0x18(%rax), %rdi
callq 0xa8ec0
movq -0xb0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq %rax, %rcx
leaq -0x50(%rbp), %rdi
callq 0xc0b10
movsd -0x50(%rbp), %xmm1
movsd 0x6b05c(%rip), %xmm0    # 0x12b960
subsd %xmm0, %xmm1
movsd 0x4d358(%rip), %xmm0    # 0x10dc68
ucomisd %xmm1, %xmm0
jb 0xc0922
movl $0x3, -0x54(%rbp)
jmp 0xc0a63
leaq -0x70(%rbp), %rdi
callq 0xacd60
leaq -0x50(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0xc0ea0
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
callq 0xc0ed0
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xc0f00
testb $0x1, %al
jne 0xc096d
jmp 0xc0a32
leaq -0x80(%rbp), %rdi
callq 0xc0f30
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
je 0xc0a22
movq -0x98(%rbp), %rsi
addq $0x28, %rsi
movq -0x90(%rbp), %rdx
addq $0x28, %rdx
leaq -0x70(%rbp), %rdi
callq 0xbd110
jmp 0xc09ba
jmp 0xc09bc
movq -0x98(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0xc09e1
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rax
movq (%rax), %rax
movq %rax, -0xc0(%rbp)
jmp 0xc09ec
xorl %eax, %eax
movq %rax, -0xc0(%rbp)
jmp 0xc09ec
movq -0xc0(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0xc098b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xa9390
leaq -0x50(%rbp), %rdi
callq 0xc0f70
jmp 0xc0a93
jmp 0xc0a24
leaq -0x80(%rbp), %rdi
callq 0xc0f50
jmp 0xc0954
movq -0xb0(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %eax
movl %eax, %ecx
incl %ecx
movl %ecx, -0x10(%rbp)
addl %eax, %esi
leaq -0x70(%rbp), %rdx
callq 0xc05c0
jmp 0xc0a53
leaq -0x70(%rbp), %rdi
callq 0xa9390
movl $0x0, -0x54(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xc0f70
movl -0x54(%rbp), %eax
testl %eax, %eax
je 0xc0a77
jmp 0xc0a75
jmp 0xc0a79
jmp 0xc0a79
leaq -0x20(%rbp), %rdi
callq 0x99b10
jmp 0xc0899
movl -0x10(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
movq -0xa0(%rbp), %rdi
callq 0xa7c0
nop