// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/basic/button.cpp
// Function: smooth::GUI::Button::Button(smooth::String const&, smooth::GUI::Bitmap const&, smooth::GUI::Point const&, smooth::GUI::Size const&)
S::GUI::Button::Button(const String &iText, const Bitmap &iBitmap, const Point &iPos, const Size &iSize) : Widget(iPos, iSize)
{
	type = classID;
	text = iText;

	SetBitmap(iBitmap);

	if (GetWidth()	== 0) SetWidth(80);
	if (GetHeight() == 0) SetHeight(22);

	ComputeTextSize();

	hotspot	= new HotspotSimpleButton(flags & BF_NOFRAME ? Point() : Point(4, 4), GetSize() - (flags & BF_NOFRAME ? Size() : Size(8, 8)));
	hotspot->onLeftButtonClick.Connect(&onAction);

	Add(hotspot);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x70(%rbp)
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x5c220
movq -0x70(%rbp), %rdi
movq 0x176fd1(%rip), %rax    # 0x2087d0
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x5b8, %rdi            # imm = 0x5B8
movq %rdi, -0x68(%rbp)
xorl %esi, %esi
callq 0x5d4a0
jmp 0x9181a
movq -0x70(%rbp), %rdi
movq 0x1775eb(%rip), %rax    # 0x208e10
movswl (%rax), %esi
addq $0x20, %rdi
callq 0x5a2e0
jmp 0x91833
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0xf0, %rdi
callq 0x59760
jmp 0x91849
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5da20
jmp 0x91858
movq -0x70(%rbp), %rdi
callq 0x5a210
movl %eax, -0x74(%rbp)
jmp 0x91866
movl -0x74(%rbp), %eax
cmpl $0x0, %eax
jne 0x918a2
movq -0x70(%rbp), %rdi
movl $0x50, %esi
callq 0x5db30
jmp 0x9187e
jmp 0x918a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x91a2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x91a22
movq -0x70(%rbp), %rdi
callq 0x5b860
movl %eax, -0x78(%rbp)
jmp 0x918b0
movl -0x78(%rbp), %eax
cmpl $0x0, %eax
jne 0x918ca
movq -0x70(%rbp), %rdi
movl $0x16, %esi
callq 0x5bed0
jmp 0x918c8
jmp 0x918ca
movq -0x70(%rbp), %rdi
callq 0x59de0
jmp 0x918d5
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x59820
movq %rax, -0x80(%rbp)
jmp 0x918e5
movq -0x70(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x91901
leaq -0x3c(%rbp), %rdi
callq 0x5b530
jmp 0x918ff
jmp 0x91915
leaq -0x3c(%rbp), %rdi
movl $0x4, %edx
movl %edx, %esi
callq 0x5c2c0
jmp 0x91913
jmp 0x91915
movq -0x70(%rbp), %rdi
callq 0x5bf70
movq %rax, -0x88(%rbp)
jmp 0x91927
movq -0x70(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x91943
leaq -0x4c(%rbp), %rdi
callq 0x59230
jmp 0x91941
jmp 0x91957
leaq -0x4c(%rbp), %rdi
movl $0x8, %edx
movl %edx, %esi
callq 0x59260
jmp 0x91955
jmp 0x91957
movq -0x88(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
callq 0x5db90
movq %rax, -0x90(%rbp)
jmp 0x91970
movq -0x80(%rbp), %rdi
movq -0x90(%rbp), %rax
movq %rax, -0x44(%rbp)
leaq -0x3c(%rbp), %rsi
leaq -0x44(%rbp), %rdx
callq 0x59c60
jmp 0x9198e
movq -0x70(%rbp), %rsi
movq -0x80(%rbp), %rax
movq %rax, 0x5c0(%rsi)
movq 0x5c0(%rsi), %rdi
addq $0x338, %rdi            # imm = 0x338
addq $0x478, %rsi            # imm = 0x478
callq 0x8e210
jmp 0x919b9
movq -0x70(%rbp), %rdi
movq 0x5c0(%rdi), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x919cf
movq -0x70(%rbp), %rcx
movq %rcx, %rdi
addq $0x298, %rdi            # imm = 0x298
movq 0x176ae4(%rip), %rax    # 0x2084c8
movq %rax, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x92400
jmp 0x919ff
addq $0x90, %rsp
popq %rbp
retq
movq -0x80(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x5b8, %esi            # imm = 0x5B8
callq 0x595b0
movq -0x68(%rbp), %rdi
callq 0x5de40
movq -0x70(%rbp), %rdi
callq 0x5bd90
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nopl (%rax)