// File: /workspace/github_cpp_makefile_star2_O3/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 0x11f90(%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 0x742a
movq 0x5f469(%rip), %rax     # 0x6e4e0
movl 0xc(%rax), %ecx
movq (%rax), %rdx
movl 0x4(%rdx), %r8d
leaq 0xa0b9(%rip), %rdx      # 0x19141
leaq 0xb0cd(%rip), %r9       # 0x1a15c
cmpb $0x0, 0x14(%rax)
cmovneq %rdx, %r9
leaq 0x9f62(%rip), %rdx      # 0x19000
movl $0x3, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
leaq 0x9f5b(%rip), %rdx      # 0x19011
movl $0x5, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
xorl %esi, %esi
cmpl $0x0, 0x12214(%rip)     # 0x212e4
setne %sil
movq (%rbx), %rdi
shll $0xa, %esi
movl $0x300, %ebp            # imm = 0x300
orl %ebp, %esi
xorl %edx, %edx
callq 0x5150
leaq 0x9f28(%rip), %rdx      # 0x19017
movl $0x5, %edi
movl $0x37, %esi
xorl %eax, %eax
callq 0x5320
xorl %esi, %esi
cmpl $0x1, 0x121db(%rip)     # 0x212e4
setne %sil
shll $0xa, %esi
orl %ebp, %esi
movq (%rbx), %rdi
xorl %edx, %edx
callq 0x5150
leaq 0x9efe(%rip), %rdx      # 0x19021
movl $0x5, %edi
movl $0x40, %esi
xorl %eax, %eax
callq 0x5320
xorl %esi, %esi
cmpl $0x2, 0x121a7(%rip)     # 0x212e4
setne %sil
shll $0xa, %esi
orl %ebp, %esi
movq (%rbx), %rdi
xorl %edx, %edx
callq 0x5150
leaq 0x9ed3(%rip), %rdx      # 0x1902a
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 0x5f06b(%rip), %ecx     # 0x6e1e8
movl 0x5f068(%rip), %r8d     # 0x6e1ec
movl 0x5f065(%rip), %r9d     # 0x6e1f0
leaq 0x9ea1(%rip), %rdx      # 0x19033
movl $0x6, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
movslq 0x1216e(%rip), %rax     # 0x21318
leaq 0x120df(%rip), %rcx     # 0x21290
movq (%rcx,%rax,8), %rcx
leaq 0x9e97(%rip), %rdx      # 0x19053
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 0x5f2fd(%rip), %rcx     # 0x6e4e0
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 0xf22b
callq 0x5230
movq (%rbx), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %edx, %edx
callq 0x5150
movq 0x5f29f(%rip), %rcx     # 0x6e4e0
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 0x9deb(%rip), %rdi      # 0x19059
xorl %eax, %eax
callq 0x5260
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf283
callq 0x5230
leaq 0x9dda(%rip), %rdx      # 0x19064
xorl %ebx, %ebx
movl $0x8, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
movq 0xb719c(%rip), %rax     # 0xc6440
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 0xf2ac
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 0xf2d1
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 0xf2f7
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 0xf31d
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 0xf343
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 0xf369
subq $0x8, %rsp
leaq 0x9cf4(%rip), %rdx      # 0x19082
movl $0x9, %edi
movl $0x32, %esi
movl %ebx, %ecx
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
callq 0x5320
addq $0x20, %rsp
leaq 0xb70a6(%rip), %rdi     # 0xc6458
leaq 0xadaa(%rip), %rbx      # 0x1a163
movq %rbx, %rsi
callq 0x5090
testl %eax, %eax
leaq 0x9cdc(%rip), %r14      # 0x190a6
cmoveq %rbx, %r14
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0xb7079(%rip), %rsi     # 0xc6458
movq 0xb707a(%rip), %rdx     # 0xc6460
addq %rsi, %rdx
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x15f56
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5410
movq 0xb7070(%rip), %rsi     # 0xc6478
movq 0xb7071(%rip), %rdx     # 0xc6480
leaq 0x20(%rsp), %rdi
callq 0x50c0
movq %r15, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xf43a
movq %rdx, (%rsp)
movq (%rcx), %rsi
movq %rsi, 0x10(%rsp)
jmp 0xf444
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq %r15, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x12, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf47b
callq 0x5230
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xf48a
callq 0x5230
movl 0x11e88(%rip), %eax     # 0x21318
cmpq $0x3, %rax
jae 0xf4b5
leaq 0x91db(%rip), %rcx      # 0x18678
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
movl $0x14, %edi
movl $0x34, %esi
xorl %eax, %eax
callq 0x5320
cmpb $0x1, 0x11e24(%rip)     # 0x212e0
jne 0xf4e5
movslq 0x11e57(%rip), %rax     # 0x2131c
movq 0x11e5c(%rip), %rcx     # 0x21328
shlq $0x5, %rax
movq (%rcx,%rax), %rdx
movl $0x16, %edi
movl $0x32, %esi
xorl %eax, %eax
callq 0x5320
leaq 0x9c06(%rip), %rdx      # 0x190f2
movl $0x17, %edi
movl $0x34, %esi
xorl %eax, %eax
callq 0x5320
callq 0xc522
testb %al, %al
je 0xf51e
leaq 0x9bfe(%rip), %rdx      # 0x1910b
movl $0x18, %edi
movl $0x36, %esi
xorl %eax, %eax
callq 0x5320
callq 0xe4df
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf546
callq 0x5230
jmp 0xf546
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xf587
jmp 0xf57d
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xf587
jmp 0xf57d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf587
jmp 0xf57d
jmp 0xf584
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf587
callq 0x5230
jmp 0xf587
movq %rax, %rbx
movq %rbx, %rdi
callq 0x53d0