// File: /workspace/github_cpp_makefile_star2_O3/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 0x58c7
leaq 0x588(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x138(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x128(%rsp), %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x6a62
leaq 0x60(%rsp), %rdi
leaq 0x128(%rsp), %rdx
xorl %esi, %esi
callq 0x5fe0
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x55b2
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x51d0
movq 0x578(%rsp), %rdi
cmpq %r14, %rdi
je 0x55cf
movq 0x588(%rsp), %rsi
incq %rsi
callq 0x51d0
leaq 0xaa1(%rip), %rax       # 0x6077
leaq 0x128(%rsp), %rsi
movq %rax, 0x8(%rsi)
leaq 0x10c38(%rip), %rax     # 0x16221
movq %rax, (%rsi)
leaq 0xd8(%rsp), %rdi
callq 0x6082
leaq 0x128(%rsp), %r15
movq %r15, %rdi
callq 0x60fa
movq %r12, (%r15)
leaq 0x7a2e(%rip), %rsi      # 0xd041
leaq 0x7a2e(%rip), %rdx      # 0xd048
leaq 0x128(%rsp), %rdi
callq 0x6af8
leaq 0xd8(%rsp), %rdi
leaq 0x128(%rsp), %rsi
leaq 0x60(%rsp), %rdx
xorl %ecx, %ecx
callq 0x6132
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x5660
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x51d0
leaq 0x128(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x79d7(%rip), %rsi      # 0xd049
leaq 0x79d5(%rip), %rdx      # 0xd04e
callq 0x6af8
leaq 0xd8(%rsp), %rdi
leaq 0x128(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x622e
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x56b5
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x51d0
leaq 0x128(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x7988(%rip), %rsi      # 0xd04f
leaq 0x7986(%rip), %rdx      # 0xd054
callq 0x6af8
leaq 0xd8(%rsp), %rdi
leaq 0x128(%rsp), %rsi
xorl %edx, %edx
callq 0x6328
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x5707
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x51d0
leaq 0x128(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x7930(%rip), %rsi      # 0xd049
leaq 0x792e(%rip), %rdx      # 0xd04e
callq 0x6af8
leaq 0xd8(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x642a
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x5757
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x51d0
movq 0x90(%rsp), %r15
testq %r15, %r15
je 0x5e32
leaq 0x128(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x78db(%rip), %rsi      # 0xd055
leaq 0x78d8(%rip), %rdx      # 0xd059
callq 0x6af8
leaq 0xd8(%rsp), %rdi
leaq 0x128(%rsp), %rsi
movq %r15, %rdx
callq 0x652a
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x57bb
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x51d0
movq 0x8(%rbx), %rsi
leaq 0x128(%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 0x6af8
leaq 0x128(%rsp), %rdi
leaq 0x60(%rsp), %r15
leaq 0xd8(%rsp), %rdx
leaq 0x578(%rsp), %rcx
movq %r15, %rsi
callq 0x662d
movl %eax, %ebp
movq 0x578(%rsp), %rdi
cmpq %r14, %rdi
je 0x5833
movq 0x588(%rsp), %rsi
incq %rsi
callq 0x51d0
testb %bpl, %bpl
je 0x5906
movq 0x10(%rbx), %rsi
leaq 0x578(%rsp), %rdi
movl $0x10, %edx
callq 0x5220
movq 0x78(%rsp), %rcx
movq 0x80(%rsp), %rdx
movq %rdx, %rax
subq %rcx, %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, 0x339(%rsp)
movaps %xmm0, 0x330(%rsp)
cmpq %rcx, %rdx
je 0x59b3
addq $0x8, %rcx
xorl %edx, %edx
movq -0x8(%rcx), %rdi
movq (%rcx), %rsi
cmpq %rdi, %rsi
jne 0x59db
incq %rdx
addq $0x60, %rcx
cmpq %rdx, %rax
jne 0x58a3
movq %rax, %rcx
jmp 0x59b5
movq 0x11702(%rip), %r14     # 0x16fd0
leaq 0x7743(%rip), %rsi      # 0xd018
movl $0x7, %edx
movq %r14, %rdi
callq 0x5240
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x5956
movq %rbx, %rdi
callq 0x50c0
movq 0x116d7(%rip), %rdi     # 0x16fd0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x5240
jmp 0x596e
movq 0x116c3(%rip), %rbx     # 0x16fd0
leaq 0x7746(%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 0x11691(%rip), %rdi     # 0x16fd0
callq 0x5030
movl $0x1, %ebx
movq %rax, %rdi
callq 0x5130
jmp 0x5d95
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x5310
leaq 0x76ab(%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 0x5de0
xorl %ecx, %ecx
movq $0x0, 0x378(%rsp)
movq %rcx, 0x380(%rsp)
movq %rax, 0x388(%rsp)
movb $0x0, 0x390(%rsp)
jmp 0x5a1f
movq $0x0, 0x378(%rsp)
movq %rdx, 0x380(%rsp)
movq %rax, 0x388(%rsp)
movq %rdi, 0x398(%rsp)
movq %rdx, 0x3a0(%rsp)
movq %rsi, 0x3a8(%rsp)
movq %rdx, 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 0xb8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x330(%rsp), %rax
movq %rax, 0x8(%rdi)
callq 0x6696
leaq 0x578(%rsp), %r14
leaq 0x7959(%rip), %r15      # 0xd3cf
leaq 0x75f4(%rip), %r12      # 0xd071
movq 0x18(%rsp), %rax
cmpq 0x338(%rsp), %rax
jne 0x5ac5
cmpq 0x20(%rsp), %rax
je 0x5bd3
movb 0x28(%rsp), %al
testb %al, %al
je 0x5df4
cmpb $0x0, 0x348(%rsp)
je 0x5df4
movq 0x30(%rsp), %rcx
cmpq 0x350(%rsp), %rcx
jne 0x5ac9
jmp 0x5bd3
movb 0x28(%rsp), %al
testb $0x1, %al
je 0x5df4
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x78(%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 0x5df4
movq 0x38(%rsp), %rax
movq 0x78(%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 0x5e13
movq 0x30(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x30(%rsp)
cmpq 0x40(%rsp), %rax
jne 0x5a7d
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 0x5bc9
movq 0x18(%rdx), %r8
movq -0x8(%r8,%rsi), %r9
movq (%r8,%rsi), %r8
addq $0x60, %rsi
incq %rax
cmpq %r9, %r8
je 0x5b8d
movq %rax, 0x18(%rsp)
movq %r9, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %rax, 0x48(%rsp)
jmp 0x5a7d
movq %rcx, 0x18(%rsp)
jmp 0x5a7d
movq %rbp, %r15
movq 0x18(%rbx), %rsi
leaq 0x378(%rsp), %rdi
movl $0x10, %edx
callq 0x5220
movq 0x80(%rsp), %rbp
movq 0x78(%rsp), %rax
subq %rax, %rbp
je 0x5d2a
sarq $0x5, %rbp
imulq %r15, %rbp
leaq 0xc8(%rsp), %r13
xorl %ebx, %ebx
leaq 0xb8(%rsp), %r15
movq 0x78(%rsp), %rax
movq %r13, 0xb8(%rsp)
movq 0x38(%rax,%rbx), %rsi
movq 0x40(%rax,%rbx), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x6a62
movq %r15, %rdi
movl $0x3d, %esi
xorl %edx, %edx
callq 0x5270
leaq 0x1(%rax), %r12
movq %r15, %rdi
movl $0x7c, %esi
xorl %edx, %edx
callq 0x5270
subq %r12, %rax
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0x5200
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
leaq 0x378(%rsp), %rdi
callq 0x5240
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x7727(%rip), %rsi      # 0xd3cf
callq 0x5240
movq 0x78(%rsp), %rax
movq 0x18(%rax,%rbx), %rsi
movq 0x20(%rax,%rbx), %rdx
movq %r12, %rdi
callq 0x5240
movb $0xa, 0xf(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0xf(%rsp), %rsi
callq 0x5240
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x5d00
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x51d0
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5d1d
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x51d0
addq $0x60, %rbx
decq %rbp
jne 0x5c1c
movq 0x11287(%rip), %rax     # 0x16fb8
movq (%rax), %rbx
movq 0x18(%rax), %r15
leaq 0x380(%rsp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r15, 0x378(%rsp,%rax)
callq 0x5190
movl $0xf8, %r12d
leaq 0x378(%rsp), %rdi
addq %r12, %rdi
callq 0x5090
leaq 0x580(%rsp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r15, 0x578(%rsp,%rax)
callq 0x5190
addq %r12, %r14
movq %r14, %rdi
callq 0x5090
xorl %ebx, %ebx
leaq 0x90(%rsp), %r14
leaq 0x128(%rsp), %rdi
callq 0x5060
leaq 0x108(%rsp), %rdi
callq 0x60fa
leaq 0xd8(%rsp), %rdi
callq 0x6776
movq %r14, %rdi
callq 0x6854
leaq 0x78(%rsp), %rdi
callq 0x6882
leaq 0x60(%rsp), %rdi
callq 0x69f0
movl %ebx, %eax
addq $0x778, %rsp            # imm = 0x778
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7936(%rip), %rdi      # 0xd731
leaq 0x7946(%rip), %rsi      # 0xd748
leaq 0x7968(%rip), %rcx      # 0xd771
movl $0x4c5, %edx            # imm = 0x4C5
callq 0x5120
leaq 0x7917(%rip), %rdi      # 0xd731
leaq 0x7927(%rip), %rsi      # 0xd748
leaq 0x817f(%rip), %rcx      # 0xdfa7
movl $0x4c6, %edx            # imm = 0x4C6
callq 0x5120
leaq 0x72da(%rip), %rdi      # 0xd113
leaq 0x72db(%rip), %rsi      # 0xd11b
leaq 0x7300(%rip), %rcx      # 0xd147
movl $0x63, %edx
callq 0x5120
jmp 0x5f42
jmp 0x5f42
jmp 0x5f31
movq %rax, %rbx
movq 0x578(%rsp), %rdi
cmpq %r14, %rdi
je 0x5fa6
movq 0x588(%rsp), %rsi
incq %rsi
callq 0x51d0
jmp 0x5fa6
jmp 0x5f31
jmp 0x5ec9
jmp 0x5ea0
jmp 0x5ec9
jmp 0x5ea0
jmp 0x5ec9
jmp 0x5ea0
jmp 0x5ec9
jmp 0x5ea0
jmp 0x5ec9
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x5fb3
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x51d0
jmp 0x5fb3
movq %rax, %rbx
jmp 0x5fb3
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x60fa
jmp 0x5fcd
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x5f0b
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x51d0
jmp 0x5f0b
movq %rax, %rbx
movq 0x578(%rsp), %rdi
cmpq %r14, %rdi
je 0x5fd7
movq 0x588(%rsp), %rsi
incq %rsi
callq 0x51d0
jmp 0x5fd7
movq %rax, %rbx
jmp 0x5fa6
movq %rax, %rbx
jmp 0x5f8c
movq %rax, %rbx
jmp 0x5f6f
jmp 0x5f42
movq %rax, %rbx
jmp 0x5f99
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x5f6f
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x51d0
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5f8c
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x51d0
leaq 0x378(%rsp), %rdi
callq 0x52c0
leaq 0x578(%rsp), %rdi
callq 0x52c0
leaq 0x128(%rsp), %rdi
callq 0x5060
leaq 0x108(%rsp), %rdi
callq 0x60fa
leaq 0xd8(%rsp), %rdi
callq 0x6776
leaq 0x60(%rsp), %rdi
callq 0x674c
movq %rbx, %rdi
callq 0x5330
nop