// File: kelwinfc[P]ci4721-Fernandez-Gyomrey/src/inst.cpp
// Function: opd::to_string[abi:cxx11]()
string opd::to_string() {
    stringstream out; 
    switch (type) {
        case O_SYM:   return data.sym->getName();
        case O_TEMP:  out << data.pint; return "T_" + out.str() ;
        case O_INT:   out << data.pint; return out.str();
        case O_CHAR:  return string(1, data.pchar);
        case O_BOOL:  return (data.pbool ? "true" : "false");
        case O_FLOAT: out << data.pfloat; return out.str();
        case O_LABEL: out << data.pint; return "L_" + out.str();
    }

    // registro de spim
    string r = "";
    if (type & O_SL) {
        stringstream out;
        out << data.spim.lab;
        r += out.str();
    }
    if (type & O_SI) {
        if (type & O_SL && data.spim.imm < 0) {
            r += "+";
        }
        stringstream out;
        out << data.spim.imm;
        r += out.str();
    }
    if (type & O_SR) {
        bool p = r.compare("");
        stringstream out;
        out << data.spim.reg;
        r += (p ? "(" : "") + out.str() + (p ? ")" : "");
    }

    return r.compare("") ? r : "UKNOWN_TYPE";
}

// Assembly:
subq $0x7b8, %rsp            # imm = 0x7B8
movq %rdi, 0x38(%rsp)
movq %rdi, %rax
movq %rax, 0x40(%rsp)
movq %rdi, 0x7b0(%rsp)
movq %rsi, 0x7a8(%rsp)
movq 0x7a8(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x620(%rsp), %rdi
callq 0x6290
movq 0x48(%rsp), %rax
movsbl 0x10(%rax), %eax
movl %eax, %ecx
movq %rcx, 0x50(%rsp)
subl $0x6, %eax
ja 0x387fc
movq 0x50(%rsp), %rax
leaq 0x1bfad(%rip), %rcx     # 0x544d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rax
movq (%rax), %rsi
callq 0x295b0
jmp 0x38540
movl $0x1, 0x610(%rsp)
jmp 0x38cbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
jmp 0x38cd9
movq 0x48(%rsp), %rax
leaq 0x630(%rsp), %rdi
movl (%rax), %esi
callq 0x6690
jmp 0x3857f
leaq 0x5f0(%rsp), %rdi
leaq 0x620(%rsp), %rsi
callq 0x6360
jmp 0x38596
movq 0x38(%rsp), %rdi
leaq 0x1c09c(%rip), %rsi     # 0x5463e
leaq 0x5f0(%rsp), %rdx
callq 0x20dc0
jmp 0x385b1
leaq 0x5f0(%rsp), %rdi
callq 0x6778
movl $0x1, 0x610(%rsp)
jmp 0x38cbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
leaq 0x5f0(%rsp), %rdi
callq 0x6778
jmp 0x38cd9
movq 0x48(%rsp), %rax
leaq 0x630(%rsp), %rdi
movl (%rax), %esi
callq 0x6690
jmp 0x3860a
movq 0x38(%rsp), %rdi
leaq 0x620(%rsp), %rsi
callq 0x6360
jmp 0x3861e
movl $0x1, 0x610(%rsp)
jmp 0x38cbf
movq 0x48(%rsp), %rax
movsbl (%rax), %eax
movl %eax, 0x2c(%rsp)
leaq 0x5ef(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x66c0
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %edx
movq 0x30(%rsp), %rcx
movl $0x1, %esi
callq 0x3cb30
jmp 0x38666
leaq 0x5ef(%rsp), %rdi
callq 0x6400
movl $0x1, 0x610(%rsp)
jmp 0x38cbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
leaq 0x5ef(%rsp), %rdi
callq 0x6400
jmp 0x38cd9
movq 0x48(%rsp), %rax
movb (%rax), %dl
leaq 0x1994d(%rip), %rcx     # 0x52004
leaq 0x19ef2(%rip), %rax     # 0x525b0
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x18(%rsp)
leaq 0x5ee(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x66c0
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x7500
jmp 0x386f2
leaq 0x5ee(%rsp), %rdi
callq 0x6400
movl $0x1, 0x610(%rsp)
jmp 0x38cbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
leaq 0x5ee(%rsp), %rdi
callq 0x6400
jmp 0x38cd9
movq 0x48(%rsp), %rax
leaq 0x630(%rsp), %rdi
movss (%rax), %xmm0
callq 0x62c0
jmp 0x3874d
movq 0x38(%rsp), %rdi
leaq 0x620(%rsp), %rsi
callq 0x6360
jmp 0x38761
movl $0x1, 0x610(%rsp)
jmp 0x38cbf
movq 0x48(%rsp), %rax
leaq 0x630(%rsp), %rdi
movl (%rax), %esi
callq 0x6690
jmp 0x38787
leaq 0x5c8(%rsp), %rdi
leaq 0x620(%rsp), %rsi
callq 0x6360
jmp 0x3879e
movq 0x38(%rsp), %rdi
leaq 0x1be97(%rip), %rsi     # 0x54641
leaq 0x5c8(%rsp), %rdx
callq 0x20dc0
jmp 0x387b9
leaq 0x5c8(%rsp), %rdi
callq 0x6778
movl $0x1, 0x610(%rsp)
jmp 0x38cbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
leaq 0x5c8(%rsp), %rdi
callq 0x6778
jmp 0x38cd9
leaq 0x5a7(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x66c0
movq 0x10(%rsp), %rdx
leaq 0x1bb38(%rip), %rsi     # 0x54352
leaq 0x5a8(%rsp), %rdi
callq 0x7500
jmp 0x38829
leaq 0x5a7(%rsp), %rdi
callq 0x6400
movq 0x48(%rsp), %rax
movsbl 0x10(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x38945
leaq 0x418(%rsp), %rdi
callq 0x6290
jmp 0x3885a
movq 0x48(%rsp), %rax
leaq 0x428(%rsp), %rdi
movl (%rax), %esi
callq 0x6690
jmp 0x38870
leaq 0x3f8(%rsp), %rdi
leaq 0x418(%rsp), %rsi
callq 0x6360
jmp 0x38887
leaq 0x5a8(%rsp), %rdi
leaq 0x3f8(%rsp), %rsi
callq 0x6500
jmp 0x3889e
leaq 0x3f8(%rsp), %rdi
callq 0x6778
leaq 0x418(%rsp), %rdi
callq 0x62d0
jmp 0x38945
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
leaq 0x5a7(%rsp), %rdi
callq 0x6400
jmp 0x38cd9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
jmp 0x38cb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
jmp 0x38933
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
leaq 0x3f8(%rsp), %rdi
callq 0x6778
leaq 0x418(%rsp), %rdi
callq 0x62d0
jmp 0x38cb0
movq 0x48(%rsp), %rax
movsbl 0x10(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x38a47
movq 0x48(%rsp), %rax
movsbl 0x10(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x3898e
movq 0x48(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jge 0x3898e
leaq 0x19bda(%rip), %rsi     # 0x52557
leaq 0x5a8(%rsp), %rdi
callq 0x6350
jmp 0x3898c
jmp 0x3898e
leaq 0x270(%rsp), %rdi
callq 0x6290
jmp 0x3899d
movq 0x48(%rsp), %rax
leaq 0x280(%rsp), %rdi
movl 0x4(%rax), %esi
callq 0x6690
jmp 0x389b4
leaq 0x250(%rsp), %rdi
leaq 0x270(%rsp), %rsi
callq 0x6360
jmp 0x389cb
leaq 0x5a8(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x6500
jmp 0x389e2
leaq 0x250(%rsp), %rdi
callq 0x6778
leaq 0x270(%rsp), %rdi
callq 0x62d0
jmp 0x38a47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
jmp 0x38a35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
leaq 0x250(%rsp), %rdi
callq 0x6778
leaq 0x270(%rsp), %rdi
callq 0x62d0
jmp 0x38cb0
movq 0x48(%rsp), %rax
movsbl 0x10(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x38bfa
leaq 0x1b8ef(%rip), %rsi     # 0x54352
leaq 0x5a8(%rsp), %rdi
callq 0x6110
testl %eax, %eax
setne 0x24f(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x6290
jmp 0x38a89
movq 0x48(%rsp), %rax
leaq 0xd0(%rsp), %rdi
movl 0x8(%rax), %esi
callq 0x6690
jmp 0x38aa0
movb 0x24f(%rsp), %dl
leaq 0x19a2e(%rip), %rcx     # 0x524dc
leaq 0x1b89d(%rip), %rax     # 0x54352
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x8(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x6360
jmp 0x38ad5
movq 0x8(%rsp), %rsi
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x20dc0
jmp 0x38aee
movb 0x24f(%rsp), %cl
leaq 0x199e8(%rip), %rax     # 0x524e4
leaq 0x1b84f(%rip), %rdx     # 0x54352
testb $0x1, %cl
cmovneq %rax, %rdx
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x20990
jmp 0x38b21
leaq 0x5a8(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x6500
jmp 0x38b38
leaq 0xa0(%rsp), %rdi
callq 0x6778
leaq 0x80(%rsp), %rdi
callq 0x6778
leaq 0x60(%rsp), %rdi
callq 0x6778
leaq 0xc0(%rsp), %rdi
callq 0x62d0
jmp 0x38bfa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
jmp 0x38be8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
jmp 0x38bde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
jmp 0x38bd1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x6778
leaq 0x80(%rsp), %rdi
callq 0x6778
leaq 0x60(%rsp), %rdi
callq 0x6778
leaq 0xc0(%rsp), %rdi
callq 0x62d0
jmp 0x38cb0
leaq 0x5a8(%rsp), %rdi
leaq 0x1b749(%rip), %rsi     # 0x54352
callq 0x6110
movb $0x0, 0x5e(%rsp)
cmpl $0x0, %eax
je 0x38c2e
movq 0x38(%rsp), %rdi
leaq 0x5a8(%rsp), %rsi
callq 0x6170
jmp 0x38c2c
jmp 0x38c5a
leaq 0x5f(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x66c0
movq 0x38(%rsp), %rdi
movq (%rsp), %rdx
movb $0x1, 0x5e(%rsp)
leaq 0x1b9f3(%rip), %rsi     # 0x54644
callq 0x7500
jmp 0x38c58
jmp 0x38c5a
testb $0x1, 0x5e(%rsp)
jne 0x38c63
jmp 0x38c6d
leaq 0x5f(%rsp), %rdi
callq 0x6400
movl $0x1, 0x610(%rsp)
leaq 0x5a8(%rsp), %rdi
callq 0x6778
jmp 0x38cbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x618(%rsp)
movl %eax, 0x614(%rsp)
testb $0x1, 0x5e(%rsp)
jne 0x38ca4
jmp 0x38cae
leaq 0x5f(%rsp), %rdi
callq 0x6400
jmp 0x38cb0
leaq 0x5a8(%rsp), %rdi
callq 0x6778
jmp 0x38cd9
leaq 0x620(%rsp), %rdi
callq 0x62d0
movq 0x40(%rsp), %rax
addq $0x7b8, %rsp            # imm = 0x7B8
retq
leaq 0x620(%rsp), %rdi
callq 0x62d0
movq 0x618(%rsp), %rdi
callq 0x66b0
nopw %cs:(%rax,%rax)