// File: GAStudyGroup[P]GPX2/src/cross/gpx/sources/GPX2Support.cpp
// Function: GPX2Support::getEntryAndExitList(Partition*, 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*>>>&, 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*>>>&)
vector<pair<string, string>> GPX2Support::getEntryAndExitList(Partition* p, GPX2Structs::NodeMap &red, GPX2Structs::NodeMap &blue)
{
    vector<pair<string, string>> entryAndExit;
    vector<string> accessVec = p->getAccessNodes();
    for (unsigned i = 0; i < accessVec.size(); i++) {
        for (unsigned j = 0; j < accessVec.size(); j++) {
            if (i != j) {
                pair<GPX2Structs::SearchResult, vector<string>> resultRed = GPX2Support::DFS_inside(accessVec[i], accessVec[j], red, p);
                pair<GPX2Structs::SearchResult, vector<string>> resultBlue = GPX2Support::DFS_inside(accessVec[i], accessVec[j], blue, p);
                if (resultRed.first == GPX2Structs::SearchResult::IS_CONNECTED && resultBlue.first == GPX2Structs::SearchResult::IS_CONNECTED) {
                    entryAndExit.push_back(make_pair(accessVec[i], accessVec[j]));
                }
            }
        }
    }

    for (auto itOut = entryAndExit.begin(); itOut != entryAndExit.end(); itOut++) {
        for (auto itIn = entryAndExit.begin(); itIn != entryAndExit.end();) {
            if (itOut != itIn) {
                if (comparePairString(*itOut, *itIn)) {
                    itIn = entryAndExit.erase(itIn);
                } else {
                    itIn++;
                }
            } else {
                itIn++;
            }
        }
    }
    return (entryAndExit);
}

// Assembly:
subq $0x258, %rsp            # imm = 0x258
movq %rdi, 0x40(%rsp)
movq %rdi, %rax
movq %rax, 0x48(%rsp)
movq %rdi, 0x250(%rsp)
movq %rsi, 0x248(%rsp)
movq %rdx, 0x240(%rsp)
movq %rcx, 0x238(%rsp)
movb $0x0, 0x237(%rsp)
callq 0x31b30
movq 0x248(%rsp), %rdi
callq 0x67e80
movq %rax, 0x50(%rsp)
jmp 0x6cdf5
movq 0x50(%rsp), %rsi
leaq 0x218(%rsp), %rdi
callq 0x305f0
jmp 0x6ce09
movl $0x0, 0x208(%rsp)
movl 0x208(%rsp), %eax
movq %rax, 0x38(%rsp)
leaq 0x218(%rsp), %rdi
callq 0x30bb0
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jae 0x6d251
movl $0x0, 0x204(%rsp)
movl 0x204(%rsp), %eax
movq %rax, 0x30(%rsp)
leaq 0x218(%rsp), %rdi
callq 0x30bb0
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jae 0x6d239
movl 0x208(%rsp), %eax
cmpl 0x204(%rsp), %eax
je 0x6d221
movl 0x208(%rsp), %eax
movl %eax, %esi
leaq 0x218(%rsp), %rdi
callq 0x49910
movq %rax, %rsi
leaq 0x1c0(%rsp), %rdi
callq 0x6200
jmp 0x6ceaf
movl 0x204(%rsp), %eax
movl %eax, %esi
leaq 0x218(%rsp), %rdi
callq 0x49910
movq %rax, %rsi
leaq 0x1a0(%rsp), %rdi
callq 0x6200
jmp 0x6ced7
movq 0x240(%rsp), %rsi
leaq 0x170(%rsp), %rdi
callq 0x614a0
jmp 0x6ceee
movq 0x248(%rsp), %r8
leaq 0x1e0(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
leaq 0x1a0(%rsp), %rdx
leaq 0x170(%rsp), %rcx
callq 0x6b050
jmp 0x6cf1d
leaq 0x170(%rsp), %rdi
callq 0x60b90
leaq 0x1a0(%rsp), %rdi
callq 0x6988
leaq 0x1c0(%rsp), %rdi
callq 0x6988
movl 0x208(%rsp), %eax
movl %eax, %esi
leaq 0x218(%rsp), %rdi
callq 0x49910
movq %rax, %rsi
leaq 0x130(%rsp), %rdi
callq 0x6200
jmp 0x6cf6c
movl 0x204(%rsp), %eax
movl %eax, %esi
leaq 0x218(%rsp), %rdi
callq 0x49910
movq %rax, %rsi
leaq 0x110(%rsp), %rdi
callq 0x6200
jmp 0x6cf94
movq 0x238(%rsp), %rsi
leaq 0xe0(%rsp), %rdi
callq 0x614a0
jmp 0x6cfab
movq 0x248(%rsp), %r8
leaq 0x150(%rsp), %rdi
leaq 0x130(%rsp), %rsi
leaq 0x110(%rsp), %rdx
leaq 0xe0(%rsp), %rcx
callq 0x6b050
jmp 0x6cfda
leaq 0xe0(%rsp), %rdi
callq 0x60b90
leaq 0x110(%rsp), %rdi
callq 0x6988
leaq 0x130(%rsp), %rdi
callq 0x6988
cmpl $0x2, 0x1e0(%rsp)
jne 0x6d1e6
cmpl $0x2, 0x150(%rsp)
jne 0x6d1e6
movl 0x208(%rsp), %eax
movl %eax, %esi
leaq 0x218(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x49910
movq 0x20(%rsp), %rdi
movq %rax, 0x28(%rsp)
movl 0x204(%rsp), %eax
movl %eax, %esi
callq 0x49910
movq 0x28(%rsp), %rsi
movq %rax, %rdx
leaq 0xa0(%rsp), %rdi
callq 0x70a10
jmp 0x6d067
movq 0x40(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x38dc0
jmp 0x6d07b
leaq 0xa0(%rsp), %rdi
callq 0x31d30
jmp 0x6d1e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0x6d401
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0x6d3db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0x6d119
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0x6d10c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
leaq 0x170(%rsp), %rdi
callq 0x60b90
leaq 0x1a0(%rsp), %rdi
callq 0x6988
leaq 0x1c0(%rsp), %rdi
callq 0x6988
jmp 0x6d3db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0x6d20f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0x6d19e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0x6d191
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x60b90
leaq 0x110(%rsp), %rdi
callq 0x6988
leaq 0x130(%rsp), %rdi
callq 0x6988
jmp 0x6d20f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
jmp 0x6d202
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x210(%rsp)
movl %eax, 0x20c(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x31d30
jmp 0x6d202
leaq 0x150(%rsp), %rdi
callq 0x556d0
leaq 0x1e0(%rsp), %rdi
callq 0x556d0
jmp 0x6d221
leaq 0x150(%rsp), %rdi
callq 0x556d0
leaq 0x1e0(%rsp), %rdi
callq 0x556d0
jmp 0x6d3db
jmp 0x6d223
movl 0x204(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x204(%rsp)
jmp 0x6ce49
jmp 0x6d23b
movl 0x208(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x208(%rsp)
jmp 0x6ce14
movq 0x40(%rsp), %rdi
callq 0x392b0
movq %rax, 0x98(%rsp)
movq 0x40(%rsp), %rdi
callq 0x390a0
movq %rax, 0x90(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x61460
testb $0x1, %al
jne 0x6d293
jmp 0x6d3ba
movq 0x40(%rsp), %rdi
callq 0x392b0
movq %rax, 0x88(%rsp)
movq 0x40(%rsp), %rdi
callq 0x390a0
movq %rax, 0x80(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x61460
testb $0x1, %al
jne 0x6d2d5
jmp 0x6d39f
leaq 0x98(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x61460
testb $0x1, %al
jne 0x6d2f3
jmp 0x6d386
leaq 0x98(%rsp), %rdi
callq 0x395d0
movq %rax, 0x10(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x395d0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x6c5d0
movb %al, 0x1f(%rsp)
jmp 0x6d325
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x6d32f
jmp 0x6d370
leaq 0x70(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x70ac0
movq 0x40(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x70a50
movq %rax, 0x8(%rsp)
jmp 0x6d357
movq 0x8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x88(%rsp)
jmp 0x6d384
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
callq 0x70b00
movq %rax, 0x68(%rsp)
jmp 0x6d39a
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
callq 0x70b00
movq %rax, 0x60(%rsp)
jmp 0x6d2a5
jmp 0x6d3a1
leaq 0x98(%rsp), %rdi
xorl %esi, %esi
callq 0x70b00
movq %rax, 0x58(%rsp)
jmp 0x6d263
movb $0x1, 0x237(%rsp)
leaq 0x218(%rsp), %rdi
callq 0xa2c0
testb $0x1, 0x237(%rsp)
jne 0x6d3f4
jmp 0x6d3ea
leaq 0x218(%rsp), %rdi
callq 0xa2c0
jmp 0x6d401
movq 0x40(%rsp), %rdi
callq 0x31b40
movq 0x48(%rsp), %rax
addq $0x258, %rsp            # imm = 0x258
retq
movq 0x40(%rsp), %rdi
callq 0x31b40
movq 0x210(%rsp), %rdi
callq 0x6850
nopl (%rax,%rax)