// File: /workspace/github_cpp_makefile_star2_O3/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, 0x68(%rsp)
movq %rsi, %rbx
movq %rdi, 0x70(%rsp)
leaq 0x30(%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 0x2fae6
movq %r14, %rdi
callq 0x2a8d0
leaq 0x88(%rsp), %rdi
movq %rax, %rsi
callq 0x17d42
leaq 0xa0(%rsp), %rdi
movq %rbx, %rsi
callq 0x2f9ea
movq 0xd0(%rsp), %rsi
cmpq 0xb0(%rsp), %rsi
je 0x2bbf3
leaq 0x50(%rsp), %r15
leaq 0x20(%rsp), %rbx
leaq 0xf8(%rsp), %r14
leaq 0x40(%rsp), %r13
cmpq 0xd8(%rsp), %rsi
jne 0x2ba47
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 0x2fa28
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x1aa0a
movq 0x78(%rsp), %rdi
movq %rbx, %rsi
callq 0x28dba
movq (%rax), %rdi
callq 0x29f78
movq %r14, %rdi
movq %rax, %rsi
callq 0x28efa
movq 0xf8(%rsp), %rbp
movq 0x100(%rsp), %rax
movq %rax, 0x80(%rsp)
cmpq %rax, %rbp
je 0x2bbc8
movq %r15, 0x40(%rsp)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x82fa
movsd 0x20(%rbp), %xmm0
movsd %xmm0, 0x60(%rsp)
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x219d3
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 0x300dc
movq %r13, %rdx
movq 0xd0(%rsp), %r13
movq 0x158(%rsp), %r15
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq %rdx, %rbx
callq 0x219d3
cmpq %r14, %r12
jne 0x2bb97
cmpq %r13, %r15
jne 0x2bb97
cmpq 0x90(%rsp), %rax
je 0x2bb97
leaq 0xa0(%rsp), %rdi
movq %rbx, %rsi
callq 0x2f9ea
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %r15
cmpq %r15, %rdi
je 0x2bbb3
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x53b0
addq $0x28, %rbp
cmpq 0x80(%rsp), %rbp
movq %rbx, %r13
jne 0x2baac
leaq 0xf8(%rsp), %r14
movq %r14, %rdi
callq 0x28f94
movq 0xd0(%rsp), %rsi
cmpq 0xb0(%rsp), %rsi
leaq 0x20(%rsp), %rbx
jne 0x2ba29
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rdx
movl $0x3, %ebx
movq 0x68(%rsp), %rcx
cmpq 0x8(%rcx), %rdx
jne 0x2bc26
testq %rdx, %rdx
je 0x2bc21
movq (%rcx), %rsi
movq -0x20(%rax), %rdi
callq 0x53d0
testl %eax, %eax
jne 0x2bc26
movl $0x2, %ebx
movq 0x70(%rsp), %rax
movl %ebx, (%rax)
movq %rax, %rbx
leaq 0x8(%rax), %rdi
movq %rsp, %rsi
callq 0x17d42
leaq 0x88(%rsp), %rdi
callq 0x8206
leaq 0xa0(%rsp), %rdi
callq 0x2fa58
movq %rsp, %rdi
callq 0x8206
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2bc7a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53b0
movq %rbx, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2bc9f
jmp 0x2bc9f
movq %rax, %r14
jmp 0x2bcf8
movq %rax, %r14
jmp 0x2bceb
jmp 0x2bc9f
movq %rax, %r14
jmp 0x2bcde
jmp 0x2bcb2
jmp 0x2bca8
movq %rax, %r14
jmp 0x2bcba
movq %rax, %r14
jmp 0x2bcd1
movq %rax, %r14
leaq 0x50(%rsp), %r15
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x2bcd1
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x53b0
leaq 0xf8(%rsp), %rdi
callq 0x28f94
leaq 0x88(%rsp), %rdi
callq 0x8206
leaq 0xa0(%rsp), %rdi
callq 0x2fa58
movq %rsp, %rdi
callq 0x8206
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2bd1c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53b0
movq %r14, %rdi
callq 0x5660