// File: 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:
subq $0x408, %rsp            # imm = 0x408
movq %rdi, 0xb8(%rsp)
movq %rdi, 0x400(%rsp)
leaq 0x3df(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
callq 0x66c0
movq 0xc0(%rsp), %rdx
leaq 0x20128(%rip), %rsi     # 0x54353
leaq 0x3e0(%rsp), %rdi
callq 0x7500
jmp 0x3423a
leaq 0x3e0(%rsp), %rdi
callq 0x33d60
jmp 0x34249
leaq 0x3e0(%rsp), %rdi
callq 0x6778
leaq 0x3df(%rsp), %rdi
callq 0x6400
leaq 0x1c8(%rsp), %rdi
callq 0x6660
movq 0xb8(%rsp), %rsi
leaq 0x200d8(%rip), %rdx     # 0x54357
leaq 0x1a8(%rsp), %rdi
callq 0x20f80
jmp 0x3428e
leaq 0x1a8(%rsp), %rdi
callq 0x6160
movq %rax, %rsi
leaq 0x1c8(%rsp), %rdi
movl $0x10, %edx
callq 0x6080
jmp 0x342b2
leaq 0x1a8(%rsp), %rdi
callq 0x6778
leaq 0x20095(%rip), %rsi     # 0x5435b
leaq 0x1c8(%rsp), %rdi
callq 0x6370
movq %rax, 0xb0(%rsp)
jmp 0x342dd
movq 0xb0(%rsp), %rdi
leaq 0x20091(%rip), %rsi     # 0x5437d
callq 0x6370
movq %rax, 0xa8(%rsp)
jmp 0x342fb
movq 0xa8(%rsp), %rdi
leaq 0x20093(%rip), %rsi     # 0x5439d
callq 0x6370
movq %rax, 0xa0(%rsp)
jmp 0x34319
movq 0xa0(%rsp), %rdi
leaq 0x20096(%rip), %rsi     # 0x543be
callq 0x6370
jmp 0x3432f
movl $0x0, 0x1a4(%rsp)
movl 0x1a4(%rsp), %eax
movq %rax, 0x98(%rsp)
leaq 0x3a138(%rip), %rdi     # 0x6e488
callq 0x34dc0
movq %rax, %rcx
movq 0x98(%rsp), %rax
cmpq %rcx, %rax
je 0x3446e
leaq 0x1ffb5(%rip), %rsi     # 0x54325
leaq 0x1c8(%rsp), %rdi
callq 0x6370
movq %rax, 0x90(%rsp)
jmp 0x34387
movl 0x1a4(%rsp), %eax
movl %eax, %esi
leaq 0x3a0f1(%rip), %rdi     # 0x6e488
callq 0x34f80
movq 0x90(%rsp), %rdi
movq (%rax), %rax
movl (%rax), %esi
callq 0x6690
movq %rax, 0x88(%rsp)
jmp 0x343b8
movq 0x88(%rsp), %rdi
leaq 0x20018(%rip), %rsi     # 0x543df
callq 0x6370
jmp 0x343ce
jmp 0x343d0
movl 0x1a4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1a4(%rsp)
jmp 0x3433a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0x3441d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
leaq 0x3e0(%rsp), %rdi
callq 0x6778
leaq 0x3df(%rsp), %rdi
callq 0x6400
jmp 0x349c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0x349ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
leaq 0x1a8(%rsp), %rdi
callq 0x6778
jmp 0x349ba
movq 0x39b23(%rip), %rsi     # 0x6df98
leaq 0x1c8(%rsp), %rdi
callq 0x63d0
jmp 0x34484
movl $0x0, 0x1a0(%rsp)
movl 0x1a0(%rsp), %eax
movq %rax, 0x80(%rsp)
leaq 0x39fe3(%rip), %rdi     # 0x6e488
callq 0x34dc0
movq %rax, %rcx
movq 0x80(%rsp), %rax
cmpq %rcx, %rax
je 0x346e3
movl 0x1a0(%rsp), %eax
movl %eax, %esi
leaq 0x39fba(%rip), %rdi     # 0x6e488
callq 0x34f80
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x3459b
leaq 0x1fe3e(%rip), %rsi     # 0x54326
leaq 0x1c8(%rsp), %rdi
callq 0x6370
movq %rax, 0x78(%rsp)
jmp 0x344fc
movl 0x1a0(%rsp), %eax
movl %eax, %esi
leaq 0x39f7c(%rip), %rdi     # 0x6e488
callq 0x34f80
movq 0x78(%rsp), %rdi
movq (%rax), %rax
movl (%rax), %esi
callq 0x6690
movq %rax, 0x70(%rsp)
jmp 0x34527
movq 0x70(%rsp), %rdi
leaq 0x1feae(%rip), %rsi     # 0x543e1
callq 0x6370
movq %rax, 0x68(%rsp)
jmp 0x3453f
movl 0x1a0(%rsp), %eax
movl %eax, %esi
leaq 0x39f39(%rip), %rdi     # 0x6e488
callq 0x34f80
movq 0x68(%rsp), %rdi
movq (%rax), %rax
movq 0x10(%rax), %rax
movl (%rax), %esi
callq 0x6690
movq %rax, 0x60(%rsp)
jmp 0x3456e
movq 0x60(%rsp), %rdi
leaq 0x1fe65(%rip), %rsi     # 0x543df
callq 0x6370
movq %rax, 0x58(%rsp)
jmp 0x34586
movq 0x58(%rsp), %rdi
movq 0x39a06(%rip), %rsi     # 0x6df98
callq 0x63d0
jmp 0x34599
jmp 0x3459b
movl 0x1a0(%rsp), %eax
movl %eax, %esi
leaq 0x39edd(%rip), %rdi     # 0x6e488
callq 0x34f80
movq (%rax), %rdi
addq $0x18, %rdi
callq 0x350a0
movq %rax, 0x198(%rsp)
movl 0x1a0(%rsp), %eax
movl %eax, %esi
leaq 0x39eb4(%rip), %rdi     # 0x6e488
callq 0x34f80
movq (%rax), %rdi
addq $0x18, %rdi
callq 0x35110
movq %rax, 0x190(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x350d0
testb $0x1, %al
jne 0x3460b
jmp 0x346cb
leaq 0x1fd14(%rip), %rsi     # 0x54326
leaq 0x1c8(%rsp), %rdi
callq 0x6370
movq %rax, 0x50(%rsp)
jmp 0x34626
movl 0x1a0(%rsp), %eax
movl %eax, %esi
leaq 0x39e52(%rip), %rdi     # 0x6e488
callq 0x34f80
movq 0x50(%rsp), %rdi
movq (%rax), %rax
movl (%rax), %esi
callq 0x6690
movq %rax, 0x48(%rsp)
jmp 0x34651
movq 0x48(%rsp), %rdi
leaq 0x1fd84(%rip), %rsi     # 0x543e1
callq 0x6370
movq %rax, 0x40(%rsp)
jmp 0x34669
leaq 0x198(%rsp), %rdi
callq 0x35140
movq 0x40(%rsp), %rdi
movq (%rax), %rax
movl (%rax), %esi
callq 0x6690
movq %rax, 0x38(%rsp)
jmp 0x3468c
movq 0x38(%rsp), %rdi
leaq 0x1fd47(%rip), %rsi     # 0x543df
callq 0x6370
movq %rax, 0x30(%rsp)
jmp 0x346a4
movq 0x30(%rsp), %rdi
movq 0x398e8(%rip), %rsi     # 0x6df98
callq 0x63d0
jmp 0x346b7
jmp 0x346b9
leaq 0x198(%rsp), %rdi
callq 0x35150
jmp 0x345c4
jmp 0x346cd
movl 0x1a0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1a0(%rsp)
jmp 0x3448f
movq 0x398ae(%rip), %rsi     # 0x6df98
leaq 0x1c8(%rsp), %rdi
callq 0x63d0
movq %rax, 0x28(%rsp)
jmp 0x346fe
movq 0x28(%rsp), %rdi
leaq 0x1fcdb(%rip), %rsi     # 0x543e5
callq 0x6370
movq %rax, 0x20(%rsp)
jmp 0x34716
movq 0x20(%rsp), %rdi
leaq 0x1fcd2(%rip), %rsi     # 0x543f4
callq 0x6370
movq %rax, 0x18(%rsp)
jmp 0x3472e
movq 0x18(%rsp), %rdi
leaq 0x1fcdc(%rip), %rsi     # 0x54416
callq 0x6370
movq %rax, 0x10(%rsp)
jmp 0x34746
movq 0x10(%rsp), %rdi
leaq 0x1fcd1(%rip), %rsi     # 0x54423
callq 0x6370
jmp 0x34759
leaq 0x1c8(%rsp), %rdi
callq 0x6580
jmp 0x34768
movq 0xb8(%rsp), %rdx
leaq 0x1fcaf(%rip), %rsi     # 0x54426
leaq 0xd0(%rsp), %rdi
callq 0x351c0
jmp 0x34786
leaq 0x1fca1(%rip), %rdx     # 0x5442e
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x20990
jmp 0x347a4
movq 0xb8(%rsp), %rdx
leaq 0x110(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x35170
jmp 0x347c3
leaq 0x1fc77(%rip), %rdx     # 0x54441
leaq 0x130(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x20990
jmp 0x347e1
movq 0xb8(%rsp), %rdx
leaq 0x150(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x35170
jmp 0x34800
leaq 0x1fc41(%rip), %rdx     # 0x54448
leaq 0x170(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x20990
jmp 0x3481e
leaq 0x150(%rsp), %rdi
callq 0x6778
leaq 0x130(%rsp), %rdi
callq 0x6778
leaq 0x110(%rsp), %rdi
callq 0x6778
leaq 0xf0(%rsp), %rdi
callq 0x6778
leaq 0xd0(%rsp), %rdi
callq 0x6778
leaq 0x170(%rsp), %rdi
callq 0x6160
movq %rax, %rdi
callq 0x6320
movl %eax, 0xc(%rsp)
jmp 0x3487a
movl 0xc(%rsp), %eax
movl %eax, 0xcc(%rsp)
cmpl $0x0, 0xcc(%rsp)
je 0x34998
movq 0x39726(%rip), %rdi     # 0x6dfc0
leaq 0x1fbac(%rip), %rsi     # 0x5444d
callq 0x6370
movq %rax, (%rsp)
jmp 0x348ac
movq (%rsp), %rdi
leaq 0x1fbd5(%rip), %rsi     # 0x5448c
callq 0x6370
jmp 0x348be
jmp 0x34998
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0x34966
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0x34959
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0x3494c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
jmp 0x3493f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x6778
leaq 0x130(%rsp), %rdi
callq 0x6778
leaq 0x110(%rsp), %rdi
callq 0x6778
leaq 0xf0(%rsp), %rdi
callq 0x6778
leaq 0xd0(%rsp), %rdi
callq 0x6778
jmp 0x349ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3d0(%rsp)
movl %eax, 0x3cc(%rsp)
leaq 0x170(%rsp), %rdi
callq 0x6778
jmp 0x349ba
leaq 0x170(%rsp), %rdi
callq 0x6778
leaq 0x1c8(%rsp), %rdi
callq 0x6780
addq $0x408, %rsp            # imm = 0x408
retq
leaq 0x1c8(%rsp), %rdi
callq 0x6780
movq 0x3d0(%rsp), %rdi
callq 0x66b0
nopw %cs:(%rax,%rax)
nop