// File: /workspace/github_cpp_makefile_star2_O3/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 0x7f45
leaq 0x1639(%rip), %rsi      # 0x951e
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
je 0x7f04
leaq 0x1628(%rip), %rsi      # 0x9520
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
jne 0x7f13
callq 0x34a0
callq 0x3480
callq 0x3480
leaq 0x1608(%rip), %rsi      # 0x9522
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
je 0x7f39
leaq 0x15f7(%rip), %rsi      # 0x9524
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
jne 0x7f96
callq 0x3390
xorl %edi, %edi
callq 0x33a0
movq %r15, %rdi
callq 0x3430
decl %eax
cmpl $0x3, %eax
ja 0x7ede
leaq 0x14e9(%rip), %rcx      # 0x9444
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x60(%rsp), %rdi
movl $0x1, %esi
callq 0x40e4
movq %r14, %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x64, %ecx
callq 0x815c
leaq 0x60(%rsp), %rdi
callq 0x4782
jmp 0x80e3
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1580(%rip), %rsi      # 0x9526
leaq 0x1584(%rip), %rdx      # 0x9531
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x404c
movq %rbx, %rsi
callq 0x82b0
leaq 0x60(%rsp), %rdi
movl $0x3, %esi
callq 0x40e4
callq 0x3f98
movq %rax, %r15
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x150d(%rip), %rsi      # 0x94f7
leaq 0x151e(%rip), %rdx      # 0x950f
leaq 0x20(%rsp), %rdi
callq 0x404c
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x4b7c
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x801f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %r14, %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x64, %ecx
callq 0x815c
callq 0x3f98
movq %rax, %r14
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x14c5(%rip), %rsi      # 0x9510
leaq 0x14cb(%rip), %rdx      # 0x951d
movq %rsp, %rdi
callq 0x404c
movq %rsp, %rsi
movq %r14, %rdi
callq 0x4b7c
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x807b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32f0
leaq 0x60(%rsp), %rdi
callq 0x47a8
jmp 0x80e3
leaq 0x60(%rsp), %rdi
movl $0x1b, %esi
callq 0x40e4
movq %r14, %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x64, %ecx
callq 0x815c
leaq 0x60(%rsp), %rdi
callq 0x4782
jmp 0x80e3
leaq 0x60(%rsp), %rdi
movl $0x2, %esi
callq 0x40e4
movq %r14, %rdi
movl $0x3, %esi
xorl %edx, %edx
movl $0x64, %ecx
callq 0x815c
leaq 0x60(%rsp), %rdi
callq 0x4782
leaq 0x60(%rsp), %rdi
callq 0x46ee
jmp 0x7ede
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x812e
movq 0x10(%rsp), %rsi
jmp 0x8119
jmp 0x812b
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x812e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32f0
jmp 0x812e
jmp 0x812b
jmp 0x812b
jmp 0x812b
jmp 0x812b
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x46ee
jmp 0x8154
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x8154
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x34b0