// File: /workspace/github_cpp_makefile_star2_O3/fjamour[P]icentral/src/bcc_delta.cc
// Function: bcc_delta_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 bcc_delta_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 = bcc_fast_subgraph.P; 
        vector<int>&                 path_cnt_map = bcc_fast_subgraph.path_cnt_vec;
        vector<int>&                 path_cnt_inc_map = bcc_fast_subgraph.path_cnt_inc_vec;
        vector<int>&                 dist_map = bcc_fast_subgraph.dist_vec;
        vector<double>&              pair_dep_map = bcc_fast_subgraph.pair_dep_vec;
        vector<double>&              sigma_t_map = bcc_fast_subgraph.sigma_t_map;
        vector<bool>&                visited_vec = bcc_fast_subgraph.visited_vec;
        queue<node_id_t>&            Q = bcc_fast_subgraph.Q;
        vector<node_id_t>            S;
        
        bcc_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 < bcc_fast_subgraph.nodes_vec[v_i].size(); ++i) {
                node_id_t v_n = bcc_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(   art_pt_map.find(s) != art_pt_map.end()
               && art_pt_map.find(v_n) != art_pt_map.end()
               ){//&& s != v_n) {
                int VG_s, VG_n;
                VG_s = accumulate(art_pt_map[s].begin(), art_pt_map[s].end(), 0);
                VG_n = accumulate(art_pt_map[v_n].begin(), art_pt_map[v_n].end(), 0);
                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(art_pt_map.find(s) != art_pt_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 = bcc_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 = bcc_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(art_pt_map.find(s) != art_pt_map.end()) {
                int VG_s = accumulate(art_pt_map[s].begin(), art_pt_map[s].end(), 0);
                
                node_id_t new_v_n = bcc_fast_subgraph.inout_label_map[v_n];
                bc_map[new_v_n] = bc_map[new_v_n] - pair_dep_map[v_n]*VG_s;
                
                bc_map[new_v_n] = bc_map[new_v_n] - sigma_t_map[v_n]/2.0;
            }
        }
                
        //Compute new path counts and paths
        if(dist_map[dst] != dist_map[src]+1) {
            P[dst].clear();
            P[dst].push_back(src);
            path_cnt_map[dst] = path_cnt_map[src];
        } else {
            P[dst].push_back(src);
            path_cnt_map[dst] += path_cnt_map[src];
        }
        
        
        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 = bcc_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;
                }
            }
        }

        //DBG
//        printf("===========================\nSource: %d\n", s);
//        for(tr1_map_t(int)::iterator it = path_cnt_map.begin();
//                it != path_cnt_map.end();
//                ++it) {
//            printf("cnt[%d]: %d           ", it->first, it->second);
//            printf("# parents: %d\n", P[it->first].size());
//        }
        /////        
        //DBG
//        printf("========================\nSource: %d\n", s);
//        for(int i = S.size()-1; i >= 0; --i) {
//            printf("%d\n", S[i]);
//        }
        //////
        

        //DBG print all:
//        printf("===========================\nSource: %d\n", s);
//        for(tr1_map_t(int)::iterator it = path_cnt_map.begin();
//                it != path_cnt_map.end();
//                ++it) {
//            printf("cnt[%d]: %d\n", it->first, it->second);
//            for(int i = 0; i < P[it->first].size(); ++i) {
//                printf("        P[%d][%d]: %d\n", it->first, i, P[it->first][i]);
//            }
//        }
//        printf("S:  ");
//        for(int i = S.size()-1; i >= 0; --i) {
//            printf("%d  ", S[i]);
//        }
//        printf("\n");
        ///////////
        

        //DBG
//        printf("===========================\nSource: %d\n", s);
//        for(tr1_map_t(double)::iterator it = pair_dep_map.begin();
//                it != pair_dep_map.end();
//                ++it) {
//            printf("pd[%d]: %f           ", it->first, it->second);
//            printf("# parents: %d\n", P[it->first].size());
//        }
        //////
        
        bcc_fast_subgraph.i_fill_map<double>(pair_dep_map, 0);
        bcc_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(   art_pt_map.find(s) != art_pt_map.end()
               && art_pt_map.find(v_n) != art_pt_map.end()
               ){//&& s != v_n) {
                int VG_s, VG_n;
                VG_s = accumulate(art_pt_map[s].begin(), art_pt_map[s].end(), 0);
                VG_n = accumulate(art_pt_map[v_n].begin(), art_pt_map[v_n].end(), 0);
                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(art_pt_map.find(s) != art_pt_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 = bcc_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 = bcc_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(art_pt_map.find(s) != art_pt_map.end()) {
                int VG_s = accumulate(art_pt_map[s].begin(), art_pt_map[s].end(), 0);
                
                node_id_t new_v_n = bcc_fast_subgraph.inout_label_map[v_n];
                bc_map[new_v_n] = bc_map[new_v_n] + pair_dep_map[v_n]*VG_s;
                
                bc_map[new_v_n] = bc_map[new_v_n] + sigma_t_map[v_n]/2.0;
            }
        }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, 0x10(%rsp)
movl %edx, 0x1c(%rsp)
movl %ecx, 0x18(%rsp)
addq $0x2d8, %rdi            # imm = 0x2D8
xorpd %xmm0, %xmm0
movapd %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
movq %rdi, 0x28(%rsp)
callq 0x2e742
leaq 0x480(%rbx), %rbp
movl %r14d, %eax
movq 0x380(%rbx), %rcx
movl $0x1, (%rcx,%rax,4)
movl 0x10(%rsp), %eax
movq 0x3b0(%rbx), %rcx
movl $0x0, (%rcx,%rax,4)
movq 0x4b0(%rbx), %rax
movq 0x4c0(%rbx), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x10b17
movl 0x10(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x4b0(%rbx)
jmp 0x10b2b
leaq 0x10(%rsp), %rsi
movq %rbp, %rdi
callq 0x75be
movq 0x4b0(%rbx), %rax
movq 0x490(%rbx), %rcx
cmpq %rcx, %rax
je 0x10c9c
leaq 0x50(%rsp), %r13
leaq 0x30(%rsp), %r15
leaq 0xc(%rsp), %r12
movl (%rcx), %eax
movl %eax, 0x30(%rsp)
movq %rbp, %rdi
callq 0xddae
movq 0x58(%rsp), %rsi
cmpq 0x60(%rsp), %rsi
je 0x10b75
movl 0x30(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x58(%rsp)
jmp 0x10b84
movq %r13, %rdi
movq %r15, %rdx
callq 0x6f14
movl 0x30(%rsp), %eax
movl %eax, %ecx
movq 0x28(%rsp), %rdx
movq (%rdx), %rdx
leaq (%rcx,%rcx,2), %rsi
movq (%rdx,%rsi,8), %rcx
cmpq %rcx, 0x8(%rdx,%rsi,8)
je 0x10c88
xorl %r14d, %r14d
movl (%rcx,%r14,4), %edx
movl %edx, 0xc(%rsp)
movq 0x3b0(%rbx), %rcx
movl (%rcx,%rdx,4), %esi
testl %esi, %esi
jns 0x10c0d
movq 0x4b0(%rbx), %rax
movq 0x4c0(%rbx), %rsi
addq $-0x4, %rsi
cmpq %rsi, %rax
je 0x10be0
movl %edx, (%rax)
addq $0x4, %rax
movq %rax, 0x4b0(%rbx)
jmp 0x10bf2
movq %rbp, %rdi
movq %r12, %rsi
callq 0x75be
movq 0x3b0(%rbx), %rcx
movl 0x30(%rsp), %eax
movl (%rcx,%rax,4), %eax
incl %eax
movl 0xc(%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movl 0xc(%rsp), %edx
movl (%rcx,%rdx,4), %esi
movl 0x30(%rsp), %eax
movl %eax, %edi
movl (%rcx,%rdi,4), %ecx
incl %ecx
cmpl %ecx, %esi
jne 0x10c5e
movq 0x380(%rbx), %rax
movl (%rax,%rdi,4), %ecx
addl %ecx, (%rax,%rdx,4)
movl 0xc(%rsp), %eax
movq 0x368(%rbx), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x10c52
movl 0x30(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x10c5e
movq %r15, %rdx
callq 0x6f14
movl 0x30(%rsp), %eax
incq %r14
movl %eax, %ecx
movq 0x28(%rsp), %rdx
movq (%rdx), %rdx
leaq (%rcx,%rcx,2), %rsi
movq (%rdx,%rsi,8), %rcx
movq 0x8(%rdx,%rsi,8), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %r14, %rdx
ja 0x10ba4
movq 0x490(%rbx), %rcx
cmpq %rcx, 0x4b0(%rbx)
jne 0x10b4a
leaq 0x3c8(%rbx), %rax
movq %rax, 0x78(%rsp)
leaq 0x410(%rbx), %rax
movq %rax, 0x70(%rsp)
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
shrq $0x2, %rax
decl %eax
js 0x1106d
movl %eax, %r14d
leaq 0x10(%rsp), %rsi
movq 0x50(%rsp), %rax
movl (%rax,%r14,4), %r13d
movl %r13d, 0x30(%rsp)
movl 0x10(%rsp), %ecx
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x10dc6
cmpl (%rax), %ecx
je 0x10d0b
movq 0x20(%rax), %rax
jmp 0x10cf8
movq (%rdi,%r8,8), %r9
cmpq %r9, %rax
je 0x10dc6
movq %r13, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x10dc6
cmpl (%rax), %r13d
je 0x10d38
movq 0x20(%rax), %rax
jmp 0x10d24
cmpq %r9, %rax
je 0x10dc6
movq %rbx, %rdi
callq 0x6088
movq (%rax), %r12
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x6088
movq 0x8(%rax), %rax
xorl %r15d, %r15d
cmpq %rax, %r12
je 0x10d6f
addl (%r12), %r15d
addq $0x4, %r12
jmp 0x10d60
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
callq 0x6088
movq (%rax), %r12
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
callq 0x6088
movq 0x8(%rax), %rcx
xorl %eax, %eax
cmpq %rcx, %r12
je 0x10da1
addl (%r12), %eax
addq $0x4, %r12
jmp 0x10d92
imull %r15d, %eax
movl 0x30(%rsp), %r13d
movq 0x70(%rsp), %rcx
movq (%rcx), %rcx
cvtsi2sd %eax, %xmm0
addsd (%rcx,%r13,8), %xmm0
movsd %xmm0, (%rcx,%r13,8)
movl 0x10(%rsp), %ecx
movq %r14, %rsi
movq %rbp, %r14
movq 0x368(%rbx), %rax
leaq (,%r13,2), %rdx
addq %r13, %rdx
movq (%rax,%rdx,8), %rdi
movq 0x8(%rax,%rdx,8), %r8
subq %rdi, %r8
je 0x10e99
movq 0x380(%rbx), %r9
xorps %xmm0, %xmm0
cvtsi2sdl (%r9,%r13,4), %xmm0
sarq $0x2, %r8
movq 0x3c8(%rbx), %r10
movl %ecx, %eax
movq 0x8(%rbx), %r11
movq 0x10(%rbx), %r15
xorl %edx, %edx
divq %r15
movq (%r11,%rdx,8), %rbp
movq (%r11,%r15,8), %rdx
movq 0x410(%rbx), %r11
cmpq $0x1, %r8
adcq $0x0, %r8
xorl %r15d, %r15d
movl (%rdi,%r15,4), %r12d
xorps %xmm1, %xmm1
cvtsi2sdl (%r9,%r12,4), %xmm1
divsd %xmm0, %xmm1
movsd (%r10,%r13,8), %xmm2
addsd 0x1f1dd(%rip), %xmm2    # 0x30030
mulsd %xmm1, %xmm2
addsd (%r10,%r12,8), %xmm2
movsd %xmm2, (%r10,%r12,8)
testq %rbp, %rbp
je 0x10e91
movq %rbp, %rax
cmpl (%rax), %ecx
je 0x10e7a
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x10e6b
jmp 0x10e91
cmpq %rdx, %rax
je 0x10e91
mulsd (%r11,%r13,8), %xmm1
addsd (%r11,%r12,8), %xmm1
movsd %xmm1, (%r11,%r12,8)
incq %r15
cmpq %r8, %r15
jne 0x10e34
cmpl %r13d, %ecx
movq 0xc0(%rsp), %r12
movq %r14, %rbp
movq %rsi, %r14
leaq 0xc(%rsp), %r15
je 0x10f17
movq 0x320(%rbx), %rax
movl (%rax,%r13,4), %eax
movl %eax, 0xc(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0x30(%rsp), %eax
movq 0x78(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd 0x48(%rsp), %xmm1
mulsd 0x1f13b(%rip), %xmm1    # 0x30040
movsd 0x20(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl 0x10(%rsp), %ecx
movl %ecx, %eax
movq 0x8(%rbx), %r8
movq 0x10(%rbx), %rdi
xorl %edx, %edx
divq %rdi
movq (%r8,%rdx,8), %rax
testq %rax, %rax
leaq 0x10(%rsp), %rsi
je 0x1105d
cmpl (%rax), %ecx
je 0x10f4a
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x10f38
jmp 0x1105d
cmpq (%r8,%rdi,8), %rax
je 0x1105d
movq %rbx, %rdi
movq %rsi, %r13
callq 0x6088
movq (%rax), %r15
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6088
movq 0x8(%rax), %rax
cmpq %rax, %r15
je 0x10f8d
xorl %ecx, %ecx
addl (%r15), %ecx
addq $0x4, %r15
cmpq %rax, %r15
jne 0x10f78
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
jmp 0x10f91
xorpd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0x30(%rsp), %eax
movq 0x320(%rbx), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, 0xc(%rsp)
movq %r12, %rdi
leaq 0xc(%rsp), %r15
movq %r15, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movl 0x30(%rsp), %eax
movq 0x78(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x80(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd 0x80(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
movsd 0x48(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movq %r12, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0x30(%rsp), %eax
movq 0x70(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xd8ce
movsd 0x48(%rsp), %xmm1
mulsd 0x1eff6(%rip), %xmm1    # 0x30040
movsd 0x20(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
leaq 0x10(%rsp), %rsi
leaq -0x1(%r14), %rax
testq %r14, %r14
movq %rax, %r14
jg 0x10cd2
movl 0x18(%rsp), %ecx
movq 0x3b0(%rbx), %rdx
movl 0x1c(%rsp), %eax
movl (%rdx,%rax,4), %esi
incl %esi
leaq (%rcx,%rcx,2), %rdi
shlq $0x3, %rdi
addq 0x368(%rbx), %rdi
cmpl %esi, (%rdx,%rcx,4)
jne 0x110ab
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x110d0
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x110da
movq (%rdi), %rcx
movq 0x8(%rdi), %rsi
cmpq %rcx, %rsi
je 0x110be
movq %rcx, 0x8(%rdi)
movq %rcx, %rsi
cmpq 0x10(%rdi), %rsi
je 0x110f1
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x110fb
leaq 0x1c(%rsp), %rdx
callq 0x6f14
movl 0x1c(%rsp), %eax
movq 0x380(%rbx), %rcx
movl (%rcx,%rax,4), %eax
movl 0x18(%rsp), %edx
addl %eax, (%rcx,%rdx,4)
jmp 0x11110
leaq 0x1c(%rsp), %rdx
callq 0x6f14
movl 0x1c(%rsp), %eax
movq 0x380(%rbx), %rcx
movl (%rcx,%rax,4), %eax
movl 0x18(%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movq 0x4b0(%rbx), %rax
movq 0x4c0(%rbx), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rax
je 0x1113a
movl 0x18(%rsp), %edx
movl %edx, (%rax)
addq $0x4, %rax
movq %rax, 0x4b0(%rbx)
jmp 0x11159
leaq 0x18(%rsp), %rsi
movq %rbp, %rdi
callq 0x75be
movl 0x18(%rsp), %edx
movq 0x380(%rbx), %rcx
movq 0x4b0(%rbx), %rax
movl 0x1c(%rsp), %esi
movq 0x3b0(%rbx), %rdi
movl (%rdi,%rsi,4), %esi
incl %esi
movl %edx, %edx
movl %esi, (%rdi,%rdx,4)
movl 0x1c(%rsp), %edx
movl (%rcx,%rdx,4), %ecx
movl 0x18(%rsp), %edx
movq 0x3f8(%rbx), %rsi
movl %ecx, (%rsi,%rdx,4)
movl 0x18(%rsp), %ecx
movq 0x440(%rbx), %rdx
movl %ecx, %esi
movl $0x1, %edi
shlq %cl, %rdi
shrl $0x6, %esi
orq %rdi, (%rdx,%rsi,8)
movq 0x490(%rbx), %rcx
cmpq %rcx, %rax
je 0x113bf
leaq 0x30(%rsp), %r13
leaq 0xc(%rsp), %r15
leaq 0x14(%rsp), %r14
movl (%rcx), %eax
movl %eax, 0xc(%rsp)
movq %rbp, %rdi
callq 0xddae
movl 0xc(%rsp), %esi
movq 0x28(%rsp), %rdi
callq 0x2e734
movq %r13, %rdi
movq %rax, %rsi
callq 0x6112
movq 0x30(%rsp), %rdi
cmpq %rdi, 0x38(%rsp)
je 0x11399
xorl %r12d, %r12d
movl (%rdi,%r12,4), %eax
movl %eax, 0x14(%rsp)
movq 0x3b0(%rbx), %rdx
movl 0xc(%rsp), %ecx
movl (%rdx,%rcx,4), %esi
incl %esi
cmpl %esi, (%rdx,%rax,4)
jle 0x1125b
movl %esi, (%rdx,%rax,4)
movl 0x14(%rsp), %eax
movq 0x368(%rbx), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
cmpq %rax, %rsi
je 0x1123e
movq %rax, 0x8(%rdi)
movq %rax, %rsi
cmpq 0x10(%rdi), %rsi
je 0x112da
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x112e2
jne 0x1136d
movq 0x3f8(%rbx), %rdx
movl (%rdx,%rcx,4), %ecx
addl %ecx, (%rdx,%rax,4)
movl 0xc(%rsp), %eax
movl (%rdx,%rax,4), %eax
movl 0x14(%rsp), %ecx
movq 0x380(%rbx), %rdx
addl %eax, (%rdx,%rcx,4)
movl 0x14(%rsp), %eax
movq 0x368(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rdi
movq 0x8(%rcx,%rax,8), %rsi
movq %r15, %rdx
callq 0x7b97
movl 0x14(%rsp), %edx
movq 0x368(%rbx), %rcx
leaq (%rdx,%rdx,2), %rdx
movq 0x8(%rcx,%rdx,8), %rsi
cmpq %rsi, %rax
jne 0x11313
leaq (%rcx,%rdx,8), %rdi
cmpq 0x10(%rdi), %rax
je 0x1138c
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x11313
movq %r15, %rdx
callq 0x6f14
movl 0x14(%rsp), %eax
movq 0x380(%rbx), %rcx
movl $0x0, (%rcx,%rax,4)
movl 0xc(%rsp), %eax
movq 0x3f8(%rbx), %rdx
movl (%rdx,%rax,4), %eax
movl 0x14(%rsp), %esi
movl %eax, (%rdx,%rsi,4)
movl 0x14(%rsp), %eax
movl (%rdx,%rax,4), %edx
addl %edx, (%rcx,%rax,4)
movl 0x14(%rsp), %ecx
movq 0x440(%rbx), %rax
movl $0x1, %edx
shlq %cl, %rdx
movl %ecx, %esi
shrl $0x6, %esi
movq (%rax,%rsi,8), %rdi
btq %rcx, %rdi
jb 0x1136d
orq %rdi, %rdx
movq %rdx, (%rax,%rsi,8)
movq 0x4b0(%rbx), %rax
movq 0x4c0(%rbx), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rax
je 0x11362
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x4b0(%rbx)
jmp 0x1136d
movq %rbp, %rdi
movq %r14, %rsi
callq 0x75be
incq %r12
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %r12, %rax
ja 0x111f8
jmp 0x11399
movq %r15, %rdx
callq 0x6f14
jmp 0x11313
testq %rdi, %rdi
je 0x113ab
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x490(%rbx), %rcx
cmpq %rcx, 0x4b0(%rbx)
jne 0x111be
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq $0x2, %rcx
jb 0x11431
movq 0x3b0(%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 0x1141e
movl %r9d, %r11d
movq %rdi, %r14
movl %r9d, (%r14)
movl %r10d, 0x4(%r14)
movl -0x4(%r14), %r10d
addq $-0x4, %r14
movl (%rdx,%r10,4), %ebp
cmpl (%rdx,%r11,4), %ebp
jg 0x11405
incq %rsi
leaq 0x1(%r8), %r9
addq $0x4, %rdi
cmpq %rcx, %r8
movq %r9, %r8
jne 0x113ec
xorpd %xmm0, %xmm0
movq 0x28(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x2f56e
xorpd %xmm0, %xmm0
movq 0x28(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x2f56e
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rax
subq %rdi, %rax
shrq $0x2, %rax
decl %eax
js 0x117e1
movl %eax, %r14d
leaq 0xc(%rsp), %r13
movq 0x50(%rsp), %rax
movl (%rax,%r14,4), %esi
movl %esi, 0x30(%rsp)
movl 0x10(%rsp), %ecx
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x1156b
cmpl (%rax), %ecx
je 0x114b0
movq 0x20(%rax), %rax
jmp 0x1149d
movq (%rdi,%r8,8), %r9
cmpq %r9, %rax
je 0x1156b
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x1156b
cmpl (%rax), %esi
je 0x114dc
movq 0x20(%rax), %rax
jmp 0x114c9
cmpq %r9, %rax
je 0x1156b
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x6088
movq (%rax), %rbp
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x6088
movq 0x8(%rax), %rax
xorl %r15d, %r15d
cmpq %rax, %rbp
je 0x11518
addl (%rbp), %r15d
addq $0x4, %rbp
jmp 0x11509
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
callq 0x6088
movq (%rax), %rbp
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
callq 0x6088
movq 0x8(%rax), %rcx
xorl %eax, %eax
cmpq %rcx, %rbp
je 0x11549
addl (%rbp), %eax
addq $0x4, %rbp
jmp 0x1153b
imull %r15d, %eax
movl 0x30(%rsp), %esi
movq 0x70(%rsp), %rcx
movq (%rcx), %rcx
cvtsi2sd %eax, %xmm0
addsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
movl 0x10(%rsp), %ecx
movq 0x368(%rbx), %rax
leaq (%rsi,%rsi,2), %rdx
movq (%rax,%rdx,8), %rdi
movq 0x8(%rax,%rdx,8), %r8
subq %rdi, %r8
je 0x11631
movq 0x380(%rbx), %r9
xorps %xmm0, %xmm0
cvtsi2sdl (%r9,%rsi,4), %xmm0
sarq $0x2, %r8
movq 0x3c8(%rbx), %r10
movl %ecx, %eax
movq 0x8(%rbx), %r11
movq 0x10(%rbx), %r15
xorl %edx, %edx
divq %r15
movq (%r11,%rdx,8), %r12
movq (%r11,%r15,8), %rdx
movq 0x410(%rbx), %r11
cmpq $0x1, %r8
adcq $0x0, %r8
xorl %r15d, %r15d
movl (%rdi,%r15,4), %ebp
xorps %xmm1, %xmm1
cvtsi2sdl (%r9,%rbp,4), %xmm1
divsd %xmm0, %xmm1
movsd (%r10,%rsi,8), %xmm2
addsd 0x1ea45(%rip), %xmm2    # 0x30030
mulsd %xmm1, %xmm2
addsd (%r10,%rbp,8), %xmm2
movsd %xmm2, (%r10,%rbp,8)
testq %r12, %r12
je 0x11629
movq %r12, %rax
cmpl (%rax), %ecx
je 0x11612
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x11603
jmp 0x11629
cmpq %rdx, %rax
je 0x11629
mulsd (%r11,%rsi,8), %xmm1
addsd (%r11,%rbp,8), %xmm1
movsd %xmm1, (%r11,%rbp,8)
incq %r15
cmpq %r8, %r15
jne 0x115cc
cmpl %esi, %ecx
movq 0xc0(%rsp), %r12
leaq 0x10(%rsp), %rbp
je 0x116a7
movq 0x320(%rbx), %rax
movl (%rax,%rsi,4), %eax
movl %eax, 0xc(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movl 0x30(%rsp), %eax
movq 0x78(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0xd8ce
movsd 0x20(%rsp), %xmm1
mulsd 0x1e9a3(%rip), %xmm1    # 0x30038
movsd 0x28(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl 0x10(%rsp), %ecx
movl %ecx, %eax
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdi
xorl %edx, %edx
divq %rdi
movq (%rsi,%rdx,8), %rax
testq %rax, %rax
je 0x117cc
cmpl (%rax), %ecx
je 0x116cd
movq 0x20(%rax), %rax
jmp 0x116ba
cmpq (%rsi,%rdi,8), %rax
je 0x117cc
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x6088
movq (%rax), %r15
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x6088
movq 0x8(%rax), %rax
cmpq %rax, %r15
je 0x11710
xorl %ecx, %ecx
addl (%r15), %ecx
addq $0x4, %r15
cmpq %rax, %r15
jne 0x116fb
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
jmp 0x11714
xorpd %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
movl 0x30(%rsp), %eax
movq 0x320(%rbx), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, 0xc(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0x30(%rsp), %eax
movq 0x78(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0xd8ce
movsd 0x48(%rsp), %xmm0
mulsd 0x28(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movq %r12, %rdi
movq %r13, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movl 0x30(%rsp), %eax
movq 0x70(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0xd8ce
movsd 0x20(%rsp), %xmm1
mulsd 0x1e87a(%rip), %xmm1    # 0x30038
movsd 0x28(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
leaq -0x1(%r14), %rax
testq %r14, %r14
movq %rax, %r14
jg 0x11478
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x117f3
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11839
jmp 0x11839
jmp 0x11839
jmp 0x11839
jmp 0x11839
jmp 0x11839
jmp 0x11839
jmp 0x11839
jmp 0x11839
jmp 0x11839
jmp 0x11839
jmp 0x1181d
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1183c
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0x1183c
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x11853
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x23b0
nop