// File: /workspace/github_c_makefile_star2_O1/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 0xfb189(%rip), %rax     # 0x16cdf8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x600(%rbx)
leaq 0xf10ba(%rip), %rcx     # 0x162d40
movq %rcx, 0x5f8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x608(%rbx)
leaq 0x618(%rbx), %r14
movq %rax, 0x620(%rbx)
leaq 0xf10cc(%rip), %rax     # 0x162d78
movq %rax, 0x618(%rbx)
movups %xmm0, 0x628(%rbx)
movq 0xfa937(%rip), %rax     # 0x16c5f8
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 0x71d24
movq %r14, %rdi
movl %ebp, %esi
callq 0x72dc0
movq $0x0, 0x5c0(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x5c8(%rbx)
cmpl $0x0, 0xb0(%rbx)
jne 0x71d81
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 0x71dc2
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 0x72aa2
movq (%rbx), %rax
movq 0xfa6e7(%rip), %rsi     # 0x16c4d0
movq %rbx, %rdi
callq *0x138(%rax)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x556b0
movq %rax, %r15
movzwl 0x1a0(%rbx), %ecx
cmpw $0x1, %cx
jne 0x71e42
movl 0xb0(%rbx), %eax
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
addl $0x2, %edx
movl %edx, 0x8(%rsp)
movl $0x2, 0xc(%rsp)
movl 0xb0(%rbx), %eax
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
subl %edx, %eax
jmp 0x71e56
movabsq $0x200000002, %rax      # imm = 0x200000002
movq %rax, 0x8(%rsp)
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
cmpw $0x1, %cx
je 0x71e77
movl 0xb4(%rbx), %ecx
movl %ecx, %esi
shrl $0x1f, %esi
addl %ecx, %esi
sarl %esi
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
subl %esi, %edx
addl 0xb0(%rbx), %eax
addl 0xb4(%rbx), %edx
shlq $0x20, %rdx
orq %rdx, %rax
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x55a60
movq %r15, 0x5e8(%rbx)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x556b0
movq %rax, %r15
movzwl 0x1a0(%rbx), %eax
movl $0x2, %ecx
cmpw $0x2, %ax
jne 0x71ed7
movl 0xb4(%rbx), %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
addl $0x2, %ecx
movl $0x2, 0x8(%rsp)
movl %ecx, 0xc(%rsp)
movl $0xfffffffc, %ecx       # imm = 0xFFFFFFFC
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
cmpw $0x1, %ax
jne 0x71f09
movl 0xb0(%rbx), %edx
movl %edx, %edi
shrl $0x1f, %edi
addl %edx, %edi
sarl %edi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
subl %edi, %esi
cmpw $0x1, %ax
je 0x71f25
movl 0xb4(%rbx), %eax
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
movl $0xfffffffc, %ecx       # imm = 0xFFFFFFFC
subl %edx, %ecx
addl 0xb0(%rbx), %esi
addl 0xb4(%rbx), %ecx
shlq $0x20, %rcx
orq %rcx, %rsi
leaq 0x10(%rsp), %rdx
movq %rsi, (%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 0xfa4fd(%rip), %rsi     # 0x16c468
xorl %edx, %edx
movq %rbx, %rcx
callq 0x72b52
addq 0x5f0(%rbx), %r15
movq 0xfa9f5(%rip), %rsi     # 0x16c978
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x72b52
movl $0x318, %r15d           # imm = 0x318
movq 0x5e8(%rbx), %rdi
addq %r15, %rdi
movq 0xfa8a9(%rip), %rsi     # 0x16c850
xorl %edx, %edx
movq %rbx, %rcx
callq 0x72b52
addq 0x5f0(%rbx), %r15
movq 0xfa891(%rip), %rsi     # 0x16c850
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x72b52
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 0xfaf46(%rip), %rsi     # 0x16cf40
xorl %edx, %edx
movq %rbx, %rcx
callq 0x72c10
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x72015
movq %rax, %r12
movl $0x5b8, %esi            # imm = 0x5B8
movq %r15, %rdi
callq 0x55480
jmp 0x7202a
movq %rax, %r12
leaq 0x5f8(%rbx), %r15
movq %r14, %rdi
callq 0x72cce
movq %r15, %rdi
callq 0x72ce8
movq %rbx, %rdi
callq 0x57640
movq %r12, %rdi
callq 0x57090
nop