// File: /workspace/github_cpp_makefile_star2_O3/fjamour[P]icentral/src/qube.cc
// Function: muc_t::i_iteration_2(unsigned int, unsigned int, unsigned int, int, int, std::tr1::unordered_map<unsigned int, double, std::tr1::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, double>>>&)
void muc_t::i_iteration_2(node_id_t s,
                        node_id_t src,
                        node_id_t dst,
                        int d_src,
                        int d_dst,
                        tr1_map_t(double)& bc_map)
{
        vector<vector<node_id_t> >&  P = muc_fast_subgraph.P; 
        vector<int>&                 path_cnt_map = muc_fast_subgraph.path_cnt_vec;
        vector<int>&                 path_cnt_inc_map = muc_fast_subgraph.path_cnt_inc_vec;
        vector<int>&                 dist_map = muc_fast_subgraph.dist_vec;
        vector<double>&              pair_dep_map = muc_fast_subgraph.pair_dep_vec;
        vector<double>&              sigma_t_map = muc_fast_subgraph.sigma_t_map;
        vector<bool>&                visited_vec = muc_fast_subgraph.visited_vec;
        queue<node_id_t>&            Q = muc_fast_subgraph.Q;
        vector<node_id_t>            S;
        
        muc_fast_subgraph.init_maps();           

        path_cnt_map[s] = 1;
        dist_map[s] = 0;
        Q.push(s);
        while(!Q.empty()) {
            node_id_t v_i = Q.front(); Q.pop();
            S.push_back(v_i);
            for(int i = 0; i < muc_fast_subgraph.nodes_vec[v_i].size(); ++i) {
                node_id_t v_n = muc_fast_subgraph.nodes_vec[v_i][i];
                if(dist_map[v_n] < 0) {
                    Q.push(v_n);
                    dist_map[v_n] = dist_map[v_i] + 1;
                }
                if(dist_map[v_n] == dist_map[v_i] + 1) {
                    path_cnt_map[v_n] = path_cnt_map[v_n] + path_cnt_map[v_i];
                    P[v_n].push_back(v_i);
                }
            }
        }
        
        /*
         * steps:
         * 1. do the reverse BFS and subtract the olds
         * 2. compute the new counts
         * 3. fix the order of S
         * 4. add the new increments
         */
        //RBFS to subtract old pair dependency
        for(int i = S.size()-1; i >= 0; --i) {
            node_id_t v_n = S[i];
            if(   tmp_conn_vertex_map.find(s) != tmp_conn_vertex_map.end()
               && tmp_conn_vertex_map.find(v_n) != tmp_conn_vertex_map.end()
               && s != v_n) {
                int VG_s, VG_n;
                VG_s = tmp_subgraph_map[s].size();
                VG_n = tmp_subgraph_map[v_n].size();
                int c_t = VG_s*VG_n;
                sigma_t_map[v_n] =  sigma_t_map[v_n] + c_t;
                /*this guy must not change!*/
                //bc_map[v_n] = bc_map[v_n] - c_t;
            }
            for(int i = 0; i < P[v_n].size(); ++i) {
                node_id_t v_p = P[v_n][i];
                double sp_sn = ((double)path_cnt_map[v_p]/path_cnt_map[v_n]);
                pair_dep_map[v_p] = pair_dep_map[v_p] + sp_sn*(1+pair_dep_map[v_n]);
                if(tmp_conn_vertex_map.find(s) != tmp_conn_vertex_map.end()) {
                    sigma_t_map[v_p] = sigma_t_map[v_p] + sigma_t_map[v_n]*sp_sn;
                    
                    node_id_t new_v_p = muc_fast_subgraph.inout_label_map[v_p];
                    bc_map[new_v_p] = bc_map[new_v_p] - sigma_t_map[v_n]*sp_sn/2.0;
                }
            }
            if(s != v_n) {
                node_id_t new_v_n = muc_fast_subgraph.inout_label_map[v_n];
                bc_map[new_v_n] = bc_map[new_v_n] - pair_dep_map[v_n]/2.0;
            }
            if(tmp_conn_vertex_map.find(s) != tmp_conn_vertex_map.end()) {
                int VG_s = tmp_subgraph_map[s].size();
                
                node_id_t new_v_n = muc_fast_subgraph.inout_label_map[v_n];
                bc_map[new_v_n] = bc_map[new_v_n] - pair_dep_map[v_n]*VG_s;
            }
        }
                
        //Compute new path counts and paths
        Q.push(dst);
        dist_map[dst] = dist_map[src] + 1;
        P[dst].clear();
        P[dst].push_back(src);
        path_cnt_inc_map[dst] = path_cnt_map[src];
        path_cnt_map[dst] = path_cnt_inc_map[dst];
        visited_vec[dst] = true;
        
        while (!Q.empty()) {
            node_id_t v = Q.front();
            Q.pop();
            vector<node_id_t> nbr_vec = muc_fast_subgraph.get_nbrs(v);
            for (int nbr_idx = 0; nbr_idx < nbr_vec.size(); ++nbr_idx) {
                node_id_t w = nbr_vec[nbr_idx];
                if (dist_map[w] > (dist_map[v] + 1)) {
                    dist_map[w] = dist_map[v] + 1;
                    P[w].clear();
                    P[w].push_back(v);
                    path_cnt_map[w] = 0;
                    path_cnt_inc_map[w] = path_cnt_inc_map[v];
                    path_cnt_map[w] += path_cnt_inc_map[w];
                    if(!visited_vec[w]) {
                        visited_vec[w] = true;
                        Q.push(w);
                    }
                } else if (dist_map[w] == (dist_map[v] + 1)) {
                    path_cnt_inc_map[w] += path_cnt_inc_map[v];
                    path_cnt_map[w] += path_cnt_inc_map[v];
                    if(find(P[w].begin(), P[w].end(), v) == P[w].end()) {
                        P[w].push_back(v);
                    }
                    if(!visited_vec[w]) {
                        visited_vec[w] = true;
                        Q.push(w);
                    }
                }
            }
        }
        
    
        //fix order of S
        //IMP::THIS CAN BE MADE MUCH BETTER!
        //HEAP FOR EXAMPLE
        //EVEN THE SWAPPING CAN BE DONE MORE EFFICIENTLY
        //for now it's not a bottleneck
        for(int i = 1; i < S.size(); ++i) {
            if(dist_map[S[i-1]] > dist_map[S[i]]) {
                int j = i;
                while(dist_map[S[j-1]] > dist_map[S[j]]) {
                    node_id_t tmp = S[j-1];
                    S[j-1] = S[j];
                    S[j] = tmp;
                    --j;
                }
            }
        }
        
        muc_fast_subgraph.i_fill_map<double>(pair_dep_map, 0);
        muc_fast_subgraph.i_fill_map<double>(sigma_t_map, 0);
        //RBFS to add the new pair dependencies
        for(int i = S.size()-1; i >= 0; --i) {
            node_id_t v_n = S[i];
            if(   tmp_conn_vertex_map.find(s) != tmp_conn_vertex_map.end()
               && tmp_conn_vertex_map.find(v_n) != tmp_conn_vertex_map.end()
               && s != v_n) {
                int VG_s, VG_n;
                VG_s = tmp_subgraph_map[s].size();
                VG_n = tmp_subgraph_map[v_n].size();
                int c_t = VG_s*VG_n;
                sigma_t_map[v_n] =  sigma_t_map[v_n] + c_t;
                /*this guy must not change!*/
                //bc_map[v_n] = bc_map[v_n] + c_t;
            }
            for(int i = 0; i < P[v_n].size(); ++i) {
                node_id_t v_p = P[v_n][i];
                double sp_sn = ((double)path_cnt_map[v_p]/path_cnt_map[v_n]);
                pair_dep_map[v_p] = pair_dep_map[v_p] + sp_sn*(1+pair_dep_map[v_n]);
                if(tmp_conn_vertex_map.find(s) != tmp_conn_vertex_map.end()) {
                    sigma_t_map[v_p] = sigma_t_map[v_p] + sigma_t_map[v_n]*sp_sn;
                    
                    node_id_t new_v_p = muc_fast_subgraph.inout_label_map[v_p];
                    bc_map[new_v_p] = bc_map[new_v_p] + sigma_t_map[v_n]*sp_sn/2.0;
                }
            }
            if(s != v_n) {
                node_id_t new_v_n = muc_fast_subgraph.inout_label_map[v_n];
                bc_map[new_v_n] = bc_map[new_v_n] + pair_dep_map[v_n]/2.0;
            }
            if(tmp_conn_vertex_map.find(s) != tmp_conn_vertex_map.end()) {
                int VG_s = tmp_subgraph_map[s].size();
                
                node_id_t new_v_n = muc_fast_subgraph.inout_label_map[v_n];
                bc_map[new_v_n] = bc_map[new_v_n] + pair_dep_map[v_n]*VG_s;
            }
        }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
movl %edx, 0x3c(%rsp)
movl %ecx, 0xc(%rsp)
leaq 0x310(%rdi), %r13
xorpd %xmm0, %xmm0
movapd %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq %r13, %rdi
callq 0x2e742
leaq 0x4b8(%rbx), %rbp
movl %r14d, %eax
movq 0x3b8(%rbx), %rcx
movl $0x1, (%rcx,%rax,4)
movl 0x4(%rsp), %eax
movq 0x3e8(%rbx), %rcx
movl $0x0, (%rcx,%rax,4)
movq 0x4e8(%rbx), %rax
movq 0x4f8(%rbx), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x2a4fd
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x4e8(%rbx)
jmp 0x2a511
leaq 0x4(%rsp), %rsi
movq %rbp, %rdi
callq 0x75be
movq 0x4e8(%rbx), %rax
movq 0x4c8(%rbx), %rcx
cmpq %rcx, %rax
movq %rbp, 0x78(%rsp)
je 0x2a681
leaq 0x40(%rsp), %r14
leaq 0x20(%rsp), %r15
movq %rsp, %r12
movl (%rcx), %eax
movl %eax, 0x20(%rsp)
movq %rbp, %rdi
callq 0xddae
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x2a55e
movl 0x20(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x2a56d
movq %r14, %rdi
movq %r15, %rdx
callq 0x6f14
movl 0x20(%rsp), %eax
movl %eax, %ecx
movq (%r13), %rdx
leaq (%rcx,%rcx,2), %rsi
movq (%rdx,%rsi,8), %rcx
cmpq %rcx, 0x8(%rdx,%rsi,8)
je 0x2a665
xorl %ebp, %ebp
movl (%rcx,%rbp,4), %edx
movl %edx, (%rsp)
movq 0x3e8(%rbx), %rcx
movl (%rcx,%rdx,4), %esi
testl %esi, %esi
jns 0x2a5ef
movq 0x4e8(%rbx), %rax
movq 0x4f8(%rbx), %rsi
addq $-0x4, %rsi
cmpq %rsi, %rax
je 0x2a5c2
movl %edx, (%rax)
addq $0x4, %rax
movq %rax, 0x4e8(%rbx)
jmp 0x2a5d6
movq 0x78(%rsp), %rdi
movq %r12, %rsi
callq 0x75be
movq 0x3e8(%rbx), %rcx
movl 0x20(%rsp), %eax
movl (%rcx,%rax,4), %eax
incl %eax
movl (%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movl (%rsp), %edx
movl (%rcx,%rdx,4), %esi
movl 0x20(%rsp), %eax
movl %eax, %edi
movl (%rcx,%rdi,4), %ecx
incl %ecx
cmpl %ecx, %esi
jne 0x2a63f
movq 0x3b8(%rbx), %rax
movl (%rax,%rdi,4), %ecx
addl %ecx, (%rax,%rdx,4)
movl (%rsp), %eax
movq 0x3a0(%rbx), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x2a633
movl 0x20(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2a63f
movq %r15, %rdx
callq 0x6f14
movl 0x20(%rsp), %eax
incq %rbp
movl %eax, %ecx
movq (%r13), %rdx
leaq (%rcx,%rcx,2), %rsi
movq (%rdx,%rsi,8), %rcx
movq 0x8(%rdx,%rsi,8), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %rbp, %rdx
ja 0x2a588
movq 0x4c8(%rbx), %rcx
movq 0x4e8(%rbx), %rax
cmpq %rcx, %rax
movq 0x78(%rsp), %rbp
jne 0x2a533
movq 0xc0(%rsp), %r14
leaq 0x400(%rbx), %rcx
movq %rcx, 0x60(%rsp)
leaq 0x448(%rbx), %rcx
movq %rcx, 0x68(%rsp)
movq 0x48(%rsp), %rcx
subq 0x40(%rsp), %rcx
shrq $0x2, %rcx
decl %ecx
js 0x2aa36
leaq 0x538(%rbx), %rax
movq %rax, 0x70(%rsp)
movl %ecx, %ebp
movq %rsp, %r15
movq 0x40(%rsp), %rax
movl (%rax,%rbp,4), %edi
movl %edi, 0x20(%rsp)
movl 0x4(%rsp), %esi
movq 0x510(%rbx), %r8
movq 0x518(%rbx), %r9
movq %rsi, %rax
xorl %edx, %edx
divq %r9
movq (%r8,%rdx,8), %rax
testq %rax, %rax
je 0x2a731
movq %rdi, %rcx
cmpl (%rax), %esi
je 0x2a709
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x2a6fa
jmp 0x2a731
movq (%r8,%r9,8), %r10
cmpq %r10, %rax
je 0x2a731
movq %rcx, %rax
xorl %edx, %edx
divq %r9
movq (%r8,%rdx,8), %rax
testq %rax, %rax
je 0x2a734
cmpl (%rax), %edi
je 0x2a9c0
movq 0x20(%rax), %rax
jmp 0x2a71e
movq %rdi, %rcx
movq 0x3a0(%rbx), %r8
leaq (%rcx,%rcx,2), %rdx
movq (%r8,%rdx,8), %rax
cmpq %rax, 0x8(%r8,%rdx,8)
je 0x2a88c
xorl %r12d, %r12d
movl (%rax,%r12,4), %r9d
movq 0x3b8(%rbx), %rax
movq 0x400(%rbx), %rdx
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%r9,4), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%rcx,4), %xmm0
divsd %xmm0, %xmm1
movsd (%rdx,%rcx,8), %xmm0
addsd 0x58ab(%rip), %xmm0     # 0x30030
mulsd %xmm1, %xmm0
addsd (%rdx,%r9,8), %xmm0
movsd %xmm0, (%rdx,%r9,8)
movl 0x4(%rsp), %esi
movq 0x510(%rbx), %r10
movq 0x518(%rbx), %r11
movq %rsi, %rax
xorl %edx, %edx
divq %r11
movq (%r10,%rdx,8), %rax
testq %rax, %rax
je 0x2a86a
cmpl (%rax), %esi
je 0x2a7c6
movq 0x20(%rax), %rax
jmp 0x2a7b3
cmpq (%r10,%r11,8), %rax
je 0x2a86a
movq 0x448(%rbx), %rax
movsd (%rax,%rcx,8), %xmm0
movsd %xmm1, 0x18(%rsp)
mulsd %xmm1, %xmm0
addsd (%rax,%r9,8), %xmm0
movsd %xmm0, (%rax,%r9,8)
movq 0x358(%rbx), %rax
movl (%rax,%r9,4), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movl 0x20(%rsp), %eax
movq 0x68(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x80(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd 0x18(%rsp), %xmm0
mulsd 0x80(%rsp), %xmm0
mulsd 0x57ef(%rip), %xmm0     # 0x30040
movsd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rax)
movl 0x20(%rsp), %edi
movq 0x3a0(%rbx), %r8
incq %r12
movl %edi, %ecx
leaq (%rcx,%rcx,2), %rdx
movq (%r8,%rdx,8), %rax
movq 0x8(%r8,%rdx,8), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
ja 0x2a751
cmpl %edi, 0x4(%rsp)
je 0x2a8f6
movq 0x358(%rbx), %rax
movl (%rax,%rcx,4), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x20(%rsp), %eax
movq 0x60(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd 0x10(%rsp), %xmm1
mulsd 0x575c(%rip), %xmm1     # 0x30040
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl 0x4(%rsp), %edi
movl %edi, %eax
movq 0x510(%rbx), %rcx
movq 0x518(%rbx), %rsi
xorl %edx, %edx
divq %rsi
movq (%rcx,%rdx,8), %rax
testq %rax, %rax
je 0x2a9ae
cmpl (%rax), %edi
je 0x2a922
movq 0x20(%rax), %rax
jmp 0x2a90f
cmpq (%rcx,%rsi,8), %rax
je 0x2a9ae
movq 0x70(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x2b312
movq %rax, %rdi
callq 0x1c4e0
movq %rax, %r12
movl 0x20(%rsp), %eax
movq 0x358(%rbx), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x20(%rsp), %eax
movq 0x60(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd8ce
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
movsd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
leaq -0x1(%rbp), %rax
testq %rbp, %rbp
movq %rax, %rbp
jg 0x2a6c8
jmp 0x2aa2a
cmpq %r10, %rax
je 0x2a734
cmpl %edi, %esi
je 0x2a734
movq 0x70(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x2b312
movq %rax, %rdi
callq 0x1c4e0
movq %rax, %r12
movq 0x70(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x2b312
movq %rax, %rdi
callq 0x1c4e0
imull %r12d, %eax
movl 0x20(%rsp), %ecx
movq 0x68(%rsp), %rdx
movq (%rdx), %rdx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
addsd (%rdx,%rcx,8), %xmm0
movsd %xmm0, (%rdx,%rcx,8)
movl %ecx, %edi
jmp 0x2a734
movq 0x4e8(%rbx), %rax
movq 0x78(%rsp), %rbp
movq 0x4f8(%rbx), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x2aa59
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x4e8(%rbx)
jmp 0x2aa6a
leaq 0xc(%rsp), %rsi
movq %rbp, %rdi
callq 0x75be
movl 0xc(%rsp), %ecx
movl 0x3c(%rsp), %eax
movq 0x3e8(%rbx), %rdx
movl (%rdx,%rax,4), %eax
incl %eax
movl %ecx, %ecx
movl %eax, (%rdx,%rcx,4)
movl 0xc(%rsp), %eax
movq 0x3a0(%rbx), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
cmpq %rax, %rsi
je 0x2aaa5
movq %rax, 0x8(%rdi)
movq %rax, %rsi
cmpq 0x10(%rdi), %rsi
je 0x2aabb
movl 0x3c(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2aac9
leaq 0x3c(%rsp), %rdx
callq 0x6f14
movl 0x3c(%rsp), %eax
movl %eax, %eax
movq 0x3b8(%rbx), %rcx
movq 0x430(%rbx), %rdx
movl (%rcx,%rax,4), %eax
movl 0xc(%rsp), %esi
movl %eax, (%rdx,%rsi,4)
movl 0xc(%rsp), %eax
movl (%rdx,%rax,4), %edx
movl %edx, (%rcx,%rax,4)
movl 0xc(%rsp), %ecx
movq 0x478(%rbx), %rax
movl %ecx, %edx
movl $0x1, %esi
shlq %cl, %rsi
shrl $0x6, %edx
orq %rsi, (%rax,%rdx,8)
movq 0x4c8(%rbx), %rax
cmpq %rax, 0x4e8(%rbx)
je 0x2ad1c
movq %rsp, %r15
movl (%rax), %eax
movl %eax, (%rsp)
movq %rbp, %rdi
callq 0xddae
movl (%rsp), %esi
movq %r13, %rdi
callq 0x2e734
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x6112
movq 0x20(%rsp), %rdi
cmpq %rdi, 0x28(%rsp)
je 0x2acf6
xorl %r12d, %r12d
movl (%rdi,%r12,4), %eax
movl %eax, 0x8(%rsp)
movq 0x3e8(%rbx), %rdx
movl (%rsp), %ecx
movl (%rdx,%rcx,4), %esi
incl %esi
cmpl %esi, (%rdx,%rax,4)
jle 0x2abb9
movl %esi, (%rdx,%rax,4)
movl 0x8(%rsp), %eax
movq 0x3a0(%rbx), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
cmpq %rax, %rsi
je 0x2ab9d
movq %rax, 0x8(%rdi)
movq %rax, %rsi
cmpq 0x10(%rdi), %rsi
je 0x2ac36
movl (%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2ac3e
jne 0x2acca
movq 0x430(%rbx), %rdx
movl (%rdx,%rcx,4), %ecx
addl %ecx, (%rdx,%rax,4)
movl (%rsp), %eax
movl (%rdx,%rax,4), %eax
movl 0x8(%rsp), %ecx
movq 0x3b8(%rbx), %rdx
addl %eax, (%rdx,%rcx,4)
movl 0x8(%rsp), %eax
movq 0x3a0(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rdi
movq 0x8(%rcx,%rax,8), %rsi
movq %r15, %rdx
callq 0x7b97
movl 0x8(%rsp), %edx
movq 0x3a0(%rbx), %rcx
leaq (%rdx,%rdx,2), %rdx
movq 0x8(%rcx,%rdx,8), %rsi
cmpq %rsi, %rax
jne 0x2ac6e
leaq (%rcx,%rdx,8), %rdi
cmpq 0x10(%rdi), %rax
je 0x2ace9
movl (%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2ac6e
movq %r15, %rdx
callq 0x6f14
movl 0x8(%rsp), %eax
movq 0x3b8(%rbx), %rcx
movl $0x0, (%rcx,%rax,4)
movl (%rsp), %eax
movq 0x430(%rbx), %rdx
movl (%rdx,%rax,4), %eax
movl 0x8(%rsp), %esi
movl %eax, (%rdx,%rsi,4)
movl 0x8(%rsp), %eax
movl (%rdx,%rax,4), %edx
addl %edx, (%rcx,%rax,4)
movl 0x8(%rsp), %ecx
movq 0x478(%rbx), %rax
movl $0x1, %edx
shlq %cl, %rdx
movl %ecx, %esi
shrl $0x6, %esi
movq (%rax,%rsi,8), %rdi
btq %rcx, %rdi
jb 0x2acca
orq %rdi, %rdx
movq %rdx, (%rax,%rsi,8)
movq 0x4e8(%rbx), %rax
movq 0x4f8(%rbx), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rax
je 0x2acbd
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x4e8(%rbx)
jmp 0x2acca
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x75be
incq %r12
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %r12, %rax
ja 0x2ab58
jmp 0x2acf6
movq %r15, %rdx
callq 0x6f14
jmp 0x2ac6e
testq %rdi, %rdi
je 0x2ad08
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x4c8(%rbx), %rax
cmpq %rax, 0x4e8(%rbx)
jne 0x2ab20
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq $0x2, %rcx
jb 0x2ad8e
movq 0x3e8(%rbx), %rdx
addq $-0x2, %rcx
movl $0x1, %esi
xorl %r8d, %r8d
movq %rax, %rdi
movl -0x4(%rax,%rsi,4), %r10d
movl (%rax,%rsi,4), %r9d
movl (%rdx,%r10,4), %r11d
cmpl (%rdx,%r9,4), %r11d
jle 0x2ad7b
movl %r9d, %r11d
movq %rdi, %r15
movl %r9d, (%r15)
movl %r10d, 0x4(%r15)
movl -0x4(%r15), %r10d
addq $-0x4, %r15
movl (%rdx,%r10,4), %ebp
cmpl (%rdx,%r11,4), %ebp
jg 0x2ad62
incq %rsi
leaq 0x1(%r8), %r9
addq $0x4, %rdi
cmpq %rcx, %r8
movq %r9, %r8
jne 0x2ad49
xorpd %xmm0, %xmm0
movq %r13, %rdi
movq 0x60(%rsp), %rsi
callq 0x2f56e
xorpd %xmm0, %xmm0
movq %r13, %rdi
movq 0x68(%rsp), %rsi
callq 0x2f56e
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rax
subq %rdi, %rax
shrq $0x2, %rax
decl %eax
js 0x2b12e
leaq 0x538(%rbx), %r13
movl %eax, %ebp
movq %rsp, %r15
movq 0x40(%rsp), %rax
movl (%rax,%rbp,4), %edi
movl %edi, 0x20(%rsp)
movl 0x4(%rsp), %esi
movq 0x510(%rbx), %r8
movq 0x518(%rbx), %r9
movq %rsi, %rax
xorl %edx, %edx
divq %r9
movq (%r8,%rdx,8), %rax
testq %rax, %rax
je 0x2ae3e
movq %rdi, %rcx
cmpl (%rax), %esi
je 0x2ae16
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x2ae07
jmp 0x2ae3e
movq (%r8,%r9,8), %r10
cmpq %r10, %rax
je 0x2ae3e
movq %rcx, %rax
xorl %edx, %edx
divq %r9
movq (%r8,%rdx,8), %rax
testq %rax, %rax
je 0x2ae41
cmpl (%rax), %edi
je 0x2b0c3
movq 0x20(%rax), %rax
jmp 0x2ae2b
movq %rdi, %rcx
movq 0x3a0(%rbx), %r8
leaq (%rcx,%rcx,2), %rdx
movq (%r8,%rdx,8), %rax
cmpq %rax, 0x8(%r8,%rdx,8)
je 0x2af99
xorl %r12d, %r12d
movl (%rax,%r12,4), %r9d
movq 0x3b8(%rbx), %rax
movq 0x400(%rbx), %rdx
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%r9,4), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%rcx,4), %xmm0
divsd %xmm0, %xmm1
movsd (%rdx,%rcx,8), %xmm0
addsd 0x519e(%rip), %xmm0     # 0x30030
mulsd %xmm1, %xmm0
addsd (%rdx,%r9,8), %xmm0
movsd %xmm0, (%rdx,%r9,8)
movl 0x4(%rsp), %esi
movq 0x510(%rbx), %r10
movq 0x518(%rbx), %r11
movq %rsi, %rax
xorl %edx, %edx
divq %r11
movq (%r10,%rdx,8), %rax
testq %rax, %rax
je 0x2af77
cmpl (%rax), %esi
je 0x2aed3
movq 0x20(%rax), %rax
jmp 0x2aec0
cmpq (%r10,%r11,8), %rax
je 0x2af77
movq 0x448(%rbx), %rax
movsd (%rax,%rcx,8), %xmm0
movsd %xmm1, 0x18(%rsp)
mulsd %xmm1, %xmm0
addsd (%rax,%r9,8), %xmm0
movsd %xmm0, (%rax,%r9,8)
movq 0x358(%rbx), %rax
movl (%rax,%r9,4), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movl 0x20(%rsp), %eax
movq 0x68(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x80(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd 0x18(%rsp), %xmm0
mulsd 0x80(%rsp), %xmm0
mulsd 0x50da(%rip), %xmm0     # 0x30038
movsd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rax)
movl 0x20(%rsp), %edi
movq 0x3a0(%rbx), %r8
incq %r12
movl %edi, %ecx
leaq (%rcx,%rcx,2), %rdx
movq (%r8,%rdx,8), %rax
movq 0x8(%r8,%rdx,8), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
ja 0x2ae5e
cmpl %edi, 0x4(%rsp)
je 0x2b003
movq 0x358(%rbx), %rax
movl (%rax,%rcx,4), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x20(%rsp), %eax
movq 0x60(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd 0x10(%rsp), %xmm1
mulsd 0x5047(%rip), %xmm1     # 0x30038
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl 0x4(%rsp), %edi
movl %edi, %eax
movq 0x510(%rbx), %rcx
movq 0x518(%rbx), %rsi
xorl %edx, %edx
divq %rsi
movq (%rcx,%rdx,8), %rax
testq %rax, %rax
je 0x2b0b1
cmpl (%rax), %edi
je 0x2b02f
movq 0x20(%rax), %rax
jmp 0x2b01c
cmpq (%rcx,%rsi,8), %rax
je 0x2b0b1
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
callq 0x2b312
movq %rax, %rdi
callq 0x1c4e0
movq %rax, %r12
movl 0x20(%rsp), %eax
movq 0x358(%rbx), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x20(%rsp), %eax
movq 0x60(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xd8ce
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
movsd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm1
addsd 0x18(%rsp), %xmm1
movsd %xmm1, (%rax)
leaq -0x1(%rbp), %rax
testq %rbp, %rbp
movq %rax, %rbp
jg 0x2add5
jmp 0x2b129
cmpq %r10, %rax
je 0x2ae41
cmpl %edi, %esi
je 0x2ae41
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
callq 0x2b312
movq %rax, %rdi
callq 0x1c4e0
movq %rax, %r12
movq %r13, %rdi
leaq 0x20(%rsp), %rsi
callq 0x2b312
movq %rax, %rdi
callq 0x1c4e0
imull %r12d, %eax
movl 0x20(%rsp), %ecx
movq 0x68(%rsp), %rdx
movq (%rdx), %rdx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
addsd (%rdx,%rcx,8), %xmm0
movsd %xmm0, (%rdx,%rcx,8)
movl %ecx, %edi
jmp 0x2ae41
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x2b140
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2b18a
jmp 0x2b18a
jmp 0x2b18a
jmp 0x2b18a
jmp 0x2b18a
jmp 0x2b18a
jmp 0x2b18a
jmp 0x2b18a
jmp 0x2b18a
jmp 0x2b18a
jmp 0x2b18a
jmp 0x2b16a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2b18d
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0x2b18d
jmp 0x2b18a
jmp 0x2b18a
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x2b1a4
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x23b0