// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdi, %rbx
movl %esi, 0x8(%rsp)
movl %edx, 0x14(%rsp)
movl %ecx, 0x10(%rsp)
leaq 0x2d8(%rdi), %r13
xorpd %xmm0, %xmm0
movapd %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
movq %r13, %rdi
callq 0x2ea72
leaq 0x480(%rbx), %r14
movl 0x8(%rsp), %eax
movq 0x380(%rbx), %rcx
movl $0x1, (%rcx,%rax,4)
movl 0x8(%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 0x10ab9
movl 0x8(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x4b0(%rbx)
jmp 0x10ac6
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7644
movq %r14, 0x40(%rsp)
movq 0x490(%rbx), %rax
cmpq %rax, 0x4b0(%rbx)
je 0x10c3a
leaq 0x50(%rsp), %rbp
leaq 0x20(%rsp), %r15
leaq 0x4(%rsp), %r12
movl (%rax), %eax
movl %eax, 0x20(%rsp)
movq 0x40(%rsp), %rdi
callq 0xdd72
movq 0x58(%rsp), %rsi
cmpq 0x60(%rsp), %rsi
je 0x10b1b
movl 0x20(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x58(%rsp)
jmp 0x10b26
movq %rbp, %rdi
movq %r15, %rdx
callq 0x6f98
movl 0x20(%rsp), %eax
movq (%r13), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rax
cmpq %rax, 0x8(%rcx,%rdx,8)
je 0x10c26
xorl %r14d, %r14d
movl (%rax,%r14,4), %eax
movl %eax, 0x4(%rsp)
movq 0x3b0(%rbx), %rcx
cmpl $0x0, (%rcx,%rax,4)
jns 0x10ba3
movq 0x4b0(%rbx), %rcx
movq 0x4c0(%rbx), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rcx
je 0x10b7f
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, 0x4b0(%rbx)
jmp 0x10b8c
movq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x7644
movl 0x20(%rsp), %eax
movq 0x3b0(%rbx), %rcx
movl (%rcx,%rax,4), %eax
incl %eax
movl 0x4(%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movl 0x4(%rsp), %eax
movq 0x3b0(%rbx), %rdx
movl 0x20(%rsp), %ecx
movl (%rdx,%rcx,4), %esi
incl %esi
cmpl %esi, (%rdx,%rax,4)
jne 0x10bfe
movq 0x380(%rbx), %rdx
movl (%rdx,%rcx,4), %ecx
addl %ecx, (%rdx,%rax,4)
movl 0x4(%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 0x10bf6
movl 0x20(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x10bfe
movq %r15, %rdx
callq 0x6f98
incq %r14
movl 0x20(%rsp), %eax
movq (%r13), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r14, %rcx
ja 0x10b44
movq 0x490(%rbx), %rax
cmpq %rax, 0x4b0(%rbx)
jne 0x10aee
leaq 0x3c8(%rbx), %rax
movq %rax, 0x70(%rsp)
leaq 0x410(%rbx), %rax
movq %rax, 0x68(%rsp)
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
shrq $0x2, %rax
decl %eax
js 0x11048
movl %eax, %r12d
leaq 0x8(%rsp), %rsi
movq %r13, 0x78(%rsp)
movq 0x50(%rsp), %rax
movl (%rax,%r12,4), %ecx
movl %ecx, 0x20(%rsp)
movl 0x8(%rsp), %r9d
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %r8
movq %r9, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
movl $0x0, %edx
testq %rax, %rax
je 0x10cba
cmpl (%rax), %r9d
je 0x10cb7
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x10ca5
xorl %edx, %edx
jmp 0x10cba
movq %rax, %rdx
testq %rdx, %rdx
jne 0x10cc3
movq (%rdi,%r8,8), %rdx
movq (%rdi,%r8,8), %r9
cmpq %r9, %rdx
je 0x10d86
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
movl $0x0, %edx
testq %rax, %rax
je 0x10cfa
cmpl (%rax), %ecx
je 0x10cf7
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x10ce6
xorl %edx, %edx
jmp 0x10cfa
movq %rax, %rdx
testq %rdx, %rdx
sete %al
cmpq %r9, %rdx
sete %cl
orb %al, %cl
jne 0x10d86
movq %rbx, %rdi
callq 0x6106
movq (%rax), %r15
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x6106
movq 0x8(%rax), %rax
xorl %r14d, %r14d
cmpq %rax, %r15
je 0x10d37
addl (%r15), %r14d
addq $0x4, %r15
jmp 0x10d29
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
callq 0x6106
movq (%rax), %r15
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
callq 0x6106
movq 0x8(%rax), %rcx
xorl %eax, %eax
cmpq %rcx, %r15
je 0x10d68
addl (%r15), %eax
addq $0x4, %r15
jmp 0x10d5a
imull %r14d, %eax
movl 0x20(%rsp), %ecx
cvtsi2sd %eax, %xmm0
movq 0x68(%rsp), %rax
movq (%rax), %rax
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq %r12, 0x38(%rsp)
movl 0x20(%rsp), %esi
movq 0x368(%rbx), %rax
leaq (%rsi,%rsi,2), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x8(%rax,%rcx,8), %r8
subq %rdi, %r8
je 0x10e62
movq 0x380(%rbx), %r9
xorps %xmm0, %xmm0
cvtsi2sdl (%r9,%rsi,4), %xmm0
sarq $0x2, %r8
movq 0x3c8(%rbx), %r10
movl 0x8(%rsp), %ecx
movq 0x8(%rbx), %r11
movq 0x10(%rbx), %r14
movq %rcx, %rax
xorl %edx, %edx
divq %r14
movq (%r11,%rdx,8), %r13
movq (%r11,%r14,8), %rdx
movq 0x410(%rbx), %r15
cmpq $0x1, %r8
adcq $0x0, %r8
xorl %ebp, %ebp
movl (%rdi,%rbp,4), %r12d
xorps %xmm1, %xmm1
cvtsi2sdl (%r9,%r12,4), %xmm1
divsd %xmm0, %xmm1
movsd (%r10,%rsi,8), %xmm2
addsd 0x2021d(%rip), %xmm2    # 0x31030
mulsd %xmm1, %xmm2
addsd (%r10,%r12,8), %xmm2
movsd %xmm2, (%r10,%r12,8)
testq %r13, %r13
je 0x10e38
movq %r13, %rax
cmpl (%rax), %ecx
je 0x10e3a
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x10e2b
xorl %eax, %eax
testq %rax, %rax
jne 0x10e43
movq (%r11,%r14,8), %rax
cmpq %rdx, %rax
je 0x10e5a
mulsd (%r15,%rsi,8), %xmm1
addsd (%r15,%r12,8), %xmm1
movsd %xmm1, (%r15,%r12,8)
incq %rbp
cmpq %r8, %rbp
jne 0x10df4
cmpl %esi, 0x8(%rsp)
movq 0xc0(%rsp), %r15
movq 0x78(%rsp), %r13
movq 0x38(%rsp), %r12
leaq 0x4(%rsp), %r14
je 0x10ee0
movq 0x320(%rbx), %rax
movl (%rax,%rsi,4), %eax
movl %eax, 0x4(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0xd85a
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x20(%rsp), %eax
movq 0x70(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0xd85a
movsd 0x48(%rsp), %xmm1
mulsd 0x2016e(%rip), %xmm1    # 0x31040
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl 0x8(%rsp), %ecx
movq 0x8(%rbx), %r8
movq 0x10(%rbx), %rdi
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
movq (%r8,%rdx,8), %rax
movl $0x0, %edx
testq %rax, %rax
leaq 0x8(%rsp), %rsi
je 0x10f1b
cmpl (%rax), %ecx
je 0x10f18
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x10f07
xorl %edx, %edx
jmp 0x10f1b
movq %rax, %rdx
testq %rdx, %rdx
jne 0x10f24
movq (%r8,%rdi,8), %rdx
cmpq (%r8,%rdi,8), %rdx
je 0x11037
movq %rbx, %rdi
movq %rsi, %rbp
callq 0x6106
movq (%rax), %r14
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x6106
movq 0x8(%rax), %rax
cmpq %rax, %r14
je 0x10f67
xorl %ecx, %ecx
addl (%r14), %ecx
addq $0x4, %r14
cmpq %rax, %r14
jne 0x10f52
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
jmp 0x10f6b
xorpd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x20(%rsp), %eax
movq 0x320(%rbx), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, 0x4(%rsp)
movq %r15, %rdi
leaq 0x4(%rsp), %r14
movq %r14, %rsi
callq 0xd85a
movsd (%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movl 0x20(%rsp), %eax
movq 0x70(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x80(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0xd85a
movsd 0x80(%rsp), %xmm1
mulsd 0x18(%rsp), %xmm1
movsd 0x48(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0xd85a
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x20(%rsp), %eax
movq 0x68(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0xd85a
movsd 0x48(%rsp), %xmm1
mulsd 0x2001c(%rip), %xmm1    # 0x31040
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
leaq 0x8(%rsp), %rsi
leaq -0x1(%r12), %rax
testq %r12, %r12
movq %rax, %r12
jg 0x10c75
movl 0x10(%rsp), %ecx
movq 0x3b0(%rbx), %rdx
movl 0x14(%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 0x1108b
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
movq 0x40(%rsp), %r14
je 0x110b3
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x110bd
movq (%rdi), %rcx
cmpq %rcx, 0x8(%rdi)
movq 0x40(%rsp), %r14
je 0x1109d
movq %rcx, 0x8(%rdi)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x110d4
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x110de
leaq 0x14(%rsp), %rdx
callq 0x6f98
movl 0x14(%rsp), %eax
movq 0x380(%rbx), %rcx
movl (%rcx,%rax,4), %eax
movl 0x10(%rsp), %edx
addl %eax, (%rcx,%rdx,4)
jmp 0x110f3
leaq 0x14(%rsp), %rdx
callq 0x6f98
movl 0x14(%rsp), %eax
movq 0x380(%rbx), %rcx
movl (%rcx,%rax,4), %eax
movl 0x10(%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movq 0x4b0(%rbx), %rax
movq 0x4c0(%rbx), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x1111d
movl 0x10(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x4b0(%rbx)
jmp 0x1112a
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x7644
movl 0x14(%rsp), %eax
movq 0x3b0(%rbx), %rcx
movl (%rcx,%rax,4), %eax
incl %eax
movl 0x10(%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movl 0x14(%rsp), %eax
movq 0x380(%rbx), %rcx
movq 0x3f8(%rbx), %rdx
movl (%rcx,%rax,4), %eax
movl 0x10(%rsp), %ecx
movl %eax, (%rdx,%rcx,4)
movl 0x10(%rsp), %ecx
movq 0x440(%rbx), %rax
movl %ecx, %edx
movl $0x1, %esi
shlq %cl, %rsi
shrl $0x6, %edx
orq %rsi, (%rax,%rdx,8)
movq 0x490(%rbx), %rax
cmpq %rax, 0x4b0(%rbx)
je 0x1139d
leaq 0x20(%rsp), %rbp
leaq 0x4(%rsp), %r12
leaq 0xc(%rsp), %r15
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x40(%rsp), %rdi
callq 0xdd72
movl 0x4(%rsp), %esi
movq %r13, %rdi
callq 0x2ea64
movq %rbp, %rdi
movq %rax, %rsi
callq 0x61a0
movq 0x20(%rsp), %rdi
cmpq %rdi, 0x28(%rsp)
je 0x11377
xorl %r14d, %r14d
movl (%rdi,%r14,4), %eax
movl %eax, 0xc(%rsp)
movq 0x3b0(%rbx), %rdx
movl 0x4(%rsp), %ecx
movl (%rdx,%rcx,4), %esi
incl %esi
cmpl %esi, (%rdx,%rax,4)
jle 0x11237
movl %esi, (%rdx,%rax,4)
movl 0xc(%rsp), %eax
movq 0x368(%rbx), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x11216
movq %rax, 0x8(%rdi)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x112b6
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x112be
jne 0x1134b
movq 0x3f8(%rbx), %rdx
movl (%rdx,%rcx,4), %ecx
addl %ecx, (%rdx,%rax,4)
movl 0x4(%rsp), %eax
movl (%rdx,%rax,4), %eax
movl 0xc(%rsp), %ecx
movq 0x380(%rbx), %rdx
addl %eax, (%rdx,%rcx,4)
movl 0xc(%rsp), %eax
movq 0x368(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rdi
movq 0x8(%rcx,%rax,8), %rsi
movq %r12, %rdx
callq 0x7bff
movl 0xc(%rsp), %edx
movq 0x368(%rbx), %rcx
leaq (%rdx,%rdx,2), %rdx
movq 0x8(%rcx,%rdx,8), %rsi
cmpq %rsi, %rax
jne 0x112ef
leaq (%rcx,%rdx,8), %rdi
cmpq 0x10(%rdi), %rsi
je 0x1136a
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x112ef
movq %r12, %rdx
callq 0x6f98
movl 0xc(%rsp), %eax
movq 0x380(%rbx), %rcx
movl $0x0, (%rcx,%rax,4)
movl 0x4(%rsp), %eax
movq 0x3f8(%rbx), %rdx
movl (%rdx,%rax,4), %eax
movl 0xc(%rsp), %esi
movl %eax, (%rdx,%rsi,4)
movl 0xc(%rsp), %eax
movl (%rdx,%rax,4), %edx
addl %edx, (%rcx,%rax,4)
movl 0xc(%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 0x1134b
orq %rdi, %rdx
movq %rdx, (%rax,%rsi,8)
movq 0x4b0(%rbx), %rax
movq 0x4c0(%rbx), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rax
je 0x1133e
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x4b0(%rbx)
jmp 0x1134b
movq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x7644
incq %r14
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %r14, %rax
ja 0x111d6
jmp 0x11377
movq %r12, %rdx
callq 0x6f98
jmp 0x112ef
testq %rdi, %rdi
je 0x11389
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x490(%rbx), %rax
cmpq %rax, 0x4b0(%rbx)
jne 0x1119c
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq $0x2, %rcx
jb 0x11422
movq 0x3b0(%rbx), %rdx
addq $-0x2, %rcx
movl $0x1, %esi
xorl %r8d, %r8d
movq %rax, %rdi
movl -0x4(%rax,%rsi,4), %r9d
movl (%rax,%rsi,4), %r10d
movl (%rdx,%r9,4), %r9d
cmpl (%rdx,%r10,4), %r9d
jle 0x1140f
movl -0x4(%rax,%rsi,4), %r10d
movl (%rax,%rsi,4), %r9d
movl (%rdx,%r10,4), %r11d
cmpl (%rdx,%r9,4), %r11d
jle 0x1140f
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 0x113f6
incq %rsi
leaq 0x1(%r8), %r9
addq $0x4, %rdi
cmpq %rcx, %r8
movq %r9, %r8
jne 0x113ca
xorpd %xmm0, %xmm0
movq %r13, %rdi
movq 0x70(%rsp), %rsi
callq 0x2f8f0
xorpd %xmm0, %xmm0
movq %r13, %rdi
movq 0x68(%rsp), %rsi
callq 0x2f8f0
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
shrq $0x2, %rax
decl %eax
js 0x1181f
movl %eax, %r12d
leaq 0x8(%rsp), %r13
movq 0x50(%rsp), %rax
movl (%rax,%r12,4), %ecx
movl %ecx, 0x20(%rsp)
movl 0x8(%rsp), %esi
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %r8
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
movl $0x0, %edx
testq %rax, %rax
je 0x114a5
cmpl (%rax), %esi
je 0x114a2
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x11491
xorl %edx, %edx
jmp 0x114a5
movq %rax, %rdx
testq %rdx, %rdx
jne 0x114ae
movq (%rdi,%r8,8), %rdx
movq (%rdi,%r8,8), %rsi
cmpq %rsi, %rdx
je 0x11572
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
movl $0x0, %edx
testq %rax, %rax
je 0x114e5
cmpl (%rax), %ecx
je 0x114e2
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x114d1
xorl %edx, %edx
jmp 0x114e5
movq %rax, %rdx
testq %rdx, %rdx
sete %al
cmpq %rsi, %rdx
sete %cl
orb %al, %cl
jne 0x11572
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6106
movq (%rax), %r15
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6106
movq 0x8(%rax), %rax
xorl %r14d, %r14d
cmpq %rax, %r15
je 0x11523
addl (%r15), %r14d
addq $0x4, %r15
jmp 0x11515
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
callq 0x6106
movq (%rax), %r15
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
callq 0x6106
movq 0x8(%rax), %rcx
xorl %eax, %eax
cmpq %rcx, %r15
je 0x11554
addl (%r15), %eax
addq $0x4, %r15
jmp 0x11546
imull %r14d, %eax
movl 0x20(%rsp), %ecx
cvtsi2sd %eax, %xmm0
movq 0x68(%rsp), %rax
movq (%rax), %rax
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq %r12, 0x40(%rsp)
movl 0x20(%rsp), %esi
movq 0x368(%rbx), %rax
leaq (%rsi,%rsi,2), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x8(%rax,%rcx,8), %r8
subq %rdi, %r8
je 0x11652
movq 0x380(%rbx), %r9
xorps %xmm0, %xmm0
cvtsi2sdl (%r9,%rsi,4), %xmm0
sarq $0x2, %r8
movq 0x3c8(%rbx), %r10
movl 0x8(%rsp), %ecx
movq 0x8(%rbx), %r11
movq 0x10(%rbx), %r14
movq %rcx, %rax
xorl %edx, %edx
divq %r14
movq (%r11,%rdx,8), %rbp
movq (%r11,%r14,8), %rdx
movq 0x410(%rbx), %r13
cmpq $0x1, %r8
adcq $0x0, %r8
xorl %r12d, %r12d
movl (%rdi,%r12,4), %r15d
xorps %xmm1, %xmm1
cvtsi2sdl (%r9,%r15,4), %xmm1
divsd %xmm0, %xmm1
movsd (%r10,%rsi,8), %xmm2
addsd 0x1fa30(%rip), %xmm2    # 0x31030
mulsd %xmm1, %xmm2
addsd (%r10,%r15,8), %xmm2
movsd %xmm2, (%r10,%r15,8)
testq %rbp, %rbp
je 0x11625
movq %rbp, %rax
cmpl (%rax), %ecx
je 0x11627
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x11618
xorl %eax, %eax
testq %rax, %rax
jne 0x11630
movq (%r11,%r14,8), %rax
cmpq %rdx, %rax
je 0x1164a
mulsd (%r13,%rsi,8), %xmm1
addsd (%r13,%r15,8), %xmm1
movsd %xmm1, (%r13,%r15,8)
incq %r12
cmpq %r8, %r12
jne 0x115e1
cmpl %esi, 0x8(%rsp)
movq 0xc0(%rsp), %r15
movq 0x40(%rsp), %r12
leaq 0x4(%rsp), %rbp
je 0x116cb
movq 0x320(%rbx), %rax
movl (%rax,%rsi,4), %eax
movl %eax, 0x4(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0xd85a
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movl 0x20(%rsp), %eax
movq 0x70(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0xd85a
movsd 0x18(%rsp), %xmm1
mulsd 0x1f97b(%rip), %xmm1    # 0x31038
movsd 0x38(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl 0x8(%rsp), %ecx
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdi
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
movq (%rsi,%rdx,8), %rax
movl $0x0, %edx
testq %rax, %rax
leaq 0x8(%rsp), %r13
je 0x11706
cmpl (%rax), %ecx
je 0x11703
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x116f2
xorl %edx, %edx
jmp 0x11706
movq %rax, %rdx
testq %rdx, %rdx
jne 0x1170f
movq (%rsi,%rdi,8), %rdx
cmpq (%rsi,%rdi,8), %rdx
je 0x1180e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6106
movq (%rax), %r14
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6106
movq 0x8(%rax), %rax
cmpq %rax, %r14
je 0x11752
xorl %ecx, %ecx
addl (%r14), %ecx
addq $0x4, %r14
cmpq %rax, %r14
jne 0x1173d
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
jmp 0x11756
xorpd %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
movl 0x20(%rsp), %eax
movq 0x320(%rbx), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, 0x4(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0xd85a
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x20(%rsp), %eax
movq 0x70(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0xd85a
movsd 0x48(%rsp), %xmm0
mulsd 0x38(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq %r15, %rdi
movq %rbp, %rsi
callq 0xd85a
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movl 0x20(%rsp), %eax
movq 0x68(%rsp), %rcx
movq (%rcx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0xd85a
movsd 0x18(%rsp), %xmm1
mulsd 0x1f838(%rip), %xmm1    # 0x31038
movsd 0x38(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
leaq -0x1(%r12), %rax
testq %r12, %r12
movq %rax, %r12
jg 0x11462
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x11836
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 0x1187c
jmp 0x1187c
jmp 0x1187c
jmp 0x1187c
jmp 0x1187c
jmp 0x1187c
jmp 0x1187c
jmp 0x1187c
jmp 0x1187c
jmp 0x1187c
jmp 0x1187c
jmp 0x11860
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1187f
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0x1187f
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x11896
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x23b0