// File: syky27[P]TicTacToe/src/DNWindow.cpp
// Function: DNWindow::executeMenuOption(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void DNWindow::executeMenuOption(string input)
{

    if (isalnum(*input.c_str())) {
        switch (atoi(input.c_str())) {
        case 1:
        {
            DNGame a(1);
            drawBoard(3, 0, 100);
            a.play();
            break;
        }
        case 2:
        {
            DNGame a(2);
            drawBoard(3, 0, 100);
            a.play();
            break;
        }
            
        case 3:
        {
            DNGame game(3);
            
            DNLogService::sharedObject().log(string("Starting to draw board \n"));
            drawBoard(3,0,100);
            DNLogService::sharedObject().log(string("going to play"));
            game.playNetworkgame();
            break;
        }
        case 4:{
            DNGame a(27);
            drawBoard(3,0,100);
            a.play();
            break;
        }
            
        default:
            break;
        }
    }

    if (input == "I" || input == "i") {
        clearScreen();
        refresh();
        
    }

    if (input == "Q" || input == "q") {
        terminate();
    }else{
        terminateWithErrorMessage(string("Wrong Input"));
    }

    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4e3c0, %rsp          # imm = 0x4E3C0
movq %rsi, -0x4e390(%rbp)
movq %rdi, %rax
movq -0x4e390(%rbp), %rdi
movq %rdi, -0x4e388(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x4e380(%rbp)
callq 0x3180
movsbl (%rax), %edi
callq 0x33a0
cmpl $0x0, %eax
je 0xac94
movq -0x4e388(%rbp), %rdi
callq 0x3180
movq %rax, %rdi
callq 0x3560
decl %eax
movl %eax, %ecx
movq %rcx, -0x4e398(%rbp)
subl $0x3, %eax
ja 0xac90
movq -0x4e398(%rbp), %rax
leaq 0x1b0e(%rip), %rcx      # 0xc490
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x138c8(%rbp), %rdi
movl $0x1, %esi
callq 0x46e0
movq -0x4e380(%rbp), %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x64, %ecx
callq 0xadd0
jmp 0xa9b6
leaq -0x138c8(%rbp), %rdi
callq 0x4f20
jmp 0xa9c4
leaq -0x138c8(%rbp), %rdi
callq 0x4ea0
jmp 0xac92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138d0(%rbp)
movl %eax, -0x138d4(%rbp)
leaq -0x138c8(%rbp), %rdi
callq 0x4ea0
jmp 0xadbd
leaq -0x27190(%rbp), %rdi
movl $0x2, %esi
callq 0x46e0
movq -0x4e380(%rbp), %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x64, %ecx
callq 0xadd0
jmp 0xaa23
leaq -0x27190(%rbp), %rdi
callq 0x4f20
jmp 0xaa31
leaq -0x27190(%rbp), %rdi
callq 0x4ea0
jmp 0xac92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138d0(%rbp)
movl %eax, -0x138d4(%rbp)
leaq -0x27190(%rbp), %rdi
callq 0x4ea0
jmp 0xadbd
leaq -0x3aa48(%rbp), %rdi
movl $0x3, %esi
callq 0x46e0
callq 0x43c0
movq %rax, -0x4e3a0(%rbp)
jmp 0xaa84
leaq -0x3aa69(%rbp), %rdi
movq %rdi, -0x4e3a8(%rbp)
callq 0x35e0
movq -0x4e3a8(%rbp), %rdx
leaq 0x1a9e(%rip), %rsi      # 0xc543
leaq -0x3aa68(%rbp), %rdi
callq 0x42f0
jmp 0xaab3
movq -0x4e3a0(%rbp), %rdi
leaq -0x3aa68(%rbp), %rsi
callq 0x53e0
jmp 0xaac8
leaq -0x3aa68(%rbp), %rdi
callq 0x3200
leaq -0x3aa69(%rbp), %rdi
callq 0x3400
movq -0x4e380(%rbp), %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x64, %ecx
callq 0xadd0
jmp 0xaafa
callq 0x43c0
movq %rax, -0x4e3b0(%rbp)
jmp 0xab08
leaq -0x3aa91(%rbp), %rdi
movq %rdi, -0x4e3b8(%rbp)
callq 0x35e0
movq -0x4e3b8(%rbp), %rdx
leaq 0x1a33(%rip), %rsi      # 0xc55c
leaq -0x3aa90(%rbp), %rdi
callq 0x42f0
jmp 0xab37
movq -0x4e3b0(%rbp), %rdi
leaq -0x3aa90(%rbp), %rsi
callq 0x53e0
jmp 0xab4c
leaq -0x3aa90(%rbp), %rdi
callq 0x3200
leaq -0x3aa91(%rbp), %rdi
callq 0x3400
leaq -0x3aa48(%rbp), %rdi
callq 0x4f90
jmp 0xab72
leaq -0x3aa48(%rbp), %rdi
callq 0x4ea0
jmp 0xac92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138d0(%rbp)
movl %eax, -0x138d4(%rbp)
jmp 0xac15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138d0(%rbp)
movl %eax, -0x138d4(%rbp)
jmp 0xabc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138d0(%rbp)
movl %eax, -0x138d4(%rbp)
leaq -0x3aa68(%rbp), %rdi
callq 0x3200
leaq -0x3aa69(%rbp), %rdi
callq 0x3400
jmp 0xac15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138d0(%rbp)
movl %eax, -0x138d4(%rbp)
jmp 0xac09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138d0(%rbp)
movl %eax, -0x138d4(%rbp)
leaq -0x3aa90(%rbp), %rdi
callq 0x3200
leaq -0x3aa91(%rbp), %rdi
callq 0x3400
leaq -0x3aa48(%rbp), %rdi
callq 0x4ea0
jmp 0xadbd
leaq -0x4e350(%rbp), %rdi
movl $0x1b, %esi
callq 0x46e0
movq -0x4e380(%rbp), %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x64, %ecx
callq 0xadd0
jmp 0xac51
leaq -0x4e350(%rbp), %rdi
callq 0x4f20
jmp 0xac5f
leaq -0x4e350(%rbp), %rdi
callq 0x4ea0
jmp 0xac92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138d0(%rbp)
movl %eax, -0x138d4(%rbp)
leaq -0x4e350(%rbp), %rdi
callq 0x4ea0
jmp 0xadbd
jmp 0xac92
jmp 0xac94
movq -0x4e388(%rbp), %rdi
leaq 0x18c8(%rip), %rsi      # 0xc56a
callq 0x80c0
testb $0x1, %al
jne 0xacc4
movq -0x4e388(%rbp), %rdi
leaq 0x18b3(%rip), %rsi      # 0xc56c
callq 0x80c0
testb $0x1, %al
jne 0xacc4
jmp 0xacd5
movq -0x4e380(%rbp), %rdi
callq 0xaf40
callq 0x35a0
movq -0x4e388(%rbp), %rdi
leaq 0x188b(%rip), %rsi      # 0xc56e
callq 0x80c0
testb $0x1, %al
jne 0xad05
movq -0x4e388(%rbp), %rdi
leaq 0x1876(%rip), %rsi      # 0xc570
callq 0x80c0
testb $0x1, %al
jne 0xad05
jmp 0xad16
movq -0x4e380(%rbp), %rdi
callq 0xaf60
jmp 0xadb4
leaq -0x4e371(%rbp), %rdi
movq %rdi, -0x4e3c0(%rbp)
callq 0x35e0
movq -0x4e3c0(%rbp), %rdx
leaq 0x183b(%rip), %rsi      # 0xc572
leaq -0x4e370(%rbp), %rdi
callq 0x42f0
jmp 0xad45
movq -0x4e380(%rbp), %rdi
leaq -0x4e370(%rbp), %rsi
callq 0xaf80
jmp 0xad5a
leaq -0x4e370(%rbp), %rdi
callq 0x3200
leaq -0x4e371(%rbp), %rdi
callq 0x3400
jmp 0xadb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138d0(%rbp)
movl %eax, -0x138d4(%rbp)
jmp 0xada6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138d0(%rbp)
movl %eax, -0x138d4(%rbp)
leaq -0x4e370(%rbp), %rdi
callq 0x3200
leaq -0x4e371(%rbp), %rdi
callq 0x3400
jmp 0xadbd
addq $0x4e3c0, %rsp          # imm = 0x4E3C0
popq %rbp
retq
movq -0x138d0(%rbp), %rdi
callq 0x35d0
nopl (%rax)