// File: /workspace/github_cpp_makefile_star2_O1/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: draw_stats()
void draw_stats()
{
	attron(COLOR_PAIR(COLOR_WHITE));

	//for(int i=3;i<11+ZOO_SIZE;i++)
	//{
	//	mvaddstr(i,viewport_width+1,std::string(disp_columns-viewport_width-1,' ').c_str());
	//}
	clear_area(viewport_width+1,3,disp_columns-viewport_width-1,15+ZOO_SIZE);
	mvprintw(3,(viewport_width+1),"HP: %d/%d %s    ",p_ptr->health,p_ptr->sspecies->min_health,
		p_ptr->running?"running":"       ");
	/*mvprintw(4,(viewport_width+1),(std::string("     ")+
		std::string(current_weapon==PISTOL?"________ ":"         ")+
		std::string(current_weapon==RIFLE?"_______ ":"        ")+
		std::string(current_weapon==CANNON?"________":"        ")).c_str());*/
	mvprintw(5,(viewport_width+1),"Ammo ");
	if(current_weapon == PISTOL) attron(COLOR_PAIR(COLOR_YELLOW)); else attron(COLOR_PAIR(COLOR_WHITE));
	mvprintw(5,(viewport_width+1+5),"X Pistol ");
		if(current_weapon == RIFLE) attron(COLOR_PAIR(COLOR_YELLOW)); else attron(COLOR_PAIR(COLOR_WHITE));
	mvprintw(5,(viewport_width+1+5+9),"Y Rifle ");
	if(current_weapon == CANNON) attron(COLOR_PAIR(COLOR_YELLOW)); else attron(COLOR_PAIR(COLOR_WHITE));
	mvprintw(5,(viewport_width+1+5+9+8),"Z Cannon");
	attron(COLOR_PAIR(COLOR_WHITE));

	mvprintw(6,(viewport_width+1),"          %3d     %3d       %2d",ammo[PISTOL],ammo[RIFLE],ammo[CANNON]);
	mvprintw(7,(viewport_width+1),"%10s ",mode_text[current_mode]);
	attron(COLOR_PAIR(COLOR_BLUE));
	printw(std::string(10-(10*p_ptr->stamina / p_ptr->sspecies->stamina),'*').c_str());
	attron(COLOR_PAIR(COLOR_WHITE));
	printw("%s stamina", std::string(10*p_ptr->stamina / p_ptr->sspecies->stamina,'*').c_str());
	mvprintw(8,(viewport_width+1),"Devic LEx HEx Hol Noi Sce Brn");
	mvprintw(9,(viewport_width+1),"Count  %2d  %2d  %2d  %2d  %2d  %2d",
		count_inv_devices(LOW_EXPLOSIVE),count_inv_devices(HIGH_EXPLOSIVE),
		count_inv_devices(HOLOGRAM_PROJECTOR),count_inv_devices(NOISE_GENERATOR),
		count_inv_devices(SCENT_GENERATOR),count_inv_devices(BRAIN_SLICE));
	mvprintw(11+ZOO_SIZE,(viewport_width+1),(sound_this_turn+(sound_this_turn!=""?" from ":"")+dir_this_turn).c_str());
	if(current_mode == WALK_MODE)
	{
	mvprintw(13+ZOO_SIZE,viewport_width+3,"Press ? for help.");
	}
	else if(current_mode == FIRE_MODE)
	{
		mvprintw(13+ZOO_SIZE,viewport_width+3,"Tab to target, f to fire");
	}
	else if(current_mode == THROW_MODE)
	{
		mvprintw(13+ZOO_SIZE,viewport_width+3,"Tab to target, t to throw");
	}
	if(cycle_advice)
	{
	mvprintw(15+ZOO_SIZE,viewport_width+1,vadvice[current_advice].c_str());
	}
	mvprintw(16+ZOO_SIZE,viewport_width+3,"Press M to toggle advice");
	if(door_closable())
	{
	mvprintw(17+ZOO_SIZE,viewport_width+5,"Press C to close the door");
	}
	draw_memory();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq 0x119f0(%rip), %rbx     # 0x20fd8
movq (%rbx), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %edx, %edx
callq 0x5150
movl $0x32, %edi
movl $0x3, %esi
movl $0x1e, %edx
movl $0x16, %ecx
callq 0x743c
movq 0x5eed9(%rip), %rax     # 0x6e4f0
movl 0xc(%rax), %ecx
movq (%rax), %rdx
movl 0x4(%rdx), %r8d
leaq 0x9aa9(%rip), %rdx      # 0x190d1
leaq 0xaabd(%rip), %r9       # 0x1a0ec
cmpb $0x0, 0x14(%rax)
cmovneq %rdx, %r9
leaq 0x9952(%rip), %rdx      # 0x18f90
movl $0x3, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
leaq 0x994b(%rip), %rdx      # 0x18fa1
movl $0x5, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
xorl %esi, %esi
cmpl $0x0, 0x11c84(%rip)     # 0x212f4
setne %sil
movq (%rbx), %rdi
shll $0xa, %esi
movl $0x300, %ebp            # imm = 0x300
orl %ebp, %esi
xorl %edx, %edx
callq 0x5150
leaq 0x9918(%rip), %rdx      # 0x18fa7
movl $0x5, %edi
movl $0x37, %esi
xorl %eax, %eax
callq 0x5320
xorl %esi, %esi
cmpl $0x1, 0x11c4b(%rip)     # 0x212f4
setne %sil
shll $0xa, %esi
orl %ebp, %esi
movq (%rbx), %rdi
xorl %edx, %edx
callq 0x5150
leaq 0x98ee(%rip), %rdx      # 0x18fb1
movl $0x5, %edi
movl $0x40, %esi
xorl %eax, %eax
callq 0x5320
xorl %esi, %esi
cmpl $0x2, 0x11c17(%rip)     # 0x212f4
setne %sil
shll $0xa, %esi
orl %ebp, %esi
movq (%rbx), %rdi
xorl %edx, %edx
callq 0x5150
leaq 0x98c3(%rip), %rdx      # 0x18fba
movl $0x5, %edi
movl $0x48, %esi
xorl %eax, %eax
callq 0x5320
movq (%rbx), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %edx, %edx
callq 0x5150
movl 0x5eadb(%rip), %ecx     # 0x6e1f8
movl 0x5ead8(%rip), %r8d     # 0x6e1fc
movl 0x5ead5(%rip), %r9d     # 0x6e200
leaq 0x9891(%rip), %rdx      # 0x18fc3
movl $0x6, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
movslq 0x11bde(%rip), %rax     # 0x21328
leaq 0x11b4f(%rip), %rcx     # 0x212a0
movq (%rcx,%rax,8), %rcx
leaq 0x9887(%rip), %rdx      # 0x18fe3
movl $0x7, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
movq (%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x5150
movq 0x5ed6d(%rip), %rcx     # 0x6e4f0
movl 0x18(%rcx), %eax
addl %eax, %eax
leal (%rax,%rax,4), %eax
movq (%rcx), %rcx
cltd
idivl 0x34(%rcx)
movl $0xa, %ecx
subl %eax, %ecx
movslq %ecx, %rsi
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rsp, %rdi
movl $0x2a, %edx
callq 0x52c0
movq (%rsp), %rdi
xorl %eax, %eax
callq 0x5260
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf7cb
callq 0x5230
movq (%rbx), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %edx, %edx
callq 0x5150
movq 0x5ed0f(%rip), %rcx     # 0x6e4f0
movl 0x18(%rcx), %eax
addl %eax, %eax
leal (%rax,%rax,4), %eax
movq (%rcx), %rcx
cltd
idivl 0x34(%rcx)
movslq %eax, %rsi
movq %rsp, %rdi
movq %r15, (%rdi)
movl $0x2a, %edx
callq 0x52c0
movq (%rsp), %rsi
leaq 0x97db(%rip), %rdi      # 0x18fe9
xorl %eax, %eax
callq 0x5260
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf823
callq 0x5230
leaq 0x97ca(%rip), %rdx      # 0x18ff4
xorl %ebx, %ebx
movl $0x8, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
movq 0xb6c0c(%rip), %rax     # 0xc6450
movq (%rax), %rcx
movl $0x8, %edx
movq (%rcx,%rdx), %rsi
subq -0x8(%rcx,%rdx), %rsi
shrq $0x3, %rsi
addl %esi, %ebx
addq $0x18, %rdx
cmpq $0x50, %rdx
jne 0xf84c
movq 0x18(%rax), %rcx
xorl %r8d, %r8d
movl $0x8, %edx
movq (%rcx,%rdx), %rsi
subq -0x8(%rcx,%rdx), %rsi
shrq $0x3, %rsi
addl %esi, %r8d
addq $0x18, %rdx
cmpq $0x50, %rdx
jne 0xf871
movq 0x30(%rax), %rcx
xorl %r9d, %r9d
movl $0x8, %edx
movq (%rcx,%rdx), %rsi
subq -0x8(%rcx,%rdx), %rsi
shrq $0x3, %rsi
addl %esi, %r9d
addq $0x18, %rdx
cmpq $0x50, %rdx
jne 0xf897
movq 0x48(%rax), %rcx
xorl %r10d, %r10d
movl $0x8, %edx
movq (%rcx,%rdx), %rsi
subq -0x8(%rcx,%rdx), %rsi
shrq $0x3, %rsi
addl %esi, %r10d
addq $0x18, %rdx
cmpq $0x50, %rdx
jne 0xf8bd
movq 0x60(%rax), %rcx
xorl %r11d, %r11d
movl $0x8, %edx
movq (%rcx,%rdx), %rsi
subq -0x8(%rcx,%rdx), %rsi
shrq $0x3, %rsi
addl %esi, %r11d
addq $0x18, %rdx
cmpq $0x50, %rdx
jne 0xf8e3
movq 0x78(%rax), %rax
xorl %r14d, %r14d
movl $0x8, %ecx
movq (%rax,%rcx), %rdx
subq -0x8(%rax,%rcx), %rdx
shrq $0x3, %rdx
addl %edx, %r14d
addq $0x18, %rcx
cmpq $0x50, %rcx
jne 0xf909
subq $0x8, %rsp
leaq 0x96e4(%rip), %rdx      # 0x19012
movl $0x9, %edi
movl $0x32, %esi
movl %ebx, %ecx
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
callq 0x5320
addq $0x20, %rsp
leaq 0xb6b16(%rip), %rdi     # 0xc6468
leaq 0xa79a(%rip), %rbx      # 0x1a0f3
movq %rbx, %rsi
callq 0x5090
testl %eax, %eax
leaq 0x96cc(%rip), %r14      # 0x19036
cmoveq %rbx, %r14
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0xb6ae9(%rip), %rsi     # 0xc6468
movq 0xb6aea(%rip), %rdx     # 0xc6470
addq %rsi, %rdx
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x166e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5420
movq 0xb6ae0(%rip), %rsi     # 0xc6488
movq 0xb6ae1(%rip), %rdx     # 0xc6490
leaq 0x20(%rsp), %rdi
callq 0x50c0
movq %r15, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xf9da
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xf9e1
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rdx
movl $0x12, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xfa1c
callq 0x5230
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xfa2b
callq 0x5230
movl 0x118f7(%rip), %eax     # 0x21328
cmpq $0x3, %rax
jae 0xfa56
leaq 0x8bc6(%rip), %rcx      # 0x18604
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
movl $0x14, %edi
movl $0x34, %esi
xorl %eax, %eax
callq 0x5320
cmpb $0x1, 0x11893(%rip)     # 0x212f0
jne 0xfa86
movslq 0x118c6(%rip), %rax     # 0x2132c
movq 0x118cb(%rip), %rcx     # 0x21338
shlq $0x5, %rax
movq (%rcx,%rax), %rdx
movl $0x16, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
leaq 0x95f5(%rip), %rdx      # 0x19082
movl $0x17, %edi
movl $0x34, %esi
xorl %eax, %eax
callq 0x5320
callq 0xca08
testb %al, %al
je 0xfabf
leaq 0x95ed(%rip), %rdx      # 0x1909b
movl $0x18, %edi
movl $0x36, %esi
xorl %eax, %eax
callq 0x5320
callq 0xea49
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xfae7
callq 0x5230
jmp 0xfae7
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xfb28
jmp 0xfb1e
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xfb28
jmp 0xfb1e
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xfb28
jmp 0xfb1e
jmp 0xfb25
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xfb28
callq 0x5230
jmp 0xfb28
movq %rax, %rbx
movq %rbx, %rdi
callq 0x53d0