// File: fjamour[P]icentral/src/qube.cc
// Function: muc_t::compute_bc(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>>>&, int)
void muc_t::compute_bc(tr1::unordered_map<node_id_t, double>& bc_map,
        int max_iter)
{

    //bc_map will have for each vertex in the muc it's betweenness centrality
    //init bc of all nodes to zero
    bc_map.clear();
    if(!valid)
        return;
    
    muc_fast_subgraph.fill_graph(muc_subgraph);
    tmp_conn_vertex_map.clear();
    tmp_subgraph_map.clear();
    for(conn_vert_map_t::iterator it = conn_vertex_map.begin();
            it != conn_vertex_map.end();
            ++it) {
        node_id_t new_v = muc_fast_subgraph.outin_label_map[it->first];
        tmp_conn_vertex_map.insert(make_pair(new_v, it->second));
    }
    for(subgraph_map_t::iterator it = subgraph_map.begin();
            it != subgraph_map.end();
            ++it) {
        node_id_t new_v = muc_fast_subgraph.outin_label_map[it->first];
        tmp_subgraph_map.insert(make_pair(new_v, it->second));
    }
 
    
    for(graph_hash_t::nodes_map_t::iterator
                        it =  muc_subgraph.nodes_map.begin();
                        it != muc_subgraph.nodes_map.end();
                        ++it) {
        bc_map.insert(make_pair(it->first, 0));
    }
    

    //do BFS's from the nodes in the muc
    if(max_iter == -1)
        max_iter = muc_fast_subgraph.nodes_vec.size();
    else
        max_iter = min(max_iter, (int)muc_fast_subgraph.nodes_vec.size());
    for(int i = 0; i < max_iter; ++i) {
        node_id_t s = i;
        
#ifdef USE_OPTIMIZED_BRANDES_QUBE
        stack<node_id_t>                    S;
        vector<vector<node_id_t> >&         P = muc_fast_subgraph.P; 
        vector<int>&                        path_cnt_map = muc_fast_subgraph.path_cnt_vec;
        vector<int>&                        dist_map = muc_fast_subgraph.dist_vec;
        vector<double>&                     pair_dep_map = muc_fast_subgraph.pair_dep_vec;
        vector<double>&                     sigma_t_map = muc_fast_subgraph.sigma_t_map; 
        queue<node_id_t>&                   Q = muc_fast_subgraph.Q;
        muc_fast_subgraph.init_maps();
#else
        stack<node_id_t>                   S;
        vector<vector<node_id_t> >         P;
        vector<int>                        path_cnt_map;
        vector<int>                        dist_map;
        vector<double>                     pair_dep_map;
        vector<double>                     sigma_t_map;
        queue<node_id_t>                   Q;
        int N = muc_fast_subgraph.size();
        fill_vec<vector<node_id_t> >(P, N, vector<node_id_t>());
        fill_vec<int>(path_cnt_map, N, 0);
        fill_vec<int>(dist_map, N, -1);
        fill_vec<double>(pair_dep_map, N, 0);
        fill_vec<double>(sigma_t_map, N, 0);
#endif
        
        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(v_i);
            for(int i = 0; i < muc_fast_subgraph.nodes_vec[v_i].size(); ++i) {
                node_id_t v_n = muc_fast_subgraph.nodes_vec[v_i][i];
                if(dist_map[v_n] < 0) {
                    Q.push(v_n);
                    dist_map[v_n] = dist_map[v_i] + 1;
                }
                if(dist_map[v_n] == dist_map[v_i] + 1) {
                    path_cnt_map[v_n] = path_cnt_map[v_n] + path_cnt_map[v_i];
                    P[v_n].push_back(v_i);
                }
            }
        }
        while(!S.empty()) {
            node_id_t v_n = S.top(); S.pop();
            if(   tmp_conn_vertex_map.find(s) != tmp_conn_vertex_map.end()
               && tmp_conn_vertex_map.find(v_n) != tmp_conn_vertex_map.end()
               && s != v_n) {
                int VG_s, VG_n;
                VG_s = tmp_subgraph_map[s].size();
                VG_n = tmp_subgraph_map[v_n].size();
                int c_t = VG_s*VG_n;
                sigma_t_map[v_n] =  sigma_t_map[v_n] + c_t;
                
                node_id_t new_v_n = muc_fast_subgraph.inout_label_map[v_n];
                bc_map[new_v_n] = bc_map[new_v_n] + c_t;
            }
            for(int i = 0; i < P[v_n].size(); ++i) {
                node_id_t v_p = P[v_n][i];
                double sp_sn = ((double)path_cnt_map[v_p]/path_cnt_map[v_n]);
                pair_dep_map[v_p] = pair_dep_map[v_p] + sp_sn*(1+pair_dep_map[v_n]);
                if(tmp_conn_vertex_map.find(s) != tmp_conn_vertex_map.end()) {
                    sigma_t_map[v_p] = sigma_t_map[v_p] + sigma_t_map[v_n]*sp_sn;
                    
                    node_id_t new_v_p = muc_fast_subgraph.inout_label_map[v_p];
                    bc_map[new_v_p] = bc_map[new_v_p] + sigma_t_map[v_n]*sp_sn;
                }
            }
            if(s != v_n) {
                node_id_t new_v_n = muc_fast_subgraph.inout_label_map[v_n];
                bc_map[new_v_n] = bc_map[new_v_n] + pair_dep_map[v_n];
            }
            if(tmp_conn_vertex_map.find(s) != tmp_conn_vertex_map.end()) {
                int VG_s = tmp_subgraph_map[s].size();
                node_id_t new_v_n = muc_fast_subgraph.inout_label_map[v_n];
                bc_map[new_v_n] = bc_map[new_v_n] + pair_dep_map[v_n]*VG_s*2;
            }
        }
    }
    for(subgraph_map_t::iterator
        it =  tmp_subgraph_map.begin();
        it != tmp_subgraph_map.end();
        ++it) {
        vector<int> size_vec;
        it->second.conn_comp_sizes(size_vec);
        if(size_vec.size() > 1) {
            int sub = 0;
            for(int i = 0; i < size_vec.size(); ++i) {
                sub += size_vec[i]*size_vec[i];
            }
            int VG_i = it->second.size();
            
            node_id_t new_node_id = muc_fast_subgraph.inout_label_map[it->first];
            bc_map[new_node_id] = bc_map[new_node_id] + VG_i*VG_i - sub;
        }
    }
    
    for(tr1::unordered_map<node_id_t, double>::iterator
            it =  bc_map.begin();
            it != bc_map.end();
            ++it) {
        it->second = it->second/2;
    }
}

// Assembly:
subq $0xbb8, %rsp            # imm = 0xBB8
movq %rdi, 0xbb0(%rsp)
movq %rsi, 0xba8(%rsp)
movl %edx, 0xba4(%rsp)
movq 0xbb0(%rsp), %rax
movq %rax, 0x2a0(%rsp)
movq 0xba8(%rsp), %rdi
callq 0x2dce0
movq 0x2a0(%rsp), %rax
testb $0x1, 0x30c(%rax)
jne 0x68bd1
jmp 0x6a333
movq 0x2a0(%rsp), %rsi
movq %rsi, %rdi
addq $0x310, %rdi            # imm = 0x310
addq $0x60, %rsi
callq 0x77eb0
movq 0x2a0(%rsp), %rdi
addq $0x508, %rdi            # imm = 0x508
callq 0x43350
movq 0x2a0(%rsp), %rdi
addq $0x538, %rdi            # imm = 0x538
callq 0x5fbd0
movq 0x2a0(%rsp), %rdi
callq 0x6e360
movq %rax, 0xb90(%rsp)
movq %rdx, 0xb98(%rsp)
movq 0x2a0(%rsp), %rdi
callq 0x6e3c0
movq %rax, 0xb80(%rsp)
movq %rdx, 0xb88(%rsp)
leaq 0xb90(%rsp), %rdi
leaq 0xb80(%rsp), %rsi
callq 0x6e3a0
testb $0x1, %al
jne 0x68c6c
jmp 0x68da5
movq 0x2a0(%rsp), %rax
addq $0x370, %rax            # imm = 0x370
movq %rax, 0x280(%rsp)
leaq 0xb90(%rsp), %rdi
movq %rdi, 0x288(%rsp)
callq 0x32f00
movq 0x280(%rsp), %rdi
movq %rax, %rsi
callq 0xfab0
movq 0x288(%rsp), %rdi
movq %rax, %rcx
movq 0x2a0(%rsp), %rax
movl (%rcx), %ecx
movl %ecx, 0xb7c(%rsp)
addq $0x508, %rax            # imm = 0x508
movq %rax, 0x290(%rsp)
callq 0x32f00
movq %rax, %rdx
addq $0x8, %rdx
leaq 0xb38(%rsp), %rdi
movq %rdi, 0x298(%rsp)
leaq 0xb7c(%rsp), %rsi
callq 0x54750
movq 0x298(%rsp), %rsi
leaq 0xb58(%rsp), %rdi
callq 0x32ec0
jmp 0x68d11
movq 0x290(%rsp), %rsi
leaq 0xb10(%rsp), %rdi
leaq 0xb58(%rsp), %rdx
callq 0x54720
jmp 0x68d30
leaq 0xb58(%rsp), %rdi
callq 0x32f10
leaq 0xb38(%rsp), %rdi
callq 0x32f30
leaq 0xb90(%rsp), %rdi
callq 0x6e4d0
jmp 0x68c31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
jmp 0x68d93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0xb58(%rsp), %rdi
callq 0x32f10
leaq 0xb38(%rsp), %rdi
callq 0x32f30
jmp 0x6a33b
movq 0x2a0(%rsp), %rdi
addq $0x30, %rdi
callq 0x6e900
movq %rax, 0xb00(%rsp)
movq %rdx, 0xb08(%rsp)
movq 0x2a0(%rsp), %rdi
addq $0x30, %rdi
callq 0x6e960
movq %rax, 0xaf0(%rsp)
movq %rdx, 0xaf8(%rsp)
leaq 0xb00(%rsp), %rdi
leaq 0xaf0(%rsp), %rsi
callq 0x6e940
testb $0x1, %al
jne 0x68e05
jmp 0x68f3e
movq 0x2a0(%rsp), %rax
addq $0x370, %rax            # imm = 0x370
movq %rax, 0x260(%rsp)
leaq 0xb00(%rsp), %rdi
movq %rdi, 0x268(%rsp)
callq 0x6e9a0
movq 0x260(%rsp), %rdi
movq %rax, %rsi
callq 0xfab0
movq 0x268(%rsp), %rdi
movq %rax, %rcx
movq 0x2a0(%rsp), %rax
movl (%rcx), %ecx
movl %ecx, 0xaec(%rsp)
addq $0x538, %rax            # imm = 0x538
movq %rax, 0x270(%rsp)
callq 0x6e9a0
movq %rax, %rdx
addq $0x8, %rdx
leaq 0x588(%rsp), %rdi
movq %rdi, 0x278(%rsp)
leaq 0xaec(%rsp), %rsi
callq 0x6e430
movq 0x278(%rsp), %rsi
leaq 0x838(%rsp), %rdi
callq 0x6e470
jmp 0x68eaa
movq 0x270(%rsp), %rsi
leaq 0x570(%rsp), %rdi
leaq 0x838(%rsp), %rdx
callq 0x6e400
jmp 0x68ec9
leaq 0x838(%rsp), %rdi
callq 0x5feb0
leaq 0x588(%rsp), %rdi
callq 0x6e4b0
leaq 0xb00(%rsp), %rdi
callq 0x6e9b0
jmp 0x68dc6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
jmp 0x68f2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x838(%rsp), %rdi
callq 0x5feb0
leaq 0x588(%rsp), %rdi
callq 0x6e4b0
jmp 0x6a33b
movq 0x2a0(%rsp), %rdi
addq $0x60, %rdi
callq 0x2d6b0
movq %rax, 0x560(%rsp)
movq %rdx, 0x568(%rsp)
movq 0x2a0(%rsp), %rdi
addq $0x60, %rdi
callq 0x2d710
movq %rax, 0x550(%rsp)
movq %rdx, 0x558(%rsp)
leaq 0x560(%rsp), %rdi
leaq 0x550(%rsp), %rsi
callq 0x2d6f0
testb $0x1, %al
jne 0x68f9e
jmp 0x69022
movq 0xba8(%rsp), %rax
movq %rax, 0x258(%rsp)
leaq 0x560(%rsp), %rdi
callq 0x2d750
movq %rax, %rdi
movl $0x0, 0x534(%rsp)
leaq 0x534(%rsp), %rsi
callq 0x321a0
movq %rax, 0x538(%rsp)
leaq 0x540(%rsp), %rdi
leaq 0x538(%rsp), %rsi
callq 0x6e9e0
movq 0x258(%rsp), %rsi
leaq 0x518(%rsp), %rdi
leaq 0x540(%rsp), %rdx
callq 0x2d260
leaq 0x560(%rsp), %rdi
callq 0x2d760
jmp 0x68f5f
cmpl $-0x1, 0xba4(%rsp)
jne 0x69049
movq 0x2a0(%rsp), %rdi
addq $0x310, %rdi            # imm = 0x310
callq 0x1ac90
movl %eax, 0xba4(%rsp)
jmp 0x69082
movq 0x2a0(%rsp), %rdi
addq $0x310, %rdi            # imm = 0x310
callq 0x1ac90
movl %eax, 0x514(%rsp)
leaq 0xba4(%rsp), %rdi
leaq 0x514(%rsp), %rsi
callq 0x2d1a0
movl (%rax), %eax
movl %eax, 0xba4(%rsp)
movl $0x0, 0x510(%rsp)
movl 0x510(%rsp), %eax
cmpl 0xba4(%rsp), %eax
jge 0x6a00b
movl 0x510(%rsp), %eax
movl %eax, 0x50c(%rsp)
leaq 0x4b8(%rsp), %rdi
callq 0x21da0
leaq 0x4a0(%rsp), %rdi
callq 0x10030
leaq 0x488(%rsp), %rdi
callq 0xfc40
leaq 0x470(%rsp), %rdi
callq 0xfc40
leaq 0x458(%rsp), %rdi
callq 0xfa00
leaq 0x440(%rsp), %rdi
callq 0xfa00
leaq 0x3f0(%rsp), %rdi
callq 0x10580
jmp 0x6910c
movq 0x2a0(%rsp), %rdi
addq $0x310, %rdi            # imm = 0x310
callq 0x77430
movq %rax, 0x250(%rsp)
jmp 0x6912a
movq 0x250(%rsp), %rax
movl %eax, 0x3ec(%rsp)
movslq 0x3ec(%rsp), %rax
movq %rax, 0x240(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x3d0(%rsp)
movq $0x0, 0x3e0(%rsp)
leaq 0x3d0(%rsp), %rdi
movq %rdi, 0x248(%rsp)
callq 0xfcd0
movq 0x240(%rsp), %rsi
movq 0x248(%rsp), %rdx
leaq 0x4a0(%rsp), %rdi
callq 0x21900
jmp 0x69194
leaq 0x3d0(%rsp), %rdi
callq 0x10520
movslq 0x3ec(%rsp), %rsi
leaq 0x488(%rsp), %rdi
xorl %edx, %edx
callq 0x59aa0
jmp 0x691ba
movslq 0x3ec(%rsp), %rsi
leaq 0x470(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x59aa0
jmp 0x691d6
movslq 0x3ec(%rsp), %rsi
leaq 0x458(%rsp), %rdi
xorps %xmm0, %xmm0
callq 0xfbe0
jmp 0x691f0
movslq 0x3ec(%rsp), %rsi
leaq 0x440(%rsp), %rdi
xorps %xmm0, %xmm0
callq 0xfbe0
jmp 0x6920a
movl 0x50c(%rsp), %eax
movl %eax, %esi
leaq 0x488(%rsp), %rdi
callq 0xfc50
movl $0x1, (%rax)
movl 0x50c(%rsp), %eax
movl %eax, %esi
leaq 0x470(%rsp), %rdi
callq 0xfc50
movl $0x0, (%rax)
leaq 0x3f0(%rsp), %rdi
leaq 0x50c(%rsp), %rsi
callq 0x105b0
jmp 0x69259
jmp 0x6925b
leaq 0x3f0(%rsp), %rdi
callq 0x105e0
movb %al, 0x23f(%rsp)
jmp 0x69271
movb 0x23f(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x69283
jmp 0x69530
leaq 0x3f0(%rsp), %rdi
callq 0x10600
movq %rax, 0x230(%rsp)
jmp 0x6929a
movq 0x230(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x3cc(%rsp)
leaq 0x3f0(%rsp), %rdi
callq 0x10610
jmp 0x692ba
leaq 0x4b8(%rsp), %rdi
leaq 0x3cc(%rsp), %rsi
callq 0x21d50
jmp 0x692d1
movl $0x0, 0x3c8(%rsp)
movq 0x2a0(%rsp), %rdi
movslq 0x3c8(%rsp), %rax
movq %rax, 0x228(%rsp)
addq $0x310, %rdi            # imm = 0x310
movl 0x3cc(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
callq 0xfd50
movq %rax, %rcx
movq 0x228(%rsp), %rax
cmpq %rcx, %rax
jae 0x6952b
movq 0x2a0(%rsp), %rdi
addq $0x310, %rdi            # imm = 0x310
movl 0x3cc(%rsp), %eax
movl %eax, %esi
callq 0x100e0
movq %rax, %rdi
movslq 0x3c8(%rsp), %rsi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x3c4(%rsp)
movl 0x3c4(%rsp), %eax
movl %eax, %esi
leaq 0x470(%rsp), %rdi
callq 0xfc50
cmpl $0x0, (%rax)
jge 0x6942c
leaq 0x3f0(%rsp), %rdi
leaq 0x3c4(%rsp), %rsi
callq 0x105b0
jmp 0x69391
movl 0x3cc(%rsp), %eax
movl %eax, %esi
leaq 0x470(%rsp), %rdi
callq 0xfc50
movl (%rax), %eax
addl $0x1, %eax
movl %eax, 0x224(%rsp)
movl 0x3c4(%rsp), %eax
movl %eax, %esi
leaq 0x470(%rsp), %rdi
callq 0xfc50
movl 0x224(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x6942c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
jmp 0x69fb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
jmp 0x69fab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x3d0(%rsp), %rdi
callq 0x10520
jmp 0x69fab
movl 0x3c4(%rsp), %eax
movl %eax, %esi
leaq 0x470(%rsp), %rdi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x220(%rsp)
movl 0x3cc(%rsp), %eax
movl %eax, %esi
leaq 0x470(%rsp), %rdi
callq 0xfc50
movq %rax, %rcx
movl 0x220(%rsp), %eax
movl (%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x69513
movl 0x3c4(%rsp), %eax
movl %eax, %esi
leaq 0x488(%rsp), %rdi
movq %rdi, 0x210(%rsp)
callq 0xfc50
movq 0x210(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x218(%rsp)
movl 0x3cc(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movq 0x210(%rsp), %rdi
movq %rax, %rcx
movl 0x218(%rsp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, 0x21c(%rsp)
movl 0x3c4(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movl 0x21c(%rsp), %ecx
movl %ecx, (%rax)
movl 0x3c4(%rsp), %eax
movl %eax, %esi
leaq 0x4a0(%rsp), %rdi
callq 0x100e0
movq %rax, %rdi
leaq 0x3cc(%rsp), %rsi
callq 0xfce0
jmp 0x69511
jmp 0x69513
jmp 0x69515
movl 0x3c8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c8(%rsp)
jmp 0x692dc
jmp 0x6925b
jmp 0x69532
leaq 0x4b8(%rsp), %rdi
callq 0x21ee0
movb %al, 0x20f(%rsp)
jmp 0x69548
movb 0x20f(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6955a
jmp 0x69f3a
leaq 0x4b8(%rsp), %rdi
callq 0x21f00
movq %rax, 0x200(%rsp)
jmp 0x69571
movq 0x200(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x3c0(%rsp)
leaq 0x4b8(%rsp), %rdi
callq 0x21f10
jmp 0x69591
movq 0x2a0(%rsp), %rdi
addq $0x508, %rdi            # imm = 0x508
leaq 0x50c(%rsp), %rsi
callq 0x6e740
movq %rdx, 0x1f0(%rsp)
movq %rax, 0x1f8(%rsp)
jmp 0x695bf
movq 0x2a0(%rsp), %rdi
movq 0x1f0(%rsp), %rax
movq 0x1f8(%rsp), %rcx
movq %rcx, 0x3b0(%rsp)
movq %rax, 0x3b8(%rsp)
addq $0x508, %rdi            # imm = 0x508
callq 0x6e3c0
movq %rdx, 0x1e0(%rsp)
movq %rax, 0x1e8(%rsp)
jmp 0x69605
movq 0x1e0(%rsp), %rax
movq 0x1e8(%rsp), %rcx
movq %rcx, 0x3a0(%rsp)
movq %rax, 0x3a8(%rsp)
leaq 0x3b0(%rsp), %rdi
leaq 0x3a0(%rsp), %rsi
callq 0x6e3a0
movb %al, 0x1df(%rsp)
jmp 0x69643
movb 0x1df(%rsp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x1de(%rsp)
jne 0x6965d
jmp 0x6973e
movq 0x2a0(%rsp), %rdi
addq $0x508, %rdi            # imm = 0x508
leaq 0x3c0(%rsp), %rsi
callq 0x6e740
movq %rdx, 0x1c8(%rsp)
movq %rax, 0x1d0(%rsp)
jmp 0x6968b
movq 0x2a0(%rsp), %rdi
movq 0x1c8(%rsp), %rax
movq 0x1d0(%rsp), %rcx
movq %rcx, 0x390(%rsp)
movq %rax, 0x398(%rsp)
addq $0x508, %rdi            # imm = 0x508
callq 0x6e3c0
movq %rdx, 0x1b8(%rsp)
movq %rax, 0x1c0(%rsp)
jmp 0x696d1
movq 0x1b8(%rsp), %rax
movq 0x1c0(%rsp), %rcx
movq %rcx, 0x380(%rsp)
movq %rax, 0x388(%rsp)
leaq 0x390(%rsp), %rdi
leaq 0x380(%rsp), %rsi
callq 0x6e3a0
movb %al, 0x1b7(%rsp)
jmp 0x6970f
movb 0x1b7(%rsp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x1de(%rsp)
jne 0x69726
jmp 0x6973e
movl 0x50c(%rsp), %eax
cmpl 0x3c0(%rsp), %eax
setne %al
movb %al, 0x1de(%rsp)
movb 0x1de(%rsp), %al
testb $0x1, %al
jne 0x6974e
jmp 0x698f4
movq 0x2a0(%rsp), %rdi
addq $0x538, %rdi            # imm = 0x538
leaq 0x50c(%rsp), %rsi
callq 0x6e500
movq %rax, 0x1a8(%rsp)
jmp 0x69774
movq 0x1a8(%rsp), %rdi
callq 0x52790
movq %rax, 0x1a0(%rsp)
jmp 0x6978b
movq 0x2a0(%rsp), %rdi
movq 0x1a0(%rsp), %rax
movl %eax, 0x37c(%rsp)
addq $0x538, %rdi            # imm = 0x538
leaq 0x3c0(%rsp), %rsi
callq 0x6e500
movq %rax, 0x198(%rsp)
jmp 0x697c0
movq 0x198(%rsp), %rdi
callq 0x52790
movq %rax, 0x190(%rsp)
jmp 0x697d7
movq 0x190(%rsp), %rax
movl %eax, 0x378(%rsp)
movl 0x37c(%rsp), %eax
movl 0x378(%rsp), %ecx
imull %ecx, %eax
movl %eax, 0x374(%rsp)
movl 0x3c0(%rsp), %eax
movl %eax, %esi
leaq 0x440(%rsp), %rdi
movq %rdi, 0x178(%rsp)
callq 0xfa30
movq 0x178(%rsp), %rdi
movsd (%rax), %xmm0
cvtsi2sdl 0x374(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x180(%rsp)
movl 0x3c0(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x180(%rsp), %xmm0
movq 0x2a0(%rsp), %rdi
movsd %xmm0, (%rax)
addq $0x358, %rdi            # imm = 0x358
movl 0x3c0(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x370(%rsp)
movq 0xba8(%rsp), %rdi
leaq 0x370(%rsp), %rsi
callq 0x2d310
movq %rax, 0x188(%rsp)
jmp 0x6989e
movq 0x188(%rsp), %rax
movsd (%rax), %xmm0
cvtsi2sdl 0x374(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x168(%rsp)
movq 0xba8(%rsp), %rdi
leaq 0x370(%rsp), %rsi
callq 0x2d310
movq %rax, 0x170(%rsp)
jmp 0x698df
movq 0x170(%rsp), %rax
movsd 0x168(%rsp), %xmm0
movsd %xmm0, (%rax)
movl $0x0, 0x36c(%rsp)
movslq 0x36c(%rsp), %rax
movq %rax, 0x160(%rsp)
movl 0x3c0(%rsp), %eax
movl %eax, %esi
leaq 0x4a0(%rsp), %rdi
callq 0x100e0
movq %rax, %rdi
callq 0xfd50
movq %rax, %rcx
movq 0x160(%rsp), %rax
cmpq %rcx, %rax
jae 0x69ca4
movl 0x3c0(%rsp), %eax
movl %eax, %esi
leaq 0x4a0(%rsp), %rdi
callq 0x100e0
movq %rax, %rdi
movslq 0x36c(%rsp), %rsi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x368(%rsp)
movl 0x368(%rsp), %eax
movl %eax, %esi
leaq 0x488(%rsp), %rdi
movq %rdi, 0x120(%rsp)
callq 0xfc50
movq 0x120(%rsp), %rdi
cvtsi2sdl (%rax), %xmm0
movsd %xmm0, 0x128(%rsp)
movl 0x3c0(%rsp), %eax
movl %eax, %esi
callq 0xfc50
movsd 0x128(%rsp), %xmm0
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x360(%rsp)
movl 0x368(%rsp), %eax
movl %eax, %esi
leaq 0x458(%rsp), %rdi
movq %rdi, 0x140(%rsp)
callq 0xfa30
movq 0x140(%rsp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0x138(%rsp)
movsd 0x360(%rsp), %xmm0
movsd %xmm0, 0x130(%rsp)
movl 0x3c0(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x130(%rsp), %xmm0
movsd 0x138(%rsp), %xmm1
movq 0x140(%rsp), %rdi
movsd (%rax), %xmm2
movsd 0x115cc(%rip), %xmm3    # 0x7b010
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x148(%rsp)
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0x148(%rsp), %xmm0
movq 0x2a0(%rsp), %rdi
movsd %xmm0, (%rax)
addq $0x508, %rdi            # imm = 0x508
leaq 0x50c(%rsp), %rsi
callq 0x6e740
movq %rdx, 0x150(%rsp)
movq %rax, 0x158(%rsp)
jmp 0x69aa2
movq 0x2a0(%rsp), %rdi
movq 0x150(%rsp), %rax
movq 0x158(%rsp), %rcx
movq %rcx, 0x350(%rsp)
movq %rax, 0x358(%rsp)
addq $0x508, %rdi            # imm = 0x508
callq 0x6e3c0
movq %rdx, 0x110(%rsp)
movq %rax, 0x118(%rsp)
jmp 0x69ae8
movq 0x110(%rsp), %rax
movq 0x118(%rsp), %rcx
movq %rcx, 0x340(%rsp)
movq %rax, 0x348(%rsp)
leaq 0x350(%rsp), %rdi
leaq 0x340(%rsp), %rsi
callq 0x6e3a0
movb %al, 0x10f(%rsp)
jmp 0x69b26
movb 0x10f(%rsp), %al
testb $0x1, %al
jne 0x69b36
jmp 0x69c8c
movl 0x368(%rsp), %eax
movl %eax, %esi
leaq 0x440(%rsp), %rdi
movq %rdi, 0xf0(%rsp)
callq 0xfa30
movq 0xf0(%rsp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0xe8(%rsp)
movl 0x3c0(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0xe8(%rsp), %xmm1
movq 0xf0(%rsp), %rdi
movsd (%rax), %xmm0
movsd 0x360(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xf8(%rsp)
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0xfa30
movsd 0xf8(%rsp), %xmm0
movq 0x2a0(%rsp), %rdi
movsd %xmm0, (%rax)
addq $0x358, %rdi            # imm = 0x358
movl 0x368(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x33c(%rsp)
movq 0xba8(%rsp), %rdi
leaq 0x33c(%rsp), %rsi
callq 0x2d310
movq %rax, 0x100(%rsp)
jmp 0x69c06
movq 0x100(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0xd0(%rsp)
movl 0x3c0(%rsp), %eax
movl %eax, %esi
leaq 0x440(%rsp), %rdi
callq 0xfa30
movsd 0xd0(%rsp), %xmm1
movsd (%rax), %xmm0
movsd 0x360(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xd8(%rsp)
movq 0xba8(%rsp), %rdi
leaq 0x33c(%rsp), %rsi
callq 0x2d310
movq %rax, 0xe0(%rsp)
jmp 0x69c77
movq 0xe0(%rsp), %rax
movsd 0xd8(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0x69c8e
movl 0x36c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x36c(%rsp)
jmp 0x698ff
movl 0x50c(%rsp), %eax
cmpl 0x3c0(%rsp), %eax
je 0x69d76
movq 0x2a0(%rsp), %rdi
addq $0x358, %rdi            # imm = 0x358
movl 0x3c0(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x338(%rsp)
movq 0xba8(%rsp), %rdi
leaq 0x338(%rsp), %rsi
callq 0x2d310
movq %rax, 0xc8(%rsp)
jmp 0x69cfd
movq 0xc8(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0xb0(%rsp)
movl 0x3c0(%rsp), %eax
movl %eax, %esi
leaq 0x458(%rsp), %rdi
callq 0xfa30
movsd 0xb0(%rsp), %xmm0
movsd (%rax), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0xb8(%rsp)
movq 0xba8(%rsp), %rdi
leaq 0x338(%rsp), %rsi
callq 0x2d310
movq %rax, 0xc0(%rsp)
jmp 0x69d61
movq 0xc0(%rsp), %rax
movsd 0xb8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x2a0(%rsp), %rdi
addq $0x508, %rdi            # imm = 0x508
leaq 0x50c(%rsp), %rsi
callq 0x6e740
movq %rdx, 0xa0(%rsp)
movq %rax, 0xa8(%rsp)
jmp 0x69da4
movq 0x2a0(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rcx
movq %rcx, 0x328(%rsp)
movq %rax, 0x330(%rsp)
addq $0x508, %rdi            # imm = 0x508
callq 0x6e3c0
movq %rdx, 0x90(%rsp)
movq %rax, 0x98(%rsp)
jmp 0x69dea
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rcx
movq %rcx, 0x318(%rsp)
movq %rax, 0x320(%rsp)
leaq 0x328(%rsp), %rdi
leaq 0x318(%rsp), %rsi
callq 0x6e3a0
movb %al, 0x8f(%rsp)
jmp 0x69e28
movb 0x8f(%rsp), %al
testb $0x1, %al
jne 0x69e38
jmp 0x69f35
movq 0x2a0(%rsp), %rdi
addq $0x538, %rdi            # imm = 0x538
leaq 0x50c(%rsp), %rsi
callq 0x6e500
movq %rax, 0x80(%rsp)
jmp 0x69e5e
movq 0x80(%rsp), %rdi
callq 0x52790
movq %rax, 0x78(%rsp)
jmp 0x69e72
movq 0x2a0(%rsp), %rdi
movq 0x78(%rsp), %rax
movl %eax, 0x314(%rsp)
addq $0x358, %rdi            # imm = 0x358
movl 0x3c0(%rsp), %eax
movl %eax, %esi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x310(%rsp)
movq 0xba8(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x2d310
movq %rax, 0x70(%rsp)
jmp 0x69ec0
movq 0x70(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movl 0x3c0(%rsp), %eax
movl %eax, %esi
leaq 0x458(%rsp), %rdi
callq 0xfa30
movsd 0x58(%rsp), %xmm1
movsd (%rax), %xmm0
cvtsi2sdl 0x314(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0xba8(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x2d310
movq %rax, 0x68(%rsp)
jmp 0x69f26
movq 0x68(%rsp), %rax
movsd 0x60(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0x69532
leaq 0x3f0(%rsp), %rdi
callq 0x10620
leaq 0x440(%rsp), %rdi
callq 0xfa50
leaq 0x458(%rsp), %rdi
callq 0xfa50
leaq 0x470(%rsp), %rdi
callq 0xfc70
leaq 0x488(%rsp), %rdi
callq 0xfc70
leaq 0x4a0(%rsp), %rdi
callq 0x104c0
leaq 0x4b8(%rsp), %rdi
callq 0x21e40
movl 0x510(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x510(%rsp)
jmp 0x6908d
leaq 0x3f0(%rsp), %rdi
callq 0x10620
leaq 0x440(%rsp), %rdi
callq 0xfa50
leaq 0x458(%rsp), %rdi
callq 0xfa50
leaq 0x470(%rsp), %rdi
callq 0xfc70
leaq 0x488(%rsp), %rdi
callq 0xfc70
leaq 0x4a0(%rsp), %rdi
callq 0x104c0
leaq 0x4b8(%rsp), %rdi
callq 0x21e40
jmp 0x6a33b
movq 0x2a0(%rsp), %rdi
addq $0x538, %rdi            # imm = 0x538
callq 0x6e900
movq %rax, 0x300(%rsp)
movq %rdx, 0x308(%rsp)
movq 0x2a0(%rsp), %rdi
addq $0x538, %rdi            # imm = 0x538
callq 0x6e960
movq %rax, 0x2f0(%rsp)
movq %rdx, 0x2f8(%rsp)
leaq 0x300(%rsp), %rdi
leaq 0x2f0(%rsp), %rsi
callq 0x6e940
testb $0x1, %al
jne 0x6a071
jmp 0x6a292
leaq 0x2d8(%rsp), %rdi
callq 0xfc40
leaq 0x300(%rsp), %rdi
callq 0x6e9a0
movq %rax, 0x50(%rsp)
jmp 0x6a092
movq 0x50(%rsp), %rdi
addq $0x8, %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x52a50
jmp 0x6a0aa
leaq 0x2d8(%rsp), %rdi
callq 0x1eb00
cmpq $0x1, %rax
jbe 0x6a273
movl $0x0, 0x2d4(%rsp)
movl $0x0, 0x2d0(%rsp)
movslq 0x2d0(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x2d8(%rsp), %rdi
callq 0x1eb00
movq %rax, %rcx
movq 0x48(%rsp), %rax
cmpq %rcx, %rax
jae 0x6a186
movslq 0x2d0(%rsp), %rsi
leaq 0x2d8(%rsp), %rdi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x44(%rsp)
movslq 0x2d0(%rsp), %rsi
leaq 0x2d8(%rsp), %rdi
callq 0xfc50
movq %rax, %rcx
movl 0x44(%rsp), %eax
imull (%rcx), %eax
addl 0x2d4(%rsp), %eax
movl %eax, 0x2d4(%rsp)
movl 0x2d0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2d0(%rsp)
jmp 0x6a0d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x2d8(%rsp), %rdi
callq 0xfc70
jmp 0x6a33b
leaq 0x300(%rsp), %rdi
callq 0x6e9a0
movq %rax, 0x38(%rsp)
jmp 0x6a19a
movq 0x38(%rsp), %rdi
addq $0x8, %rdi
callq 0x52790
movq %rax, 0x30(%rsp)
jmp 0x6a1af
movq 0x2a0(%rsp), %rax
movq 0x30(%rsp), %rcx
movl %ecx, 0x2cc(%rsp)
addq $0x358, %rax            # imm = 0x358
movq %rax, 0x20(%rsp)
leaq 0x300(%rsp), %rdi
callq 0x6e9a0
movq %rax, 0x28(%rsp)
jmp 0x6a1e2
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0xfbc0
movl (%rax), %eax
movl %eax, 0x2c8(%rsp)
movq 0xba8(%rsp), %rdi
leaq 0x2c8(%rsp), %rsi
callq 0x2d310
movq %rax, 0x18(%rsp)
jmp 0x6a21a
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movl 0x2cc(%rsp), %eax
imull %eax, %eax
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
cvtsi2sdl 0x2d4(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0xba8(%rsp), %rdi
leaq 0x2c8(%rsp), %rsi
callq 0x2d310
movq %rax, 0x10(%rsp)
jmp 0x6a264
movq 0x10(%rsp), %rax
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x2d8(%rsp), %rdi
callq 0xfc70
leaq 0x300(%rsp), %rdi
callq 0x6e9b0
jmp 0x6a02f
movq 0xba8(%rsp), %rdi
callq 0x2d790
movq %rax, 0x2b8(%rsp)
movq %rdx, 0x2c0(%rsp)
movq 0xba8(%rsp), %rdi
callq 0x2d7f0
movq %rax, 0x2a8(%rsp)
movq %rdx, 0x2b0(%rsp)
leaq 0x2b8(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
callq 0x2d7d0
testb $0x1, %al
jne 0x6a2e7
jmp 0x6a333
leaq 0x2b8(%rsp), %rdi
callq 0x2d830
movsd 0x8(%rax), %xmm0
movsd 0x10d07(%rip), %xmm1    # 0x7b008
divsd %xmm1, %xmm0
movsd %xmm0, (%rsp)
leaq 0x2b8(%rsp), %rdi
callq 0x2d830
movsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
leaq 0x2b8(%rsp), %rdi
callq 0x2d840
jmp 0x6a2af
addq $0xbb8, %rsp            # imm = 0xBB8
retq
movq 0xb30(%rsp), %rdi
callq 0x9cf0
nopl (%rax,%rax)