// File: canzarlab[P]Trajan/src/match.cpp
// Function: forest_forest(tree const&, tree const&, array2d const&, unsigned long long, unsigned long long)
int forest_forest(const tree& t1, const tree& t2, const array2d& matrix, mask rx, mask ry)
{
    // trivial case: empty forest
    if (rx == 0 || ry == 0)
        return 0;

    // memoization
    auto it = fdp[rx].find(ry);
    if (it != fdp[rx].end())
        return get<0>(it->second);

    // score, transition type, transition destination, bipartite matching
    // (branching) roots of trees in t1 and t2 respectively
    // roots of paths in va and vb respectively
    // bipartite matching transition table
    // branch choice table
    auto& [sol, trs, dst, bdp, va, vb, ra, rb, btr, bst] = fdp[rx][ry];

    // initialize score to negative infinity
    sol = NINF;

    // don't waste time on reallocation
    va.reserve(MAXLB);
    vb.reserve(MAXLB);
    ra.reserve(MAXLB);
    rb.reserve(MAXLB);

    // remove a path in t1
    for (mask mp = rx; mp != 0; mp -= ls(mp))
    {
        // branching node index
        int u = tz(mp);
        // dont disconnect the current root-to-branching path
        if (rx & t1.ch[u])
            continue;

        // for bipartite matching consider only nodes which are leaf/branching in current subforest
        va.push_back(u);

        // path  x..z in t1
        int z = t1.b[u];
        int x = find_root(t1, rx, u);
        ra.push_back(x);

        // don't remove leaves
        if (!t1.ch[u])
            continue;

        // exclude u, include its branching children, exclude its branching ancestors
        mask m = em(rx ^ ls(mp) ^ t1.ch[u], t1.ba[u]);
        int nsol = forest_forest(t1, t2, matrix, m, ry);
        if (nsol > sol)
            sol = nsol, trs = DEL_1, dst = u;
    }

    // remove a path in t2
    for (mask mq = ry; mq != 0; mq -= ls(mq))
    {
        // branching node index
        int v = tz(mq);
        // dont disconnect the current root-to-branching path
        if (ry & t2.ch[v])
            continue;

        // for bipartite matching consider only nodes which are leaf/branching in current subforest
        vb.push_back(v);

        // path y..w in t2
        int w = t2.b[v];
        int y = find_root(t2, ry, v);
        rb.push_back(y);

        // don't remove leaves
        if (!t2.ch[v])
            continue;

        // exclude v, include its branching children, exclude its branching ancestors
        mask m = em(ry ^ ls(mq) ^ t2.ch[v], t2.ba[v]);
        int nsol = forest_forest(t1, t2, matrix, rx, m);
        if (nsol > sol)
            sol = nsol, trs = DEL_2, dst = v;
    }

    // tree to tree distance table
    array2d D(va.size(), vb.size());

    // initialize tree to tree transition tables
    btr = array2d(va.size(), vb.size());
    bst = array2d(va.size(), vb.size());

    // compute tree-to-tree weights for use in bipartite matching
    for (uint i = 0; i < va.size(); ++i)
    {
        for (uint j = 0; j < vb.size(); ++j)
        {
            // branching node index
            int u = va[i], v = vb[j];
            // path x..z in t1
            int z = t1.b[u];
            int x = ra[i];
            // path y..w in t2
            int w = t2.b[v];
            int y = rb[j];
            // corresponding distance table entry
            int& uvs = D(i, j);

            // select a branch at u
            for (mask s = t1.ch[u]; s != 0; s -= ls(s))
            {
                // on t1 side: include u, chosen branch s and keep branching ancestors of u
                // on t2 side: include v and keep branching ancestors of v
                int nuvs = forest_forest(t1, t2, matrix, in(u) | ls(s) | (rx & t1.ba[u]), in(v) | (ry & t2.ba[v]));
                if (nuvs > uvs)
                    uvs = nuvs, btr(i, j) = DEL_1, bst(i, j) = tz(s);
            }

            // select a branch at v
            for (mask s = t2.ch[v]; s != 0; s -= ls(s))
            {
                // on t1 side: include u and keep branching ancestors of u
                // on t2 side: include v, chosen branch s and keep branching ancestors of v
                int nuvs = forest_forest(t1, t2, matrix, in(u) | (rx & t1.ba[u]), in(v) | ls(s) | (ry & t2.ba[v]));
                if (nuvs > uvs)
                    uvs = nuvs, btr(i, j) = DEL_2, bst(i, j) = tz(s);
            }

            // initialize or fetch path-to-path matching dp table
            auto it = pdp.find({x, y});
            if (it == pdp.end())
                pdp[{x, y}] = {array2d(t1.n, t2.n), array2d(t1.n, t2.n)};
            auto& [dp, tdp] = pdp[{x, y}];

            // match the paths
            int nuvs = forest_forest(t1, t2, matrix, t1.ch[u], t2.ch[v]) + path_path(dp, tdp, matrix, t1, t2, x, y, z, w);
            if (nuvs > uvs)
                uvs = nuvs, btr(i, j) = MATCH, bst(i, j) = -1;
        }
    }
    // compute optimal forest-to-forest bipartite matching
    int nsol = bipartite_aux(D, bdp);
    if (nsol > sol)
        sol = nsol, trs = MATCH, dst = -1;

    return sol;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x511e
cmpq $0x0, -0x38(%rbp)
jne 0x512a
movl $0x0, -0xc(%rbp)
jmp 0x5f88
leaq 0x291cf(%rip), %rdi     # 0x2e300
leaq -0x30(%rbp), %rsi
callq 0x7e20
movq %rax, %rdi
leaq -0x38(%rbp), %rsi
callq 0x7e50
movq %rax, -0x40(%rbp)
leaq 0x291af(%rip), %rdi     # 0x2e300
leaq -0x30(%rbp), %rsi
callq 0x7e20
movq %rax, %rdi
callq 0x7eb0
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x7e80
testb $0x1, %al
jne 0x5179
jmp 0x5198
leaq -0x40(%rbp), %rdi
callq 0x7f00
movq %rax, %rdi
addq $0x8, %rdi
callq 0x7ee0
movl (%rax), %eax
movl %eax, -0xc(%rbp)
jmp 0x5f88
leaq 0x29161(%rip), %rdi     # 0x2e300
leaq -0x30(%rbp), %rsi
callq 0x7e20
movq %rax, %rdi
leaq -0x38(%rbp), %rsi
callq 0x7f30
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x7ee0
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
callq 0x7f60
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rdi
callq 0x7f80
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rdi
callq 0x7fa0
movq %rax, -0x70(%rbp)
movq -0x50(%rbp), %rdi
callq 0x7fc0
movq %rax, -0x78(%rbp)
movq -0x50(%rbp), %rdi
callq 0x7fe0
movq %rax, -0x80(%rbp)
movq -0x50(%rbp), %rdi
callq 0x8000
movq %rax, -0x88(%rbp)
movq -0x50(%rbp), %rdi
callq 0x8020
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rdi
callq 0x8040
movq %rax, -0x98(%rbp)
movq -0x50(%rbp), %rdi
callq 0x8060
movq %rax, -0xa0(%rbp)
movq -0x58(%rbp), %rax
movl $0x80000000, (%rax)     # imm = 0x80000000
movq -0x78(%rbp), %rdi
movl $0x40, %esi
callq 0x8080
movq -0x80(%rbp), %rdi
movl $0x40, %esi
callq 0x8080
movq -0x88(%rbp), %rdi
movl $0x40, %esi
callq 0x8080
movq -0x90(%rbp), %rdi
movl $0x40, %esi
callq 0x8080
movq -0x30(%rbp), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0x5416
movq -0xa8(%rbp), %rdi
callq 0x7a10
movl %eax, -0xac(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq -0xac(%rbp), %rdx
andq 0x6eb8(%rcx,%rdx,8), %rax
cmpq $0x0, %rax
je 0x52db
jmp 0x53f1
movq -0x78(%rbp), %rdi
leaq -0xac(%rbp), %rsi
callq 0x8180
movq -0x18(%rbp), %rax
movslq -0xac(%rbp), %rcx
movl 0x5e14(%rax,%rcx,4), %eax
movl %eax, -0xb0(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0xac(%rbp), %edx
callq 0x4b30
movl %eax, -0xb4(%rbp)
movq -0x88(%rbp), %rdi
leaq -0xb4(%rbp), %rsi
callq 0x8180
movq -0x18(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpq $0x0, 0x6eb8(%rax,%rcx,8)
jne 0x534a
jmp 0x53f1
movq -0x30(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0xa8(%rbp), %rdi
callq 0x7a30
movq -0x278(%rbp), %rdi
xorq %rax, %rdi
movq -0x18(%rbp), %rax
movslq -0xac(%rbp), %rcx
xorq 0x6eb8(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movslq -0xac(%rbp), %rcx
movq 0x8058(%rax,%rcx,8), %rsi
callq 0x81f0
movq %rax, -0xc0(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0xc0(%rbp), %rcx
movq -0x38(%rbp), %r8
callq 0x50f0
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x53ef
movl -0xc4(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, (%rax)
movq -0x60(%rbp), %rax
movl $0x0, (%rax)
movl -0xac(%rbp), %ecx
movq -0x68(%rbp), %rax
movl %ecx, (%rax)
jmp 0x53f1
movq -0xa8(%rbp), %rdi
callq 0x7a30
movq %rax, %rcx
movq -0xa8(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xa8(%rbp)
jmp 0x5299
movq -0x38(%rbp), %rax
movq %rax, -0xd0(%rbp)
cmpq $0x0, -0xd0(%rbp)
je 0x559e
movq -0xd0(%rbp), %rdi
callq 0x7a10
movl %eax, -0xd4(%rbp)
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0xd4(%rbp), %rdx
andq 0x6eb8(%rcx,%rdx,8), %rax
cmpq $0x0, %rax
je 0x5463
jmp 0x5579
movq -0x80(%rbp), %rdi
leaq -0xd4(%rbp), %rsi
callq 0x8180
movq -0x20(%rbp), %rax
movslq -0xd4(%rbp), %rcx
movl 0x5e14(%rax,%rcx,4), %eax
movl %eax, -0xd8(%rbp)
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0xd4(%rbp), %edx
callq 0x4b30
movl %eax, -0xdc(%rbp)
movq -0x90(%rbp), %rdi
leaq -0xdc(%rbp), %rsi
callq 0x8180
movq -0x20(%rbp), %rax
movslq -0xd4(%rbp), %rcx
cmpq $0x0, 0x6eb8(%rax,%rcx,8)
jne 0x54d2
jmp 0x5579
movq -0x38(%rbp), %rax
movq %rax, -0x280(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x7a30
movq -0x280(%rbp), %rdi
xorq %rax, %rdi
movq -0x20(%rbp), %rax
movslq -0xd4(%rbp), %rcx
xorq 0x6eb8(%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rax
movslq -0xd4(%rbp), %rcx
movq 0x8058(%rax,%rcx,8), %rsi
callq 0x81f0
movq %rax, -0xe8(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0xe8(%rbp), %r8
callq 0x50f0
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x5577
movl -0xec(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, (%rax)
movq -0x60(%rbp), %rax
movl $0x1, (%rax)
movl -0xd4(%rbp), %ecx
movq -0x68(%rbp), %rax
movl %ecx, (%rax)
jmp 0x5579
movq -0xd0(%rbp), %rdi
callq 0x7a30
movq %rax, %rcx
movq -0xd0(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xd0(%rbp)
jmp 0x5421
movq -0x78(%rbp), %rdi
callq 0x8210
movl %eax, -0x28c(%rbp)
movq -0x80(%rbp), %rdi
callq 0x8210
movl -0x28c(%rbp), %esi
movl %eax, %edx
leaq -0x110(%rbp), %rdi
movl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, -0x284(%rbp)
callq 0x7b70
movq -0x78(%rbp), %rdi
callq 0x8210
movl %eax, -0x288(%rbp)
movq -0x80(%rbp), %rdi
callq 0x8210
movl -0x288(%rbp), %esi
movl -0x284(%rbp), %ecx
movl %eax, %edx
leaq -0x130(%rbp), %rdi
callq 0x7b70
jmp 0x5609
movq -0x98(%rbp), %rdi
leaq -0x130(%rbp), %rsi
movq %rsi, -0x298(%rbp)
callq 0x7b10
movq -0x298(%rbp), %rdi
callq 0x7b50
movq -0x78(%rbp), %rdi
callq 0x8210
movl %eax, -0x290(%rbp)
movq -0x80(%rbp), %rdi
callq 0x8210
movl -0x290(%rbp), %esi
movl %eax, %edx
leaq -0x160(%rbp), %rdi
movl $0x80000000, %ecx       # imm = 0x80000000
callq 0x7b70
jmp 0x5662
movq -0xa0(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x7b10
leaq -0x160(%rbp), %rdi
callq 0x7b50
movl $0x0, -0x164(%rbp)
movl -0x164(%rbp), %eax
movq %rax, -0x2a0(%rbp)
movq -0x78(%rbp), %rdi
callq 0x8210
movq %rax, %rcx
movq -0x2a0(%rbp), %rax
cmpq %rcx, %rax
jae 0x5f11
movl $0x0, -0x168(%rbp)
movl -0x168(%rbp), %eax
movq %rax, -0x2a8(%rbp)
movq -0x80(%rbp), %rdi
callq 0x8210
movq %rax, %rcx
movq -0x2a8(%rbp), %rax
cmpq %rcx, %rax
jae 0x5efb
movq -0x78(%rbp), %rdi
movl -0x164(%rbp), %eax
movl %eax, %esi
callq 0x7cb0
movl (%rax), %eax
movl %eax, -0x16c(%rbp)
movq -0x80(%rbp), %rdi
movl -0x168(%rbp), %eax
movl %eax, %esi
callq 0x7cb0
movl (%rax), %eax
movl %eax, -0x170(%rbp)
movq -0x18(%rbp), %rax
movslq -0x16c(%rbp), %rcx
movl 0x5e14(%rax,%rcx,4), %eax
movl %eax, -0x174(%rbp)
movq -0x88(%rbp), %rdi
movl -0x164(%rbp), %eax
movl %eax, %esi
callq 0x7cb0
movl (%rax), %eax
movl %eax, -0x178(%rbp)
movq -0x20(%rbp), %rax
movslq -0x170(%rbp), %rcx
movl 0x5e14(%rax,%rcx,4), %eax
movl %eax, -0x17c(%rbp)
movq -0x90(%rbp), %rdi
movl -0x168(%rbp), %eax
movl %eax, %esi
callq 0x7cb0
movl (%rax), %eax
movl %eax, -0x180(%rbp)
movl -0x164(%rbp), %esi
movl -0x168(%rbp), %edx
leaq -0x110(%rbp), %rdi
callq 0x7820
movq %rax, -0x2b0(%rbp)
jmp 0x57a2
movq -0x2b0(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x18(%rbp), %rax
movslq -0x16c(%rbp), %rcx
movq 0x6eb8(%rax,%rcx,8), %rax
movq %rax, -0x190(%rbp)
cmpq $0x0, -0x190(%rbp)
je 0x59b5
movq -0x18(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x2c0(%rbp)
movl -0x16c(%rbp), %edi
callq 0x79f0
movq %rax, -0x2b8(%rbp)
jmp 0x580d
movq -0x190(%rbp), %rdi
callq 0x7a30
movq %rax, -0x2d8(%rbp)
jmp 0x5822
movq -0x2d8(%rbp), %rcx
movq -0x2b8(%rbp), %rax
orq %rcx, %rax
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rdx
movslq -0x16c(%rbp), %rsi
movq 0x8058(%rdx,%rsi,8), %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x2e8(%rbp)
movl -0x170(%rbp), %edi
callq 0x79f0
movq %rax, -0x2e0(%rbp)
jmp 0x586b
movq -0x2e8(%rbp), %rcx
movq -0x2c0(%rbp), %rdx
movq -0x2c8(%rbp), %rsi
movq -0x2d0(%rbp), %rdi
movq -0x2e0(%rbp), %r8
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %r9
movslq -0x170(%rbp), %r10
movq 0x8058(%r9,%r10,8), %r9
andq %r9, %rax
orq %rax, %r8
callq 0x50f0
movl %eax, -0x2ec(%rbp)
jmp 0x58b8
movl -0x2ec(%rbp), %eax
movl %eax, -0x194(%rbp)
movl -0x194(%rbp), %eax
movq -0x188(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x5981
movl -0x194(%rbp), %ecx
movq -0x188(%rbp), %rax
movl %ecx, (%rax)
movq -0x98(%rbp), %rdi
movl -0x164(%rbp), %esi
movl -0x168(%rbp), %edx
callq 0x7820
movq %rax, -0x2f8(%rbp)
jmp 0x5909
movq -0x2f8(%rbp), %rax
movl $0x0, (%rax)
movq -0x190(%rbp), %rdi
callq 0x7a10
movq %rax, -0x300(%rbp)
jmp 0x592b
movq -0x300(%rbp), %rax
movl %eax, -0x30c(%rbp)
movq -0xa0(%rbp), %rdi
movl -0x164(%rbp), %esi
movl -0x168(%rbp), %edx
callq 0x7820
movq %rax, -0x308(%rbp)
jmp 0x5959
movq -0x308(%rbp), %rax
movl -0x30c(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x5981
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x5f7a
jmp 0x5983
movq -0x190(%rbp), %rdi
callq 0x7a30
movq %rax, -0x318(%rbp)
jmp 0x5998
movq -0x318(%rbp), %rcx
movq -0x190(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x190(%rbp)
jmp 0x57ca
movq -0x20(%rbp), %rax
movslq -0x170(%rbp), %rcx
movq 0x6eb8(%rax,%rcx,8), %rax
movq %rax, -0x1a0(%rbp)
cmpq $0x0, -0x1a0(%rbp)
je 0x5ba1
movq -0x18(%rbp), %rax
movq %rax, -0x338(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x330(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x328(%rbp)
movl -0x16c(%rbp), %edi
callq 0x79f0
movq %rax, -0x320(%rbp)
jmp 0x5a12
movq -0x320(%rbp), %rax
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rdx
movslq -0x16c(%rbp), %rsi
movq 0x8058(%rdx,%rsi,8), %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x348(%rbp)
movl -0x170(%rbp), %edi
callq 0x79f0
movq %rax, -0x340(%rbp)
jmp 0x5a51
movq -0x1a0(%rbp), %rdi
callq 0x7a30
movq %rax, -0x350(%rbp)
jmp 0x5a66
movq -0x348(%rbp), %rcx
movq -0x328(%rbp), %rdx
movq -0x330(%rbp), %rsi
movq -0x338(%rbp), %rdi
movq -0x350(%rbp), %rax
movq -0x340(%rbp), %r8
orq %rax, %r8
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %r9
movslq -0x170(%rbp), %r10
movq 0x8058(%r9,%r10,8), %r9
andq %r9, %rax
orq %rax, %r8
callq 0x50f0
movl %eax, -0x354(%rbp)
jmp 0x5abd
movl -0x354(%rbp), %eax
movl %eax, -0x1a4(%rbp)
movl -0x1a4(%rbp), %eax
movq -0x188(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x5b6d
movl -0x1a4(%rbp), %ecx
movq -0x188(%rbp), %rax
movl %ecx, (%rax)
movq -0x98(%rbp), %rdi
movl -0x164(%rbp), %esi
movl -0x168(%rbp), %edx
callq 0x7820
movq %rax, -0x360(%rbp)
jmp 0x5b0e
movq -0x360(%rbp), %rax
movl $0x1, (%rax)
movq -0x1a0(%rbp), %rdi
callq 0x7a10
movq %rax, -0x368(%rbp)
jmp 0x5b30
movq -0x368(%rbp), %rax
movl %eax, -0x374(%rbp)
movq -0xa0(%rbp), %rdi
movl -0x164(%rbp), %esi
movl -0x168(%rbp), %edx
callq 0x7820
movq %rax, -0x370(%rbp)
jmp 0x5b5e
movq -0x370(%rbp), %rax
movl -0x374(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x5b6f
movq -0x1a0(%rbp), %rdi
callq 0x7a30
movq %rax, -0x380(%rbp)
jmp 0x5b84
movq -0x380(%rbp), %rcx
movq -0x1a0(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x1a0(%rbp)
jmp 0x59cf
leaq -0x1b8(%rbp), %rdi
movq %rdi, -0x390(%rbp)
leaq -0x178(%rbp), %rsi
leaq -0x180(%rbp), %rdx
callq 0x8260
movq -0x390(%rbp), %rsi
leaq 0x28768(%rip), %rdi     # 0x2e338
callq 0x8230
movq %rax, -0x388(%rbp)
jmp 0x5bde
movq -0x388(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq 0x28745(%rip), %rdi     # 0x2e338
callq 0x82d0
movq %rax, -0x1c0(%rbp)
leaq -0x1b0(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x82a0
testb $0x1, %al
jne 0x5c1b
jmp 0x5d5e
movq -0x18(%rbp), %rax
movl 0x5e08(%rax), %esi
movq -0x20(%rbp), %rax
movl 0x5e08(%rax), %edx
leaq -0x220(%rbp), %rdi
movl $0x80000000, %ecx       # imm = 0x80000000
callq 0x7b70
jmp 0x5c42
movq -0x18(%rbp), %rax
movl 0x5e08(%rax), %esi
movq -0x20(%rbp), %rax
movl 0x5e08(%rax), %edx
leaq -0x240(%rbp), %rdi
movl $0x80000000, %ecx       # imm = 0x80000000
callq 0x7b70
jmp 0x5c69
leaq -0x200(%rbp), %rdi
leaq -0x220(%rbp), %rsi
leaq -0x240(%rbp), %rdx
callq 0x8300
jmp 0x5c85
leaq -0x248(%rbp), %rdi
movq %rdi, -0x3a0(%rbp)
leaq -0x178(%rbp), %rsi
leaq -0x180(%rbp), %rdx
callq 0x8260
movq -0x3a0(%rbp), %rsi
leaq 0x28684(%rip), %rdi     # 0x2e338
callq 0x8340
movq %rax, -0x398(%rbp)
jmp 0x5cc2
movq -0x398(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x8420
leaq -0x200(%rbp), %rdi
callq 0x8460
leaq -0x240(%rbp), %rdi
callq 0x7b50
leaq -0x220(%rbp), %rdi
callq 0x7b50
jmp 0x5d5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x5d4d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x5d41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x8460
leaq -0x240(%rbp), %rdi
callq 0x7b50
leaq -0x220(%rbp), %rdi
callq 0x7b50
jmp 0x5f7a
leaq -0x258(%rbp), %rdi
movq %rdi, -0x3b0(%rbp)
leaq -0x178(%rbp), %rsi
leaq -0x180(%rbp), %rdx
callq 0x8260
movq -0x3b0(%rbp), %rsi
leaq 0x285ab(%rip), %rdi     # 0x2e338
callq 0x8340
movq %rax, -0x3a8(%rbp)
jmp 0x5d9b
movq -0x3a8(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rdi
callq 0x8490
movq %rax, -0x260(%rbp)
movq -0x250(%rbp), %rdi
callq 0x84b0
movq %rax, -0x268(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movslq -0x16c(%rbp), %rax
movq 0x6eb8(%rdi,%rax,8), %rcx
movslq -0x170(%rbp), %rax
movq 0x6eb8(%rsi,%rax,8), %r8
callq 0x50f0
movl %eax, -0x3b4(%rbp)
jmp 0x5e06
movq -0x260(%rbp), %rdi
movq -0x268(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movl -0x178(%rbp), %r9d
movl -0x180(%rbp), %r10d
movl -0x174(%rbp), %r11d
movl -0x17c(%rbp), %ebx
movq %rsp, %rax
movl %ebx, 0x10(%rax)
movl %r11d, 0x8(%rax)
movl %r10d, (%rax)
callq 0x4930
movl %eax, -0x3b8(%rbp)
jmp 0x5e55
movl -0x3b8(%rbp), %ecx
movl -0x3b4(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x26c(%rbp)
movl -0x26c(%rbp), %eax
movq -0x188(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x5ee5
movl -0x26c(%rbp), %ecx
movq -0x188(%rbp), %rax
movl %ecx, (%rax)
movq -0x98(%rbp), %rdi
movl -0x164(%rbp), %esi
movl -0x168(%rbp), %edx
callq 0x7820
movq %rax, -0x3c0(%rbp)
jmp 0x5eaa
movq -0x3c0(%rbp), %rax
movl $0x2, (%rax)
movq -0xa0(%rbp), %rdi
movl -0x164(%rbp), %esi
movl -0x168(%rbp), %edx
callq 0x7820
movq %rax, -0x3c8(%rbp)
jmp 0x5ed8
movq -0x3c8(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0x5ee7
movl -0x168(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x168(%rbp)
jmp 0x56be
jmp 0x5efd
movl -0x164(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x164(%rbp)
jmp 0x568b
movq -0x70(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x4d30
movl %eax, -0x3cc(%rbp)
jmp 0x5f29
movl -0x3cc(%rbp), %eax
movl %eax, -0x270(%rbp)
movl -0x270(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x5f63
movl -0x270(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, (%rax)
movq -0x60(%rbp), %rax
movl $0x2, (%rax)
movq -0x68(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x58(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x7b50
jmp 0x5f88
leaq -0x110(%rbp), %rdi
callq 0x7b50
jmp 0x5f95
movl -0xc(%rbp), %eax
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %rbp
retq
movq -0x138(%rbp), %rdi
callq 0x44e0
nopw %cs:(%rax,%rax)