// File: XxAdi101xX[P]ChamberCrawler/Cell/Cell.cc
// Function: Cell::addNeighbour(std::shared_ptr<Cell>)
void Cell::addNeighbour(std::shared_ptr<Cell> neighbour) {
	std::vector<int> coords = neighbour->getCoords();
	if (coords[0] < coordinates[0] && coords[1] < coordinates[1]) {
		neighbours[1] = neighbour;
	}
	else if (coords[0] < coordinates[0] && coords[1] > coordinates[1]) {
		neighbours[7] = neighbour;
	}
	else if (coords[0] < coordinates[0]) {
		neighbours[0] = neighbour;
	}
	else if (coords[0] > coordinates[0] && coords[1] < coordinates[1]) {
		neighbours[3] = neighbour;
	}
	else if (coords[0] > coordinates[0] && coords[1] > coordinates[1]) {
		neighbours[5] = neighbour;
	}
	else if (coords[0] > coordinates[0]) {
		neighbours[4] = neighbour;
	}
	else if (coords[1] > coordinates[1]) {
		neighbours[6] = neighbour;
	}
	else {
		neighbours[2] = neighbour;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rsi, -0x48(%rbp)
movq %rdi, %rax
movq -0x48(%rbp), %rdi
movq %rdi, -0x40(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x19df0
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x2cbb0
leaq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19850
movq -0x38(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19850
movq %rax, %rcx
movl -0x2c(%rbp), %eax
cmpl (%rcx), %eax
jge 0x2c907
leaq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x19850
movq -0x38(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
addq $0x28, %rdi
movl $0x1, %esi
callq 0x19850
movq %rax, %rcx
movl -0x4c(%rbp), %eax
cmpl (%rcx), %eax
jge 0x2c907
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
movl $0x1, %esi
callq 0x2da40
movq -0x40(%rbp), %rsi
movq %rax, %rdi
callq 0x19f50
jmp 0x2cb99
leaq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19850
movq -0x38(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x50(%rbp)
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19850
movq %rax, %rcx
movl -0x50(%rbp), %eax
cmpl (%rcx), %eax
jge 0x2c986
leaq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x19850
movq -0x38(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x54(%rbp)
addq $0x28, %rdi
movl $0x1, %esi
callq 0x19850
movq %rax, %rcx
movl -0x54(%rbp), %eax
cmpl (%rcx), %eax
jle 0x2c986
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
movl $0x7, %esi
callq 0x2da40
movq -0x40(%rbp), %rsi
movq %rax, %rdi
callq 0x19f50
jmp 0x2cb97
leaq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19850
movq -0x38(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x58(%rbp)
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19850
movq %rax, %rcx
movl -0x58(%rbp), %eax
cmpl (%rcx), %eax
jge 0x2c9d5
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2da40
movq -0x40(%rbp), %rsi
movq %rax, %rdi
callq 0x19f50
jmp 0x2cb95
leaq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19850
movq -0x38(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19850
movq %rax, %rcx
movl -0x5c(%rbp), %eax
cmpl (%rcx), %eax
jle 0x2ca54
leaq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x19850
movq -0x38(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x60(%rbp)
addq $0x28, %rdi
movl $0x1, %esi
callq 0x19850
movq %rax, %rcx
movl -0x60(%rbp), %eax
cmpl (%rcx), %eax
jge 0x2ca54
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
movl $0x3, %esi
callq 0x2da40
movq -0x40(%rbp), %rsi
movq %rax, %rdi
callq 0x19f50
jmp 0x2cb93
leaq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19850
movq -0x38(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x64(%rbp)
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19850
movq %rax, %rcx
movl -0x64(%rbp), %eax
cmpl (%rcx), %eax
jle 0x2cad3
leaq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x19850
movq -0x38(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x68(%rbp)
addq $0x28, %rdi
movl $0x1, %esi
callq 0x19850
movq %rax, %rcx
movl -0x68(%rbp), %eax
cmpl (%rcx), %eax
jle 0x2cad3
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
movl $0x5, %esi
callq 0x2da40
movq -0x40(%rbp), %rsi
movq %rax, %rdi
callq 0x19f50
jmp 0x2cb91
leaq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19850
movq -0x38(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19850
movq %rax, %rcx
movl -0x6c(%rbp), %eax
cmpl (%rcx), %eax
jle 0x2cb20
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
movl $0x4, %esi
callq 0x2da40
movq -0x40(%rbp), %rsi
movq %rax, %rdi
callq 0x19f50
jmp 0x2cb8f
leaq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x19850
movq -0x38(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x70(%rbp)
addq $0x28, %rdi
movl $0x1, %esi
callq 0x19850
movq %rax, %rcx
movl -0x70(%rbp), %eax
cmpl (%rcx), %eax
jle 0x2cb6f
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
movl $0x6, %esi
callq 0x2da40
movq -0x40(%rbp), %rsi
movq %rax, %rdi
callq 0x19f50
jmp 0x2cb8d
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
movl $0x2, %esi
callq 0x2da40
movq -0x40(%rbp), %rsi
movq %rax, %rdi
callq 0x19f50
jmp 0x2cb8f
jmp 0x2cb91
jmp 0x2cb93
jmp 0x2cb95
jmp 0x2cb97
jmp 0x2cb99
leaq -0x28(%rbp), %rdi
callq 0x19640
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)