// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x13918, %rsp          # imm = 0x13918
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
movsbl (%r15), %edi
callq 0x3300
testl %eax, %eax
jne 0x7f55
leaq 0x1629(%rip), %rsi      # 0x951e
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
je 0x7f14
leaq 0x1618(%rip), %rsi      # 0x9520
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
jne 0x7f23
callq 0x34a0
callq 0x3480
callq 0x3480
leaq 0x15f8(%rip), %rsi      # 0x9522
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
je 0x7f49
leaq 0x15e7(%rip), %rsi      # 0x9524
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
jne 0x7fa6
callq 0x3390
xorl %edi, %edi
callq 0x33a0
movq %r15, %rdi
callq 0x3430
decl %eax
cmpl $0x3, %eax
ja 0x7eee
leaq 0x14d9(%rip), %rcx      # 0x9444
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x60(%rsp), %rdi
movl $0x1, %esi
callq 0x40d8
movq %r14, %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x64, %ecx
callq 0x816c
leaq 0x60(%rsp), %rdi
callq 0x4776
jmp 0x80f3
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1570(%rip), %rsi      # 0x9526
leaq 0x1574(%rip), %rdx      # 0x9531
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x4048
movq %rbx, %rsi
callq 0x82c0
leaq 0x60(%rsp), %rdi
movl $0x3, %esi
callq 0x40d8
callq 0x3f9a
movq %rax, %r15
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x14fd(%rip), %rsi      # 0x94f7
leaq 0x150e(%rip), %rdx      # 0x950f
leaq 0x20(%rsp), %rdi
callq 0x4048
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x4b88
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x802f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %r14, %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x64, %ecx
callq 0x816c
callq 0x3f9a
movq %rax, %r14
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x14b5(%rip), %rsi      # 0x9510
leaq 0x14bb(%rip), %rdx      # 0x951d
movq %rsp, %rdi
callq 0x4048
movq %rsp, %rsi
movq %r14, %rdi
callq 0x4b88
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x808b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32f0
leaq 0x60(%rsp), %rdi
callq 0x479c
jmp 0x80f3
leaq 0x60(%rsp), %rdi
movl $0x1b, %esi
callq 0x40d8
movq %r14, %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x64, %ecx
callq 0x816c
leaq 0x60(%rsp), %rdi
callq 0x4776
jmp 0x80f3
leaq 0x60(%rsp), %rdi
movl $0x2, %esi
callq 0x40d8
movq %r14, %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x64, %ecx
callq 0x816c
leaq 0x60(%rsp), %rdi
callq 0x4776
leaq 0x60(%rsp), %rdi
callq 0x46e2
jmp 0x7eee
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x813e
movq 0x10(%rsp), %rsi
jmp 0x8129
jmp 0x813b
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x813e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32f0
jmp 0x813e
jmp 0x813b
jmp 0x813b
jmp 0x813b
jmp 0x813b
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x46e2
jmp 0x8164
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x8164
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x34b0