// File: /workspace/github_cpp_makefile_star2_O2/fjamour[P]icentral/src/graph_t.cc
// Function: graph_t::get_shortest_path(unsigned int, unsigned int, std::vector<unsigned int, std::allocator<unsigned int>>&)
void graph_t::get_shortest_path(
        node_id_t src,
        node_id_t dst,
        vector<node_id_t>& out_path)
{
    //do a BFS from dst to src and store path
    vector<int>         dist_vec;
    vector<node_id_t>   parent_vec;
    dist_vec.resize(size());
    parent_vec.resize(size());
    fill(dist_vec.begin(), dist_vec.end(), -1);
    fill(parent_vec.begin(), parent_vec.end(), -1);
    
    queue<node_id_t> q;
    dist_vec[dst] = 0;
    q.push(dst);
    while(!q.empty()) {
        node_id_t node = q.front(); q.pop();
        if(node == src)
            break;
        vector<node_id_t> nbr_vec = get_nbrs(node);
        for(int i = 0; i < nbr_vec.size(); ++i) {
            node_id_t nbr_id = nbr_vec[i];
            if(dist_vec[nbr_id] == -1) {
                dist_vec[nbr_id] = dist_vec[node] + 1;
                parent_vec[nbr_id] = node;
                q.push(nbr_id);
            }
        }
    }
    //fill the output path vector:
    out_path.clear();
    node_id_t nd = src;
    while(parent_vec[nd] != -1) {
        out_path.push_back(nd);
        nd = parent_vec[nd];
    }
    out_path.push_back(nd);//insert dst
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %r14
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %r12
movl %edx, 0xc(%rsp)
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq 0x8(%r12), %rax
subq (%r12), %rax
pushq $0x18
popq %rbx
cqto
idivq %rbx
movq %rax, %rsi
callq 0xafb8
movq 0x8(%r12), %rax
subq (%r12), %rax
cqto
idivq %rbx
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x1141a
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
cmpq %rcx, %rax
je 0x19007
orl $-0x1, (%rax)
addq $0x4, %rax
jmp 0x18ff9
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq %rcx, %rax
je 0x1901f
orl $-0x1, (%rax)
addq $0x4, %rax
jmp 0x19011
leaq 0x68(%rsp), %rdi
callq 0x4a40
movq %r12, 0x60(%rsp)
movq %r14, 0x58(%rsp)
movl %r15d, %eax
movq 0x40(%rsp), %rcx
andl $0x0, (%rcx,%rax,4)
leaq 0x68(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x62da
leaq 0x68(%rsp), %r15
leaq 0x28(%rsp), %r12
leaq 0x8(%rsp), %r13
movq 0x78(%rsp), %rax
cmpq %rax, 0x98(%rsp)
je 0x190f1
movl (%rax), %r14d
movq %r15, %rdi
callq 0x650e
cmpl %ebp, %r14d
je 0x190f1
imulq $0x18, %r14, %rsi
movq 0x60(%rsp), %rax
addq (%rax), %rsi
movq %r12, %rdi
callq 0x4ba0
xorl %ebx, %ebx
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
jbe 0x190e4
movl (%rax,%rbx,4), %eax
movl %eax, 0x8(%rsp)
movq 0x40(%rsp), %rcx
cmpl $-0x1, (%rcx,%rax,4)
jne 0x190df
movl (%rcx,%r14,4), %edx
incl %edx
movl %edx, (%rcx,%rax,4)
movl 0x8(%rsp), %eax
movq 0x10(%rsp), %rcx
movl %r14d, (%rcx,%rax,4)
movq %r15, %rdi
movq %r13, %rsi
callq 0x62da
incq %rbx
jmp 0x19096
movq %r12, %rdi
callq 0x56ec
jmp 0x1905d
movq 0x58(%rsp), %rbx
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x19103
movq %rax, 0x8(%rbx)
movq 0x10(%rsp), %rax
leaq 0x28(%rsp), %r14
movl %ebp, 0x28(%rsp)
movl %ebp, %ecx
cmpl $-0x1, (%rax,%rcx,4)
je 0x19132
movq %rbx, %rdi
movq %r14, %rsi
callq 0x478c
movl 0x28(%rsp), %ecx
movq 0x10(%rsp), %rax
movl (%rax,%rcx,4), %ebp
jmp 0x1910d
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x478c
leaq 0x68(%rsp), %rdi
callq 0x5280
leaq 0x10(%rsp), %rdi
callq 0x56ec
leaq 0x40(%rsp), %rdi
callq 0x5720
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1917c
jmp 0x1917c
jmp 0x19175
movq %rax, %rbx
jmp 0x19198
jmp 0x1917c
movq %rax, %rbx
jmp 0x1918e
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x56ec
leaq 0x68(%rsp), %rdi
callq 0x5280
leaq 0x10(%rsp), %rdi
callq 0x56ec
leaq 0x40(%rsp), %rdi
callq 0x5720
movq %rbx, %rdi
callq 0x23d0