// File: /workspace/github_cpp_makefile_star2_O1/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 0x3b26
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 0x3cd2
leaq 0x4327(%rip), %rsi      # 0x7077
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 0x2f7b
xorl %r15d, %r15d
movq (%rax,%r15,8), %r12
movl (%r12), %ebp
movl %ebp, %edi
movq %r14, %rsi
callq 0x25dc
cmpl %eax, %ebp
jne 0x2e1c
movl (%r12), %ecx
movl %ecx, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x2e8c
movq (%rdx), %r9
movq %rdx, %rax
cmpl 0x8(%r9), %ecx
je 0x2e8c
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x2e8a
movl 0x8(%r9), %edi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x2e8c
movq %r10, %rax
cmpl %edi, %ecx
jne 0x2dee
jmp 0x2e8c
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 %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x2eef
movq (%rdx), %r9
movq %rdx, %rax
cmpl 0x8(%r9), %ecx
je 0x2eef
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x2eed
movl 0x8(%r9), %edi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x2eef
movq %r10, %rax
cmpl %edi, %ecx
jne 0x2e5c
jmp 0x2eef
xorl %eax, %eax
testq %rax, %rax
je 0x2e97
cmpq $0x0, (%rax)
jne 0x2ecb
movl $0x18, %edi
callq 0x2190
movq %rax, %r13
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%rax)
movq %rax, (%rax)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x66f2
movq %r13, (%rax)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x66f2
movq (%rax), %r13
movl $0x18, %edi
callq 0x2190
movl 0xc(%rsp), %ecx
jmp 0x2f4e
xorl %eax, %eax
testq %rax, %rax
je 0x2efa
cmpq $0x0, (%rax)
jne 0x2f2e
movl $0x18, %edi
callq 0x2190
movq %rax, %r13
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%rax)
movq %rax, (%rax)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x66f2
movq %r13, (%rax)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x66f2
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 0x2d99
movq 0x20(%rsp), %rbp
testq %rbp, %rbp
je 0x3037
leaq 0x48(%rsp), %r14
leaq 0x40bd(%rip), %r13      # 0x7052
movl 0x8(%rbp), %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rbp), %r12
movq %r14, %rdi
leaq 0xc(%rsp), %rsi
callq 0x5efa
movl (%rax), %esi
movq %rbx, %rdi
callq 0x20e0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x4097(%rip), %rsi      # 0x705d
callq 0x21e0
movq %r12, %r15
movq (%r15), %r15
cmpq %r12, %r15
je 0x2ffe
leaq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x5efa
movl (%rax), %esi
movq %rbx, %rdi
callq 0x20e0
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21e0
jmp 0x2fce
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 0x2f95
leaq 0x10(%rsp), %rdi
callq 0x3fd8
movq 0x6f88(%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 0x3f8c
leaq 0x48(%rsp), %rdi
callq 0x3fb2
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x30cc
movq %rax, %rbx
jmp 0x30d9
jmp 0x30b2
jmp 0x30b2
jmp 0x30b2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3fd8
leaq 0xb8(%rsp), %rdi
callq 0x2230
leaq 0x80(%rsp), %rdi
callq 0x3f8c
leaq 0x48(%rsp), %rdi
callq 0x3fb2
movq %rbx, %rdi
callq 0x22b0