// File: /workspace/github_cpp_makefile_star2_O1/canzarlab[P]Trajan/src/convert.cpp
// Function: main
int main(int argc, char** argv)
{
    if (argc != 4)
    {
        cout << "usage: " << argv[0] << " <input.dot> <out-dag> <out-map>" << endl;
        return EXIT_FAILURE;
    }

    graph_t graph(0);
    dynamic_properties dp(ignore_other_properties);

    property_map<graph_t, vertex_name_t>::type name =
        get(vertex_name, graph);
    dp.property("node_id", name);

    property_map<graph_t, vertex_label_t>::type vertex_label =
        get(vertex_label_t(), graph);
    dp.property("label", vertex_label);

    property_map<graph_t, edge_color_t>::type color =
        get(edge_color, graph);
    dp.property("color", color);

    property_map<graph_t, edge_label_t>::type edge_label =
        get(edge_label_t(), graph);
    dp.property("label", edge_label);

    ref_property_map<graph_t*, string> gname(get_property(graph, graph_name));
    dp.property("name", gname);

    ifstream gvgraph(argv[1]);
    if (!read_graphviz(gvgraph, graph, dp, "node_id"))
    {
        cout << "error reading dot file" << endl;
        return EXIT_FAILURE;
    }

    ofstream fdag(argv[2]);
    graph_traits<graph_t>::edge_iterator ei, ei_end;
    for (tie(ei, ei_end) = edges(graph); ei != ei_end; ++ei)
        fdag << name[target(*ei, graph)] << " " << name[source(*ei, graph)] << " default\n";

    ofstream fmap(argv[3]);
    graph_traits<graph_t>::vertex_iterator vi, vi_end;
    for (tie(vi, vi_end) = vertices(graph); vi != vi_end; ++vi)
    {
        string lab = vertex_label[*vi];
        size_t beg = lab.find('=') + 1;
        size_t end = lab.find('|');
        size_t len = end - beg;
        fmap << lab.substr(beg, len) << " " << name[*vi] << '\n';
    }

    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x778, %rsp            # imm = 0x778
movq %rsi, %rbx
cmpl $0x4, %edi
jne 0x58b1
leaq 0x588(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x180(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x170(%rsp), %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x6ad0
leaq 0x58(%rsp), %rdi
leaq 0x170(%rsp), %rdx
xorl %esi, %esi
callq 0x6062
movq 0x170(%rsp), %rdi
cmpq %r12, %rdi
je 0x55b2
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x51d0
movq 0x578(%rsp), %rdi
cmpq %r14, %rdi
je 0x55cf
movq 0x588(%rsp), %rsi
incq %rsi
callq 0x51d0
leaq 0xb23(%rip), %rax       # 0x60f9
leaq 0x170(%rsp), %rsi
movq %rax, 0x8(%rsi)
leaq 0x10bf0(%rip), %rax     # 0x161d9
movq %rax, (%rsi)
leaq 0x120(%rsp), %rdi
callq 0x6104
leaq 0x170(%rsp), %r15
movq %r15, %rdi
callq 0x617c
movq %r12, (%r15)
leaq 0x7a2e(%rip), %rsi      # 0xd041
leaq 0x7a2e(%rip), %rdx      # 0xd048
leaq 0x170(%rsp), %rdi
callq 0x6b60
leaq 0x120(%rsp), %rdi
leaq 0x170(%rsp), %rsi
leaq 0x58(%rsp), %rdx
xorl %ecx, %ecx
callq 0x61b4
movq 0x170(%rsp), %rdi
cmpq %r12, %rdi
je 0x5660
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x51d0
leaq 0x170(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x79d7(%rip), %rsi      # 0xd049
leaq 0x79d5(%rip), %rdx      # 0xd04e
callq 0x6b60
leaq 0x120(%rsp), %rdi
leaq 0x170(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x62ac
movq 0x170(%rsp), %rdi
cmpq %r12, %rdi
je 0x56b5
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x51d0
leaq 0x170(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x7988(%rip), %rsi      # 0xd04f
leaq 0x7986(%rip), %rdx      # 0xd054
callq 0x6b60
leaq 0x120(%rsp), %rdi
leaq 0x170(%rsp), %rsi
xorl %edx, %edx
callq 0x63a2
movq 0x170(%rsp), %rdi
cmpq %r12, %rdi
je 0x5707
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x51d0
leaq 0x170(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x7930(%rip), %rsi      # 0xd049
leaq 0x792e(%rip), %rdx      # 0xd04e
callq 0x6b60
leaq 0x120(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x64a0
movq 0x170(%rsp), %rdi
cmpq %r12, %rdi
je 0x5757
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x51d0
movq 0x88(%rsp), %r15
testq %r15, %r15
je 0x5e69
leaq 0x170(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x78db(%rip), %rsi      # 0xd055
leaq 0x78d8(%rip), %rdx      # 0xd059
callq 0x6b60
leaq 0x120(%rsp), %rdi
leaq 0x170(%rsp), %rsi
movq %r15, %rdx
callq 0x659c
movq 0x170(%rsp), %rdi
cmpq %r12, %rdi
je 0x57bb
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x51d0
movq 0x8(%rbx), %rsi
leaq 0x170(%rsp), %rdi
movl $0x8, %edx
callq 0x5360
leaq 0x578(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x785e(%rip), %rsi      # 0xd041
leaq 0x785e(%rip), %rdx      # 0xd048
callq 0x6b60
leaq 0x170(%rsp), %rdi
leaq 0x58(%rsp), %r15
leaq 0x120(%rsp), %rdx
leaq 0x578(%rsp), %rcx
movq %r15, %rsi
callq 0x669b
movl %eax, %ebp
movq 0x578(%rsp), %rdi
cmpq %r14, %rdi
je 0x5833
movq 0x588(%rsp), %rsi
incq %rsi
callq 0x51d0
testb %bpl, %bpl
je 0x58f0
movq 0x10(%rbx), %rsi
leaq 0x578(%rsp), %rdi
movl $0x10, %edx
callq 0x5220
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rcx
movq %rcx, %rax
subq %rdi, %rax
sarq $0x5, %rax
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
imulq %rbp, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x19(%rsp)
movaps %xmm0, 0x10(%rsp)
movups %xmm0, 0xd9(%rsp)
movaps %xmm0, 0xd0(%rsp)
cmpq %rdi, %rcx
je 0x599d
movq (%rdi), %rdx
movq 0x8(%rdi), %rsi
cmpq %rdx, %rsi
je 0x59a3
xorl %ecx, %ecx
jmp 0x59c5
movq 0x11718(%rip), %r14     # 0x16fd0
leaq 0x7759(%rip), %rsi      # 0xd018
movl $0x7, %edx
movq %r14, %rdi
callq 0x5240
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x5940
movq %rbx, %rdi
callq 0x50c0
movq 0x116ed(%rip), %rdi     # 0x16fd0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x5240
jmp 0x5958
movq 0x116d9(%rip), %rbx     # 0x16fd0
leaq 0x775c(%rip), %rsi      # 0xd05a
movl $0x16, %edx
movq %rbx, %rdi
callq 0x5240
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x51b0
movsbl %al, %esi
movq 0x116a7(%rip), %rdi     # 0x16fd0
callq 0x5030
movl $0x1, %ebx
movq %rax, %rdi
callq 0x5130
jmp 0x5dcc
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x5310
leaq 0x76c1(%rip), %rsi      # 0xd020
movl $0x20, %edx
movq %r14, %rdi
callq 0x5240
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x51b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5130
movl $0x1, %ebx
jmp 0x5e17
xorl %ecx, %ecx
xorl %edi, %edi
jmp 0x59cf
addq $0x68, %rdi
leaq -0x1(%rax), %r8
xorl %ecx, %ecx
cmpq %rcx, %r8
je 0x59ca
movq -0x8(%rdi), %rdx
movq (%rdi), %rsi
addq $0x60, %rdi
incq %rcx
cmpq %rdx, %rsi
je 0x59ad
movb $0x1, %dil
jmp 0x59cf
xorl %edi, %edi
movq %rax, %rcx
movq $0x0, 0x378(%rsp)
movq %rcx, 0x380(%rsp)
movq %rax, 0x388(%rsp)
movb $0x0, 0x390(%rsp)
testb %dil, %dil
je 0x5a20
movq %rdx, 0x398(%rsp)
movq %rcx, 0x3a0(%rsp)
movq %rsi, 0x3a8(%rsp)
movq %rcx, 0x3b0(%rsp)
movb $0x1, 0x390(%rsp)
leaq 0x378(%rsp), %rsi
movq %r15, 0x40(%rsi)
movq $0x0, 0x48(%rsi)
movq %rax, 0x50(%rsi)
movq %rax, 0x58(%rsi)
movb $0x0, 0x60(%rsi)
movq %r15, 0x88(%rsi)
leaq 0x10(%rsp), %rax
leaq 0xb0(%rsp), %rdi
movq %rax, (%rdi)
leaq 0xd0(%rsp), %rax
movq %rax, 0x8(%rdi)
callq 0x6704
cmpb $0x1, 0x3d8(%rsp)
jne 0x5a7a
movb $0x0, 0x3d8(%rsp)
cmpb $0x1, 0x390(%rsp)
jne 0x5a8c
movb $0x0, 0x390(%rsp)
leaq 0x578(%rsp), %r14
leaq 0x7934(%rip), %r15      # 0xd3cf
leaq 0x75cf(%rip), %r12      # 0xd071
movq 0x18(%rsp), %rax
cmpq 0xd8(%rsp), %rax
jne 0x5ae8
cmpq 0x20(%rsp), %rax
je 0x5bf5
cmpb $0x0, 0x28(%rsp)
je 0x5e2b
cmpb $0x0, 0xe8(%rsp)
je 0x5e2b
movq 0x30(%rsp), %rax
cmpq 0xf0(%rsp), %rax
je 0x5bf5
cmpb $0x0, 0x28(%rsp)
je 0x5e2b
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x70(%rsp), %rcx
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
movq 0x18(%rcx,%rax), %rsi
movq 0x20(%rcx,%rax), %rdx
movq %r14, %rdi
callq 0x5240
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x5240
cmpb $0x0, 0x28(%rsp)
je 0x5e2b
movq 0x38(%rsp), %rax
movq 0x70(%rsp), %rcx
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
movq 0x18(%rcx,%rax), %rsi
movq 0x20(%rcx,%rax), %rdx
movq %r13, %rdi
callq 0x5240
movl $0x9, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x5240
cmpb $0x0, 0x28(%rsp)
je 0x5e4a
movq 0x30(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x30(%rsp)
cmpq 0x40(%rsp), %rax
jne 0x5aa2
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq 0x50(%rsp), %rdx
leaq (%rax,%rax,2), %rsi
shlq $0x5, %rsi
addq $0x68, %rsi
leaq -0x1(%rcx), %rdi
cmpq %rax, %rdi
je 0x5beb
movq 0x18(%rdx), %r8
movq -0x8(%r8,%rsi), %r9
movq (%r8,%rsi), %r8
addq $0x60, %rsi
incq %rax
cmpq %r9, %r8
je 0x5baf
movq %rax, 0x18(%rsp)
movq %r9, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %rax, 0x48(%rsp)
jmp 0x5aa2
movq %rcx, 0x18(%rsp)
jmp 0x5aa2
movq 0x18(%rbx), %rsi
leaq 0x378(%rsp), %rdi
movl $0x10, %edx
callq 0x5220
movq 0x78(%rsp), %r15
movq 0x70(%rsp), %rax
subq %rax, %r15
je 0x5d4a
sarq $0x5, %r15
imulq %rbp, %r15
leaq 0xc0(%rsp), %r14
xorl %r12d, %r12d
leaq 0xb0(%rsp), %rbx
leaq 0xf(%rsp), %r13
movq 0x70(%rsp), %rax
movq %r14, 0xb0(%rsp)
movq 0x38(%rax,%r12), %rsi
movq 0x40(%rax,%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x6ad0
movq %rbx, %rdi
movl $0x3d, %esi
xorl %edx, %edx
callq 0x5270
leaq 0x1(%rax), %rbp
movq %rbx, %rdi
movl $0x7c, %esi
xorl %edx, %edx
callq 0x5270
subq %rbp, %rax
leaq 0x90(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x5200
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
leaq 0x378(%rsp), %rdi
callq 0x5240
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0x7705(%rip), %rsi      # 0xd3cf
callq 0x5240
movq 0x70(%rsp), %rax
movq 0x18(%rax,%r12), %rsi
movq 0x20(%rax,%r12), %rdx
movq %rbp, %rdi
callq 0x5240
movb $0xa, 0xf(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x5240
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x5d20
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x51d0
movq 0xb0(%rsp), %rdi
cmpq %r14, %rdi
je 0x5d3d
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x51d0
addq $0x60, %r12
decq %r15
jne 0x5c3e
movq 0x11267(%rip), %rax     # 0x16fb8
movq (%rax), %rbx
movq 0x18(%rax), %r14
leaq 0x380(%rsp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, 0x378(%rsp,%rax)
callq 0x5190
leaq 0x470(%rsp), %rdi
callq 0x5090
cmpb $0x1, 0xe8(%rsp)
jne 0x5d94
movb $0x0, 0xe8(%rsp)
cmpb $0x1, 0x28(%rsp)
jne 0x5da0
movb $0x0, 0x28(%rsp)
leaq 0x580(%rsp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, 0x578(%rsp,%rax)
callq 0x5190
leaq 0x670(%rsp), %rdi
callq 0x5090
xorl %ebx, %ebx
leaq 0x88(%rsp), %r14
leaq 0x170(%rsp), %rdi
callq 0x5060
leaq 0x150(%rsp), %rdi
callq 0x617c
leaq 0x120(%rsp), %rdi
callq 0x67e4
movq %r14, %rdi
callq 0x68c2
leaq 0x70(%rsp), %rdi
callq 0x68f2
leaq 0x58(%rsp), %rdi
callq 0x6a5e
movl %ebx, %eax
addq $0x778, %rsp            # imm = 0x778
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78ff(%rip), %rdi      # 0xd731
leaq 0x790f(%rip), %rsi      # 0xd748
leaq 0x7931(%rip), %rcx      # 0xd771
movl $0x4c5, %edx            # imm = 0x4C5
callq 0x5120
leaq 0x78e0(%rip), %rdi      # 0xd731
leaq 0x78f0(%rip), %rsi      # 0xd748
leaq 0x8148(%rip), %rcx      # 0xdfa7
movl $0x4c6, %edx            # imm = 0x4C6
callq 0x5120
leaq 0x72a3(%rip), %rdi      # 0xd113
leaq 0x72a4(%rip), %rsi      # 0xd11b
leaq 0x72c9(%rip), %rcx      # 0xd147
movl $0x63, %edx
callq 0x5120
jmp 0x5fa7
movq %rax, %rbx
cmpb $0x1, 0x3d8(%rsp)
jne 0x5ea2
movb $0x0, 0x3d8(%rsp)
cmpb $0x1, 0x390(%rsp)
jne 0x5ffe
movb $0x0, 0x390(%rsp)
jmp 0x5ffe
jmp 0x5f93
movq %rax, %rbx
movq 0x578(%rsp), %rdi
cmpq %r14, %rdi
je 0x6029
movq 0x588(%rsp), %rsi
incq %rsi
callq 0x51d0
jmp 0x6029
jmp 0x5f93
jmp 0x5f2b
jmp 0x5f02
jmp 0x5f2b
jmp 0x5f02
jmp 0x5f2b
jmp 0x5f02
jmp 0x5f2b
jmp 0x5f02
jmp 0x5f2b
movq %rax, %rbx
movq 0x170(%rsp), %rdi
cmpq %r12, %rdi
je 0x6036
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x51d0
jmp 0x6036
movq %rax, %rbx
jmp 0x6036
movq %rax, %rbx
leaq 0x170(%rsp), %rdi
callq 0x617c
jmp 0x6050
movq %rax, %rbx
movq 0x170(%rsp), %rdi
cmpq %r12, %rdi
je 0x5f6d
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x51d0
jmp 0x5f6d
movq %rax, %rbx
movq 0x578(%rsp), %rdi
cmpq %r14, %rdi
je 0x605a
movq 0x588(%rsp), %rsi
incq %rsi
callq 0x51d0
jmp 0x605a
movq %rax, %rbx
jmp 0x6029
movq %rax, %rbx
jmp 0x5ff1
movq %rax, %rbx
jmp 0x5fd4
jmp 0x5fa7
movq %rax, %rbx
jmp 0x5ffe
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x5fd4
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x51d0
movq 0xb0(%rsp), %rdi
cmpq %r14, %rdi
je 0x5ff1
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x51d0
leaq 0x378(%rsp), %rdi
callq 0x52c0
cmpb $0x1, 0xe8(%rsp)
jne 0x6010
movb $0x0, 0xe8(%rsp)
cmpb $0x1, 0x28(%rsp)
jne 0x601c
movb $0x0, 0x28(%rsp)
leaq 0x578(%rsp), %rdi
callq 0x52c0
leaq 0x170(%rsp), %rdi
callq 0x5060
leaq 0x150(%rsp), %rdi
callq 0x617c
leaq 0x120(%rsp), %rdi
callq 0x67e4
leaq 0x58(%rsp), %rdi
callq 0x67ba
movq %rbx, %rdi
callq 0x5330