// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/basic/arrows.cpp
// Function: smooth::GUI::Arrows::Arrows(smooth::GUI::Point const&, smooth::GUI::Size const&, int, int*, int, int)
S::GUI::Arrows::Arrows(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;

	stepSize	= 1;

	dummyVariable	= 0;

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

	SetValue(*variable);

	timer		= NIL;
	timerCount	= 0;
	timerDirection	= 1;

	if (GetWidth() == 0) SetWidth(subtype == OR_VERT ? 17 : 24);
	if (GetHeight() == 0) SetHeight(subtype == OR_VERT ? 24 : 17);

	onRangeChange.SetParentObject(this);

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

	SetBackgroundColor(Setup::BackgroundColor);

	arrow1Hotspot	= new HotspotSimpleButton(Point(2 + (subtype == OR_HORZ ? GetWidth() / 2 : 0), 2), GetSize() - Size(4 + (subtype == OR_HORZ ? GetWidth() / 2 : 0), 4 + (subtype == OR_HORZ ? 0 : GetHeight() / 2)));
	arrow2Hotspot	= new HotspotSimpleButton(Point(2, 2 + (subtype == OR_VERT ? GetHeight() / 2 : 0)), GetSize() - Size(4 + (subtype == OR_HORZ ? GetWidth() / 2 : 0), 4 + (subtype == OR_HORZ ? 0 : GetHeight() / 2)));

	arrow1Hotspot->onLeftButtonDown.Connect(&Arrows::OnMouseDownPlus, this);
	arrow2Hotspot->onLeftButtonDown.Connect(&Arrows::OnMouseDownMinus, this);

	arrow1Hotspot->onLeftButtonUp.Connect(&Arrows::OnMouseRelease, this);
	arrow2Hotspot->onLeftButtonUp.Connect(&Arrows::OnMouseRelease, this);

	Add(arrow1Hotspot);
	Add(arrow2Hotspot);

	onChangeSize.Connect(&Arrows::OnChangeSize, this);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebp
movq %r8, %r15
movl %ecx, %r12d
movq %rdi, %rbx
movl 0x50(%rsp), %r13d
callq 0x57a30
movq 0xfa485(%rip), %rax     # 0x16bdf8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x600(%rbx)
leaq 0xf03b6(%rip), %rcx     # 0x161d40
movq %rcx, 0x5f8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x608(%rbx)
leaq 0x618(%rbx), %r14
movq %rax, 0x620(%rbx)
leaq 0xf03c8(%rip), %rax     # 0x161d78
movq %rax, 0x618(%rbx)
movups %xmm0, 0x628(%rbx)
movq 0xf9c33(%rip), %rax     # 0x16b5f8
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
movw %r12w, 0x1a0(%rbx)
movl %ebp, 0x5d8(%rbx)
movl %r13d, 0x5dc(%rbx)
movl $0x1, 0x5e0(%rbx)
leaq 0x5b8(%rbx), %rax
movl $0x0, 0x5b8(%rbx)
testq %r15, %r15
cmovneq %r15, %rax
movq %rax, 0x5d0(%rbx)
movl (%rax), %ecx
cmpl %ebp, %ecx
cmovgl %ecx, %ebp
cmpl %r13d, %ebp
cmovgel %r13d, %ebp
movl %ebp, (%rax)
cmpl %ecx, %ebp
je 0x71a28
movq %r14, %rdi
movl %ebp, %esi
callq 0x72a62
movq $0x0, 0x5c0(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x5c8(%rbx)
cmpl $0x0, 0xb0(%rbx)
jne 0x71a85
cmpw $0x2, 0x1a0(%rbx)
movl $0x11, %eax
movl $0x18, %ecx
cmovel %eax, %ecx
leaq 0xa8(%rbx), %rsi
movl 0xb4(%rbx), %eax
leaq 0x8(%rsp), %rdx
movl %ecx, (%rdx)
movl %eax, 0x4(%rdx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x150(%rax)
cmpl $0x0, 0xb4(%rbx)
jne 0x71ac6
cmpw $0x2, 0x1a0(%rbx)
movl $0x18, %eax
movl $0x11, %ecx
cmovel %eax, %ecx
leaq 0xa8(%rbx), %rsi
movl 0xb0(%rbx), %eax
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movl %ecx, 0x4(%rdx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x150(%rax)
movq %rbx, 0x600(%rbx)
movq %rbx, 0x620(%rbx)
leaq 0x478(%rbx), %rsi
movq %r14, %rdi
callq 0x7273c
movq (%rbx), %rax
movq 0xf99e3(%rip), %rsi     # 0x16b4d0
movq %rbx, %rdi
callq *0x138(%rax)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x556b0
movq %rax, %r15
cmpw $0x1, 0x1a0(%rbx)
jne 0x71b33
movl 0xb0(%rbx), %eax
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
subl %edx, %esi
addl $0x2, %edx
movl 0xb4(%rbx), %ecx
jmp 0x71b59
movl 0xb0(%rbx), %eax
movl 0xb4(%rbx), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
subl %edx, %edi
movl $0x2, %edx
addl %edi, %ecx
addl %esi, %eax
leaq 0x8(%rsp), %rsi
movl %edx, (%rsi)
movl $0x2, 0x4(%rsi)
shlq $0x20, %rcx
orq %rcx, %rax
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %r15, %rdi
callq 0x55a60
movq %r15, 0x5e8(%rbx)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x556b0
movq %rax, %r15
movzwl 0x1a0(%rbx), %eax
cmpw $0x2, %ax
jne 0x71bc3
movl 0xb4(%rbx), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl $0x2, %ecx
movl $0x2, 0x8(%rsp)
movl %ecx, 0xc(%rsp)
jmp 0x71c01
movabsq $0x200000002, %rcx      # imm = 0x200000002
movq %rcx, 0x8(%rsp)
cmpw $0x1, %ax
jne 0x71bfb
movl 0xb0(%rbx), %ecx
movl 0xb4(%rbx), %eax
movl %ecx, %edi
shrl $0x1f, %edi
addl %ecx, %edi
sarl %edi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
subl %edi, %edx
jmp 0x71c1c
movl 0xb4(%rbx), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
subl %ecx, %esi
movl 0xb0(%rbx), %ecx
addl %esi, %eax
addl %edx, %ecx
shlq $0x20, %rax
orq %rax, %rcx
leaq 0x10(%rsp), %rdx
movq %rcx, (%rdx)
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x55a60
movq %r15, 0x5f0(%rbx)
movl $0x2f8, %r15d           # imm = 0x2F8
movq 0x5e8(%rbx), %rdi
addq %r15, %rdi
movq 0xf980e(%rip), %rsi     # 0x16b468
xorl %edx, %edx
movq %rbx, %rcx
callq 0x727ee
addq 0x5f0(%rbx), %r15
movq 0xf9d06(%rip), %rsi     # 0x16b978
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x727ee
movl $0x318, %r15d           # imm = 0x318
movq 0x5e8(%rbx), %rdi
addq %r15, %rdi
movq 0xf9bba(%rip), %rsi     # 0x16b850
xorl %edx, %edx
movq %rbx, %rcx
callq 0x727ee
addq 0x5f0(%rbx), %r15
movq 0xf9ba2(%rip), %rsi     # 0x16b850
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x727ee
movq 0x5e8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movq 0x5f0(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
leaq 0x298(%rbx), %rdi
movq 0xfa257(%rip), %rsi     # 0x16bf40
xorl %edx, %edx
movq %rbx, %rcx
callq 0x728ae
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x71d04
movq %rax, %r12
movl $0x5b8, %esi            # imm = 0x5B8
movq %r15, %rdi
callq 0x55480
jmp 0x71d19
movq %rax, %r12
leaq 0x5f8(%rbx), %r15
movq %r14, %rdi
callq 0x7296e
movq %r15, %rdi
callq 0x72988
movq %rbx, %rdi
callq 0x57640
movq %r12, %rdi
callq 0x57090