// File: /workspace/github_cpp_makefile_star2_O3/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, 0x20(%rsp)
leaq 0xd8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x13205(%rip), %rsi     # 0x2f383
leaq 0x13201(%rip), %rdx     # 0x2f386
leaq 0xc8(%rsp), %rbx
movq %rbx, %rdi
callq 0x7008
movq %rbx, %rdi
callq 0x1bdf3
movq 0xc8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1c1ba
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x6300
leaq 0xe8(%rsp), %rdi
callq 0x6520
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x16c68
leaq 0x13199(%rip), %rsi     # 0x2f387
movq %rsp, %rdi
callq 0x65b0
movq (%rsp), %rsi
leaq 0xe8(%rsp), %rdi
movl $0x10, %edx
callq 0x6070
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1c227
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6300
leaq 0x1315d(%rip), %rsi     # 0x2f38b
leaq 0xe8(%rsp), %rdi
movl $0x21, %edx
callq 0x6370
leaq 0x13166(%rip), %rsi     # 0x2f3ad
leaq 0xe8(%rsp), %rdi
movl $0x1f, %edx
callq 0x6370
leaq 0x1316d(%rip), %rsi     # 0x2f3cd
leaq 0xe8(%rsp), %rdi
movl $0x20, %edx
callq 0x6370
leaq 0x13175(%rip), %rsi     # 0x2f3ee
leaq 0xe8(%rsp), %rdi
movl $0x22, %edx
callq 0x6370
leaq 0x23126(%rip), %r14     # 0x3f3b8
movq 0x8(%r14), %rax
cmpq (%r14), %rax
je 0x1c2fd
movl $0x1, %ebp
xorl %ebx, %ebx
leaq 0x130ac(%rip), %r15     # 0x2f355
leaq 0xe8(%rsp), %r12
leaq 0x13157(%rip), %r13     # 0x2f40f
movl $0x2, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x6370
movq (%r14), %rax
movq (%rax,%rbx,8), %rax
movl (%rax), %esi
movq %r12, %rdi
callq 0x6540
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x6370
movq 0x8(%r14), %rax
subq (%r14), %rax
movl %ebp, %ebx
sarq $0x3, %rax
incl %ebp
cmpq %rbx, %rax
jne 0x1c2b8
movq 0xe8(%rsp), %rax
leaq 0xe8(%rsp), %rdi
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x62c0
movsbl %al, %esi
leaq 0xe8(%rsp), %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6200
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x1c4ac
xorl %r15d, %r15d
leaq 0xe8(%rsp), %r12
leaq 0x130bd(%rip), %rbp     # 0x2f40f
movq (%rax,%r15,8), %rcx
cmpq $0x0, 0x10(%rcx)
je 0x1c3f3
movl $0x1, %edx
movq %r12, %rdi
leaq 0x12fe6(%rip), %rsi     # 0x2f356
callq 0x6370
movq (%r14), %rax
movq (%rax,%r15,8), %rax
movl (%rax), %esi
movq %r12, %rdi
callq 0x6540
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x13079(%rip), %rsi     # 0x2f411
callq 0x6370
movq (%r14), %rax
movq (%rax,%r15,8), %rax
movq 0x10(%rax), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x6540
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x6370
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x62c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6200
movq (%r14), %rax
movq (%rax,%r15,8), %rcx
movq 0x18(%rcx), %r13
cmpq 0x20(%rcx), %r13
je 0x1c495
movl $0x1, %edx
movq %r12, %rdi
leaq 0x12f46(%rip), %rsi     # 0x2f356
callq 0x6370
movq (%r14), %rax
movq (%rax,%r15,8), %rax
movl (%rax), %esi
movq %r12, %rdi
callq 0x6540
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x12fd9(%rip), %rsi     # 0x2f411
callq 0x6370
movq (%r13), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x6540
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x6370
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x62c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6200
addq $0x8, %r13
movq (%r14), %rax
movq (%rax,%r15,8), %rcx
jmp 0x1c3f7
incl %r15d
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jne 0x1c352
movq 0xe8(%rsp), %rax
leaq 0xe8(%rsp), %rdi
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x62c0
movsbl %al, %esi
leaq 0xe8(%rsp), %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6200
movq %rax, %r14
leaq 0x12f29(%rip), %rsi     # 0x2f415
movl $0xe, %edx
movq %rax, %rdi
callq 0x6370
leaq 0x12f24(%rip), %rsi     # 0x2f424
movl $0x21, %edx
movq %r14, %rdi
callq 0x6370
leaq 0x12f32(%rip), %rsi     # 0x2f446
movl $0xc, %edx
movq %r14, %rdi
callq 0x6370
leaq 0x12f2b(%rip), %rsi     # 0x2f453
movl $0x2, %edx
movq %r14, %rdi
callq 0x6370
leaq 0xe8(%rsp), %rdi
callq 0x6420
leaq 0x12f0d(%rip), %rsi     # 0x2f456
leaq 0xa8(%rsp), %rdi
movq 0x20(%rsp), %rdx
callq 0x1ca11
leaq 0x12efc(%rip), %rsi     # 0x2f45e
leaq 0xa8(%rsp), %rdi
callq 0x65b0
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1c596
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1c59d
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x60f0
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1c5f1
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x1c5f8
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x12e56(%rip), %rsi     # 0x2f471
callq 0x65b0
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1c648
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x1c650
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x68(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x60f0
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1c6ad
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0x1c6b5
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x88(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x12d9d(%rip), %rsi     # 0x2f478
callq 0x65b0
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1c706
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1c70c
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x1c741
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x6300
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x1c758
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6300
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x1c76f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6300
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x1c786
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6300
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c7a7
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x6300
movq (%rsp), %rdi
callq 0x6290
testl %eax, %eax
je 0x1c7e4
movq 0x22805(%rip), %rdi     # 0x3efc0
leaq 0x12cbb(%rip), %rsi     # 0x2f47d
movl $0x3e, %edx
callq 0x6370
movq 0x227ed(%rip), %rdi     # 0x3efc0
leaq 0x12ce2(%rip), %rsi     # 0x2f4bc
movl $0x7, %edx
callq 0x6370
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1c7ff
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6300
movq 0x227aa(%rip), %rax     # 0x3efb0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0xf0(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0xe8(%rsp,%rcx)
callq 0x6280
leaq 0x1e0(%rsp), %rdi
callq 0x6100
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x1c86e
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x6300
jmp 0x1c86e
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x1c88a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6300
jmp 0x1c88a
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x1c8a6
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6300
jmp 0x1c8a6
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x1c8c2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6300
jmp 0x1c8c2
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c930
movq 0xb8(%rsp), %rsi
jmp 0x1c91d
jmp 0x1c92d
jmp 0x1c907
jmp 0x1c907
jmp 0x1c92d
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1c93d
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x6300
jmp 0x1c93d
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1c930
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6300
jmp 0x1c930
jmp 0x1c92d
jmp 0x1c92d
jmp 0x1c92d
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x65d8
movq %rbx, %rdi
callq 0x6560
nop