// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/tools/translator/translator.cpp
// Function: Translator::OnDragSplitter(int)
Void Translator::OnDragSplitter(Int splitterPos)
{
	Rect	 clientRect = wnd->GetClientRect();
	Size	 clientSize = clientRect.GetSize();

	if (splitterPos > clientSize.cy - 118) splitterPos = clientSize.cy - 118;
	if (splitterPos <		  110) splitterPos =		     110;

	if (splitter->GetPos() == splitterPos && !updateSplitter) return;

	Surface	*surface = wnd->GetDrawSurface();

	surface->StartPaint(clientRect);

	Bool	 filtered = list_filtered->IsVisible();

	splitter->Hide();
	list_entries->Hide();
	list_filtered->Hide();
	layer_edit->Hide();

	list_entries->SetSize(Size(clientSize.cx - 14, splitterPos - 42));
	list_filtered->SetSize(list_entries->GetSize());

	droparea->SetSize(list_entries->GetSize());

	layer_edit->SetY(splitterPos + 2);
	layer_edit->SetSize(clientSize - Size(0, splitterPos + 2));

	updateSplitter = False;
	splitFactor    = Float(splitterPos) / clientSize.cy;

	splitter->SetPos(splitterPos);
	splitter->Show();

	if (filtered) list_filtered->Show();
	else	      list_entries->Show();

	layer_edit->Show();

	surface->EndPaint();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq 0x5b8(%rdi), %rdi
callq 0x8630
movq %rax, 0x38(%rsp)
movq %rdx, %r12
shrq $0x20, %r12
movq %rax, %rcx
shrq $0x20, %rcx
subl %ecx, %r12d
leal -0x76(%r12), %ecx
cmpl %ebp, %ecx
cmovll %ecx, %ebp
cmpl $0x6f, %ebp
pushq $0x6e
popq %r15
cmovgel %ebp, %r15d
movq %rdx, 0x40(%rsp)
movq 0x618(%rbx), %rcx
cmpl %r15d, 0x5c8(%rcx)
jne 0xd87e
cmpb $0x1, 0x628(%rbx)
jne 0xda25
subl %eax, %edx
movq 0x5b8(%rbx), %rdi
movq (%rdi), %rax
movq %rdx, %r14
movq %rdx, 0x10(%rsp)
callq *0x40(%rax)
movq %rax, 0x28(%rsp)
leaq 0x38(%rsp), %rsi
movq %rax, %rdi
callq 0x84f0
leaq 0x608(%rbx), %rax
movq %rax, 0x20(%rsp)
movq 0x608(%rbx), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
movb %al, 0xf(%rsp)
movq 0x618(%rbx), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
leaq 0x600(%rbx), %rax
movq %rax, 0x18(%rsp)
movq 0x600(%rbx), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq 0x608(%rbx), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq 0x630(%rbx), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq 0x600(%rbx), %rdi
leal -0xe(%r14), %eax
leal -0x2a(%r15), %ecx
leaq 0x30(%rsp), %rbp
movl %eax, (%rbp)
movl %ecx, 0x4(%rbp)
movl $0xa8, %r13d
leaq (%rdi,%r13), %rsi
movq (%rdi), %rax
movq %rbp, %rdx
callq *0x150(%rax)
movq 0x608(%rbx), %rdi
movl $0xb0, %r14d
movq 0x600(%rbx), %rdx
addq %r14, %rdx
leaq (%rdi,%r13), %rsi
movq (%rdi), %rax
callq *0x150(%rax)
movq 0x610(%rbx), %rdi
addq 0x600(%rbx), %r14
leaq (%rdi,%r13), %rsi
movq (%rdi), %rax
movq %r14, %rdx
callq *0x150(%rax)
movq 0x630(%rbx), %rdi
leal 0x2(%r15), %r14d
movl %r14d, %esi
callq 0x112d6
movq 0x630(%rbx), %rdi
movl %r12d, %eax
subl %r14d, %eax
shlq $0x20, %rax
movl 0x10(%rsp), %ecx
orq %rax, %rcx
movq %rcx, (%rbp)
addq %rdi, %r13
movq (%rdi), %rax
leaq 0x30(%rsp), %rdx
movq %r13, %rsi
callq *0x150(%rax)
cvtsi2sd %r15d, %xmm0
cvtsi2sd %r12d, %xmm1
movb $0x0, 0x628(%rbx)
divsd %xmm1, %xmm0
movsd %xmm0, 0x620(%rbx)
movq 0x618(%rbx), %rdi
movl %r15d, %esi
callq 0x88d0
movq 0x618(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
cmpb $0x0, 0xf(%rsp)
movq 0x18(%rsp), %rax
cmovneq 0x20(%rsp), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq 0x630(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq 0x28(%rsp), %rdi
callq 0x8910
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq