// File: /workspace/github_cpp_makefile_star2_O1/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, 0x6096(%rip)      # 0x9188
jle 0x312d
leaq -0x70(%rbp), %r14
leaq -0x2c(%rbp), %r15
movq -0x68(%rbp), %rsi
cmpq -0x60(%rbp), %rsi
je 0x3112
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x68(%rbp)
jmp 0x311d
movq %r14, %rdi
movq %r15, %rdx
callq 0x3dbe
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
cmpl 0x605d(%rip), %eax      # 0x9188
jl 0x30fc
movl $0x1, -0x2c(%rbp)
cmpl $0x0, 0x6051(%rip)      # 0x918c
jle 0x317b
xorl %r12d, %r12d
leaq -0x50(%rbp), %r14
leaq -0x2c(%rbp), %r15
movq -0x48(%rbp), %rsi
cmpq -0x40(%rbp), %rsi
je 0x3161
movl -0x2c(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x316c
movq %r14, %rdi
movq %r15, %rdx
callq 0x3dbe
shll -0x2c(%rbp)
incl %r12d
cmpl 0x6013(%rip), %r12d     # 0x918c
jl 0x3148
movq -0x70(%rbp), %rax
movq -0x68(%rbp), %rcx
cmpq %rax, %rcx
je 0x3248
xorl %r12d, %r12d
leaq -0x90(%rbp), %r14
leaq -0x74(%rbp), %r15
movq -0x50(%rbp), %rax
cmpq %rax, -0x48(%rbp)
je 0x31f4
xorl %r13d, %r13d
movq -0x70(%rbp), %rcx
movl (%rax,%r13,4), %eax
xorl (%rcx,%r12,4), %eax
movl %eax, -0x74(%rbp)
movq -0x88(%rbp), %rsi
cmpq -0x80(%rbp), %rsi
je 0x31d2
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x88(%rbp)
jmp 0x31dd
movq %r14, %rdi
movq %r15, %rdx
callq 0x4312
incq %r13
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
ja 0x31a7
leaq (,%r12,4), %rsi
addq -0x70(%rbp), %rsi
movq %rbx, %rdi
callq 0x3b44
movq %rax, %rdi
movq %r14, %rsi
callq 0x3a6c
movq -0x90(%rbp), %rax
cmpq %rax, -0x88(%rbp)
je 0x322a
movq %rax, -0x88(%rbp)
incq %r12
movq -0x70(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
ja 0x319a
cmpq %rax, %rcx
je 0x3251
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
cmpq %rax, -0x48(%rbp)
je 0x325f
movq %rax, -0x48(%rbp)
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x3270
callq 0x2180
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x327e
callq 0x2180
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x328c
callq 0x2180
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x32a1
jmp 0x32a1
jmp 0x32a1
movq %rax, %rbx
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x32b5
callq 0x2180
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x32c3
callq 0x2180
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x32d1
callq 0x2180
movq %rbx, %rdi
callq 0x2280