// File: BrianYi[P]timer/src/main.cpp
// Function: main
int main()
{
    TimeDriver* timeDriver = new TimeDriver(1);
    AdvanceTimeWheel* advTimeWheel = new AdvanceTimeWheel;
    SecTimer* secTimer1 = new SecTimer(5);    
    SecTimer* secTimer2 = new SecTimer(10);
    SecTimer* secTimer3 = new SecTimer(60);
    MinTimer* minTimer1 = new MinTimer(1); 
    advTimeWheel->addTimer(secTimer1);
    advTimeWheel->addTimer(secTimer2);
    advTimeWheel->addTimer(secTimer3);
    advTimeWheel->addTimer(minTimer1);
    timeDriver->mountTimeWheel(advTimeWheel);
    timeDriver->start();
    delete timeDriver;
    delete advTimeWheel;
    delete secTimer1;
    delete secTimer2;
    delete secTimer3;
    delete minTimer1;
    exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl $0x0, -0x4(%rbp)
movl $0x28, %edi
callq 0x20a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movl $0x1, %esi
callq 0x30f0
jmp 0x2e22
movq -0x70(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x78, %edi
callq 0x20a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x78(%rbp)
callq 0x3130
jmp 0x2e45
movq -0x78(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x20, %edi
callq 0x20a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x80(%rbp)
movl $0x5, -0x34(%rbp)
leaq -0x34(%rbp), %rsi
movl $0x1, %edx
callq 0x3260
jmp 0x2e78
movq -0x80(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x20, %edi
callq 0x20a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x88(%rbp)
movl $0xa, -0x44(%rbp)
leaq -0x44(%rbp), %rsi
movl $0x1, %edx
callq 0x3260
jmp 0x2eae
movq -0x88(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x20, %edi
callq 0x20a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x90(%rbp)
movl $0x3c, -0x54(%rbp)
leaq -0x54(%rbp), %rsi
movl $0x1, %edx
callq 0x3260
jmp 0x2ee7
movq -0x90(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x20, %edi
callq 0x20a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x98(%rbp)
movl $0x1, -0x64(%rbp)
leaq -0x64(%rbp), %rsi
movl $0x1, %edx
callq 0x32c0
jmp 0x2f20
movq -0x98(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3320
movq -0x28(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x3320
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x3320
movq -0x28(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x3320
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x2270
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, %rax
je 0x2f93
movq -0xa0(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, %rax
je 0x2fb1
movq -0xa8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0xb0(%rbp)
cmpq $0x0, %rax
je 0x2fcf
movq -0xb0(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0xb8(%rbp)
cmpq $0x0, %rax
je 0x2fed
movq -0xb8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x50(%rbp), %rax
movq %rax, -0xc0(%rbp)
cmpq $0x0, %rax
je 0x300b
movq -0xc0(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x60(%rbp), %rax
movq %rax, -0xc8(%rbp)
cmpq $0x0, %rax
je 0x3029
movq -0xc8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
xorl %edi, %edi
callq 0x20c0
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x28, %esi
callq 0x20b0
jmp 0x30e2
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x78, %esi
callq 0x20b0
jmp 0x30e2
movq -0x80(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x20, %esi
callq 0x20b0
jmp 0x30e2
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x20, %esi
callq 0x20b0
jmp 0x30e2
movq -0x90(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x20, %esi
callq 0x20b0
jmp 0x30e2
movq -0x98(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x20, %esi
callq 0x20b0
movq -0x18(%rbp), %rdi
callq 0x2120
nopl (%rax,%rax)