// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x398, %rsp            # imm = 0x398
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x210(%rsp), %rdi
callq 0x6200
movzbl 0x10(%r14), %eax
cmpq $0x6, %rax
ja 0x1842f
leaq 0xd112(%rip), %rcx      # 0x254d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x13efa
jmp 0x186db
leaq 0x220(%rsp), %rdi
movss (%r14), %xmm0
callq 0x6230
jmp 0x183ff
leaq 0x220(%rsp), %rdi
movl (%r14), %esi
callq 0x6510
leaq 0x228(%rsp), %rsi
movq %rbx, %rdi
callq 0x6480
jmp 0x186db
movsbl (%r14), %edx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x6340
jmp 0x186db
leaq 0xcf3c(%rip), %rsi      # 0x25372
leaq 0x28(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x6d6c
movb 0x10(%r14), %al
testb $0x8, %al
je 0x184a9
leaq 0x88(%rsp), %rdi
callq 0x6200
leaq 0x98(%rsp), %rdi
movl (%r14), %esi
callq 0x6510
leaq 0xa0(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6480
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x65b0
leaq 0x8(%rsp), %rdi
callq 0x65c8
leaq 0x88(%rsp), %rdi
callq 0x6240
movb 0x10(%r14), %al
testb $0x10, %al
je 0x18523
testb $0x8, %al
je 0x184c9
cmpl $0x0, 0x4(%r14)
jns 0x184c9
leaq 0xb0ac(%rip), %rsi      # 0x2356b
leaq 0x28(%rsp), %rdi
callq 0x6580
leaq 0x88(%rsp), %rdi
callq 0x6200
leaq 0x98(%rsp), %rdi
movl 0x4(%r14), %esi
callq 0x6510
leaq 0xa0(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6480
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x65b0
leaq 0x8(%rsp), %rdi
callq 0x65c8
leaq 0x88(%rsp), %rdi
callq 0x6240
movb 0x10(%r14), %al
testb $0x20, %al
je 0x185e3
leaq 0xce40(%rip), %r15      # 0x25372
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x60d0
movl %eax, %ebp
leaq 0x88(%rsp), %rdi
callq 0x6200
leaq 0x98(%rsp), %rdi
movl 0x8(%r14), %esi
callq 0x6510
leaq 0xa0(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x6480
testl %ebp, %ebp
leaq 0xaf76(%rip), %rsi      # 0x234f0
cmoveq %r15, %rsi
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x1256a
testl %ebp, %ebp
leaq 0xaf62(%rip), %rdx      # 0x234f8
cmoveq %r15, %rdx
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x12447
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x65b0
leaq 0x8(%rsp), %rdi
callq 0x65c8
leaq 0x68(%rsp), %rdi
callq 0x65c8
leaq 0x48(%rsp), %rdi
callq 0x65c8
leaq 0x88(%rsp), %rdi
callq 0x6240
leaq 0xcd88(%rip), %rsi      # 0x25372
leaq 0x28(%rsp), %rdi
callq 0x60d0
testl %eax, %eax
je 0x186ba
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x63e0
jmp 0x186d1
leaq 0x220(%rsp), %rdi
movl (%r14), %esi
callq 0x6510
leaq 0x228(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x6480
leaq 0xd008(%rip), %rsi      # 0x25642
leaq 0x88(%rsp), %rdx
movq %rbx, %rdi
callq 0x1256a
jmp 0x186b0
leaq 0xa9b1(%rip), %rax      # 0x23004
leaq 0xaf6a(%rip), %rsi      # 0x235c4
cmpb $0x0, (%r14)
cmovneq %rax, %rsi
leaq 0x88(%rsp), %rdx
movq %rbx, %rdi
callq 0x6d6c
jmp 0x186db
leaq 0x220(%rsp), %rdi
movl (%r14), %esi
callq 0x6510
leaq 0x228(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x6480
leaq 0xcfa5(%rip), %rsi      # 0x25645
leaq 0x88(%rsp), %rdx
movq %rbx, %rdi
callq 0x1256a
leaq 0x88(%rsp), %rdi
jmp 0x186d6
leaq 0xcf87(%rip), %rsi      # 0x25648
leaq 0x88(%rsp), %rdx
movq %rbx, %rdi
callq 0x6d6c
leaq 0x28(%rsp), %rdi
callq 0x65c8
leaq 0x210(%rsp), %rdi
callq 0x6240
movq %rbx, %rax
addq $0x398, %rsp            # imm = 0x398
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x18756
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x65c8
jmp 0x1870d
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x65c8
jmp 0x1871c
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x18737
jmp 0x18742
jmp 0x1872f
jmp 0x18742
jmp 0x18742
jmp 0x18756
jmp 0x18742
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x65c8
jmp 0x18745
jmp 0x18756
jmp 0x18742
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x6240
jmp 0x18759
jmp 0x18756
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x65c8
jmp 0x18781
jmp 0x18767
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
jmp 0x1875e
jmp 0x1877e
jmp 0x1877e
jmp 0x1877e
jmp 0x1877e
jmp 0x1877e
movq %rax, %rbx
leaq 0x210(%rsp), %rdi
callq 0x6240
movq %rbx, %rdi
callq 0x6530