// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x390, %rsp            # imm = 0x390
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x208(%rsp), %rdi
callq 0x6210
movzbl 0x10(%r14), %eax
cmpq $0x6, %rax
ja 0x1d423
leaq 0x11130(%rip), %rcx     # 0x2e4e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x17fb8
jmp 0x1d881
leaq 0x218(%rsp), %rdi
cvtss2sd (%r14), %xmm0
callq 0x64b0
jmp 0x1d3f1
leaq 0x218(%rsp), %rdi
movl (%r14), %esi
callq 0x6530
leaq 0x220(%rsp), %rsi
movq %rbx, %rdi
callq 0x64a0
jmp 0x1d881
movsbl (%r14), %edx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movl $0x1, %esi
movq %rbx, %rdi
callq 0x6380
jmp 0x1d881
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x10f4e(%rip), %rdx     # 0x2e382
leaq 0x20(%rsp), %rdi
movq %rdx, %rsi
callq 0x6fec
testb $0x8, 0x10(%r14)
je 0x1d4c4
leaq 0x80(%rsp), %rdi
callq 0x6210
leaq 0x90(%rsp), %rdi
movl (%r14), %esi
callq 0x6530
leaq 0x98(%rsp), %rsi
movq %rsp, %rdi
callq 0x64a0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x60f0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d4a3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x62f0
movq 0x20ade(%rip), %rsi     # 0x3df88
leaq 0x80(%rsp), %rdi
callq 0x6240
leaq 0x100(%rsp), %rdi
callq 0x6100
movzbl 0x10(%r14), %eax
testb $0x10, %al
je 0x1d56a
testb $0x8, %al
je 0x1d4ed
cmpl $0x0, 0x4(%r14)
jns 0x1d4ed
leaq 0xf088(%rip), %rsi      # 0x2c56b
leaq 0x20(%rsp), %rdi
callq 0x65a0
leaq 0x80(%rsp), %rdi
callq 0x6210
leaq 0x90(%rsp), %rdi
movl 0x4(%r14), %esi
callq 0x6530
leaq 0x98(%rsp), %rsi
movq %rsp, %rdi
callq 0x64a0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x60f0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d549
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x62f0
movq 0x20a38(%rip), %rsi     # 0x3df88
leaq 0x80(%rsp), %rdi
callq 0x6240
leaq 0x100(%rsp), %rdi
callq 0x6100
testb $0x20, 0x10(%r14)
je 0x1d821
leaq 0x10e06(%rip), %r15     # 0x2e382
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x60d0
movl %eax, %ebp
leaq 0x80(%rsp), %rdi
callq 0x6210
leaq 0x90(%rsp), %rdi
movl 0x8(%r14), %esi
callq 0x6530
leaq 0x98(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x64a0
xorl %r8d, %r8d
testl %ebp, %ebp
setne %r8b
leaq 0xef25(%rip), %rcx      # 0x2c4f0
cmoveq %r15, %rcx
leaq 0x60(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6350
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1d728
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x1d72f
leaq 0x218(%rsp), %rdi
movl (%r14), %esi
callq 0x6530
leaq 0x220(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0x64a0
leaq 0x1101b(%rip), %rcx     # 0x2e652
leaq 0x80(%rsp), %rdi
movl $0x2, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x6350
jmp 0x1d6c7
movzbl (%r14), %edx
leaq 0xe9a9(%rip), %rax      # 0x2c004
leaq 0xef62(%rip), %rsi      # 0x2c5c4
testq %rdx, %rdx
cmovneq %rax, %rsi
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
xorq $0x5, %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x6fec
jmp 0x1d881
leaq 0x218(%rsp), %rdi
movl (%r14), %esi
callq 0x6530
leaq 0x220(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0x64a0
leaq 0x10fa5(%rip), %rcx     # 0x2e655
leaq 0x80(%rsp), %rdi
movl $0x2, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x6350
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x1d6e9
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x1d6ef
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d881
movq 0x90(%rsp), %rsi
jmp 0x1d879
movups (%rcx), %xmm0
movups %xmm0, (%r14)
testl %ebp, %ebp
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xeda4(%rip), %rax      # 0x2c4f8
cmovneq %rax, %r15
movq %r15, %rsi
callq 0x65a0
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1d786
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1d78d
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x60f0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1d7ce
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x62f0
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x1d7e5
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x62f0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d800
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x62f0
movq 0x20781(%rip), %rsi     # 0x3df88
leaq 0x80(%rsp), %rdi
callq 0x6240
leaq 0x100(%rsp), %rdi
callq 0x6100
leaq 0x10b5a(%rip), %rsi     # 0x2e382
leaq 0x20(%rsp), %rdi
callq 0x60d0
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
testl %eax, %eax
je 0x1d854
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x16c42
jmp 0x1d86a
leaq 0x10dfd(%rip), %rsi     # 0x2e658
leaq 0x10e01(%rip), %rdx     # 0x2e663
movq %rbx, %rdi
callq 0x6fec
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x1d881
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x62f0
movq 0x20700(%rip), %rsi     # 0x3df88
leaq 0x208(%rsp), %rdi
callq 0x6240
leaq 0x288(%rsp), %rdi
callq 0x6100
movq %rbx, %rax
addq $0x390, %rsp            # imm = 0x390
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1d961
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1d8d8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1d8d8
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x1d8f4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1d8f4
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d93c
movq 0x70(%rsp), %rsi
jmp 0x1d92b
jmp 0x1d939
jmp 0x1d915
jmp 0x1d939
jmp 0x1d939
jmp 0x1d961
jmp 0x1d939
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d93c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1d93c
jmp 0x1d961
jmp 0x1d939
movq %rax, %rbx
movq 0x20645(%rip), %rsi     # 0x3df88
leaq 0x80(%rsp), %rdi
callq 0x6240
leaq 0x100(%rsp), %rdi
callq 0x6100
jmp 0x1d964
jmp 0x1d961
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x1d9aa
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x62f0
jmp 0x1d9aa
jmp 0x1d97f
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d9aa
movq 0x90(%rsp), %rsi
jmp 0x1d973
jmp 0x1d9a7
jmp 0x1d9a7
jmp 0x1d9a7
jmp 0x1d9a7
jmp 0x1d9a7
movq %rax, %rbx
movq 0x205d7(%rip), %rsi     # 0x3df88
leaq 0x208(%rsp), %rdi
callq 0x6240
leaq 0x288(%rsp), %rdi
callq 0x6100
movq %rbx, %rdi
callq 0x6550
nop