// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/basic/scrollbar.cpp
// Function: smooth::GUI::Scrollbar::UpdateHotspotPositions()
S::Void S::GUI::Scrollbar::UpdateHotspotPositions()
{
	Bool	 smallHotspots	= (subtype == OR_HORZ && (GetWidth() <= 55)) || (subtype == OR_VERT && (GetHeight() <= 55));
	Int	 hotspotSize	= (smallHotspots ? 10 : (subtype == OR_HORZ ? GetHeight() : GetWidth())) - 4;

	arrow1Hotspot->SetMetrics(Point(2 + (subtype == OR_HORZ ? GetWidth() - (hotspotSize + 4) : 0), 2 + (subtype == OR_VERT ? GetHeight() - (hotspotSize + 4) : 0)), subtype == OR_HORZ ? Size(hotspotSize, GetHeight() - 4) : Size(GetWidth() - 4, hotspotSize));
	arrow2Hotspot->SetMetrics(Point(2, 2), subtype == OR_HORZ ? Size(hotspotSize, GetHeight() - 4) : Size(GetWidth() - 4, hotspotSize));

	clickHotspot->SetMetrics(subtype == OR_HORZ ? Point(hotspotSize + 4, 0) : Point(0, hotspotSize + 4), GetSize() - (subtype == OR_HORZ ? Size(2 * (hotspotSize + 4), 0) : Size(0, 2 * (hotspotSize + 4))));
	dragHotspot->SetMetrics(subtype == OR_HORZ ? Point(hotspotSize + 4 + (Int) (((Float) GetWidth() - 3 * (hotspotSize + 4)) / ((Float) (endValue - startValue)) * ((Float) (*variable - startValue))), 0) : Point(0, hotspotSize + 4 + (Int) (((Float) GetHeight() - 3 * (hotspotSize + 4)) / ((Float) (endValue - startValue)) * ((Float) (*variable - startValue)))), subtype == OR_HORZ ? Size(hotspotSize + 4, GetHeight()) : Size(GetWidth(), hotspotSize + 4));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movzwl 0x1a0(%rdi), %ecx
cmpl $0x2, %ecx
je 0x79c9b
cmpl $0x1, %ecx
jne 0x79cbf
movl 0xb0(%rbx), %edx
movl 0xb4(%rbx), %ecx
cmpl $0x38, %edx
pushq $0xa
popq %r12
cmovgel %ecx, %r12d
leal -0x4(%r12), %eax
movq 0x5e8(%rbx), %rdi
subl %r12d, %edx
addl $0x2, %edx
movl %edx, (%rsp)
movl $0x2, 0x4(%rsp)
addl $-0x4, %ecx
movl %eax, %ebp
jmp 0x79cfa
movl 0xb4(%rbx), %edx
cmpl $0x37, %edx
jg 0x79cbf
movq 0x5e8(%rbx), %rdi
movl 0xb0(%rbx), %eax
addl $-0x4, %eax
pushq $0xa
popq %r12
pushq $0x6
popq %rcx
jmp 0x79ce0
movl 0xb0(%rbx), %r12d
leal -0x4(%r12), %eax
movq 0x5e8(%rbx), %rdi
cmpw $0x2, %cx
jne 0x79ce8
movl 0xb4(%rbx), %edx
movl %eax, %ecx
subl %r12d, %edx
addl $0x2, %edx
jmp 0x79ced
pushq $0x2
popq %rdx
movl %eax, %ecx
movl $0x2, (%rsp)
movl %edx, 0x4(%rsp)
movl %ecx, %ebp
leaq 0x8(%rsp), %r14
movl %eax, (%r14)
movl %ecx, 0x4(%r14)
movq (%rdi), %rax
movq %rsp, %r15
movq %r15, %rsi
movq %r14, %rdx
callq *0x150(%rax)
movq 0x5f0(%rbx), %rdi
movabsq $0x200000002, %rax      # imm = 0x200000002
movq %rax, (%r15)
movl 0xb0(%rbx), %eax
movl 0xb4(%rbx), %ecx
addl $-0x4, %ecx
addl $-0x4, %eax
cmpw $0x1, 0x1a0(%rbx)
cmovel %ebp, %eax
cmovnel %ebp, %ecx
movl %eax, (%r14)
movl %ecx, 0x4(%r14)
movq (%rdi), %rax
movq %rsp, %r15
leaq 0x8(%rsp), %r14
movq %r15, %rsi
movq %r14, %rdx
callq *0x150(%rax)
xorl %ebp, %ebp
cmpw $0x1, 0x1a0(%rbx)
movl $0x0, %eax
cmovel %r12d, %eax
movq 0x658(%rbx), %rdi
movl %r12d, %ecx
cmovel %ebp, %ecx
leal (%r12,%r12), %edx
movl %edx, %esi
cmovel %ebp, %esi
cmovnel %ebp, %edx
movl %eax, (%r15)
movl %ecx, 0x4(%r15)
movl 0xb0(%rbx), %eax
subl %edx, %eax
movl 0xb4(%rbx), %ecx
subl %esi, %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, (%r14)
movq (%rdi), %rax
movq %rsp, %rsi
leaq 0x8(%rsp), %rdx
callq *0x150(%rax)
movl 0x5dc(%rbx), %eax
movl 0x5d8(%rbx), %ecx
subl %ecx, %eax
movq 0x5d0(%rbx), %rdx
movl (%rdx), %edx
subl %ecx, %edx
cmpw $0x1, 0x1a0(%rbx)
movq 0x660(%rbx), %rdi
leal (%r12,%r12,2), %ecx
cvtsi2sd %ecx, %xmm2
cvtsi2sd %eax, %xmm1
cvtsi2sd %edx, %xmm0
jne 0x79e2d
cvtsi2sdl 0xb0(%rbx), %xmm3
subsd %xmm2, %xmm3
divsd %xmm1, %xmm3
mulsd %xmm0, %xmm3
cvttsd2si %xmm3, %ebp
addl %r12d, %ebp
movl %r12d, %eax
movl 0xb4(%rbx), %edx
xorl %ecx, %ecx
movl %edx, %r12d
jmp 0x79e4e
cvtsi2sdl 0xb4(%rbx), %xmm3
subsd %xmm2, %xmm3
divsd %xmm1, %xmm3
mulsd %xmm0, %xmm3
cvttsd2si %xmm3, %ecx
addl %r12d, %ecx
movl 0xb0(%rbx), %eax
movq %rsp, %rsi
movl %ebp, (%rsi)
movl %ecx, 0x4(%rsi)
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movl %r12d, 0x4(%rdx)
movq (%rdi), %rax
callq *0x150(%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop