// File: /workspace/github_cpp_makefile_star2_O2/GAStudyGroup[P]GPX2/src/cross/gpx/sources/GPX2Support.cpp
// Function: GPX2Support::DFS_inside(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Node*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, Node*>>>, Partition*)
pair<GPX2Structs::SearchResult, vector<string>> GPX2Support::DFS_inside(string entry, string exit, GPX2Structs::NodeMap father, Partition* partitionPtr)
{
    //DFS inside the partition
    string now;
    vector<string> alreadyVisited;
    deque<string> nextToVisit;
    vector<string> partition = partitionPtr->getNodes();
    bool notAlreadyVisited{ false };
    bool notToVisit{ false };
    bool isInPartition{ false };

    nextToVisit.push_back(entry);

    while (!nextToVisit.empty()) {

        now = nextToVisit.back();
        nextToVisit.pop_back();
        alreadyVisited.push_back(now);
        vector<Node::node> edges = father[now]->getEdges();

        for (Node::node cn : edges) {

            notAlreadyVisited = (find(alreadyVisited.begin(), alreadyVisited.end(), cn.first) == alreadyVisited.end());
            notToVisit = (find(nextToVisit.begin(), nextToVisit.end(), cn.first) == nextToVisit.end());
            isInPartition = (find(partition.begin(), partition.end(), cn.first) != partition.end());

            if (notAlreadyVisited && notToVisit && isInPartition) {
                nextToVisit.push_back(cn.first);
            }
        }
    }
    return (make_pair((alreadyVisited.back() == exit ? GPX2Structs::SearchResult::IS_CONNECTED : GPX2Structs::SearchResult::IS_NOT_CONNECTED), alreadyVisited));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %r8, %r14
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
leaq 0xd0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rsi, %rbx
movq %rdi, %rbp
movb $0x0, (%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x25e64
movq %r14, %rdi
callq 0x223a8
leaq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x12b1e
leaq 0x70(%rsp), %rdi
movq %rbx, %rsi
callq 0x25ce4
leaq 0xc0(%rsp), %rbx
leaq 0x140(%rsp), %r14
movq %rbp, 0x30(%rsp)
movq 0xa0(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0x232be
cmpq 0xa8(%rsp), %rsi
jne 0x2316a
movq 0xb8(%rsp), %rax
movq -0x8(%rax), %rsi
movl $0x200, %eax            # imm = 0x200
addq %rax, %rsi
addq $-0x20, %rsi
movq %rbx, %rdi
callq 0x5210
leaq 0x70(%rsp), %rdi
callq 0x25d0e
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x14efa
movq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x20910
movq (%rax), %rdi
callq 0x21c02
leaq 0x58(%rsp), %rdi
movq %rax, %rsi
callq 0x20a64
movq 0x58(%rsp), %rbx
movq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq 0x38(%rsp), %rbx
je 0x232a7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x209fc
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x1abd1
movq %rax, %r13
movq 0x8(%rsp), %r15
movups 0x80(%rsp), %xmm0
movups 0x90(%rsp), %xmm1
movups 0xa0(%rsp), %xmm2
movups 0xb0(%rsp), %xmm3
movaps %xmm0, 0x100(%rsp)
movaps %xmm1, 0x110(%rsp)
movaps %xmm2, 0xe0(%rsp)
movaps %xmm3, 0xf0(%rsp)
leaq 0x120(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
movq %r14, %rcx
callq 0x25d2c
movq %r14, %rdx
movq 0xa0(%rsp), %r14
movq 0x120(%rsp), %rbp
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq %rdx, %r12
callq 0x1abd1
cmpq %r15, %r13
jne 0x2328e
cmpq %r14, %rbp
jne 0x2328e
cmpq 0x48(%rsp), %rax
je 0x2328e
leaq 0x70(%rsp), %rdi
movq %r12, %rsi
callq 0x25ce4
movq %r12, %r14
movq %r12, %rdi
callq 0x56f8
addq $0x28, %rbx
movq 0x30(%rsp), %rbp
jmp 0x231bc
leaq 0x58(%rsp), %rdi
callq 0x20abe
leaq 0xc0(%rsp), %rbx
jmp 0x23136
movq %rsp, %rbx
movq 0x8(%rbx), %rdi
addq $-0x20, %rdi
movq 0x20(%rsp), %rsi
callq 0x12711
movzbl %al, %eax
xorl $0x3, %eax
movl %eax, (%rbp)
movq %rbp, %rdi
addq $0x8, %rdi
movq %rbx, %rsi
callq 0x12b1e
leaq 0x40(%rsp), %rdi
callq 0x709c
leaq 0x70(%rsp), %rdi
callq 0x25d6e
movq %rsp, %rdi
callq 0x709c
leaq 0xc0(%rsp), %rdi
callq 0x56f8
movq %rbp, %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x23339
jmp 0x23339
movq %rax, %rbx
jmp 0x23377
movq %rax, %rbx
jmp 0x2336d
jmp 0x23339
movq %rax, %rbx
jmp 0x23363
jmp 0x23344
jmp 0x23344
jmp 0x23344
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x56f8
jmp 0x23359
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x20abe
leaq 0x40(%rsp), %rdi
callq 0x709c
leaq 0x70(%rsp), %rdi
callq 0x25d6e
movq %rsp, %rdi
callq 0x709c
leaq 0xc0(%rsp), %rdi
callq 0x56f8
movq %rbx, %rdi
callq 0x5610