// File: ldionne[P]hawick_circuits/boost/graph/hawick_circuits.hpp
// Function: boost::hawick_circuits_detail::hawick_circuits_from<boost::directed_graph<boost::no_property, boost::no_property, boost::no_property>, cycle_printer<std::ostream>, boost::adj_list_vertex_property_map<boost::adjacency_list<boost::listS, boost::listS, boost::bidirectionalS, boost::property<boost::vertex_index_t, unsigned int, boost::no_property>, boost::property<boost::edge_index_t, unsigned int, boost::no_property>, boost::no_property, boost::listS>, unsigned int, unsigned int const&, boost::vertex_index_t>, std::vector<void*, std::allocator<void*>>, std::vector<std::vector<void*, std::allocator<void*>>, std::allocator<std::vector<void*, std::allocator<void*>>>>, boost::hawick_circuits_detail::get_all_adjacent_vertices>::circuit(void*, void*)
bool circuit(Vertex start, Vertex v) {
        bool found_circuit = false;
        stack_.push_back(v);
        block(v);

        // Cache some values that are used more than once in the function.
        VertexIndex const index_of_start = index_of(start);
        AdjacentVertices const adj_vertices = GetAdjacentVertices()(v, graph_);
        AdjacencyIterator const w_end = boost::end(adj_vertices);

        for (AdjacencyIterator w_it = boost::begin(adj_vertices);
             w_it != w_end;
             ++w_it)
        {
            Vertex const w = *w_it;
            // Since we're only looking in the subgraph induced by `start`
            // and the vertices with an index higher than `start`, we skip
            // any vertex that does not satisfy that.
            if (index_of(w) < index_of_start)
                continue;

            // If the last vertex is equal to `start`, we have a circuit.
            else if (w == start) {
                // const_cast to ensure the visitor does not modify the stack
                visitor_.cycle(const_cast<Stack const&>(stack_), graph_);
                found_circuit = true;
            }

            // If `w` is not blocked, we continue searching further down the
            // same path for a cycle with `w` in it.
            else if (!is_blocked(w) && circuit(start, w))
                found_circuit = true;
        }

        if (found_circuit)
            unblock(v);
        else
            for (AdjacencyIterator w_it = boost::begin(adj_vertices);
                 w_it != w_end;
                 ++w_it)
            {
                Vertex const w = *w_it;
                // Like above, we skip vertices that are not in the subgraph
                // we're considering.
                if (index_of(w) < index_of_start)
                    continue;

                // If `v` is not closed to `w`, we make it so.
                if (!is_closed_to(w, v))
                    close_to(w, v);
            }

        BOOST_ASSERT(v == stack_.back());
        stack_.pop_back();
        return found_circuit;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movb $0x0, -0x19(%rbp)
movq 0x18(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0xc360
movq -0xc0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc3d0
movq -0xc0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc410
movq %rax, %rcx
movq -0xc0(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq (%rax), %rcx
leaq -0x58(%rbp), %rdi
leaq -0x59(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0xc440
leaq -0x78(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xc490
leaq -0x90(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xc4c0
leaq -0x90(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xc4f0
testb $0x1, %al
jne 0xc18b
jmp 0xc236
leaq -0x90(%rbp), %rdi
callq 0xc530
movq -0xc0(%rbp), %rdi
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rsi
callq 0xc410
movl (%rax), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jae 0xc1bd
jmp 0xc225
movq -0x98(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0xc1e7
movq -0xc0(%rbp), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rax), %rsi
movq (%rax), %rdx
callq 0xc560
movb $0x1, -0x19(%rbp)
jmp 0xc221
movq -0xc0(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0xb920
testb $0x1, %al
jne 0xc21f
movq -0xc0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x98(%rbp), %rdx
callq 0xc0e0
testb $0x1, %al
jne 0xc21b
jmp 0xc21f
movb $0x1, -0x19(%rbp)
jmp 0xc221
jmp 0xc223
jmp 0xc225
leaq -0x90(%rbp), %rdi
callq 0xc670
jmp 0xc172
testb $0x1, -0x19(%rbp)
je 0xc251
movq -0xc0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc6a0
jmp 0xc2f0
leaq -0xb0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xc4c0
leaq -0xb0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xc4f0
testb $0x1, %al
jne 0xc277
jmp 0xc2ee
leaq -0xb0(%rbp), %rdi
callq 0xc530
movq -0xc0(%rbp), %rdi
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rsi
callq 0xc410
movl (%rax), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jae 0xc2a9
jmp 0xc2dd
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xc790
testb $0x1, %al
jne 0xc2db
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xc7e0
jmp 0xc2dd
leaq -0xb0(%rbp), %rdi
callq 0xc670
jmp 0xc261
jmp 0xc2f0
movq -0xc0(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x18(%rax), %rdi
callq 0xc870
movq %rax, %rcx
movq -0xc8(%rbp), %rax
cmpq (%rcx), %rax
jne 0xc31c
jmp 0xc33b
leaq 0x36d3(%rip), %rdi      # 0xf9f6
leaq 0x2fca(%rip), %rsi      # 0xf2f4
movl $0x108, %edx            # imm = 0x108
leaq 0x36d3(%rip), %rcx      # 0xfa09
callq 0x3150
movq -0xc0(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xc8b0
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)