// File: /workspace/github_c_makefile_star2_O2/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 0x58c80
movq 0xf07e9(%rip), %rax     # 0x161df8
addq $0x10, %rax
movq %rax, (%rbx)
andq $0x0, 0x600(%rbx)
leaq 0xe673b(%rip), %rax     # 0x157d60
movq %rax, 0x5f8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x608(%rbx)
andq $0x0, 0x620(%rbx)
leaq 0x618(%rbx), %r14
leaq 0xe674c(%rip), %rax     # 0x157d98
movq %rax, 0x618(%rbx)
movups %xmm0, 0x628(%rbx)
movq 0xeff97(%rip), %rax     # 0x1615f8
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
andl $0x0, 0x5b8(%rbx)
testq %r15, %r15
cmovneq %r15, %rax
movq %rax, 0x5d0(%rbx)
movl (%rax), %esi
movq %rbx, %rdi
callq 0x58130
andq $0x0, 0x5c0(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x5c8(%rbx)
cmpl $0x0, 0xb0(%rbx)
pushq $0x11
popq %rbp
pushq $0x18
popq %r15
jne 0x716ec
cmpw $0x2, 0x1a0(%rbx)
movl %r15d, %esi
cmovel %ebp, %esi
movq %rbx, %rdi
callq 0x5a1f0
cmpl $0x0, 0xb4(%rbx)
jne 0x7170b
cmpw $0x2, 0x1a0(%rbx)
cmovel %r15d, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x58980
movq %rbx, 0x600(%rbx)
movq %rbx, 0x620(%rbx)
leaq 0x478(%rbx), %rsi
movq %r14, %rdi
callq 0x72300
movq (%rbx), %rax
movq 0xefd9e(%rip), %rsi     # 0x1614d0
movq %rbx, %rdi
callq *0x138(%rax)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x56700
movq %rax, %r15
cmpw $0x1, 0x1a0(%rbx)
pushq $-0x2
popq %rbp
jne 0x71781
movl 0xb0(%rbx), %ecx
pushq $0x2
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
movl %eax, %r9d
addl $0x2, %r9d
movl %ecx, %eax
cltd
idivl %ebp
movl %eax, %r8d
addl $-0x4, %r8d
movl 0xb4(%rbx), %edi
pushq $-0x4
popq %rax
jmp 0x7179d
pushq $-0x4
popq %r8
pushq $0x2
popq %r9
movl 0xb0(%rbx), %ecx
movl 0xb4(%rbx), %edi
movl %edi, %eax
cltd
idivl %ebp
addl $-0x4, %eax
addl %eax, %edi
addl %r8d, %ecx
leaq 0x8(%rsp), %rsi
movl %r9d, (%rsi)
movl $0x2, 0x4(%rsi)
shlq $0x20, %rdi
orq %rdi, %rcx
leaq 0x10(%rsp), %rdx
movq %rcx, (%rdx)
movq %r15, %rdi
callq 0x56ad0
movq %r15, 0x5e8(%rbx)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x56700
movq %rax, %r15
movzwl 0x1a0(%rbx), %eax
cmpw $0x2, %ax
jne 0x71808
movl 0xb4(%rbx), %ecx
pushq $0x2
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
addl $0x2, %eax
movl $0x2, 0x8(%rsp)
movl %eax, 0xc(%rsp)
jmp 0x7183c
movabsq $0x200000002, %rcx      # imm = 0x200000002
movq %rcx, 0x8(%rsp)
cmpw $0x1, %ax
jne 0x71836
movl 0xb0(%rbx), %esi
movl 0xb4(%rbx), %ecx
movl %esi, %eax
cltd
idivl %ebp
addl $-0x4, %eax
pushq $-0x4
popq %rdx
jmp 0x7184f
movl 0xb4(%rbx), %ecx
movl %ecx, %eax
cltd
idivl %ebp
movl %eax, %edx
addl $-0x4, %edx
movl 0xb0(%rbx), %esi
pushq $-0x4
popq %rax
addl %edx, %ecx
addl %eax, %esi
shlq $0x20, %rcx
orq %rcx, %rsi
leaq 0x10(%rsp), %rdx
movq %rsi, (%rdx)
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x56ad0
movq %r15, 0x5f0(%rbx)
movl $0x2f8, %r15d           # imm = 0x2F8
movq 0x5e8(%rbx), %rdi
addq %r15, %rdi
movq 0xefbdb(%rip), %rsi     # 0x161468
xorl %edx, %edx
movq %rbx, %rcx
callq 0x7238e
addq 0x5f0(%rbx), %r15
movq 0xf00d3(%rip), %rsi     # 0x161978
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x7238e
movl $0x318, %r15d           # imm = 0x318
movq 0x5e8(%rbx), %rdi
addq %r15, %rdi
movq 0xeff87(%rip), %rsi     # 0x161850
xorl %edx, %edx
movq %rbx, %rcx
callq 0x7238e
addq 0x5f0(%rbx), %r15
movq 0xeff6f(%rip), %rsi     # 0x161850
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x7238e
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 0xf0624(%rip), %rsi     # 0x161f40
xorl %edx, %edx
movq %rbx, %rcx
callq 0x7242a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x71937
movq %rax, %r12
movl $0x5b8, %esi            # imm = 0x5B8
movq %r15, %rdi
callq 0x564c0
jmp 0x7194c
movq %rax, %r12
leaq 0x5f8(%rbx), %r15
movq %r14, %rdi
callq 0x724c6
movq %r15, %rdi
callq 0x724e0
movq %rbx, %rdi
callq 0x58860
movq %r12, %rdi
callq 0x58260
nop