// File: /workspace/github_cpp_makefile_star2_O3/Naomi1745698[P]BigPrac/test.cpp
// Function: test::mapTesting()
void test::mapTesting(){
	space spaceMap(15, playerShip);
	//Starting positon.
	playerShip->setCoordinate(0,0);
	std::cout << "Starting location" << std::endl;
	std::cout << "Row coordinate " << playerShip->getRowCoordinate() << std::endl;
	std::cout << "Col coordinate " << playerShip->getColumnCoordinate() << std::endl << std::endl;
	int initalRow = playerShip->getRowCoordinate();	//Set reference point to determine direction 
	int initalColumn = playerShip->getColumnCoordinate();
	PASS = 0;
 	for(int i = 0; i<4;i++){		//Go into a direction of sqaure to test all movements.
		switch (i) {
			case 0: 
				spaceMap.moveUp();
				std::cout << "MoveUp" << std::endl;
				std::cout << "Row coordinate " << playerShip->getRowCoordinate() << std::endl;
				std::cout << "Col coordinate " << playerShip->getColumnCoordinate() << std::endl << std::endl;
				if(initalColumn+1 == playerShip->getRowCoordinate()){
					PASS++;
				}else{ 	
					std::cout << "ERROR moveUp" << std::endl;
					PASS--;
				}
				break;
			case 3: 
				spaceMap.moveLeft();
				std::cout << "Moveleft" << std::endl;
				std::cout << "Row coordinate " << playerShip->getRowCoordinate() << std::endl;
				std::cout << "Col coordinate " << playerShip->getColumnCoordinate() << std::endl << std::endl;
				if(initalRow == playerShip->getRowCoordinate()){
					PASS++;
				}else{
					std::cout << "ERROR moveLeft" << std::endl;
					PASS--;
				}
				break;
			case 1: 
				spaceMap.moveRight();
				std::cout << "MoveRight" << std::endl;
				std::cout << "Row coordinate " << playerShip->getRowCoordinate() << std::endl;
				std::cout << "Col coordinate " << playerShip->getColumnCoordinate() << std::endl << std::endl;
				if(initalRow+1 == playerShip->getRowCoordinate()){
					PASS++;
				}else{
					std::cout << "ERROR moveRight" << std::endl;
					PASS--;
				}
				break;
			case 2: 
				spaceMap.moveDown();
				std::cout << "MoveDown" << std::endl;
				std::cout << "Row coordinate " << playerShip->getRowCoordinate() << std::endl;
				std::cout << "Col coordinate " << playerShip->getColumnCoordinate() << std::endl << std::endl;
				if(initalColumn == playerShip->getRowCoordinate()){
					PASS++;
				}else{
					std::cout << "ERROR moveDown" << std::endl;
					PASS--;
				}
				break;
			default:

				break;
		}
};

	if(PASS == 4){
		std::cout << "<------------------MOVEMENT CONDITIONS PASSED--------------->" << std::endl;
	};
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %rdx
leaq 0x8(%rsp), %rdi
movl $0xf, %esi
callq 0x3974
movq 0x20(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3028
movq 0x67f4(%rip), %r14      # 0xcfd8
leaq 0x305e(%rip), %rsi      # 0x9849
movl $0x11, %edx
movq %r14, %rdi
callq 0x21e0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq 0x67c2(%rip), %rdi      # 0xcfd8
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x67ae(%rip), %rdi      # 0xcfd8
leaq 0x302a(%rip), %rsi      # 0x985b
movl $0xf, %edx
callq 0x21e0
movq 0x20(%rbx), %rdi
callq 0x304e
movq 0x678d(%rip), %rdi      # 0xcfd8
movl %eax, %esi
callq 0x2290
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r14, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x6755(%rip), %rdi      # 0xcfd8
leaq 0x2fe1(%rip), %rsi      # 0x986b
movl $0xf, %edx
callq 0x21e0
movq 0x20(%rbx), %rdi
callq 0x3060
movq 0x6734(%rip), %rdi      # 0xcfd8
movl %eax, %esi
callq 0x2290
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r14, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r14, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x20(%rbx), %rdi
callq 0x304e
movl %eax, %r14d
movq 0x20(%rbx), %rdi
callq 0x3060
movl %eax, %r15d
movl $0x0, 0x74(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x50be
movq 0x66a9(%rip), %r12      # 0xcfd8
leaq 0x2f45(%rip), %rsi      # 0x987b
movl $0x6, %edx
movq %r12, %rdi
callq 0x21e0
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq 0x6676(%rip), %rdi      # 0xcfd8
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x6662(%rip), %rdi      # 0xcfd8
leaq 0x2ede(%rip), %rsi      # 0x985b
movl $0xf, %edx
callq 0x21e0
movq 0x20(%rbx), %rdi
callq 0x304e
movq 0x6641(%rip), %rdi      # 0xcfd8
movl %eax, %esi
callq 0x2290
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r12, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x6609(%rip), %rdi      # 0xcfd8
leaq 0x2e95(%rip), %rsi      # 0x986b
movl $0xf, %edx
callq 0x21e0
movq 0x20(%rbx), %rdi
callq 0x3060
movq 0x65e8(%rip), %rdi      # 0xcfd8
movl %eax, %esi
callq 0x2290
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r12, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r12, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x20(%rbx), %rdi
callq 0x304e
leal 0x1(%r15), %ecx
movl $0x1, %ebp
cmpl %eax, %ecx
je 0x6aad
movq 0x6570(%rip), %r12      # 0xcfd8
leaq 0x2e13(%rip), %rsi      # 0x9882
movl $0xc, %edx
movq %r12, %rdi
callq 0x21e0
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq 0x653d(%rip), %rdi      # 0xcfd8
callq 0x2050
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x20d0
addl %ebp, 0x74(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5576
movq 0x6517(%rip), %r12      # 0xcfd8
leaq 0x2ddf(%rip), %rsi      # 0x98a7
movl $0x9, %edx
movq %r12, %rdi
callq 0x21e0
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq 0x64e4(%rip), %rdi      # 0xcfd8
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x64d0(%rip), %rdi      # 0xcfd8
leaq 0x2d4c(%rip), %rsi      # 0x985b
movl $0xf, %edx
callq 0x21e0
movq 0x20(%rbx), %rdi
callq 0x304e
movq 0x64af(%rip), %rdi      # 0xcfd8
movl %eax, %esi
callq 0x2290
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r12, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x6477(%rip), %rdi      # 0xcfd8
leaq 0x2d03(%rip), %rsi      # 0x986b
movl $0xf, %edx
callq 0x21e0
movq 0x20(%rbx), %rdi
callq 0x3060
movq 0x6456(%rip), %rdi      # 0xcfd8
movl %eax, %esi
callq 0x2290
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r12, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r12, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x20(%rbx), %rdi
callq 0x304e
leal 0x1(%r14), %ecx
movl $0x1, %ebp
cmpl %eax, %ecx
je 0x6c3f
movq 0x63de(%rip), %r12      # 0xcfd8
leaq 0x2cb0(%rip), %rsi      # 0x98b1
movl $0xf, %edx
movq %r12, %rdi
callq 0x21e0
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq 0x63ab(%rip), %rdi      # 0xcfd8
callq 0x2050
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x20d0
addl %ebp, 0x74(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5256
movq 0x6385(%rip), %r12      # 0xcfd8
leaq 0x2c67(%rip), %rsi      # 0x98c1
movl $0x8, %edx
movq %r12, %rdi
callq 0x21e0
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq 0x6352(%rip), %rdi      # 0xcfd8
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x633e(%rip), %rdi      # 0xcfd8
leaq 0x2bba(%rip), %rsi      # 0x985b
movl $0xf, %edx
callq 0x21e0
movq 0x20(%rbx), %rdi
callq 0x304e
movq 0x631d(%rip), %rdi      # 0xcfd8
movl %eax, %esi
callq 0x2290
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r12, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x62e5(%rip), %rdi      # 0xcfd8
leaq 0x2b71(%rip), %rsi      # 0x986b
movl $0xf, %edx
callq 0x21e0
movq 0x20(%rbx), %rdi
callq 0x3060
movq 0x62c4(%rip), %rdi      # 0xcfd8
movl %eax, %esi
callq 0x2290
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r12, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r12, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x20(%rbx), %rdi
callq 0x304e
movl $0x1, %ebp
cmpl %eax, %r15d
je 0x6dcd
movq 0x624f(%rip), %r15      # 0xcfd8
leaq 0x2b3a(%rip), %rsi      # 0x98ca
movl $0xe, %edx
movq %r15, %rdi
callq 0x21e0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq 0x621d(%rip), %rdi      # 0xcfd8
callq 0x2050
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x20d0
addl %ebp, 0x74(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x53e6
movq 0x61f7(%rip), %r15      # 0xcfd8
leaq 0x2aa7(%rip), %rsi      # 0x988f
movl $0x8, %edx
movq %r15, %rdi
callq 0x21e0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq 0x61c5(%rip), %rdi      # 0xcfd8
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x61b1(%rip), %rdi      # 0xcfd8
leaq 0x2a2d(%rip), %rsi      # 0x985b
movl $0xf, %edx
callq 0x21e0
movq 0x20(%rbx), %rdi
callq 0x304e
movq 0x6190(%rip), %rdi      # 0xcfd8
movl %eax, %esi
callq 0x2290
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r15, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x6158(%rip), %rdi      # 0xcfd8
leaq 0x29e4(%rip), %rsi      # 0x986b
movl $0xf, %edx
callq 0x21e0
movq 0x20(%rbx), %rdi
callq 0x3060
movq 0x6137(%rip), %rdi      # 0xcfd8
movl %eax, %esi
callq 0x2290
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r15, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r15, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x20d0
movq 0x20(%rbx), %rdi
callq 0x304e
movl $0x1, %ebp
cmpl %eax, %r14d
je 0x6f5a
movq 0x60c2(%rip), %r14      # 0xcfd8
leaq 0x297b(%rip), %rsi      # 0x9898
movl $0xe, %edx
movq %r14, %rdi
callq 0x21e0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq 0x6090(%rip), %rdi      # 0xcfd8
callq 0x2050
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rax, %rdi
callq 0x20d0
addl 0x74(%rbx), %ebp
movl %ebp, 0x74(%rbx)
cmpl $0x4, %ebp
jne 0x6fab
movq 0x606c(%rip), %rbx      # 0xcfd8
leaq 0x2966(%rip), %rsi      # 0x98d9
movl $0x3d, %edx
movq %rbx, %rdi
callq 0x21e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq 0x603a(%rip), %rdi      # 0xcfd8
callq 0x2050
movq %rax, %rdi
callq 0x20d0
leaq 0x8(%rsp), %rdi
callq 0x643c
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6fc8
jmp 0x6fc8
jmp 0x6fc8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x643c
movq %rbx, %rdi
callq 0x22a0
nop