// File: fjamour[P]icentral/src/_bc_mem.cc
// Function: iCentral_iter_mem(std::vector<double, std::allocator<double>>&, component_t&, unsigned int, std::pair<unsigned int, unsigned int>, iter_info_t&)
void iCentral_iter_mem(
        vector<double>& dBC_vec,    // delta BC of vertices
        component_t&    comp,       // component could be BCC, MUC, or just a graph
        node_id_t       s,          // source of the iteration
        edge_t          e,          // inserted edge
        iter_info_t&    iter_info   //TODO to be used later?
        )
{
//    RBFS(dBC_vec, comp, s, iter_info, false, true);
//    partial_BBFS(iter_info, comp, s, e);
//    RBFS(dBC_vec, comp, s, iter_info, true, false);
//    fill(iter_info.sigma_inc_vec.begin(), iter_info.sigma_inc_vec.end(), 0);
//    fill(iter_info.visited_vec.begin(), iter_info.visited_vec.end(), false);
    
    subgraph_t& g = comp.subgraph;
    
    vector<vector<node_id_t> >&  P = iter_info.P;
    vector<int>&                 sigma_vec = iter_info.sigma_vec;
    vector<int>&                 sigma_inc_vec = iter_info.sigma_inc_vec;
    vector<int>&                 dist_map = iter_info.dist_vec;
    vector<bool>&                visited_vec = iter_info.visited_vec;
    //vector<node_id_t>&           S = iter_info.S;
    
    vector<double>&              delta_vec = iter_info.delta_vec;
    
    vector<double>&              new_delta_vec = iter_info.new_delta_vec;
    new_delta_vec = delta_vec;
    
    static vector<vector<node_id_t> >   new_P;
    fill_vec<vector<node_id_t> >(new_P, g.size(), vector<node_id_t>());
    //static vector<vector<node_id_t> >   lost_P;;
    //fill_vec<vector<node_id_t> >(lost_P, g.size(), vector<node_id_t>());
    static vector<int>                  new_sigma_vec = iter_info.new_sigma_vec;
    new_sigma_vec = sigma_vec;
    static vector<stack<node_id_t> >    level_vec;

    queue<node_id_t>             Q;
    node_id_t src, dst;
    if(dist_map[e.first] > dist_map[e.second]) {
        src = e.second;
        dst = e.first;
    } else {
        src = e.first;
        dst = e.second;
    }
    
    //S.clear();
    level_vec.resize(dist_map[dst]+1);
    
    //Compute new path counts and paths
    if(dist_map[dst] != dist_map[src]+1) {
        //lost_P[dst] = P[dst];
        new_P[dst].push_back(src);
        for(int p = 0; p < P[dst].size(); ++p){
            node_id_t parent = P[dst][p];
            new_delta_vec[parent] -= (((double) sigma_vec[parent] / sigma_vec[dst]) * (1 + delta_vec[dst]));
            if(dist_map[parent] == dist_map[src]+1) {
                level_vec[dist_map[parent]].push(parent);
            }
        }
        P[dst].clear();
        //P[dst].push_back(src);
        new_sigma_vec[dst] = new_sigma_vec[src];
    } else {
        new_P[dst].push_back(src);
        //P[dst].push_back(src);
        new_sigma_vec[dst] += new_sigma_vec[src];
    }
        
    Q.push(dst);
    dist_map[dst] = dist_map[src] + 1;
    sigma_inc_vec[dst] = sigma_vec[src];
    visited_vec[dst] = true;

    while (!Q.empty()) {
        node_id_t v = Q.front();
        if(dist_map[v] >= level_vec.size()) {
            stack<node_id_t> qq;
            level_vec.push_back(qq);
            level_vec[dist_map[v]].push(v);
        } else {
            level_vec[dist_map[v]].push(v);
        }
        Q.pop();
        vector<node_id_t> nbr_vec = g.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;
                //lost_P[w] = P[w];
                new_P[w].push_back(v);
                for(int p = 0; p < P[w].size(); ++p){
                    node_id_t parent = P[w][p];
                    new_delta_vec[parent] -= (((double) sigma_vec[parent] / sigma_vec[w]) * (1 + delta_vec[w]));
                }
                P[w].clear();
                //P[w].push_back(v);
                new_sigma_vec[w] = 0;
                sigma_inc_vec[w] = sigma_inc_vec[v];
                new_sigma_vec[w] += sigma_inc_vec[w];
                if (!visited_vec[w]) {
                    visited_vec[w] = true;
                    //if(new_sigma_vec[w] != sigma_vec[w])
                        Q.push(w);
                }
            } else if (dist_map[w] == (dist_map[v] + 1)) {
                sigma_inc_vec[w] += sigma_inc_vec[v];
                new_sigma_vec[w] += sigma_inc_vec[v];
                if (find(P[w].begin(), P[w].end(), v) == P[w].end()) {
                    new_P[w].push_back(v);
                }
                if (!visited_vec[w]) {
                    visited_vec[w] = true;
                    //if(new_sigma_vec[w] != sigma_vec[w])
                        Q.push(w);
                }
            }
        }
    }
    
    fill_vec<bool>(visited_vec, g.size(), false);
    
    for(int level = level_vec.size()-1; level >= 0; --level) {
        while(!level_vec[level].empty()) {
            node_id_t w = level_vec[level].top();
            level_vec[level].pop();
            if(!visited_vec[w]) {
                visited_vec[w] = true;
                for (int idx = 0; idx < P[w].size(); ++idx) {
                    node_id_t v = P[w][idx];
                    new_delta_vec[v] -= (((double) sigma_vec[v] / sigma_vec[w]) * (1 + delta_vec[w]));
                    new_delta_vec[v] += (((double) new_sigma_vec[v] / new_sigma_vec[w]) * (1 + new_delta_vec[w]));
                    if(level > 0)
                        level_vec[level-1].push(v);
                }
                for (int idx = 0; idx < new_P[w].size(); ++idx) {
                    node_id_t v = new_P[w][idx];
                    new_delta_vec[v] += (((double) new_sigma_vec[v] / new_sigma_vec[w]) * (1 + new_delta_vec[w]));
                    if(level > 0)
                        level_vec[level-1].push(v);
                }
                //has to update P with new_P for the next edge insertions
                P[w] = new_P[w];
                if (w != s) {
                    dBC_vec[w] -= delta_vec[w]/2.0;
                    dBC_vec[w] += new_delta_vec[w]/2.0;
                }
            }
        }
    }
    
    iter_info.delta_vec = new_delta_vec;
    iter_info.sigma_vec = new_sigma_vec;
    fill(iter_info.sigma_inc_vec.begin(), iter_info.sigma_inc_vec.end(), 0);
    fill(iter_info.visited_vec.begin(), iter_info.visited_vec.end(), false);
}

// Assembly:
subq $0x458, %rsp            # imm = 0x458
movq %rcx, 0x450(%rsp)
movq %rdi, 0x448(%rsp)
movq %rsi, 0x440(%rsp)
movl %edx, 0x43c(%rsp)
movq %r8, 0x430(%rsp)
movq 0x440(%rsp), %rax
movq %rax, 0x428(%rsp)
movq 0x430(%rsp), %rax
movq %rax, 0x420(%rsp)
movq 0x430(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x418(%rsp)
movq 0x430(%rsp), %rax
addq $0xc0, %rax
movq %rax, 0x410(%rsp)
movq 0x430(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x408(%rsp)
movq 0x430(%rsp), %rax
addq $0xd8, %rax
movq %rax, 0x400(%rsp)
movq 0x430(%rsp), %rax
addq $0x48, %rax
movq %rax, 0x3f8(%rsp)
movq 0x430(%rsp), %rax
addq $0x90, %rax
movq %rax, 0x3f0(%rsp)
movq 0x3f8(%rsp), %rsi
movq 0x3f0(%rsp), %rdi
callq 0x21640
cmpb $0x0, 0x7b840(%rip)     # 0x9b788
jne 0x1ff8d
leaq 0x7b837(%rip), %rdi     # 0x9b788
callq 0x9d40
cmpl $0x0, %eax
je 0x1ff8d
leaq 0x7b80e(%rip), %rdi     # 0x9b770
callq 0x10030
leaq -0xfaae(%rip), %rdi     # 0x104c0
leaq 0x7b7fb(%rip), %rsi     # 0x9b770
leaq 0x7b7d4(%rip), %rdx     # 0x9b750
callq 0x9660
leaq 0x7b800(%rip), %rdi     # 0x9b788
callq 0x9460
movq 0x428(%rsp), %rdi
callq 0x77430
movq %rax, 0x1c8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x3d0(%rsp)
movq $0x0, 0x3e0(%rsp)
leaq 0x3d0(%rsp), %rdi
movq %rdi, 0x1d0(%rsp)
callq 0xfcd0
movq 0x1c8(%rsp), %rsi
movq 0x1d0(%rsp), %rdx
leaq 0x7b78b(%rip), %rdi     # 0x9b770
callq 0x21900
jmp 0x1ffec
leaq 0x3d0(%rsp), %rdi
callq 0x10520
cmpb $0x0, 0x7b7a8(%rip)     # 0x9b7a8
jne 0x20053
leaq 0x7b79f(%rip), %rdi     # 0x9b7a8
callq 0x9d40
cmpl $0x0, %eax
je 0x20053
movq 0x430(%rsp), %rsi
addq $0x78, %rsi
leaq 0x7b76a(%rip), %rdi     # 0x9b790
callq 0x1ea00
jmp 0x2002d
leaq -0x103c4(%rip), %rdi    # 0xfc70
leaq 0x7b755(%rip), %rsi     # 0x9b790
leaq 0x7b70e(%rip), %rdx     # 0x9b750
callq 0x9660
leaq 0x7b75a(%rip), %rdi     # 0x9b7a8
callq 0x9460
movq 0x418(%rsp), %rsi
leaq 0x7b72e(%rip), %rdi     # 0x9b790
callq 0x21960
cmpb $0x0, 0x7b75a(%rip)     # 0x9b7c8
jne 0x200b3
leaq 0x7b751(%rip), %rdi     # 0x9b7c8
callq 0x9d40
cmpl $0x0, %eax
je 0x200b3
leaq 0x7b728(%rip), %rdi     # 0x9b7b0
callq 0x21c20
leaq 0x1b9c(%rip), %rdi      # 0x21c30
leaq 0x7b715(%rip), %rsi     # 0x9b7b0
leaq 0x7b6ae(%rip), %rdx     # 0x9b750
callq 0x9660
leaq 0x7b71a(%rip), %rdi     # 0x9b7c8
callq 0x9460
leaq 0x370(%rsp), %rdi
callq 0x10580
movq 0x408(%rsp), %rdi
movl 0x450(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x1c4(%rsp)
movq 0x408(%rsp), %rdi
movl 0x454(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq %rax, %rcx
movl 0x1c4(%rsp), %eax
cmpl (%rcx), %eax
jle 0x2016c
movl 0x454(%rsp), %eax
movl %eax, 0x36c(%rsp)
movl 0x450(%rsp), %eax
movl %eax, 0x368(%rsp)
jmp 0x20188
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3c8(%rsp)
movl %eax, 0x3c4(%rsp)
leaq 0x3d0(%rsp), %rdi
callq 0x10520
jmp 0x21604
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3c8(%rsp)
movl %eax, 0x3c4(%rsp)
leaq 0x7b646(%rip), %rdi     # 0x9b7a8
callq 0x9440
jmp 0x21604
movl 0x450(%rsp), %eax
movl %eax, 0x36c(%rsp)
movl 0x454(%rsp), %eax
movl %eax, 0x368(%rsp)
movq 0x408(%rsp), %rdi
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
incl %eax
movslq %eax, %rsi
leaq 0x7b604(%rip), %rdi     # 0x9b7b0
callq 0x21c90
jmp 0x201b3
movq 0x408(%rsp), %rdi
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x1c0(%rsp)
movq 0x408(%rsp), %rdi
movl 0x36c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq %rax, %rcx
movl 0x1c0(%rsp), %eax
movl (%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
je 0x2047d
movl 0x368(%rsp), %eax
movl %eax, %esi
leaq 0x7b561(%rip), %rdi     # 0x9b770
callq 0x100e0
movq %rax, %rdi
leaq 0x36c(%rsp), %rsi
callq 0xfce0
jmp 0x20226
movl $0x0, 0x364(%rsp)
movslq 0x364(%rsp), %rax
movq %rax, 0x1b8(%rsp)
movq 0x420(%rsp), %rdi
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
callq 0xfd50
movq %rax, %rcx
movq 0x1b8(%rsp), %rax
cmpq %rcx, %rax
jae 0x20421
movq 0x420(%rsp), %rdi
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
movslq 0x364(%rsp), %rsi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x360(%rsp)
movq 0x418(%rsp), %rdi
movl 0x360(%rsp), %eax
movl %eax, %esi
callq 0xfc50
cvtsi2sdl (%rax), %xmm0
movsd %xmm0, 0x198(%rsp)
movq 0x418(%rsp), %rdi
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movsd 0x198(%rsp), %xmm0
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x1a0(%rsp)
movq 0x3f8(%rsp), %rdi
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x5acfd(%rip), %xmm0    # 0x7b010
addsd (%rax), %xmm0
movsd %xmm0, 0x1a8(%rsp)
movq 0x3f0(%rsp), %rdi
movl 0x360(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x1a0(%rsp), %xmm0
movsd 0x1a8(%rsp), %xmm2
movsd (%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movq 0x408(%rsp), %rdi
movl 0x360(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x1b4(%rsp)
movq 0x408(%rsp), %rdi
movl 0x36c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq %rax, %rcx
movl 0x1b4(%rsp), %eax
movl (%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x20409
movq 0x408(%rsp), %rdi
movl 0x360(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movslq (%rax), %rsi
leaq 0x7b3d9(%rip), %rdi     # 0x9b7b0
callq 0x21d30
movq %rax, %rdi
leaq 0x360(%rsp), %rsi
callq 0x21d50
jmp 0x203ee
jmp 0x20409
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3c8(%rsp)
movl %eax, 0x3c4(%rsp)
jmp 0x215f7
jmp 0x2040b
movl 0x364(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x364(%rsp)
jmp 0x20231
movq 0x420(%rsp), %rdi
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
callq 0x10a50
movl 0x36c(%rsp), %eax
movl %eax, %esi
leaq 0x7b341(%rip), %rdi     # 0x9b790
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x194(%rsp)
movl 0x368(%rsp), %eax
movl %eax, %esi
leaq 0x7b323(%rip), %rdi     # 0x9b790
callq 0xfc50
movl 0x194(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x204e2
movl 0x368(%rsp), %eax
movl %eax, %esi
leaq 0x7b2e3(%rip), %rdi     # 0x9b770
callq 0x100e0
movq %rax, %rdi
leaq 0x36c(%rsp), %rsi
callq 0xfce0
jmp 0x204a4
movl 0x36c(%rsp), %eax
movl %eax, %esi
leaq 0x7b2dc(%rip), %rdi     # 0x9b790
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x190(%rsp)
movl 0x368(%rsp), %eax
movl %eax, %esi
leaq 0x7b2be(%rip), %rdi     # 0x9b790
callq 0xfc50
movl 0x190(%rsp), %ecx
addl (%rax), %ecx
movl %ecx, (%rax)
leaq 0x370(%rsp), %rdi
leaq 0x368(%rsp), %rsi
callq 0x105b0
jmp 0x204f9
movq 0x408(%rsp), %rdi
movl 0x36c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
incl %eax
movl %eax, 0x178(%rsp)
movq 0x408(%rsp), %rdi
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x178(%rsp), %ecx
movl %ecx, (%rax)
movq 0x418(%rsp), %rdi
movl 0x36c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x17c(%rsp)
movq 0x410(%rsp), %rdi
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x17c(%rsp), %ecx
movl %ecx, (%rax)
movq 0x400(%rsp), %rdi
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0x10a70
movq %rdx, 0x180(%rsp)
movq %rax, 0x188(%rsp)
jmp 0x2059f
movq 0x180(%rsp), %rax
movq 0x188(%rsp), %rcx
movq %rcx, 0x350(%rsp)
movq %rax, 0x358(%rsp)
leaq 0x350(%rsp), %rdi
movl $0x1, %esi
callq 0x10ad0
leaq 0x370(%rsp), %rdi
callq 0x105e0
movb %al, 0x177(%rsp)
jmp 0x205e7
movb 0x177(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x205f9
jmp 0x20e52
leaq 0x370(%rsp), %rdi
callq 0x10600
movq %rax, 0x168(%rsp)
jmp 0x20610
movq 0x168(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x34c(%rsp)
movq 0x408(%rsp), %rdi
movl 0x34c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movslq (%rax), %rax
movq %rax, 0x160(%rsp)
leaq 0x7b167(%rip), %rdi     # 0x9b7b0
callq 0x21d80
movq %rax, %rcx
movq 0x160(%rsp), %rax
cmpq %rcx, %rax
jb 0x206f3
leaq 0x2f8(%rsp), %rdi
callq 0x21da0
jmp 0x20671
leaq 0x7b138(%rip), %rdi     # 0x9b7b0
leaq 0x2f8(%rsp), %rsi
callq 0x21dd0
jmp 0x20687
movq 0x408(%rsp), %rdi
movl 0x34c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movslq (%rax), %rsi
leaq 0x7b109(%rip), %rdi     # 0x9b7b0
callq 0x21d30
movq %rax, %rdi
leaq 0x34c(%rsp), %rsi
callq 0x21d50
jmp 0x206be
leaq 0x2f8(%rsp), %rdi
callq 0x21e40
jmp 0x2072c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3c8(%rsp)
movl %eax, 0x3c4(%rsp)
leaq 0x2f8(%rsp), %rdi
callq 0x21e40
jmp 0x215f7
movq 0x408(%rsp), %rdi
movl 0x34c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movslq (%rax), %rsi
leaq 0x7b09d(%rip), %rdi     # 0x9b7b0
callq 0x21d30
movq %rax, %rdi
leaq 0x34c(%rsp), %rsi
callq 0x21d50
jmp 0x2072a
jmp 0x2072c
leaq 0x370(%rsp), %rdi
callq 0x10610
jmp 0x2073b
movq 0x428(%rsp), %rdi
movl 0x34c(%rsp), %esi
callq 0x76f50
movq %rax, 0x158(%rsp)
jmp 0x20759
movq 0x158(%rsp), %rsi
leaq 0x2e0(%rsp), %rdi
callq 0x10b20
jmp 0x20770
movl $0x0, 0x2dc(%rsp)
movslq 0x2dc(%rsp), %rax
movq %rax, 0x150(%rsp)
leaq 0x2e0(%rsp), %rdi
callq 0xfd50
movq %rax, %rcx
movq 0x150(%rsp), %rax
cmpq %rcx, %rax
jae 0x20e40
movslq 0x2dc(%rsp), %rsi
leaq 0x2e0(%rsp), %rdi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x2d8(%rsp)
movq 0x408(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x14c(%rsp)
movq 0x408(%rsp), %rdi
movl 0x34c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq %rax, %rcx
movl 0x14c(%rsp), %eax
movl (%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x20b98
movq 0x408(%rsp), %rdi
movl 0x34c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
incl %eax
movl %eax, 0x148(%rsp)
movq 0x408(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x148(%rsp), %ecx
movl %ecx, (%rax)
movl 0x2d8(%rsp), %eax
movl %eax, %esi
leaq 0x7af0a(%rip), %rdi     # 0x9b770
callq 0x100e0
movq %rax, %rdi
leaq 0x34c(%rsp), %rsi
callq 0xfce0
jmp 0x2087d
movl $0x0, 0x2d4(%rsp)
movslq 0x2d4(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x420(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
callq 0xfd50
movq %rax, %rcx
movq 0x140(%rsp), %rax
cmpq %rcx, %rax
jae 0x20a02
movq 0x420(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
movslq 0x2d4(%rsp), %rsi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x2d0(%rsp)
movq 0x418(%rsp), %rdi
movl 0x2d0(%rsp), %eax
movl %eax, %esi
callq 0xfc50
cvtsi2sdl (%rax), %xmm0
movsd %xmm0, 0x128(%rsp)
movq 0x418(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movsd 0x128(%rsp), %xmm0
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x130(%rsp)
movq 0x3f8(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x5a6a6(%rip), %xmm0    # 0x7b010
addsd (%rax), %xmm0
movsd %xmm0, 0x138(%rsp)
movq 0x3f0(%rsp), %rdi
movl 0x2d0(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x130(%rsp), %xmm0
movsd 0x138(%rsp), %xmm2
movsd (%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl 0x2d4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2d4(%rsp)
jmp 0x20888
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3c8(%rsp)
movl %eax, 0x3c4(%rsp)
leaq 0x2e0(%rsp), %rdi
callq 0x10520
jmp 0x215f7
movq 0x420(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
callq 0x10a50
movl 0x2d8(%rsp), %eax
movl %eax, %esi
leaq 0x7ad60(%rip), %rdi     # 0x9b790
movq %rdi, 0x108(%rsp)
callq 0xfc50
movl $0x0, (%rax)
movq 0x410(%rsp), %rdi
movl 0x34c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x104(%rsp)
movq 0x410(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x104(%rsp), %ecx
movl %ecx, (%rax)
movq 0x410(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq 0x108(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x114(%rsp)
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x114(%rsp), %edx
movl (%rax), %ecx
addl %edx, %ecx
movl %ecx, (%rax)
movq 0x400(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0x10a70
movq %rdx, 0x118(%rsp)
movq %rax, 0x120(%rsp)
jmp 0x20aeb
movq 0x118(%rsp), %rax
movq 0x120(%rsp), %rcx
movq %rcx, 0x2c0(%rsp)
movq %rax, 0x2c8(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x10c20
xorb $-0x1, %al
testb $0x1, %al
jne 0x20b20
jmp 0x20b93
movq 0x400(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0x10a70
movq %rdx, 0xf0(%rsp)
movq %rax, 0xf8(%rsp)
jmp 0x20b48
movq 0xf0(%rsp), %rax
movq 0xf8(%rsp), %rcx
movq %rcx, 0x2b0(%rsp)
movq %rax, 0x2b8(%rsp)
leaq 0x2b0(%rsp), %rdi
movl $0x1, %esi
callq 0x10ad0
leaq 0x370(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x105b0
jmp 0x20b91
jmp 0x20b93
jmp 0x20e28
movq 0x408(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0xec(%rsp)
movq 0x408(%rsp), %rdi
movl 0x34c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq %rax, %rcx
movl 0xec(%rsp), %eax
movl (%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x20e26
movq 0x410(%rsp), %rdi
movl 0x34c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0xd8(%rsp)
movq 0x410(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0xd8(%rsp), %edx
movl (%rax), %ecx
addl %edx, %ecx
movl %ecx, (%rax)
movq 0x410(%rsp), %rdi
movl 0x34c(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0xdc(%rsp)
movl 0x2d8(%rsp), %eax
movl %eax, %esi
leaq 0x7ab3b(%rip), %rdi     # 0x9b790
callq 0xfc50
movl 0xdc(%rsp), %edx
movl (%rax), %ecx
addl %edx, %ecx
movl %ecx, (%rax)
movq 0x420(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
callq 0x10cf0
movq %rax, 0x2a0(%rsp)
movq 0x420(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
callq 0x10d20
movq %rax, 0x298(%rsp)
movq 0x2a0(%rsp), %rdi
movq 0x298(%rsp), %rsi
leaq 0x34c(%rsp), %rdx
callq 0x10c90
movq %rax, 0xe0(%rsp)
jmp 0x20cda
movq 0xe0(%rsp), %rax
movq %rax, 0x2a8(%rsp)
movq 0x420(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
callq 0x10d20
movq %rax, 0x290(%rsp)
leaq 0x2a8(%rsp), %rdi
leaq 0x290(%rsp), %rsi
callq 0x10c50
testb $0x1, %al
jne 0x20d2b
jmp 0x20d54
movl 0x2d8(%rsp), %eax
movl %eax, %esi
leaq 0x7aa35(%rip), %rdi     # 0x9b770
callq 0x100e0
movq %rax, %rdi
leaq 0x34c(%rsp), %rsi
callq 0xfce0
jmp 0x20d52
jmp 0x20d54
movq 0x400(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0x10a70
movq %rdx, 0xc8(%rsp)
movq %rax, 0xd0(%rsp)
jmp 0x20d7c
movq 0xc8(%rsp), %rax
movq 0xd0(%rsp), %rcx
movq %rcx, 0x280(%rsp)
movq %rax, 0x288(%rsp)
leaq 0x280(%rsp), %rdi
callq 0x10c20
xorb $-0x1, %al
testb $0x1, %al
jne 0x20db1
jmp 0x20e24
movq 0x400(%rsp), %rdi
movl 0x2d8(%rsp), %eax
movl %eax, %esi
callq 0x10a70
movq %rdx, 0xb8(%rsp)
movq %rax, 0xc0(%rsp)
jmp 0x20dd9
movq 0xb8(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq %rcx, 0x270(%rsp)
movq %rax, 0x278(%rsp)
leaq 0x270(%rsp), %rdi
movl $0x1, %esi
callq 0x10ad0
leaq 0x370(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x105b0
jmp 0x20e22
jmp 0x20e24
jmp 0x20e26
jmp 0x20e28
jmp 0x20e2a
movl 0x2dc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2dc(%rsp)
jmp 0x2077b
leaq 0x2e0(%rsp), %rdi
callq 0x10520
jmp 0x205d1
movq 0x400(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x428(%rsp), %rdi
callq 0x77430
movq %rax, 0xb0(%rsp)
jmp 0x20e79
movq 0xb0(%rsp), %rsi
movq 0xa8(%rsp), %rdi
xorl %edx, %edx
callq 0x21e50
jmp 0x20e92
leaq 0x7a917(%rip), %rdi     # 0x9b7b0
callq 0x21d80
subq $0x1, %rax
movl %eax, 0x26c(%rsp)
cmpl $0x0, 0x26c(%rsp)
jl 0x21494
jmp 0x20eb9
movslq 0x26c(%rsp), %rsi
leaq 0x7a8e8(%rip), %rdi     # 0x9b7b0
callq 0x21d30
movq %rax, %rdi
callq 0x21ee0
movb %al, 0xa7(%rsp)
jmp 0x20ede
movb 0xa7(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x20ef0
jmp 0x2147c
movslq 0x26c(%rsp), %rsi
leaq 0x7a8b1(%rip), %rdi     # 0x9b7b0
callq 0x21d30
movq %rax, %rdi
callq 0x21f00
movq %rax, 0x98(%rsp)
jmp 0x20f16
movq 0x98(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x268(%rsp)
movslq 0x26c(%rsp), %rsi
leaq 0x7a87a(%rip), %rdi     # 0x9b7b0
callq 0x21d30
movq %rax, %rdi
callq 0x21f10
jmp 0x20f45
movq 0x400(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0x10a70
movq %rdx, 0x88(%rsp)
movq %rax, 0x90(%rsp)
jmp 0x20f6d
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rcx
movq %rcx, 0x258(%rsp)
movq %rax, 0x260(%rsp)
leaq 0x258(%rsp), %rdi
callq 0x10c20
xorb $-0x1, %al
testb $0x1, %al
jne 0x20fa5
jmp 0x21477
movq 0x400(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0x10a70
movq %rdx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
jmp 0x20fca
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rcx
movq %rcx, 0x248(%rsp)
movq %rax, 0x250(%rsp)
leaq 0x248(%rsp), %rdi
movl $0x1, %esi
callq 0x10ad0
movl $0x0, 0x244(%rsp)
movslq 0x244(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x420(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
callq 0xfd50
movq %rax, %rcx
movq 0x70(%rsp), %rax
cmpq %rcx, %rax
jae 0x2121a
movq 0x420(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
movslq 0x244(%rsp), %rsi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x240(%rsp)
movq 0x418(%rsp), %rdi
movl 0x240(%rsp), %eax
movl %eax, %esi
callq 0xfc50
cvtsi2sdl (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x418(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movsd 0x40(%rsp), %xmm0
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0x3f8(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x59f39(%rip), %xmm0    # 0x7b010
addsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0x3f0(%rsp), %rdi
movl 0x240(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x48(%rsp), %xmm0
movsd 0x50(%rsp), %xmm2
movsd (%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl 0x240(%rsp), %eax
movl %eax, %esi
leaq 0x7a656(%rip), %rdi     # 0x9b790
callq 0xfc50
cvtsi2sdl (%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movl 0x268(%rsp), %eax
movl %eax, %esi
leaq 0x7a637(%rip), %rdi     # 0x9b790
callq 0xfc50
movsd 0x58(%rsp), %xmm0
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0x3f0(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x59e80(%rip), %xmm0    # 0x7b010
addsd (%rax), %xmm0
movsd %xmm0, 0x68(%rsp)
movq 0x3f0(%rsp), %rdi
movl 0x240(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x60(%rsp), %xmm0
movsd 0x68(%rsp), %xmm2
movsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
cmpl $0x0, 0x26c(%rsp)
jle 0x21202
movl 0x26c(%rsp), %eax
decl %eax
movslq %eax, %rsi
leaq 0x7a5c7(%rip), %rdi     # 0x9b7b0
callq 0x21d30
movq %rax, %rdi
leaq 0x240(%rsp), %rsi
callq 0x21d50
jmp 0x21200
jmp 0x21202
jmp 0x21204
movl 0x244(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x244(%rsp)
jmp 0x21004
movl $0x0, 0x23c(%rsp)
movslq 0x23c(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x268(%rsp), %eax
movl %eax, %esi
leaq 0x7a52e(%rip), %rdi     # 0x9b770
callq 0x100e0
movq %rax, %rdi
callq 0xfd50
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jae 0x2137e
movl 0x268(%rsp), %eax
movl %eax, %esi
leaq 0x7a500(%rip), %rdi     # 0x9b770
callq 0x100e0
movq %rax, %rdi
movslq 0x23c(%rsp), %rsi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x238(%rsp)
movl 0x238(%rsp), %eax
movl %eax, %esi
leaq 0x7a4f2(%rip), %rdi     # 0x9b790
callq 0xfc50
cvtsi2sdl (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0x268(%rsp), %eax
movl %eax, %esi
leaq 0x7a4d3(%rip), %rdi     # 0x9b790
callq 0xfc50
movsd 0x20(%rsp), %xmm0
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x3f0(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x59d1c(%rip), %xmm0    # 0x7b010
addsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x3f0(%rsp), %rdi
movl 0x238(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x28(%rsp), %xmm0
movsd 0x30(%rsp), %xmm2
movsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
cmpl $0x0, 0x26c(%rsp)
jle 0x21366
movl 0x26c(%rsp), %eax
decl %eax
movslq %eax, %rsi
leaq 0x7a463(%rip), %rdi     # 0x9b7b0
callq 0x21d30
movq %rax, %rdi
leaq 0x238(%rsp), %rsi
callq 0x21d50
jmp 0x21364
jmp 0x21366
jmp 0x21368
movl 0x23c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x23c(%rsp)
jmp 0x21225
movl 0x268(%rsp), %eax
movl %eax, %esi
leaq 0x7a3e2(%rip), %rdi     # 0x9b770
callq 0x100e0
movq %rax, 0x18(%rsp)
movq 0x420(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0xfd70
jmp 0x213bd
movl 0x268(%rsp), %eax
cmpl 0x43c(%rsp), %eax
je 0x21475
movq 0x3f8(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd (%rax), %xmm0
movsd 0x59c15(%rip), %xmm1    # 0x7b008
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x448(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x8(%rsp), %xmm1
movsd (%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movq 0x3f0(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd (%rax), %xmm0
movsd 0x59bc1(%rip), %xmm1    # 0x7b008
divsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x448(%rsp), %rdi
movl 0x268(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x10(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
jmp 0x21477
jmp 0x20eb9
jmp 0x2147e
movl 0x26c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x26c(%rsp)
jmp 0x20ea9
movq 0x3f0(%rsp), %rsi
movq 0x430(%rsp), %rdi
addq $0x48, %rdi
callq 0x21640
jmp 0x214af
movq 0x430(%rsp), %rdi
addq $0x18, %rdi
leaq 0x7a2ce(%rip), %rsi     # 0x9b790
callq 0x21960
jmp 0x214c9
movq 0x430(%rsp), %rdi
addq $0xc0, %rdi
callq 0x109f0
movq %rax, 0x230(%rsp)
movq 0x430(%rsp), %rdi
addq $0xc0, %rdi
callq 0x10a20
movq %rax, 0x228(%rsp)
movl $0x0, 0x224(%rsp)
movq 0x230(%rsp), %rdi
movq 0x228(%rsp), %rsi
leaq 0x224(%rsp), %rdx
callq 0x21f20
jmp 0x2152b
movq 0x430(%rsp), %rdi
addq $0xd8, %rdi
callq 0x1f400
movl %edx, 0x208(%rsp)
movq %rax, 0x200(%rsp)
movl 0x208(%rsp), %eax
movl %eax, 0x218(%rsp)
movq 0x200(%rsp), %rax
movq %rax, 0x210(%rsp)
movq 0x430(%rsp), %rdi
addq $0xd8, %rdi
callq 0x21fd0
movl %edx, 0x1e8(%rsp)
movq %rax, 0x1e0(%rsp)
movl 0x1e8(%rsp), %eax
movl %eax, 0x1f8(%rsp)
movq 0x1e0(%rsp), %rax
movq %rax, 0x1f0(%rsp)
movb $0x0, 0x1df(%rsp)
movq 0x210(%rsp), %rdi
movl 0x218(%rsp), %esi
movq 0x1f0(%rsp), %rdx
movl 0x1f8(%rsp), %ecx
leaq 0x1df(%rsp), %r8
callq 0x21f60
jmp 0x215e2
leaq 0x370(%rsp), %rdi
callq 0x10620
addq $0x458, %rsp            # imm = 0x458
retq
leaq 0x370(%rsp), %rdi
callq 0x10620
movq 0x3c8(%rsp), %rdi
callq 0x9cf0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)