// File: /workspace/github_cpp_makefile_star2_O3/juancalaca[P]dotsboxes/DotsBoard.cc
// Function: DotsBoard::PrintSelectEdge(int, int, int)
void DotsBoard::PrintSelectEdge(int selected_row, int selected_column, int edge)
{
	//print out a line to separate the board from previous prints
	cout << endl << endl;
	cout << "==================================================================" << endl;
	cout << endl << endl;

	//determine which selection indicator to use
	string symbol;
	switch (edge)
	{
		case 1:
			symbol = "<<";
			break;
		case 2:
			symbol = "/\\";
			break;
		case 3:
			symbol = ">>";
			break;
		case 4:
			symbol = "\\/";
			break;
		default:
			symbol = "##";
			break;
	}
	
	//create the string-representation of the board and print it
	for (int r = 0; r < this->rows; r++)
	{
		string top_string = "*";
		string other_lines = "";
		string names_line = "";
		
		for (int c = 0; c < this->columns; c++)
		{
			if (this->boxes[r][c]->GetTop()->IsClaimed())
			{
				top_string.append("------*");
			}
			else 
			{
				top_string.append("      *");
			}
			
			if (this->boxes[r][c]->GetLeft()->IsClaimed())
			{
				other_lines.append("|");
				names_line.append("|");
			}
			else
			{
				other_lines.append(" ");
				names_line.append(" ");
			}
			
			names_line.append("  ");
			//this will always be two chars!
			names_line.append(boxes[r][c]->GetName());
			
			names_line.append("  ");			

			if (c == selected_column && r == selected_row)
			{
				other_lines.append("  ");
				other_lines.append(symbol);
				other_lines.append("  ");
			}
			else 
			{
				other_lines.append("      ");
			}		
			
			if ( c == (columns - 1))
			{
				if (this->boxes[r][c]->GetRight()->IsClaimed())
				{
					other_lines.append("|");
					names_line.append("|");
				}
				else
				{
					other_lines.append(" ");
					names_line.append(" ");
				}
			}
		}
		
		cout << top_string << endl;
		cout << other_lines << endl;
		cout << names_line << endl;
		cout << other_lines << endl;
	}
	
	string bottom_string = "*";
	
	for (int c = 0; c < this->columns; c++)
	{
		if (this->boxes[rows-1][c]->GetBottom()->IsClaimed())
		{
			bottom_string.append("------*");
		}
		else 
		{
			bottom_string.append("      *");
		}
	}
	
	cout << bottom_string << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %ecx, %r15d
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
movq 0x5441(%rip), %r12      # 0x7fd0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
leaq 0x2478(%rip), %rsi      # 0x5060
movl $0x42, %edx
movq %r12, %rdi
callq 0x2150
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
decl %r15d
cmpl $0x4, %r15d
jae 0x2ca2
movl %r15d, %eax
leaq 0x244f(%rip), %rdx      # 0x50e8
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
jmp 0x2ca9
leaq 0x2406(%rip), %rcx      # 0x50af
leaq 0x70(%rsp), %rdi
movl $0x2, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x21a0
cmpl $0x0, (%rbx)
leaq 0x18(%rsp), %r15
jle 0x3093
leaq 0x38(%rsp), %r12
movl %r14d, %eax
movq %rax, 0xb8(%rsp)
movl %ebp, %eax
movq %rax, 0xb0(%rsp)
movq $0x0, 0x48(%rsp)
leaq 0x258c(%rip), %r13      # 0x5281
leaq 0x28(%rsp), %rbp
leaq 0x50(%rsp), %r14
movq %r15, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x23b0(%rip), %rsi      # 0x50c0
leaq 0x23aa(%rip), %rdx      # 0x50c1
callq 0x37cc
movq %r12, 0x28(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %r13, %rdx
callq 0x37cc
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %r13, %rdx
callq 0x37cc
cmpl $0x0, 0x4(%rbx)
jle 0x2f28
movq 0x48(%rsp), %r12
leaq (%r12,%r12,2), %r15
xorq 0xb0(%rsp), %r12
movq %r12, 0xc0(%rsp)
xorl %r13d, %r13d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r13,8), %rdi
callq 0x270c
movq %rax, %rdi
callq 0x2414
leaq 0x2325(%rip), %rsi      # 0x50b2
testb %al, %al
jne 0x2d98
leaq 0x2322(%rip), %rsi      # 0x50ba
leaq 0x8(%rsp), %rdi
callq 0x2200
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r13,8), %rdi
callq 0x2708
movq %rax, %rdi
callq 0x2414
testb %al, %al
je 0x2ddb
movq %rbp, %rdi
leaq 0x22f9(%rip), %rbp      # 0x50c2
movq %rbp, %rsi
callq 0x2200
movq %rbp, %rsi
leaq 0x28(%rsp), %rbp
jmp 0x2df0
movq %rbp, %rdi
leaq 0x22e4(%rip), %r12      # 0x50c9
movq %r12, %rsi
callq 0x2200
movq %r12, %rsi
movq %r14, %rdi
callq 0x2200
movq %r14, %rdi
leaq 0x22c6(%rip), %rsi      # 0x50c8
callq 0x2200
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r13,8), %rsi
leaq 0x90(%rsp), %rdi
callq 0x275a
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq %r14, %rdi
callq 0x2050
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x2e5d
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x2140
movq %r14, %rdi
leaq 0x2261(%rip), %rsi      # 0x50c8
callq 0x2200
movq 0xb8(%rsp), %rax
xorq %r13, %rax
orq 0xc0(%rsp), %rax
leaq 0x223e(%rip), %rsi      # 0x50c4
jne 0x2eb0
movq %rbp, %rdi
leaq 0x2236(%rip), %rsi      # 0x50c8
callq 0x2200
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq %rbp, %rdi
callq 0x2050
leaq 0x2218(%rip), %rsi      # 0x50c8
movq %rbp, %rdi
callq 0x2200
movl 0x4(%rbx), %eax
decl %eax
cmpq %rax, %r13
jne 0x2f18
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r13,8), %rdi
callq 0x2712
movq %rax, %rdi
callq 0x2414
testb %al, %al
je 0x2efb
movq %rbp, %rdi
leaq 0x21d9(%rip), %rbp      # 0x50c2
movq %rbp, %rsi
callq 0x2200
movq %rbp, %rsi
leaq 0x28(%rsp), %rbp
jmp 0x2f10
movq %rbp, %rdi
leaq 0x21c4(%rip), %r12      # 0x50c9
movq %r12, %rsi
callq 0x2200
movq %r12, %rsi
movq %r14, %rdi
callq 0x2200
incq %r13
movslq 0x4(%rbx), %rax
cmpq %rax, %r13
jl 0x2d6d
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x5097(%rip), %r12      # 0x7fd0
movq %r12, %rdi
callq 0x2150
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r12, %rdi
callq 0x2150
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %r12, %rdi
callq 0x2150
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r12, %rdi
callq 0x2150
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
leaq 0x18(%rsp), %r15
leaq 0x38(%rsp), %r12
je 0x3045
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
leaq 0x222d(%rip), %r13      # 0x5281
je 0x3063
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x307a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x48(%rsp), %rdx
incq %rdx
movslq (%rbx), %rax
movq %rdx, 0x48(%rsp)
cmpq %rax, %rdx
jl 0x2cff
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x201e(%rip), %rsi      # 0x50c0
leaq 0x2018(%rip), %rdx      # 0x50c1
callq 0x37cc
cmpl $0x0, 0x4(%rbx)
jle 0x3109
xorl %r15d, %r15d
leaq 0x1ff4(%rip), %r12      # 0x50b2
leaq 0x1ff5(%rip), %r13      # 0x50ba
leaq 0x8(%rsp), %r14
movslq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq -0x18(%rcx,%rax,8), %rax
movq (%rax,%r15,8), %rdi
callq 0x2718
movq %rax, %rdi
callq 0x2414
movq %r12, %rsi
testb %al, %al
jne 0x30f5
movq %r13, %rsi
movq %r14, %rdi
callq 0x2200
incq %r15
movslq 0x4(%rbx), %rax
cmpq %rax, %r15
jl 0x30ca
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x4eb6(%rip), %rdi      # 0x7fd0
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3165
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x3187
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x2140
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x319f
jmp 0x319f
jmp 0x31be
movq %rax, %rbx
jmp 0x3268
movq %rax, %rbx
jmp 0x3251
movq %rax, %rbx
leaq 0x18(%rsp), %r15
leaq 0x38(%rsp), %r14
jmp 0x323a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
jne 0x325b
jmp 0x3268
jmp 0x3211
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
leaq 0x18(%rsp), %r15
leaq 0x38(%rsp), %r14
je 0x321e
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x321e
jmp 0x3211
movq %rax, %rbx
leaq 0x18(%rsp), %r15
leaq 0x38(%rsp), %r14
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x323a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x3251
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3268
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x328a
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21d0