// File: /workspace/github_c_makefile_star2_O1/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), %eax
movl $0xa, %r12d
cmpw $0x1, %ax
jne 0x7b4b7
cmpl $0x38, 0xb0(%rbx)
jl 0x7b4dc
cmpw $0x2, %ax
jne 0x7b4c6
cmpl $0x38, 0xb4(%rbx)
jl 0x7b4dc
cmpw $0x1, %ax
jne 0x7b4d5
movl 0xb4(%rbx), %r12d
jmp 0x7b4dc
movl 0xb0(%rbx), %r12d
leal -0x4(%r12), %ebp
movq 0x5e8(%rbx), %rdi
movl 0xb0(%rbx), %ecx
movl 0xb4(%rbx), %edx
subl %r12d, %ecx
movl $0x2, %esi
addl %esi, %ecx
cmpw $0x1, %ax
cmovnel %esi, %ecx
subl %r12d, %edx
addl %esi, %edx
cmpw $0x2, %ax
cmovnel %esi, %edx
leaq 0x8(%rsp), %r14
movl %ecx, (%r14)
movl %edx, 0x4(%r14)
movl 0xb0(%rbx), %ecx
movl 0xb4(%rbx), %edx
addl $-0x4, %edx
cmpw $0x1, %ax
cmovnel %ebp, %edx
addl $-0x4, %ecx
cmpw $0x1, %ax
cmovel %ebp, %ecx
movq %rsp, %r15
movl %ecx, (%r15)
movl %edx, 0x4(%r15)
movq (%rdi), %rax
movq %r14, %rsi
movq %r15, %rdx
callq *0x150(%rax)
movq 0x5f0(%rbx), %rdi
movabsq $0x200000002, %rax      # imm = 0x200000002
movq %rax, (%r14)
movl 0xb0(%rbx), %eax
movl 0xb4(%rbx), %ecx
addl $-0x4, %eax
addl $-0x4, %ecx
cmpw $0x1, 0x1a0(%rbx)
cmovel %ebp, %eax
cmovnel %ebp, %ecx
movl %eax, (%r15)
movl %ecx, 0x4(%r15)
movq (%rdi), %rax
leaq 0x8(%rsp), %r15
movq %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 %eax, (%r15)
movl %ecx, 0x4(%r15)
movl %edx, %eax
cmovel %ebp, %eax
cmovnel %ebp, %edx
movl 0xb0(%rbx), %ecx
subl %edx, %ecx
movl 0xb4(%rbx), %edx
subl %eax, %edx
shlq $0x20, %rdx
orq %rdx, %rcx
movq %rcx, (%r14)
movq (%rdi), %rax
leaq 0x8(%rsp), %rsi
movq %rsp, %rdx
callq *0x150(%rax)
movq 0x660(%rbx), %rdi
movzwl 0x1a0(%rbx), %eax
cmpw $0x1, %ax
jne 0x7b665
cvtsi2sdl 0xb0(%rbx), %xmm0
leal (%r12,%r12,2), %ecx
cvtsi2sd %ecx, %xmm1
movl 0x5dc(%rbx), %ecx
movl 0x5d8(%rbx), %edx
subl %edx, %ecx
cvtsi2sd %ecx, %xmm2
subsd %xmm1, %xmm0
divsd %xmm2, %xmm0
movq 0x5d0(%rbx), %rcx
movl (%rcx), %ecx
subl %edx, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %ebp
addl %r12d, %ebp
xorl %ecx, %ecx
jmp 0x7b6af
cvtsi2sdl 0xb4(%rbx), %xmm0
leal (%r12,%r12,2), %ecx
cvtsi2sd %ecx, %xmm1
subsd %xmm1, %xmm0
movl 0x5dc(%rbx), %ecx
movl 0x5d8(%rbx), %edx
subl %edx, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
divsd %xmm1, %xmm0
movq 0x5d0(%rbx), %rcx
movl (%rcx), %ecx
subl %edx, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %ecx
addl %r12d, %ecx
cmpw $0x1, %ax
leaq 0x8(%rsp), %rsi
movl %ebp, (%rsi)
movl %ecx, 0x4(%rsi)
movl 0xb0(%rbx), %eax
cmovel %r12d, %eax
cmovel 0xb4(%rbx), %r12d
movq %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