// File: Doug0855[P]TigerZone/Board.cpp
// Function: Board::display_positions(Tile)
std::vector< std::pair<int, int> > Board::display_positions(Tile tile)
{
	// Create empty vector to store possible placement locations
	std::vector< std::pair<int, int> > places;
	// Loop through the rows of board
	for (size_t i = 0; i < m_board.size(); i++)
	{
		// Loop through column of board
		for (size_t j = 0; j < m_board[i].size(); j++)
		{
			if (m_board[i][j] != NULL && m_board[i][j]->hasOpenFace())
			{
				std::vector< std::string> tempFaces = m_board[i][j]->getOpenFaces();
				for (size_t k = 0; k < tempFaces.size(); k++)
				{
					// Check that the open faces for each location (and adjacent ones) may actually connect to the tile
					// Get back a vector of locations where we may place the tile
					std::vector< std::pair<int, int> > tempPlacements = checkPlacement(tile, i, j, tempFaces[k]);
					places.insert(places.end(), tempPlacements.begin(), tempPlacements.end());
				}
			}
		}
	}
	return places;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdx, -0x1c8(%rbp)
movq %rdi, -0x1c0(%rbp)
movq %rdi, %rax
movq %rax, -0x1b8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x151a0
movq $0x0, -0x28(%rbp)
movq -0x1b0(%rbp), %rdi
movq -0x28(%rbp), %rax
movq %rax, -0x1d0(%rbp)
callq 0x81a0
movq %rax, %rcx
movq -0x1d0(%rbp), %rax
cmpq %rcx, %rax
jae 0x18a9f
movq $0x0, -0x30(%rbp)
movq -0x1b0(%rbp), %rdi
movq -0x30(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x28(%rbp), %rsi
callq 0x81d0
movq %rax, %rdi
callq 0x81f0
movq %rax, %rcx
movq -0x1d8(%rbp), %rax
cmpq %rcx, %rax
jae 0x18a8c
movq -0x1b0(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x81d0
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x8230
cmpq $0x0, (%rax)
je 0x18a79
movq -0x1b0(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x81d0
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x8230
movq (%rax), %rdi
callq 0x27040
movb %al, -0x1d9(%rbp)
jmp 0x18865
movb -0x1d9(%rbp), %al
testb $0x1, %al
jne 0x18874
jmp 0x18a79
movq -0x1b0(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x81d0
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x8230
movq (%rax), %rsi
leaq -0x58(%rbp), %rdi
callq 0x270c0
jmp 0x1889e
movq $0x0, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x1e8(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x11980
movq %rax, %rcx
movq -0x1e8(%rbp), %rax
cmpq %rcx, %rax
jae 0x18a63
movq -0x1c8(%rbp), %rsi
leaq -0x160(%rbp), %rdi
callq 0x82a0
jmp 0x188e2
movl -0x28(%rbp), %eax
movl %eax, -0x1f0(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x1ec(%rbp)
movq -0x60(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x119a0
movq %rax, %rsi
leaq -0x180(%rbp), %rdi
callq 0x3160
jmp 0x18912
movl -0x1ec(%rbp), %r8d
movl -0x1f0(%rbp), %ecx
movq -0x1b0(%rbp), %rsi
leaq -0x78(%rbp), %rdi
leaq -0x160(%rbp), %rdx
leaq -0x180(%rbp), %r9
callq 0x18ae0
jmp 0x1893f
leaq -0x180(%rbp), %rdi
callq 0x3210
leaq -0x160(%rbp), %rdi
callq 0x26870
movq -0x1c0(%rbp), %rdi
callq 0x17710
movq %rax, -0x190(%rbp)
leaq -0x188(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x20360
leaq -0x78(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x17880
movq -0x200(%rbp), %rdi
movq %rax, -0x198(%rbp)
callq 0x17710
movq -0x1c0(%rbp), %rdi
movq %rax, -0x1a0(%rbp)
movq -0x188(%rbp), %rsi
movq -0x198(%rbp), %rdx
movq -0x1a0(%rbp), %rcx
callq 0x202b0
movq %rax, -0x1f8(%rbp)
jmp 0x189d1
movq -0x1f8(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x15320
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x188a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x18ac5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x18a6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x18a3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x3210
leaq -0x160(%rbp), %rdi
callq 0x26870
jmp 0x18a6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x15320
jmp 0x18a6e
leaq -0x58(%rbp), %rdi
callq 0x11650
jmp 0x18a79
leaq -0x58(%rbp), %rdi
callq 0x11650
jmp 0x18ac5
jmp 0x18a7b
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x187dd
jmp 0x18a8e
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x187ab
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x18ab5
movq -0x1c0(%rbp), %rdi
callq 0x15320
movq -0x1b8(%rbp), %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq -0x1c0(%rbp), %rdi
callq 0x15320
movq -0x38(%rbp), %rdi
callq 0x34f0
nopw (%rax,%rax)