// File: /workspace/github_cpp_makefile_star2_O3/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 0x4420(%rip), %rbp      # 0x7fd8
movq (%rbp), %rdi
movl $0x1, %r13d
movl $0x1, %esi
callq 0x20e0
callq 0x21f0
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x2140
callq 0x3ad8
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2100
leaq 0x167b(%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 0x166c(%rip), %rdx      # 0x528b
movl $0xd, %edi
movl $0x1e, %esi
xorl %eax, %eax
callq 0x2240
leaq 0x1669(%rip), %rdx      # 0x52a0
movl $0xe, %edi
movl $0x18, %esi
xorl %eax, %eax
callq 0x2240
leaq 0x1672(%rip), %r12      # 0x52c1
movl $0xf, %edi
movl $0x22, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2240
movb $0x1, %r15b
leaq 0x1443(%rip), %rbx      # 0x50b0
movq (%rbp), %rdi
callq 0x20d0
cmpl $0x102, %eax            # imm = 0x102
je 0x3c9d
cmpl $0x103, %eax            # imm = 0x103
je 0x3c8e
cmpl $0xa, %eax
jne 0x3ca6
jmp 0x3f08
testb $0x1, %r14b
je 0x3d49
decl %r13d
jmp 0x3ca6
testb $0x1, %r15b
je 0x3cb2
incl %r13d
decl %r13d
movslq (%rbx,%r13,4), %rax
addq %rbx, %rax
jmpq *%rax
callq 0x21d0
callq 0x3ad8
movq (%rbp), %rdi
xorl %r14d, %r14d
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2100
movl $0xc, %edi
movl $0x1c, %esi
leaq 0x1592(%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
leaq 0x1583(%rip), %rdx      # 0x528b
xorl %eax, %eax
callq 0x2240
movl $0xe, %edi
movl $0x18, %esi
leaq 0x1580(%rip), %rdx      # 0x52a0
xorl %eax, %eax
callq 0x2240
movl $0xf, %edi
movl $0x22, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2240
movb $0x1, %r15b
movl $0x1, %r13d
jmp 0x3c6d
callq 0x21d0
callq 0x3ad8
xorl %r15d, %r15d
movl $0xc, %edi
movl $0x1c, %esi
leaq 0x150b(%rip), %rdx      # 0x5272
xorl %eax, %eax
callq 0x2240
movl $0xd, %edi
movl $0x1e, %esi
leaq 0x150c(%rip), %rdx      # 0x528b
xorl %eax, %eax
callq 0x2240
movl $0xe, %edi
movl $0x18, %esi
leaq 0x1509(%rip), %rdx      # 0x52a0
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
movl $0x4, %r13d
movb $0x1, %r14b
jmp 0x3c6d
callq 0x21d0
callq 0x3ad8
movl $0xc, %edi
movl $0x1c, %esi
leaq 0x1477(%rip), %rdx      # 0x5272
xorl %eax, %eax
callq 0x2240
movl $0xd, %edi
movl $0x1e, %esi
leaq 0x1478(%rip), %rdx      # 0x528b
xorl %eax, %eax
callq 0x2240
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2100
movl $0xe, %edi
movl $0x18, %esi
leaq 0x1465(%rip), %rdx      # 0x52a0
xorl %eax, %eax
callq 0x2240
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2230
movl $0xf, %edi
movl $0x22, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2240
movl $0x3, %r13d
jmp 0x3efd
callq 0x21d0
callq 0x3ad8
movl $0xc, %edi
movl $0x1c, %esi
leaq 0x13e6(%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
leaq 0x13d7(%rip), %rdx      # 0x528b
xorl %eax, %eax
callq 0x2240
movq (%rbp), %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %edx, %edx
callq 0x2230
movl $0xe, %edi
movl $0x18, %esi
leaq 0x13c4(%rip), %rdx      # 0x52a0
xorl %eax, %eax
callq 0x2240
movl $0xf, %edi
movl $0x22, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2240
movl $0x2, %r13d
movb $0x1, %r15b
movb $0x1, %r14b
jmp 0x3c6d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq