// File: gossterrible[P]Calendar-/Calendar.cpp
// Function: Calendar::Run()
void Calendar::Run() {

    bool run = true;

    /*****************************/
    /*          Menu system       */
    /********************************/

    while (run) {

        char op;
        string file;
        cout
                << "\nN: Show Next Month"
                << "\tP: Show Previous Month " << "\tI: Show Specific Date "
                << "\nA: Create An Event" << "\tL: List All Events"
                << "\tD: Delete An Event" << "\nS: Save All Events"
                << "\tR: Load Event" << "\tQ: Quit" << "\nInput your command ";
        cin >> op;
        if (op >= 'a' && op <= 'z')
            op += ('A' - 'a');

        switch (op) {
            case 'N':
                NextMonth();
                Draw();
                break;
            case 'P':
                PreviousMonth();
                Draw();
                break;
            case 'I':
                InputDate();
                Draw();
                break;
            case 'A':
                CreateEvent();
                break;
            case 'L':
                ListEvents();
                break;
            case 'D':
                DeleteEvent();
                break;
            case 'S':
                Save();
                break;
            case 'R':
                Load();
                break;
            case 'Q':
                run = false;
                break;
            default:
                cout << "Invalid input." << endl;
                break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movb $0x1, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
je 0x4265
leaq -0x30(%rbp), %rdi
callq 0x3320
movq 0x5f93(%rip), %rdi      # 0x9fc8
leaq 0x3024(%rip), %rsi      # 0x7060
callq 0x3200
movq %rax, -0x50(%rbp)
jmp 0x4047
movq -0x50(%rbp), %rdi
leaq 0x3022(%rip), %rsi      # 0x7074
callq 0x3200
movq %rax, -0x58(%rbp)
jmp 0x405d
movq -0x58(%rbp), %rdi
leaq 0x3025(%rip), %rsi      # 0x708d
callq 0x3200
movq %rax, -0x60(%rbp)
jmp 0x4073
movq -0x60(%rbp), %rdi
leaq 0x3027(%rip), %rsi      # 0x70a5
callq 0x3200
movq %rax, -0x68(%rbp)
jmp 0x4089
movq -0x68(%rbp), %rdi
leaq 0x3025(%rip), %rsi      # 0x70b9
callq 0x3200
movq %rax, -0x70(%rbp)
jmp 0x409f
movq -0x70(%rbp), %rdi
leaq 0x3023(%rip), %rsi      # 0x70cd
callq 0x3200
movq %rax, -0x78(%rbp)
jmp 0x40b5
movq -0x78(%rbp), %rdi
leaq 0x3021(%rip), %rsi      # 0x70e1
callq 0x3200
movq %rax, -0x80(%rbp)
jmp 0x40cb
movq -0x80(%rbp), %rdi
leaq 0x301f(%rip), %rsi      # 0x70f5
callq 0x3200
movq %rax, -0x88(%rbp)
jmp 0x40e4
movq -0x88(%rbp), %rdi
leaq 0x3012(%rip), %rsi      # 0x7104
callq 0x3200
movq %rax, -0x90(%rbp)
jmp 0x4100
movq -0x90(%rbp), %rdi
leaq 0x2fff(%rip), %rsi      # 0x710d
callq 0x3200
jmp 0x4115
movq 0x5ebc(%rip), %rdi      # 0x9fd8
leaq -0xa(%rbp), %rsi
callq 0x3300
jmp 0x4127
movsbl -0xa(%rbp), %eax
cmpl $0x61, %eax
jl 0x415f
movsbl -0xa(%rbp), %eax
cmpl $0x7a, %eax
jg 0x415f
movsbl -0xa(%rbp), %eax
addl $-0x20, %eax
movb %al, -0xa(%rbp)
jmp 0x415f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3100
jmp 0x426e
movsbl -0xa(%rbp), %eax
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, -0x98(%rbp)
subl $0x12, %eax
ja 0x4224
movq -0x98(%rbp), %rax
leaq 0x2e7e(%rip), %rcx      # 0x7004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x48(%rbp), %rdi
callq 0x4280
jmp 0x419a
movq -0x48(%rbp), %rdi
callq 0x42a0
jmp 0x41a5
jmp 0x4257
movq -0x48(%rbp), %rdi
callq 0x4570
jmp 0x41b5
movq -0x48(%rbp), %rdi
callq 0x42a0
jmp 0x41c0
jmp 0x4257
movq -0x48(%rbp), %rdi
callq 0x4590
jmp 0x41d0
movq -0x48(%rbp), %rdi
callq 0x42a0
jmp 0x41db
jmp 0x4257
movq -0x48(%rbp), %rdi
callq 0x4670
jmp 0x41e8
jmp 0x4257
movq -0x48(%rbp), %rdi
callq 0x47b0
jmp 0x41f5
jmp 0x4257
movq -0x48(%rbp), %rdi
callq 0x48b0
jmp 0x4202
jmp 0x4257
movq -0x48(%rbp), %rdi
callq 0x49a0
jmp 0x420f
jmp 0x4257
movq -0x48(%rbp), %rdi
callq 0x4bd0
jmp 0x421c
jmp 0x4257
movb $0x0, -0x9(%rbp)
jmp 0x4257
movq 0x5d9d(%rip), %rdi      # 0x9fc8
leaq 0x2ef0(%rip), %rsi      # 0x7122
callq 0x3200
movq %rax, -0xa0(%rbp)
jmp 0x4240
movq -0xa0(%rbp), %rdi
movq 0x5d6a(%rip), %rsi      # 0x9fb8
callq 0x3230
jmp 0x4255
jmp 0x4257
leaq -0x30(%rbp), %rdi
callq 0x3100
jmp 0x401b
addq $0xa0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x33d0
nopw (%rax,%rax)