// File: /workspace/github_cpp_makefile_star2_O3/yuanboli233[P]interdyck_graph_reduce/graphtest.cpp
// Function: findMatch(unsigned int, SummaryGraph&, unsigned int, std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>>&, unsigned int, unsigned int)
void findMatch(unsigned nodeID, SummaryGraph& sGraph, unsigned eid, unordered_set<unsigned>& usedNodes, unsigned origFrom, unsigned origTo){
    SummaryNode* node = sGraph.nodes[nodeID];
    if(usedNodes.find(nodeID) != usedNodes.end()){
        return;
    }
    usedNodes.insert(nodeID);
    for(vector<NodewithEID>::iterator it = node->inBlueEdgeNodes.begin(); it != node->inBlueEdgeNodes.end(); it++){
        unsigned cureid = it->edgeID;
        unsigned nextnid = it->nodeID;
        if(eid == cureid && nodeID != origTo && nextnid != origFrom){
            cout << "    match " << nodeID << " <-" << cureid << "- " << nextnid;
        }
    }
    for(vector<NodewithEID>::iterator it = node->inRedEdgeNodes.begin(); it != node->inRedEdgeNodes.end(); it++){
        unsigned nextnid = it->nodeID;
        findMatch(nextnid, sGraph, eid, usedNodes, origFrom, origTo);
    }
    for(vector<NodewithEID>::iterator it = node->outRedEdgeNodes.begin(); it != node->outRedEdgeNodes.end(); it++){
        unsigned nextnid = it->nodeID;
        findMatch(nextnid, sGraph, eid, usedNodes, origFrom, origTo);
    }

    usedNodes.erase(nodeID);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebp
movl %r8d, %r14d
movq %rcx, %r12
movl %edx, %r15d
movq %rsi, %rbx
leaq 0x4(%rsp), %rsi
movl %edi, (%rsi)
movl %edi, %eax
movq 0x70(%rbx), %rcx
movq (%rcx,%rax,8), %r13
movq %r12, %rdi
callq 0x61b6
testq %rax, %rax
jne 0x2796
movq %rbx, 0x10(%rsp)
leaq 0x30(%rsp), %rdx
movq %r12, (%rdx)
leaq 0x4(%rsp), %rsi
movq %r12, 0x18(%rsp)
movq %r12, %rdi
callq 0x6212
movq %r13, %r8
movq 0x38(%r13), %r13
movq 0x40(%r8), %rax
cmpq %rax, %r13
movq %r8, 0x8(%rsp)
je 0x271d
movl %r15d, %ecx
movq %rcx, 0x20(%rsp)
movq 0x7962(%rip), %rbx      # 0x9fd8
movl (%r13), %ecx
cmpl %r15d, 0x4(%r13)
setne %dl
cmpl %ebp, 0x4(%rsp)
sete %sil
cmpl %r14d, %ecx
sete %dil
orb %sil, %dil
orb %dl, %dil
jne 0x2710
movl %ecx, %eax
movq %rax, 0x28(%rsp)
movl $0xa, %edx
movq %rbx, %rdi
leaq 0x4978(%rip), %rsi      # 0x7026
callq 0x21e0
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0x20e0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0x4960(%rip), %rsi      # 0x7031
callq 0x21e0
movq %r12, %rdi
movq 0x20(%rsp), %rsi
callq 0x20e0
movq %rax, %r12
movl $0x2, %edx
movq %rax, %rdi
leaq 0x4940(%rip), %rsi      # 0x7035
callq 0x21e0
movq %r12, %rdi
movq 0x28(%rsp), %rsi
callq 0x20e0
movq 0x8(%rsp), %r8
movq 0x40(%r8), %rax
addq $0x8, %r13
cmpq %rax, %r13
jne 0x2676
movq 0x8(%r8), %r12
cmpq 0x10(%r8), %r12
movq 0x18(%rsp), %r13
movq 0x10(%rsp), %rbx
je 0x2758
movl (%r12), %edi
movq %rbx, %rsi
movl %r15d, %edx
movq %r13, %rcx
movl %r14d, %r8d
movl %ebp, %r9d
callq 0x25f0
movq 0x8(%rsp), %r8
addq $0x8, %r12
cmpq 0x10(%r8), %r12
jne 0x2731
movq 0x20(%r8), %r12
cmpq 0x28(%r8), %r12
je 0x2789
movl (%r12), %edi
movq %rbx, %rsi
movl %r15d, %edx
movq %r13, %rcx
movl %r14d, %r8d
movl %ebp, %r9d
callq 0x25f0
addq $0x8, %r12
movq 0x8(%rsp), %rax
cmpq 0x28(%rax), %r12
jne 0x2762
leaq 0x4(%rsp), %rsi
movq %r13, %rdi
callq 0x649a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq