// File: /workspace/github_cpp_makefile_star2_O3/yuanboli233[P]interdyck_graph_reduce/graphtest.cpp
// Function: createNodeMergeMap(SummaryGraph&)
void createNodeMergeMap(SummaryGraph& sGraph){
    unordered_map<unsigned, unsigned> node2orig = sGraph.node2orignodeid;
    unordered_map<unsigned, string> eid2orig = sGraph.eid2origeidstring;
    ofstream out("tmp_color_reach_dk_node_merge.txt", ofstream::out);
    unordered_map<unsigned, list<unsigned>*> mergeMap;
    for(unsigned i = 0; i < sGraph.nodes.size(); i++){
        SummaryNode* node = sGraph.nodes[i];
        if(node->id != root(node->id, sGraph)){
            unsigned existID = node->belongto;
            if(mergeMap.find(existID) == mergeMap.end()){
                mergeMap[existID] = new list<unsigned>();
            }
            mergeMap[existID]->push_back(node->id);
        }else{
            unsigned id = node->id;
            if(mergeMap.find(id) == mergeMap.end()){
                mergeMap[id] = new list<unsigned>();
            }
            mergeMap[id]->push_back(id);
        }
    }

    for(unordered_map<unsigned, list<unsigned>*>::iterator mit = mergeMap.begin(); mit != mergeMap.end(); mit++){
        unsigned existID = mit->first;
        list<unsigned>* l = mit->second;
        out << node2orig[existID] << ": ";
        for(list<unsigned>::iterator lit = l->begin(); lit != l->end(); lit++){
            out << node2orig[*lit] << " ";
        }
        out << endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rdi, %r14
xorl %r15d, %r15d
leaq 0x48(%rsp), %rdi
movq %r15, (%rdi)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rdi)
movq %r15, 0x10(%rdi)
movq 0x18(%r14), %rax
movq %rax, 0x18(%rdi)
movups 0x20(%r14), %xmm0
movups %xmm0, 0x20(%rdi)
movq %r15, 0x30(%rdi)
leaq 0xb8(%rsp), %rbx
movq %rdi, (%rbx)
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3a36
leaq 0x38(%r14), %rsi
leaq 0x80(%rsp), %rdi
movq %r15, (%rdi)
movq 0x40(%r14), %rax
movq %rax, 0x8(%rdi)
movq %r15, 0x10(%rdi)
movq 0x50(%r14), %rax
movq %rax, 0x18(%rdi)
movups 0x58(%r14), %xmm0
movups %xmm0, 0x20(%rdi)
movq %r15, 0x30(%rdi)
movq %rdi, (%rbx)
leaq 0xb8(%rsp), %rdx
callq 0x3bde
leaq 0x4366(%rip), %rsi      # 0x705b
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
movl $0x10, %edx
callq 0x21d0
leaq 0x40(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq 0x70(%r14), %rax
cmpq %rax, 0x78(%r14)
je 0x2f87
xorl %r15d, %r15d
movq (%rax,%r15,8), %r12
movl (%r12), %ebp
movl %ebp, %edi
movq %r14, %rsi
callq 0x25cc
cmpl %eax, %ebp
jne 0x2dad
movl (%r12), %ecx
movl %ecx, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x2e00
movq %rdx, %rsi
movq (%rax), %r9
cmpl 0x8(%r9), %ecx
je 0x2e2e
movq (%r9), %r9
testq %r9, %r9
je 0x2e00
movl 0x8(%r9), %edi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
cmpq %rsi, %rdx
jne 0x2e00
cmpl %edi, %ecx
jne 0x2d8b
jmp 0x2e2e
movl 0x68(%r12), %ecx
movl %ecx, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x2e50
movq %rdx, %rsi
movq (%rax), %r9
cmpl 0x8(%r9), %ecx
je 0x2e7e
movq (%r9), %r9
testq %r9, %r9
je 0x2e50
movl 0x8(%r9), %edi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
cmpq %rsi, %rdx
jne 0x2e50
cmpl %edi, %ecx
jne 0x2de1
jmp 0x2e7e
movl $0x18, %edi
callq 0x2190
movq %rax, %r13
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x658a
movq %r13, (%rax)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x658a
movq (%rax), %r13
movl $0x18, %edi
callq 0x2190
movl 0xc(%rsp), %ecx
jmp 0x2e9e
movl $0x18, %edi
callq 0x2190
movq %rax, %r13
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x658a
movq %r13, (%rax)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x658a
movq (%rax), %r13
movl $0x18, %edi
callq 0x2190
movl (%r12), %ecx
movl %ecx, 0x10(%rax)
movq %rax, %rdi
movq %r13, %rsi
callq 0x2040
incq 0x10(%r13)
incl %r15d
movq 0x70(%r14), %rax
movq 0x78(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
ja 0x2d3e
movq 0x20(%rsp), %rbp
testq %rbp, %rbp
je 0x2f87
leaq 0x48(%rsp), %r14
leaq 0x4151(%rip), %r13      # 0x7036
movl 0x8(%rbp), %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rbp), %r12
movq %r14, %rdi
leaq 0xc(%rsp), %rsi
callq 0x5de0
movl (%rax), %esi
movq %rbx, %rdi
callq 0x20e0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x412b(%rip), %rsi      # 0x7041
callq 0x21e0
movq %r12, %r15
movq (%r15), %r15
cmpq %r12, %r15
je 0x2f4e
leaq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x5de0
movl (%rax), %esi
movq %rbx, %rdi
callq 0x20e0
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21e0
jmp 0x2f1e
movq 0xb8(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x2ee5
leaq 0x10(%rsp), %rdi
callq 0x3eea
movq 0x7038(%rip), %rax      # 0x9fd0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0xc0(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0xb8(%rsp,%rcx)
callq 0x2150
leaq 0x1b0(%rsp), %rdi
callq 0x2080
leaq 0x80(%rsp), %rdi
callq 0x3e9e
leaq 0x48(%rsp), %rdi
callq 0x3ec4
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x301c
movq %rax, %rbx
jmp 0x3029
jmp 0x3002
jmp 0x3002
jmp 0x3002
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3eea
leaq 0xb8(%rsp), %rdi
callq 0x2230
leaq 0x80(%rsp), %rdi
callq 0x3e9e
leaq 0x48(%rsp), %rdi
callq 0x3ec4
movq %rbx, %rdi
callq 0x22b0