// File: /workspace/github_c_makefile_star2_O0/S01den[P]Lost_CavernRL/menu.c
// Function: gameOver
void gameOver(int source, int score, int minimal)
{
	WINDOW *win;
	if(minimal)
		win = newwin(7,50,LONGUEUR/2-2,LARGEUR/2-5);
	else
		win = newwin(7,50,LONGUEUR/2-2,LARGEUR/2+60);
	box(win,0,0);
	wattron(win,COLOR_PAIR(197));
	mvwprintw(win,1,15,"** GAME OVER !**");
	wattroff(win,COLOR_PAIR(197));
	wattron(win,A_BOLD);

	mvwprintw(win,3,1,"You were miserably killed by");
	switch(source)
	{
		case 1:
			mvwprintw(win,3,30,"an electric trap");
			break;
		case 2:
			mvwprintw(win,3,30,"an explosive trap");
			break;
		case 3:
			wattron(win,COLOR_PAIR(47));
			mvwprintw(win,3,30,"radioactivity");
			wattroff(win,COLOR_PAIR(47));
			break;
		case 4:
			mvwprintw(win,3,30,"the divine wrath !");
			break;
		case 5:
			mvwprintw(win,3,30,"your disease");
			break;
		case 6:
			wattron(win,COLOR_PAIR(197));
			mvwprintw(win,3,30,"fire");
			wattroff(win,COLOR_PAIR(197));
			break;
		case 7:
			mvwprintw(win,3,30,"a droid");
			break;
		case 8:
			mvwprintw(win,3,30,"a sentry");
			break;
		case 9:
			mvwprintw(win,3,30,"a guardian");
			break;
		default:
			mvwprintw(win,3,30,"suicide...");
	}
	wattron(win, A_UNDERLINE);
	mvwprintw(win,5,17,"SCORE: %d",score);
	wattroff(win, A_UNDERLINE);
	wrefresh(win);

	int i = 0;
	for(i = 0; i < 1000000000; i++)
	{
		//wait
	}


	wgetch(win);
	wattroff(win,A_BOLD);
	box(win,' ',' ');
	wborder(win, ' ', ' ', ' ',' ',' ',' ',' ',' ');
	wclear(win);
	wrefresh(win);
	delwin(win);	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x12366
movl $0x7, %edi
movl $0x32, %esi
movl $0x11, %edx
movl $0x3c, %ecx
callq 0x2130
movq %rax, -0x18(%rbp)
jmp 0x12383
movl $0x7, %edi
movl $0x32, %esi
movl $0x11, %edx
movl $0x7d, %ecx
callq 0x2130
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq %rsp, %rax
movl $0x0, 0x10(%rax)
movl $0x0, 0x8(%rax)
movl $0x0, (%rax)
xorl %r9d, %r9d
movl %r9d, -0x40(%rbp)
movl %r9d, %esi
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x2120
movl -0x40(%rbp), %eax
movq -0x18(%rbp), %rdi
movl %eax, %edx
movq %rdx, -0x38(%rbp)
movl $0xc500, %esi           # imm = 0xC500
movl %esi, -0x3c(%rbp)
callq 0x21d0
movl -0x40(%rbp), %eax
movq -0x18(%rbp), %rdi
leaq 0x7a3c(%rip), %rcx      # 0x19e1a
movb %al, -0x29(%rbp)
movl $0x1, %esi
movl %esi, -0x30(%rbp)
movl $0xf, %edx
callq 0x2070
movl -0x3c(%rbp), %esi
movq -0x38(%rbp), %rdx
movq -0x18(%rbp), %rdi
callq 0x2060
movq -0x38(%rbp), %rdx
movq -0x18(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
callq 0x21d0
movl -0x30(%rbp), %edx
movb -0x29(%rbp), %al
movq -0x18(%rbp), %rdi
leaq 0x7a05(%rip), %rcx      # 0x19e2b
movl $0x3, %esi
callq 0x2070
movl -0x4(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x8, %eax
ja 0x125bd
movq -0x28(%rbp), %rax
leaq 0x72ed(%rip), %rcx      # 0x1973c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rdi
movl $0x3, %esi
movl $0x1e, %edx
leaq 0x79db(%rip), %rcx      # 0x19e48
movb $0x0, %al
callq 0x2070
jmp 0x125d9
movq -0x18(%rbp), %rdi
movl $0x3, %esi
movl $0x1e, %edx
leaq 0x79cb(%rip), %rcx      # 0x19e59
movb $0x0, %al
callq 0x2070
jmp 0x125d9
movq -0x18(%rbp), %rdi
movl $0x2f00, %esi           # imm = 0x2F00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x18(%rbp), %rdi
movl $0x3, %esi
movl $0x1e, %edx
leaq 0x79aa(%rip), %rcx      # 0x19e6b
movb $0x0, %al
callq 0x2070
movq -0x18(%rbp), %rdi
movl $0x2f00, %esi           # imm = 0x2F00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x125d9
movq -0x18(%rbp), %rdi
movl $0x3, %esi
movl $0x1e, %edx
leaq 0x7985(%rip), %rcx      # 0x19e79
movb $0x0, %al
callq 0x2070
jmp 0x125d9
movq -0x18(%rbp), %rdi
movl $0x3, %esi
movl $0x1e, %edx
leaq 0x7977(%rip), %rcx      # 0x19e8c
movb $0x0, %al
callq 0x2070
jmp 0x125d9
movq -0x18(%rbp), %rdi
movl $0xc500, %esi           # imm = 0xC500
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x18(%rbp), %rdi
movl $0x3, %esi
movl $0x1e, %edx
leaq 0x7951(%rip), %rcx      # 0x19e99
movb $0x0, %al
callq 0x2070
movq -0x18(%rbp), %rdi
movl $0xc500, %esi           # imm = 0xC500
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x125d9
movq -0x18(%rbp), %rdi
movl $0x3, %esi
movl $0x1e, %edx
leaq 0x7926(%rip), %rcx      # 0x19e9e
movb $0x0, %al
callq 0x2070
jmp 0x125d9
movq -0x18(%rbp), %rdi
movl $0x3, %esi
movl $0x1e, %edx
leaq 0x7910(%rip), %rcx      # 0x19ea6
movb $0x0, %al
callq 0x2070
jmp 0x125d9
movq -0x18(%rbp), %rdi
movl $0x3, %esi
movl $0x1e, %edx
leaq 0x78fb(%rip), %rcx      # 0x19eaf
movb $0x0, %al
callq 0x2070
jmp 0x125d9
movq -0x18(%rbp), %rdi
movl $0x3, %esi
movl $0x1e, %edx
leaq 0x78e8(%rip), %rcx      # 0x19eba
movb $0x0, %al
callq 0x2070
movq -0x18(%rbp), %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x18(%rbp), %rdi
movl -0x8(%rbp), %r8d
movl $0x5, %esi
movl $0x11, %edx
leaq 0x78c1(%rip), %rcx      # 0x19ec5
movb $0x0, %al
callq 0x2070
movq -0x18(%rbp), %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
movq -0x18(%rbp), %rdi
callq 0x2100
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x3b9aca00, -0x1c(%rbp) # imm = 0x3B9ACA00
jge 0x1264a
jmp 0x1263f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x12634
movq -0x18(%rbp), %rdi
callq 0x21f0
movq -0x18(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
movq -0x18(%rbp), %rdi
movl $0x20, %r8d
xorl %r9d, %r9d
movl %r8d, %esi
movl %r8d, %edx
movl %r8d, %ecx
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x2120
movq -0x18(%rbp), %rdi
movl $0x20, %r9d
movl %r9d, %esi
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x20, (%rsp)
movl $0x20, 0x8(%rsp)
movl $0x20, 0x10(%rsp)
callq 0x2120
movq -0x18(%rbp), %rdi
callq 0x2030
movq -0x18(%rbp), %rdi
callq 0x2100
movq -0x18(%rbp), %rdi
callq 0x2110
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)