// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::InsertFromClipboard()
S::Void S::GUI::Cursor::InsertFromClipboard()
{
	Bool	 selected = (markStart != markEnd && markStart >= 0 && markEnd >= 0);

	flags |= CF_NOINPUT;

	DeleteSelectedText();

	flags ^= CF_NOINPUT;

	String	 insertText = Clipboard(container->GetContainerWindow()).GetClipboardText();

	if (insertText.Length() > 0 && (insertText.Length() + text.Length()) <= maxSize)
	{
		if (Binary::IsFlagSet(container->GetFlags(), EDB_NUMERIC) && (insertText.ToInt() == 0 && insertText[0] != '0')) return;

		if (selected) RemoveHistoryEntry();

		InsertText(insertText);
	}

	onInput.Emit(text);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdx
movq %rdx, -0x58(%rbp)
movl 0x5c8(%rdx), %ecx
xorl %eax, %eax
cmpl 0x5cc(%rdx), %ecx
movb %al, -0x49(%rbp)
je 0xcff4d
movq -0x58(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x5c8(%rcx)
movb %al, -0x49(%rbp)
jl 0xcff4d
movq -0x58(%rbp), %rax
cmpl $0x0, 0x5cc(%rax)
setge %al
movb %al, -0x49(%rbp)
movq -0x58(%rbp), %rdi
movb -0x49(%rbp), %al
andb $0x1, %al
movb %al, -0x9(%rbp)
movb 0x33(%rdi), %al
orb $0x40, %al
movb %al, 0x33(%rdi)
callq 0x5ded8
movq -0x58(%rbp), %rax
movb 0x33(%rax), %cl
xorb $0x40, %cl
movb %cl, 0x33(%rax)
movq 0x190(%rax), %rdi
callq 0x59bc0
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x5cb80
movq -0x60(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x5aea0
jmp 0xcff9e
leaq -0x38(%rbp), %rdi
callq 0x5d190
leaq -0x28(%rbp), %rdi
callq 0x5b800
movl %eax, -0x64(%rbp)
jmp 0xcffb5
movl -0x64(%rbp), %eax
cmpl $0x0, %eax
jle 0xd00c0
leaq -0x28(%rbp), %rdi
callq 0x5b800
movl %eax, -0x68(%rbp)
jmp 0xcffcf
movq -0x58(%rbp), %rdi
addq $0xf0, %rdi
callq 0x5b800
movl %eax, -0x6c(%rbp)
jmp 0xcffe4
movq -0x58(%rbp), %rcx
movl -0x6c(%rbp), %edx
movl -0x68(%rbp), %eax
addl %edx, %eax
cmpl 0x640(%rcx), %eax
jg 0xd00c0
movq -0x58(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x5a120
movl %eax, -0x70(%rbp)
jmp 0xd0011
movl -0x70(%rbp), %edi
movl $0x1, %esi
callq 0x5ce30
movb %al, -0x71(%rbp)
jmp 0xd0023
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0xd002c
jmp 0xd009c
leaq -0x28(%rbp), %rdi
callq 0x5adc0
movq %rax, -0x80(%rbp)
jmp 0xd003b
movq -0x80(%rbp), %rax
cmpq $0x0, %rax
jne 0xd009c
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x5d4e0
movq %rax, -0x88(%rbp)
jmp 0xd0059
movq -0x88(%rbp), %rax
cmpl $0x30, (%rax)
je 0xd009c
movl $0x1, -0x48(%rbp)
jmp 0xd00e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5d190
jmp 0xd00f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5df00
jmp 0xd00f5
testb $0x1, -0x9(%rbp)
je 0xd00af
movq -0x58(%rbp), %rdi
callq 0x5ad60
jmp 0xd00ad
jmp 0xd00af
movq -0x58(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x5a3c0
jmp 0xd00be
jmp 0xd00c0
movq -0x58(%rbp), %rsi
movq %rsi, %rdi
addq $0x708, %rdi            # imm = 0x708
addq $0xf0, %rsi
callq 0x97960
jmp 0xd00dc
movl $0x0, -0x48(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5df00
addq $0x90, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x5b6b0
nop