// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x1223d(%rip), %r14     # 0x1dfd8
movq (%r14), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %edx, %edx
callq 0x5150
pushq $0x32
popq %rbx
pushq $0x3
popq %rbp
pushq $0x1e
popq %rdx
pushq $0x16
popq %rcx
movl %ebx, %edi
movl %ebp, %esi
callq 0x6a9c
movq 0x5f71a(%rip), %rax     # 0x6b4e0
movl 0xc(%rax), %ecx
movq (%rax), %rdx
movl 0x4(%rdx), %r8d
leaq 0x92c3(%rip), %rdx      # 0x1509a
leaq 0xa2d7(%rip), %r9       # 0x160b5
cmpb $0x0, 0x14(%rax)
cmovneq %rdx, %r9
leaq 0x916c(%rip), %rdx      # 0x14f59
movl %ebp, %edi
movl %ebx, %esi
xorl %eax, %eax
callq 0x5310
leaq 0x916b(%rip), %rdx      # 0x14f6a
pushq $0x5
popq %rbp
movl %ebp, %edi
movl %ebx, %esi
xorl %eax, %eax
callq 0x5310
xorl %esi, %esi
cmpl $0x0, 0x124ce(%rip)     # 0x1e2e4
setne %sil
movq (%r14), %rdi
shll $0xa, %esi
movl $0x300, %r15d           # imm = 0x300
orl %r15d, %esi
xorl %edx, %edx
callq 0x5150
leaq 0x9139(%rip), %rdx      # 0x14f70
pushq $0x37
popq %rsi
movl %ebp, %edi
xorl %eax, %eax
callq 0x5310
xorl %esi, %esi
cmpl $0x1, 0x12498(%rip)     # 0x1e2e4
setne %sil
shll $0xa, %esi
orl %r15d, %esi
movq (%r14), %rdi
xorl %edx, %edx
callq 0x5150
leaq 0x9113(%rip), %rdx      # 0x14f7a
pushq $0x40
popq %rsi
movl %ebp, %edi
xorl %eax, %eax
callq 0x5310
xorl %esi, %esi
cmpl $0x2, 0x12468(%rip)     # 0x1e2e4
setne %sil
shll $0xa, %esi
orl %r15d, %esi
movq (%r14), %rdi
xorl %edx, %edx
callq 0x5150
leaq 0x90ec(%rip), %rdx      # 0x14f83
pushq $0x48
popq %rsi
movl %ebp, %edi
xorl %eax, %eax
callq 0x5310
movq (%r14), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %edx, %edx
callq 0x5150
movl 0x5f330(%rip), %ecx     # 0x6b1e8
movl 0x5f32d(%rip), %r8d     # 0x6b1ec
movl 0x5f32a(%rip), %r9d     # 0x6b1f0
leaq 0x90bf(%rip), %rdx      # 0x14f8c
pushq $0x6
popq %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x5310
movslq 0x12438(%rip), %rax     # 0x1e318
leaq 0x123a9(%rip), %rcx     # 0x1e290
movq (%rcx,%rax,8), %rcx
leaq 0x90ba(%rip), %rdx      # 0x14fac
pushq $0x7
popq %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x5310
movq (%r14), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %edx, %edx
callq 0x5150
movq 0x5f5cc(%rip), %rcx     # 0x6b4e0
imull $0xa, 0x18(%rcx), %eax
movq (%rcx), %rcx
cltd
idivl 0x34(%rcx)
pushq $0xa
popq %rcx
subl %eax, %ecx
movslq %ecx, %rsi
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8(%rsp), %rdi
pushq $0x2a
popq %rdx
callq 0x52a0
movq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x5240
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x5418
movq (%r14), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %edx, %edx
callq 0x5150
movq 0x5f574(%rip), %rcx     # 0x6b4e0
imull $0xa, 0x18(%rcx), %eax
movq (%rcx), %rcx
cltd
idivl 0x34(%rcx)
movslq %eax, %rsi
movq %r15, (%rbx)
leaq 0x8(%rsp), %rdi
pushq $0x2a
popq %rdx
callq 0x52a0
movq 0x8(%rsp), %rsi
leaq 0x901c(%rip), %rdi      # 0x14fb2
xorl %eax, %eax
callq 0x5240
leaq 0x8(%rsp), %rdi
callq 0x5418
leaq 0x900f(%rip), %rdx      # 0x14fbd
pushq $0x8
popq %rdi
pushq $0x32
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x5310
xorl %edi, %edi
callq 0x9479
movl %eax, %ebp
pushq $0x1
popq %rdi
callq 0x9479
movl %eax, %r14d
pushq $0x2
popq %rdi
callq 0x9479
movl %eax, %r15d
pushq $0x3
popq %rdi
callq 0x9479
movl %eax, %r12d
pushq $0x4
popq %rdi
callq 0x9479
movl %eax, %r13d
pushq $0x5
popq %rdi
callq 0x9479
movl %eax, %r10d
subq $0x8, %rsp
leaq 0x8fd3(%rip), %rdx      # 0x14fdb
pushq $0x9
popq %rdi
movl %ebx, %esi
movl %ebp, %ecx
movl %r14d, %r8d
movl %r15d, %r9d
xorl %eax, %eax
pushq %r10
pushq %r13
pushq %r12
callq 0x5310
addq $0x20, %rsp
leaq 0xb742b(%rip), %rbx     # 0xc3458
leaq 0xa088(%rip), %r14      # 0x160bc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x112dd
leaq 0x8fb9(%rip), %rdx      # 0x14fff
testb %al, %al
cmoveq %r14, %rdx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11030
leaq 0xb7415(%rip), %rdx     # 0xc3478
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x10ce6
movq 0x8(%rsp), %rdx
pushq $0x12
popq %rdi
pushq $0x32
popq %rsi
xorl %eax, %eax
callq 0x5310
leaq 0x8(%rsp), %rdi
callq 0x5418
leaq 0x28(%rsp), %rdi
callq 0x5418
movl 0x1227c(%rip), %eax     # 0x1e318
cmpq $0x3, %rax
jae 0xc0bd
leaq 0x851b(%rip), %rcx      # 0x145c4
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
pushq $0x14
popq %rdi
pushq $0x34
popq %rsi
xorl %eax, %eax
callq 0x5310
cmpb $0x1, 0x1221c(%rip)     # 0x1e2e0
jne 0xc0e9
movslq 0x1224f(%rip), %rax     # 0x1e31c
movq 0x12254(%rip), %rcx     # 0x1e328
shlq $0x5, %rax
movq (%rcx,%rax), %rdx
pushq $0x16
popq %rdi
pushq $0x32
popq %rsi
xorl %eax, %eax
callq 0x5310
leaq 0x8f5b(%rip), %rdx      # 0x1504b
pushq $0x17
popq %rdi
pushq $0x34
popq %rsi
xorl %eax, %eax
callq 0x5310
callq 0xa272
testb %al, %al
je 0xc11a
leaq 0x8f57(%rip), %rdx      # 0x15064
pushq $0x18
popq %rdi
pushq $0x36
popq %rsi
xorl %eax, %eax
callq 0x5310
callq 0xb8f0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5418
jmp 0xc140
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0xc153
jmp 0xc14b
jmp 0xc15a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5418
jmp 0xc15d
movq %rax, %rbx
movq %rbx, %rdi
callq 0x53c0