// File: /workspace/github_cpp_makefile_star2_O1/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 $0x178, %rsp            # imm = 0x178
movq %r8, %r14
movq %rcx, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rsi, %rbx
movq %rdi, 0x20(%rsp)
leaq 0x38(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0xa0(%rsp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x2f88c
movq %r14, %rdi
callq 0x2a6bc
leaq 0x88(%rsp), %rdi
movq %rax, %rsi
callq 0x17d56
leaq 0xa0(%rsp), %rdi
movq %rbx, %rsi
callq 0x2f798
movq 0xd0(%rsp), %rsi
cmpq 0xb0(%rsp), %rsi
je 0x2b9dc
leaq 0x58(%rsp), %r15
leaq 0x28(%rsp), %rbx
leaq 0xf8(%rsp), %r14
leaq 0x48(%rsp), %r13
cmpq 0xd8(%rsp), %rsi
jne 0x2b830
movq 0xe8(%rsp), %rax
movq -0x8(%rax), %rsi
movl $0x200, %eax            # imm = 0x200
addq %rax, %rsi
addq $-0x20, %rsi
movq %rbx, %rdi
callq 0x5210
leaq 0xa0(%rsp), %rdi
callq 0x2f7d6
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x1a992
movq 0x78(%rsp), %rdi
movq %rbx, %rsi
callq 0x28bca
movq (%rax), %rdi
callq 0x29d64
movq %r14, %rdi
movq %rax, %rsi
callq 0x28d04
movq 0xf8(%rsp), %rbp
movq 0x100(%rsp), %rax
movq %rax, 0x80(%rsp)
cmpq %rax, %rbp
je 0x2b9b1
movq %r15, 0x48(%rsp)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x82cc
movsd 0x20(%rbp), %xmm0
movsd %xmm0, 0x68(%rsp)
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x218f9
movq %rax, %r12
movq 0x8(%rsp), %r14
movaps 0xb0(%rsp), %xmm0
movaps 0xc0(%rsp), %xmm1
movaps 0xd0(%rsp), %xmm2
movaps 0xe0(%rsp), %xmm3
movaps %xmm0, 0x130(%rsp)
movaps %xmm1, 0x140(%rsp)
movaps %xmm2, 0x110(%rsp)
movaps %xmm3, 0x120(%rsp)
leaq 0x158(%rsp), %rdi
leaq 0x130(%rsp), %rsi
leaq 0x110(%rsp), %rdx
movq %r13, %rcx
callq 0x2fe74
movq %r13, %rdx
movq 0xd0(%rsp), %r13
movq 0x158(%rsp), %r15
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq %rdx, %rbx
callq 0x218f9
cmpq %r14, %r12
jne 0x2b980
cmpq %r13, %r15
jne 0x2b980
cmpq 0x90(%rsp), %rax
je 0x2b980
leaq 0xa0(%rsp), %rdi
movq %rbx, %rsi
callq 0x2f798
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %r15
cmpq %r15, %rdi
je 0x2b99c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x53c0
addq $0x28, %rbp
cmpq 0x80(%rsp), %rbp
movq %rbx, %r13
jne 0x2b895
leaq 0xf8(%rsp), %r14
movq %r14, %rdi
callq 0x28d9e
movq 0xd0(%rsp), %rsi
cmpq 0xb0(%rsp), %rsi
leaq 0x28(%rsp), %rbx
jne 0x2b812
movq 0x8(%rsp), %rcx
movq -0x18(%rcx), %rdx
movl $0x3, %eax
movq 0x70(%rsp), %rsi
cmpq 0x8(%rsi), %rdx
jne 0x2ba18
testq %rdx, %rdx
je 0x2ba13
movq (%rsi), %rsi
movq -0x20(%rcx), %rdi
callq 0x53e0
cmpl $0x1, %eax
movl $0x3, %eax
sbbl $0x0, %eax
jmp 0x2ba18
movl $0x2, %eax
movq 0x20(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rcx), %rdi
movq %rsp, %rsi
callq 0x17d56
leaq 0x88(%rsp), %rdi
callq 0x81e0
leaq 0xa0(%rsp), %rdi
callq 0x2f806
movq %rsp, %rdi
callq 0x81e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2ba69
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x53c0
movq 0x20(%rsp), %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2ba90
jmp 0x2ba90
movq %rax, %r14
jmp 0x2bae9
movq %rax, %r14
jmp 0x2badc
jmp 0x2ba90
movq %rax, %r14
jmp 0x2bacf
jmp 0x2baa3
jmp 0x2ba99
movq %rax, %r14
jmp 0x2baab
movq %rax, %r14
jmp 0x2bac2
movq %rax, %r14
leaq 0x58(%rsp), %r15
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x2bac2
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0xf8(%rsp), %rdi
callq 0x28d9e
leaq 0x88(%rsp), %rdi
callq 0x81e0
leaq 0xa0(%rsp), %rdi
callq 0x2f806
movq %rsp, %rdi
callq 0x81e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2bb0d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x53c0
movq %r14, %rdi
callq 0x5670