// File: /workspace/github_cpp_makefile_star2_O2/canzarlab[P]Trajan/src/Greedy.cpp
// Function: Greedy::Greedy(Graph&, Graph&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, std::map<unsigned long, bool, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, bool>>>&)
Greedy::Greedy(Graph& t1, Graph& t2, string d, double k, vvi& K, map<size_t, bool>& N) : Solver(t1, t2, d, k, false), A(t1.GetNumNodes(), vd(t2.GetNumNodes()))
{
    vb P(t1.GetNumNodes());
    DFSLeft(t1.GetRoot(), P, [&](newick_node* nodel, newick_node* noder, double w)
    {
        if (w != 0.0 && (dag || nodel->parent) && (dag || nodel->child) && (dag || noder->parent) && (dag || noder->child))
        {
            auto e = N.find(K[nodel->taxoni][noder->taxoni]);
            if (e == N.end())
                E.emplace_back(nodel->taxoni, noder->taxoni, w);
            else if (e->second)
            {
                this->M.emplace_back(nodel->taxoni, noder->taxoni, w);
                A[nodel->taxoni][noder->taxoni] = w;
            }
        }
    });
    sort(E.begin(), E.end(), [](const iid& a, const iid& b){return get<2>(a) > get<2>(b);});
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, %r12
movq %r8, %r15
movsd %xmm0, 0x20(%rsp)
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x68(%rsp), %rbp
movq %rbp, %rdi
movq %rcx, %rsi
callq 0x9470
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbp, %rcx
movsd 0x20(%rsp), %xmm0
xorl %r8d, %r8d
callq 0x31914
leaq 0x68(%rsp), %rdi
callq 0x9708
leaq 0x65283(%rip), %rax     # 0x95448
movq %rax, (%rbx)
movq 0x70(%r13), %rbp
movslq 0x70(%r14), %rsi
leaq 0x40(%rsp), %rdi
leaq 0x1e(%rsp), %rdx
callq 0x2dc6e
leaq 0x88(%rbx), %r14
movslq %ebp, %rsi
leaq 0x40(%rsp), %rdx
leaq 0x1f(%rsp), %rcx
movq %r14, %rdi
callq 0x31238
leaq 0x40(%rsp), %rdi
callq 0x2e522
xorps %xmm0, %xmm0
movups %xmm0, 0xc0(%rbx)
movups %xmm0, 0xb0(%rbx)
movups %xmm0, 0xa0(%rbx)
movslq 0x70(%r13), %rsi
leaq 0x40(%rsp), %rdi
leaq 0x1e(%rsp), %rdx
callq 0x2dd44
movq 0x68(%r13), %rsi
movq %rbx, 0x28(%rsp)
movq %r12, 0x30(%rsp)
movq %r15, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x40(%rsp), %rdx
movq %rbx, %rdi
callq 0x3035c
movq 0xa0(%rbx), %r12
movq 0xa8(%rbx), %r15
cmpq %r15, %r12
je 0x302d7
movq %r15, %r13
subq %r12, %r13
movq %r13, %rax
sarq $0x4, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x30eee
cmpq $0x101, %r13            # imm = 0x101
jl 0x302cc
leaq 0x100(%r12), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x3119f
jmp 0x302c5
movq %r13, %rdi
callq 0x31209
addq $0x10, %r13
cmpq %r15, %r13
jne 0x302b9
jmp 0x302d7
movq %r12, %rdi
movq %r15, %rsi
callq 0x3119f
leaq 0x40(%rsp), %rdi
callq 0xbdb2
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x30328
movq %rax, %r15
leaq 0x40(%rsp), %rdi
callq 0x2e522
jmp 0x3034b
movq %rax, %r15
jmp 0x3034b
movq %rax, %r15
leaq 0x68(%rsp), %rdi
callq 0x9708
jmp 0x30353
movq %rax, %r15
leaq 0x40(%rsp), %rdi
callq 0xbdb2
leaq 0xa0(%rbx), %r12
leaq 0xb8(%rbx), %rdi
callq 0x3140c
movq %r12, %rdi
callq 0x3140c
movq %r14, %rdi
callq 0x2dd00
movq %rbx, %rdi
callq 0x3134c
movq %r15, %rdi
callq 0x9640
nop