// File: tlaloc1313[P]chess-project/Board.cpp
// Function: Board::Board(Piece**, bool*, std::vector<char, std::allocator<char>>, std::vector<int, std::allocator<int>>)
Board::Board (Piece** pieceArr, bool activeArr[64], std::vector<char> pstPcs, std::vector<int> pstMvs){
	for (int i = 0; i < 64; i++) {
		activeArray[i] = 0;
		if (activeArr[i]) {
			addPiece(pieceArr[i]->getType(), i, pieceArr[i]->getIsWhite());
		}
	}
	for (unsigned i = 0; i < pstPcs.size(); i++) {
		pastPieces.push_back(pstPcs.at(i));
	}
	for (unsigned i = 0; i < pstMvs.size(); i++) {
		pastMoves.push_back(pstMvs.at(i));
	}
	moveNumber = 0;
  movesSince = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rcx, -0x70(%rbp)
movq %r8, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
leaq 0xa23a(%rip), %rax      # 0xeb50
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x248, %rdi            # imm = 0x248
movq %rdi, -0x60(%rbp)
callq 0x6a50
movq -0x58(%rbp), %rdi
addq $0x260, %rdi            # imm = 0x260
movq %rdi, -0x50(%rbp)
callq 0x6a70
movl $0x0, -0x2c(%rbp)
cmpl $0x40, -0x2c(%rbp)
jge 0x49f3
movq -0x58(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb $0x0, 0x208(%rax,%rcx)
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
testb $0x1, (%rax,%rcx)
je 0x49e3
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x9880
movb %al, -0x71(%rbp)
jmp 0x4986
movslq -0x2c(%rbp), %rcx
movl %ecx, %eax
movl %eax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq (%rax,%rcx,8), %rdi
callq 0x98a0
movb %al, -0x72(%rbp)
jmp 0x49a1
movl -0x78(%rbp), %edx
movq -0x58(%rbp), %rdi
movb -0x71(%rbp), %al
movb -0x72(%rbp), %cl
movzbl %cl, %ecx
andl $0x1, %ecx
movsbl %al, %esi
callq 0x4b00
jmp 0x49be
jmp 0x49e3
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x2d60
movq -0x60(%rbp), %rdi
callq 0x2dc0
jmp 0x4af4
jmp 0x49e5
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4948
movl $0x0, -0x40(%rbp)
movq -0x70(%rbp), %rdi
movl -0x40(%rbp), %eax
movq %rax, -0x80(%rbp)
callq 0x6a90
movq %rax, %rcx
movq -0x80(%rbp), %rax
cmpq %rcx, %rax
jae 0x4a60
movq -0x70(%rbp), %rdi
movq -0x58(%rbp), %rax
addq $0x248, %rax            # imm = 0x248
movq %rax, -0x90(%rbp)
movl -0x40(%rbp), %eax
movl %eax, %esi
callq 0x6b20
movq %rax, -0x88(%rbp)
jmp 0x4a3e
movq -0x88(%rbp), %rsi
movq -0x90(%rbp), %rdi
callq 0x6ab0
jmp 0x4a53
jmp 0x4a55
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x49fa
movl $0x0, -0x44(%rbp)
movq -0x68(%rbp), %rdi
movl -0x44(%rbp), %eax
movq %rax, -0x98(%rbp)
callq 0x6b60
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
jae 0x4ad3
movq -0x68(%rbp), %rdi
movq -0x58(%rbp), %rax
addq $0x260, %rax            # imm = 0x260
movq %rax, -0xa8(%rbp)
movl -0x44(%rbp), %eax
movl %eax, %esi
callq 0x6bf0
movq %rax, -0xa0(%rbp)
jmp 0x4ab1
movq -0xa0(%rbp), %rsi
movq -0xa8(%rbp), %rdi
callq 0x6b80
jmp 0x4ac6
jmp 0x4ac8
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x4a67
movq -0x58(%rbp), %rax
movl $0x0, 0x278(%rax)
movl $0x0, 0x27c(%rax)
addq $0xb0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2270
nopl (%rax)