// File: GAStudyGroup[P]GPX2/src/cross/gpx/sources/GPX2.cpp
// Function: GPX2::joinGraphs()
void GPX2::joinGraphs()
{ // joins the two graphs, creating the Gu

    vector<string> cityList;
    for (auto node : red) {
        cityList.push_back(node.first);
    }

    for (string id : cityList) {
        Node* c = red[id];
        // creates the entry in the union map
        unitedGraph.insert(
            make_pair((c->getId()), new Node((c->getId()))));
        // puts the edges in the union/*  */ map
        for (Node::node n : red[(c->getId())]->getEdges()) {
            unitedGraph[(c->getId())]->addEdge(make_pair(n.first, n.second));
        }
        for (Node::node n : blue[(c->getId())]->getEdges()) {
            unitedGraph[(c->getId())]->addEdge(make_pair(n.first, n.second));
        }
    }
}

// Assembly:
subq $0x318, %rsp            # imm = 0x318
movq %rdi, 0x310(%rsp)
movq 0x310(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x2f8(%rsp), %rdi
callq 0x1e3e0
movq 0x88(%rsp), %rax
addq $0xd8, %rax
movq %rax, 0x2f0(%rsp)
movq 0x2f0(%rsp), %rdi
callq 0x60ba0
movq %rax, 0x2e8(%rsp)
movq 0x2f0(%rsp), %rdi
callq 0x60bd0
movq %rax, 0x2e0(%rsp)
leaq 0x2e8(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x60c00
testb $0x1, %al
jne 0x5e8da
jmp 0x5e96b
leaq 0x2e8(%rsp), %rdi
callq 0x60c20
movq %rax, %rsi
leaq 0x2b8(%rsp), %rdi
callq 0x60da0
jmp 0x5e8f9
leaq 0x2f8(%rsp), %rdi
leaq 0x2b8(%rsp), %rsi
callq 0x37210
jmp 0x5e910
leaq 0x2b8(%rsp), %rdi
callq 0x60de0
leaq 0x2e8(%rsp), %rdi
callq 0x60d70
jmp 0x5e8bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x5f05b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x2b8(%rsp), %rdi
callq 0x60de0
jmp 0x5f05b
leaq 0x2f8(%rsp), %rax
movq %rax, 0x2a0(%rsp)
movq 0x2a0(%rsp), %rdi
callq 0x1e310
movq %rax, 0x298(%rsp)
movq 0x2a0(%rsp), %rdi
callq 0x1e340
movq %rax, 0x290(%rsp)
leaq 0x298(%rsp), %rdi
leaq 0x290(%rsp), %rsi
callq 0x1e370
testb $0x1, %al
jne 0x5e9c3
jmp 0x5f046
leaq 0x298(%rsp), %rdi
callq 0x1e3b0
movq %rax, %rsi
leaq 0x270(%rsp), %rdi
callq 0x6200
jmp 0x5e9e2
movq 0x88(%rsp), %rdi
addq $0xd8, %rdi
leaq 0x270(%rsp), %rsi
callq 0x60c60
movq %rax, 0x80(%rsp)
jmp 0x5ea08
movq 0x88(%rsp), %rax
movq 0x80(%rsp), %rcx
movq (%rcx), %rcx
movq %rcx, 0x268(%rsp)
addq $0x90, %rax
movq %rax, 0x78(%rsp)
movq 0x268(%rsp), %rsi
leaq 0x220(%rsp), %rdi
callq 0x66190
jmp 0x5ea45
movl $0x40, %edi
callq 0x64b0
movq %rax, 0x70(%rsp)
jmp 0x5ea56
movb $0x1, 0x1f7(%rsp)
movq 0x268(%rsp), %rsi
leaq 0x1f8(%rsp), %rdi
callq 0x66190
jmp 0x5ea75
movq 0x70(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
callq 0x66160
jmp 0x5ea89
movq 0x70(%rsp), %rax
movb $0x0, 0x1f7(%rsp)
movq %rax, 0x218(%rsp)
leaq 0x240(%rsp), %rdi
leaq 0x220(%rsp), %rsi
leaq 0x218(%rsp), %rdx
callq 0x60e40
jmp 0x5eabd
movq 0x78(%rsp), %rdi
leaq 0x240(%rsp), %rsi
callq 0x60df0
movb %dl, 0x67(%rsp)
movq %rax, 0x68(%rsp)
jmp 0x5eada
movb 0x67(%rsp), %al
movq 0x68(%rsp), %rcx
movq %rcx, 0x1e0(%rsp)
movb %al, 0x1e8(%rsp)
leaq 0x240(%rsp), %rdi
callq 0x60e80
leaq 0x1f8(%rsp), %rdi
callq 0x6988
leaq 0x220(%rsp), %rdi
callq 0x6988
movq 0x88(%rsp), %rax
addq $0xd8, %rax
movq %rax, 0x58(%rsp)
movq 0x268(%rsp), %rsi
leaq 0x1b8(%rsp), %rdi
callq 0x66190
jmp 0x5eb43
movq 0x58(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
callq 0x60e90
movq %rax, 0x50(%rsp)
jmp 0x5eb5c
movq 0x50(%rsp), %rax
movq (%rax), %rdi
callq 0x661c0
movq %rax, 0x48(%rsp)
jmp 0x5eb70
leaq 0x1b8(%rsp), %rdi
callq 0x6988
movq 0x48(%rsp), %rax
movq %rax, 0x1d8(%rsp)
movq 0x1d8(%rsp), %rdi
callq 0x60f80
movq %rax, 0x1b0(%rsp)
movq 0x1d8(%rsp), %rdi
callq 0x60fb0
movq %rax, 0x1a8(%rsp)
leaq 0x1b0(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x60fe0
testb $0x1, %al
jne 0x5ebd2
jmp 0x5edf7
leaq 0x1b0(%rsp), %rdi
callq 0x61020
movq %rax, %rsi
leaq 0x180(%rsp), %rdi
callq 0x61030
jmp 0x5ebf1
movq 0x88(%rsp), %rax
addq $0x90, %rax
movq %rax, 0x40(%rsp)
movq 0x268(%rsp), %rsi
leaq 0x160(%rsp), %rdi
callq 0x66190
jmp 0x5ec1b
movq 0x40(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x60e90
movq %rax, 0x38(%rsp)
jmp 0x5ec34
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
leaq 0x1a0(%rsp), %rdx
leaq 0x138(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x61070
jmp 0x5ec60
movq 0x30(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x66250
jmp 0x5ec74
leaq 0x138(%rsp), %rdi
callq 0x610b0
leaq 0x160(%rsp), %rdi
callq 0x6988
leaq 0x180(%rsp), %rdi
callq 0x610b0
leaq 0x1b0(%rsp), %rdi
callq 0x610c0
jmp 0x5ebb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x5f037
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x5ed53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x5ed36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x5ed29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x240(%rsp), %rdi
callq 0x60e80
leaq 0x1f8(%rsp), %rdi
callq 0x6988
testb $0x1, 0x1f7(%rsp)
jne 0x5ed42
jmp 0x5ed51
movq 0x70(%rsp), %rdi
movl $0x40, %esi
callq 0x64c0
jmp 0x5ed53
leaq 0x220(%rsp), %rdi
callq 0x6988
jmp 0x5f037
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x1b8(%rsp), %rdi
callq 0x6988
jmp 0x5f037
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x5ede5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x5edd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x610b0
leaq 0x160(%rsp), %rdi
callq 0x6988
leaq 0x180(%rsp), %rdi
callq 0x610b0
jmp 0x5f037
movq 0x88(%rsp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x28(%rsp)
movq 0x268(%rsp), %rsi
leaq 0x110(%rsp), %rdi
callq 0x66190
jmp 0x5ee21
movq 0x28(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x60e90
movq %rax, 0x20(%rsp)
jmp 0x5ee3a
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0x661c0
movq %rax, 0x18(%rsp)
jmp 0x5ee4e
leaq 0x110(%rsp), %rdi
callq 0x6988
movq 0x18(%rsp), %rax
movq %rax, 0x130(%rsp)
movq 0x130(%rsp), %rdi
callq 0x60f80
movq %rax, 0x108(%rsp)
movq 0x130(%rsp), %rdi
callq 0x60fb0
movq %rax, 0x100(%rsp)
leaq 0x108(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x60fe0
testb $0x1, %al
jne 0x5eeb0
jmp 0x5f018
leaq 0x108(%rsp), %rdi
callq 0x61020
movq %rax, %rsi
leaq 0xd8(%rsp), %rdi
callq 0x61030
jmp 0x5eecf
movq 0x88(%rsp), %rax
addq $0x90, %rax
movq %rax, 0x10(%rsp)
movq 0x268(%rsp), %rsi
leaq 0xb8(%rsp), %rdi
callq 0x66190
jmp 0x5eef9
movq 0x10(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x60e90
movq %rax, 0x8(%rsp)
jmp 0x5ef12
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
leaq 0xf8(%rsp), %rdx
leaq 0x90(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x61070
jmp 0x5ef3d
movq (%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x66250
jmp 0x5ef50
leaq 0x90(%rsp), %rdi
callq 0x610b0
leaq 0xb8(%rsp), %rdi
callq 0x6988
leaq 0xd8(%rsp), %rdi
callq 0x610b0
leaq 0x108(%rsp), %rdi
callq 0x610c0
jmp 0x5ee92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x6988
jmp 0x5f037
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x5f009
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x5effc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x610b0
leaq 0xb8(%rsp), %rdi
callq 0x6988
leaq 0xd8(%rsp), %rdi
callq 0x610b0
jmp 0x5f037
leaq 0x270(%rsp), %rdi
callq 0x6988
leaq 0x298(%rsp), %rdi
callq 0x1e3c0
jmp 0x5e9a5
leaq 0x270(%rsp), %rdi
callq 0x6988
jmp 0x5f05b
leaq 0x2f8(%rsp), %rdi
callq 0xa2c0
addq $0x318, %rsp            # imm = 0x318
retq
leaq 0x2f8(%rsp), %rdi
callq 0xa2c0
movq 0x2b0(%rsp), %rdi
callq 0x6850
nopw %cs:(%rax,%rax)