// File: essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: draw_tile_description(int, int)
void draw_tile_description(int x, int y)
{
	for(int i=0;i<3;i++)
	{
		mvaddstr(i,(viewport_width+1),std::string(disp_columns-(viewport_width+1),' ').c_str());
	}
	if (!map_seen[x][y] && !debug)
	{
		attron(COLOR_PAIR(COLOR_WHITE));
		mvprintw(0,(viewport_width+1),"%d, %d, unseen",x,y);
	}
	else
	{
		attron(COLOR_PAIR(terrain_colours[map_terrain[x][y]]));
		mvprintw(0,(viewport_width+1),"%d, %d, %s",x,y,terrain_descriptors[map_terrain[x][y]]);
		if (map_items[x][y] != NULL)
		{
			attron(COLOR_PAIR(map_items[x][y]->colour));
			mvaddstr(1,(viewport_width+1),("a "+map_items[x][y]->name).c_str());
		}
		if (map_occupants[x][y] != NULL)
		{
			//if(sym_los_in_range(p_ptr->x,p_ptr->y,x,y,is_opaque) || debug)
			if(tile_visible(x,y))
			{
				attron(COLOR_PAIR(map_occupants[x][y]->sspecies->colour));
				mvaddstr(2,(viewport_width+1),(map_occupants[x][y]->sspecies->name +
					(map_occupants[x][y]->running?", running":"         ")).c_str());
				if(current_mode == FIRE_MODE || current_mode == THROW_MODE)
				{
					attron(COLOR_PAIR(COLOR_WHITE));
					mvaddstr(2, disp_columns-16," ('i' for info)");
				}
			}
		}
	}
}

// Assembly:
subq $0xd8, %rsp
movl %edi, 0xd4(%rsp)
movl %esi, 0xd0(%rsp)
movl $0x0, 0xcc(%rsp)
cmpl $0x3, 0xcc(%rsp)
jge 0x1681f
movq 0x2490b(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl 0xcc(%rsp), %esi
movl $0x32, %edx
callq 0x52f0
movb $0x0, 0xa6(%rsp)
movb $0x0, 0x93(%rsp)
cmpl $-0x1, %eax
jne 0x16700
jmp 0x16772
movq 0x248d9(%rip), %rax     # 0x3afe0
movq (%rax), %rax
movq %rax, 0x30(%rsp)
leaq 0xa7(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x5490
movq 0x38(%rsp), %rcx
movb $0x1, 0xa6(%rsp)
leaq 0xa8(%rsp), %rdi
movl $0x1e, %esi
movl $0x20, %edx
callq 0x5210
jmp 0x16747
movb $0x1, 0x93(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x5160
movq 0x30(%rsp), %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5100
jmp 0x16770
jmp 0x16772
testb $0x1, 0x93(%rsp)
jne 0x1677e
jmp 0x1678b
leaq 0xa8(%rsp), %rdi
callq 0x54f8
testb $0x1, 0xa6(%rsp)
jne 0x16797
jmp 0x167a4
leaq 0xa7(%rsp), %rdi
callq 0x5310
jmp 0x167a6
movl 0xcc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xcc(%rsp)
jmp 0x166c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x16801
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
testb $0x1, 0x93(%rsp)
jne 0x167f2
jmp 0x167ff
leaq 0xa8(%rsp), %rdi
callq 0x54f8
jmp 0x16801
testb $0x1, 0xa6(%rsp)
jne 0x1680d
jmp 0x1681a
leaq 0xa7(%rsp), %rdi
callq 0x5310
jmp 0x16ca5
movslq 0xd4(%rsp), %rcx
leaq 0x66a32(%rip), %rax     # 0x7d260
imulq $0x96, %rcx, %rcx
addq %rcx, %rax
movslq 0xd0(%rsp), %rcx
testb $0x1, (%rax,%rcx)
jne 0x16890
testb $0x1, 0x24b35(%rip)     # 0x3b382
jne 0x16890
movq 0x2478a(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %eax, %eax
movl %eax, %edx
callq 0x51a0
movl 0xd4(%rsp), %ecx
movl 0xd0(%rsp), %r8d
xorl %edi, %edi
movl $0x32, %esi
leaq 0x17a95(%rip), %rdx     # 0x2e319
movb $0x0, %al
callq 0x53a0
jmp 0x16c9d
movq 0x24749(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movslq 0xd4(%rsp), %rcx
leaq 0x24b07(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movslq 0xd0(%rsp), %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x16f7a(%rip), %rax     # 0x2d840
movl (%rax,%rcx,4), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x51a0
movl 0xd4(%rsp), %ecx
movl 0xd0(%rsp), %r8d
movslq 0xd4(%rsp), %rdx
leaq 0x24ab7(%rip), %rax     # 0x3b3b0
imulq $0x258, %rdx, %rdx      # imm = 0x258
addq %rdx, %rax
movslq 0xd0(%rsp), %rdx
movslq (%rax,%rdx,4), %rdx
leaq 0x2497a(%rip), %rax     # 0x3b290
movq (%rax,%rdx,8), %r9
xorl %edi, %edi
movl $0x32, %esi
leaq 0x17a00(%rip), %rdx     # 0x2e328
movb $0x0, %al
callq 0x53a0
movslq 0xd4(%rsp), %rcx
leaq 0x9dbf2(%rip), %rax     # 0xb4530
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rax
movslq 0xd0(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x16a78
movq 0x2467e(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movslq 0xd4(%rsp), %rcx
leaq 0x9dbbc(%rip), %rax     # 0xb4530
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rax
movslq 0xd0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x51a0
movq 0x2463a(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl $0x1, %esi
movl $0x32, %edx
callq 0x52f0
movb $0x0, 0x6f(%rsp)
cmpl $-0x1, %eax
jne 0x169c4
jmp 0x16a37
movq 0x24615(%rip), %rax     # 0x3afe0
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movslq 0xd4(%rsp), %rax
imulq $0x4b0, %rax, %rcx      # imm = 0x4B0
leaq 0x9db47(%rip), %rax     # 0xb4530
addq %rcx, %rax
movslq 0xd0(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x10, %rdx
leaq 0x17a7e(%rip), %rsi     # 0x2e481
leaq 0x70(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x1ff70
movq 0x20(%rsp), %rdi
movb $0x1, 0x6f(%rsp)
callq 0x5160
movq 0x28(%rsp), %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5100
jmp 0x16a35
jmp 0x16a37
testb $0x1, 0x6f(%rsp)
jne 0x16a40
jmp 0x16a4a
leaq 0x70(%rsp), %rdi
callq 0x54f8
jmp 0x16a78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
testb $0x1, 0x6f(%rsp)
jne 0x16a69
jmp 0x16a73
leaq 0x70(%rsp), %rdi
callq 0x54f8
jmp 0x16ca5
movslq 0xd4(%rsp), %rcx
leaq 0x71ad9(%rip), %rax     # 0x88560
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rax
movslq 0xd0(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x16c9b
movl 0xd4(%rsp), %edi
movl 0xd0(%rsp), %esi
callq 0x16590
testb $0x1, %al
jne 0x16ac0
jmp 0x16c99
movq 0x24519(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movslq 0xd4(%rsp), %rcx
leaq 0x71a87(%rip), %rax     # 0x88560
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rax
movslq 0xd0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movl 0x28(%rax), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x51a0
movq 0x244d2(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl $0x2, %esi
movl $0x32, %edx
callq 0x52f0
movb $0x0, 0x47(%rsp)
cmpl $-0x1, %eax
jne 0x16b2f
jmp 0x16bf4
movq 0x244aa(%rip), %rax     # 0x3afe0
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movslq 0xd4(%rsp), %rcx
leaq 0x71a13(%rip), %rax     # 0x88560
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rax
movslq 0xd0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
addq $0xf0, %rax
movq %rax, 0x18(%rsp)
movslq 0xd4(%rsp), %rcx
leaq 0x719e0(%rip), %rax     # 0x88560
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rax
movslq 0xd0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
testb $0x1, 0x14(%rax)
je 0x16baa
leaq 0x17790(%rip), %rax     # 0x2e333
movq %rax, 0x8(%rsp)
jmp 0x16bb8
leaq 0x1879d(%rip), %rax     # 0x2f34e
movq %rax, 0x8(%rsp)
jmp 0x16bb8
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x48(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x20670
movq (%rsp), %rdi
movb $0x1, 0x47(%rsp)
callq 0x5160
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5100
jmp 0x16bf2
jmp 0x16bf4
testb $0x1, 0x47(%rsp)
jne 0x16bfd
jmp 0x16c07
leaq 0x48(%rsp), %rdi
callq 0x54f8
cmpl $0x1, 0x2477a(%rip)     # 0x3b388
je 0x16c19
cmpl $0x2, 0x24771(%rip)     # 0x3b388
jne 0x16c97
movq 0x243c0(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %eax, %eax
movl %eax, %edx
callq 0x51a0
movq 0x243a8(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl $0x2, %esi
movl $0x40, %edx
callq 0x52f0
cmpl $-0x1, %eax
jne 0x16c51
jmp 0x16c6c
movq 0x24388(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
leaq 0x176db(%rip), %rsi     # 0x2e33d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5100
jmp 0x16c97
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
testb $0x1, 0x47(%rsp)
jne 0x16c8b
jmp 0x16c95
leaq 0x48(%rsp), %rdi
callq 0x54f8
jmp 0x16ca5
jmp 0x16c99
jmp 0x16c9b
jmp 0x16c9d
addq $0xd8, %rsp
retq
movq 0x98(%rsp), %rdi
callq 0x5480
nopw %cs:(%rax,%rax)