// File: /workspace/github_cpp_makefile_star2_O2/fjamour[P]icentral/src/bc.cc
// Function: brandes_delta_iter(graph_t&, unsigned int, unsigned int, unsigned int, int, int, std::vector<double, std::allocator<double>>&)
void brandes_delta_iter(graph_t& graph_in,
        node_id_t s,
        node_id_t src,
        node_id_t dst,
        int d_src,
        int d_dst,
        vector<double>& bc_vec)
{
    //make sure that @src is the closer to source node
    if(d_src > d_dst) {
        node_id_t       tmp_v;
        int             tmp_i;
        tmp_v = src; src = dst; dst = tmp_v;
        tmp_i = d_src; d_src = d_dst; d_dst = tmp_i;
        
    }
    
    //case 1: d_dst - d_src = 1 (the sort of easier case)
    if(d_dst - d_src == 1) {//if(d_dst - d_src == 1) {
        stack<node_id_t> S;
        vector<vector<node_id_t> > P;
        vector<int> old_path_cnt_vec;
        vector<int> new_path_cnt_vec; //NEW
        vector<int> dist_vec;
        queue<node_id_t> Q;
        vector<double> old_pair_dep_vec;
        vector<double> new_pair_dep_vec;//NEW

        P.resize(graph_in.size());
        new_path_cnt_vec.resize(graph_in.size());
        old_path_cnt_vec.resize(graph_in.size());
        dist_vec.resize(graph_in.size());
        fill(old_path_cnt_vec.begin(), old_path_cnt_vec.end(), 0);
        fill(new_path_cnt_vec.begin(), new_path_cnt_vec.end(), 0);
        fill(dist_vec.begin(), dist_vec.end(), -1);
        old_path_cnt_vec[s] = 1;
        new_path_cnt_vec[s] = 1;
        dist_vec[s] = 0;
        old_pair_dep_vec.resize(graph_in.size());
        new_pair_dep_vec.resize(graph_in.size());
        fill(old_pair_dep_vec.begin(), old_pair_dep_vec.end(), 0.0);
        fill(new_pair_dep_vec.begin(), new_pair_dep_vec.end(), 0.0);

        Q.push(s);

        while (!Q.empty()) {
            node_id_t v = Q.front();
            Q.pop();
            S.push(v);
            if(v == dst) {//NEW
                new_path_cnt_vec[v] += old_path_cnt_vec[src];
            }
            vector<node_id_t> nbr_vec = graph_in.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_vec[w] < 0) {
                    Q.push(w);
                    dist_vec[w] = dist_vec[v] + 1;
                }
                if (dist_vec[w] == dist_vec[v] + 1) {
                    old_path_cnt_vec[w] += old_path_cnt_vec[v];
                    new_path_cnt_vec[w] += new_path_cnt_vec[v];//NEW
                    P[w].push_back(v);
                }
            }
        }

        while (!S.empty()) {
            node_id_t w = S.top();
            S.pop();
            for (int idx = 0; idx < P[w].size(); ++idx) {
                node_id_t v = P[w][idx];
                old_pair_dep_vec[v] += (((double) old_path_cnt_vec[v] / old_path_cnt_vec[w]) * (1 + old_pair_dep_vec[w]));
                new_pair_dep_vec[v] += (((double) new_path_cnt_vec[v] / new_path_cnt_vec[w]) * (1 + new_pair_dep_vec[w]));
            }
            //IMP: this is the only change that happens to P, @src should be added as parent for dst
            if(w == dst) {
                node_id_t v = src;
                new_pair_dep_vec[v] += (((double) new_path_cnt_vec[v] / new_path_cnt_vec[w]) * (1 + new_pair_dep_vec[w]));
            }
            if (w != s) {
                bc_vec[w] += (new_pair_dep_vec[w] - old_pair_dep_vec[w])/2.0;
                //bc_vec[w] += (0 - old_pair_dep_vec[w])/2.0;
            }
        }
    } else {
        vector<vector<node_id_t> > P;
        vector<int> path_cnt_vec;
        vector<int> path_cnt_inc_vec;
        vector<int> dist_vec;
        vector<double> pair_dep_vec;
        vector<bool>& visited_vec = graph_in.tmp_bool_vec;
        queue<node_id_t> Q;
        vector<node_id_t> S;
        
        P.resize(graph_in.size());
        dist_vec.resize(graph_in.size());
        path_cnt_vec.resize(graph_in.size());
        pair_dep_vec.resize(graph_in.size());
        path_cnt_inc_vec.resize(graph_in.size());
        
        fill(path_cnt_vec.begin(), path_cnt_vec.end(), 0);
        path_cnt_vec[s] = 1;
        fill(dist_vec.begin(), dist_vec.end(), -1);
        dist_vec[s] = 0;
        fill(pair_dep_vec.begin(), pair_dep_vec.end(), 0.0);
        fill(path_cnt_inc_vec.begin(), path_cnt_inc_vec.end(), 0);
        
        Q.push(s);
        while (!Q.empty()) {
            node_id_t v = Q.front();
            Q.pop();
            //S.push(v);
            S.push_back(v);
            vector<node_id_t> nbr_vec = graph_in.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_vec[w] < 0) {
                    Q.push(w);
                    dist_vec[w] = dist_vec[v] + 1;
                }
                if (dist_vec[w] == dist_vec[v] + 1) {
                    path_cnt_vec[w] += path_cnt_vec[v];
                    P[w].push_back(v);
                }
            }
        }

        for(int i = S.size()-1; i >= 0; --i) {
            node_id_t w = S[i];
            for (int idx = 0; idx < P[w].size(); ++idx) {
                node_id_t v = P[w][idx];
                pair_dep_vec[v] += (((double) path_cnt_vec[v] / path_cnt_vec[w]) * (1 + pair_dep_vec[w]));
            }
            if (w != s) {
                bc_vec[w] -= pair_dep_vec[w]/2.0;
            }
        }

        //vector<int> old_dist_vec = dist_vec;    
        Q.push(dst);
        dist_vec[dst] = dist_vec[src] + 1;
        P[dst].clear();
        P[dst].push_back(src);
        path_cnt_inc_vec[dst] = path_cnt_vec[src];
        path_cnt_vec[dst] = path_cnt_inc_vec[dst];
        //tr1::unordered_set<node_id_t> visited_set;
        
        //visited_vec.resize(graph_in.size());
        fill(visited_vec.begin(), visited_vec.end(), false);
        visited_vec[dst] = true;
        //visited_set.insert(dst);
        
        while (!Q.empty()) {
            node_id_t v = Q.front();
            Q.pop();
            //S.push(v);
            vector<node_id_t> nbr_vec = graph_in.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_vec[w] > (dist_vec[v] + 1)) {
                    dist_vec[w] = dist_vec[v] + 1;
                    P[w].clear();
                    P[w].push_back(v);
                    path_cnt_vec[w] = 0;
                    path_cnt_inc_vec[w] = path_cnt_inc_vec[v];
                    path_cnt_vec[w] += path_cnt_inc_vec[w];
//                    if(!visited_vec[w]) {
//                        visited_vec[w] = true;
//                        Q.push(w);
//                    }
                } else if (dist_vec[w] == (dist_vec[v] + 1)) {
                    path_cnt_inc_vec[w] += path_cnt_inc_vec[v];
                    path_cnt_vec[w] += path_cnt_inc_vec[v];
                    //if(old_dist_vec[w] == old_dist_vec[v] || v == dst) {
                    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);
//                    }
                }
                if(!visited_vec[w]) {
                    visited_vec[w] = true;
                    Q.push(w);
                }
            }
        }
        
        
        //IMP::THIS CAN BE MADE MUCH BETTER!
        //HEAP FOR EXAMPLE
        //EVEN THE SWAPPING CAN BE DONE MORE EFFICIENTLY
        for(int i = 1; i < S.size(); ++i) {
            if(dist_vec[S[i-1]] > dist_vec[S[i]]) {
                int j = i;
                while(dist_vec[S[j-1]] > dist_vec[S[j]]) {
                    node_id_t tmp = S[j-1];
                    S[j-1] = S[j];
                    S[j] = tmp;
                    --j;
                }
            }
        }
        
        fill(pair_dep_vec.begin(), pair_dep_vec.end(), 0.0);
        for(int i = S.size()-1; i >= 0; --i) {
            node_id_t w = S[i];
            for (int idx = 0; idx < P[w].size(); ++idx) {
                node_id_t v = P[w][idx];
                pair_dep_vec[v] += (((double) path_cnt_vec[v] / path_cnt_vec[w]) * (1 + pair_dep_vec[w]));
            }
            if (w != s) {
                bc_vec[w] += pair_dep_vec[w]/2.0;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdi, 0x10(%rsp)
movl %esi, 0x8(%rsp)
movl %edx, 0x18(%rsp)
movl %ecx, 0xc(%rsp)
cmpl %r9d, %r8d
jle 0x9b0e
movl %ecx, 0x18(%rsp)
movl %edx, 0xc(%rsp)
movl %r8d, %eax
jmp 0x9b14
movl %r9d, %eax
movl %r8d, %r9d
subl %r9d, %eax
cmpl $0x1, %eax
jne 0x9c1a
leaq 0xf0(%rsp), %rdi
callq 0x766a
xorpd %xmm0, %xmm0
movapd %xmm0, 0x80(%rsp)
andq $0x0, 0x90(%rsp)
movapd %xmm0, 0x60(%rsp)
andq $0x0, 0x70(%rsp)
movapd %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
movapd %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x4a40
xorpd %xmm0, %xmm0
movapd %xmm0, 0xc0(%rsp)
andq $0x0, 0xd0(%rsp)
movapd %xmm0, 0xa0(%rsp)
andq $0x0, 0xb0(%rsp)
movq 0x10(%rsp), %rdi
callq 0x18d3c
leaq 0x80(%rsp), %rdi
movq %rax, %rsi
callq 0x4874
movq 0x10(%rsp), %rdi
callq 0x18d3c
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0xafb8
movq 0x10(%rsp), %rdi
callq 0x18d3c
leaq 0x60(%rsp), %rdi
movq %rax, %rsi
callq 0xafb8
movq 0x10(%rsp), %rdi
callq 0x18d3c
leaq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0xafb8
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rcx
movq %rax, %rdx
cmpq %rcx, %rdx
je 0x9d33
andl $0x0, (%rdx)
addq $0x4, %rdx
jmp 0x9c08
xorpd %xmm0, %xmm0
movapd %xmm0, 0x140(%rsp)
andq $0x0, 0x150(%rsp)
movapd %xmm0, 0x80(%rsp)
andq $0x0, 0x90(%rsp)
movapd %xmm0, 0x60(%rsp)
andq $0x0, 0x70(%rsp)
movapd %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
movapd %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x4a40
xorpd %xmm0, %xmm0
movapd %xmm0, 0xc0(%rsp)
andq $0x0, 0xd0(%rsp)
movq 0x10(%rsp), %rdi
callq 0x18d3c
leaq 0x140(%rsp), %rdi
movq %rax, %rsi
callq 0x4874
movq 0x10(%rsp), %rdi
callq 0x18d3c
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0xafb8
movq 0x10(%rsp), %rdi
callq 0x18d3c
leaq 0x80(%rsp), %rdi
movq %rax, %rsi
callq 0xafb8
movq 0x10(%rsp), %rdi
callq 0x18d3c
leaq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x45f0
movq 0x10(%rsp), %rdi
callq 0x18d3c
leaq 0x60(%rsp), %rdi
movq %rax, %rsi
callq 0xafb8
movq 0x10(%rsp), %rax
leaq 0x90(%rax), %r14
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
movq %rax, %rdx
cmpq %rcx, %rdx
je 0x9dd9
andl $0x0, (%rdx)
addq $0x4, %rdx
jmp 0x9d21
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq %rcx, %rsi
cmpq %rdx, %rsi
je 0x9d4e
andl $0x0, (%rsi)
addq $0x4, %rsi
jmp 0x9d40
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rsi
movq %rdx, %rdi
cmpq %rsi, %rdi
je 0x9d69
orl $-0x1, (%rdi)
addq $0x4, %rdi
jmp 0x9d5b
movl 0x8(%rsp), %esi
pushq $0x1
popq %rdi
movl %edi, (%rax,%rsi,4)
movl 0x8(%rsp), %eax
movl %edi, (%rcx,%rax,4)
movl 0x8(%rsp), %eax
andl $0x0, (%rdx,%rax,4)
movq 0x10(%rsp), %rdi
callq 0x18d3c
leaq 0xc0(%rsp), %rdi
movq %rax, %rsi
callq 0x45f0
movq 0x10(%rsp), %rdi
callq 0x18d3c
leaq 0xa0(%rsp), %rdi
movq %rax, %rsi
callq 0x45f0
movq 0xc0(%rsp), %rax
movq 0xc8(%rsp), %rcx
cmpq %rcx, %rax
je 0x9f62
andq $0x0, (%rax)
addq $0x8, %rax
jmp 0x9dc6
movl 0x8(%rsp), %ecx
movl $0x1, (%rax,%rcx,4)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rax, %rdx
cmpq %rcx, %rdx
je 0x9dff
orl $-0x1, (%rdx)
addq $0x4, %rdx
jmp 0x9df1
movl 0x8(%rsp), %ecx
andl $0x0, (%rax,%rcx,4)
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
cmpq %rcx, %rax
je 0x9e20
andq $0x0, (%rax)
addq $0x8, %rax
jmp 0x9e11
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rcx
cmpq %rcx, %rax
je 0x9e38
andl $0x0, (%rax)
addq $0x4, %rax
jmp 0x9e2a
leaq 0xf0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x62da
leaq 0xf0(%rsp), %r15
leaq 0xd8(%rsp), %r13
leaq 0xa0(%rsp), %rbp
leaq 0x4(%rsp), %rbx
movq 0x100(%rsp), %rax
cmpq %rax, 0x120(%rsp)
je 0xa0cf
movl (%rax), %eax
movl %eax, 0xd8(%rsp)
movq %r15, %rdi
callq 0x650e
leaq 0xc0(%rsp), %rdi
movq %r13, %rsi
callq 0x478c
movl 0xd8(%rsp), %esi
movq 0x10(%rsp), %rdi
callq 0x18b4c
movq %rbp, %rdi
movq %rax, %rsi
callq 0x4ba0
xorl %r12d, %r12d
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
jbe 0x9f55
movl (%rax,%r12,4), %eax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rcx
movl (%rcx,%rax,4), %edx
testl %edx, %edx
jns 0x9f17
movq %r15, %rdi
movq %rbx, %rsi
callq 0x62da
movl 0xd8(%rsp), %eax
movq 0x20(%rsp), %rcx
movl (%rcx,%rax,4), %eax
incl %eax
movl 0x4(%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movl 0x4(%rsp), %eax
movl (%rcx,%rax,4), %edx
movl 0xd8(%rsp), %esi
movl (%rcx,%rsi,4), %ecx
incl %ecx
cmpl %ecx, %edx
jne 0x9f4d
movq 0x80(%rsp), %rcx
movl (%rcx,%rsi,4), %edx
addl %edx, (%rcx,%rax,4)
movl 0x4(%rsp), %eax
imulq $0x18, %rax, %rdi
addq 0x140(%rsp), %rdi
movq %r13, %rsi
callq 0x478c
incq %r12
jmp 0x9ebd
movq %rbp, %rdi
callq 0x56ec
jmp 0x9e67
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rcx
cmpq %rcx, %rax
je 0x9f81
andq $0x0, (%rax)
addq $0x8, %rax
jmp 0x9f72
leaq 0x140(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x62da
leaq 0x140(%rsp), %r14
leaq 0xf0(%rsp), %r15
leaq 0x4(%rsp), %r12
leaq 0xd8(%rsp), %r13
leaq 0x1c(%rsp), %rbp
movq 0x150(%rsp), %rax
cmpq %rax, 0x170(%rsp)
je 0xa403
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movq %r14, %rdi
callq 0x650e
movq %r15, %rdi
movq %r12, %rsi
callq 0x62da
movl 0x4(%rsp), %esi
cmpl 0xc(%rsp), %esi
jne 0xa006
movl 0x18(%rsp), %eax
movq 0x60(%rsp), %rcx
movl (%rcx,%rax,4), %eax
movq 0x20(%rsp), %rcx
addl %eax, (%rcx,%rsi,4)
movl 0x4(%rsp), %esi
movq 0x10(%rsp), %rdi
callq 0x18b4c
movq %r13, %rdi
movq %rax, %rsi
callq 0x4ba0
xorl %ebx, %ebx
movq 0xd8(%rsp), %rax
movq 0xe0(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
jbe 0xa0c2
movl (%rax,%rbx,4), %eax
movl %eax, 0x1c(%rsp)
movq 0x40(%rsp), %rcx
movl (%rcx,%rax,4), %edx
testl %edx, %edx
jns 0xa077
movq %r14, %rdi
movq %rbp, %rsi
callq 0x62da
movl 0x4(%rsp), %eax
movq 0x40(%rsp), %rcx
movl (%rcx,%rax,4), %eax
incl %eax
movl 0x1c(%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movl 0x1c(%rsp), %eax
movl (%rcx,%rax,4), %edx
movl 0x4(%rsp), %esi
movl (%rcx,%rsi,4), %ecx
incl %ecx
cmpl %ecx, %edx
jne 0xa0ba
movq 0x60(%rsp), %rcx
movl (%rcx,%rsi,4), %edx
addl %edx, (%rcx,%rax,4)
movl 0x4(%rsp), %eax
movq 0x20(%rsp), %rcx
movl (%rcx,%rax,4), %eax
movl 0x1c(%rsp), %edx
addl %eax, (%rcx,%rdx,4)
movl 0x1c(%rsp), %eax
imulq $0x18, %rax, %rdi
addq 0x80(%rsp), %rdi
movq %r12, %rsi
callq 0x478c
incq %rbx
jmp 0xa01d
movq %r13, %rdi
callq 0x56ec
jmp 0x9fb5
movq 0xc0(%rsp), %rax
movq 0xc8(%rsp), %r8
subq %rax, %r8
shrq $0x2, %r8
movq 0x140(%rsp), %rcx
movl 0x8(%rsp), %edx
movq 0x40(%rsp), %rsi
movq 0x1d0(%rsp), %rdi
movq (%rdi), %rdi
movl %r8d, %r8d
movsd 0x1df2b(%rip), %xmm0    # 0x28038
decq %r8
testl %r8d, %r8d
js 0xa1a7
movl %r8d, %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movl (%rax,%r9,4), %r9d
imulq $0x18, %r9, %r11
movq (%rcx,%r11), %r10
movq 0x8(%rcx,%r11), %r11
subq %r10, %r11
sarq $0x2, %r11
movq 0x80(%rsp), %rbx
movq 0x40(%rsp), %r15
xorl %r12d, %r12d
cmpq %r12, %r11
je 0xa187
movl (%r10,%r12,4), %r13d
cvtsi2sdl (%rbx,%r13,4), %xmm1
cvtsi2sdl (%rbx,%r9,4), %xmm2
divsd %xmm2, %xmm1
movsd (%r15,%r9,8), %xmm2
addsd 0x1dece(%rip), %xmm2    # 0x28040
mulsd %xmm1, %xmm2
addsd (%r15,%r13,8), %xmm2
movsd %xmm2, (%r15,%r13,8)
incq %r12
jmp 0xa14b
cmpl %edx, %r9d
je 0xa10d
movsd (%rsi,%r9,8), %xmm1
mulsd %xmm0, %xmm1
addsd (%rdi,%r9,8), %xmm1
movsd %xmm1, (%rdi,%r9,8)
jmp 0xa10d
leaq 0xf0(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x62da
movl 0x18(%rsp), %eax
movq 0x20(%rsp), %rcx
movl (%rcx,%rax,4), %eax
incl %eax
movl 0xc(%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movl 0xc(%rsp), %eax
movq 0x140(%rsp), %rcx
imulq $0x18, %rax, %rdx
leaq (%rcx,%rdx), %rdi
movq (%rcx,%rdx), %rax
cmpq %rax, 0x8(%rcx,%rdx)
je 0xa1f1
movq %rax, 0x8(%rdi)
leaq 0x18(%rsp), %rsi
callq 0x478c
movl 0x18(%rsp), %eax
movq 0x80(%rsp), %rcx
movl (%rcx,%rax,4), %eax
movl 0xc(%rsp), %edx
movq 0x60(%rsp), %rsi
movl %eax, (%rsi,%rdx,4)
movl 0xc(%rsp), %eax
movl (%rsi,%rax,4), %edx
movl %edx, (%rcx,%rax,4)
movq 0x10(%rsp), %rax
movq 0x90(%rax), %rdi
movq 0xa0(%rax), %rdx
movl 0xa8(%rax), %ecx
leaq 0xa0(%rsp), %r8
movb $0x0, (%r8)
xorl %esi, %esi
callq 0x864b
movl 0xc(%rsp), %esi
movq %r14, %rdi
callq 0x4b82
orq %rdx, (%rax)
leaq 0xf0(%rsp), %r15
leaq 0xa0(%rsp), %r12
leaq 0xd8(%rsp), %r13
leaq 0x4(%rsp), %rbp
movq 0x100(%rsp), %rax
cmpq %rax, 0x120(%rsp)
je 0xa5de
movl (%rax), %eax
movl %eax, 0xd8(%rsp)
movq %r15, %rdi
callq 0x650e
movl 0xd8(%rsp), %esi
movq 0x10(%rsp), %rdi
callq 0x18b4c
movq %r12, %rdi
movq %rax, %rsi
callq 0x4ba0
xorl %ebx, %ebx
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
jbe 0xa3f6
movl (%rax,%rbx,4), %eax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rdx
movl 0xd8(%rsp), %ecx
movl (%rdx,%rcx,4), %esi
incl %esi
cmpl %esi, (%rdx,%rax,4)
jle 0xa35a
movl %esi, (%rdx,%rax,4)
movl 0x4(%rsp), %eax
movq 0x140(%rsp), %rcx
imulq $0x18, %rax, %rdx
leaq (%rcx,%rdx), %rdi
movq (%rcx,%rdx), %rax
cmpq %rax, 0x8(%rcx,%rdx)
je 0xa320
movq %rax, 0x8(%rdi)
movq %r13, %rsi
callq 0x478c
movl 0x4(%rsp), %eax
movq 0x80(%rsp), %rcx
andl $0x0, (%rcx,%rax,4)
movl 0xd8(%rsp), %eax
movq 0x60(%rsp), %rdx
movl (%rdx,%rax,4), %eax
movl 0x4(%rsp), %esi
movl %eax, (%rdx,%rsi,4)
movl 0x4(%rsp), %eax
movl (%rdx,%rax,4), %edx
addl %edx, (%rcx,%rax,4)
jmp 0xa3c3
jne 0xa3c3
movq 0x60(%rsp), %rdx
movl (%rdx,%rcx,4), %ecx
addl %ecx, (%rdx,%rax,4)
movl 0xd8(%rsp), %eax
movl (%rdx,%rax,4), %eax
movl 0x4(%rsp), %ecx
movq 0x80(%rsp), %rdx
addl %eax, (%rdx,%rcx,4)
movl 0x4(%rsp), %eax
movq 0x140(%rsp), %rcx
imulq $0x18, %rax, %rax
movq (%rcx,%rax), %rdi
movq 0x8(%rcx,%rax), %rsi
movq %r13, %rdx
callq 0x688c
movl 0x4(%rsp), %ecx
movq 0x140(%rsp), %rdi
imulq $0x18, %rcx, %rcx
cmpq 0x8(%rdi,%rcx), %rax
jne 0xa3c3
addq %rcx, %rdi
movq %r13, %rsi
callq 0x478c
movl 0x4(%rsp), %esi
movq %r14, %rdi
callq 0x4b82
testq %rdx, (%rax)
jne 0xa3ee
movl 0x4(%rsp), %esi
movq %r14, %rdi
callq 0x4b82
orq %rdx, (%rax)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x62da
incq %rbx
jmp 0xa2bd
movq %r12, %rdi
callq 0x56ec
jmp 0xa278
movl $0x200, %r14d           # imm = 0x200
leaq 0xf0(%rsp), %rbx
movq 0x1d0(%rsp), %r12
movq 0x120(%rsp), %rax
cmpq 0x100(%rsp), %rax
je 0xa57a
cmpq 0x128(%rsp), %rax
jne 0xa448
movq 0x138(%rsp), %rax
movq -0x8(%rax), %rax
addq %r14, %rax
movl -0x4(%rax), %r15d
movq %rbx, %rdi
callq 0x85f6
movq 0x80(%rsp), %rcx
imulq $0x18, %r15, %rdx
movq (%rcx,%rdx), %rax
movq 0x8(%rcx,%rdx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movq 0x60(%rsp), %rdx
movq 0xc0(%rsp), %rsi
movq 0x20(%rsp), %rdi
movq 0xa0(%rsp), %r8
xorl %r9d, %r9d
movsd 0x1dbab(%rip), %xmm2    # 0x28040
cmpq %r9, %rcx
je 0xa4f7
movl (%rax,%r9,4), %r10d
cvtsi2sdl (%rdx,%r10,4), %xmm0
cvtsi2sdl (%rdx,%r15,4), %xmm1
divsd %xmm1, %xmm0
movsd (%rsi,%r15,8), %xmm1
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
addsd (%rsi,%r10,8), %xmm1
movsd %xmm1, (%rsi,%r10,8)
cvtsi2sdl (%rdi,%r10,4), %xmm0
cvtsi2sdl (%rdi,%r15,4), %xmm1
divsd %xmm1, %xmm0
movsd (%r8,%r15,8), %xmm1
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
addsd (%r8,%r10,8), %xmm1
movsd %xmm1, (%r8,%r10,8)
incq %r9
jmp 0xa495
cmpl 0xc(%rsp), %r15d
jne 0xa536
movl 0x18(%rsp), %eax
movq 0x20(%rsp), %rcx
cvtsi2sdl (%rcx,%rax,4), %xmm0
cvtsi2sdl (%rcx,%r15,4), %xmm1
divsd %xmm1, %xmm0
movq 0xa0(%rsp), %rcx
movsd (%rcx,%r15,8), %xmm1
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
addsd (%rcx,%rax,8), %xmm1
movsd %xmm1, (%rcx,%rax,8)
cmpl 0x8(%rsp), %r15d
je 0xa419
movq 0xa0(%rsp), %rax
movsd (%rax,%r15,8), %xmm0
movq 0xc0(%rsp), %rax
subsd (%rax,%r15,8), %xmm0
mulsd 0x1dacb(%rip), %xmm0    # 0x28030
movq (%r12), %rax
addsd (%rax,%r15,8), %xmm0
movsd %xmm0, (%rax,%r15,8)
jmp 0xa419
leaq 0xa0(%rsp), %rdi
callq 0x5754
leaq 0xc0(%rsp), %rdi
callq 0x5754
leaq 0x140(%rsp), %rdi
callq 0x5280
leaq 0x40(%rsp), %rdi
callq 0x5720
leaq 0x20(%rsp), %rdi
callq 0x5720
leaq 0x60(%rsp), %rdi
callq 0x5720
leaq 0x80(%rsp), %rdi
callq 0x4a1e
leaq 0xf0(%rsp), %rdi
callq 0x5280
jmp 0xa761
movq 0xc0(%rsp), %rax
movq 0xc8(%rsp), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
pushq $0x1
popq %rcx
movq 0x20(%rsp), %rsi
movq %rax, %rdi
movq 0x1d0(%rsp), %rbx
cmpq %rcx, %rdx
jbe 0xa646
movl -0x4(%rax,%rcx,4), %r9d
movl (%rax,%rcx,4), %r8d
movl (%rsi,%r8,4), %r10d
cmpl %r10d, (%rsi,%r9,4)
jle 0xa63d
movq %rdi, %r9
movl (%r9), %r11d
cmpl %r10d, (%rsi,%r11,4)
jle 0xa63d
movl %r8d, (%r9)
movl %r11d, 0x4(%r9)
movl (%rsi,%r8,4), %r10d
addq $-0x4, %r9
jmp 0xa623
incq %rcx
addq $0x4, %rdi
jmp 0xa608
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %rsi
movq %rcx, %rdi
cmpq %rsi, %rdi
je 0xa662
andq $0x0, (%rdi)
addq $0x8, %rdi
jmp 0xa653
movq 0x140(%rsp), %rsi
movl 0x8(%rsp), %edi
movq (%rbx), %r8
movl %edx, %edx
movsd 0x1d9b5(%rip), %xmm0    # 0x28030
decq %rdx
testl %edx, %edx
js 0xa70f
movl %edx, %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movl (%rax,%r9,4), %r9d
imulq $0x18, %r9, %r11
movq (%rsi,%r11), %r10
movq 0x8(%rsi,%r11), %r11
subq %r10, %r11
sarq $0x2, %r11
movq 0x80(%rsp), %rbx
xorl %r14d, %r14d
cmpq %r14, %r11
je 0xa6ef
movl (%r10,%r14,4), %r15d
cvtsi2sdl (%rbx,%r15,4), %xmm1
cvtsi2sdl (%rbx,%r9,4), %xmm2
divsd %xmm2, %xmm1
movsd (%rcx,%r9,8), %xmm2
addsd 0x1d966(%rip), %xmm2    # 0x28040
mulsd %xmm1, %xmm2
addsd (%rcx,%r15,8), %xmm2
movsd %xmm2, (%rcx,%r15,8)
incq %r14
jmp 0xa6b3
cmpl %edi, %r9d
je 0xa67b
movsd (%rcx,%r9,8), %xmm1
mulsd %xmm0, %xmm1
addsd (%r8,%r9,8), %xmm1
movsd %xmm1, (%r8,%r9,8)
jmp 0xa67b
leaq 0xc0(%rsp), %rdi
callq 0x56ec
leaq 0xf0(%rsp), %rdi
callq 0x5280
leaq 0x40(%rsp), %rdi
callq 0x5754
leaq 0x20(%rsp), %rdi
callq 0x5720
leaq 0x60(%rsp), %rdi
callq 0x5720
leaq 0x80(%rsp), %rdi
callq 0x5720
leaq 0x140(%rsp), %rdi
callq 0x4a1e
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa793
jmp 0xa793
movq %rax, %rbx
jmp 0xa83e
movq %rax, %rbx
jmp 0xa7d6
jmp 0xa793
jmp 0xa78e
jmp 0xa78e
jmp 0xa793
jmp 0xa793
movq %rax, %rbx
jmp 0xa7af
movq %rax, %rbx
jmp 0xa824
jmp 0xa814
jmp 0xa814
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x56ec
leaq 0xa0(%rsp), %rdi
callq 0x5754
leaq 0xc0(%rsp), %rdi
callq 0x5754
leaq 0x140(%rsp), %rdi
callq 0x5280
leaq 0x40(%rsp), %rdi
callq 0x5720
leaq 0x20(%rsp), %rdi
callq 0x5720
leaq 0x60(%rsp), %rdi
callq 0x5720
leaq 0x80(%rsp), %rdi
callq 0x4a1e
leaq 0xf0(%rsp), %rdi
callq 0x5280
jmp 0xa876
jmp 0xa814
jmp 0xa814
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x56ec
leaq 0xc0(%rsp), %rdi
callq 0x56ec
leaq 0xf0(%rsp), %rdi
callq 0x5280
leaq 0x40(%rsp), %rdi
callq 0x5754
leaq 0x20(%rsp), %rdi
callq 0x5720
leaq 0x60(%rsp), %rdi
callq 0x5720
leaq 0x80(%rsp), %rdi
callq 0x5720
leaq 0x140(%rsp), %rdi
callq 0x4a1e
movq %rbx, %rdi
callq 0x23d0