// File: ksherlock[P]wdc-utils/disassembler.cpp
// Function: disassembler::suffix[abi:cxx11]()
std::string disassembler::suffix() {

	std::string tmp;

	switch(_mode & 0x0f00) {
		case m_X: tmp = ",x"; break;
		case m_Y: if (!(_mode & (mDPI|mDPIL))) tmp = ",y"; break;
		case m_S:
		case m_S | m_Y:
			tmp = ",s"; break;
	}

	switch(_mode & 0xf000) {
		case mAbsoluteI:
		case mDPI:
			tmp += ")"; break;
		case mAbsoluteIL:
		case mDPIL:
			tmp += "]"; break;
	}

	// (xxx,s),y
	// (xxx),y
	// [xxx],y
	switch(_mode & 0x0f00) {
		case m_Y:
			if (_mode & (mDPI|mDPIL)) tmp += ",y"; break;
		case m_S | m_Y:
			tmp += ",y"; break;
	}	
	return tmp;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x3380
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xf00, %eax            # imm = 0xF00
movl %eax, -0x28(%rbp)
subl $0x100, %eax            # imm = 0x100
je 0xeb3d
jmp 0xeac4
movl -0x28(%rbp), %eax
subl $0x200, %eax            # imm = 0x200
je 0xeae8
jmp 0xead0
movl -0x28(%rbp), %eax
subl $0x400, %eax            # imm = 0x400
je 0xeb16
jmp 0xeadc
movl -0x28(%rbp), %eax
subl $0x500, %eax            # imm = 0x500
je 0xeb3d
jmp 0xeb51
movq -0x40(%rbp), %rdi
leaq 0xd160(%rip), %rsi      # 0x1bc53
callq 0x3350
jmp 0xeafa
jmp 0xeb51
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3160
jmp 0xec31
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x0, %eax
jne 0xeb3b
movq -0x40(%rbp), %rdi
leaq 0xd124(%rip), %rsi      # 0x1bc56
callq 0x3350
jmp 0xeb39
jmp 0xeb3b
jmp 0xeb51
movq -0x40(%rbp), %rdi
leaq 0xd111(%rip), %rsi      # 0x1bc59
callq 0x3350
jmp 0xeb4f
jmp 0xeb51
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
movl %eax, -0x44(%rbp)
subl $0x3000, %eax           # imm = 0x3000
je 0xeb8d
jmp 0xeb69
movl -0x44(%rbp), %eax
subl $0x4000, %eax           # imm = 0x4000
je 0xeba1
jmp 0xeb75
movl -0x44(%rbp), %eax
subl $0x7000, %eax           # imm = 0x7000
je 0xeb8d
jmp 0xeb81
movl -0x44(%rbp), %eax
subl $0x8000, %eax           # imm = 0x8000
je 0xeba1
jmp 0xebb5
movq -0x40(%rbp), %rdi
leaq 0xc73f(%rip), %rsi      # 0x1b2d7
callq 0x3260
jmp 0xeb9f
jmp 0xebb5
movq -0x40(%rbp), %rdi
leaq 0xd0b0(%rip), %rsi      # 0x1bc5c
callq 0x3260
jmp 0xebb3
jmp 0xebb5
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xf00, %eax            # imm = 0xF00
movl %eax, -0x48(%rbp)
subl $0x400, %eax            # imm = 0x400
je 0xebd9
jmp 0xebcd
movl -0x48(%rbp), %eax
subl $0x500, %eax            # imm = 0x500
je 0xec00
jmp 0xec14
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x0, %eax
je 0xebfe
movq -0x40(%rbp), %rdi
leaq 0xd061(%rip), %rsi      # 0x1bc56
callq 0x3260
jmp 0xebfc
jmp 0xebfe
jmp 0xec14
movq -0x40(%rbp), %rdi
leaq 0xd04b(%rip), %rsi      # 0x1bc56
callq 0x3260
jmp 0xec12
jmp 0xec14
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0xec27
movq -0x40(%rbp), %rdi
callq 0x3160
movq -0x38(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3440
nopw (%rax,%rax)