// File: kelwinfc[P]ci4721-Fernandez-Gyomrey/src/inst.cpp
// Function: Spim_Inst::to_string[abi:cxx11](bool)
string Spim_Inst::to_string(bool with_comment){

    std::stringstream out;
    out << label;
    string r = "", _ = (with_comment ? comment : "" ) + "L" + out.str() + ": ";
    
    opd *opds[] = {arg0, arg1, arg2};
    
    switch (op ){
        default:
            break;
    }
    
    for (int i = 0; i < 3; ++ i) {
        if (opds[i]) {
            r += (0 == i ? "" : ", ") + opds[i]->to_string();
        }
    }
    
    switch (op ){
        default:
            break;
    }
    
    return r;
}

// Assembly:
subq $0x2f8, %rsp            # imm = 0x2F8
movq %rdi, 0x20(%rsp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, 0x28(%rsp)
movq %rdi, 0x2f0(%rsp)
movq %rsi, 0x2e8(%rsp)
andb $0x1, %al
movb %al, 0x2e7(%rsp)
movq 0x2e8(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x6290
movq 0x30(%rsp), %rax
leaq 0x168(%rsp), %rdi
movl 0x8(%rax), %esi
callq 0x6540
jmp 0x3c700
movb $0x0, 0x14b(%rsp)
leaq 0x14a(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x66c0
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x17c27(%rip), %rsi     # 0x54352
callq 0x7500
jmp 0x3c732
leaq 0x14a(%rsp), %rdi
callq 0x6400
movb 0x2e7(%rsp), %al
movb $0x0, 0xc6(%rsp)
testb $0x1, %al
je 0x3c76c
movq 0x30(%rsp), %rsi
addq $0x28, %rsi
leaq 0xc8(%rsp), %rdi
callq 0x6170
jmp 0x3c76a
jmp 0x3c7a3
leaq 0xc7(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x66c0
movq 0x10(%rsp), %rdx
movb $0x1, 0xc6(%rsp)
leaq 0x17bc0(%rip), %rsi     # 0x54352
leaq 0xc8(%rsp), %rdi
callq 0x7500
jmp 0x3c7a1
jmp 0x3c7a3
leaq 0x17f13(%rip), %rdx     # 0x546bd
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x20990
jmp 0x3c7c1
leaq 0xa0(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x6360
jmp 0x3c7d8
leaq 0x108(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x209e0
jmp 0x3c7f7
leaq 0x15ea5(%rip), %rdx     # 0x526a3
leaq 0x128(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x20990
jmp 0x3c815
leaq 0x108(%rsp), %rdi
callq 0x6778
leaq 0xa0(%rsp), %rdi
callq 0x6778
leaq 0xe8(%rsp), %rdi
callq 0x6778
leaq 0xc8(%rsp), %rdi
callq 0x6778
testb $0x1, 0xc6(%rsp)
jne 0x3c855
jmp 0x3c862
leaq 0xc7(%rsp), %rdi
callq 0x6400
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x80(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0x88(%rsp)
movq 0x20(%rax), %rax
movq %rax, 0x90(%rsp)
jmp 0x3c9a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x3cb0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x14a(%rsp), %rdi
callq 0x6400
jmp 0x3cb0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x3cb00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x3c98b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x3c97e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x3c971
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x3c964
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x6778
leaq 0xa0(%rsp), %rdi
callq 0x6778
leaq 0xe8(%rsp), %rdi
callq 0x6778
leaq 0xc8(%rsp), %rdi
callq 0x6778
testb $0x1, 0xc6(%rsp)
jne 0x3c997
jmp 0x3c9a4
leaq 0xc7(%rsp), %rdi
callq 0x6400
jmp 0x3cb00
jmp 0x3c9ab
movl $0x0, 0x7c(%rsp)
cmpl $0x3, 0x7c(%rsp)
jge 0x3caaa
movslq 0x7c(%rsp), %rax
cmpq $0x0, 0x80(%rsp,%rax,8)
je 0x3ca98
movslq 0x7c(%rsp), %rax
testq %rax, %rax
leaq 0x17971(%rip), %rdx     # 0x54352
leaq 0x1604a(%rip), %rcx     # 0x52a32
cmoveq %rdx, %rcx
movq %rcx, 0x8(%rsp)
movq 0x80(%rsp,%rax,8), %rsi
leaq 0x38(%rsp), %rdi
callq 0x384c0
jmp 0x3ca05
movq 0x8(%rsp), %rsi
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x20dc0
jmp 0x3ca1b
movq 0x20(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x6500
jmp 0x3ca2c
leaq 0x58(%rsp), %rdi
callq 0x6778
leaq 0x38(%rsp), %rdi
callq 0x6778
jmp 0x3ca98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x3cacd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x3ca8c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x6778
leaq 0x38(%rsp), %rdi
callq 0x6778
jmp 0x3cacd
jmp 0x3ca9a
movl 0x7c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c(%rsp)
jmp 0x3c9b3
jmp 0x3caac
movb $0x1, 0x14b(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x6778
testb $0x1, 0x14b(%rsp)
jne 0x3cae6
jmp 0x3cadc
leaq 0x128(%rsp), %rdi
callq 0x6778
jmp 0x3cb00
movq 0x20(%rsp), %rdi
callq 0x6778
leaq 0x158(%rsp), %rdi
callq 0x62d0
movq 0x28(%rsp), %rax
addq $0x2f8, %rsp            # imm = 0x2F8
retq
movq 0x20(%rsp), %rdi
callq 0x6778
leaq 0x158(%rsp), %rdi
callq 0x62d0
movq 0x150(%rsp), %rdi
callq 0x66b0
nopw %cs:(%rax,%rax)
nop