// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdx, -0x68(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x38(%rbp)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rcx
movq %rsi, -0x30(%rbp)
movq 0x8(%rsi), %rax
cmpq %rcx, %rax
je 0xf6c2
xorl %esi, %esi
leaq -0x188(%rbp), %r13
leaq (%rsi,%rsi,2), %rdi
movq (%rcx,%rdi,8), %rdx
movq %rdi, -0x40(%rbp)
cmpq %rdx, 0x8(%rcx,%rdi,8)
je 0xf69e
movq %rsi, -0x48(%rbp)
xorl %r14d, %r14d
movq (%rdx,%r14,8), %rdi
testq %rdi, %rdi
je 0xf672
callq 0x16c3e
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
testb %al, %al
je 0xf672
movq -0x40(%rbp), %rax
movq (%rcx,%rax,8), %rax
movq (%rax,%r14,8), %rsi
leaq -0x60(%rbp), %rdi
callq 0x16c8c
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
je 0xf662
movl $0x8, %r12d
xorl %r15d, %r15d
movq %r13, %rdi
movq -0x68(%rbp), %rsi
callq 0x89fc
movq -0x60(%rbp), %rax
leaq -0x78(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movq -0x8(%rax,%r12), %rsi
movq (%rax,%r12), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rbx
movq %rbx, %rdi
callq 0x9cc4
leaq -0xa0(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %r13, %rdx
movq -0x48(%rbp), %rcx
movl %r14d, %r8d
movq %rbx, %r9
callq 0xf746
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0xf612
callq 0x3200
movq %r13, %rdi
callq 0x16758
movq -0x38(%rbp), %rdi
movq 0x8(%rdi), %rsi
movq -0xa0(%rbp), %rdx
movq -0x98(%rbp), %rcx
callq 0x14132
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0xf646
callq 0x3200
movq -0x58(%rbp), %rax
subq -0x60(%rbp), %rax
incq %r15
sarq $0x5, %rax
addq $0x20, %r12
cmpq %rax, %r15
jb 0xf5aa
leaq -0x60(%rbp), %rdi
callq 0xc60c
movq -0x30(%rbp), %rax
movq (%rax), %rcx
incq %r14
movq -0x40(%rbp), %rax
movq (%rcx,%rax,8), %rdx
movq 0x8(%rcx,%rax,8), %rax
subq %rdx, %rax
sarq $0x3, %rax
cmpq %rax, %r14
jb 0xf55d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rsi
incq %rsi
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rdi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdi, %rdx
cmpq %rdx, %rsi
jb 0xf53f
movq -0x38(%rbp), %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf6da
movq %rax, %r14
jmp 0xf72c
movq %rax, %r14
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0xf723
callq 0x3200
jmp 0xf723
movq %rax, %r14
jmp 0xf723
movq %rax, %r14
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0xf717
callq 0x3200
jmp 0xf717
movq %rax, %r14
leaq -0x188(%rbp), %rdi
callq 0x16758
leaq -0x60(%rbp), %rdi
callq 0xc60c
movq -0x38(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xf73d
callq 0x3200
movq %r14, %rdi
callq 0x33f0
nop