// File: canzarlab[P]Trajan/src/Graph.cpp
// Function: LDAG::Init()
Graph* LDAG::Init()
{
    vn T;
    vb C(_n);
    TransitiveReduction(root, C);
    // Restore dfs ordering of indices
    Wipe(root);
    _n = 0;
    Renumerate(root);
    GenPaths(root, T);
    sort(P.begin(), P.end(), [](const vn& a, const vn& b)
    {
        return a.size() > b.size();
    });
    vvb D(_n, vb(_n));
    vector<vn> Q;
    for (int k = 0; k < P.size(); ++k)
    {
        ForeachPair(P[k], [&](vn& p, int i, int j)
        {
            if (D[i][j]) return;
            Q.push_back(p);
            ForeachPair(P[k], [&](vn& p, int i, int j)
            {
                D[i][j] = D[j][j] = true;
            });
        });
    }
    P = move(Q);
    return Graph::Init();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x99590
movq -0x118(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x110(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x995b0
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x995d0
jmp 0x96fee
leaq -0x49(%rbp), %rdi
callq 0x99610
movq -0x118(%rbp), %rdi
movq 0x68(%rdi), %rsi
leaq -0x48(%rbp), %rdx
callq 0x97320
jmp 0x9700d
movq -0x118(%rbp), %rdi
movq 0x68(%rdi), %rsi
callq 0x974b0
jmp 0x9701f
movq -0x118(%rbp), %rdi
movq $0x0, 0x70(%rdi)
movq 0x68(%rdi), %rsi
callq 0x97520
jmp 0x97039
movq -0x118(%rbp), %rdi
movq 0x68(%rdi), %rsi
leaq -0x20(%rbp), %rdx
callq 0x975a0
jmp 0x9704f
movq -0x118(%rbp), %rdi
addq $0xf0, %rdi
movq %rdi, -0x120(%rbp)
callq 0x99630
movq -0x120(%rbp), %rdi
movq %rax, -0x68(%rbp)
callq 0x99660
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x97630
jmp 0x9708c
movq -0x118(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x130(%rbp)
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x995b0
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
leaq -0xb8(%rbp), %rdi
callq 0x995d0
jmp 0x970cd
leaq -0xba(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x99690
movq -0x130(%rbp), %rsi
movq -0x138(%rbp), %rcx
leaq -0x90(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
callq 0x996b0
jmp 0x97103
leaq -0xba(%rbp), %rdi
callq 0x104c0
leaq -0xb8(%rbp), %rdi
callq 0x10160
leaq -0xb9(%rbp), %rdi
callq 0x99610
leaq -0xd8(%rbp), %rdi
callq 0x99140
movl $0x0, -0xdc(%rbp)
movq -0x118(%rbp), %rdi
movslq -0xdc(%rbp), %rax
movq %rax, -0x140(%rbp)
addq $0xf0, %rdi
callq 0x99730
movq %rax, %rcx
movq -0x140(%rbp), %rax
cmpq %rcx, %rax
jae 0x9728f
movq -0x118(%rbp), %rdi
addq $0xf0, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x99760
movq -0x118(%rbp), %rdi
movq %rax, %rsi
leaq -0x90(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq -0xd8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq %rdi, -0xf0(%rbp)
leaq -0xdc(%rbp), %rax
movq %rax, -0xe8(%rbp)
movups -0x100(%rbp), %xmm0
movups -0xf0(%rbp), %xmm1
movq %rsp, %rax
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x97670
jmp 0x971e5
jmp 0x971e7
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x9713d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x99610
jmp 0x97301
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x972f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x97258
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xba(%rbp), %rdi
callq 0x104c0
leaq -0xb8(%rbp), %rdi
callq 0x10160
leaq -0xb9(%rbp), %rdi
callq 0x99610
jmp 0x972f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x99470
leaq -0x90(%rbp), %rdi
callq 0xff60
jmp 0x972f8
movq -0x118(%rbp), %rdi
addq $0xf0, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x99780
movq -0x118(%rbp), %rdi
callq 0x96d00
movq %rax, -0x148(%rbp)
jmp 0x972be
leaq -0xd8(%rbp), %rdi
callq 0x99470
leaq -0x90(%rbp), %rdi
callq 0xff60
leaq -0x48(%rbp), %rdi
callq 0x10160
leaq -0x20(%rbp), %rdi
callq 0xffe0
movq -0x148(%rbp), %rax
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x10160
leaq -0x20(%rbp), %rdi
callq 0xffe0
movq -0x58(%rbp), %rdi
callq 0xa7c0
nopw %cs:(%rax,%rax)