// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/samples/beatclock/beat.cpp
// Function: BeatClock::BeatClock()
BeatClock::BeatClock() : Application("BeatClock")
{
	actbeats    = -1;
	actcbeats   = -1;
	actccbeats  = -1;
	timeformat  = 0;
	centi	    = True;
	isalarm	    = False;
	alarmexec   = False;
	alarmbeats  = 0;
	alarmsecs   = 0;
	alarmoption = 0;
	modechange  = 3;
	timezone    = 0;

	wmpaint	    = True;
	wpx	    = 16;
	wpy	    = 16;

	ReadConfig();

	wnd		= new GUI::Window("BeatClock", Point(wpx, wpy), Size(164, 103));
	title		= new Titlebar(TB_CLOSEBUTTON);
	menubar		= new Menubar();
	timer		= new Timer();
	dragcontrol	= new DragControl();

	timer->onInterval.Connect(&BeatClock::PaintTime, this);

	MenuEntry	*entry;

	menubar->AddEntry("Mode")->onAction.Connect(&BeatClock::Mode, this);
	menubar->AddEntry("Options")->onAction.Connect(&BeatClock::ShowOptionsDialog, this);
	menubar->AddEntry()->SetOrientation(OR_RIGHT);

	entry = menubar->AddEntry("Info");
	entry->onAction.Connect(&BeatClock::Info, this);
	entry->SetOrientation(OR_RIGHT);

	Add(wnd);

	wnd->Add(dragcontrol);
	wnd->Add(title);
	wnd->Add(menubar);

	wnd->SetIcon(ImageLoader::Load("beat.pci:0"));
	wnd->onPaint.Connect(&BeatClock::PaintAll, this);
	wnd->SetFlags(WF_TOPMOST | WF_NOTASKBUTTON | WF_NORESIZE);
	wnd->onChangePosition.Connect(&BeatClock::OnChangePosition, this);
	wnd->Show();

	timer->Start(50);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x158(%rbp)
leaq 0x77a5(%rip), %rsi      # 0xd036
leaq -0x20(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x5400
movq -0x158(%rbp), %rdi
movq -0x150(%rbp), %rsi
callq 0x53e0
jmp 0x58b6
leaq -0x20(%rbp), %rdi
callq 0x54a0
movq -0x158(%rbp), %rdi
leaq 0xbe23(%rip), %rax      # 0x116f0
movq %rax, (%rdi)
addq $0x608, %rdi            # imm = 0x608
movq %rdi, -0x160(%rbp)
xorl %esi, %esi
callq 0x5280
jmp 0x58e7
movq -0x158(%rbp), %rdi
movl $0xffffffff, 0x5e0(%rdi) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x5e4(%rdi) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x5e8(%rdi) # imm = 0xFFFFFFFF
movl $0x0, 0x5ec(%rdi)
movb $0x1, 0x5f0(%rdi)
movb $0x0, 0x5f1(%rdi)
movb $0x0, 0x5f2(%rdi)
movl $0x0, 0x5f4(%rdi)
movl $0x0, 0x5f8(%rdi)
movl $0x0, 0x620(%rdi)
movl $0x3, 0x5fc(%rdi)
movl $0x0, 0x600(%rdi)
movb $0x1, 0x624(%rdi)
movl $0x10, 0x628(%rdi)
movl $0x10, 0x62c(%rdi)
callq 0x6100
jmp 0x597f
movl $0x6d8, %edi            # imm = 0x6D8
callq 0x52e0
movq %rax, -0x168(%rbp)
jmp 0x5992
movb $0x1, -0x59(%rbp)
leaq 0x7699(%rip), %rsi      # 0xd036
leaq -0x48(%rbp), %rdi
callq 0x5400
jmp 0x59a8
movq -0x158(%rbp), %rax
movl 0x628(%rax), %esi
movl 0x62c(%rax), %edx
leaq -0x50(%rbp), %rdi
callq 0x6720
jmp 0x59c6
leaq -0x58(%rbp), %rdi
movl $0xa4, %esi
movl $0x67, %edx
callq 0x6740
jmp 0x59db
movq -0x168(%rbp), %rdi
xorl %eax, %eax
movl %eax, %r8d
leaq -0x48(%rbp), %rsi
leaq -0x50(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x51a0
jmp 0x59fa
movq -0x158(%rbp), %rax
movq -0x168(%rbp), %rcx
movb $0x0, -0x59(%rbp)
movq %rcx, 0x5b8(%rax)
leaq -0x48(%rbp), %rdi
callq 0x54a0
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x52e0
movq %rax, -0x170(%rbp)
jmp 0x5a2f
movq -0x170(%rbp), %rdi
movl $0x4, %esi
callq 0x50f0
jmp 0x5a42
movq -0x158(%rbp), %rax
movq -0x170(%rbp), %rcx
movq %rcx, 0x5c0(%rax)
movl $0x688, %edi            # imm = 0x688
callq 0x52e0
movq %rax, -0x178(%rbp)
jmp 0x5a6a
movq -0x178(%rbp), %rdi
callq 0x5180
jmp 0x5a78
movq -0x158(%rbp), %rax
movq -0x178(%rbp), %rcx
movq %rcx, 0x5c8(%rax)
movl $0x68, %edi
callq 0x52e0
movq %rax, -0x180(%rbp)
jmp 0x5aa0
movq -0x180(%rbp), %rdi
callq 0x5320
jmp 0x5aae
movq -0x158(%rbp), %rax
movq -0x180(%rbp), %rcx
movq %rcx, 0x5d8(%rax)
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x52e0
movq %rax, -0x188(%rbp)
jmp 0x5ad6
movq -0x188(%rbp), %rdi
callq 0x52b0
jmp 0x5ae4
movq -0x158(%rbp), %rcx
movq -0x188(%rbp), %rax
movq %rax, 0x5d0(%rcx)
movq 0x5d8(%rcx), %rdi
addq $0x48, %rdi
leaq 0x605(%rip), %rax       # 0x6110
movq %rax, -0x70(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x6760
jmp 0x5b26
movq -0x158(%rbp), %rax
movq 0x5c8(%rax), %rax
movq %rax, -0x190(%rbp)
leaq 0x74fe(%rip), %rsi      # 0xd040
leaq -0x90(%rbp), %rdi
callq 0x5400
jmp 0x5b50
movq -0x190(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
leaq -0x90(%rbp), %rsi
callq 0x68a0
movq %rax, -0x198(%rbp)
jmp 0x5b70
movq -0x158(%rbp), %rcx
movq -0x198(%rbp), %rdi
addq $0x478, %rdi            # imm = 0x478
leaq 0x5c4(%rip), %rax       # 0x6150
movq %rax, -0xa0(%rbp)
movq $0x0, -0x98(%rbp)
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
callq 0x6760
jmp 0x5bb3
leaq -0x90(%rbp), %rdi
callq 0x54a0
movq -0x158(%rbp), %rax
movq 0x5c8(%rax), %rax
movq %rax, -0x1a0(%rbp)
leaq 0x75fe(%rip), %rsi      # 0xd1d9
leaq -0xb8(%rbp), %rdi
callq 0x5400
jmp 0x5be9
movq -0x1a0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
leaq -0xb8(%rbp), %rsi
callq 0x68a0
movq %rax, -0x1a8(%rbp)
jmp 0x5c09
movq -0x158(%rbp), %rcx
movq -0x1a8(%rbp), %rdi
addq $0x478, %rdi            # imm = 0x478
leaq 0x6ab(%rip), %rax       # 0x62d0
movq %rax, -0xc8(%rbp)
movq $0x0, -0xc0(%rbp)
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
callq 0x6760
jmp 0x5c4c
leaq -0xb8(%rbp), %rdi
callq 0x54a0
movq -0x158(%rbp), %rax
movq 0x5c8(%rax), %rax
movq %rax, -0x1b0(%rbp)
leaq -0xe0(%rbp), %rdi
xorl %esi, %esi
callq 0x5280
jmp 0x5c7d
movq -0x1b0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
leaq -0xe0(%rbp), %rsi
callq 0x68a0
movq %rax, -0x1b8(%rbp)
jmp 0x5c9d
movq -0x1b8(%rbp), %rdi
movq (%rdi), %rax
movq 0x120(%rax), %rax
movl $0x20, %esi
callq *%rax
jmp 0x5cb7
leaq -0xe0(%rbp), %rdi
callq 0x54a0
movq -0x158(%rbp), %rax
movq 0x5c8(%rax), %rax
movq %rax, -0x1c0(%rbp)
leaq 0x7366(%rip), %rsi      # 0xd045
leaq -0xf8(%rbp), %rdi
callq 0x5400
jmp 0x5ced
movq -0x1c0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
leaq -0xf8(%rbp), %rsi
callq 0x68a0
movq %rax, -0x1c8(%rbp)
jmp 0x5d0d
movq -0x1c8(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x54a0
movq -0x158(%rbp), %rcx
movq -0x78(%rbp), %rdi
addq $0x478, %rdi            # imm = 0x478
leaq 0x6b3(%rip), %rax       # 0x63f0
movq %rax, -0x108(%rbp)
movq $0x0, -0x100(%rbp)
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
callq 0x6760
jmp 0x5d64
movq -0x78(%rbp), %rdi
movq (%rdi), %rax
movq 0x120(%rax), %rax
movl $0x20, %esi
callq *%rax
jmp 0x5d7b
movq -0x158(%rbp), %rdi
movq 0x5b8(%rdi), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x5d94
movq -0x158(%rbp), %rax
movq 0x5b8(%rax), %rdi
movq 0x5d0(%rax), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x5db4
movq -0x158(%rbp), %rax
movq 0x5b8(%rax), %rdi
movq 0x5c0(%rax), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x5dd4
movq -0x158(%rbp), %rax
movq 0x5b8(%rax), %rdi
movq 0x5c8(%rax), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x5df4
movq -0x158(%rbp), %rax
movq 0x5b8(%rax), %rax
movq %rax, -0x1d0(%rbp)
leaq 0x723a(%rip), %rsi      # 0xd04a
leaq -0x128(%rbp), %rdi
callq 0x5400
jmp 0x5e1e
leaq -0x110(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x5420
jmp 0x5e33
movq -0x1d0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x5260
jmp 0x5e48
leaq -0x110(%rbp), %rdi
callq 0x5130
leaq -0x128(%rbp), %rdi
callq 0x54a0
movq -0x158(%rbp), %rcx
movq 0x5b8(%rcx), %rdi
addq $0x648, %rdi            # imm = 0x648
leaq 0x614(%rip), %rax       # 0x6490
movq %rax, -0x138(%rbp)
movq $0x0, -0x130(%rbp)
movq -0x138(%rbp), %rsi
movq -0x130(%rbp), %rdx
callq 0x6760
jmp 0x5ea3
movq -0x158(%rbp), %rax
movq 0x5b8(%rax), %rdi
movl $0xe, %esi
callq 0x6940
jmp 0x5ebd
movq -0x158(%rbp), %rcx
movq 0x5b8(%rcx), %rdi
addq $0x278, %rdi            # imm = 0x278
leaq 0x6b7(%rip), %rax       # 0x6590
movq %rax, -0x148(%rbp)
movq $0x0, -0x140(%rbp)
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdx
callq 0x69b0
jmp 0x5f00
movq -0x158(%rbp), %rax
movq 0x5b8(%rax), %rdi
movq (%rdi), %rax
movq 0x58(%rax), %rax
callq *%rax
jmp 0x5f19
movq -0x158(%rbp), %rax
movq 0x5d8(%rax), %rdi
movl $0x32, %esi
callq 0x5030
jmp 0x5f33
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54a0
jmp 0x60f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x60ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x60de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5f9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x54a0
testb $0x1, -0x59(%rbp)
jne 0x5fa3
jmp 0x5fb4
movq -0x168(%rbp), %rdi
movl $0x6d8, %esi            # imm = 0x6D8
callq 0x5050
jmp 0x60de
movq -0x170(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x5c8, %esi            # imm = 0x5C8
callq 0x5050
jmp 0x60de
movq -0x178(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x688, %esi            # imm = 0x688
callq 0x5050
jmp 0x60de
movq -0x180(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x68, %esi
callq 0x5050
jmp 0x60de
movq -0x188(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x5c8, %esi            # imm = 0x5C8
callq 0x5050
jmp 0x60de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x54a0
jmp 0x60de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x54a0
jmp 0x60de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x54a0
jmp 0x60de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x54a0
jmp 0x60de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x60d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x5130
leaq -0x128(%rbp), %rdi
callq 0x54a0
movq -0x160(%rbp), %rdi
callq 0x54a0
movq -0x158(%rbp), %rdi
callq 0x5290
movq -0x28(%rbp), %rdi
callq 0x5190
nop