LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/toxaart[P]hierarchical_block_sparse_lib/source/HierarchicalBlockSparseMatrix.h
// Function: hbsm::HierarchicalBlockSparseMatrix<double>::sum_spamm_errors(std::vector<double, std::allocator<double>> const&, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>> const&)
std::vector<Treal> HierarchicalBlockSparseMatrix<Treal>::sum_spamm_errors(std::vector<real> const & curr_level_errors, std::vector<std::vector<real> > const & sub_errors){

	 			  std::vector<real> total_errors(curr_level_errors.size(),0.0);


	 				for(int j = 0; j < curr_level_errors.size(); ++j){

					// WHAT IS COMMENTED OUT IS DUE TO THE NEW VERSION OF THE ALGORITHM PROPOSED BY EMANUEL
	 				//	if(curr_level_errors[j] > 0.0) total_errors[j] = curr_level_errors[j];
	 				//	else{
	 						for(int i = 0; i < sub_errors.size();++i){
								if(sub_errors[i].size() == 0) continue;
								else total_errors[j] += sub_errors[i][j] * sub_errors[i][j];
	 						}
							total_errors[j] = std::sqrt(total_errors[j]);
	 					//}
	 				}

	 				return total_errors;
	 		}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rsi), %rsi
subq (%r15), %rsi
sarq $0x3, %rsi
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x7(%rsp), %rcx
callq 0x1ad84
xorl %r12d, %r12d
pushq $0x18
popq %r13
xorpd %xmm1, %xmm1
movq 0x8(%r15), %rax
subq (%r15), %rax
sarq $0x3, %rax
cmpq %r12, %rax
jbe 0x1a846
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
subq %rcx, %rax
cqto
idivq %r13
movq (%r14), %rdx
addq $0x8, %rcx
subq $0x1, %rax
jb 0x1a81a
movq -0x8(%rcx), %rsi
cmpq %rsi, (%rcx)
je 0x1a814
movsd (%rsi,%r12,8), %xmm0
mulsd %xmm0, %xmm0
addsd (%rdx,%r12,8), %xmm0
movsd %xmm0, (%rdx,%r12,8)
addq $0x18, %rcx
jmp 0x1a7ef
movq (%r14), %rax
movsd (%rax,%r12,8), %xmm0
ucomisd %xmm1, %xmm0
jb 0x1a82f
sqrtsd %xmm0, %xmm0
jmp 0x1a838
callq 0x2160
xorpd %xmm1, %xmm1
movq (%r14), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
jmp 0x1a7c9
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/toxaart[P]hierarchical_block_sparse_lib/source/HierarchicalBlockSparseMatrix.h
// Function: std::vector<double, std::allocator<double>> hbsm::operator+<double>(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&)
std::vector<T> operator+(const std::vector<T>& a, const std::vector<T>& b)
		{
		  assert(a.size() == b.size());

		  std::vector<T> result;
		  result.reserve(a.size());

		  std::transform(a.begin(), a.end(), b.begin(),
		                 std::back_inserter(result), std::plus<T>());
		  return result;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq 0x8(%rsi), %rsi
subq (%r15), %rsi
movq 0x8(%rdx), %rax
subq (%rdx), %rax
cmpq %rax, %rsi
jne 0x1a8f6
movq %rdx, %r14
movq %rdi, %rbx
sarq $0x3, %rsi
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
callq 0x16008
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq (%r14), %rdx
movq %rbx, %rcx
callq 0x1afd9
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x352c(%rip), %rdi      # 0x1de29
leaq 0x1e4b(%rip), %rsi      # 0x1c74f
leaq 0x3533(%rip), %rcx      # 0x1de3e
movl $0x1b6, %edx            # imm = 0x1B6
callq 0x2100
movq %rax, %r14
movq %rbx, %rdi
callq 0x1722c
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/toxaart[P]hierarchical_block_sparse_lib/source/HierarchicalBlockSparseMatrix.h
// Function: hbsm::HierarchicalBlockSparseMatrix<double>::self_frob_block_trunc(double)
bool HierarchicalBlockSparseMatrix<Treal>::self_frob_block_trunc(Treal trunc_value) {

			bool at_least_one_removed = false;

			for(int i = 0; i < 4; ++i){
				if(children[i] != NULL){ // if child exist
					if(children[i]->get_frob_squared() < trunc_value*trunc_value){
						children[i] = nullptr;
						at_least_one_removed = at_least_one_removed || true;
					}
					else{
						bool child_cleared = children[i]->self_frob_block_trunc(trunc_value);
						at_least_one_removed = at_least_one_removed || child_cleared;
					}
				}
			}


			for(int i = 0; i < 4; ++i){
				if(children[i] != NULL){
					if(!children[i]->lowest_level() && !children[i]->children_exist()){
						children[i] = nullptr;
					}
				}
			}

			return at_least_one_removed;

		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
addq $0x28, %rbx
movsd %xmm0, 0x18(%rsp)
mulsd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
leaq 0x8(%rsp), %r15
xorl %ebp, %ebp
movq %rsp, %r12
xorl %r14d, %r14d
cmpq $0x40, %rbp
je 0x1b0c8
movq (%rbx,%rbp), %rdi
testq %rdi, %rdi
je 0x1b0c2
leaq (%rbx,%rbp), %r13
callq 0x14c36
movsd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x1b0ab
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x14fba
movq %r15, %rdi
callq 0x14fe8
movb $0x1, %r14b
jmp 0x1b0c2
movq (%r13), %rdi
movsd 0x18(%rsp), %xmm0
callq 0x1b034
orb %r14b, %al
andb $0x1, %al
movl %eax, %r14d
addq $0x10, %rbp
jmp 0x1b066
leaq 0x8(%rsp), %r15
xorl %ebp, %ebp
movq %rsp, %r12
cmpq $0x40, %rbp
je 0x1b11d
movq (%rbx,%rbp), %rdi
testq %rdi, %rdi
je 0x1b117
callq 0x14f94
testb %al, %al
jne 0x1b117
leaq (%rbx,%rbp), %r13
movq (%r13), %rdi
callq 0x14e62
testb %al, %al
jne 0x1b117
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x14fba
movq %r15, %rdi
callq 0x14fe8
addq $0x10, %rbp
jmp 0x1b0d2
andb $0x1, %r14b
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Game.cpp
// Function: Game::getNextMoveAuto(Board&)
void Game::getNextMoveAuto(Board &b)
{
	bool goodMove=false;
	int xEntry, yEntry;

	while (!goodMove)
	{
		// randomly choose next move
		xEntry=rand()%10;
		yEntry=rand()%10;

		if (b.getSpaceValue(xEntry, yEntry)!=isHIT
			&& b.getSpaceValue(xEntry, yEntry)!=isMISS)
		{
			b.recordHit(xEntry, yEntry);
			goodMove=true;
		}
	} 
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
pushq $0xa
popq %r12
callq 0x2050
cltd
idivl %r12d
movl %edx, %r14d
callq 0x2050
cltd
idivl %r12d
movl %edx, %r15d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3a9c
cmpb $0x58, %al
je 0x3162
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x3a9c
cmpb $0x4f, %al
je 0x3162
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3ab2
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Game.cpp
// Function: Game::printGameState(Player)
void Game::printGameState(Player p)
{
	std::cout<<p.getName()<<"'s GAME STATE:\n\n";
	if (p.getPlayerNum()==1)
	{
		std::cout<<"YOUR BOARD: \n";
		p1Board.printPublicBoard();
		std::cout<<"YOUR OPPONENT'S BOARD: \n";
		p2Board.printPrivateBoard();
		std::cout<<std::endl<<std::endl;
	}
	else
	{
		std::cout<<"YOUR BOARD: \n";
		p2Board.printPublicBoard();
		std::cout<<"YOUR OPPONENT'S BOARD: \n";
		p1Board.printPrivateBoard();
		std::cout<<std::endl<<std::endl;
	}


	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x4874
movq 0x4df8(%rip), %rdi      # 0x7fd0
movq %r15, %rsi
callq 0x2130
leaq 0x1fa6(%rip), %rsi      # 0x518d
movq %rax, %rdi
callq 0x2160
leaq -0x38(%rbp), %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x4896
movl %eax, %r15d
movq 0x4dc6(%rip), %r14      # 0x7fd0
leaq 0x1f8d(%rip), %rsi      # 0x519e
movq %r14, %rdi
callq 0x2160
leaq 0xd0(%rbx), %rax
addq $0x28, %rbx
cmpl $0x1, %r15d
movq %rax, %rdi
cmoveq %rbx, %rdi
leaq 0x1f76(%rip), %r15      # 0x51ac
cmoveq %rax, %rbx
callq 0x3a08
movq %r14, %rdi
movq %r15, %rsi
callq 0x2160
movq %rbx, %rdi
callq 0x3956
movq %r14, %rdi
callq 0x20b0
movq %rax, %rdi
callq 0x20b0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Game.cpp
// Function: Game::getNextMove(Board&)
void Game::getNextMove(Board &b)
{
	int attemptCount=0;
	int xEntry, yEntry;
	bool goodMove=false;
	std::string entryTemp;

	while (!goodMove)
	{
		if (attemptCount>0) 
			std::cout<<"That move has already been attempted. Try again. \n";

		std::cout<<"Please enter location [Letter][Number] of desired move:\n";
		entryTemp=getSquare();		
		xEntry=static_cast<int>(entryTemp[0]);
		yEntry=static_cast<int>(entryTemp[1]);

		if (b.getSpaceValue(xEntry-LETTER_CHAR_OFFSET, 
						yEntry-NUMBER_CHAR_OFFSET)!=isHIT
			&& b.getSpaceValue(xEntry-LETTER_CHAR_OFFSET, 
							yEntry-NUMBER_CHAR_OFFSET)!=isMISS)
		{
			b.recordHit(xEntry-LETTER_CHAR_OFFSET, yEntry-NUMBER_CHAR_OFFSET);
			goodMove=true;
		}
		attemptCount++;
	} 

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r14d, %r14d
xorl %r12d, %r12d
testb $0x1, %r12b
jne 0x3355
subl $0x1, %r14d
jb 0x32cf
movq 0x4d0d(%rip), %rdi      # 0x7fd0
leaq 0x1fee(%rip), %rsi      # 0x52b8
callq 0x2160
movq 0x4cfa(%rip), %rdi      # 0x7fd0
leaq 0x200e(%rip), %rsi      # 0x52eb
callq 0x2160
leaq -0x68(%rbp), %r15
movq %r15, %rdi
callq 0x36c2
leaq -0x48(%rbp), %rdi
movq %r15, %rsi
callq 0x21c0
movq %r15, %rdi
callq 0x20a0
movq -0x48(%rbp), %rax
movsbl (%rax), %r15d
movsbl 0x1(%rax), %r13d
addl $-0x41, %r15d
addl $-0x30, %r13d
movq %rbx, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0x3a9c
cmpb $0x58, %al
je 0x32a9
movq %rbx, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0x3a9c
cmpb $0x4f, %al
je 0x32a9
movb $0x1, %r12b
movq %rbx, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0x3ab2
jmp 0x32ac
leaq -0x48(%rbp), %rdi
callq 0x20a0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x336f
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Game.cpp
// Function: Game::switchPlayers(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Game::switchPlayers(std::string playerFrom, std::string playerTo)
{
	std::cout<<playerFrom<<", press ENTER to finish your turn!";
	std::cin.get();
	std::cout<<std::flush;
	std::cout<<std::string(100,'\n');
	std::cout<<playerTo<<", press ENTER to start your turn!";
	std::cin.get();
	std::cout<<std::flush;
	std::cout<<std::string(100,'\n');	

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq 0x4c33(%rip), %r14      # 0x7fd0
movq %r14, %rdi
callq 0x2130
leaq 0x1fdd(%rip), %rsi      # 0x5389
movq %rax, %rdi
callq 0x2160
movq 0x4c25(%rip), %rdi      # 0x7fe0
callq 0x21b0
movq %r14, %rdi
callq 0x20e0
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq -0x40(%rbp), %rdi
pushq $0x64
popq %rsi
pushq $0xa
popq %rdx
callq 0x2190
movq 0x4be9(%rip), %rdi      # 0x7fd0
leaq -0x40(%rbp), %rsi
callq 0x2130
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x20a0
movq 0x4bcd(%rip), %r15      # 0x7fd0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2130
leaq 0x1f97(%rip), %rsi      # 0x53ac
movq %rax, %rdi
callq 0x2160
movq 0x4bbc(%rip), %rdi      # 0x7fe0
callq 0x21b0
movq %r15, %rdi
callq 0x20e0
movq %r12, (%r14)
leaq -0x40(%rbp), %rdi
pushq $0x64
popq %rsi
pushq $0xa
popq %rdx
callq 0x2190
movq 0x4b86(%rip), %rdi      # 0x7fd0
leaq -0x40(%rbp), %rsi
callq 0x2130
leaq -0x40(%rbp), %rdi
callq 0x20a0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x346d
jmp 0x347b
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x20a0
jmp 0x347e
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Game.cpp
// Function: Game::initializeBoardAuto(Board&, bool)
void Game::initializeBoardAuto(Board &b, bool print)
{
	int xEntry, yEntry, horizEntry;

	for (int i=0; i<NUM_SHIPS; i++)
	{
		do // randomize position placements and place ships if possible
		{
			xEntry=rand()%10;
			yEntry=rand()%10;
			horizEntry=rand()%2;
		} while (!b.placeShip(i, xEntry, yEntry, horizEntry));

	}

	if (print)
	{
		std::cout<<"Your starting board: \n";
		b.printPublicBoard();
	}


	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, -0x2c(%rbp)
movq %rsi, %rbx
xorl %r15d, %r15d
pushq $0xa
popq %r14
cmpl $0x5, %r15d
je 0x34e4
callq 0x2050
cltd
idivl %r14d
movl %edx, %r12d
callq 0x2050
cltd
idivl %r14d
movl %edx, %r13d
callq 0x2050
andl $0x1, %eax
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
movl %eax, %r8d
callq 0x3bbc
testb %al, %al
je 0x34a7
incl %r15d
jmp 0x34a1
cmpb $0x0, -0x2c(%rbp)
je 0x3513
movq 0x4adf(%rip), %rdi      # 0x7fd0
leaq 0x1da9(%rip), %rsi      # 0x52a1
callq 0x2160
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a08
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Game.cpp
// Function: Game::initializeBoard(Board&)
void Game::initializeBoard(Board &b)
{
	int xEntry, yEntry, horizEntry, attemptCount;
	std::string entryTemp;
	for (int i=0; i<NUM_SHIPS; i++)
	{
		attemptCount=0;
		do // check for valid placement of each ship
		{
			b.printPublicBoard();
			if (attemptCount>0) 
				std::cout<<"INVALID ENTRY for that ship! Please try again. \n";

			std::cout<<"Please enter location [Letter][Number] for the "<<
						"top/left of your "<<SHIP_NAMES[i]<<" which is length "
						<<SHIP_LENGTHS[i]<<": \n";
			entryTemp=getSquare();		
			xEntry=static_cast<int>(entryTemp[0]);
			yEntry=static_cast<int>(entryTemp[1]);

			std::cout<<"Please enter 0 if the ship is oriented vertically, "
						<<"1 if it is oriented horizontally:\n";
			horizEntry=getInt(0,1);

			attemptCount++;
		} while (!b.placeShip(i, xEntry-LETTER_CHAR_OFFSET, 
						yEntry-NUMBER_CHAR_OFFSET, horizEntry));

	}

	std::cout<<"Your starting board: \n";
	b.printPublicBoard();

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rsi, %rbx
movb $0x0, (%rax)
xorl %r14d, %r14d
cmpq $0x5, %r14
je 0x3676
movq %r14, %rcx
shlq $0x5, %rcx
leaq 0x4caf(%rip), %rax      # 0x8210
addq %rax, %rcx
movq %rcx, -0x30(%rbp)
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x3a08
subl $0x1, %r12d
jb 0x358c
movq 0x4a50(%rip), %rdi      # 0x7fd0
leaq 0x1c3e(%rip), %rsi      # 0x51c5
callq 0x2160
movq 0x4a3d(%rip), %rdi      # 0x7fd0
leaq 0x1c5c(%rip), %rsi      # 0x51f6
callq 0x2160
movq %rax, %rdi
leaq 0x1c7d(%rip), %rsi      # 0x5226
callq 0x2160
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x2130
movq %rax, %rdi
leaq 0x1c74(%rip), %rsi      # 0x5238
callq 0x2160
leaq 0x1e00(%rip), %rcx      # 0x53d0
movl (%rcx,%r14,4), %esi
movq %rax, %rdi
callq 0x2220
movq %rax, %rdi
leaq 0x1bc2(%rip), %rsi      # 0x51a8
callq 0x2160
leaq -0x70(%rbp), %r15
movq %r15, %rdi
callq 0x36c2
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x21c0
movq %r15, %rdi
callq 0x20a0
movq -0x50(%rbp), %rax
movsbl (%rax), %r15d
movsbl 0x1(%rax), %r13d
movq 0x49b1(%rip), %rdi      # 0x7fd0
leaq 0x1c24(%rip), %rsi      # 0x524a
callq 0x2160
movq %rax, %rdi
leaq 0x1c49(%rip), %rsi      # 0x527e
callq 0x2160
xorl %edi, %edi
pushq $0x1
popq %rsi
callq 0x494d
addl $-0x41, %r15d
addl $-0x30, %r13d
xorl %r8d, %r8d
testl %eax, %eax
setne %r8b
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %r13d, %ecx
callq 0x3bbc
testb %al, %al
je 0x356b
incq %r14
jmp 0x3549
movq 0x4953(%rip), %rdi      # 0x7fd0
leaq 0x1c1d(%rip), %rsi      # 0x52a1
callq 0x2160
movq %rbx, %rdi
callq 0x3a08
leaq -0x50(%rbp), %rdi
callq 0x20a0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x36ad
jmp 0x36ad
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Game.cpp
// Function: Game::getSquare[abi:cxx11]()
std::string Game::getSquare()
{
	std::string retString;
	std::getline(std::cin, retString);
	bool isGoodInput=false;

	while (!isGoodInput)
	{
		// check for two character entries of letter/number
		if (retString.length()==2 && (retString[0]>=65 && retString[0]<=74) 
						&& (retString[1]>=48 && retString[1]<=57))
			isGoodInput=true;
		else
		{
			std::cout<<"Bad input! Please enter location [Letter][Number] of "
						<<"your desired move, with capital letters only:\n";
			std::getline(std::cin, retString);
		}
	}

	return retString;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x48f6(%rip), %rdi      # 0x7fe0
movq %rbx, %rsi
callq 0x2040
movq 0x48d7(%rip), %r14      # 0x7fd0
leaq 0x1c24(%rip), %r15      # 0x5324
leaq 0x1c53(%rip), %r12      # 0x535a
movq 0x48d2(%rip), %r13      # 0x7fe0
cmpq $0x2, 0x8(%rbx)
jne 0x372b
movq (%rbx), %rax
movb (%rax), %cl
addb $-0x41, %cl
cmpb $0x9, %cl
ja 0x372b
movb 0x1(%rax), %al
addb $-0x30, %al
cmpb $0xa, %al
jb 0x374e
movq %r14, %rdi
movq %r15, %rsi
callq 0x2160
movq %rax, %rdi
movq %r12, %rsi
callq 0x2160
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2040
jmp 0x370e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3762
movq %rax, %r14
movq %rbx, %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x2230
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Board.cpp
// Function: Board::Board()
Board::Board()
{
	for (int i=0; i<BOARD_DIM; i++)
		for (int j=0; j<BOARD_DIM; j++)
			gameBoard[i][j]=isWATER;

	for (int i=0; i<NUM_SHIPS; i++)
		shipVec.push_back(Ship(SHIP_LENGTHS[i], SHIP_NAMES[i]));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
leaq 0x68(%rdi), %rax
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rdi)
andq $0x0, 0x78(%rdi)
xorl %eax, %eax
cmpq $0xa, %rax
je 0x37bf
xorl %ecx, %ecx
cmpq $0xa, %rcx
je 0x37b6
movb $0x77, (%rdi,%rcx)
incq %rcx
jmp 0x37a7
incq %rax
addq $0xa, %rdi
jmp 0x379f
leaq 0x4afa(%rip), %r14      # 0x82c0
xorl %ebx, %ebx
leaq -0x50(%rbp), %r15
leaq -0x88(%rbp), %r12
cmpq $0x14, %rbx
je 0x3823
leaq 0x1c50(%rip), %rax      # 0x5430
movl (%rbx,%rax), %r13d
movq %r15, %rdi
movq %r14, %rsi
callq 0x21e0
movq %r12, %rdi
movl %r13d, %esi
movq %r15, %rdx
callq 0x433c
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x3e9c
movq %r12, %rdi
callq 0x4620
movq %r15, %rdi
callq 0x20a0
addq $0x4, %rbx
addq $0x20, %r14
jmp 0x37d3
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x3854
movq %rax, %r14
jmp 0x384b
movq %rax, %r14
leaq -0x88(%rbp), %rdi
callq 0x4620
leaq -0x50(%rbp), %rdi
callq 0x20a0
movq -0x30(%rbp), %rdi
callq 0x3d1a
movq %r14, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Board.cpp
// Function: Board::Board(Board const&)
Board::Board(const Board &oldBoard)
{
	for (int i=0; i<BOARD_DIM; i++)
		for (int j=0; j<BOARD_DIM; j++)
			gameBoard[i][j]=oldBoard.gameBoard[i][j];
	shipVec = oldBoard.shipVec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x68(%rdi), %rbx
andq $0x0, 0x78(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rdi)
xorl %eax, %eax
movq %rsi, %rcx
cmpq $0xa, %rax
je 0x38aa
xorl %edx, %edx
cmpq $0xa, %rdx
je 0x389d
movb (%rcx,%rdx), %r8b
movb %r8b, (%rdi,%rdx)
incq %rdx
jmp 0x388a
incq %rax
addq $0xa, %rcx
addq $0xa, %rdi
jmp 0x3882
addq $0x68, %rsi
movq %rbx, %rdi
callq 0x3d46
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x3d1a
movq %r14, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Board.cpp
// Function: Board::operator=(Board const&)
Board& Board::operator=(const Board &right)
{
	if (this!=&right)
	{
		for (int i=0; i<BOARD_DIM; i++)
			for (int j=0; j<BOARD_DIM; j++)
				gameBoard[i][j]=right.gameBoard[i][j];
		shipVec = right.shipVec;
	}

	return *this;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x3919
xorl %eax, %eax
movq %rbx, %rcx
movq %rsi, %rdx
cmpq $0xa, %rax
je 0x390c
xorl %edi, %edi
cmpq $0xa, %rdi
je 0x38ff
movb (%rdx,%rdi), %r8b
movb %r8b, (%rcx,%rdi)
incq %rdi
jmp 0x38ec
incq %rax
addq $0xa, %rdx
addq $0xa, %rcx
jmp 0x38e4
addq $0x68, %rsi
leaq 0x68(%rbx), %rdi
callq 0x3d46
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Board.cpp
// Function: Board::getNumHits()
int Board::getNumHits()
{
	int count=0;

	for (int i=0; i<BOARD_DIM; i++)
		for (int j=0; j<BOARD_DIM; j++)
			if (gameBoard[i][j]==isHIT)
				count++;

	return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
xorl %eax, %eax
cmpq $0xa, %rcx
je 0x3954
xorl %edx, %edx
cmpq $0xa, %rdx
je 0x394b
xorl %esi, %esi
cmpb $0x58, (%rdi,%rdx)
sete %sil
addl %esi, %eax
incq %rdx
jmp 0x3934
incq %rcx
addq $0xa, %rdi
jmp 0x392c
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Board.cpp
// Function: Board::printPrivateBoard()
void Board::printPrivateBoard()
{
	std::cout<<"  A B C D E F G H I J\n";
	for (int i=0; i<BOARD_DIM; i++)
	{
		std::cout<<i<<" ";
		for (int j=0; j<BOARD_DIM; j++)
		{
			if (gameBoard[i][j]==isHIT || gameBoard[i][j]==isMISS)
				std::cout<<gameBoard[i][j]<<" ";
			else // obfuscate non-hit/miss entries
				std::cout<<isUNKNOWN<<" ";
		}	
		std::cout<<std::endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x4662(%rip), %r14      # 0x7fd0
leaq 0x1a6f(%rip), %rsi      # 0x53e4
movq %r14, %rdi
callq 0x2160
xorl %esi, %esi
leaq 0x1775(%rip), %r12      # 0x50fb
pushq $0x58
popq %r13
cmpq $0xa, %rsi
je 0x39f8
movq %r14, %rdi
movq %rsi, -0x30(%rbp)
callq 0x2220
movq %rax, %rdi
movq %r12, %rsi
callq 0x2160
xorl %r15d, %r15d
cmpq $0xa, %r15
je 0x39e3
movb (%rbx,%r15), %al
cmpb $0x4f, %al
sete %cl
shlb $0x4, %cl
addb $0x3f, %cl
cmpb $0x58, %al
movzbl %cl, %eax
cmovel %r13d, %eax
movzbl %al, %esi
movq %r14, %rdi
callq 0x21a0
movq %rax, %rdi
movq %r12, %rsi
callq 0x2160
incq %r15
jmp 0x39aa
movq %r14, %rdi
callq 0x20b0
movq -0x30(%rbp), %rsi
incq %rsi
addq $0xa, %rbx
jmp 0x398a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Board.cpp
// Function: Board::printPublicBoard()
void Board::printPublicBoard()
{
	std::cout<<"  A B C D E F G H I J\n";
	for (int i=0; i<BOARD_DIM; i++)
	{
		std::cout<<i<<" ";
		for (int j=0; j<BOARD_DIM; j++)
		{
			std::cout<<gameBoard[i][j]<<" ";
		}	
		std::cout<<std::endl;
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x45b0(%rip), %r14      # 0x7fd0
leaq 0x19bd(%rip), %rsi      # 0x53e4
movq %r14, %rdi
callq 0x2160
xorl %r15d, %r15d
leaq 0x16c2(%rip), %r12      # 0x50fb
cmpq $0xa, %r15
je 0x3a8c
movq %r14, %rdi
movl %r15d, %esi
callq 0x2220
movq %rax, %rdi
movq %r12, %rsi
callq 0x2160
xorl %r13d, %r13d
cmpq $0xa, %r13
je 0x3a7b
movsbl (%rbx,%r13), %esi
movq %r14, %rdi
callq 0x21a0
movq %rax, %rdi
movq %r12, %rsi
callq 0x2160
incq %r13
jmp 0x3a58
movq %r14, %rdi
callq 0x20b0
incq %r15
addq $0xa, %rbx
jmp 0x3a39
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Board.cpp
// Function: Board::recordHit(int, int)
bool Board::recordHit(int x, int y)
{
	for (int i=0; i<NUM_SHIPS; i++)
	{
		if (shipVec[i].recordHit(x, y))
		{
			gameBoard[y][x]=isHIT; //record the hit on the board
			//tell the user that they sunk a ship
			if (shipVec[i].isShipSunk()) 
				std::cout<<"You sunk the "<<shipVec[i].getName()<<"!\n";
			return true;
		}
	}
	gameBoard[y][x]=isMISS;
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r15d
movl %esi, %r14d
movq %rdi, -0x30(%rbp)
pushq $0x38
popq %r13
xorl %ebx, %ebx
xorl %ecx, %ecx
movq %rcx, %r12
cmpq $0x5, %rcx
je 0x3b7c
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rdi
addq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x46c2
leaq 0x1(%r12), %rcx
addq $-0x38, %r13
addq $0x38, %rbx
testb %al, %al
je 0x3ad5
movslq %r15d, %rax
movslq %r14d, %rcx
imulq $0xa, %rax, %rax
movq -0x30(%rbp), %rbx
addq %rbx, %rax
movb $0x58, (%rcx,%rax)
movq 0x68(%rbx), %rdi
subq %r13, %rdi
callq 0x4558
testb %al, %al
je 0x3b91
movq 0x449b(%rip), %rdi      # 0x7fd0
leaq 0x18bf(%rip), %rsi      # 0x53fb
callq 0x2160
movq %rax, %r14
movq 0x68(%rbx), %rsi
subq %r13, %rsi
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
callq 0x4528
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2130
leaq 0x18a0(%rip), %rsi      # 0x5409
movq %rax, %rdi
callq 0x2160
leaq -0x50(%rbp), %rdi
callq 0x20a0
jmp 0x3b91
movslq %r15d, %rax
movslq %r14d, %rcx
imulq $0xa, %rax, %rax
movq -0x30(%rbp), %rdx
addq %rax, %rdx
movb $0x4f, (%rcx,%rdx)
cmpq $0x5, %r12
setb %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Board.cpp
// Function: Board::placeShip(int, int, int, bool)
bool Board::placeShip(int shipNum, int x, int y, bool isHorizontal)
{
	//if x or y is out of bounds, return false
	if (x>=BOARD_DIM || y>=BOARD_DIM)
		return false;

	//if ship has already been placed, return false
	if (shipVec[shipNum].getX()>=0 && shipVec[shipNum].getY()>=0)
		return false;

	//loop through the positions required for the ship
	for (int i=0; i<shipVec[shipNum].getSize(); i++)
	{
		//if any of the desired spaces are filled, return false
		if ((isHorizontal && gameBoard[y][x+i]!=isWATER) || 
							(!isHorizontal && gameBoard[y+i][x]!=isWATER))
			return false;
		//if any of the desired spaces are out of bounds, return false
		if ((isHorizontal && (x+i)>=BOARD_DIM) || 
							(!isHorizontal && (y+i)>=BOARD_DIM))
			return false;
	}

	//if the for loop finishes, and all the positions are empty, 
	//1. place the Ship in the desired position on the board
	for (int i=0; i<shipVec[shipNum].getSize(); i++)
	{
		if (isHorizontal)
			gameBoard[y][x+i]=isSAFESHIP;
		else 
			gameBoard[y+i][x]=isSAFESHIP;
	}

	//2. set the x/y parameters for the Ship object 
	shipVec[shipNum].setPosition(x, y, isHorizontal);

	//... and return true
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, -0x2c(%rbp)
movl %ecx, %ebx
cmpl $0xa, %edx
setge %al
cmpl $0xa, %ecx
setge %cl
orb %al, %cl
jne 0x3cad
movl %edx, %r14d
movq %rdi, %r15
movslq %esi, %rax
imulq $0x38, %rax, %r12
movq 0x68(%rdi), %rdi
addq %r12, %rdi
callq 0x4544
testl %eax, %eax
js 0x3c18
movq 0x68(%r15), %rdi
addq %r12, %rdi
callq 0x454e
testl %eax, %eax
jns 0x3cad
movq %r12, -0x48(%rbp)
movl %r14d, -0x30(%rbp)
movslq %r14d, %r12
movl %ebx, -0x34(%rbp)
movslq %ebx, %rcx
imulq $0xa, %rcx, %rax
movq %r15, -0x50(%rbp)
movq %rax, -0x58(%rbp)
addq %r15, %rax
movq %rax, -0x40(%rbp)
xorl %r14d, %r14d
movq %r12, %rbx
movq %r12, %r13
movq %rcx, -0x60(%rbp)
movq %rcx, %r15
movq -0x50(%rbp), %rax
movq 0x68(%rax), %rdi
addq -0x48(%rbp), %rdi
callq 0x451e
cltq
cmpq %rax, %r14
jge 0x3cbe
cmpb $0x0, -0x2c(%rbp)
je 0x3c82
xorl %eax, %eax
cmpq $0x9, %r13
jg 0x3caf
movq -0x40(%rbp), %rcx
cmpb $0x77, (%rcx,%r13)
movq %r15, %rcx
je 0x3c94
jmp 0x3caf
movq -0x40(%rbp), %rax
cmpb $0x77, (%rax,%rbx)
jne 0x3cad
movq -0x60(%rbp), %rax
leaq (%r14,%rax), %rcx
incq %r14
incq %r15
incq %r13
addq $0xa, %rbx
cmpb $0x0, -0x2c(%rbp)
jne 0x3c4c
cmpq $0xa, %rcx
jl 0x3c4c
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x50(%rbp), %r15
addq %r15, %r12
addq -0x58(%rbp), %r12
xorl %ebx, %ebx
movq %r12, %r14
movq -0x48(%rbp), %r13
movq 0x68(%r15), %rdi
addq %r13, %rdi
callq 0x451e
cltq
cmpq %rax, %rbx
jge 0x3cff
cmpb $0x0, -0x2c(%rbp)
movq %r12, %rax
cmovneq %r14, %rax
movb $0x5f, (%rax)
incq %rbx
incq %r14
addq $0xa, %r12
jmp 0x3cd2
addq 0x68(%r15), %r13
movzbl -0x2c(%rbp), %ecx
movq %r13, %rdi
movl -0x30(%rbp), %esi
movl -0x34(%rbp), %edx
callq 0x464e
movb $0x1, %al
jmp 0x3caf
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Ship.cpp
// Function: Ship::Ship(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Ship::Ship(int size, std::string n)
{
	shipSize=size;
	name = n;
	shipSquares=new char[shipSize];
	for (int i=0; i<shipSize; i++)
		shipSquares[i]=isSAFESHIP; //initialize all ship squares to '_', no hit
	xpos=-1; //indicates that the ship has not been placed yet
	ypos=-1; //indicates that the ship has not been placed yet
	isSunk=false; //since ship is new, it is not yet sunk
	isHorizontal=true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %rax
movq %rax, 0x18(%rdi)
andq $0x0, 0x20(%rdi)
leaq 0x18(%rdi), %r14
movb $0x0, 0x28(%rdi)
movl %esi, 0x8(%rdi)
movq %r14, %rdi
movq %rdx, %rsi
callq 0x20d0
movl 0x8(%rbx), %r15d
movslq %r15d, %rdi
callq 0x2030
movq %rax, (%rbx)
xorl %eax, %eax
movslq %r15d, %rcx
cmpq %rcx, %rax
jge 0x4395
movq (%rbx), %rcx
movb $0x5f, (%rcx,%rax)
incq %rax
movl 0x8(%rbx), %r15d
jmp 0x437d
orq $-0x1, 0xc(%rbx)
movw $0x100, 0x14(%rbx)      # imm = 0x100
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Ship.cpp
// Function: Ship::Ship(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, bool, bool)
Ship::Ship(int size, std::string n, int x, int y, bool s, bool h)
{
	shipSize=size;
	name = n;
	shipSquares=new char[shipSize];
	for (int i=0; i<shipSize; i++)
		shipSquares[i]=isSAFESHIP; //initialize all ship squares to '_', no hit
	xpos=x; 
	ypos=y;
	isSunk=s; 
	isHorizontal=h;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, -0x2c(%rbp)
movl %r8d, %r14d
movl %ecx, %r12d
movq %rdi, %r15
leaq 0x28(%rdi), %rax
movq %rax, 0x18(%rdi)
andq $0x0, 0x20(%rdi)
leaq 0x18(%rdi), %r13
movb $0x0, 0x28(%rdi)
movl %esi, 0x8(%rdi)
movq %r13, %rdi
movq %rdx, %rsi
callq 0x20d0
movl 0x8(%r15), %ebx
movslq %ebx, %rdi
callq 0x2030
movb 0x10(%rbp), %cl
movq %rax, (%r15)
xorl %eax, %eax
movslq %ebx, %rdx
cmpq %rdx, %rax
jge 0x4428
movq (%r15), %rdx
movb $0x5f, (%rdx,%rax)
incq %rax
movl 0x8(%r15), %ebx
jmp 0x4410
movl %r12d, 0xc(%r15)
movl %r14d, 0x10(%r15)
movl -0x2c(%rbp), %eax
movb %al, 0x14(%r15)
movb %cl, 0x15(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r13, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Ship.cpp
// Function: Ship::Ship(Ship const&)
Ship::Ship(const Ship &oldShip)
{
	shipSize=oldShip.getSize();
	name = oldShip.getName();
	shipSquares=new char[shipSize];
	for (int i=0; i<shipSize; i++)
		shipSquares[i]=oldShip.shipSquares[i]; 
	xpos=oldShip.getX();
	ypos=oldShip.getY();
	isSunk=oldShip.isShipSunk();
	isHorizontal=oldShip.isShipHorizontal();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
leaq 0x28(%rdi), %rax
movq %rax, 0x18(%rdi)
andq $0x0, 0x20(%rdi)
movb $0x0, 0x28(%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rdi)
addq $0x18, %rsi
leaq -0x40(%rbp), %rdi
callq 0x21e0
leaq -0x40(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x21c0
movq %r12, %rdi
callq 0x20a0
movl 0x8(%rbx), %r12d
movslq %r12d, %rdi
callq 0x2030
movq %rax, (%rbx)
xorl %eax, %eax
movslq %r12d, %rcx
cmpq %rcx, %rax
jge 0x44e0
movq (%r14), %rcx
movb (%rcx,%rax), %cl
movq (%rbx), %rdx
movb %cl, (%rdx,%rax)
incq %rax
movl 0x8(%rbx), %r12d
jmp 0x44c3
movl 0xc(%r14), %eax
movl %eax, 0xc(%rbx)
movl 0x10(%r14), %eax
movl %eax, 0x10(%rbx)
movb 0x14(%r14), %al
movb %al, 0x14(%rbx)
movb 0x15(%r14), %al
movb %al, 0x15(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x450b
movq %rax, %rbx
movq %r15, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Ship.cpp
// Function: Ship::operator=(Ship const&)
Ship& Ship::operator=(const Ship &right)
{
	if (this!=&right)
	{
		shipSize=right.getSize();
		name = right.getName();
		xpos=right.getX();
		ypos=right.getY();
		isSunk=right.isShipSunk();
		isHorizontal=right.isShipHorizontal();

		if (shipSize>0) // delete old memory before new memory
			delete [] shipSquares;
		shipSquares = new char[shipSize];
		for (int i=0; i<shipSize; i++)
			shipSquares[i]=right.shipSquares[i]; 


	}
	return *this;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x4612
movq %rsi, %r14
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rbx)
addq $0x18, %rsi
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x21e0
leaq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x21c0
movq %r15, %rdi
callq 0x20a0
movl 0xc(%r14), %eax
movl %eax, 0xc(%rbx)
movl 0x10(%r14), %eax
movl %eax, 0x10(%rbx)
movb 0x14(%r14), %al
movb %al, 0x14(%rbx)
movb 0x15(%r14), %al
movb %al, 0x15(%rbx)
movl 0x8(%rbx), %r15d
testl %r15d, %r15d
jle 0x45e8
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x45e8
callq 0x21d0
movl 0x8(%rbx), %r15d
movslq %r15d, %rdi
callq 0x2030
movq %rax, (%rbx)
xorl %eax, %eax
movslq %r15d, %rcx
cmpq %rcx, %rax
jge 0x4612
movq (%r14), %rcx
movb (%rcx,%rax), %cl
movq (%rbx), %rdx
movb %cl, (%rdx,%rax)
incq %rax
movl 0x8(%rbx), %r15d
jmp 0x45f5
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Ship.cpp
// Function: Ship::printShip()
void Ship::printShip() 
{
	for (int i=0; i<shipSize; i++)
		cout<<shipSquares[i]<<" ";
	cout<<"\n";
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r12d, %r12d
movq 0x395a(%rip), %r14      # 0x7fd0
leaq 0xa7e(%rip), %r15       # 0x50fb
movslq 0x8(%rbx), %rax
cmpq %rax, %r12
jge 0x46a6
movq (%rbx), %rax
movsbl (%rax,%r12), %esi
movq %r14, %rdi
callq 0x21a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x2160
incq %r12
jmp 0x467d
movq 0x3923(%rip), %rdi      # 0x7fd0
leaq 0xa16(%rip), %rsi       # 0x50ca
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2160
nop
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Ship.cpp
// Function: Ship::recordHit(int, int)
bool Ship::recordHit(int hitLocX, int hitLocY)
{
	//check to make sure that the hit is located on the ship, return if not
	if ((isHorizontal & (hitLocX<xpos || hitLocX>=xpos+shipSize 
														|| hitLocY!=ypos))
		|| (!isHorizontal & (hitLocY<ypos || hitLocY>=ypos+shipSize 
														|| hitLocX!=xpos)))
		return false; //return false because it was not a hit
	else // if there is a hit, record it on the ship
	{
		if (isHorizontal) 
			shipSquares[hitLocX-xpos]=isHIT;
		else 
			shipSquares[hitLocY-ypos]=isHIT;
	}

	//determine whether the ship has been sunk
	isSunk=true;
	for (int i=0; i<shipSize; i++)
		if (shipSquares[i]==isSAFESHIP)
			isSunk=false;

	return true;
}

// Assembly:
movzbl 0x15(%rdi), %ecx
movl 0xc(%rdi), %eax
movl $0x1, %r9d
movl %esi, %r8d
subl %eax, %r8d
jl 0x46ed
movl 0x8(%rdi), %r10d
addl %eax, %r10d
cmpl %esi, %r10d
jle 0x46ed
xorl %r9d, %r9d
cmpl %edx, 0x10(%rdi)
setne %r9b
testl %ecx, %r9d
je 0x46f5
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movl %ecx, %r10d
xorl $0x1, %r10d
movl 0x10(%rdi), %ebx
movl $0x1, %r11d
movl %edx, %r9d
subl %ebx, %r9d
jl 0x4722
addl 0x8(%rdi), %ebx
cmpl %edx, %ebx
jle 0x4722
xorl %r11d, %r11d
cmpl %eax, %esi
setne %r11b
xorl %eax, %eax
testl %r10d, %r11d
jne 0x475e
movq (%rdi), %rdx
testl %ecx, %ecx
cmovnel %r8d, %r9d
movslq %r9d, %rcx
movb $0x58, (%rdx,%rcx)
movb $0x1, 0x14(%rdi)
movl 0x8(%rdi), %ecx
movq (%rdi), %rdx
testl %ecx, %ecx
cmovlel %eax, %ecx
cmpq %rax, %rcx
je 0x475c
cmpb $0x5f, (%rdx,%rax)
jne 0x4757
movb $0x0, 0x14(%rdi)
incq %rax
jmp 0x4748
movb $0x1, %al
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/Player.cpp
// Function: Player::operator=(Player const&)
Player& Player::operator=(const Player &obj)
{
	if (this != &obj)
	{
		name = obj.name;
		isAutomaticPlayer = obj.isAutomaticPlayer;
		playerNumber = obj.playerNumber;
	}

	return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x486c
movq %rsi, %r14
movq %rbx, %rdi
callq 0x20d0
movb 0x20(%r14), %al
movb %al, 0x20(%rbx)
movl 0x24(%r14), %eax
movl %eax, 0x24(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/utils.cpp
// Function: printMenu()
bool printMenu()
{
	Game g; 
	int cont;

	std::cout<<"Welcome to Battleship! Enter 1 or 2 to: \n1. Start a new game."
				<<"\n2. Quit.\n\n";
	cont = getInt(1,2);

	if (cont==1)
	{
		g.playGame();
		return true;
	}
	else 
		return false;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
leaq -0x158(%rbp), %rdi
callq 0x4b7a
movq 0x36f1(%rip), %rdi      # 0x7fd0
leaq 0xb5e(%rip), %rsi       # 0x5444
callq 0x2160
leaq 0xb90(%rip), %rsi       # 0x5482
movq %rax, %rdi
callq 0x2160
pushq $0x1
popq %rdi
pushq $0x2
popq %rsi
callq 0x494d
movl %eax, %ebx
cmpl $0x1, %eax
jne 0x4918
leaq -0x158(%rbp), %rdi
callq 0x29f8
cmpl $0x1, %ebx
sete %bl
leaq -0x158(%rbp), %rdi
callq 0x4bec
movl %ebx, %eax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x158(%rbp), %rdi
callq 0x4bec
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/cb92[P]Battleship/utils.cpp
// Function: getString[abi:cxx11](int)
std::string getString(int maxLen)
{
	std::string retString;
	std::getline(std::cin, retString);
	while (retString.length()>maxLen)
	{
		std::cout<<"String too long! Please enter a string with <=";
		std::cout<<maxLen<<" characters:"<<std::endl;
		std::getline(std::cin, retString);
	}

	return retString;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x34eb(%rip), %rdi      # 0x7fe0
movq %rbx, %rsi
callq 0x2040
movslq %r14d, %r13
movq 0x34c9(%rip), %r15      # 0x7fd0
movq 0x34d2(%rip), %r12      # 0x7fe0
cmpq %r13, 0x8(%rbx)
jbe 0x4b52
movq %r15, %rdi
leaq 0x9a2(%rip), %rsi       # 0x54c0
callq 0x2160
movq %r15, %rdi
movl %r14d, %esi
callq 0x2220
movq %rax, %rdi
leaq 0x9b7(%rip), %rsi       # 0x54ef
callq 0x2160
movq %rax, %rdi
callq 0x20b0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2040
jmp 0x4b0e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4b66
movq %rax, %r14
movq %rbx, %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/lolonet[P]Timer/main.cpp
// Function: timeoutNotify(int)
int timeoutNotify(int timeid)
{
	cout<<" timeout id=" << timeid <<endl;
	switch(timeid)
	{
		case 100:
			cout<<" do time id 100" <<endl;
			break;
		case 101:
			cout<<" do time id 101" <<endl;
			break;

		default:
			cout<<" do time id " << timeid <<endl;
			break;

	}
	return timeid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x4c8d(%rip), %rdi      # 0x5fd8
leaq 0x1cb2(%rip), %rsi      # 0x3004
callq 0x10f0
movq %rax, %rdi
movl %ebx, %esi
callq 0x11a0
movq %rax, %rdi
callq 0x1090
movq 0x4c68(%rip), %rdi      # 0x5fd8
cmpl $0x65, %ebx
je 0x1383
cmpl $0x64, %ebx
jne 0x1391
leaq 0x1c90(%rip), %rsi      # 0x3011
jmp 0x138a
leaq 0x1c97(%rip), %rsi      # 0x3021
callq 0x10f0
jmp 0x13a7
leaq 0x1c99(%rip), %rsi      # 0x3031
callq 0x10f0
movq %rax, %rdi
movl %ebx, %esi
callq 0x11a0
movq %rax, %rdi
callq 0x1090
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lolonet[P]Timer/main.cpp
// Function: main
int main(int argc, char *argv[])
{
	const int epfd = epoll_create(1);
	epoll_event events[1] = {};

	TimerContraller timeCtl;
	Timer timer(&timeCtl);
	timer.StartTimer(100, 3, timeoutNotify);
	timer.StartTimer(101, 6, timeoutNotify);
	timer.StartTimer(102, 4, otherTimeoutNotify);

	const int minEpollTime = 1000;			// 1000 msec
	while(true)
	{
		epoll_wait(epfd, events, sizeof(events)/sizeof(epoll_event), minEpollTime);
		timeCtl.CheckExpire();

		cout<<" contral list " << timeCtl.GetTimerListSize() <<" contral queue " << timeCtl.GetTimerQueueSize() <<endl;

	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
pushq $0x1
popq %rdi
callq 0x11c0
andl $0x0, -0x30(%rbp)
movl %eax, %ebx
andq $0x0, -0x38(%rbp)
leaq -0xc0(%rbp), %r14
movq %r14, %rdi
callq 0x1524
leaq -0x68(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq %r14, 0x28(%rax)
leaq -0x10c(%rip), %rcx      # 0x133c
leaq -0x70(%rbp), %rdi
pushq $0x64
popq %rsi
pushq $0x3
popq %rdx
callq 0x18e2
leaq -0x122(%rip), %rcx      # 0x133c
leaq -0x70(%rbp), %rdi
pushq $0x65
popq %rsi
pushq $0x6
popq %rdx
callq 0x18e2
leaq -0xbc(%rip), %rcx       # 0x13b8
leaq -0x70(%rbp), %rdi
pushq $0x66
popq %rsi
pushq $0x4
popq %rdx
callq 0x18e2
leaq -0xc0(%rbp), %r12
leaq 0x1bbf(%rip), %r14      # 0x3050
leaq 0x1bc7(%rip), %r15      # 0x305f
movl %ebx, %edi
leaq -0x38(%rbp), %rsi
pushq $0x1
popq %rdx
movl $0x3e8, %ecx            # imm = 0x3E8
callq 0x1080
movq %r12, %rdi
callq 0x1926
movq 0x4b1e(%rip), %rdi      # 0x5fd8
movq %r14, %rsi
callq 0x10f0
movq %rax, %r13
movq %r12, %rdi
callq 0x19d0
movq %r13, %rdi
movl %eax, %esi
callq 0x11a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x10f0
movq %rax, %r13
movq %r12, %rdi
callq 0x19da
movq %r13, %rdi
movl %eax, %esi
callq 0x11a0
movq %rax, %rdi
callq 0x1090
jmp 0x1498
jmp 0x1503
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x1664
leaq -0xc0(%rbp), %rdi
callq 0x154e
movq %rbx, %rdi
callq 0x11b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/lolonet[P]Timer/Timer.cpp
// Function: TimerContraller::DeleteTimer(TimerObject*)
int TimerContraller::DeleteTimer(TimerObject *pTimerObj)
{
	const int64 timeout = TimerContraller::TransToTimeStamp(pTimerObj->GetTimeOut());
	map<int64, list<TimerObject*> >::iterator itList = m_SameTimerList.find(timeout);
	if (itList == m_SameTimerList.end())
		return 0;

	list<TimerObject*> &timeList = m_SameTimerList[timeout];
	list<TimerObject*>::iterator it = std::find(timeList.begin(), timeList.end(), pTimerObj);
	if (it != timeList.end())
		timeList.erase(it);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, -0x18(%rbp)
movl 0x4(%rsi), %edi
callq 0x1a3e
leaq -0x10(%rbp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x2424
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x1784
leaq -0x10(%rbp), %rsi
movq %rbx, %rdi
callq 0x1a80
movq %rax, %rbx
movq (%rax), %rdi
leaq -0x18(%rbp), %rdx
movq %rax, %rsi
callq 0x2459
cmpq %rbx, %rax
je 0x1784
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1ae2
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lolonet[P]Timer/Timer.cpp
// Function: TimerObject::StartTimer(int, int (*)(int))
int TimerObject::StartTimer(int timeout, TimerCallback *func)
{
	if (func == NULL || m_pTimer == NULL || m_pTimer->m_pTimeContraller == NULL)
		return -1;

	this->m_timeout = timeout;
	this->m_func = func;
	// 向 timeout epoll 注册定时器， 将this 添加到全局最小堆结构
	m_pTimer->m_pTimeContraller->RegisterTimer(this);
	return 0;
}

// Assembly:
pushq $-0x1
popq %rax
testq %rdx, %rdx
je 0x17c1
movq %rdi, %rcx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x17c1
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x17c1
pushq %rbp
movq %rsp, %rbp
movl %esi, 0x4(%rcx)
movq %rdx, 0x8(%rcx)
movq %rcx, %rsi
callq 0x17c2
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lolonet[P]Timer/Timer.cpp
// Function: TimerContraller::RegisterTimer(TimerObject*)
int TimerContraller::RegisterTimer(TimerObject *pTimerObj)
{
	if (pTimerObj == NULL)
		return -1;

	const int64 timeout = TimerContraller::TransToTimeStamp(pTimerObj->GetTimeOut());
	m_TimerQueue.push(timeout);
	m_SameTimerList[timeout].push_back(pTimerObj);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, -0x18(%rbp)
testq %rsi, %rsi
je 0x180f
movq %rdi, %rbx
movl 0x4(%rsi), %edi
callq 0x1a3e
leaq -0x20(%rbp), %r14
movq %rax, (%r14)
leaq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x1a60
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a80
leaq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x1ad2
xorl %eax, %eax
jmp 0x1812
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lolonet[P]Timer/Timer.cpp
// Function: Timer::StopTimer(int)
int Timer::StopTimer(int timeid)
{
	map<int, TimerObject*>::iterator it = m_timerMap.find(timeid);
	if (it != m_timerMap.end())
		m_timerMap.erase(it);
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0xc(%rbp), %rax
movl %esi, (%rax)
movq %rax, %rsi
callq 0x1b6a
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x1869
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1e4a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lolonet[P]Timer/Timer.cpp
// Function: Timer::GetTimerObj(int)
TimerObject* Timer::GetTimerObj(int timeid)
{
	map<int, TimerObject*>::iterator itObj = m_timerMap.find(timeid);
	if (itObj != m_timerMap.end() && itObj->second != NULL)
		return itObj->second;

	TimerObject *pTimeObj = new TimerObject(this, timeid);
	m_timerMap[timeid] = pTimeObj;
	return pTimeObj;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x14(%rbp), %rax
movl %esi, (%rax)
movq %rax, %rsi
callq 0x1b6a
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x18b2
movq 0x28(%rax), %r14
testq %r14, %r14
jne 0x18d5
pushq $0x18
popq %rdi
callq 0x1100
movq %rax, %r14
leaq -0x14(%rbp), %rsi
movl (%rsi), %eax
movl %eax, (%r14)
movq %rbx, 0x10(%r14)
movq %rbx, %rdi
callq 0x19ec
movq %r14, (%rax)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lolonet[P]Timer/Timer.cpp
// Function: Timer::StartTimer(int, int, int (*)(int))
int Timer::StartTimer(int timeid, int timeout, TimerCallback *func)
{
	if (func == NULL)
		return -1;

	TimerObject *pTimeObj = this->GetTimerObj(timeid);
	pTimeObj->StopTimer();
	pTimeObj->StartTimer(timeout, func);
	return 0;
}

// Assembly:
testq %rcx, %rcx
je 0x1922
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %r14d
callq 0x1884
movq %rax, %r15
movq %rax, %rdi
callq 0x1700
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x178e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %rax
retq