// File: /workspace/github_cpp_makefile_star2_O3/robertomaldonado[P]HypercubeTopologyRouting/links.cpp
// Function: create_map(std::map<int, std::vector<int, std::allocator<int>>, std::less<int>, std::allocator<std::pair<int const, std::vector<int, std::allocator<int>>>>>&)
void create_map(  map<int, vector<int> > &nodes_map){

    vector<int> vector_nodes;
    vector<int> x_ors;
    vector<int> tmp_neighbors;

    //Initialize the vector for nodes
    for(int i=0; i < total_nodes; i++)
        vector_nodes.push_back(i);
    //Initialize the bits to Xor against
    int last_bit = 1;
    for(int i=0; i < bits_for_node; i++){
        x_ors.push_back(last_bit);
        last_bit = last_bit << 1;
    }
    //For each node, get the neighbors
    for(int j=0; j < vector_nodes.size(); j++){
        //Generate the neighbors
        for(int i=0; i < x_ors.size(); i++)
            tmp_neighbors.push_back( vector_nodes[j]^x_ors[i] );
        //Add node and neigborg to map
        nodes_map[ vector_nodes[j] ] = tmp_neighbors;
        tmp_neighbors.clear();
    }
    vector_nodes.clear();
    x_ors.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
xorl %eax, %eax
movq %rax, -0x60(%rbp)
movq %rax, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movq %rax, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x0, 0x51af(%rip)      # 0x8188
jle 0x3014
leaq -0x70(%rbp), %r14
leaq -0x2c(%rbp), %r15
movq -0x68(%rbp), %rsi
cmpq -0x60(%rbp), %rsi
je 0x2ff9
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x68(%rbp)
jmp 0x3004
movq %r14, %rdi
movq %r15, %rdx
callq 0x3cb4
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
cmpl 0x5176(%rip), %eax      # 0x8188
jl 0x2fe3
movl $0x1, -0x2c(%rbp)
cmpl $0x0, 0x516a(%rip)      # 0x818c
jle 0x3069
xorl %r12d, %r12d
movl $0x1, %eax
leaq -0x50(%rbp), %r14
leaq -0x2c(%rbp), %r15
movq -0x48(%rbp), %rsi
cmpq -0x40(%rbp), %rsi
je 0x304a
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x3055
movq %r14, %rdi
movq %r15, %rdx
callq 0x3cb4
movl -0x2c(%rbp), %eax
addl %eax, %eax
movl %eax, -0x2c(%rbp)
incl %r12d
cmpl 0x5125(%rip), %r12d     # 0x818c
jl 0x3034
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rax
cmpq %rdx, %rax
je 0x3138
xorl %r12d, %r12d
leaq -0x90(%rbp), %r14
leaq -0x74(%rbp), %r15
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
cmpq %rax, %rcx
je 0x30ec
xorl %r13d, %r13d
movq -0x70(%rbp), %rsi
movl (%rax,%r13,4), %edx
xorl (%rsi,%r12,4), %edx
movl %edx, -0x74(%rbp)
movq -0x88(%rbp), %rsi
cmpq -0x80(%rbp), %rsi
je 0x30c3
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x88(%rbp)
jmp 0x30d6
movq %r14, %rdi
movq %r15, %rdx
callq 0x41fc
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
incq %r13
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r13, %rdx
ja 0x3098
movq -0x70(%rbp), %rdx
leaq (%rdx,%r12,4), %rsi
movq %rbx, %rdi
callq 0x3a24
movq %rax, %rdi
movq %r14, %rsi
callq 0x393e
movq -0x90(%rbp), %rax
cmpq %rax, -0x88(%rbp)
je 0x311a
movq %rax, -0x88(%rbp)
incq %r12
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rax
movq %rax, %rcx
subq %rdx, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
ja 0x3088
cmpq %rdx, %rax
je 0x3141
movq %rdx, -0x68(%rbp)
movq -0x50(%rbp), %rdi
cmpq %rdi, -0x48(%rbp)
je 0x314f
movq %rdi, -0x48(%rbp)
movq -0x90(%rbp), %rax
testq %rax, %rax
je 0x3167
movq %rax, %rdi
callq 0x2180
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x3171
callq 0x2180
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x317f
callq 0x2180
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3194
jmp 0x3194
jmp 0x3194
movq %rax, %rbx
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x31a8
callq 0x2180
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x31b6
callq 0x2180
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x31c4
callq 0x2180
movq %rbx, %rdi
callq 0x2280