// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/basic/slider.cpp
// Function: smooth::GUI::Slider::Slider(smooth::GUI::Point const&, smooth::GUI::Size const&, int, int*, int, int)
S::GUI::Slider::Slider(const Point &iPos, const Size &iSize, Int sType, Int *var, Int rangeStart, Int rangeEnd) : Widget(iPos, iSize)
{
	type		= classID;
	subtype		= sType;
	startValue	= rangeStart;
	endValue	= rangeEnd;

	dummyVariable	= 0;
	previousValue	= 0;

	gripSize	= 9;

	if (var == NIL)	variable = &dummyVariable;
	else		variable = var;

	if (GetWidth()	== 0 && subtype == OR_HORZ) SetWidth(100);
	if (GetHeight() == 0 && subtype == OR_VERT) SetHeight(100);

	if (subtype == OR_HORZ)	SetHeight(18);
	else			SetWidth(18);

	onValueChange.SetParentObject(this);
	onValueChange.Connect(&onAction);

	clickHotspot	= new Hotspot(subtype == OR_HORZ ? Point(4, 1) : Point(1, 4), GetSize() - (subtype == OR_HORZ ? Size(8, 2) : Size(2, 8)));
	dragHotspot	= new Hotspot(Point(), Size());

	dragging	= False;

	clickHotspot->onLeftButtonClick.Connect(&Slider::OnMouseClick, this);

	dragHotspot->onMouseDragStart.Connect(&Slider::OnMouseDragStart, this);
	dragHotspot->onMouseDrag.Connect(&Slider::OnMouseDrag, this);
	dragHotspot->onMouseDragEnd.Connect(&Slider::OnMouseDragEnd, this);

	Add(clickHotspot);
	Add(dragHotspot);

	onChangeSize.Connect(&Slider::UpdateHotspotPositions, this);

	SetValue(*variable);

	UpdateHotspotPositions();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5c220
movq -0xc8(%rbp), %rdi
movq 0x1669a5(%rip), %rax    # 0x208d10
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x5f0, %rdi            # imm = 0x5F0
movq %rdi, -0xc0(%rbp)
callq 0x90210
jmp 0xa2387
movq -0xc8(%rbp), %rdi
movq 0x166943(%rip), %rax    # 0x208cd8
movswl (%rax), %esi
addq $0x20, %rdi
callq 0x5a2e0
jmp 0xa23a3
movq -0xc8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movw %cx, 0x1a0(%rax)
movl -0x2c(%rbp), %ecx
movl %ecx, 0x5d8(%rax)
movl 0x10(%rbp), %ecx
movl %ecx, 0x5dc(%rax)
movl $0x0, 0x5b8(%rax)
movl $0x0, 0x5bc(%rax)
movl $0x9, 0x5c8(%rax)
cmpq $0x0, -0x28(%rbp)
jne 0xa2427
movq -0xc8(%rbp), %rax
movq %rax, %rcx
addq $0x5b8, %rcx            # imm = 0x5B8
movq %rcx, 0x5d0(%rax)
jmp 0xa2439
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xa2869
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xa285d
movq -0xc8(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x5d0(%rax)
movq -0xc8(%rbp), %rdi
callq 0x5a210
movl %eax, -0xcc(%rbp)
jmp 0xa244d
movl -0xcc(%rbp), %eax
cmpl $0x0, %eax
jne 0xa2480
movq -0xc8(%rbp), %rax
movswl 0x1a0(%rax), %eax
cmpl $0x1, %eax
jne 0xa2480
movq -0xc8(%rbp), %rdi
movl $0x64, %esi
callq 0x5db30
jmp 0xa247e
jmp 0xa2480
movq -0xc8(%rbp), %rdi
callq 0x5b860
movl %eax, -0xd0(%rbp)
jmp 0xa2494
movl -0xd0(%rbp), %eax
cmpl $0x0, %eax
jne 0xa24c7
movq -0xc8(%rbp), %rax
movswl 0x1a0(%rax), %eax
cmpl $0x2, %eax
jne 0xa24c7
movq -0xc8(%rbp), %rdi
movl $0x64, %esi
callq 0x5bed0
jmp 0xa24c5
jmp 0xa24c7
movq -0xc8(%rbp), %rax
movswl 0x1a0(%rax), %eax
cmpl $0x1, %eax
jne 0xa24ef
movq -0xc8(%rbp), %rdi
movl $0x12, %esi
callq 0x5bed0
jmp 0xa24ed
jmp 0xa2504
movq -0xc8(%rbp), %rdi
movl $0x12, %esi
callq 0x5db30
jmp 0xa2502
jmp 0xa2504
movq -0xc8(%rbp), %rsi
movq %rsi, %rdi
addq $0x5f0, %rdi            # imm = 0x5F0
callq 0x8ad00
jmp 0xa251c
movq -0xc8(%rbp), %rsi
movq %rsi, %rdi
addq $0x5f0, %rdi            # imm = 0x5F0
addq $0x478, %rsi            # imm = 0x478
callq 0x90260
jmp 0xa253b
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x59820
movq %rax, -0xd8(%rbp)
jmp 0xa254e
movq -0xc8(%rbp), %rax
movswl 0x1a0(%rax), %eax
cmpl $0x1, %eax
jne 0xa2578
leaq -0x44(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x5c2c0
jmp 0xa2576
jmp 0xa258f
leaq -0x44(%rbp), %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0x5c2c0
jmp 0xa258d
jmp 0xa258f
movq -0xc8(%rbp), %rdi
callq 0x5bf70
movq %rax, -0xe0(%rbp)
jmp 0xa25a4
movq -0xc8(%rbp), %rax
movswl 0x1a0(%rax), %eax
cmpl $0x1, %eax
jne 0xa25ce
leaq -0x54(%rbp), %rdi
movl $0x8, %esi
movl $0x2, %edx
callq 0x59260
jmp 0xa25cc
jmp 0xa25e5
leaq -0x54(%rbp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x59260
jmp 0xa25e3
jmp 0xa25e5
movq -0xe0(%rbp), %rdi
leaq -0x54(%rbp), %rsi
callq 0x5db90
movq %rax, -0xe8(%rbp)
jmp 0xa25fe
movq -0xd8(%rbp), %rdi
movq -0xe8(%rbp), %rax
movq %rax, -0x4c(%rbp)
leaq -0x44(%rbp), %rsi
leaq -0x4c(%rbp), %rdx
callq 0x59c30
jmp 0xa261f
movq -0xc8(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rcx, 0x5e0(%rax)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x59820
movq %rax, -0xf0(%rbp)
jmp 0xa2647
leaq -0x5c(%rbp), %rdi
callq 0x5b530
jmp 0xa2652
leaq -0x64(%rbp), %rdi
callq 0x59230
jmp 0xa265d
movq -0xf0(%rbp), %rdi
leaq -0x5c(%rbp), %rsi
leaq -0x64(%rbp), %rdx
callq 0x59c30
jmp 0xa2673
movq -0xc8(%rbp), %rcx
movq -0xf0(%rbp), %rax
movq %rax, 0x5e8(%rcx)
movb $0x0, 0x5c4(%rcx)
movq 0x5e0(%rcx), %rdi
addq $0x338, %rdi            # imm = 0x338
movq 0x16648c(%rip), %rax    # 0x208b30
movq %rax, -0x78(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0xa3930
jmp 0xa26bf
movq -0xc8(%rbp), %rcx
movq 0x5e8(%rcx), %rdi
addq $0x3f8, %rdi            # imm = 0x3F8
movq 0x16680d(%rip), %rax    # 0x208ee8
movq %rax, -0x88(%rbp)
movq $0x0, -0x80(%rbp)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0xa3930
jmp 0xa26fc
movq -0xc8(%rbp), %rcx
movq 0x5e8(%rcx), %rdi
addq $0x418, %rdi            # imm = 0x418
movq 0x165d78(%rip), %rax    # 0x208490
movq %rax, -0x98(%rbp)
movq $0x0, -0x90(%rbp)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
callq 0xa3930
jmp 0xa273f
movq -0xc8(%rbp), %rcx
movq 0x5e8(%rcx), %rdi
addq $0x438, %rdi            # imm = 0x438
movq 0x1667c5(%rip), %rax    # 0x208f20
movq %rax, -0xa8(%rbp)
movq $0x0, -0xa0(%rbp)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
callq 0xa3930
jmp 0xa2782
movq -0xc8(%rbp), %rdi
movq 0x5e0(%rdi), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0xa279b
movq -0xc8(%rbp), %rdi
movq 0x5e8(%rdi), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0xa27b4
movq -0xc8(%rbp), %rcx
movq %rcx, %rdi
addq $0x298, %rdi            # imm = 0x298
movq 0x16673c(%rip), %rax    # 0x208f08
movq %rax, -0xb8(%rbp)
movq $0x0, -0xb0(%rbp)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
callq 0xa3a70
jmp 0xa27f3
movq -0xc8(%rbp), %rdi
movq 0x5d0(%rdi), %rax
movl (%rax), %esi
callq 0x59310
jmp 0xa280a
movq -0xc8(%rbp), %rdi
callq 0x5def8
jmp 0xa2818
addq $0xf0, %rsp
popq %rbp
retq
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x5b8, %esi            # imm = 0x5B8
callq 0x595b0
jmp 0xa285d
movq -0xf0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x5b8, %esi            # imm = 0x5B8
callq 0x595b0
movq -0xc0(%rbp), %rdi
callq 0x90610
movq -0xc8(%rbp), %rdi
callq 0x5bd90
movq -0x38(%rbp), %rdi
callq 0x5b6b0
nop