LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/type_table.cpp
// Function: type_table::add_type(type_descriptor*)
int type_table::add_type( type_descriptor* td ){

    map<string, int>::iterator i = names.find( td->name );
    if ( i == names.end() ){
        names[ td->name ] = types.size();
        types.push_back( td );
        
        return types.size()-1;
    }
    
    return (*i).second;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
leaq 0x18(%rdi), %r14
addq $0x8, %rsi
movq %r14, %rdi
callq 0x1a384
leaq 0x20(%rbx), %rcx
cmpq %rcx, %rax
je 0x19f97
movl 0x40(%rax), %eax
jmp 0x19fe9
movq 0x8(%rbx), %r15
subq (%rbx), %r15
shrq $0x3, %r15
movq 0x8(%rsp), %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x1a308
movl %r15d, (%rax)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x19fcf
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x19fdc
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x1a4de
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x3, %rax
decl %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/type_table.cpp
// Function: type_table::dump(std::ostream&)
void type_table::dump(ostream &strm) {
    strm << " TYPES:" << endl;
    vector<type_descriptor*>::iterator it;
    for (it=types.begin(); it != types.end(); ++it){
        (*it)->dump(strm);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x14050(%rip), %rsi     # 0x2e304
movl $0x7, %edx
movq %rbx, %rdi
callq 0x6360
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x62b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x61f0
movq (%r14), %r15
cmpq 0x8(%r14), %r15
je 0x1a302
movq (%r15), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *(%rax)
addq $0x8, %r15
jmp 0x1a2eb
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/llog.cpp
// Function: llog::warning(int, int)
void llog::warning(int l, int c){
    string b = buf.str();
    buf.str("");
    buf << "Warning " << l << ":" << c << ": "<< b;
    messages[l][c].push_back(buf.str());
    buf.str("");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
movl %esi, 0x4(%rsp)
movl %edx, (%rsp)
leaq 0x50(%rdi), %rbx
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x64a0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x13b37(%rip), %rdx     # 0x2e382
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x6fec
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6450
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a87c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
leaq 0x48(%r14), %r15
leaq 0x13a85(%rip), %rsi     # 0x2e30c
movl $0x8, %edx
movq %r15, %rdi
callq 0x6360
movl 0x4(%rsp), %esi
movq %r15, %rdi
callq 0x6530
movq %rax, %r15
leaq 0x13a60(%rip), %rsi     # 0x2e30a
movl $0x1, %edx
movq %rax, %rdi
callq 0x6360
movl (%rsp), %esi
movq %r15, %rdi
callq 0x6530
movq %rax, %r15
leaq 0x11deb(%rip), %rsi     # 0x2c6b7
movl $0x2, %edx
movq %rax, %rdi
callq 0x6360
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r15, %rdi
callq 0x6360
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x1ac80
movq %rsp, %rsi
movq %rax, %rdi
callq 0x1ace4
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x64a0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1b2ac
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a937
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x13a3c(%rip), %rdx     # 0x2e382
movq %rdx, %rsi
callq 0x6fec
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6450
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a972
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a98d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x62f0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x1a9a1
jmp 0x1a9bf
jmp 0x1a9a1
jmp 0x1a9bf
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a9c2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1a9c2
jmp 0x1a9bf
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a9dd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x62f0
movq %rbx, %rdi
callq 0x6550
nop
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/llog.cpp
// Function: llog::error(int, int)
void llog::error(int l, int c){
    string b = buf.str();
    buf.str("");
    if (b.compare("parse error")) {
        buf << "Error   " << l << ":" << c << ": "<< b;
        messages[l][c].push_back(buf.str());
        buf.str("");
    }
    registered_error = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
movl %edx, (%rsp)
leaq 0x50(%rdi), %r14
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x64a0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x13965(%rip), %rdx     # 0x2e382
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x6fec
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x6450
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1aa4e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
leaq 0x138c0(%rip), %rsi     # 0x2e315
leaq 0x28(%rsp), %rdi
callq 0x60d0
testl %eax, %eax
je 0x1ab5d
leaq 0x48(%rbx), %r15
leaq 0x138af(%rip), %rsi     # 0x2e321
movl $0x8, %edx
movq %r15, %rdi
callq 0x6360
movl 0x4(%rsp), %esi
movq %r15, %rdi
callq 0x6530
movq %rax, %r15
leaq 0x13875(%rip), %rsi     # 0x2e30a
movl $0x1, %edx
movq %rax, %rdi
callq 0x6360
movl (%rsp), %esi
movq %r15, %rdi
callq 0x6530
movq %rax, %r15
leaq 0x11c00(%rip), %rsi     # 0x2c6b7
movl $0x2, %edx
movq %rax, %rdi
callq 0x6360
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r15, %rdi
callq 0x6360
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ac80
movq %rsp, %rsi
movq %rax, %rdi
callq 0x1ace4
movq %rax, %r15
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x64a0
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x1b2ac
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ab22
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x13851(%rip), %rdx     # 0x2e382
movq %rdx, %rsi
callq 0x6fec
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x6450
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ab5d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
movb $0x1, 0x30(%rbx)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ab7c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x62f0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x1ab90
jmp 0x1abae
jmp 0x1ab90
jmp 0x1abae
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1abb1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1abb1
jmp 0x1abae
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1abcc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x62f0
movq %rbx, %rdi
callq 0x6550
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/block.cpp
// Function: Block::Block(bool)
Block::Block(bool with_vector){
    w_vector = with_vector;
    if ( with_vector ){
        instructions.vinst = new vector<inst*>();
    } else {
        instructions.linst = new list<inst*>();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movq $0x0, 0x28(%rdi)
movb %sil, 0x4(%rdi)
testl %esi, %esi
je 0x1b551
movl $0x18, %edi
callq 0x62e0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
jmp 0x1b570
movl $0x18, %edi
callq 0x62e0
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq %rax, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%r15), %rdi
testq %rdi, %rdi
je 0x1b591
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x62f0
movq %r14, %rdi
callq 0x6550
nop
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/block.cpp
// Function: Block::append_inst(inst*, bool)
void Block::append_inst(inst *i, bool gen_label) {

    int ninst = next_instruction();
    if ( w_vector ){
        instructions.vinst->push_back(i);
        
        if ( gen_label ){
            instructions.vinst->back()->label = ninst;
        }
    } else {
        instructions.linst->push_back(i);
        
        if ( gen_label ){
            instructions.linst->back()->label = ninst;
        }
    }
    
    if ( gen_label ){
        next_label++;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
movq %rsi, (%rsp)
movl 0x22dcb(%rip), %r15d    # 0x3e37c
movq 0x8(%rdi), %r14
cmpb $0x1, 0x4(%rdi)
jne 0x1b5cf
movq 0x8(%r14), %rax
cmpq 0x10(%r14), %rax
je 0x1b5f7
movq %rsi, (%rax)
addq $0x8, 0x8(%r14)
jmp 0x1b605
movl $0x18, %edi
callq 0x62e0
movq (%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x6080
incq 0x10(%r14)
movl $0x10, %eax
jmp 0x1b60c
movq %rsp, %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1ca86
movq $-0x8, %rax
testb %bpl, %bpl
je 0x1b627
movq 0x8(%rbx), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx,%rax), %rax
movl %r15d, 0x8(%rax)
incl 0x22d55(%rip)           # 0x3e37c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/block.cpp
// Function: Block::dump(std::ostream&, bool)
void Block::dump(ostream &strm, bool with_comments) {
    if ( w_vector ){
        vector<inst*>::iterator it = instructions.vinst->begin();
        for (; it != instructions.vinst->end(); ++ it) {
            strm << ((inst*)(*it))->to_string(with_comments) << endl;
        }
    } else {
        list<inst*>::iterator it = instructions.linst->begin();
        for (; it != instructions.linst->end(); ++ it) {
            strm << ((inst*)(*it))->to_string(with_comments) << endl;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq (%rax), %r13
cmpb $0x1, 0x4(%rdi)
jne 0x1b709
cmpq 0x8(%rax), %r13
je 0x1b786
movzbl %dl, %ebp
leaq 0x8(%rsp), %r15
movq (%r13), %rsi
movq (%rsi), %rax
movq %r15, %rdi
movl %ebp, %edx
callq *(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x6360
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x62b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x61f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1b6f9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
addq $0x8, %r13
movq 0x8(%r14), %rax
cmpq 0x8(%rax), %r13
jne 0x1b693
jmp 0x1b786
cmpq %rax, %r13
je 0x1b786
movzbl %dl, %ebp
leaq 0x8(%rsp), %r15
movq 0x10(%r13), %rsi
movq (%rsi), %rax
movq %r15, %rdi
movl %ebp, %edx
callq *(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x6360
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x62b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x61f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1b77c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
movq (%r13), %r13
cmpq 0x8(%r14), %r13
jne 0x1b716
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1b797
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1b7b6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
movq %rbx, %rdi
callq 0x6550
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/block.cpp
// Function: Block::max_label()
unsigned int Block::max_label(){
    
    unsigned int maxl = 0;
    
    if ( w_vector ){
        
        unsigned int nsize = instructions.vinst->size();
        for (unsigned int i=0; i<nsize; i++){
            inst* current_inst = (*(instructions.vinst))[i];
            maxl = max(maxl, current_inst->label);
        }
        
    } else {
        
        list<inst*>::iterator it = instructions.linst->begin();
        for( ; it != instructions.linst->end(); ++it){
            inst* current_inst = *it;
            maxl = max(maxl, current_inst->label);
        }
    }
    
    return maxl;
}

// Assembly:
movq 0x8(%rdi), %rdx
cmpb $0x1, 0x4(%rdi)
jne 0x1b7f6
movq (%rdx), %rcx
movq 0x8(%rdx), %rax
subq %rcx, %rax
shrq $0x3, %rax
testl %eax, %eax
je 0x1b818
movl %eax, %edx
xorl %esi, %esi
xorl %eax, %eax
movq (%rcx,%rsi,8), %rdi
movl 0x8(%rdi), %edi
cmpl %edi, %eax
cmovbel %edi, %eax
incq %rsi
cmpq %rsi, %rdx
jne 0x1b7e0
jmp 0x1b817
movq (%rdx), %rcx
cmpq %rdx, %rcx
je 0x1b818
xorl %eax, %eax
movq 0x10(%rcx), %rsi
movl 0x8(%rsi), %esi
cmpl %esi, %eax
cmovbel %esi, %eax
movq (%rcx), %rsi
movq %rsi, %rcx
cmpq %rdx, %rsi
jne 0x1b800
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/inst.cpp
// Function: opd::opd(int, char)
opd::opd(int s, char type){

    data.pint = s;
    this->type = type;
    switch (type) {
        case O_LABEL: case O_INT:
            data.pint = s;
            break;
        case O_SL:
            data.spim.lab = s;
            break;
        case O_SI:
            data.spim.imm = s;
            break;
        default:
            throw string("") + "Error de implementaci�n, tipo " + itoa_(type) + " de instrucci�n desconocido";
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %r14d
movl %esi, (%rdi)
movb %r14b, 0x10(%rdi)
leal -0x2(%r14), %eax
rorl %eax
cmpl $0x7, %eax
ja 0x1d012
leaq 0x114d1(%rip), %rcx     # 0x2e4c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %esi, (%rdi)
jmp 0x1d003
movl %esi, 0x4(%rdi)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x6150
movq %rax, %rbx
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x11353(%rip), %rdx     # 0x2e382
leaq 0x48(%rsp), %rdi
movq %rdx, %rsi
callq 0x6fec
leaq 0x115d4(%rip), %rsi     # 0x2e617
leaq 0x48(%rsp), %rdi
callq 0x65a0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1d070
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x1d07d
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl %r14d, %edi
callq 0x17e63
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x65a0
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1d0cc
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x1d0d9
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
leaq 0x11537(%rip), %rdx     # 0x2e636
movq %rbx, %rdi
callq 0x21f52
xorl %ebp, %ebp
leaq 0x20b98(%rip), %rsi     # 0x3dca8
movq 0x20e81(%rip), %rdx     # 0x3df98
movq %rbx, %rdi
callq 0x6520
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x1d141
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1d141
movq %rax, %r14
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1d160
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1d160
movq %rax, %r14
movb $0x1, %bpl
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x1d17f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1d17f
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x1d18c
movq %rbx, %rdi
callq 0x6230
movq %r14, %rdi
callq 0x6550
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/inst.cpp
// Function: opd::opd(int, int, char)
opd::opd(int s1, int s2, char type){

    this->type = type;
    switch (type) {
        case O_SLI:
            data.spim.lab = s1;
            data.spim.imm = s2;
            break;
        case O_SLR:
            data.spim.lab = s1;
            data.spim.reg = s2;
            break;
        case O_SIR:
            data.spim.imm = s1;
            data.spim.reg = s2;
            break;
        default:
            throw string("") + "Error de implementaci�n, tipo " + itoa_(type) + " de instrucci�n desconocido";
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %ebp
movb %bpl, 0x10(%rdi)
cmpl $0x30, %ecx
je 0x1d1c2
cmpl $0x28, %ebp
je 0x1d1be
cmpl $0x18, %ebp
jne 0x1d1d7
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
jmp 0x1d1c8
movl %esi, (%rdi)
jmp 0x1d1c5
movl %esi, 0x4(%rdi)
movl %edx, 0x8(%rdi)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x6150
movq %rax, %rbx
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1118e(%rip), %rdx     # 0x2e382
leaq 0x48(%rsp), %rdi
movq %rdx, %rsi
callq 0x6fec
leaq 0x1140f(%rip), %rsi     # 0x2e617
leaq 0x48(%rsp), %rdi
callq 0x65a0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1d235
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x1d242
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl %ebp, %edi
callq 0x17e63
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x65a0
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1d290
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x1d29d
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
leaq 0x11373(%rip), %rdx     # 0x2e636
movq %rbx, %rdi
callq 0x21f52
xorl %ebp, %ebp
leaq 0x209d4(%rip), %rsi     # 0x3dca8
movq 0x20cbd(%rip), %rdx     # 0x3df98
movq %rbx, %rdi
callq 0x6520
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x1d305
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1d305
movq %rax, %r14
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1d324
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1d324
movq %rax, %r14
movb $0x1, %bpl
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x1d343
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1d343
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x1d350
movq %rbx, %rdi
callq 0x6230
movq %r14, %rdi
callq 0x6550
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/inst.cpp
// Function: opd::opd(int, int, int)
opd::opd(int lab, int imm, int reg){

    this->type = O_SLIR;
    data.spim.lab = lab;
    data.spim.imm = imm;
    data.spim.reg = reg;
}

// Assembly:
movb $0x38, 0x10(%rdi)
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/inst.cpp
// Function: inst::get_goal_label()
unsigned int inst::get_goal_label(){
    assert (op == GOTO);
    if (0 != arg2) {
        return arg2->data.pint;
    } else {
        return -1;
    }
}

// Assembly:
cmpl $0x16, 0xc(%rdi)
jne 0x1da0c
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x1da06
movl (%rax), %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
pushq %rax
leaq 0x10c50(%rip), %rdi     # 0x2e664
leaq 0x10c54(%rip), %rsi     # 0x2e66f
leaq 0x10c5a(%rip), %rcx     # 0x2e67c
movl $0x79, %edx
callq 0x61d0
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/inst.cpp
// Function: inst::mandatory_jump()
bool inst::mandatory_jump(){
    assert(is_jump());
    switch ( op ){
        case GOTO:
//        case CALL:
        case RETURN:
        case EPILOGUE:
            return true;
        default:
            return false;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x8(%rax)
testb %al, %al
je 0x1da62
movl 0xc(%rbx), %ecx
cmpl $0x17, %ecx
setb %dl
movl $0x418000, %eax         # imm = 0x418000
shrl %cl, %eax
andb %dl, %al
popq %rbx
retq
leaq 0x10c37(%rip), %rdi     # 0x2e6a0
leaq 0x10bff(%rip), %rsi     # 0x2e66f
leaq 0x10c33(%rip), %rcx     # 0x2e6aa
movl $0x95, %edx
callq 0x61d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/inst.cpp
// Function: quad::quad(inst::OP, opd*, opd*, opd*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
quad::quad(OP op, opd *arg0, opd *arg1, opd *arg2, string comment){
    this->op = op;
    this->arg0 = arg0;
    this->arg1 = arg1;
    this->arg2 = arg2;
    if (comment.compare("")) {
        comment = "# " + comment + "\n";
    }
    this->comment = comment;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %r9, %r14
movq %rdi, %rbx
leaq 0x38(%rdi), %r12
movq %r12, 0x28(%rdi)
movq $0x0, 0x30(%rdi)
movb $0x0, 0x38(%rdi)
leaq 0x20218(%rip), %rax     # 0x3dcc8
movq %rax, (%rdi)
movl %esi, 0xc(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
leaq 0x108b9(%rip), %rsi     # 0x2e382
movq %r9, %rdi
callq 0x60d0
testl %eax, %eax
je 0x1db80
leaq 0x10bee(%rip), %rsi     # 0x2e6ce
movq %rsp, %rdi
movq %r14, %rdx
callq 0x1c9ae
leaq 0x1088f(%rip), %rsi     # 0x2e381
movq %rsp, %rdi
callq 0x65a0
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1db21
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x1db29
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x63c0
movq (%r15), %rdi
cmpq %r13, %rdi
je 0x1db65
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x62f0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1db80
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x62f0
leaq 0x28(%rbx), %rdi
movq %r14, %rsi
callq 0x6180
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1dbbf
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1dbbf
jmp 0x1dbbc
movq %rax, %r14
leaq 0x20152(%rip), %rax     # 0x3dd18
movq %rax, (%rbx)
movq 0x28(%rbx), %rdi
cmpq %r12, %rdi
je 0x1dbde
movq (%r12), %rsi
incq %rsi
callq 0x62f0
movq %r14, %rdi
callq 0x6550
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/string_table.cpp
// Function: string_table::string_table()
string_table::string_table() {
    offset = 0;
    push_back("Se trató de utilizar una propiedad no activa de la unión en (");
    push_back(", ");
    push_back(")");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movl $0x0, (%rdi)
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xbdb2(%rip), %rsi      # 0x2e7f3
leaq 0xbdea(%rip), %rdx      # 0x2e832
leaq 0x40(%rsp), %rdi
callq 0x6fec
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x22dca
movl (%r14), %eax
movl 0x48(%rsp), %ecx
addl %ecx, %eax
incl %eax
movl %eax, (%r14)
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x22a84
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x62f0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9fb2(%rip), %rsi      # 0x2ca46
leaq 0x9fad(%rip), %rdx      # 0x2ca48
leaq 0x20(%rsp), %rdi
callq 0x6fec
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x22dca
movl (%r14), %eax
movl 0x28(%rsp), %ecx
addl %ecx, %eax
incl %eax
movl %eax, (%r14)
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x22ad7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x62f0
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9a11(%rip), %rsi      # 0x2c4f8
leaq 0x9a0b(%rip), %rdx      # 0x2c4f9
movq %rsp, %rdi
callq 0x6fec
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x22dca
movl (%r14), %eax
movl 0x8(%rsp), %ecx
addl %ecx, %eax
incl %eax
movl %eax, (%r14)
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x22b25
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x62f0
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x22b79
movq 0x10(%rsp), %rsi
jmp 0x22b6c
jmp 0x22b76
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x22b79
movq 0x30(%rsp), %rsi
jmp 0x22b6c
jmp 0x22b76
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x22b79
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x22b79
movq %rax, %r14
movq %rbx, %rdi
callq 0x1adf8
movq %r14, %rdi
callq 0x6550
nop
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/string_table.cpp
// Function: string_table::push_back(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int string_table::push_back(string s) {
    table.push_back(s);
    int t = offset;
    offset += s.length() + 1;//El null para asciiz
    return t;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
callq 0x22dca
movl (%r14), %eax
movl 0x8(%rbx), %ecx
addl %eax, %ecx
incl %ecx
movl %ecx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/string_table.cpp
// Function: string_table::to_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string string_table::to_string(string s) {
    string ss = "";
    for (unsigned int i = 0; i < s.length(); ++ i) {
        if ('\\' == s[i]) ss += '\\';
        ss += s[i];
    }
    return ss;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0xb7b0(%rip), %rdx      # 0x2e382
movq %rdx, %rsi
callq 0x6fec
cmpq $0x0, 0x8(%r14)
je 0x22c1b
movl $0x1, %ebp
xorl %r12d, %r12d
movq (%r14), %rax
cmpb $0x5c, (%rax,%r12)
jne 0x22c00
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x6290
movq (%r14), %rax
movsbl (%rax,%r12), %esi
movq %rbx, %rdi
callq 0x6290
movl %ebp, %r12d
incl %ebp
cmpq %r12, 0x8(%r14)
ja 0x22be9
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x22c3d
movq (%r15), %rsi
incq %rsi
callq 0x62f0
movq %r14, %rdi
callq 0x6550
nop
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/main.cpp
// Function: main_ast_create(main_args)
AST* main_ast_create(main_args args){

    p = new AST();
    yyin = args.in;
    do {
        yyparse();
    } while (!feof(yyin));

    if (args.to_single_archive){
        main_redirect_stdout("bla.output");
    }
    return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x28, %edi
callq 0x62e0
movq %rax, %r15
movq %rax, %rdi
callq 0x15c20
movq %r15, 0x13f2e(%rip)     # 0x3e3c8
movq %r14, 0x13fef(%rip)     # 0x3e490
callq 0x22fec
movq 0x13fe3(%rip), %rdi     # 0x3e490
callq 0x6480
testl %eax, %eax
je 0x2a4a1
testb $0x1, %bl
je 0x2a4c7
leaq 0x76c0(%rip), %rdi      # 0x31b82
callq 0x2a570
movq 0x13efa(%rip), %rax     # 0x3e3c8
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
callq 0x62f0
movq %rbx, %rdi
callq 0x6550
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/main.cpp
// Function: main_ast_check(AST*)
string_table* main_ast_check(AST *ast){

    string_table* strings = new string_table();
    symbol_table* st = new symbol_table(strings);
    
    ast->fill_and_check(st);
    
    delete st;

    return strings;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x20, %edi
callq 0x62e0
movq %rax, %rbx
movq %rax, %rdi
callq 0x22a0c
movl $0x48, %edi
callq 0x62e0
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x18354
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x8(%rax)
movq %r15, %rdi
callq 0x166da
movl $0x48, %esi
movq %r15, %rdi
callq 0x62f0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x48, %esi
movq %r15, %rdi
jmp 0x2a563
movq %rax, %r14
movl $0x20, %esi
movq %rbx, %rdi
callq 0x62f0
movq %r14, %rdi
callq 0x6550
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/main.cpp
// Function: main_redirect_stdout(char const*)
void main_redirect_stdout(const char *f)
{
    static FILE *fd = 0, *stdout_back = 0;
    static streambuf *rdbuf_back = 0;
    static ofstream filestr;
    if (0 == stdout_back) {
        stdout_back = stdout;
        rdbuf_back = cout.rdbuf();
    }
    if (0 != fd && stdout != fd) {
        fclose(fd);
        filestr.close();
    }
    if (0 == f) {
        stdout = stdout_back;
        cout.rdbuf(rdbuf_back);
    } else {
        fd = stdout = fopen(f, "w");
        filestr.open(f);
        cout.rdbuf(filestr.rdbuf());
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x14193(%rip), %al      # 0x3e710
testb %al, %al
je 0x2a65a
cmpq $0x0, 0x13f73(%rip)     # 0x3e500
jne 0x2a5bd
movq 0x139ea(%rip), %rax     # 0x3df80
movq (%rax), %rax
movq %rax, 0x13f60(%rip)     # 0x3e500
movq 0x13a19(%rip), %rax     # 0x3dfc0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq 0xe8(%rax,%rcx), %rax
movq %rax, 0x13f4b(%rip)     # 0x3e508
movq 0x13f34(%rip), %rdi     # 0x3e4f8
movq 0x139b5(%rip), %r14     # 0x3df80
testq %rdi, %rdi
je 0x2a5e6
cmpq %rdi, (%r14)
je 0x2a5e6
callq 0x62d0
leaq 0x13f2f(%rip), %rdi     # 0x3e510
callq 0x6410
testq %rbx, %rbx
je 0x2a62f
leaq 0x76d0(%rip), %rsi      # 0x31cc2
movq %rbx, %rdi
callq 0x6390
movq %rax, (%r14)
movq %rax, 0x13ef4(%rip)     # 0x3e4f8
leaq 0x13f05(%rip), %rdi     # 0x3e510
movq %rbx, %rsi
movl $0x10, %edx
callq 0x6070
movq 0x139a1(%rip), %rdi     # 0x3dfc0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
leaq 0x13eeb(%rip), %rsi     # 0x3e518
jmp 0x2a64e
movq 0x13eca(%rip), %rax     # 0x3e500
movq %rax, (%r14)
movq 0x13980(%rip), %rdi     # 0x3dfc0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movq 0x13eba(%rip), %rsi     # 0x3e508
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6590
leaq 0x140af(%rip), %rdi     # 0x3e710
callq 0x6570
testl %eax, %eax
je 0x2a585
leaq 0x13e9b(%rip), %rdi     # 0x3e510
callq 0x6510
movq 0x1394f(%rip), %rdi     # 0x3dfd0
leaq 0x13e88(%rip), %rsi     # 0x3e510
leaq 0x13c59(%rip), %rdx     # 0x3e2e8
callq 0x62a0
leaq 0x14075(%rip), %rdi     # 0x3e710
callq 0x61c0
jmp 0x2a585
movq %rax, %rbx
leaq 0x14061(%rip), %rdi     # 0x3e710
callq 0x61b0
movq %rbx, %rdi
callq 0x6550
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/main.cpp
// Function: main_tac_create(main_args, AST*)
Tac* main_tac_create(main_args args, AST *ast){

    Tac* tac = ast->to_tac();
    if (args.to_separate_archives) {
        main_redirect_stdout("bla.tac");
    }
    tac->dump(cout, args.tac_with_comments);

    if (!args.to_separate_archives) {
        cout << "-------------------------------------------------------" << endl << endl;
    }

    return tac;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rdx), %rax
movq %rdx, %rdi
callq *0x10(%rax)
movq %rax, %rbx
btl $0x8, %r14d
jb 0x2a75f
shrl $0x18, %r14d
andl $0x1, %r14d
movq 0x138d6(%rip), %r15     # 0x3dfc0
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x2af9a
leaq 0x73da(%rip), %rsi      # 0x31ad9
movl $0x37, %edx
movq %r15, %rdi
callq 0x6360
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x62b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x61f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x62b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x61f0
jmp 0x2a785
leaq 0x74a9(%rip), %rdi      # 0x31c0f
callq 0x2a570
shrl $0x18, %r14d
andl $0x1, %r14d
movq 0x13846(%rip), %rsi     # 0x3dfc0
movq %rbx, %rdi
movl %r14d, %edx
callq 0x2af9a
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/main.cpp
// Function: main_tac_dump(main_args, Tac*)
void main_tac_dump(main_args args, Tac* tac)
{
    main_redirect_stdout();
    cout << "Escribiendo bloques básico en bla.blocks"
         << " y grafo de flujo en bla.png\n\n";
    dump_in_file("bla");

    if (!args.to_separate_archives && !args.to_single_archive) {
        cout << "-------------------------------------------------------" << endl << endl;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
xorl %edi, %edi
callq 0x2a570
movq 0x13804(%rip), %rbx     # 0x3dfc0
leaq 0x7454(%rip), %rsi      # 0x31c17
movl $0x29, %edx
movq %rbx, %rdi
callq 0x6360
leaq 0x746a(%rip), %rsi      # 0x31c41
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x6360
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x3b8e(%rip), %rsi      # 0x2e383
leaq 0x3b8a(%rip), %rdx      # 0x2e386
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x6fec
movq %r15, %rdi
callq 0x1c0f3
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2a828
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
btl $0x8, %r14d
jb 0x2a89a
testb $0x1, %r14b
jne 0x2a89a
leaq 0x729d(%rip), %rsi      # 0x31ad9
movl $0x37, %edx
movq %rbx, %rdi
callq 0x6360
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x62b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x61f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x62b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x61f0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2a8c0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x62f0
movq %rbx, %rdi
callq 0x6550
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/Tac.cpp
// Function: Tac::backpatch(std::__cxx11::list<int, std::allocator<int>>&, int)
void Tac::backpatch(list<int>& l, int instr){
    list<int>::iterator it;
    for (it = l.begin(); it != l.end(); ++it){
        quad* in = (quad*)(*(block->instructions.vinst))[*it];
        in->arg2 = new opd(instr, O_LABEL);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r13
cmpq %rsi, %r13
je 0x2af64
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq (%r15), %rax
movq 0x8(%rax), %rax
movslq 0x10(%r13), %rcx
movq (%rax), %rax
movq (%rax,%rcx,8), %rbp
movl $0x18, %edi
callq 0x62e0
movq %rax, %r12
movq %rax, %rdi
movl %ebx, %esi
movl $0x6, %edx
callq 0x1cfca
movq %r12, 0x20(%rbp)
movq (%r13), %r13
cmpq %r14, %r13
jne 0x2af29
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x18, %esi
movq %r12, %rdi
callq 0x62f0
movq %rbx, %rdi
callq 0x6550
nop
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/codegen.cpp
// Function: register_descriptor::release_cost()
int register_descriptor::release_cost(){
    
    int cost = 0;
    set<symbol*>::iterator it = variables_available.begin();
    
    for ( ; it != variables_available.end(); ++it){
        symbol* s = *it;
        if ( s->availability.size() == 1 )
            cost++;
    }
    
    return cost;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
addq $0x30, %rbx
xorl %ebp, %ebp
cmpq %rbx, %rax
je 0x2b4ff
movq 0x20(%rax), %rcx
xorl %edx, %edx
cmpq $0x1, 0x70(%rcx)
sete %dl
addl %edx, %ebp
movq %rax, %rdi
callq 0x6370
jmp 0x2b4e0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/kelwinfc[P]ci4721-Fernandez-Gyomrey/src/codegen.cpp
// Function: get_reg(symbol*)
int get_reg(symbol* s){
    
    int index = 0;
    int empty = -1;
    
    vector<register_descriptor>::iterator it = register_descriptors.begin();
    
    if ( s ){
        // Si ya esta en un registro, aprovecharlo
        for( ; it != register_descriptors.end(); ++it){
            if ( it->contains(s) )
                return index;
            else if ( it->is_free() ){
                empty = index;
            }
            index++;
        }
        
        // El simbolo no se encuentra ya en un registro
        
        // Hay algun registro vacio, usarlo
        if ( empty != -1 ){
            return empty;
        }
    }
    
    int cheapest_register = 0;
    int cost = register_descriptors[0].release_cost();
    
    it = register_descriptors.begin()+1;
    index = 0;
    for( ; it != register_descriptors.end(); ++it){
        int next_cost = it->release_cost();
        
        if ( next_cost < cost ){
            cheapest_register = index;
            cost = next_cost;
        }
        index++;
    }
    
    //TODO liberar lo que sea necesario liberar (hacer los ST respectivos)
    //TODO cargar el simbolo en un registro
    return cheapest_register;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rax
leaq 0x12d82(%rip), %rcx     # 0x3e398
movq (%rcx), %rdi
testq %rax, %rax
je 0x2b68f
movq 0x8(%rcx), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpq %rsi, %rdi
je 0x2b688
xorl %ebx, %ebx
movq %rdi, %r8
movq 0x38(%r8), %r11
leaq 0x30(%r8), %r9
movq %r9, %r10
testq %r11, %r11
je 0x2b65d
movq %r9, %r10
xorl %r14d, %r14d
cmpq %rax, 0x20(%r11)
setb %r14b
cmovaeq %r11, %r10
movq 0x10(%r11,%r14,8), %r11
testq %r11, %r11
jne 0x2b644
movq %r9, %r11
cmpq %r9, %r10
je 0x2b670
cmpq %rax, 0x20(%r10)
cmovaq %r9, %r10
movq %r10, %r11
cmpq %r9, %r11
jne 0x2b6c9
cmpq $0x0, 0x50(%r8)
cmovel %ebx, %edx
incl %ebx
addq $0x60, %r8
cmpq %rsi, %r8
jne 0x2b631
movl %edx, %ebx
cmpl $-0x1, %edx
jne 0x2b6c9
movq 0x8(%rcx), %r15
leaq 0x60(%rdi), %r14
cmpq %r15, %r14
je 0x2b6c7
callq 0x2b4d0
movl %eax, %ebp
xorl %r12d, %r12d
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x2b4d0
cmpl %ebp, %eax
cmovll %r12d, %ebx
cmovll %eax, %ebp
incl %r12d
addq $0x60, %r14
cmpq %r15, %r14
jne 0x2b6a8
jmp 0x2b6c9
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/main.cpp
// Function: main
int main(int argc, char* argv[])
{
    mg_init();
    Zobrist::init();
    bb_init();
    uci();
    return 0;
}

// Assembly:
pushq %rax
callq 0xfd60
callq 0x1a464
callq 0xd844
callq 0x19c86
xorl %eax, %eax
popq %rcx
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/MagicMoves.cpp
// Function: initmagicmoves_occ(int const*, int, unsigned long long)
U64 initmagicmoves_occ(const int* squares, const int numSquares, const U64 linocc)
{
	int i;
	U64 ret=0;
	for(i=0;i<numSquares;i++)
		if(linocc&(((U64)(1))<<i)) ret|=(((U64)(1))<<squares[i]);
	return ret;
}

// Assembly:
testl %esi, %esi
jle 0xd509
movl %esi, %ecx
xorl %esi, %esi
xorl %eax, %eax
btq %rsi, %rdx
jae 0xd500
movb (%rdi,%rsi,4), %r8b
btsq %r8, %rax
incq %rsi
cmpq %rsi, %rcx
jne 0xd4f2
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/MagicMoves.cpp
// Function: initmagicmoves_Rmoves(int, unsigned long long)
U64 initmagicmoves_Rmoves(const int square, const U64 occ)
{
	U64 ret=0;
	U64 bit;
	U64 rowbits=(((U64)0xFF)<<(8*(square/8)));
	
	bit=(((U64)(1))<<square);
	do
	{
		bit<<=8;
		ret|=bit;
	}while(bit && !(bit&occ));
	bit=(((U64)(1))<<square);
	do
	{
		bit>>=8;
		ret|=bit;
	}while(bit && !(bit&occ));
	bit=(((U64)(1))<<square);
	do
	{
		bit<<=1;
		if(bit&rowbits) ret|=bit;
		else break;
	}while(!(bit&occ));
	bit=(((U64)(1))<<square);
	do
	{
		bit>>=1;
		if(bit&rowbits) ret|=bit;
		else break;
	}while(!(bit&occ));
	return ret;
}

// Assembly:
movl %edi, %ecx
leal 0x7(%rcx), %edx
testl %edi, %edi
cmovnsl %edi, %edx
movl $0x1, %edi
shlq %cl, %rdi
andl $-0x8, %edx
xorl %eax, %eax
movq %rdi, %rcx
shlq $0x8, %rcx
orq %rcx, %rax
testq %rcx, %rcx
je 0xd53a
movq %rcx, %r8
andq %rsi, %r8
je 0xd526
movq %rdi, %rcx
movq %rcx, %r8
shrq $0x8, %rcx
orq %rcx, %rax
cmpq $0x100, %r8             # imm = 0x100
jb 0xd558
movq %rcx, %r8
andq %rsi, %r8
je 0xd53d
movl $0xff, %r8d
movl %edx, %ecx
shlq %cl, %r8
movq %rdi, %rcx
addq %rcx, %rcx
testq %r8, %rcx
je 0xd580
orq %rcx, %rax
testq %rsi, %rcx
je 0xd566
jmp 0xd580
orq %rdi, %rax
testq %rsi, %rdi
jne 0xd588
shrq %rdi
testq %r8, %rdi
jne 0xd578
retq
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/MagicMoves.cpp
// Function: initmagicmoves_Bmoves(int, unsigned long long)
U64 initmagicmoves_Bmoves(const int square, const U64 occ)
{
	U64 ret=0;
	U64 bit;
	U64 bit2;
	U64 rowbits=(((U64)0xFF)<<(8*(square/8)));
	
	bit=(((U64)(1))<<square);
	bit2=bit;
	do
	{
		bit<<=8-1;
		bit2>>=1;
		if(bit2&rowbits) ret|=bit;
		else break;
	}while(bit && !(bit&occ));
	bit=(((U64)(1))<<square);
	bit2=bit;
	do
	{
		bit<<=8+1;
		bit2<<=1;
		if(bit2&rowbits) ret|=bit;
		else break;
	}while(bit && !(bit&occ));
	bit=(((U64)(1))<<square);
	bit2=bit;
	do
	{
		bit>>=8-1;
		bit2<<=1;
		if(bit2&rowbits) ret|=bit;
		else break;
	}while(bit && !(bit&occ));
	bit=(((U64)(1))<<square);
	bit2=bit;
	do
	{
		bit>>=8+1;
		bit2>>=1;
		if(bit2&rowbits) ret|=bit;
		else break;
	}while(bit && !(bit&occ));
	return ret;
}

// Assembly:
leal 0x7(%rdi), %eax
testl %edi, %edi
movzbl %al, %ecx
cmovnsl %edi, %ecx
andb $-0x8, %cl
movl $0xff, %edx
shlq %cl, %rdx
movl $0x1, %r8d
movl %edi, %ecx
shlq %cl, %r8
xorl %eax, %eax
movq %r8, %rcx
movq %r8, %rdi
shrq %rdi
testq %rdx, %rdi
je 0xd5ce
shlq $0x7, %rcx
orq %rcx, %rax
testq %rcx, %rcx
je 0xd5ce
movq %rcx, %r9
andq %rsi, %r9
je 0xd5b2
movq %r8, %rcx
movq %r8, %rdi
addq %rdi, %rdi
testq %rdx, %rdi
je 0xd5f0
shlq $0x9, %rcx
orq %rcx, %rax
testq %rcx, %rcx
je 0xd5f0
movq %rcx, %r9
andq %rsi, %r9
je 0xd5d4
movq %r8, %rdi
movq %r8, %rcx
addq %rcx, %rcx
testq %rdx, %rcx
je 0xd61c
movq %rdi, %r9
shrq $0x7, %r9
orq %r9, %rax
cmpq $0x80, %rdi
jb 0xd61c
movq %r9, %r10
movq %r9, %rdi
andq %rsi, %r10
je 0xd5f6
movq %r8, %rcx
shrq %rcx
testq %rdx, %rcx
je 0xd645
movq %r8, %rdi
shrq $0x9, %rdi
orq %rdi, %rax
cmpq $0x200, %r8             # imm = 0x200
jb 0xd645
movq %rdi, %r9
movq %rdi, %r8
andq %rsi, %r9
je 0xd61f
retq
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/bitboard.cpp
// Function: print_bb(unsigned long long)
void print_bb(U64 bb)
{
    const U64 MSB = 0x8000000000000000ULL;
    std::string ret;
    for (int i = 0; i < 64; ++i)
    {
        if (i % 8 == 0)
        {
            if (i != 0)
            {
                ret.append("\n");
            }
            for (int j = 0; j < 8; ++j)
            {
                ret.append("+-");
            }
            ret.append("+\n|");
        }
        U64 bit = pow(2, i);
        if (bb << i & MSB)
        {
            ret.append("1|");
        }
        else
        {
            ret.append("0|");
        }
    }
    ret.append("\n");
    for (int j = 0; j < 8; ++j)
    {
        ret.append("+-");
    }
    ret.append("+\n");
    std::cout << ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r14d, %r14d
leaq 0xe04c(%rip), %r15      # 0x1bf40
leaq 0x8(%rsp), %r12
leaq 0xe04a(%rip), %r13      # 0x1bf4a
testb $0x7, %r14b
jne 0xdf3d
testq %r14, %r14
je 0xdf1a
movq %r12, %rdi
leaq 0xe039(%rip), %rsi      # 0x1bf4e
callq 0x43e0
movl $0x8, %ebp
movq %r12, %rdi
movq %r15, %rsi
callq 0x43e0
decl %ebp
jne 0xdf1f
movq %r12, %rdi
leaq 0xe00b(%rip), %rsi      # 0x1bf43
callq 0x43e0
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
callq 0x41e0
movq %rbx, %rax
movl %r14d, %ecx
shlq %cl, %rax
testq %rax, %rax
leaq 0xdfea(%rip), %rsi      # 0x1bf47
cmovnsq %r13, %rsi
movq %r12, %rdi
callq 0x43e0
incq %r14
cmpq $0x40, %r14
jne 0xdf00
leaq 0xdfd5(%rip), %rsi      # 0x1bf4e
leaq 0x8(%rsp), %rdi
callq 0x43e0
movl $0x8, %ebp
leaq 0xdfb1(%rip), %rbx      # 0x1bf40
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x43e0
decl %ebp
jne 0xdf94
leaq 0xdfa3(%rip), %rsi      # 0x1bf4d
leaq 0x8(%rsp), %rdi
callq 0x43e0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x16fdb(%rip), %rdi     # 0x24fa0
callq 0x4290
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xdfe6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4250
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xdffd
jmp 0xdffd
jmp 0xdffd
jmp 0xdffd
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xe01c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4250
movq %rbx, %rdi
callq 0x43b0
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/evaluation.cpp
// Function: int Evaluate::outpost<(PieceType)1>(Square, Color)
int Evaluate::outpost(Square p, Color c)
{
    int score;
    // To be an outpost, the piece must be supported by a friendly pawn
    // and unable to be attacked by an opponents pawn.
    if (   !(p & outpost_area[c])
        || !(pawn_attacks[!c][p] & mState.getPieceBB<pawn>(c))
        || in_front[c][p] & adj_files[p] & mState.getPieceBB<pawn>(!c))
        return 0;

    score = PieceSquareTable::outpost[PT == bishop][c][p];

    // Extra bonus if the outpost cannot be captured by a minor piece.
    if (   !mState.getPieceBB<knight>(!c)
        && !(mState.getPieceBB<bishop>(!c) & squares_of_color(p)))
        score *= 2;

    return score;
}

// Assembly:
movl %edx, %r8d
leaq 0x10b004(%rip), %r9     # 0x11a670
movl %esi, %esi
leaq 0xe93fb(%rip), %rax     # 0xf8a70
movq (%rax,%rsi,8), %rcx
xorl %eax, %eax
testq %rcx, (%r9,%r8,8)
je 0xf6e7
xorl %r9d, %r9d
testl %edx, %edx
sete %r9b
movl %r9d, %r10d
shll $0x9, %r10d
addq 0x15918(%rip), %r10     # 0x24fb0
movq 0x8(%rdi), %rdx
leaq (%r8,%r8,2), %rdi
shlq $0x4, %rdi
movq 0x288(%rdx,%rdi), %rdi
testq %rdi, (%r10,%rsi,8)
je 0xf6e7
addq $0x288, %rdx            # imm = 0x288
movq %r8, %rdi
shlq $0x9, %rdi
addq 0x158e1(%rip), %rdi     # 0x24fa8
leaq 0x10a5a2(%rip), %r10    # 0x119c70
movq (%r10,%rsi,8), %r10
andq (%rdi,%rsi,8), %r10
leaq (%r9,%r9,2), %rdi
movl %edi, %r9d
shll $0x4, %r9d
testq %r10, (%rdx,%r9)
je 0xf6e8
retq
shlq $0x8, %r8
leaq 0xcb1d(%rip), %rax      # 0x1c210
addq %r8, %rax
movl (%rax,%rsi,4), %eax
movl %edi, %esi
shll $0x4, %esi
cmpq $0x0, 0x8(%rdx,%rsi)
jne 0xf6e7
shll $0x4, %edi
movabsq $0x55aa55aa55aa55aa, %rsi # imm = 0x55AA55AA55AA55AA
testq %rsi, %rcx
movabsq $-0x55aa55aa55aa55ab, %rcx # imm = 0xAA55AA55AA55AA55
cmovneq %rsi, %rcx
testq %rcx, 0x10(%rdx,%rdi)
sete %cl
shll %cl, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/SethKasmann[P]clever-girl/src/line_manager.cpp
// Function: LineManager::pushToPv(unsigned short, unsigned long long, int, int)
void LineManager::pushToPv(Move pMove, U64 pKey, int pPly, int pScore)
{
    // Check if this is a mating line.
    mMatingLine = std::abs(pScore) + Max_ply >= Checkmate ? true : false;

    // Find the indicies using the triangular forumla.
    int copyTo = triangularIndex(pPly);
    int copyFromStart = triangularIndex(pPly + 1);
    int copyFromEnd = copyFromStart + Max_ply - pPly - 1;

    // Store the current move.
    mPv[copyTo++] = std::make_pair(pMove, pKey);

    // Copy from the previous iteration.
    std::copy(std::make_move_iterator(mPv.begin() + copyFromStart), 
              std::make_move_iterator(mPv.begin() + copyFromEnd), 
              mPv.begin() + copyTo);
}

// Assembly:
movl %r8d, %eax
negl %eax
cmovsl %r8d, %eax
cmpl $0x7fcd, %eax           # imm = 0x7FCD
setae 0x4fb0(%rdi)
movl $0x65, %eax
subl %ecx, %eax
imull %ecx, %eax
movl %eax, %r8d
shrl $0x1f, %r8d
addl %eax, %r8d
sarl %r8d
leal 0x1(%rcx), %eax
movl $0x64, %r9d
subl %ecx, %r9d
imull %eax, %r9d
movl %r9d, %r10d
shrl $0x1f, %r10d
addl %r9d, %r10d
sarl %r10d
movslq %r10d, %rax
subl %ecx, %r10d
addl $0x31, %r10d
movslq %r8d, %rcx
shlq $0x4, %rcx
movw %si, (%rdi,%rcx)
movq %rdx, 0x8(%rdi,%rcx)
movslq %r10d, %rdx
subq %rax, %rdx
jle 0xf95a
shlq $0x4, %rax
incq %rdx
movzwl (%rdi,%rax), %esi
movw %si, 0x10(%rdi,%rcx)
movq 0x8(%rdi,%rax), %rsi
movq %rsi, 0x18(%rdi,%rcx)
decq %rdx
addq $0x10, %rdi
cmpq $0x1, %rdx
jg 0xf93a
retq
nop