// File: /workspace/github_cpp_makefile_star2_O1/ekg[P]sgd2/src/sgd2.hpp
// Function: sgd2::MSSP_weighted(std::vector<std::vector<sgd2::edge, std::allocator<sgd2::edge>>, std::allocator<std::vector<sgd2::edge, std::allocator<sgd2::edge>>>> const&, std::vector<unsigned long, std::allocator<unsigned long>> const&)
std::vector<term_sparse> MSSP_weighted(const std::vector<std::vector<edge>>& graph, const std::vector<uint64_t>& closest_pivots)
{
    uint64_t n = graph.size();

    // get pivots and their regions, but in sets
    std::unordered_map<uint64_t, std::unordered_set<uint64_t>> regions;
    for (uint64_t i = 0; i < n; i++)
    {
        if (regions.find(closest_pivots[i]) == regions.end())
        {
            regions[closest_pivots[i]] = std::unordered_set<uint64_t>();
        }
        regions[closest_pivots[i]].insert(i);
    }

    std::unordered_map<uint64_t, std::unordered_map<uint64_t, term_sparse>> termsDict;
    for (const auto& region : regions)
    {
        uint64_t p = region.first;

        std::vector<bool> visited(n, false);
        std::vector<double> d(n, std::numeric_limits<double>::max()); // init 'tentative' distances to infinity

        // edges are used 'invisibly' in this queue
        std::priority_queue<edge, std::vector<edge>, edge_comp> pq;

        // init initial edges so that pivot-pivot term is avoided
        for (edge e : graph[p])
        {
            // here the edge is not 'invisible'
            uint64_t next = e.target;
            double weight = e.weight;

            d[next] = weight; // init tentative value of d
            pq.push(edge(next, d[next]));
        }
        d[p] = 0;
        visited[p] = true;

        // q2 contains visited vertices' distances for s calculation
        std::queue<double> q2;
        uint64_t s = 1;

        while (!pq.empty())
        {
            uint64_t current = pq.top().target;
            double d_pi = pq.top().weight;
            pq.pop();
            
            if (!visited[current]) // ignore redundant elements in queue
            {
                visited[current] = true;

                // empty the second queue enough to calculate s
                while (!q2.empty() && q2.front() <= d_pi/2)
                {
                    q2.pop();
                    s += 1;
                }
                if (region.second.find(current) != region.second.end())
                {
                    q2.push(d_pi);
                }

                uint64_t i = current;
                if (i < p)
                {
                    if (termsDict.find(i) == termsDict.end())
                        termsDict[i] = std::unordered_map<uint64_t, term_sparse>();
                    if (termsDict[i].find(p) == termsDict[i].end())
                        termsDict[i].insert({ p, term_sparse(i, p, d_pi) });

                    termsDict[i].at(p).w_ij = s / ((double)d_pi * d_pi);
                }
                else
                {
                    if (termsDict.find(p) == termsDict.end())
                        termsDict[p] = std::unordered_map<uint64_t, term_sparse>();
                    if (termsDict[p].find(i) == termsDict[p].end())
                        termsDict[p].insert({ i, term_sparse(p, i, d_pi) });

                    termsDict[p].at(i).w_ji = s / ((double)d_pi * d_pi);
                }

                // update tentative distances
                for (edge e : graph[current])
                {
                    // here the edge is not 'invisible'
                    uint64_t next = e.target;
                    double weight = e.weight;

                    if (d_pi + weight < d[next]) 
                    {
                        d[next] = d_pi + weight; // update tentative value of d
                        pq.push(edge(next, d[next]));
                    }
                }
            }
        }
    }
    // 1-stress
    for (uint64_t i=0; i<n; i++)
    {
        for (edge e : graph[i])
        {
            uint64_t j = e.target;
            double d_ij = e.weight;
            if (i < j)
            {
                if (termsDict.find(i) == termsDict.end())
                    termsDict[i] = std::unordered_map<uint64_t, term_sparse>();
                if (termsDict[i].find(j) == termsDict[i].end())
                    termsDict[i].insert({ j, term_sparse(i, j, d_ij) });
                else
                    termsDict[i].at(j).d = d_ij;

                termsDict[i].at(j).w_ij = termsDict[i].at(j).w_ji = 1/(d_ij*d_ij);
            }
        }
    }
    std::vector<term_sparse> terms;
    for (const auto& i : termsDict)
    {
        for (const auto& j : i.second)
        {
            terms.push_back(j.second);
        }
    }
    return terms;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdx, %r14
movq %rdi, -0x1b8(%rbp)
movq (%rsi), %rdx
movq %rsi, -0x128(%rbp)
movq 0x8(%rsi), %rsi
movq %rsi, %rax
subq %rdx, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rcx
movq %rcx, -0xe8(%rbp)
leaq -0x1d0(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movupd %xmm0, -0x8(%rax)
movq $0x0, -0x160(%rbp)
movq %rdx, -0x1c8(%rbp)
movq %rsi, -0x1c0(%rbp)
cmpq %rdx, %rsi
je 0x5d99
leaq -0x70(%rbp), %r13
xorl %r8d, %r8d
leaq -0x200(%rbp), %r15
leaq -0xa0(%rbp), %r12
movq (%r14), %r9
movq (%r9,%r8,8), %rcx
movq -0x200(%rbp), %rdi
movq -0x1f8(%rbp), %r10
movq %rcx, %rax
xorl %edx, %edx
divq %r10
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x5cdc
movq (%rdx), %r11
movq %rdx, %rax
cmpq 0x8(%r11), %rcx
je 0x5cdc
movq %r11, %rbx
movq (%r11), %r11
testq %r11, %r11
je 0x5cda
movq 0x8(%r11), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r10
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x5cdc
movq %rbx, %rax
cmpq %rdi, %rcx
jne 0x5caf
jmp 0x5cdc
xorl %eax, %eax
testq %rax, %rax
je 0x5ce7
cmpq $0x0, (%rax)
jne 0x5d4c
leaq (%r9,%r8,8), %rsi
xorpd %xmm0, %xmm0
movapd %xmm0, -0xa0(%rbp)
movapd %xmm0, -0x80(%rbp)
movapd %xmm0, -0x90(%rbp)
movq $0x0, -0x70(%rbp)
movq %r13, -0xa0(%rbp)
movq $0x1, -0x98(%rbp)
movupd %xmm0, -0x20(%r13)
movl $0x3f800000, -0x80(%rbp) # imm = 0x3F800000
movupd %xmm0, -0x8(%r13)
movq %r15, %rdi
callq 0x9ee6
movq %rax, %rdi
movq %r12, %rsi
callq 0x2280
movq %r12, %rdi
callq 0x8530
movq -0x160(%rbp), %rsi
shlq $0x3, %rsi
addq (%r14), %rsi
movq %r15, %rdi
callq 0x9ee6
movq %rax, -0xa0(%rbp)
movq %rax, %rdi
leaq -0x160(%rbp), %rsi
movq %r12, %rdx
callq 0x8ade
movq -0x160(%rbp), %r8
incq %r8
movq %r8, -0x160(%rbp)
cmpq -0xe8(%rbp), %r8
jb 0x5c75
leaq -0x130(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movupd %xmm0, -0x8(%rax)
movq -0x1f0(%rbp), %r13
testq %r13, %r13
movq -0xe8(%rbp), %rbx
je 0x66e4
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
leaq -0xa0(%rbp), %r14
leaq -0xe0(%rbp), %r12
addq $0x3f, %rax
movq %rax, -0x48(%rbp)
leaq -0x180(%rbp), %r15
movq 0x8(%r13), %rax
movq %rax, -0x30(%rbp)
movb $0x0, -0xa0(%rbp)
leaq -0x118(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x7e9e
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
movq %rax, -0xa0(%rbp)
leaq -0x198(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x7f04
xorpd %xmm0, %xmm0
movapd %xmm0, -0x180(%rbp)
movq $0x0, -0x170(%rbp)
movq -0x30(%rbp), %rax
movq -0x128(%rbp), %rcx
movq (%rcx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rbx
movq 0x8(%rcx,%rax,8), %r14
cmpq %r14, %rbx
je 0x5ebd
movq (%rbx), %rax
movsd 0x8(%rbx), %xmm0
movq -0x198(%rbp), %rcx
movsd %xmm0, (%rcx,%rax,8)
movsd (%rcx,%rax,8), %xmm0
movq %rax, -0xa0(%rbp)
movsd %xmm0, -0x98(%rbp)
movq %r15, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x7f90
addq $0x10, %rbx
jmp 0x5e7b
movq %r13, -0xf0(%rbp)
movq -0x30(%rbp), %rcx
movq -0x198(%rbp), %rax
movq $0x0, (%rax,%rcx,8)
leaq 0x3f(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq -0x118(%rbp), %rax
movq %rcx, %rdx
andq -0x48(%rbp), %rdx
xorl %esi, %esi
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
cmpq %rbx, %rdx
setbe %sil
movl $0x1, %edx
shlq %cl, %rdx
orq %rdx, -0x8(%rax,%rsi,8)
xorpd %xmm0, %xmm0
movapd %xmm0, -0x60(%rbp)
movapd %xmm0, -0x70(%rbp)
movapd %xmm0, -0x80(%rbp)
movapd %xmm0, -0x90(%rbp)
movapd %xmm0, -0xa0(%rbp)
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
callq 0xab7e
movq -0x180(%rbp), %rax
cmpq -0x178(%rbp), %rax
je 0x6646
movl $0x1, %r14d
movq (%rax), %r13
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq %r15, %rdi
callq 0x8036
leaq 0x3f(%r13), %rax
testq %r13, %r13
cmovnsq %r13, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq -0x118(%rbp), %rax
movq %r13, %rcx
andq -0x48(%rbp), %rcx
xorl %edx, %edx
cmpq %rbx, %rcx
setbe %dl
movl $0x1, %esi
movl %r13d, %ecx
shlq %cl, %rsi
movq -0x8(%rax,%rdx,8), %rcx
btq %r13, %rcx
jb 0x6632
leaq -0x8(,%rdx,8), %rdx
orq %rsi, %rcx
movq %rcx, (%rax,%rdx)
movq -0x90(%rbp), %rax
movq -0x70(%rbp), %rdi
cmpq %rax, %rdi
je 0x6067
movsd -0x40(%rbp), %xmm0
mulsd 0x5025(%rip), %xmm0     # 0xb010
ucomisd (%rax), %xmm0
jb 0x6067
incq %r14
movq %r14, %rcx
movq %rcx, %r14
movq -0x80(%rbp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x600d
addq $0x8, %rax
jmp 0x6040
movq -0x88(%rbp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq -0x78(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x78(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
leaq 0x200(%rax), %rcx
movq %rcx, -0x80(%rbp)
movq %rax, -0x90(%rbp)
movq -0x70(%rbp), %rdi
cmpq %rax, %rdi
je 0x6067
movsd -0x40(%rbp), %xmm0
mulsd 0x4fb3(%rip), %xmm0     # 0xb010
leaq 0x1(%r14), %rcx
ucomisd (%rax), %xmm0
jae 0x5ff7
movq -0xf0(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %r8
movq %r13, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rcx
movq (%rsi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x60c8
movq (%rdx), %r9
movq %rdx, %rax
cmpq 0x8(%r9), %r13
je 0x60c8
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x60c6
movq 0x8(%r9), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rcx, %rdx
jne 0x60c8
movq %r10, %rax
cmpq %rsi, %r13
jne 0x609b
jmp 0x60c8
xorl %eax, %eax
testq %rax, %rax
je 0x6103
cmpq $0x0, (%rax)
je 0x6103
movq -0x60(%rbp), %rax
addq $-0x8, %rax
cmpq %rax, %rdi
je 0x60f3
movsd -0x40(%rbp), %xmm0
movsd %xmm0, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x70(%rbp)
jmp 0x6103
leaq -0xa0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xad06
movq %r13, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %r8
cmpq %rcx, %r13
jae 0x617a
movq %r13, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rcx
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x61df
movq (%rdx), %rdi
movq %rdx, %rax
cmpq 0x8(%rdi), %r13
je 0x61df
movq %rdi, %r9
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x61dd
movq 0x8(%rdi), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rcx, %rdx
jne 0x61df
movq %r9, %rax
cmpq %rsi, %r13
jne 0x614b
jmp 0x61df
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x62e1
movq (%rdx), %r9
movq %rdx, %rax
cmpq 0x8(%r9), %rcx
je 0x62e1
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x62df
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x62e1
movq %r10, %rax
cmpq %rdi, %rcx
jne 0x61a7
jmp 0x62e1
xorl %eax, %eax
testq %rax, %rax
je 0x61ea
cmpq $0x0, (%rax)
jne 0x6261
xorpd %xmm0, %xmm0
movapd %xmm0, -0xe0(%rbp)
movapd %xmm0, -0xc0(%rbp)
movapd %xmm0, -0xd0(%rbp)
movq $0x0, -0xb0(%rbp)
leaq -0xb0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq $0x1, -0xd8(%rbp)
movupd %xmm0, -0x20(%rax)
movl $0x3f800000, -0xc0(%rbp) # imm = 0x3F800000
movupd %xmm0, -0x8(%rax)
leaq -0x160(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa358
movq %rax, %rdi
movq %r12, %rsi
callq 0x234a
movq %r12, %rdi
callq 0x85b8
leaq -0x160(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa358
movq -0x30(%rbp), %rcx
movq (%rax), %rdi
movq 0x8(%rax), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x63e3
movq (%rdx), %r9
movq %rdx, %rax
cmpq 0x8(%r9), %rcx
je 0x63e3
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x63e1
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x63e3
movq %r10, %rax
cmpq %rdi, %rcx
jne 0x62a9
jmp 0x63e3
xorl %eax, %eax
testq %rax, %rax
je 0x62ec
cmpq $0x0, (%rax)
jne 0x6363
xorpd %xmm0, %xmm0
movapd %xmm0, -0xe0(%rbp)
movapd %xmm0, -0xc0(%rbp)
movapd %xmm0, -0xd0(%rbp)
movq $0x0, -0xb0(%rbp)
leaq -0xb0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq $0x1, -0xd8(%rbp)
movupd %xmm0, -0x20(%rax)
movl $0x3f800000, -0xc0(%rbp) # imm = 0x3F800000
movupd %xmm0, -0x8(%rax)
leaq -0x160(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xa358
movq %rax, %rdi
movq %r12, %rsi
callq 0x234a
movq %r12, %rdi
callq 0x85b8
leaq -0x160(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xa358
movq -0x38(%rbp), %rcx
movq (%rax), %rdi
movq 0x8(%rax), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x64d2
movq (%rdx), %r9
movq %rdx, %rax
cmpq 0x8(%r9), %rcx
je 0x64d2
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x64d0
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x64d2
movq %r10, %rax
cmpq %rdi, %rcx
jne 0x63ab
jmp 0x64d2
xorl %eax, %eax
testq %rax, %rax
je 0x63f1
cmpq $0x0, (%rax)
sete %bl
jmp 0x63f3
movb $0x1, %bl
leaq -0x160(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa358
testb %bl, %bl
je 0x645c
leaq -0x160(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa358
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rdx
movsd -0x40(%rbp), %xmm0
leaq -0xb0(%rbp), %rsi
xorpd %xmm1, %xmm1
movupd %xmm1, -0x10(%rsi)
movq %rdx, -0xe0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xd0(%rbp)
movsd %xmm0, -0xc8(%rbp)
movq %rax, %rdi
movq %r12, %rsi
callq 0xa6ae
movq %r14, %xmm0
punpckldq 0x4bf7(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x4bff(%rip), %xmm0     # 0xb070
movapd %xmm0, -0x1b0(%rbp)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x120(%rbp)
leaq -0x160(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa358
movq %rax, %rdi
leaq -0x30(%rbp), %rsi
callq 0xa976
movapd -0x1b0(%rbp), %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movsd -0x120(%rbp), %xmm1
mulsd %xmm1, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rax)
jmp 0x65ba
xorl %eax, %eax
testq %rax, %rax
je 0x64e0
cmpq $0x0, (%rax)
sete %bl
jmp 0x64e2
movb $0x1, %bl
leaq -0x160(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xa358
testb %bl, %bl
je 0x654b
leaq -0x160(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xa358
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rdx
movsd -0x40(%rbp), %xmm0
leaq -0xb0(%rbp), %rsi
xorpd %xmm1, %xmm1
movupd %xmm1, -0x10(%rsi)
movq %rdx, -0xe0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xd0(%rbp)
movsd %xmm0, -0xc8(%rbp)
movq %rax, %rdi
movq %r12, %rsi
callq 0xa6ae
movq %r14, %xmm0
punpckldq 0x4b08(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x4b10(%rip), %xmm0     # 0xb070
movapd %xmm0, -0x1b0(%rbp)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x120(%rbp)
leaq -0x160(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xa358
movq %rax, %rdi
leaq -0x38(%rbp), %rsi
callq 0xa976
movapd -0x1b0(%rbp), %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movsd -0x120(%rbp), %xmm1
mulsd %xmm1, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rax)
movq -0x128(%rbp), %rax
movq (%rax), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
movq (%rax,%rcx,8), %r13
movq 0x8(%rax,%rcx,8), %rbx
cmpq %rbx, %r13
je 0x6628
movq (%r13), %rax
movsd 0x8(%r13), %xmm0
addsd -0x40(%rbp), %xmm0
movq -0x198(%rbp), %rcx
movsd (%rcx,%rax,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x6622
movsd %xmm0, (%rcx,%rax,8)
movsd (%rcx,%rax,8), %xmm0
movq %rax, -0xe0(%rbp)
movsd %xmm0, -0xd8(%rbp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x7f90
addq $0x10, %r13
jmp 0x65d8
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
movq -0x180(%rbp), %rax
cmpq -0x178(%rbp), %rax
jne 0x5f63
leaq -0xa0(%rbp), %r14
movq %r14, %rdi
callq 0x8790
movq -0x180(%rbp), %rdi
testq %rdi, %rdi
je 0x6670
movq -0x170(%rbp), %rsi
subq %rdi, %rsi
callq 0x2180
movq -0x198(%rbp), %rdi
testq %rdi, %rdi
movq -0xe8(%rbp), %rbx
movq -0xf0(%rbp), %r13
je 0x6699
movq -0x188(%rbp), %rsi
subq %rdi, %rsi
callq 0x2180
movq -0x118(%rbp), %rdi
testq %rdi, %rdi
je 0x66d7
movq -0xf8(%rbp), %rsi
subq %rdi, %rsi
callq 0x2180
xorl %eax, %eax
movq %rax, -0x118(%rbp)
movl %eax, -0x110(%rbp)
movq %rax, -0x108(%rbp)
movl %eax, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
movq (%r13), %r13
testq %r13, %r13
jne 0x5dff
movq $0x0, -0xe0(%rbp)
movq -0x1c0(%rbp), %rax
cmpq -0x1c8(%rbp), %rax
je 0x69c8
xorl %eax, %eax
leaq -0x160(%rbp), %r14
leaq -0xe0(%rbp), %r15
leaq -0xa0(%rbp), %r13
movq -0x128(%rbp), %rcx
movq (%rcx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %r12
movq 0x8(%rcx,%rax,8), %rax
movq %rax, -0xf0(%rbp)
cmpq %rax, %r12
je 0x69aa
movq (%r12), %rax
movsd 0x8(%r12), %xmm0
movsd %xmm0, -0x48(%rbp)
movq %rax, -0x118(%rbp)
movq -0xe0(%rbp), %rcx
cmpq %rax, %rcx
jae 0x6999
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x67c8
movq (%rdx), %r9
movq %rdx, %rax
cmpq 0x8(%r9), %rcx
je 0x67c8
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x67c6
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x67c8
movq %r10, %rax
cmpq %rdi, %rcx
jne 0x679b
jmp 0x67c8
xorl %eax, %eax
testq %rax, %rax
je 0x67d3
cmpq $0x0, (%rax)
jne 0x6839
xorpd %xmm0, %xmm0
movapd %xmm0, -0xa0(%rbp)
movapd %xmm0, -0x80(%rbp)
movapd %xmm0, -0x90(%rbp)
movq $0x0, -0x70(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq $0x1, -0x98(%rbp)
movupd %xmm0, -0x20(%rax)
movl $0x3f800000, -0x80(%rbp) # imm = 0x3F800000
movupd %xmm0, -0x8(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0xa358
movq %rax, %rdi
movq %r13, %rsi
callq 0x234a
movq %r13, %rdi
callq 0x85b8
movq %r14, %rdi
movq %r15, %rsi
callq 0xa358
movq -0x118(%rbp), %rcx
movq (%rax), %rdi
movq 0x8(%rax), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x68a4
movq (%rdx), %r9
movq %rdx, %rax
cmpq 0x8(%r9), %rcx
je 0x68a4
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x68a2
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x68a4
movq %r10, %rax
cmpq %rdi, %rcx
jne 0x6877
jmp 0x68a4
xorl %eax, %eax
testq %rax, %rax
je 0x68b2
cmpq $0x0, (%rax)
sete %bl
jmp 0x68b4
movb $0x1, %bl
movq %r14, %rdi
movq %r15, %rsi
callq 0xa358
testb %bl, %bl
je 0x6918
movq %r14, %rdi
movq %r15, %rsi
callq 0xa358
movq -0xe0(%rbp), %rcx
movq -0x118(%rbp), %rdx
leaq -0x70(%rbp), %rsi
xorpd %xmm0, %xmm0
movupd %xmm0, -0x10(%rsi)
movq %rdx, -0xa0(%rbp)
movq %rcx, -0x98(%rbp)
movq %rdx, -0x90(%rbp)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movq %rax, %rdi
movq %r13, %rsi
callq 0xa6ae
jmp 0x693c
movq %r14, %rdi
movq %r15, %rsi
callq 0xa358
movq %rax, %rdi
leaq -0x118(%rbp), %rsi
callq 0xa976
movsd -0x48(%rbp), %xmm0
movsd %xmm0, 0x10(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0xa358
movq %rax, %rdi
leaq -0x118(%rbp), %rsi
callq 0xa976
movsd -0x48(%rbp), %xmm1
mulsd %xmm1, %xmm1
movsd 0x46a1(%rip), %xmm0     # 0xb008
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movsd %xmm0, 0x20(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0xa358
movq %rax, %rdi
leaq -0x118(%rbp), %rsi
callq 0xa976
movsd -0x48(%rbp), %xmm0
movsd %xmm0, 0x18(%rax)
addq $0x10, %r12
cmpq -0xf0(%rbp), %r12
jne 0x6741
movq -0xe0(%rbp), %rax
incq %rax
movq %rax, -0xe0(%rbp)
cmpq -0xe8(%rbp), %rax
jb 0x671a
xorpd %xmm0, %xmm0
movq -0x1b8(%rbp), %rbx
movupd %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq -0x150(%rbp), %r14
testq %r14, %r14
je 0x6a38
movq 0x20(%r14), %r15
testq %r15, %r15
je 0x6a33
leaq 0x10(%r15), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6a26
movq 0x20(%rdx), %rax
movq %rax, 0x20(%rsi)
movupd (%rdx), %xmm0
movupd 0x10(%rdx), %xmm1
movupd %xmm1, 0x10(%rsi)
movupd %xmm0, (%rsi)
addq $0x28, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x6a2e
movq %rbx, %rdi
callq 0xa9c2
movq (%r15), %r15
jmp 0x69ef
movq (%r14), %r14
jmp 0x69e6
leaq -0x160(%rbp), %rdi
callq 0x8640
leaq -0x200(%rbp), %rdi
callq 0x86e8
movq %rbx, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0xa0(%rbp), %rdi
callq 0x8530
jmp 0x6b94
jmp 0x6ab4
jmp 0x6af6
movq %rax, %r14
jmp 0x6b4a
jmp 0x6afd
jmp 0x6b05
jmp 0x6b05
movq %rax, %r14
jmp 0x6b94
jmp 0x6a99
jmp 0x6ab4
jmp 0x6ab4
movq %rax, %r14
leaq -0xe0(%rbp), %rdi
callq 0x85b8
jmp 0x6b08
jmp 0x6b05
jmp 0x6b05
jmp 0x6b05
jmp 0x6b05
jmp 0x6afd
movq %rax, %rdi
callq 0x84c7
movq %rax, %r14
leaq -0xa0(%rbp), %rdi
callq 0x85b8
jmp 0x6b88
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6b88
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0x6b88
jmp 0x6afd
jmp 0x6afd
jmp 0x6b05
movq %rax, %r14
jmp 0x6b14
jmp 0x6b05
movq %rax, %r14
jmp 0x6b88
movq %rax, %r14
leaq -0xa0(%rbp), %rdi
callq 0x8790
movq -0x180(%rbp), %rdi
testq %rdi, %rdi
je 0x6b2f
movq -0x170(%rbp), %rsi
subq %rdi, %rsi
callq 0x2180
movq -0x198(%rbp), %rdi
testq %rdi, %rdi
je 0x6b4a
movq -0x188(%rbp), %rsi
subq %rdi, %rsi
callq 0x2180
movq -0x118(%rbp), %rdi
testq %rdi, %rdi
je 0x6b88
movq -0xf8(%rbp), %rsi
subq %rdi, %rsi
callq 0x2180
xorl %eax, %eax
movq %rax, -0x118(%rbp)
movl %eax, -0x110(%rbp)
movq %rax, -0x108(%rbp)
movl %eax, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x8640
leaq -0x200(%rbp), %rdi
callq 0x86e8
movq %r14, %rdi
callq 0x2240