// File: /workspace/github_cpp_makefile_star2_O3/ekg[P]sgd2/src/sgd2.hpp
// Function: sgd2::maxmin_bfs_unweighted(std::vector<std::vector<unsigned long, std::allocator<unsigned long>>, std::allocator<std::vector<unsigned long, std::allocator<unsigned long>>>> const&, unsigned long, std::vector<unsigned long, std::allocator<unsigned long>>&, std::vector<unsigned long, std::allocator<unsigned long>>&)
void maxmin_bfs_unweighted(const std::vector<std::vector<uint64_t>>& graph, const uint64_t p, std::vector<uint64_t>& mins, std::vector<uint64_t>& argmins)
{
    uint64_t n = graph.size();
    std::queue<uint64_t> q;
    std::vector<uint64_t> d(n, -1);

    q.push(p);
    d[p] = 0;
    while (!q.empty())
    {
        uint64_t current = q.front();
        q.pop();
        for (uint64_t next : graph[current])
        {
            if (d[next] == -1)
            {
                q.push(next);
                d[next] = d[current] + 1;
                if (d[next] < mins[next])
                {
                    mins[next] = d[next];
                    argmins[next] = p;
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rsi, -0x40(%rbp)
movq 0x8(%rdi), %rax
movq %rdi, -0xb8(%rbp)
subq (%rdi), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r13
xorps %xmm0, %xmm0
leaq -0xb0(%rbp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x8802
leaq -0x38(%rbp), %rdx
movq $-0x1, (%rdx)
leaq -0x58(%rbp), %rdi
leaq -0x29(%rbp), %rcx
movq %r13, %rsi
callq 0x7508
movq -0x80(%rbp), %rcx
movq -0x70(%rbp), %rax
addq $-0x8, %rax
cmpq %rax, %rcx
je 0x43ba
movq %r12, (%rcx)
addq $0x8, %rcx
movq %rcx, -0x80(%rbp)
jmp 0x43d2
leaq -0xb0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x898a
movq -0x40(%rbp), %r12
movq -0x80(%rbp), %rcx
movq -0x58(%rbp), %rdi
movq $0x0, (%rdi,%r12,8)
movq -0xa0(%rbp), %rax
cmpq %rax, %rcx
je 0x4505
movq (%rax), %r15
movq -0x90(%rbp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x4407
addq $0x8, %rax
jmp 0x4443
movq -0x98(%rbp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x2170
movq -0x88(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x88(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x98(%rbp)
leaq 0x200(%rax), %rcx
movq %rcx, -0x90(%rbp)
movq %rax, -0xa0(%rbp)
movq -0xb8(%rbp), %rcx
movq (%rcx), %rcx
leaq (%r15,%r15,2), %rdx
movq (%rcx,%rdx,8), %r12
movq 0x8(%rcx,%rdx,8), %r13
cmpq %r13, %r12
je 0x44f2
movq -0x58(%rbp), %rax
movq (%r12), %rcx
movq %rcx, -0x38(%rbp)
cmpq $-0x1, (%rax,%rcx,8)
jne 0x44e2
movq -0x80(%rbp), %rdx
movq -0x70(%rbp), %rsi
addq $-0x8, %rsi
cmpq %rsi, %rdx
je 0x449b
movq %rcx, (%rdx)
addq $0x8, %rdx
movq %rdx, -0x80(%rbp)
jmp 0x44af
leaq -0xb0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x898a
movq -0x58(%rbp), %rax
movq (%rax,%r15,8), %rcx
incq %rcx
movq -0x38(%rbp), %rdx
movq %rcx, (%rax,%rdx,8)
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq (%r14), %rsi
cmpq (%rsi,%rcx,8), %rdx
jae 0x44e2
movq %rdx, (%rsi,%rcx,8)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rdx
movq (%rbx), %rsi
movq %rcx, (%rsi,%rdx,8)
addq $0x8, %r12
cmpq %r13, %r12
jne 0x446e
movq -0xa0(%rbp), %rax
cmpq %rax, -0x80(%rbp)
jne 0x43ee
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x4511
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x2170
leaq -0xb0(%rbp), %rdi
callq 0x7dae
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4536
movq %rax, %rbx
jmp 0x454e
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x454e
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x2170
leaq -0xb0(%rbp), %rdi
callq 0x7dae
movq %rbx, %rdi
callq 0x2230