// File: canzarlab[P]Trajan/src/Greedy.cpp
// Function: Greedy::Greedy(Graph&, Graph&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, bool)
Greedy::Greedy(Graph& t1, Graph& t2, string d, double k, bool dag) : Solver(t1, t2, d, k, dag), 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))
            E.emplace_back(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
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rcx, -0x100(%rbp)
movq %rsi, %rcx
movq -0x100(%rbp), %rsi
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rcx, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0x50(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0xa190
movq -0xf8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
movq -0xe0(%rbp), %rcx
movsd -0x28(%rbp), %xmm0
movzbl -0x29(%rbp), %r8d
andl $0x1, %r8d
callq 0xabe00
jmp 0xa537b
leaq -0x50(%rbp), %rdi
callq 0xa8d8
movq -0xf8(%rbp), %rax
leaq 0xfa006(%rip), %rcx     # 0x19f398
movq %rcx, (%rax)
addq $0x88, %rax
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa8e00
movl %eax, -0x104(%rbp)
jmp 0xa53b3
movl -0x104(%rbp), %eax
cltq
movq %rax, -0x120(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa8e00
movl %eax, -0x114(%rbp)
jmp 0xa53d3
movl -0x114(%rbp), %eax
cltq
movq %rax, -0x130(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x992a0
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0x992c0
jmp 0xa540b
leaq -0x7a(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x9a900
movq -0x110(%rbp), %rdi
movq -0x120(%rbp), %rsi
movq -0x138(%rbp), %rcx
leaq -0x78(%rbp), %rdx
callq 0xa8e20
jmp 0xa543b
leaq -0x7a(%rbp), %rdi
callq 0x9ac40
leaq -0x78(%rbp), %rdi
callq 0x99330
leaq -0x79(%rbp), %rdi
callq 0x99390
movq -0xf8(%rbp), %rdi
addq $0xa0, %rdi
movq %rdi, -0x150(%rbp)
callq 0xa8ea0
movq -0xf8(%rbp), %rdi
addq $0xb8, %rdi
movq %rdi, -0x148(%rbp)
callq 0xa8ea0
movq -0x10(%rbp), %rdi
callq 0xa8e00
movl %eax, -0x13c(%rbp)
jmp 0xa549b
movl -0x13c(%rbp), %eax
cltq
movq %rax, -0x160(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x995b0
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x995d0
jmp 0xa54d9
leaq -0xa9(%rbp), %rdi
callq 0x99610
movq -0x10(%rbp), %rdi
callq 0xa8ec0
movq %rax, -0x168(%rbp)
jmp 0xa54f7
movq -0x168(%rbp), %rsi
movq -0xf8(%rbp), %rdi
leaq -0x29(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq %rdi, -0xb8(%rbp)
movq -0xc0(%rbp), %rcx
movq -0xb8(%rbp), %r8
leaq -0xa8(%rbp), %rdx
callq 0xa5670
jmp 0xa5533
movq -0xf8(%rbp), %rdi
addq $0xa0, %rdi
movq %rdi, -0x170(%rbp)
callq 0xa8ee0
movq -0x170(%rbp), %rdi
movq %rax, -0xc8(%rbp)
callq 0xa8f10
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
callq 0xa5860
jmp 0xa557c
leaq -0xa8(%rbp), %rdi
callq 0x10160
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xa8d8
jmp 0xa5663
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xa5657
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xa55e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x7a(%rbp), %rdi
callq 0x9ac40
leaq -0x78(%rbp), %rdi
callq 0x99330
leaq -0x79(%rbp), %rdi
callq 0x99390
jmp 0xa5657
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0xa5633
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa9(%rbp), %rdi
callq 0x99610
jmp 0xa5633
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x10160
movq -0x148(%rbp), %rdi
callq 0xa8f40
movq -0x150(%rbp), %rdi
callq 0xa8f40
movq -0x110(%rbp), %rdi
callq 0x994d0
movq -0xf8(%rbp), %rdi
callq 0xa93f0
movq -0x58(%rbp), %rdi
callq 0xa7c0
nopl (%rax)