// File: /workspace/github_cpp_makefile_star2_O1/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, %r12d
movl %r8d, %r15d
movl %edx, %ebp
movl %edi, 0xc(%rsp)
movl %edi, %eax
movq 0x70(%rsi), %rdx
movq (%rdx,%rax,8), %rdx
movq %rdx, 0x10(%rsp)
movq (%rcx), %r9
movq 0x8(%rcx), %r8
xorl %r10d, %r10d
xorl %edx, %edx
divq %r8
movq (%r9,%rdx,8), %rax
testq %rax, %rax
je 0x2680
movq (%rax), %r9
movq %rax, %r10
cmpl %edi, 0x8(%r9)
je 0x2680
movq %rdx, %rbx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x267d
movl 0x8(%r9), %r14d
movq %r14, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rbx, %rdx
jne 0x2680
movq %r11, %r10
cmpl %edi, %r14d
jne 0x2651
jmp 0x2680
xorl %r10d, %r10d
testq %r10, %r10
je 0x268f
cmpq $0x0, (%r10)
jne 0x27f1
movq %rsi, 0x20(%rsp)
leaq 0x30(%rsp), %rdx
movq %rcx, (%rdx)
leaq 0xc(%rsp), %rsi
movq %rcx, 0x28(%rsp)
movq %rcx, %rdi
callq 0x634c
movq 0x10(%rsp), %rdi
movq 0x38(%rdi), %r14
cmpq 0x40(%rdi), %r14
je 0x277e
movl %ebp, 0x1c(%rsp)
movl (%r14), %eax
movl 0x4(%r14), %r13d
cmpl %ebp, %r13d
setne %cl
cmpl %r12d, 0xc(%rsp)
sete %dl
cmpl %r15d, %eax
sete %sil
orb %dl, %sil
orb %cl, %sil
jne 0x2770
movl %r15d, %ebp
movl %r12d, %r15d
movl %eax, %r12d
movl $0xa, %edx
movq 0x78d6(%rip), %rbx      # 0x9fd8
movq %rbx, %rdi
leaq 0x4936(%rip), %rsi      # 0x7042
callq 0x21e0
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x491e(%rip), %rsi      # 0x704d
callq 0x21e0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x20e0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0x4900(%rip), %rsi      # 0x7051
callq 0x21e0
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %r12d
movl %ebp, %r15d
movl 0x1c(%rsp), %ebp
callq 0x20e0
movq 0x10(%rsp), %rdi
addq $0x8, %r14
cmpq 0x40(%rdi), %r14
jne 0x26c5
movq 0x8(%rdi), %rbx
cmpq 0x10(%rdi), %rbx
movq 0x28(%rsp), %r14
movq 0x20(%rsp), %r13
je 0x27b6
movl (%rbx), %edi
movq %r13, %rsi
movl %ebp, %edx
movq %r14, %rcx
movl %r15d, %r8d
movl %r12d, %r9d
callq 0x2601
movq 0x10(%rsp), %rdi
addq $0x8, %rbx
cmpq 0x10(%rdi), %rbx
jne 0x2792
movq 0x20(%rdi), %rbx
cmpq 0x28(%rdi), %rbx
je 0x27e4
movl (%rbx), %edi
movq %r13, %rsi
movl %ebp, %edx
movq %r14, %rcx
movl %r15d, %r8d
movl %r12d, %r9d
callq 0x2601
addq $0x8, %rbx
movq 0x10(%rsp), %rax
cmpq 0x28(%rax), %rbx
jne 0x27c0
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x65c6
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq