// File: /workspace/github_cpp_makefile_star2_O1/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 0x2290
callq 0x21d0
callq 0x20a0
movq 0x43bc(%rip), %rbp      # 0x7fd8
movq (%rbp), %rdi
movl $0x1, %esi
callq 0x20e0
callq 0x21f0
xorl %edi, %edi
callq 0x2140
callq 0x3b3c
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2100
leaq 0x1620(%rip), %rdx      # 0x5272
movl $0xc, %edi
movl $0x1c, %esi
xorl %eax, %eax
callq 0x2240
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2230
leaq 0x1611(%rip), %r14      # 0x528b
movl $0xd, %edi
movl $0x1e, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2240
leaq 0x160b(%rip), %r15      # 0x52a0
movl $0xe, %edi
movl $0x18, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2240
leaq 0x1611(%rip), %r12      # 0x52c1
movl $0xf, %edi
movl $0x22, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2240
leaq 0x13e5(%rip), %rbx      # 0x50b0
movl $0x1, %r13d
movq (%rbp), %rdi
callq 0x20d0
cmpl $0x102, %eax            # imm = 0x102
je 0x3d04
cmpl $0x103, %eax            # imm = 0x103
je 0x3cf2
cmpl $0xa, %eax
jne 0x3d17
jmp 0x3ed6
cmpl $0x2, %r13d
leal -0x1(%r13), %eax
movl $0x4, %ecx
cmovll %ecx, %eax
jmp 0x3d14
cmpl $0x4, %r13d
leal 0x1(%r13), %eax
movl $0x1, %ecx
cmovgel %ecx, %eax
movl %eax, %r13d
callq 0x21d0
callq 0x3b3c
leal -0x1(%r13), %eax
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmpq *%rax
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2100
movl $0xc, %edi
movl $0x1c, %esi
leaq 0x1523(%rip), %rdx      # 0x5272
xorl %eax, %eax
callq 0x2240
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2230
movl $0xd, %edi
movl $0x1e, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2240
jmp 0x3ea9
movl $0xc, %edi
movl $0x1c, %esi
leaq 0x14e2(%rip), %rdx      # 0x5272
xorl %eax, %eax
callq 0x2240
movl $0xd, %edi
movl $0x1e, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2240
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2100
movl $0xe, %edi
movl $0x18, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2240
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2230
jmp 0x3ebd
movl $0xc, %edi
movl $0x1c, %esi
leaq 0x147d(%rip), %rdx      # 0x5272
xorl %eax, %eax
callq 0x2240
movl $0xd, %edi
movl $0x1e, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2240
movl $0xe, %edi
movl $0x18, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2240
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2100
movl $0xf, %edi
movl $0x22, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2240
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2230
jmp 0x3cd1
movl $0xc, %edi
movl $0x1c, %esi
leaq 0x1404(%rip), %rdx      # 0x5272
xorl %eax, %eax
callq 0x2240
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2100
movl $0xd, %edi
movl $0x1e, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2240
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2230
movl $0xe, %edi
movl $0x18, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2240
movl $0xf, %edi
movl $0x22, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2240
jmp 0x3cd1
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq