// File: /workspace/github_cpp_makefile_star2_O2/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/block.cpp
// Function: dump_in_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void dump_in_file(string filename){
    
    dump_blocks_definition("bla");
    
    ofstream fout;
    
    fout.open((filename+".gv").c_str());
    fout << "##Command to produce the output: "
         << "\"neato -Tpng bla.gv > bla.png\"\n"
         << "digraph GrafoDeBloquesBasicos {\n"
         << "    node [shape=circle,width=0.1];";
    for (uint block_index = 0 ; block_index != list_of_blocks.size();
         block_index++)
    {
        fout << " B" << list_of_blocks[block_index]->index << ";";
    }
    fout << endl;
    
    for (uint block_index = 0 ; block_index != list_of_blocks.size();
         block_index++)
    {
        if ( list_of_blocks[block_index]->mandatory_exit ){
            fout << "B" << list_of_blocks[block_index]->index
                 << "->B"
                 << list_of_blocks[block_index]->mandatory_exit->index
                 << ";" << endl;
        }
        
        vector<Block*>::iterator it =
            list_of_blocks[block_index]->sucessors.begin();
        for ( ; it != list_of_blocks[block_index]->sucessors.end(); ++it ){
            fout << "B" << list_of_blocks[block_index]->index
                 << "->B"
                 << (*it)->index
                 << ";" << endl;
        }
    }
    
    fout << endl
         << "overlap=false\n"
         << "label=\"Grafo de Bloques Basicos\"\n"
         << "fontsize=8;\n"
         << "}\n";
    fout.close();
    
    string command = "rm -rf " + filename + ".png; neato -Tpng "
                        + filename + ".gv > "+ filename + ".png";
    int salida = system(command.c_str());
    
    if ( salida != 0 ){
        cout << "Ocurrió un error al ejecutar el comando neato para generar el"
             << "grafo.\n";
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp            # imm = 0x2E8
movq %rdi, %r13
leaq 0xdecf(%rip), %rsi      # 0x25373
leaq 0xc8(%rsp), %rdi
leaq 0xe8(%rsp), %rdx
callq 0x6d6c
leaq 0xc8(%rsp), %rdi
callq 0x17217
leaq 0xc8(%rsp), %rdi
callq 0x65c8
leaq 0xe8(%rsp), %rdi
callq 0x64f0
leaq 0xde90(%rip), %rdx      # 0x25377
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x125c2
movq 0x8(%rsp), %rsi
leaq 0xe8(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x6060
leaq 0x8(%rsp), %rdi
callq 0x65c8
leaq 0xde61(%rip), %rsi      # 0x2537b
leaq 0xe8(%rsp), %rdi
callq 0x62b0
leaq 0xde6f(%rip), %rsi      # 0x2539d
movq %rax, %rdi
callq 0x62b0
leaq 0xde80(%rip), %rsi      # 0x253bd
movq %rax, %rdi
callq 0x62b0
leaq 0xde92(%rip), %rsi      # 0x253de
movq %rax, %rdi
callq 0x62b0
xorl %ebx, %ebx
leaq 0x20e53(%rip), %rbp     # 0x383b0
leaq 0xdde1(%rip), %r14      # 0x25345
leaq 0xe8(%rsp), %r15
leaq 0xde8c(%rip), %r12      # 0x253ff
movl %ebx, %ebx
movq 0x8(%rbp), %rax
subq (%rbp), %rax
sarq $0x3, %rax
cmpq %rbx, %rax
je 0x175b2
movq %r15, %rdi
movq %r14, %rsi
callq 0x62b0
movq (%rbp), %rcx
movq (%rcx,%rbx,8), %rcx
movl (%rcx), %esi
movq %rax, %rdi
callq 0x6510
movq %rax, %rdi
movq %r12, %rsi
callq 0x62b0
incl %ebx
jmp 0x17573
leaq 0xe8(%rsp), %rdi
callq 0x6130
movq %r13, (%rsp)
movq (%rbp), %rax
xorl %ebx, %ebx
leaq 0xe8(%rsp), %r15
leaq 0xde29(%rip), %r12      # 0x25401
leaq 0xde20(%rip), %r13      # 0x253ff
movl %ebx, %ebx
movq 0x8(%rbp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbx, %rcx
je 0x176c8
movq (%rax,%rbx,8), %rcx
cmpq $0x0, 0x10(%rcx)
je 0x1765d
movq %r15, %rdi
leaq 0xdd3c(%rip), %rsi      # 0x25346
callq 0x62b0
movq (%rbp), %rcx
movq (%rcx,%rbx,8), %rcx
movl (%rcx), %esi
movq %rax, %rdi
callq 0x6510
movq %rax, %rdi
movq %r12, %rsi
callq 0x62b0
movq (%rbp), %rcx
movq (%rcx,%rbx,8), %rcx
movq 0x10(%rcx), %rcx
movl (%rcx), %esi
movq %rax, %rdi
callq 0x6510
movq %rax, %rdi
movq %r13, %rsi
callq 0x62b0
movq %rax, %rdi
callq 0x6130
movq (%rbp), %rax
movq (%rax,%rbx,8), %rcx
movq 0x18(%rcx), %r14
cmpq 0x20(%rcx), %r14
je 0x176c1
movq %r15, %rdi
leaq 0xdcd5(%rip), %rsi      # 0x25346
callq 0x62b0
movq (%rbp), %rcx
movq (%rcx,%rbx,8), %rcx
movl (%rcx), %esi
movq %rax, %rdi
callq 0x6510
movq %rax, %rdi
movq %r12, %rsi
callq 0x62b0
movq (%r14), %rcx
movl (%rcx), %esi
movq %rax, %rdi
callq 0x6510
movq %rax, %rdi
movq %r13, %rsi
callq 0x62b0
movq %rax, %rdi
callq 0x6130
addq $0x8, %r14
movq (%rbp), %rax
movq (%rax,%rbx,8), %rcx
jmp 0x17661
incl %ebx
jmp 0x175df
leaq 0xe8(%rsp), %rdi
callq 0x6130
movq (%rsp), %rbx
leaq 0xdd25(%rip), %rsi      # 0x25405
movq %rax, %rdi
callq 0x62b0
leaq 0xdd25(%rip), %rsi      # 0x25414
movq %rax, %rdi
callq 0x62b0
leaq 0xdd38(%rip), %rsi      # 0x25436
movq %rax, %rdi
callq 0x62b0
leaq 0xdd36(%rip), %rsi      # 0x25443
movq %rax, %rdi
callq 0x62b0
leaq 0xe8(%rsp), %rdi
callq 0x6400
leaq 0xdd1d(%rip), %rsi      # 0x25446
leaq 0x28(%rsp), %rdi
movq %rbx, %rdx
callq 0x179d3
leaq 0xdd11(%rip), %rdx      # 0x2544e
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x12447
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %rbx, %rdx
callq 0x179b4
leaq 0xdcfc(%rip), %rdx      # 0x25461
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x12447
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movq %rbx, %rdx
callq 0x179b4
leaq 0xdcd2(%rip), %rdx      # 0x25468
leaq 0x8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x12447
leaq 0xa8(%rsp), %rdi
callq 0x65c8
leaq 0x88(%rsp), %rdi
callq 0x65c8
leaq 0x68(%rsp), %rdi
callq 0x65c8
leaq 0x48(%rsp), %rdi
callq 0x65c8
leaq 0x28(%rsp), %rdi
callq 0x65c8
movq 0x8(%rsp), %rdi
callq 0x6270
testl %eax, %eax
je 0x17810
movq 0x207cb(%rip), %rdi     # 0x37fc0
leaq 0xdc71(%rip), %rsi      # 0x2546d
callq 0x62b0
leaq 0xdca4(%rip), %rsi      # 0x254ac
movq %rax, %rdi
callq 0x62b0
leaq 0x8(%rsp), %rdi
callq 0x65c8
leaq 0xe8(%rsp), %rdi
callq 0x65d0
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x65c8
jmp 0x1784e
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x65c8
jmp 0x17860
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x65c8
jmp 0x1786f
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x65c8
jmp 0x1787e
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x178aa
jmp 0x178b7
jmp 0x178a2
jmp 0x178b7
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x65c8
jmp 0x178c7
movq %rax, %rbx
jmp 0x178c7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x65c8
jmp 0x178ba
jmp 0x178b7
jmp 0x178b7
jmp 0x178b7
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x65d0
movq %rbx, %rdi
callq 0x6530
nop