// File: /workspace/github_cpp_makefile_star2_O2/5hubh4m[P]snake-ncurses/snake_ncurses.cpp
// Function: show_menu()
int show_menu(void) {
	int c=1, ch;
	initscr();
	erase();
	raw();
	keypad(stdscr, TRUE);
	noecho();
	curs_set(0);
	print_snake();
	attron(A_STANDOUT);
	mvprintw(12, 28, "Play Classic Snake Game.");
	attroff(A_STANDOUT);
	mvprintw(13, 30, "Have Fun with Snake.");
	mvprintw(14, 24, "Show All Scores of Classic Mode.");
	mvprintw(15, 34, "Exit Game.");
	while(1) {
		ch=getch();
		if(ch=='\n') {
			return c;
		}
		else if(ch==KEY_UP) {
			if(c>1) {
				c--;
			}
			else {
				c=4;
			}
		}
		else if(ch==KEY_DOWN) {
			if(c<4) {
				c++;
			}
			else {
				c=1;
			}
		}
		switch(c) {
			case 1:
				erase();
				print_snake();
				attron(A_STANDOUT);
				mvprintw(12, 28, "Play Classic Snake Game.");
				attroff(A_STANDOUT);
				mvprintw(13, 30, "Have Fun with Snake.");
				mvprintw(14, 24, "Show All Scores of Classic Mode.");
				mvprintw(15, 34, "Exit Game.");
				break;
			case 2:
				erase();
				print_snake();
				mvprintw(12, 28, "Play Classic Snake Game.");
				attron(A_STANDOUT);
				mvprintw(13, 30, "Have Fun with Snake.");
				attroff(A_STANDOUT);
				mvprintw(14, 24, "Show All Scores of Classic Mode.");
				mvprintw(15, 34, "Exit Game.");
				break;
			case 3:
				erase();
				print_snake();
				mvprintw(12, 28, "Play Classic Snake Game.");
				mvprintw(13, 30, "Have Fun with Snake.");
				attron(A_STANDOUT);
				mvprintw(14, 24, "Show All Scores of Classic Mode.");
				attroff(A_STANDOUT);
				mvprintw(15, 34, "Exit Game.");
				break;
			case 4:
				erase();
				print_snake();
				mvprintw(12, 28, "Play Classic Snake Game.");
				mvprintw(13, 30, "Have Fun with Snake.");
				mvprintw(14, 24, "Show All Scores of Classic Mode.");
				attron(A_STANDOUT);
				mvprintw(15, 34, "Exit Game.");
				attroff(A_STANDOUT);
				break;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x2270
callq 0x21b0
callq 0x20a0
movq 0x4403(%rip), %rbp      # 0x7fd8
movq (%rbp), %rdi
pushq $0x1
popq %r14
movl %r14d, %esi
callq 0x20d0
callq 0x21d0
xorl %r12d, %r12d
xorl %edi, %edi
callq 0x2130
callq 0x3b18
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x20f0
leaq 0x1662(%rip), %rdx      # 0x5272
pushq $0xc
popq %rdi
pushq $0x1c
popq %rsi
xorl %eax, %eax
callq 0x2220
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2210
leaq 0x1657(%rip), %rdx      # 0x528b
pushq $0xd
popq %rdi
pushq $0x1e
popq %rsi
xorl %eax, %eax
callq 0x2220
leaq 0x1658(%rip), %rdx      # 0x52a0
pushq $0xe
popq %rdi
pushq $0x18
popq %rsi
xorl %eax, %eax
callq 0x2220
leaq 0x1665(%rip), %rdx      # 0x52c1
pushq $0xf
popq %rdi
pushq $0x22
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x2220
movb $0x1, %r13b
leaq 0x143b(%rip), %r15      # 0x50b0
movq (%rbp), %rdi
callq 0x20c0
cmpl $0x102, %eax            # imm = 0x102
je 0x3ca5
cmpl $0x103, %eax            # imm = 0x103
je 0x3c96
cmpl $0xa, %eax
jne 0x3cae
jmp 0x3ee2
testb $0x1, %r12b
je 0x3d44
decl %r14d
jmp 0x3cae
testb $0x1, %r13b
je 0x3cba
incl %r14d
decl %r14d
movslq (%r15,%r14,4), %rax
addq %r15, %rax
jmpq *%rax
callq 0x21b0
callq 0x3b18
movq (%rbp), %rdi
xorl %r12d, %r12d
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x20f0
pushq $0xc
popq %rdi
pushq $0x1c
popq %rsi
leaq 0x158e(%rip), %rdx      # 0x5272
xorl %eax, %eax
callq 0x2220
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2210
pushq $0xd
popq %rdi
pushq $0x1e
popq %rsi
leaq 0x1583(%rip), %rdx      # 0x528b
xorl %eax, %eax
callq 0x2220
pushq $0xe
popq %rdi
pushq $0x18
popq %rsi
leaq 0x1584(%rip), %rdx      # 0x52a0
xorl %eax, %eax
callq 0x2220
pushq $0xf
popq %rdi
movl %ebx, %esi
leaq 0x1592(%rip), %rdx      # 0x52c1
xorl %eax, %eax
callq 0x2220
movb $0x1, %r13b
pushq $0x1
popq %rax
movl %eax, %r14d
jmp 0x3c75
callq 0x21b0
callq 0x3b18
xorl %r13d, %r13d
pushq $0xc
popq %rdi
pushq $0x1c
popq %rsi
leaq 0x1514(%rip), %rdx      # 0x5272
xorl %eax, %eax
callq 0x2220
pushq $0xd
popq %rdi
pushq $0x1e
popq %rsi
leaq 0x1519(%rip), %rdx      # 0x528b
xorl %eax, %eax
callq 0x2220
pushq $0xe
popq %rdi
pushq $0x18
popq %rsi
leaq 0x151a(%rip), %rdx      # 0x52a0
xorl %eax, %eax
callq 0x2220
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x20f0
pushq $0xf
popq %rdi
movl %ebx, %esi
leaq 0x1518(%rip), %rdx      # 0x52c1
xorl %eax, %eax
callq 0x2220
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2210
movb $0x1, %r12b
pushq $0x4
popq %rax
movl %eax, %r14d
jmp 0x3c75
callq 0x21b0
callq 0x3b18
pushq $0xc
popq %rdi
pushq $0x1c
popq %rsi
leaq 0x148d(%rip), %rdx      # 0x5272
xorl %eax, %eax
callq 0x2220
pushq $0xd
popq %rdi
pushq $0x1e
popq %rsi
leaq 0x1492(%rip), %rdx      # 0x528b
xorl %eax, %eax
callq 0x2220
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x20f0
pushq $0xe
popq %rdi
pushq $0x18
popq %rsi
leaq 0x1483(%rip), %rdx      # 0x52a0
xorl %eax, %eax
callq 0x2220
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2210
pushq $0xf
popq %rdi
movl %ebx, %esi
leaq 0x1481(%rip), %rdx      # 0x52c1
xorl %eax, %eax
callq 0x2220
movb $0x1, %r13b
movb $0x1, %r12b
pushq $0x3
popq %rax
movl %eax, %r14d
jmp 0x3c75
callq 0x21b0
callq 0x3b18
pushq $0xc
popq %rdi
pushq $0x1c
popq %rsi
leaq 0x1403(%rip), %rdx      # 0x5272
xorl %eax, %eax
callq 0x2220
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x20f0
pushq $0xd
popq %rdi
pushq $0x1e
popq %rsi
leaq 0x13f8(%rip), %rdx      # 0x528b
xorl %eax, %eax
callq 0x2220
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2210
pushq $0xe
popq %rdi
pushq $0x18
popq %rsi
leaq 0x13e9(%rip), %rdx      # 0x52a0
xorl %eax, %eax
callq 0x2220
pushq $0xf
popq %rdi
movl %ebx, %esi
leaq 0x13f7(%rip), %rdx      # 0x52c1
xorl %eax, %eax
callq 0x2220
movb $0x1, %r13b
movb $0x1, %r12b
pushq $0x2
popq %rax
movl %eax, %r14d
jmp 0x3c75
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq