	.file	"914057.c"
	.intel_syntax noprefix
	.text
	.globl	checkifinarray
	.type	checkifinarray, @function
checkifinarray:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	BYTE PTR -20[rbp], al
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L5:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -20[rbp], al
	jne	.L3
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L4
.L3:
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L5
	mov	eax, -1
.L4:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	checkifinarray, .-checkifinarray
	.globl	max
	.type	max, @function
max:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	eax, DWORD PTR -4[rbp]
	cmp	DWORD PTR -8[rbp], eax
	cmovge	eax, DWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	eax, DWORD PTR -8[rbp]
	cmp	DWORD PTR -4[rbp], eax
	cmovle	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	min, .-min
	.globl	sgn
	.type	sgn, @function
sgn:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], 0
	js	.L11
	mov	eax, 1
	jmp	.L13
.L11:
	mov	eax, -1
.L13:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	sgn, .-sgn
	.globl	abv
	.type	abv, @function
abv:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -4[rbp]
	sub	eax, edx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	abv, .-abv
	.globl	clrscr
	.type	clrscr, @function
clrscr:
.LFB5:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], 0
	jmp	.L17
.L18:
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -4[rbp], 1
.L17:
	cmp	DWORD PTR -4[rbp], 39
	jle	.L18
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	clrscr, .-clrscr
	.globl	board
	.data
	.align 32
	.type	board, @object
	.size	board, 64
board:
	.ascii	"rnbqkbnr"
	.ascii	"pppppppp"
	.ascii	"        "
	.ascii	"        "
	.ascii	"        "
	.ascii	"        "
	.ascii	"PPPPPPPP"
	.ascii	"RNBQKBNR"
	.section	.rodata
	.align 8
.LC0:
	.string	"\n============================================================================================================="
	.align 8
.LC1:
	.string	"||        _______   ______   ____     __    __   _   _     _     __     _                                  ||"
	.align 8
.LC2:
	.string	"||       |__   __| | _____| |  _ \\   |  \\  /  | [_] | \\   | |   /  \\   | |             ___/\\               ||"
	.align 8
.LC3:
	.string	"||          | |    | |___   | |_/ /  |   \\/   | | | |   \\ | |  / /\\ \\  | |            /   ^/\\              ||"
	.align 8
.LC4:
	.string	"||          | |    |  ___|  |    /   | |\\  /| | | | | |\\ \\| | | |__| | | |           /     /|\\             ||"
	.align 8
.LC5:
	.string	"||          | |    | |____  | |\\ \\   | | \\/ | | | | | | \\   | |  __  | | |___       /  o    /|\\            ||"
	.align 8
.LC6:
	.string	"||          |_|    |______| |_| \\_\\  |_|    |_| |_| |_|   \\_| |_|  |_| |_____|     /         /|\\           ||"
	.align 8
.LC7:
	.string	"||                                                                                /    __/    /|\\          ||"
	.align 8
.LC8:
	.string	"||        _________    _____    _____  ____________       _____         _____    |    /\\       /|          ||"
	.align 8
.LC9:
	.string	"||       /         \\   \\   /    \\   /  \\          /      /     \\       /     \\    \\_//  \\        \\         ||"
	.align 8
.LC10:
	.string	"||      /   ______  |  |   |    |   |  |  _______/      /   /\\__\\     /   /\\__\\         /        |         ||"
	.align 8
.LC11:
	.string	"||     /   /      \\_|  |   |    |   |  |  |            /   /         /   /            _/         \\         ||"
	.align 8
.LC12:
	.string	"||     |   |           |   |____|   |  |  |______      \\   \\____     \\   \\____       /            \\        ||"
	.align 8
.LC13:
	.string	"||     |   |           |            |  |        /       \\____   \\     \\____   \\     /              \\       ||"
	.align 8
.LC14:
	.string	"||     |   |           |   ______   |  |  _____/             \\   \\         \\   \\    \\_____    _____/       ||"
	.align 8
.LC15:
	.string	"||     |   |       _   |   |    |   |  |  |           ____   /   /  ____   /   /         /    \\            ||"
	.align 8
.LC16:
	.string	"||     \\   \\______/ |  |   |    |   |  |  |_______    |   \\_/   /   |   \\_/   /          \\    /            ||"
	.align 8
.LC17:
	.string	"||      \\           |  |   |    |   |  |          \\    \\       /     \\       /        __//    \\\\__         ||"
	.align 8
.LC18:
	.string	"||       \\_________/   /___\\    /___\\  /___________\\    \\____ /       \\____ /        /            \\        ||"
	.align 8
.LC19:
	.string	"||                                                                                  [==__________==]       ||"
	.align 8
.LC20:
	.string	"||                                                                                                         ||"
	.align 8
.LC21:
	.string	"||                                                                                 @ Tobiasz Fic 2021      ||"
	.align 8
.LC22:
	.string	"=============================================================================================================\n"
	.text
	.globl	printlogo
	.type	printlogo, @function
printlogo:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	call	clrscr
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	lea	rdi, .LC12[rip]
	call	puts@PLT
	lea	rdi, .LC13[rip]
	call	puts@PLT
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdi, .LC15[rip]
	call	puts@PLT
	lea	rdi, .LC16[rip]
	call	puts@PLT
	lea	rdi, .LC17[rip]
	call	puts@PLT
	lea	rdi, .LC18[rip]
	call	puts@PLT
	lea	rdi, .LC19[rip]
	call	puts@PLT
	lea	rdi, .LC20[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	puts@PLT
	lea	rdi, .LC22[rip]
	call	puts@PLT
	mov	DWORD PTR -4[rbp], 1
	jmp	.L20
.L21:
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -4[rbp], 1
.L20:
	cmp	DWORD PTR -4[rbp], 4
	jle	.L21
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	printlogo, .-printlogo
	.section	.rodata
	.align 8
.LC23:
	.string	"\n\t__________________________________________________________________________________"
	.align 8
.LC24:
	.string	"\t|   |                                                                        |   |"
	.align 8
.LC25:
	.string	"\t|   ||   A   ||   B   ||   C   ||   D   ||   E   ||   F   ||   G   ||   H   ||   |"
	.align 8
.LC26:
	.string	"\t|___|________________________________________________________________________|___|"
	.align 8
.LC27:
	.string	"\t|   |         XXXXXXXXX         XXXXXXXXX         XXXXXXXXX         XXXXXXXXX|   |"
	.align 8
.LC28:
	.string	"\t|   |         X       X         X       X         X       X         X       X|   |"
	.align 8
.LC29:
	.string	"\t| 8 |    %c    X   %c   X    %c    X   %c   X    %c    X   %c   X    %c    X   %c   X| 8 |\n"
	.align 8
.LC30:
	.string	"\t|___|         XXXXXXXXX         XXXXXXXXX         XXXXXXXXX         XXXXXXXXX|___|"
	.align 8
.LC31:
	.string	"\t|   |XXXXXXXXX         XXXXXXXXX         XXXXXXXXX         XXXXXXXXX         |   |"
	.align 8
.LC32:
	.string	"\t|   |X       X         X       X         X       X         X       X         |   |"
	.align 8
.LC33:
	.string	"\t| 7 |X   %c   X    %c    X   %c   X    %c    X   %c   X    %c    X   %c   X    %c    | 7 |\n"
	.align 8
.LC34:
	.string	"\t|___|XXXXXXXXX         XXXXXXXXX         XXXXXXXXX         XXXXXXXXX         |___|"
	.align 8
.LC35:
	.string	"\t| 6 |    %c    X   %c   X    %c    X   %c   X    %c    X   %c   X    %c    X   %c   X| 6 |\n"
	.align 8
.LC36:
	.string	"\t| 5 |X   %c   X    %c    X   %c   X    %c    X   %c   X    %c    X   %c   X    %c    | 5 |\n"
	.align 8
.LC37:
	.string	"\t| 4 |    %c    X   %c   X    %c    X   %c   X    %c    X   %c   X    %c    X   %c   X| 4 |\n"
	.align 8
.LC38:
	.string	"\t| 3 |X   %c   X    %c    X   %c   X    %c    X   %c   X    %c    X   %c   X    %c    | 3 |\n"
	.align 8
.LC39:
	.string	"\t| 2 |    %c    X   %c   X    %c    X   %c   X    %c    X   %c   X    %c    X   %c   X| 2 |\n"
	.align 8
.LC40:
	.string	"\t| 1 |X   %c   X    %c    X   %c   X    %c    X   %c   X    %c    X   %c   X    %c    | 1 |\n"
	.align 8
.LC41:
	.string	"\t|___|XXXXXXXXX_________XXXXXXXXX_________XXXXXXXXX_________XXXXXXXXX_________|___|"
	.text
	.globl	printboard
	.type	printboard, @function
printboard:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	clrscr
	lea	rdi, .LC23[rip]
	call	puts@PLT
	lea	rdi, .LC24[rip]
	call	puts@PLT
	lea	rdi, .LC25[rip]
	call	puts@PLT
	lea	rdi, .LC26[rip]
	call	puts@PLT
	lea	rdi, .LC27[rip]
	call	puts@PLT
	lea	rdi, .LC28[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR board[rip+7]
	movsx	r8d, al
	movzx	eax, BYTE PTR board[rip+6]
	movsx	edi, al
	movzx	eax, BYTE PTR board[rip+5]
	movsx	esi, al
	movzx	eax, BYTE PTR board[rip+4]
	movsx	r9d, al
	movzx	eax, BYTE PTR board[rip+3]
	movsx	r10d, al
	movzx	eax, BYTE PTR board[rip+2]
	movsx	ecx, al
	movzx	eax, BYTE PTR board[rip+1]
	movsx	edx, al
	movzx	eax, BYTE PTR board[rip]
	movsx	eax, al
	sub	rsp, 8
	push	r8
	push	rdi
	push	rsi
	mov	r8d, r10d
	mov	esi, eax
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 32
	lea	rdi, .LC28[rip]
	call	puts@PLT
	lea	rdi, .LC30[rip]
	call	puts@PLT
	lea	rdi, .LC31[rip]
	call	puts@PLT
	lea	rdi, .LC32[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR board[rip+15]
	movsx	r8d, al
	movzx	eax, BYTE PTR board[rip+14]
	movsx	edi, al
	movzx	eax, BYTE PTR board[rip+13]
	movsx	esi, al
	movzx	eax, BYTE PTR board[rip+12]
	movsx	r9d, al
	movzx	eax, BYTE PTR board[rip+11]
	movsx	r10d, al
	movzx	eax, BYTE PTR board[rip+10]
	movsx	ecx, al
	movzx	eax, BYTE PTR board[rip+9]
	movsx	edx, al
	movzx	eax, BYTE PTR board[rip+8]
	movsx	eax, al
	sub	rsp, 8
	push	r8
	push	rdi
	push	rsi
	mov	r8d, r10d
	mov	esi, eax
	lea	rdi, .LC33[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 32
	lea	rdi, .LC32[rip]
	call	puts@PLT
	lea	rdi, .LC34[rip]
	call	puts@PLT
	lea	rdi, .LC27[rip]
	call	puts@PLT
	lea	rdi, .LC28[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR board[rip+23]
	movsx	r8d, al
	movzx	eax, BYTE PTR board[rip+22]
	movsx	edi, al
	movzx	eax, BYTE PTR board[rip+21]
	movsx	esi, al
	movzx	eax, BYTE PTR board[rip+20]
	movsx	r9d, al
	movzx	eax, BYTE PTR board[rip+19]
	movsx	r10d, al
	movzx	eax, BYTE PTR board[rip+18]
	movsx	ecx, al
	movzx	eax, BYTE PTR board[rip+17]
	movsx	edx, al
	movzx	eax, BYTE PTR board[rip+16]
	movsx	eax, al
	sub	rsp, 8
	push	r8
	push	rdi
	push	rsi
	mov	r8d, r10d
	mov	esi, eax
	lea	rdi, .LC35[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 32
	lea	rdi, .LC28[rip]
	call	puts@PLT
	lea	rdi, .LC30[rip]
	call	puts@PLT
	lea	rdi, .LC31[rip]
	call	puts@PLT
	lea	rdi, .LC32[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR board[rip+31]
	movsx	r8d, al
	movzx	eax, BYTE PTR board[rip+30]
	movsx	edi, al
	movzx	eax, BYTE PTR board[rip+29]
	movsx	esi, al
	movzx	eax, BYTE PTR board[rip+28]
	movsx	r9d, al
	movzx	eax, BYTE PTR board[rip+27]
	movsx	r10d, al
	movzx	eax, BYTE PTR board[rip+26]
	movsx	ecx, al
	movzx	eax, BYTE PTR board[rip+25]
	movsx	edx, al
	movzx	eax, BYTE PTR board[rip+24]
	movsx	eax, al
	sub	rsp, 8
	push	r8
	push	rdi
	push	rsi
	mov	r8d, r10d
	mov	esi, eax
	lea	rdi, .LC36[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 32
	lea	rdi, .LC32[rip]
	call	puts@PLT
	lea	rdi, .LC34[rip]
	call	puts@PLT
	lea	rdi, .LC27[rip]
	call	puts@PLT
	lea	rdi, .LC28[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR board[rip+39]
	movsx	r8d, al
	movzx	eax, BYTE PTR board[rip+38]
	movsx	edi, al
	movzx	eax, BYTE PTR board[rip+37]
	movsx	esi, al
	movzx	eax, BYTE PTR board[rip+36]
	movsx	r9d, al
	movzx	eax, BYTE PTR board[rip+35]
	movsx	r10d, al
	movzx	eax, BYTE PTR board[rip+34]
	movsx	ecx, al
	movzx	eax, BYTE PTR board[rip+33]
	movsx	edx, al
	movzx	eax, BYTE PTR board[rip+32]
	movsx	eax, al
	sub	rsp, 8
	push	r8
	push	rdi
	push	rsi
	mov	r8d, r10d
	mov	esi, eax
	lea	rdi, .LC37[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 32
	lea	rdi, .LC28[rip]
	call	puts@PLT
	lea	rdi, .LC30[rip]
	call	puts@PLT
	lea	rdi, .LC31[rip]
	call	puts@PLT
	lea	rdi, .LC32[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR board[rip+47]
	movsx	r8d, al
	movzx	eax, BYTE PTR board[rip+46]
	movsx	edi, al
	movzx	eax, BYTE PTR board[rip+45]
	movsx	esi, al
	movzx	eax, BYTE PTR board[rip+44]
	movsx	r9d, al
	movzx	eax, BYTE PTR board[rip+43]
	movsx	r10d, al
	movzx	eax, BYTE PTR board[rip+42]
	movsx	ecx, al
	movzx	eax, BYTE PTR board[rip+41]
	movsx	edx, al
	movzx	eax, BYTE PTR board[rip+40]
	movsx	eax, al
	sub	rsp, 8
	push	r8
	push	rdi
	push	rsi
	mov	r8d, r10d
	mov	esi, eax
	lea	rdi, .LC38[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 32
	lea	rdi, .LC32[rip]
	call	puts@PLT
	lea	rdi, .LC34[rip]
	call	puts@PLT
	lea	rdi, .LC27[rip]
	call	puts@PLT
	lea	rdi, .LC28[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR board[rip+55]
	movsx	r8d, al
	movzx	eax, BYTE PTR board[rip+54]
	movsx	edi, al
	movzx	eax, BYTE PTR board[rip+53]
	movsx	esi, al
	movzx	eax, BYTE PTR board[rip+52]
	movsx	r9d, al
	movzx	eax, BYTE PTR board[rip+51]
	movsx	r10d, al
	movzx	eax, BYTE PTR board[rip+50]
	movsx	ecx, al
	movzx	eax, BYTE PTR board[rip+49]
	movsx	edx, al
	movzx	eax, BYTE PTR board[rip+48]
	movsx	eax, al
	sub	rsp, 8
	push	r8
	push	rdi
	push	rsi
	mov	r8d, r10d
	mov	esi, eax
	lea	rdi, .LC39[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 32
	lea	rdi, .LC28[rip]
	call	puts@PLT
	lea	rdi, .LC30[rip]
	call	puts@PLT
	lea	rdi, .LC31[rip]
	call	puts@PLT
	lea	rdi, .LC32[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR board[rip+63]
	movsx	r8d, al
	movzx	eax, BYTE PTR board[rip+62]
	movsx	edi, al
	movzx	eax, BYTE PTR board[rip+61]
	movsx	esi, al
	movzx	eax, BYTE PTR board[rip+60]
	movsx	r9d, al
	movzx	eax, BYTE PTR board[rip+59]
	movsx	r10d, al
	movzx	eax, BYTE PTR board[rip+58]
	movsx	ecx, al
	movzx	eax, BYTE PTR board[rip+57]
	movsx	edx, al
	movzx	eax, BYTE PTR board[rip+56]
	movsx	eax, al
	sub	rsp, 8
	push	r8
	push	rdi
	push	rsi
	mov	r8d, r10d
	mov	esi, eax
	lea	rdi, .LC40[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 32
	lea	rdi, .LC32[rip]
	call	puts@PLT
	lea	rdi, .LC41[rip]
	call	puts@PLT
	lea	rdi, .LC24[rip]
	call	puts@PLT
	lea	rdi, .LC25[rip]
	call	puts@PLT
	lea	rdi, .LC26[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	printboard, .-printboard
	.globl	initializeBoard
	.type	initializeBoard, @function
initializeBoard:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 8245636181365255794
	mov	QWORD PTR -80[rbp], rax
	movabs	rax, 8102099357864587376
	mov	QWORD PTR -72[rbp], rax
	movabs	rax, 2314885530818453536
	mov	QWORD PTR -64[rbp], rax
	mov	QWORD PTR -56[rbp], rax
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rax
	movabs	rax, 5787213827046133840
	mov	QWORD PTR -32[rbp], rax
	movabs	rax, 5930750650546802258
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -88[rbp], 0
	jmp	.L24
.L27:
	mov	DWORD PTR -84[rbp], 0
	jmp	.L25
.L26:
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 3
	add	rax, rbp
	add	rax, rdx
	sub	rax, 80
	movzx	eax, BYTE PTR [rax]
	mov	edx, DWORD PTR -84[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -88[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	add	rcx, rdx
	lea	rdx, board[rip]
	add	rdx, rcx
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -84[rbp], 1
.L25:
	cmp	DWORD PTR -84[rbp], 7
	jle	.L26
	add	DWORD PTR -88[rbp], 1
.L24:
	cmp	DWORD PTR -88[rbp], 7
	jle	.L27
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	initializeBoard, .-initializeBoard
	.globl	whitepieces
	.data
	.type	whitepieces, @object
	.size	whitepieces, 6
whitepieces:
	.ascii	"PRNBKQ"
	.globl	blackpieces
	.type	blackpieces, @object
	.size	blackpieces, 6
blackpieces:
	.ascii	"prnbkq"
	.globl	whiteKingLocation
	.align 8
	.type	whiteKingLocation, @object
	.size	whiteKingLocation, 8
whiteKingLocation:
	.long	7
	.long	4
	.globl	blackKingLocation
	.align 8
	.type	blackKingLocation, @object
	.size	blackKingLocation, 8
blackKingLocation:
	.long	0
	.long	4
	.globl	canShortCastleWhite
	.align 4
	.type	canShortCastleWhite, @object
	.size	canShortCastleWhite, 4
canShortCastleWhite:
	.long	1
	.globl	canLongCastleWhite
	.align 4
	.type	canLongCastleWhite, @object
	.size	canLongCastleWhite, 4
canLongCastleWhite:
	.long	1
	.globl	canShortCastleBlack
	.align 4
	.type	canShortCastleBlack, @object
	.size	canShortCastleBlack, 4
canShortCastleBlack:
	.long	1
	.globl	canLongCastleBlack
	.align 4
	.type	canLongCastleBlack, @object
	.size	canLongCastleBlack, 4
canLongCastleBlack:
	.long	1
	.globl	attackingPieceWhite
	.bss
	.align 8
	.type	attackingPieceWhite, @object
	.size	attackingPieceWhite, 8
attackingPieceWhite:
	.zero	8
	.globl	attackingPieceBlack
	.align 8
	.type	attackingPieceBlack, @object
	.size	attackingPieceBlack, 8
attackingPieceBlack:
	.zero	8
	.globl	turn
	.align 4
	.type	turn, @object
	.size	turn, 4
turn:
	.zero	4
	.section	.rodata
	.align 8
.LC42:
	.string	"\n save current game? \n (Y/N)\n\t>"
.LC43:
	.string	"%c"
.LC44:
	.string	"a"
.LC45:
	.string	"ChessData.txt"
.LC46:
	.string	"r+"
.LC47:
	.string	"Unable to open file."
.LC48:
	.string	"Saved games:"
	.align 8
.LC49:
	.string	"\n\tYou have no saved games yet!"
.LC50:
	.string	"\t%d. "
	.align 8
.LC51:
	.string	"\n Pick a name for the current save (less than 32 characters): \n\t>"
.LC52:
	.string	"%s"
.LC53:
	.string	"%.32s\n"
.LC54:
	.string	"%d %d %d %d %d %d %d %d %d\n"
	.text
	.globl	saveGame
	.type	saveGame, @function
saveGame:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 168
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rdi, .LC42[rip]
	mov	eax, 0
	call	printf@PLT
.L31:
	lea	rax, -162[rbp]
	mov	rsi, rax
	lea	rdi, .LC43[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	eax, BYTE PTR -162[rbp]
	cmp	al, 89
	je	.L30
	movzx	eax, BYTE PTR -162[rbp]
	cmp	al, 78
	je	.L30
	jmp	.L31
.L30:
	movzx	eax, BYTE PTR -162[rbp]
	cmp	al, 78
	jne	.L32
	mov	eax, 0
	jmp	.L52
.L32:
	lea	rsi, .LC44[rip]
	lea	rdi, .LC45[rip]
	call	fopen@PLT
	mov	QWORD PTR -136[rbp], rax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rsi, .LC46[rip]
	lea	rdi, .LC45[rip]
	call	fopen@PLT
	mov	QWORD PTR -136[rbp], rax
	cmp	QWORD PTR -136[rbp], 0
	jne	.L34
	lea	rdi, .LC47[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L35
.L34:
	lea	rdi, .LC48[rip]
	call	puts@PLT
	mov	DWORD PTR -160[rbp], 1
	mov	rdx, QWORD PTR -136[rbp]
	lea	rax, -64[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L36
	lea	rdi, .LC49[rip]
	call	puts@PLT
.L36:
	mov	rax, QWORD PTR -136[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	jmp	.L37
.L42:
	mov	eax, DWORD PTR -160[rbp]
	mov	esi, eax
	lea	rdi, .LC50[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -156[rbp], 0
	jmp	.L38
.L41:
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	movzx	eax, BYTE PTR -64[rbp+rax]
	mov	BYTE PTR -161[rbp], al
	cmp	BYTE PTR -161[rbp], 10
	je	.L54
	movsx	eax, BYTE PTR -161[rbp]
	mov	edi, eax
	call	putchar@PLT
	add	DWORD PTR -156[rbp], 1
.L38:
	cmp	DWORD PTR -156[rbp], 31
	jle	.L41
	jmp	.L40
.L54:
	nop
.L40:
	mov	rax, QWORD PTR -136[rbp]
	mov	edx, 1
	mov	esi, 84
	mov	rdi, rax
	call	fseek@PLT
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -160[rbp], 1
.L37:
	mov	rdx, QWORD PTR -136[rbp]
	lea	rax, -64[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L42
.L35:
	lea	rdi, .LC51[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -128[rbp]
	mov	rsi, rax
	lea	rdi, .LC52[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -152[rbp], 0
	jmp	.L43
.L46:
	mov	DWORD PTR -148[rbp], 0
	jmp	.L44
.L45:
	mov	eax, DWORD PTR -152[rbp]
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -148[rbp]
	lea	ecx, [rdx+rax]
	mov	eax, DWORD PTR -148[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	movsx	rax, ecx
	mov	BYTE PTR -96[rbp+rax], dl
	add	DWORD PTR -148[rbp], 1
.L44:
	cmp	DWORD PTR -148[rbp], 7
	jle	.L45
	add	DWORD PTR -152[rbp], 1
.L43:
	cmp	DWORD PTR -152[rbp], 3
	jle	.L46
	mov	DWORD PTR -144[rbp], 4
	jmp	.L47
.L50:
	mov	DWORD PTR -140[rbp], 0
	jmp	.L48
.L49:
	mov	eax, DWORD PTR -144[rbp]
	sub	eax, 4
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -140[rbp]
	lea	ecx, [rdx+rax]
	mov	eax, DWORD PTR -140[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -144[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	movsx	rax, ecx
	mov	BYTE PTR -64[rbp+rax], dl
	add	DWORD PTR -140[rbp], 1
.L48:
	cmp	DWORD PTR -140[rbp], 7
	jle	.L49
	add	DWORD PTR -144[rbp], 1
.L47:
	cmp	DWORD PTR -144[rbp], 7
	jle	.L50
	cmp	QWORD PTR -136[rbp], 0
	je	.L51
	lea	rdx, -128[rbp]
	mov	rax, QWORD PTR -136[rbp]
	lea	rsi, .LC53[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdx, -96[rbp]
	mov	rax, QWORD PTR -136[rbp]
	lea	rsi, .LC53[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdx, -64[rbp]
	mov	rax, QWORD PTR -136[rbp]
	lea	rsi, .LC53[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	r10d, DWORD PTR turn[rip]
	mov	r9d, DWORD PTR canLongCastleBlack[rip]
	mov	r8d, DWORD PTR canShortCastleBlack[rip]
	mov	edi, DWORD PTR canLongCastleWhite[rip]
	mov	esi, DWORD PTR canShortCastleWhite[rip]
	mov	ebx, DWORD PTR blackKingLocation[rip+4]
	mov	r11d, DWORD PTR blackKingLocation[rip]
	mov	ecx, DWORD PTR whiteKingLocation[rip+4]
	mov	edx, DWORD PTR whiteKingLocation[rip]
	mov	rax, QWORD PTR -136[rbp]
	sub	rsp, 8
	push	r10
	push	r9
	push	r8
	push	rdi
	push	rsi
	mov	r9d, ebx
	mov	r8d, r11d
	lea	rsi, .LC54[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	rsp, 48
.L51:
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 1
.L52:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	saveGame, .-saveGame
	.section	.rodata
	.align 8
.LC55:
	.string	"\n\nYou have no saved games yet! Press Q to quit:"
.LC56:
	.string	"\n\t>"
.LC57:
	.string	" %c"
	.align 8
.LC58:
	.string	"\n Pick a game to load (press 0 to go back to the menu): \n\t>"
.LC59:
	.string	"%d"
	.align 8
.LC60:
	.string	"\n\t%d \t%d \n\t%d \t%d \n\t%d \t%d \n\t%d \t%d \n\t%d\n"
	.text
	.globl	loadGame
	.type	loadGame, @function
loadGame:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -156[rbp], 1
	lea	rsi, .LC44[rip]
	lea	rdi, .LC45[rip]
	call	fopen@PLT
	mov	QWORD PTR -120[rbp], rax
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rsi, .LC46[rip]
	lea	rdi, .LC45[rip]
	call	fopen@PLT
	mov	QWORD PTR -120[rbp], rax
	cmp	QWORD PTR -120[rbp], 0
	jne	.L56
	lea	rdi, .LC47[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L57
.L56:
	lea	rdi, .LC48[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -48[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L58
	lea	rdi, .LC55[rip]
	call	puts@PLT
	mov	BYTE PTR -160[rbp], 66
.L61:
	lea	rdi, .LC56[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -160[rbp]
	mov	rsi, rax
	lea	rdi, .LC57[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	eax, BYTE PTR -160[rbp]
	cmp	al, 81
	jne	.L61
	mov	eax, 1
	jmp	.L90
.L58:
	mov	rax, QWORD PTR -120[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	jmp	.L62
.L67:
	mov	eax, DWORD PTR -156[rbp]
	mov	esi, eax
	lea	rdi, .LC50[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -152[rbp], 0
	jmp	.L63
.L66:
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	movzx	eax, BYTE PTR -48[rbp+rax]
	mov	BYTE PTR -163[rbp], al
	cmp	BYTE PTR -163[rbp], 10
	je	.L92
	movsx	eax, BYTE PTR -163[rbp]
	mov	edi, eax
	call	putchar@PLT
	add	DWORD PTR -152[rbp], 1
.L63:
	cmp	DWORD PTR -152[rbp], 31
	jle	.L66
	jmp	.L65
.L92:
	nop
.L65:
	mov	rax, QWORD PTR -120[rbp]
	mov	edx, 1
	mov	esi, 84
	mov	rdi, rax
	call	fseek@PLT
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -156[rbp], 1
.L62:
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -48[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L67
.L57:
	mov	DWORD PTR -160[rbp], -2
	jmp	.L68
.L69:
	lea	rdi, .LC58[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -160[rbp]
	mov	rsi, rax
	lea	rdi, .LC59[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -160[rbp]
	test	eax, eax
	jne	.L68
	mov	eax, 1
	jmp	.L90
.L68:
	mov	eax, DWORD PTR -160[rbp]
	test	eax, eax
	js	.L69
	mov	eax, DWORD PTR -160[rbp]
	cmp	DWORD PTR -156[rbp], eax
	jle	.L69
	mov	rax, QWORD PTR -120[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	DWORD PTR -148[rbp], 1
	jmp	.L70
.L75:
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -112[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	fgets@PLT
	mov	DWORD PTR -144[rbp], 0
	jmp	.L71
.L74:
	mov	eax, DWORD PTR -144[rbp]
	cdqe
	movzx	eax, BYTE PTR -112[rbp+rax]
	mov	BYTE PTR -161[rbp], al
	cmp	BYTE PTR -161[rbp], 10
	je	.L93
	add	DWORD PTR -144[rbp], 1
.L71:
	cmp	DWORD PTR -144[rbp], 31
	jle	.L74
	jmp	.L73
.L93:
	nop
.L73:
	mov	rax, QWORD PTR -120[rbp]
	mov	edx, 1
	mov	esi, 84
	mov	rdi, rax
	call	fseek@PLT
	add	DWORD PTR -148[rbp], 1
.L70:
	mov	eax, DWORD PTR -160[rbp]
	cmp	DWORD PTR -148[rbp], eax
	jl	.L75
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -112[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	fgets@PLT
	mov	DWORD PTR -140[rbp], 0
	jmp	.L76
.L79:
	mov	eax, DWORD PTR -140[rbp]
	cdqe
	movzx	eax, BYTE PTR -112[rbp+rax]
	mov	BYTE PTR -162[rbp], al
	cmp	BYTE PTR -162[rbp], 10
	je	.L94
	add	DWORD PTR -140[rbp], 1
.L76:
	cmp	DWORD PTR -140[rbp], 31
	jle	.L79
	jmp	.L78
.L94:
	nop
.L78:
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -80[rbp]
	mov	esi, 33
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	je	.L80
	mov	DWORD PTR -136[rbp], 0
	jmp	.L81
.L84:
	mov	DWORD PTR -132[rbp], 0
	jmp	.L82
.L83:
	mov	eax, DWORD PTR -136[rbp]
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -132[rbp]
	add	eax, edx
	cdqe
	movzx	eax, BYTE PTR -80[rbp+rax]
	mov	edx, DWORD PTR -132[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -136[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	add	rcx, rdx
	lea	rdx, board[rip]
	add	rdx, rcx
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -132[rbp], 1
.L82:
	cmp	DWORD PTR -132[rbp], 7
	jle	.L83
	add	DWORD PTR -136[rbp], 1
.L81:
	cmp	DWORD PTR -136[rbp], 3
	jle	.L84
.L80:
	mov	rax, QWORD PTR -120[rbp]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -48[rbp]
	mov	esi, 33
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	je	.L85
	mov	DWORD PTR -128[rbp], 0
	jmp	.L86
.L89:
	mov	DWORD PTR -124[rbp], 0
	jmp	.L87
.L88:
	mov	eax, DWORD PTR -128[rbp]
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -124[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -128[rbp]
	lea	ecx, 4[rax]
	movsx	rax, edx
	movzx	eax, BYTE PTR -48[rbp+rax]
	mov	edx, DWORD PTR -124[rbp]
	movsx	rsi, edx
	movsx	rdx, ecx
	sal	rdx, 3
	lea	rcx, [rdx+rsi]
	lea	rdx, board[rip]
	add	rdx, rcx
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -124[rbp], 1
.L87:
	cmp	DWORD PTR -124[rbp], 7
	jle	.L88
	add	DWORD PTR -128[rbp], 1
.L86:
	cmp	DWORD PTR -128[rbp], 3
	jle	.L89
.L85:
	mov	rax, QWORD PTR -120[rbp]
	sub	rsp, 8
	lea	rdx, turn[rip]
	push	rdx
	lea	rdx, canLongCastleBlack[rip]
	push	rdx
	lea	rdx, canShortCastleBlack[rip]
	push	rdx
	lea	rdx, canLongCastleWhite[rip]
	push	rdx
	lea	rdx, canShortCastleWhite[rip]
	push	rdx
	lea	r9, blackKingLocation[rip+4]
	lea	r8, blackKingLocation[rip]
	lea	rcx, whiteKingLocation[rip+4]
	lea	rdx, whiteKingLocation[rip]
	lea	rsi, .LC54[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	add	rsp, 48
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	r9d, DWORD PTR turn[rip]
	mov	r8d, DWORD PTR canLongCastleBlack[rip]
	mov	edi, DWORD PTR canShortCastleBlack[rip]
	mov	esi, DWORD PTR canLongCastleWhite[rip]
	mov	r11d, DWORD PTR canShortCastleWhite[rip]
	mov	r10d, DWORD PTR blackKingLocation[rip+4]
	mov	ecx, DWORD PTR blackKingLocation[rip]
	mov	edx, DWORD PTR whiteKingLocation[rip+4]
	mov	eax, DWORD PTR whiteKingLocation[rip]
	push	r9
	push	r8
	push	rdi
	push	rsi
	mov	r9d, r11d
	mov	r8d, r10d
	mov	esi, eax
	lea	rdi, .LC60[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 32
	mov	eax, 0
.L90:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L91
	call	__stack_chk_fail@PLT
.L91:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	loadGame, .-loadGame
	.section	.rodata
.LC61:
	.string	"r"
	.align 8
.LC62:
	.string	"\n\tYou have no saved games yet!\nPress Q to quit:\n\n\t>"
	.align 8
.LC63:
	.string	"\n Are you sure you want to delete all saved games?(this cannot be undone) \n (Y/N)\n\t>"
.LC64:
	.string	"w+"
	.text
	.globl	clearMemory
	.type	clearMemory, @function
clearMemory:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC48[rip]
	call	puts@PLT
	mov	DWORD PTR -64[rbp], 1
	lea	rsi, .LC61[rip]
	lea	rdi, .LC45[rip]
	call	fopen@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -48[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L96
	lea	rdi, .LC62[rip]
	mov	eax, 0
	call	printf@PLT
.L96:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	jmp	.L97
.L102:
	mov	eax, DWORD PTR -64[rbp]
	mov	esi, eax
	lea	rdi, .LC50[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -60[rbp], 0
	jmp	.L98
.L101:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	movzx	eax, BYTE PTR -48[rbp+rax]
	mov	BYTE PTR -65[rbp], al
	cmp	BYTE PTR -65[rbp], 10
	je	.L109
	movsx	eax, BYTE PTR -65[rbp]
	mov	edi, eax
	call	putchar@PLT
	add	DWORD PTR -60[rbp], 1
.L98:
	cmp	DWORD PTR -60[rbp], 31
	jle	.L101
	jmp	.L100
.L109:
	nop
.L100:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, 1
	mov	esi, 84
	mov	rdi, rax
	call	fseek@PLT
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -64[rbp], 1
.L97:
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -48[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L102
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC63[rip]
	mov	eax, 0
	call	printf@PLT
.L104:
	lea	rax, -66[rbp]
	mov	rsi, rax
	lea	rdi, .LC43[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	eax, BYTE PTR -66[rbp]
	cmp	al, 89
	je	.L103
	movzx	eax, BYTE PTR -66[rbp]
	cmp	al, 78
	je	.L103
	jmp	.L104
.L103:
	movzx	eax, BYTE PTR -66[rbp]
	cmp	al, 78
	jne	.L105
	mov	eax, 1
	jmp	.L107
.L105:
	lea	rsi, .LC64[rip]
	lea	rdi, .LC45[rip]
	call	fopen@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L107:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L108
	call	__stack_chk_fail@PLT
.L108:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	clearMemory, .-clearMemory
	.section	.rodata
	.align 8
.LC65:
	.string	"========================================================================================"
.LC66:
	.string	"\t\tMANUAL:\n"
.LC67:
	.string	"\tPIECE SIGNIFICANCE"
	.align 8
.LC68:
	.string	" Black pieces are lowercase letters, white pieces are uppercase letters, as follows:\n"
.LC69:
	.string	"\t p/P - pawn"
.LC70:
	.string	"\t n/N - knight"
.LC71:
	.string	"\t b/B - bishop"
.LC72:
	.string	"\t r/R - rook"
.LC73:
	.string	"\t q/Q - queen"
.LC74:
	.string	"\t k/K - king"
	.align 8
.LC75:
	.string	" The author makes a supposition that the player knows the rules of chess.\n\n "
.LC76:
	.string	"\t MAKING A MOVE"
	.align 8
.LC77:
	.string	" In order to move, the player has to specify the coordinates of the starting point"
	.align 8
.LC78:
	.string	"and then the coordinates of the ending point. it is worth noting that all coordinates"
	.align 8
.LC79:
	.string	"must be upper-case letters A through H followed by an integer from 1 to 8. Type in 'QT'"
	.align 8
.LC80:
	.string	"to pause and exit to min menu (progress will not be lost until the user begins a new "
	.align 8
.LC81:
	.string	"game or exits the program. Type in 'DR' to offer your opponent a draw.\n"
.LC82:
	.string	"\tCASTLING"
	.align 8
.LC83:
	.string	" In order to castle the player needs to specify the destination of the King as if "
	.align 8
.LC84:
	.string	"castling were a normal move. Castling, as is in chess, cannot be done if the spaces "
	.align 8
.LC85:
	.string	"between the king and his destination are occupied or attacked.\n"
.LC86:
	.string	"\tEN PASSANT"
	.align 8
.LC87:
	.string	" En Passant is only enabled when the space between the parn's starting position and "
	.align 8
.LC88:
	.string	"destination is attacked by the opposite player. An 'x' or 'X' will appear which is to "
	.align 8
.LC89:
	.string	"be treated like a regular figure. once the X is taken off the board, its corresponding "
	.align 8
.LC90:
	.string	"pawn will be taken off as well.\n"
.LC91:
	.string	"\tSAVING A GAME"
	.align 8
.LC92:
	.string	" The user can easily save and store the game played through the menu. The user will then "
	.align 8
.LC93:
	.string	"be asked to give a name to the game in question and can subsequently access it on demand "
	.align 8
.LC94:
	.string	"even after exiting the game and opening it back up. "
.LC95:
	.string	"\tLOADING A GAME"
	.align 8
.LC96:
	.string	" Loading a game works analogously to saving one, except now the computer will ask for an "
	.align 8
.LC97:
	.string	"index number of the game in question. There is no upper bound as to how many games can be"
.LC98:
	.string	"(within reason of course)\n"
.LC99:
	.string	"\tCLEARING THE MEMORY"
	.align 8
.LC100:
	.string	" Game memory can be cleared through the menu, however keep in mind that this action CANNOT "
.LC101:
	.string	"be undone. "
	.align 8
.LC102:
	.string	"\nPress Q to go back to the Menu\n\t>"
	.text
	.globl	openManual
	.type	openManual, @function
openManual:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	clrscr
	lea	rdi, .LC65[rip]
	call	puts@PLT
	lea	rdi, .LC66[rip]
	call	puts@PLT
	lea	rdi, .LC67[rip]
	call	puts@PLT
	lea	rdi, .LC68[rip]
	call	puts@PLT
	lea	rdi, .LC69[rip]
	call	puts@PLT
	lea	rdi, .LC70[rip]
	call	puts@PLT
	lea	rdi, .LC71[rip]
	call	puts@PLT
	lea	rdi, .LC72[rip]
	call	puts@PLT
	lea	rdi, .LC73[rip]
	call	puts@PLT
	lea	rdi, .LC74[rip]
	call	puts@PLT
	lea	rdi, .LC75[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC76[rip]
	call	puts@PLT
	lea	rdi, .LC77[rip]
	call	puts@PLT
	lea	rdi, .LC78[rip]
	call	puts@PLT
	lea	rdi, .LC79[rip]
	call	puts@PLT
	lea	rdi, .LC80[rip]
	call	puts@PLT
	lea	rdi, .LC81[rip]
	call	puts@PLT
	lea	rdi, .LC82[rip]
	call	puts@PLT
	lea	rdi, .LC83[rip]
	call	puts@PLT
	lea	rdi, .LC84[rip]
	call	puts@PLT
	lea	rdi, .LC85[rip]
	call	puts@PLT
	lea	rdi, .LC86[rip]
	call	puts@PLT
	lea	rdi, .LC87[rip]
	call	puts@PLT
	lea	rdi, .LC88[rip]
	call	puts@PLT
	lea	rdi, .LC89[rip]
	call	puts@PLT
	lea	rdi, .LC90[rip]
	call	puts@PLT
	lea	rdi, .LC91[rip]
	call	puts@PLT
	lea	rdi, .LC92[rip]
	call	puts@PLT
	lea	rdi, .LC93[rip]
	call	puts@PLT
	lea	rdi, .LC94[rip]
	call	puts@PLT
	lea	rdi, .LC95[rip]
	call	puts@PLT
	lea	rdi, .LC96[rip]
	call	puts@PLT
	lea	rdi, .LC97[rip]
	call	puts@PLT
	lea	rdi, .LC98[rip]
	call	puts@PLT
	lea	rdi, .LC99[rip]
	call	puts@PLT
	lea	rdi, .LC100[rip]
	call	puts@PLT
	lea	rdi, .LC101[rip]
	call	puts@PLT
	lea	rdi, .LC65[rip]
	call	puts@PLT
	lea	rdi, .LC102[rip]
	mov	eax, 0
	call	printf@PLT
.L113:
	mov	BYTE PTR -9[rbp], 66
	lea	rax, -9[rbp]
	mov	rsi, rax
	lea	rdi, .LC43[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	eax, BYTE PTR -9[rbp]
	cmp	al, 81
	jne	.L113
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L114
	call	__stack_chk_fail@PLT
.L114:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	openManual, .-openManual
	.globl	isAttackedBlack
	.type	isAttackedBlack, @function
isAttackedBlack:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	DWORD PTR -120[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -108[rbp], 1
	jmp	.L117
.L125:
	mov	eax, DWORD PTR -116[rbp]
	mov	DWORD PTR -80[rbp], eax
	mov	eax, 7
	sub	eax, DWORD PTR -120[rbp]
	mov	DWORD PTR -76[rbp], eax
	mov	eax, 7
	sub	eax, DWORD PTR -116[rbp]
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -120[rbp]
	mov	DWORD PTR -68[rbp], eax
	mov	DWORD PTR -64[rbp], -1
	mov	DWORD PTR -60[rbp], 0
	mov	DWORD PTR -56[rbp], 1
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -48[rbp], -1
	mov	DWORD PTR -104[rbp], 1
	jmp	.L118
.L124:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 81
	je	.L119
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 82
	jne	.L120
.L119:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceBlack[rip], eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceBlack[rip+4], eax
	mov	eax, 1
	jmp	.L121
.L120:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L144
	add	DWORD PTR -104[rbp], 1
.L118:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	cmp	DWORD PTR -104[rbp], eax
	jle	.L124
	jmp	.L123
.L144:
	nop
.L123:
	add	DWORD PTR -108[rbp], 1
.L117:
	cmp	DWORD PTR -108[rbp], 4
	jle	.L125
	mov	DWORD PTR -100[rbp], 1
	jmp	.L126
.L133:
	mov	edx, DWORD PTR -116[rbp]
	mov	eax, DWORD PTR -120[rbp]
	mov	esi, edx
	mov	edi, eax
	call	min
	mov	DWORD PTR -80[rbp], eax
	mov	eax, 7
	sub	eax, DWORD PTR -120[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	mov	esi, edx
	mov	edi, eax
	call	min
	mov	DWORD PTR -76[rbp], eax
	mov	eax, 7
	sub	eax, DWORD PTR -116[rbp]
	mov	edx, eax
	mov	eax, 7
	sub	eax, DWORD PTR -120[rbp]
	mov	esi, edx
	mov	edi, eax
	call	min
	mov	DWORD PTR -72[rbp], eax
	mov	eax, 7
	sub	eax, DWORD PTR -116[rbp]
	mov	edx, DWORD PTR -120[rbp]
	mov	esi, edx
	mov	edi, eax
	call	min
	mov	DWORD PTR -68[rbp], eax
	mov	DWORD PTR -64[rbp], -1
	mov	DWORD PTR -60[rbp], -1
	mov	DWORD PTR -56[rbp], 1
	mov	DWORD PTR -52[rbp], 1
	mov	DWORD PTR -48[rbp], -1
	mov	DWORD PTR -44[rbp], 1
	mov	DWORD PTR -40[rbp], -1
	mov	DWORD PTR -36[rbp], 1
	mov	DWORD PTR -96[rbp], 1
	jmp	.L127
.L132:
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	add	eax, 3
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 81
	je	.L128
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	add	eax, 3
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 66
	jne	.L129
.L128:
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceBlack[rip], eax
	mov	eax, DWORD PTR -100[rbp]
	add	eax, 3
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceBlack[rip+4], eax
	mov	eax, 1
	jmp	.L121
.L129:
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	add	eax, 3
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L145
	add	DWORD PTR -96[rbp], 1
.L127:
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	cmp	DWORD PTR -96[rbp], eax
	jle	.L132
	jmp	.L131
.L145:
	nop
.L131:
	add	DWORD PTR -100[rbp], 1
.L126:
	cmp	DWORD PTR -100[rbp], 4
	jle	.L133
	mov	DWORD PTR -92[rbp], 1
	jmp	.L134
.L136:
	mov	DWORD PTR -64[rbp], 1
	mov	DWORD PTR -60[rbp], 2
	mov	DWORD PTR -56[rbp], 2
	mov	DWORD PTR -52[rbp], 1
	mov	DWORD PTR -48[rbp], -1
	mov	DWORD PTR -44[rbp], -2
	mov	DWORD PTR -40[rbp], -2
	mov	DWORD PTR -36[rbp], -1
	mov	DWORD PTR -32[rbp], 1
	mov	DWORD PTR -28[rbp], 2
	mov	DWORD PTR -24[rbp], 2
	mov	DWORD PTR -20[rbp], 1
	mov	DWORD PTR -16[rbp], -1
	mov	DWORD PTR -12[rbp], -2
	mov	eax, DWORD PTR -92[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	test	eax, eax
	js	.L135
	mov	eax, DWORD PTR -92[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L135
	mov	eax, DWORD PTR -92[rbp]
	add	eax, 5
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	test	eax, eax
	js	.L135
	mov	eax, DWORD PTR -92[rbp]
	add	eax, 5
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L135
	mov	eax, DWORD PTR -92[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -92[rbp]
	add	eax, 5
	cdqe
	mov	ecx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 78
	jne	.L135
	mov	eax, DWORD PTR -92[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceBlack[rip], eax
	mov	eax, DWORD PTR -92[rbp]
	add	eax, 5
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceBlack[rip+4], eax
	mov	eax, 1
	jmp	.L121
.L135:
	add	DWORD PTR -92[rbp], 1
.L134:
	cmp	DWORD PTR -92[rbp], 8
	jle	.L136
	mov	DWORD PTR -88[rbp], 1
	jmp	.L137
.L139:
	mov	DWORD PTR -64[rbp], -1
	mov	DWORD PTR -60[rbp], 1
	cmp	DWORD PTR -116[rbp], 0
	jle	.L138
	cmp	DWORD PTR -116[rbp], 8
	jg	.L138
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	test	eax, eax
	js	.L138
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L138
	mov	eax, DWORD PTR -116[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, 1
	cdqe
	mov	ecx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 80
	jne	.L138
	mov	eax, DWORD PTR -116[rbp]
	sub	eax, 1
	mov	DWORD PTR attackingPieceBlack[rip], eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceBlack[rip+4], eax
	mov	eax, 1
	jmp	.L121
.L138:
	add	DWORD PTR -88[rbp], 1
.L137:
	cmp	DWORD PTR -88[rbp], 2
	jle	.L139
	mov	DWORD PTR -84[rbp], 1
	jmp	.L140
.L142:
	mov	DWORD PTR -64[rbp], -1
	mov	DWORD PTR -60[rbp], -1
	mov	DWORD PTR -56[rbp], -1
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -48[rbp], 1
	mov	DWORD PTR -44[rbp], 1
	mov	DWORD PTR -40[rbp], 1
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -32[rbp], -1
	mov	DWORD PTR -28[rbp], -1
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	test	eax, eax
	js	.L141
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L141
	mov	eax, DWORD PTR -84[rbp]
	add	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	test	eax, eax
	js	.L141
	mov	eax, DWORD PTR -84[rbp]
	add	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L141
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -84[rbp]
	add	eax, 1
	cdqe
	mov	ecx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 75
	jne	.L141
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceBlack[rip], eax
	mov	eax, DWORD PTR -84[rbp]
	add	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceBlack[rip+4], eax
	mov	eax, 2
	jmp	.L121
.L141:
	add	DWORD PTR -84[rbp], 1
.L140:
	cmp	DWORD PTR -84[rbp], 8
	jle	.L142
	mov	eax, 0
.L121:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L143
	call	__stack_chk_fail@PLT
.L143:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	isAttackedBlack, .-isAttackedBlack
	.globl	isAttackedWhite
	.type	isAttackedWhite, @function
isAttackedWhite:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	DWORD PTR -120[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -108[rbp], 1
	jmp	.L147
.L155:
	mov	eax, DWORD PTR -116[rbp]
	mov	DWORD PTR -80[rbp], eax
	mov	eax, 7
	sub	eax, DWORD PTR -120[rbp]
	mov	DWORD PTR -76[rbp], eax
	mov	eax, 7
	sub	eax, DWORD PTR -116[rbp]
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -120[rbp]
	mov	DWORD PTR -68[rbp], eax
	mov	DWORD PTR -64[rbp], -1
	mov	DWORD PTR -60[rbp], 0
	mov	DWORD PTR -56[rbp], 1
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -48[rbp], -1
	mov	DWORD PTR -104[rbp], 1
	jmp	.L148
.L154:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 113
	je	.L149
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 114
	jne	.L150
.L149:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceWhite[rip], eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceWhite[rip+4], eax
	mov	eax, 1
	jmp	.L151
.L150:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -104[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L174
	add	DWORD PTR -104[rbp], 1
.L148:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	cmp	DWORD PTR -104[rbp], eax
	jle	.L154
	jmp	.L153
.L174:
	nop
.L153:
	add	DWORD PTR -108[rbp], 1
.L147:
	cmp	DWORD PTR -108[rbp], 4
	jle	.L155
	mov	DWORD PTR -100[rbp], 1
	jmp	.L156
.L163:
	mov	edx, DWORD PTR -116[rbp]
	mov	eax, DWORD PTR -120[rbp]
	mov	esi, edx
	mov	edi, eax
	call	min
	mov	DWORD PTR -80[rbp], eax
	mov	eax, 7
	sub	eax, DWORD PTR -120[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	mov	esi, edx
	mov	edi, eax
	call	min
	mov	DWORD PTR -76[rbp], eax
	mov	eax, 7
	sub	eax, DWORD PTR -116[rbp]
	mov	edx, eax
	mov	eax, 7
	sub	eax, DWORD PTR -120[rbp]
	mov	esi, edx
	mov	edi, eax
	call	min
	mov	DWORD PTR -72[rbp], eax
	mov	eax, 7
	sub	eax, DWORD PTR -116[rbp]
	mov	edx, DWORD PTR -120[rbp]
	mov	esi, edx
	mov	edi, eax
	call	min
	mov	DWORD PTR -68[rbp], eax
	mov	DWORD PTR -64[rbp], -1
	mov	DWORD PTR -60[rbp], -1
	mov	DWORD PTR -56[rbp], 1
	mov	DWORD PTR -52[rbp], 1
	mov	DWORD PTR -48[rbp], -1
	mov	DWORD PTR -44[rbp], 1
	mov	DWORD PTR -40[rbp], -1
	mov	DWORD PTR -36[rbp], 1
	mov	DWORD PTR -96[rbp], 1
	jmp	.L157
.L162:
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	add	eax, 3
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 113
	je	.L158
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	add	eax, 3
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 98
	jne	.L159
.L158:
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceWhite[rip], eax
	mov	eax, DWORD PTR -100[rbp]
	add	eax, 3
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceWhite[rip+4], eax
	mov	eax, 1
	jmp	.L151
.L159:
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	add	eax, 3
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	imul	eax, DWORD PTR -96[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L175
	add	DWORD PTR -96[rbp], 1
.L157:
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	cmp	DWORD PTR -96[rbp], eax
	jle	.L162
	jmp	.L161
.L175:
	nop
.L161:
	add	DWORD PTR -100[rbp], 1
.L156:
	cmp	DWORD PTR -100[rbp], 4
	jle	.L163
	mov	DWORD PTR -92[rbp], 1
	jmp	.L164
.L166:
	mov	DWORD PTR -64[rbp], 1
	mov	DWORD PTR -60[rbp], 2
	mov	DWORD PTR -56[rbp], 2
	mov	DWORD PTR -52[rbp], 1
	mov	DWORD PTR -48[rbp], -1
	mov	DWORD PTR -44[rbp], -2
	mov	DWORD PTR -40[rbp], -2
	mov	DWORD PTR -36[rbp], -1
	mov	DWORD PTR -32[rbp], 1
	mov	DWORD PTR -28[rbp], 2
	mov	DWORD PTR -24[rbp], 2
	mov	DWORD PTR -20[rbp], 1
	mov	DWORD PTR -16[rbp], -1
	mov	DWORD PTR -12[rbp], -2
	mov	eax, DWORD PTR -92[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	test	eax, eax
	js	.L165
	mov	eax, DWORD PTR -92[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L165
	mov	eax, DWORD PTR -92[rbp]
	add	eax, 5
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	test	eax, eax
	js	.L165
	mov	eax, DWORD PTR -92[rbp]
	add	eax, 5
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L165
	mov	eax, DWORD PTR -92[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -92[rbp]
	add	eax, 5
	cdqe
	mov	ecx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 110
	jne	.L165
	mov	eax, DWORD PTR -92[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceWhite[rip], eax
	mov	eax, DWORD PTR -92[rbp]
	add	eax, 5
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceWhite[rip+4], eax
	mov	eax, 1
	jmp	.L151
.L165:
	add	DWORD PTR -92[rbp], 1
.L164:
	cmp	DWORD PTR -92[rbp], 8
	jle	.L166
	mov	DWORD PTR -88[rbp], 1
	jmp	.L167
.L169:
	mov	DWORD PTR -64[rbp], -1
	mov	DWORD PTR -60[rbp], 1
	cmp	DWORD PTR -116[rbp], 0
	jle	.L168
	cmp	DWORD PTR -116[rbp], 8
	jg	.L168
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	test	eax, eax
	js	.L168
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L168
	mov	eax, DWORD PTR -116[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, 1
	cdqe
	mov	ecx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 112
	jne	.L168
	mov	eax, DWORD PTR -116[rbp]
	sub	eax, 1
	mov	DWORD PTR attackingPieceWhite[rip], eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceWhite[rip+4], eax
	mov	eax, 1
	jmp	.L151
.L168:
	add	DWORD PTR -88[rbp], 1
.L167:
	cmp	DWORD PTR -88[rbp], 2
	jle	.L169
	mov	DWORD PTR -84[rbp], 1
	jmp	.L170
.L172:
	mov	DWORD PTR -64[rbp], -1
	mov	DWORD PTR -60[rbp], -1
	mov	DWORD PTR -56[rbp], -1
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -48[rbp], 1
	mov	DWORD PTR -44[rbp], 1
	mov	DWORD PTR -40[rbp], 1
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -32[rbp], -1
	mov	DWORD PTR -28[rbp], -1
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	test	eax, eax
	js	.L171
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L171
	mov	eax, DWORD PTR -84[rbp]
	add	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	test	eax, eax
	js	.L171
	mov	eax, DWORD PTR -84[rbp]
	add	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L171
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -84[rbp]
	add	eax, 1
	cdqe
	mov	ecx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 107
	jne	.L171
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceWhite[rip], eax
	mov	eax, DWORD PTR -84[rbp]
	add	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	add	eax, edx
	mov	DWORD PTR attackingPieceWhite[rip+4], eax
	mov	eax, 2
	jmp	.L151
.L171:
	add	DWORD PTR -84[rbp], 1
.L170:
	cmp	DWORD PTR -84[rbp], 8
	jle	.L172
	mov	eax, 0
.L151:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L173
	call	__stack_chk_fail@PLT
.L173:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	isAttackedWhite, .-isAttackedWhite
	.section	.rodata
	.align 8
.LC103:
	.string	"\nIn order to castle all spaces between the King and the Rook must be free and must not be attacked!\n %d\t%d\t%d"
	.align 8
.LC104:
	.string	"\nIn order to castle all spaces between the King and the Rook must be free and must not be attacked!"
	.align 8
.LC105:
	.string	"\nYou cannot move a blank space!"
	.text
	.globl	checkIfLegalWhite
	.type	checkIfLegalWhite, @function
checkIfLegalWhite:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 104
	.cfi_offset 3, -24
	mov	DWORD PTR -84[rbp], edi
	mov	DWORD PTR -88[rbp], esi
	mov	DWORD PTR -92[rbp], edx
	mov	DWORD PTR -96[rbp], ecx
	mov	eax, r8d
	mov	BYTE PTR -100[rbp], al
	movsx	eax, BYTE PTR -100[rbp]
	sub	eax, 32
	cmp	eax, 50
	ja	.L177
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L179[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L179[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L179:
	.long	.L185-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L184-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L183-.L179
	.long	.L177-.L179
	.long	.L177-.L179
	.long	.L182-.L179
	.long	.L177-.L179
	.long	.L181-.L179
	.long	.L180-.L179
	.long	.L178-.L179
	.text
.L181:
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L186
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jne	.L187
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	cmp	eax, 1
	je	.L188
.L187:
	cmp	DWORD PTR -88[rbp], 6
	jne	.L186
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	cmp	eax, 2
	jne	.L186
.L188:
	cmp	DWORD PTR -88[rbp], 6
	jne	.L237
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	cmp	eax, 2
	jne	.L237
	mov	eax, DWORD PTR -96[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, eax
	mov	edi, edx
	call	isAttackedWhite
	test	eax, eax
	je	.L237
	mov	eax, DWORD PTR -96[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -84[rbp]
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 88
	jmp	.L237
.L186:
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 6
	lea	rsi, blackpieces[rip]
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	je	.L191
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	eax, 1
	jne	.L191
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	cmp	eax, 1
	je	.L238
.L191:
	mov	eax, 0
	jmp	.L192
.L182:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	ecx, edx
	imul	ecx, eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	imul	eax, edx
	add	eax, ecx
	cmp	eax, 5
	jne	.L193
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 6
	lea	rsi, whitepieces[rip]
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	je	.L239
.L193:
	mov	eax, 0
	jmp	.L192
.L184:
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 6
	lea	rsi, blackpieces[rip]
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	jne	.L194
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L195
.L194:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	abv
	mov	ebx, eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	ebx, eax
	jne	.L195
	mov	DWORD PTR -80[rbp], 1
	jmp	.L196
.L198:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -80[rbp]
	imul	eax, edx
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -80[rbp]
	imul	eax, edx
	mov	DWORD PTR -20[rbp], eax
	mov	edx, DWORD PTR -96[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	mov	ecx, DWORD PTR -92[rbp]
	mov	edx, DWORD PTR -24[rbp]
	add	edx, ecx
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L197
	mov	eax, 0
	jmp	.L192
.L197:
	add	DWORD PTR -80[rbp], 1
.L196:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -80[rbp], eax
	jl	.L198
	jmp	.L190
.L195:
	mov	eax, 0
	jmp	.L192
.L178:
	mov	eax, DWORD PTR canLongCastleWhite[rip]
	cmp	eax, 1
	jne	.L199
	cmp	DWORD PTR -88[rbp], 7
	jne	.L199
	cmp	DWORD PTR -84[rbp], 0
	jne	.L199
	mov	DWORD PTR canLongCastleWhite[rip], 0
.L199:
	mov	eax, DWORD PTR canShortCastleWhite[rip]
	cmp	eax, 1
	jne	.L200
	cmp	DWORD PTR -88[rbp], 7
	jne	.L200
	cmp	DWORD PTR -84[rbp], 7
	jne	.L200
	mov	DWORD PTR canShortCastleWhite[rip], 0
.L200:
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 6
	lea	rsi, blackpieces[rip]
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	jne	.L201
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L202
.L201:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -96[rbp]
	je	.L203
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jne	.L202
.L203:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -96[rbp]
	jne	.L204
	mov	DWORD PTR -76[rbp], 1
	jmp	.L205
.L207:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -76[rbp]
	imul	eax, edx
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L206
	mov	eax, 0
	jmp	.L192
.L206:
	add	DWORD PTR -76[rbp], 1
.L205:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -76[rbp], eax
	jl	.L207
	jmp	.L190
.L204:
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jne	.L202
	mov	DWORD PTR -72[rbp], 1
	jmp	.L208
.L210:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -72[rbp]
	imul	eax, edx
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -48[rbp]
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L209
	mov	eax, 0
	jmp	.L192
.L209:
	add	DWORD PTR -72[rbp], 1
.L208:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -72[rbp], eax
	jl	.L210
	jmp	.L190
.L202:
	mov	eax, 0
	jmp	.L192
.L180:
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 6
	lea	rsi, blackpieces[rip]
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	jne	.L211
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L212
.L211:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -96[rbp]
	je	.L213
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	je	.L213
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	abv
	mov	ebx, eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	ebx, eax
	jne	.L212
.L213:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -96[rbp]
	jne	.L214
	mov	DWORD PTR -68[rbp], 1
	jmp	.L215
.L217:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -68[rbp]
	imul	eax, edx
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L216
	mov	eax, 0
	jmp	.L192
.L216:
	add	DWORD PTR -68[rbp], 1
.L215:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -68[rbp], eax
	jl	.L217
	jmp	.L190
.L214:
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jne	.L218
	mov	DWORD PTR -64[rbp], 1
	jmp	.L219
.L221:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -64[rbp]
	imul	eax, edx
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -32[rbp]
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L220
	mov	eax, 0
	jmp	.L192
.L220:
	add	DWORD PTR -64[rbp], 1
.L219:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -64[rbp], eax
	jl	.L221
	jmp	.L190
.L218:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	abv
	mov	ebx, eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	ebx, eax
	jne	.L212
	mov	DWORD PTR -60[rbp], 1
	jmp	.L222
.L224:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -60[rbp]
	imul	eax, edx
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -60[rbp]
	imul	eax, edx
	mov	DWORD PTR -36[rbp], eax
	mov	edx, DWORD PTR -96[rbp]
	mov	eax, DWORD PTR -36[rbp]
	add	eax, edx
	mov	ecx, DWORD PTR -92[rbp]
	mov	edx, DWORD PTR -40[rbp]
	add	edx, ecx
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L223
	mov	eax, 0
	jmp	.L192
.L223:
	add	DWORD PTR -60[rbp], 1
.L222:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -60[rbp], eax
	jl	.L224
	jmp	.L190
.L212:
	mov	eax, 0
	jmp	.L192
.L183:
	cmp	DWORD PTR -92[rbp], 6
	jne	.L225
	cmp	DWORD PTR -96[rbp], 7
	jne	.L225
	mov	eax, DWORD PTR canShortCastleWhite[rip]
	cmp	eax, 1
	jne	.L225
	movzx	eax, BYTE PTR board[rip+63]
	cmp	al, 82
	jne	.L225
	mov	DWORD PTR -56[rbp], 1
	jmp	.L226
.L229:
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 4
	cdqe
	lea	rdx, board[rip+56]
	movzx	eax, BYTE PTR [rax+rdx]
	cmp	al, 32
	jne	.L227
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 4
	mov	esi, eax
	mov	edi, 7
	call	isAttackedWhite
	cmp	eax, 1
	jne	.L228
.L227:
	mov	edx, DWORD PTR attackingPieceWhite[rip+4]
	mov	eax, DWORD PTR attackingPieceWhite[rip]
	mov	ecx, DWORD PTR -56[rbp]
	mov	esi, eax
	lea	rdi, .LC103[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L192
.L228:
	add	DWORD PTR -56[rbp], 1
.L226:
	cmp	DWORD PTR -56[rbp], 2
	jle	.L229
	mov	DWORD PTR canLongCastleWhite[rip], 0
	mov	DWORD PTR canShortCastleWhite[rip], 0
	mov	BYTE PTR board[rip+63], 32
	mov	BYTE PTR board[rip+61], 82
	mov	eax, DWORD PTR -96[rbp]
	mov	DWORD PTR whiteKingLocation[rip], eax
	mov	eax, DWORD PTR -92[rbp]
	mov	DWORD PTR whiteKingLocation[rip+4], eax
	jmp	.L190
.L225:
	cmp	DWORD PTR -92[rbp], 1
	jne	.L230
	cmp	DWORD PTR -96[rbp], 7
	jne	.L230
	mov	eax, DWORD PTR canLongCastleWhite[rip]
	cmp	eax, 1
	jne	.L230
	movzx	eax, BYTE PTR board[rip+56]
	cmp	al, 82
	jne	.L230
	mov	DWORD PTR -52[rbp], 1
	jmp	.L231
.L234:
	mov	eax, 4
	sub	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, board[rip+56]
	movzx	eax, BYTE PTR [rax+rdx]
	cmp	al, 32
	jne	.L232
	mov	eax, 4
	sub	eax, DWORD PTR -52[rbp]
	mov	esi, eax
	mov	edi, 7
	call	isAttackedWhite
	cmp	eax, 1
	jne	.L233
.L232:
	lea	rdi, .LC104[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L192
.L233:
	add	DWORD PTR -52[rbp], 1
.L231:
	cmp	DWORD PTR -52[rbp], 3
	jle	.L234
	mov	DWORD PTR canLongCastleWhite[rip], 0
	mov	DWORD PTR canShortCastleWhite[rip], 0
	mov	BYTE PTR board[rip+56], 32
	mov	BYTE PTR board[rip+58], 82
	mov	eax, DWORD PTR -96[rbp]
	mov	DWORD PTR whiteKingLocation[rip], eax
	mov	eax, DWORD PTR -92[rbp]
	mov	DWORD PTR whiteKingLocation[rip+4], eax
	jmp	.L190
.L230:
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 6
	lea	rsi, blackpieces[rip]
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	jne	.L235
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L236
.L235:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	ecx, edx
	imul	ecx, eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	imul	eax, edx
	add	eax, ecx
	cmp	eax, 2
	jg	.L236
	mov	edx, DWORD PTR -92[rbp]
	mov	eax, DWORD PTR -96[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	test	eax, eax
	jne	.L236
	mov	DWORD PTR canLongCastleWhite[rip], 0
	mov	DWORD PTR canShortCastleWhite[rip], 0
	mov	eax, DWORD PTR -96[rbp]
	mov	DWORD PTR whiteKingLocation[rip], eax
	mov	eax, DWORD PTR -92[rbp]
	mov	DWORD PTR whiteKingLocation[rip+4], eax
	jmp	.L190
.L236:
	mov	eax, 0
	jmp	.L192
.L185:
	lea	rdi, .LC105[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L192
.L177:
	mov	eax, 0
	jmp	.L192
.L237:
	nop
	jmp	.L190
.L238:
	nop
	jmp	.L190
.L239:
	nop
.L190:
	mov	eax, 1
.L192:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	checkIfLegalWhite, .-checkIfLegalWhite
	.globl	checkIfLegalBlack
	.type	checkIfLegalBlack, @function
checkIfLegalBlack:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 104
	.cfi_offset 3, -24
	mov	DWORD PTR -84[rbp], edi
	mov	DWORD PTR -88[rbp], esi
	mov	DWORD PTR -92[rbp], edx
	mov	DWORD PTR -96[rbp], ecx
	mov	eax, r8d
	mov	BYTE PTR -100[rbp], al
	movsx	eax, BYTE PTR -100[rbp]
	cmp	eax, 32
	je	.L241
	cmp	eax, 32
	jl	.L242
	cmp	eax, 114
	jg	.L242
	cmp	eax, 98
	jl	.L242
	sub	eax, 98
	cmp	eax, 16
	ja	.L242
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L244[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L244[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L244:
	.long	.L249-.L244
	.long	.L242-.L244
	.long	.L242-.L244
	.long	.L242-.L244
	.long	.L242-.L244
	.long	.L242-.L244
	.long	.L242-.L244
	.long	.L242-.L244
	.long	.L242-.L244
	.long	.L248-.L244
	.long	.L242-.L244
	.long	.L242-.L244
	.long	.L247-.L244
	.long	.L242-.L244
	.long	.L246-.L244
	.long	.L245-.L244
	.long	.L243-.L244
	.text
.L246:
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L250
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jne	.L251
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	cmp	eax, -1
	je	.L252
.L251:
	cmp	DWORD PTR -88[rbp], 1
	jne	.L250
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	cmp	eax, -2
	jne	.L250
.L252:
	cmp	DWORD PTR -88[rbp], 1
	jne	.L301
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	cmp	eax, -2
	jne	.L301
	mov	eax, DWORD PTR -96[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, eax
	mov	edi, edx
	call	isAttackedBlack
	test	eax, eax
	je	.L301
	mov	eax, DWORD PTR -96[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -84[rbp]
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 120
	jmp	.L301
.L250:
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 6
	lea	rsi, whitepieces[rip]
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	je	.L255
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	eax, 1
	jne	.L255
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	cmp	eax, -1
	je	.L302
.L255:
	mov	eax, 0
	jmp	.L256
.L247:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	ecx, edx
	imul	ecx, eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	imul	eax, edx
	add	eax, ecx
	cmp	eax, 5
	jne	.L257
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 6
	lea	rsi, blackpieces[rip]
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	je	.L303
.L257:
	mov	eax, 0
	jmp	.L256
.L249:
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 6
	lea	rsi, whitepieces[rip]
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	jne	.L258
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L259
.L258:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	abv
	mov	ebx, eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	ebx, eax
	jne	.L259
	mov	DWORD PTR -80[rbp], 1
	jmp	.L260
.L262:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -80[rbp]
	imul	eax, edx
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -80[rbp]
	imul	eax, edx
	mov	DWORD PTR -20[rbp], eax
	mov	edx, DWORD PTR -96[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	mov	ecx, DWORD PTR -92[rbp]
	mov	edx, DWORD PTR -24[rbp]
	add	edx, ecx
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L261
	mov	eax, 0
	jmp	.L256
.L261:
	add	DWORD PTR -80[rbp], 1
.L260:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -80[rbp], eax
	jl	.L262
	jmp	.L254
.L259:
	mov	eax, 0
	jmp	.L256
.L243:
	mov	eax, DWORD PTR canLongCastleBlack[rip]
	cmp	eax, 1
	jne	.L263
	cmp	DWORD PTR -88[rbp], 0
	jne	.L263
	cmp	DWORD PTR -84[rbp], 0
	jne	.L263
	mov	DWORD PTR canLongCastleBlack[rip], 0
.L263:
	mov	eax, DWORD PTR canShortCastleBlack[rip]
	cmp	eax, 1
	jne	.L264
	cmp	DWORD PTR -88[rbp], 0
	jne	.L264
	cmp	DWORD PTR -84[rbp], 7
	jne	.L264
	mov	DWORD PTR canShortCastleBlack[rip], 0
.L264:
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 6
	lea	rsi, whitepieces[rip]
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	jne	.L265
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L266
.L265:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -96[rbp]
	je	.L267
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jne	.L266
.L267:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -96[rbp]
	jne	.L268
	mov	DWORD PTR -76[rbp], 1
	jmp	.L269
.L271:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -76[rbp]
	imul	eax, edx
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L270
	mov	eax, 0
	jmp	.L256
.L270:
	add	DWORD PTR -76[rbp], 1
.L269:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -76[rbp], eax
	jl	.L271
	jmp	.L254
.L268:
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jne	.L266
	mov	DWORD PTR -72[rbp], 1
	jmp	.L272
.L274:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -72[rbp]
	imul	eax, edx
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -48[rbp]
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L273
	mov	eax, 0
	jmp	.L256
.L273:
	add	DWORD PTR -72[rbp], 1
.L272:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -72[rbp], eax
	jl	.L274
	jmp	.L254
.L266:
	mov	eax, 0
	jmp	.L256
.L245:
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 6
	lea	rsi, whitepieces[rip]
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	jne	.L275
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L276
.L275:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -96[rbp]
	je	.L277
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	je	.L277
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	abv
	mov	ebx, eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	ebx, eax
	jne	.L276
.L277:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -96[rbp]
	jne	.L278
	mov	DWORD PTR -68[rbp], 1
	jmp	.L279
.L281:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -68[rbp]
	imul	eax, edx
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L280
	mov	eax, 0
	jmp	.L256
.L280:
	add	DWORD PTR -68[rbp], 1
.L279:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -68[rbp], eax
	jl	.L281
	jmp	.L254
.L278:
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jne	.L282
	mov	DWORD PTR -64[rbp], 1
	jmp	.L283
.L285:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -64[rbp]
	imul	eax, edx
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -32[rbp]
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L284
	mov	eax, 0
	jmp	.L256
.L284:
	add	DWORD PTR -64[rbp], 1
.L283:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -64[rbp], eax
	jl	.L285
	jmp	.L254
.L282:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	abv
	mov	ebx, eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	ebx, eax
	jne	.L276
	mov	DWORD PTR -60[rbp], 1
	jmp	.L286
.L288:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -60[rbp]
	imul	eax, edx
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -60[rbp]
	imul	eax, edx
	mov	DWORD PTR -36[rbp], eax
	mov	edx, DWORD PTR -96[rbp]
	mov	eax, DWORD PTR -36[rbp]
	add	eax, edx
	mov	ecx, DWORD PTR -92[rbp]
	mov	edx, DWORD PTR -40[rbp]
	add	edx, ecx
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L287
	mov	eax, 0
	jmp	.L256
.L287:
	add	DWORD PTR -60[rbp], 1
.L286:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -60[rbp], eax
	jl	.L288
	jmp	.L254
.L276:
	mov	eax, 0
	jmp	.L256
.L248:
	cmp	DWORD PTR -92[rbp], 6
	jne	.L289
	cmp	DWORD PTR -96[rbp], 0
	jne	.L289
	mov	eax, DWORD PTR canShortCastleWhite[rip]
	cmp	eax, 1
	jne	.L289
	movzx	eax, BYTE PTR board[rip+7]
	cmp	al, 114
	jne	.L289
	mov	DWORD PTR -56[rbp], 1
	jmp	.L290
.L293:
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 4
	cdqe
	lea	rdx, board[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	cmp	al, 32
	jne	.L291
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 4
	mov	esi, eax
	mov	edi, 0
	call	isAttackedBlack
	test	eax, eax
	je	.L292
.L291:
	lea	rdi, .LC104[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L256
.L292:
	add	DWORD PTR -56[rbp], 1
.L290:
	cmp	DWORD PTR -56[rbp], 2
	jle	.L293
	mov	DWORD PTR canLongCastleBlack[rip], 0
	mov	DWORD PTR canShortCastleBlack[rip], 0
	mov	BYTE PTR board[rip+7], 32
	mov	BYTE PTR board[rip+5], 114
	mov	eax, DWORD PTR -96[rbp]
	mov	DWORD PTR blackKingLocation[rip], eax
	mov	eax, DWORD PTR -92[rbp]
	mov	DWORD PTR blackKingLocation[rip+4], eax
	jmp	.L254
.L289:
	cmp	DWORD PTR -92[rbp], 1
	jne	.L294
	cmp	DWORD PTR -96[rbp], 0
	jne	.L294
	mov	eax, DWORD PTR canLongCastleBlack[rip]
	cmp	eax, 1
	jne	.L294
	movzx	eax, BYTE PTR board[rip]
	cmp	al, 114
	jne	.L294
	mov	DWORD PTR -52[rbp], 1
	jmp	.L295
.L298:
	mov	eax, 4
	sub	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, board[rip+56]
	movzx	eax, BYTE PTR [rax+rdx]
	cmp	al, 32
	jne	.L296
	mov	eax, 4
	sub	eax, DWORD PTR -52[rbp]
	mov	esi, eax
	mov	edi, 0
	call	isAttackedBlack
	test	eax, eax
	je	.L297
.L296:
	lea	rdi, .LC104[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L256
.L297:
	add	DWORD PTR -52[rbp], 1
.L295:
	cmp	DWORD PTR -52[rbp], 3
	jle	.L298
	mov	DWORD PTR canLongCastleBlack[rip], 0
	mov	DWORD PTR canShortCastleBlack[rip], 0
	mov	BYTE PTR board[rip], 32
	mov	BYTE PTR board[rip+2], 114
	mov	eax, DWORD PTR -96[rbp]
	mov	DWORD PTR blackKingLocation[rip], eax
	mov	eax, DWORD PTR -92[rbp]
	mov	DWORD PTR blackKingLocation[rip+4], eax
	jmp	.L254
.L294:
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 6
	lea	rsi, whitepieces[rip]
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	jne	.L299
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L300
.L299:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	ecx, edx
	imul	ecx, eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -96[rbp]
	imul	eax, edx
	add	eax, ecx
	cmp	eax, 2
	jg	.L300
	mov	edx, DWORD PTR -92[rbp]
	mov	eax, DWORD PTR -96[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	test	eax, eax
	jne	.L300
	mov	DWORD PTR canLongCastleBlack[rip], 0
	mov	DWORD PTR canShortCastleBlack[rip], 0
	mov	eax, DWORD PTR -96[rbp]
	mov	DWORD PTR blackKingLocation[rip], eax
	mov	eax, DWORD PTR -92[rbp]
	mov	DWORD PTR blackKingLocation[rip+4], eax
	jmp	.L254
.L300:
	mov	eax, 0
	jmp	.L256
.L241:
	lea	rdi, .LC105[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L256
.L242:
	mov	eax, 0
	jmp	.L256
.L301:
	nop
	jmp	.L254
.L302:
	nop
	jmp	.L254
.L303:
	nop
.L254:
	mov	eax, 1
.L256:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	checkIfLegalBlack, .-checkIfLegalBlack
	.globl	checkMateWhite
	.type	checkMateWhite, @function
checkMateWhite:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 136
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR whiteKingLocation[rip+4]
	mov	DWORD PTR -112[rbp], eax
	mov	eax, DWORD PTR whiteKingLocation[rip]
	mov	DWORD PTR -108[rbp], eax
	mov	edx, DWORD PTR -112[rbp]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	cmp	eax, 1
	jne	.L305
	mov	eax, DWORD PTR attackingPieceWhite[rip+4]
	mov	DWORD PTR -104[rbp], eax
	mov	eax, DWORD PTR attackingPieceWhite[rip]
	mov	DWORD PTR -100[rbp], eax
	mov	eax, DWORD PTR -104[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -141[rbp], al
	mov	eax, DWORD PTR -112[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 32
	mov	DWORD PTR -140[rbp], 1
	jmp	.L306
.L335:
	mov	eax, DWORD PTR -112[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 32
	mov	DWORD PTR -64[rbp], -1
	mov	DWORD PTR -60[rbp], -1
	mov	DWORD PTR -56[rbp], -1
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -48[rbp], 1
	mov	DWORD PTR -44[rbp], 1
	mov	DWORD PTR -40[rbp], 1
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -32[rbp], -1
	mov	DWORD PTR -28[rbp], -1
	mov	eax, DWORD PTR -140[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -108[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -140[rbp]
	add	eax, 1
	cdqe
	mov	ecx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -112[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L307
	mov	eax, DWORD PTR -140[rbp]
	add	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -112[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -140[rbp]
	sub	eax, 1
	cdqe
	mov	ecx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -108[rbp]
	add	eax, ecx
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	test	eax, eax
	jne	.L307
	mov	eax, DWORD PTR -140[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -108[rbp]
	add	eax, edx
	test	eax, eax
	js	.L307
	mov	eax, DWORD PTR -140[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -108[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L307
	mov	eax, DWORD PTR -140[rbp]
	add	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -112[rbp]
	add	eax, edx
	test	eax, eax
	js	.L307
	mov	eax, DWORD PTR -140[rbp]
	add	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -112[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L307
	mov	eax, DWORD PTR -112[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 75
	mov	eax, 1
	jmp	.L334
.L307:
	mov	eax, DWORD PTR -112[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 75
	movsx	eax, BYTE PTR -141[rbp]
	cmp	eax, 114
	je	.L309
	cmp	eax, 114
	jg	.L310
	cmp	eax, 98
	je	.L311
	cmp	eax, 113
	je	.L312
	jmp	.L310
.L311:
	mov	DWORD PTR -136[rbp], 1
	jmp	.L313
.L315:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -136[rbp]
	imul	eax, edx
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -136[rbp]
	imul	eax, edx
	mov	DWORD PTR -68[rbp], eax
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -72[rbp]
	add	edx, eax
	mov	ecx, DWORD PTR -100[rbp]
	mov	eax, DWORD PTR -68[rbp]
	add	eax, ecx
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	cmp	eax, 1
	jne	.L314
	mov	eax, 1
	jmp	.L334
.L314:
	add	DWORD PTR -136[rbp], 1
.L313:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -136[rbp], eax
	jl	.L315
	jmp	.L310
.L309:
	mov	eax, DWORD PTR -108[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jne	.L316
	mov	DWORD PTR -132[rbp], 1
	jmp	.L317
.L319:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -132[rbp]
	imul	eax, edx
	mov	DWORD PTR -92[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	cmp	eax, 1
	jne	.L318
	mov	eax, 1
	jmp	.L334
.L318:
	add	DWORD PTR -132[rbp], 1
.L317:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -132[rbp], eax
	jl	.L319
	jmp	.L310
.L316:
	mov	eax, DWORD PTR -112[rbp]
	cmp	eax, DWORD PTR -104[rbp]
	jne	.L312
	mov	DWORD PTR -128[rbp], 1
	jmp	.L320
.L322:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -128[rbp]
	imul	eax, edx
	mov	DWORD PTR -96[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edx, DWORD PTR -112[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	cmp	eax, 1
	jne	.L321
	mov	eax, 1
	jmp	.L334
.L321:
	add	DWORD PTR -128[rbp], 1
.L320:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -128[rbp], eax
	jl	.L322
	jmp	.L310
.L312:
	mov	eax, DWORD PTR -108[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jne	.L323
	mov	DWORD PTR -124[rbp], 1
	jmp	.L324
.L326:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -124[rbp]
	imul	eax, edx
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -76[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	cmp	eax, 1
	jne	.L325
	mov	eax, 1
	jmp	.L334
.L325:
	add	DWORD PTR -124[rbp], 1
.L324:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -124[rbp], eax
	jl	.L326
	jmp	.L310
.L323:
	mov	eax, DWORD PTR -112[rbp]
	cmp	eax, DWORD PTR -104[rbp]
	jne	.L327
	mov	DWORD PTR -120[rbp], 1
	jmp	.L328
.L330:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -120[rbp]
	imul	eax, edx
	mov	DWORD PTR -80[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -80[rbp]
	mov	edx, DWORD PTR -112[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	cmp	eax, 1
	jne	.L329
	mov	eax, 1
	jmp	.L334
.L329:
	add	DWORD PTR -120[rbp], 1
.L328:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -120[rbp], eax
	jl	.L330
	jmp	.L310
.L327:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	abv
	mov	ebx, eax
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	abv
	cmp	ebx, eax
	jne	.L310
	mov	DWORD PTR -116[rbp], 1
	jmp	.L331
.L333:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -116[rbp]
	imul	eax, edx
	mov	DWORD PTR -88[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -116[rbp]
	imul	eax, edx
	mov	DWORD PTR -84[rbp], eax
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -88[rbp]
	add	edx, eax
	mov	ecx, DWORD PTR -100[rbp]
	mov	eax, DWORD PTR -84[rbp]
	add	eax, ecx
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	cmp	eax, 1
	jne	.L332
	mov	eax, 1
	jmp	.L334
.L332:
	add	DWORD PTR -116[rbp], 1
.L331:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -116[rbp], eax
	jl	.L333
	nop
.L310:
	add	DWORD PTR -140[rbp], 1
.L306:
	cmp	DWORD PTR -140[rbp], 8
	jle	.L335
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	cmp	eax, 2
	jne	.L336
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	test	eax, eax
	jne	.L336
	mov	eax, 1
	jmp	.L334
.L336:
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	test	eax, eax
	je	.L337
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	cmp	eax, 2
	jne	.L305
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	test	eax, eax
	je	.L305
.L337:
	mov	eax, 2
	jmp	.L334
.L305:
	mov	eax, 0
.L334:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L338
	call	__stack_chk_fail@PLT
.L338:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	checkMateWhite, .-checkMateWhite
	.section	.rodata
.LC106:
	.string	"\n4"
	.text
	.globl	checkMateBlack
	.type	checkMateBlack, @function
checkMateBlack:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 136
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR blackKingLocation[rip+4]
	mov	DWORD PTR -112[rbp], eax
	mov	eax, DWORD PTR blackKingLocation[rip]
	mov	DWORD PTR -108[rbp], eax
	mov	edx, DWORD PTR -112[rbp]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	cmp	eax, 1
	jne	.L340
	mov	eax, DWORD PTR attackingPieceBlack[rip+4]
	mov	DWORD PTR -104[rbp], eax
	mov	eax, DWORD PTR attackingPieceBlack[rip]
	mov	DWORD PTR -100[rbp], eax
	mov	eax, DWORD PTR -104[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -141[rbp], al
	mov	DWORD PTR -140[rbp], 1
	jmp	.L341
.L370:
	mov	eax, DWORD PTR -112[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 32
	mov	DWORD PTR -64[rbp], -1
	mov	DWORD PTR -60[rbp], -1
	mov	DWORD PTR -56[rbp], -1
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -48[rbp], 1
	mov	DWORD PTR -44[rbp], 1
	mov	DWORD PTR -40[rbp], 1
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -32[rbp], -1
	mov	DWORD PTR -28[rbp], -1
	mov	eax, DWORD PTR -140[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -108[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -140[rbp]
	add	eax, 1
	cdqe
	mov	ecx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -112[rbp]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L342
	mov	eax, DWORD PTR -140[rbp]
	add	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -112[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -140[rbp]
	sub	eax, 1
	cdqe
	mov	ecx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -108[rbp]
	add	eax, ecx
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	test	eax, eax
	jne	.L342
	mov	eax, DWORD PTR -140[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -108[rbp]
	add	eax, edx
	test	eax, eax
	js	.L342
	mov	eax, DWORD PTR -140[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -108[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L342
	mov	eax, DWORD PTR -140[rbp]
	add	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -112[rbp]
	add	eax, edx
	test	eax, eax
	js	.L342
	mov	eax, DWORD PTR -140[rbp]
	add	eax, 1
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -112[rbp]
	add	eax, edx
	cmp	eax, 7
	jg	.L342
	mov	eax, DWORD PTR -112[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 107
	mov	eax, 1
	jmp	.L369
.L342:
	mov	eax, DWORD PTR -112[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 107
	movsx	eax, BYTE PTR -141[rbp]
	cmp	eax, 82
	je	.L344
	cmp	eax, 82
	jg	.L345
	cmp	eax, 66
	je	.L346
	cmp	eax, 81
	je	.L347
	jmp	.L345
.L346:
	mov	DWORD PTR -136[rbp], 1
	jmp	.L348
.L350:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -136[rbp]
	imul	eax, edx
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -136[rbp]
	imul	eax, edx
	mov	DWORD PTR -68[rbp], eax
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -72[rbp]
	add	edx, eax
	mov	ecx, DWORD PTR -100[rbp]
	mov	eax, DWORD PTR -68[rbp]
	add	eax, ecx
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	cmp	eax, 1
	jne	.L349
	mov	eax, 1
	jmp	.L369
.L349:
	add	DWORD PTR -136[rbp], 1
.L348:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -136[rbp], eax
	jl	.L350
	jmp	.L345
.L344:
	mov	eax, DWORD PTR -108[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jne	.L351
	mov	DWORD PTR -132[rbp], 1
	jmp	.L352
.L354:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -132[rbp]
	imul	eax, edx
	mov	DWORD PTR -92[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -92[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	cmp	eax, 1
	jne	.L353
	mov	eax, 1
	jmp	.L369
.L353:
	add	DWORD PTR -132[rbp], 1
.L352:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -132[rbp], eax
	jl	.L354
	jmp	.L345
.L351:
	mov	eax, DWORD PTR -112[rbp]
	cmp	eax, DWORD PTR -104[rbp]
	jne	.L347
	mov	DWORD PTR -128[rbp], 1
	jmp	.L355
.L357:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -128[rbp]
	imul	eax, edx
	mov	DWORD PTR -96[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -96[rbp]
	mov	edx, DWORD PTR -112[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	cmp	eax, 1
	jne	.L356
	mov	eax, 1
	jmp	.L369
.L356:
	add	DWORD PTR -128[rbp], 1
.L355:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -128[rbp], eax
	jl	.L357
	jmp	.L345
.L347:
	mov	eax, DWORD PTR -108[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jne	.L358
	mov	DWORD PTR -124[rbp], 1
	jmp	.L359
.L361:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -124[rbp]
	imul	eax, edx
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -76[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	cmp	eax, 1
	jne	.L360
	mov	eax, 1
	jmp	.L369
.L360:
	add	DWORD PTR -124[rbp], 1
.L359:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -124[rbp], eax
	jl	.L361
	jmp	.L345
.L358:
	mov	eax, DWORD PTR -112[rbp]
	cmp	eax, DWORD PTR -104[rbp]
	jne	.L362
	mov	DWORD PTR -120[rbp], 1
	jmp	.L363
.L365:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -120[rbp]
	imul	eax, edx
	mov	DWORD PTR -80[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -80[rbp]
	mov	edx, DWORD PTR -112[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	cmp	eax, 1
	jne	.L364
	mov	eax, 1
	jmp	.L369
.L364:
	add	DWORD PTR -120[rbp], 1
.L363:
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -120[rbp], eax
	jl	.L365
	jmp	.L345
.L362:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	abv
	mov	ebx, eax
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	abv
	cmp	ebx, eax
	jne	.L345
	mov	DWORD PTR -116[rbp], 1
	jmp	.L366
.L368:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -116[rbp]
	imul	eax, edx
	mov	DWORD PTR -88[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	sgn
	mov	edx, DWORD PTR -116[rbp]
	imul	eax, edx
	mov	DWORD PTR -84[rbp], eax
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -88[rbp]
	add	edx, eax
	mov	ecx, DWORD PTR -100[rbp]
	mov	eax, DWORD PTR -84[rbp]
	add	eax, ecx
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	cmp	eax, 1
	jne	.L367
	mov	eax, 1
	jmp	.L369
.L367:
	add	DWORD PTR -116[rbp], 1
.L366:
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	abv
	cmp	DWORD PTR -116[rbp], eax
	jl	.L368
	nop
.L345:
	add	DWORD PTR -140[rbp], 1
.L341:
	cmp	DWORD PTR -140[rbp], 8
	jle	.L370
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	cmp	eax, 2
	jne	.L371
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	test	eax, eax
	jne	.L371
	lea	rdi, .LC106[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L369
.L371:
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	test	eax, eax
	je	.L372
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedWhite
	cmp	eax, 2
	jne	.L340
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isAttackedBlack
	test	eax, eax
	je	.L340
.L372:
	mov	eax, 2
	jmp	.L369
.L340:
	mov	eax, 0
.L369:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L373
	call	__stack_chk_fail@PLT
.L373:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	checkMateBlack, .-checkMateBlack
	.section	.rodata
.LC107:
	.string	"\nWHITE to move:"
.LC108:
	.string	"\nBLACK to move:"
	.align 8
.LC109:
	.string	"\n Coordinates of piece to be moved: \n \t >"
.LC110:
	.string	" %c %c"
	.align 8
.LC111:
	.string	"Are you sure you want to draw?(Y/N)\n\t>"
	.align 8
.LC112:
	.string	"Does BLACK accept the draw?(Y/N)\n\t>"
	.align 8
.LC113:
	.string	"Does WHITE accept the draw?(Y/N)\n\t>"
	.align 8
.LC114:
	.string	"\nPiece cannot be moved here: Invalid coordinates"
	.align 8
.LC115:
	.string	"\n Coordinates of destination: \n \t >"
	.align 8
.LC116:
	.string	"\nYour king is in check! You can and must move in a way which will change that."
	.align 8
.LC117:
	.string	"\nPiece cannot be moved here: Illegal move"
	.text
	.globl	makemove
	.type	makemove, @function
makemove:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	DWORD PTR -68[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 5208208757389214273
	mov	QWORD PTR -24[rbp], rax
	movabs	rax, 4050765991979987505
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -52[rbp], 0
	jmp	.L375
.L409:
	mov	DWORD PTR -28[rbp], 808464432
	mov	DWORD PTR -48[rbp], 9
	mov	DWORD PTR -44[rbp], 9
	mov	DWORD PTR -40[rbp], 9
	mov	DWORD PTR -36[rbp], 9
	cmp	DWORD PTR -68[rbp], 0
	jne	.L376
	lea	rdi, .LC107[rip]
	call	puts@PLT
	jmp	.L377
.L376:
	lea	rdi, .LC108[rip]
	call	puts@PLT
.L377:
	lea	rdi, .LC109[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -28[rbp]
	lea	rdx, 1[rax]
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC110[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	eax, BYTE PTR -28[rbp]
	cmp	al, 81
	jne	.L378
	movzx	eax, BYTE PTR -27[rbp]
	cmp	al, 84
	jne	.L378
	mov	eax, 3
	jmp	.L410
.L378:
	movzx	eax, BYTE PTR -28[rbp]
	cmp	al, 68
	jne	.L380
	movzx	eax, BYTE PTR -27[rbp]
	cmp	al, 82
	jne	.L380
	mov	BYTE PTR -64[rbp], 66
	lea	rdi, .LC111[rip]
	mov	eax, 0
	call	printf@PLT
.L382:
	lea	rax, -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC43[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	eax, BYTE PTR -64[rbp]
	cmp	al, 89
	je	.L381
	movzx	eax, BYTE PTR -64[rbp]
	cmp	al, 78
	je	.L381
	jmp	.L382
.L381:
	movzx	eax, BYTE PTR -64[rbp]
	cmp	al, 89
	jne	.L380
	mov	BYTE PTR -63[rbp], 66
	cmp	DWORD PTR -68[rbp], 0
	jne	.L384
	lea	rdi, .LC112[rip]
	mov	eax, 0
	call	printf@PLT
.L384:
	cmp	DWORD PTR -68[rbp], 1
	jne	.L387
	lea	rdi, .LC113[rip]
	mov	eax, 0
	call	printf@PLT
.L387:
	lea	rax, -63[rbp]
	mov	rsi, rax
	lea	rdi, .LC43[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	eax, BYTE PTR -63[rbp]
	cmp	al, 89
	je	.L386
	movzx	eax, BYTE PTR -63[rbp]
	cmp	al, 78
	je	.L386
	jmp	.L387
.L386:
	movzx	eax, BYTE PTR -63[rbp]
	cmp	al, 89
	jne	.L380
	mov	eax, 5
	jmp	.L410
.L380:
	movzx	eax, BYTE PTR -28[rbp]
	movsx	eax, al
	lea	rcx, -24[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	je	.L389
	movzx	eax, BYTE PTR -27[rbp]
	movsx	eax, al
	lea	rcx, -16[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	jne	.L390
.L389:
	lea	rdi, .LC114[rip]
	call	puts@PLT
	jmp	.L375
.L390:
	movzx	eax, BYTE PTR -27[rbp]
	movsx	eax, al
	lea	rcx, -16[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	checkifinarray
	mov	edx, eax
	mov	eax, 7
	sub	eax, edx
	mov	DWORD PTR -48[rbp], eax
	movzx	eax, BYTE PTR -28[rbp]
	movsx	eax, al
	lea	rcx, -24[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	checkifinarray
	mov	DWORD PTR -44[rbp], eax
	lea	rdi, .LC115[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -28[rbp]
	lea	rdx, 3[rax]
	lea	rax, -28[rbp]
	add	rax, 2
	mov	rsi, rax
	lea	rdi, .LC110[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	eax, BYTE PTR -26[rbp]
	movsx	eax, al
	lea	rcx, -24[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	je	.L392
	movzx	eax, BYTE PTR -25[rbp]
	movsx	eax, al
	lea	rcx, -16[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	checkifinarray
	cmp	eax, -1
	jne	.L393
.L392:
	lea	rdi, .LC114[rip]
	call	puts@PLT
	jmp	.L375
.L393:
	movzx	eax, BYTE PTR -25[rbp]
	movsx	eax, al
	lea	rcx, -16[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	checkifinarray
	mov	edx, eax
	mov	eax, 7
	sub	eax, edx
	mov	DWORD PTR -40[rbp], eax
	movzx	eax, BYTE PTR -26[rbp]
	movsx	eax, al
	lea	rcx, -24[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	checkifinarray
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -62[rbp], al
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -61[rbp], al
	cmp	DWORD PTR -68[rbp], 0
	jne	.L394
	mov	DWORD PTR -60[rbp], 0
	jmp	.L395
.L397:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, board[rip+40]
	movzx	eax, BYTE PTR [rax+rdx]
	cmp	al, 88
	jne	.L396
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, board[rip+40]
	mov	BYTE PTR [rax+rdx], 32
.L396:
	add	DWORD PTR -60[rbp], 1
.L395:
	cmp	DWORD PTR -60[rbp], 7
	jle	.L397
	movsx	edi, BYTE PTR -62[rbp]
	mov	ecx, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	esi, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	r8d, edi
	mov	edi, eax
	call	checkIfLegalWhite
	cmp	eax, 1
	jne	.L398
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 32
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rdx, rax
	movzx	eax, BYTE PTR -62[rbp]
	mov	BYTE PTR [rdx], al
	call	checkMateWhite
	test	eax, eax
	jne	.L399
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 32
	cmp	BYTE PTR -61[rbp], 120
	jne	.L400
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -36[rbp]
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 32
.L400:
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rdx, rax
	movzx	eax, BYTE PTR -62[rbp]
	mov	BYTE PTR [rdx], al
	mov	DWORD PTR -52[rbp], 1
	mov	eax, 1
	jmp	.L410
.L399:
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rdx, rax
	movzx	eax, BYTE PTR -62[rbp]
	mov	BYTE PTR [rdx], al
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rdx, rax
	movzx	eax, BYTE PTR -61[rbp]
	mov	BYTE PTR [rdx], al
	lea	rdi, .LC116[rip]
	call	puts@PLT
	jmp	.L375
.L398:
	lea	rdi, .LC117[rip]
	call	puts@PLT
	jmp	.L375
.L394:
	cmp	DWORD PTR -68[rbp], 1
	jne	.L401
	mov	DWORD PTR -56[rbp], 0
	jmp	.L402
.L404:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, board[rip+16]
	movzx	eax, BYTE PTR [rax+rdx]
	cmp	al, 120
	jne	.L403
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, board[rip+16]
	mov	BYTE PTR [rax+rdx], 32
.L403:
	add	DWORD PTR -56[rbp], 1
.L402:
	cmp	DWORD PTR -56[rbp], 7
	jle	.L404
	movsx	edi, BYTE PTR -62[rbp]
	mov	ecx, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	esi, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	r8d, edi
	mov	edi, eax
	call	checkIfLegalBlack
	cmp	eax, 1
	jne	.L405
	call	checkMateBlack
	test	eax, eax
	jne	.L405
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 32
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rdx, rax
	movzx	eax, BYTE PTR -62[rbp]
	mov	BYTE PTR [rdx], al
	call	checkMateBlack
	test	eax, eax
	jne	.L406
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 32
	cmp	BYTE PTR -61[rbp], 88
	jne	.L407
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -36[rbp]
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 3
	lea	rdx, [rax+rcx]
	lea	rax, board[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 32
.L407:
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rdx, rax
	movzx	eax, BYTE PTR -62[rbp]
	mov	BYTE PTR [rdx], al
	mov	DWORD PTR -52[rbp], 1
	mov	eax, 0
	jmp	.L410
.L406:
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rdx, rax
	movzx	eax, BYTE PTR -62[rbp]
	mov	BYTE PTR [rdx], al
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rdx, rax
	lea	rax, board[rip]
	add	rdx, rax
	movzx	eax, BYTE PTR -61[rbp]
	mov	BYTE PTR [rdx], al
	lea	rdi, .LC116[rip]
	call	puts@PLT
	jmp	.L401
.L405:
	lea	rdi, .LC117[rip]
	call	puts@PLT
.L401:
	mov	eax, 1
	jmp	.L410
.L375:
	cmp	DWORD PTR -52[rbp], 1
	jne	.L409
	mov	eax, 3
.L410:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L411
	call	__stack_chk_fail@PLT
.L411:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	makemove, .-makemove
	.section	.rodata
	.align 8
.LC118:
	.string	"\n\n\n Press one of the following:\n\tN - New game\n\tC - Continue\n\tS - Save game\n\tL - Load game\n\tD - Clear Memory\n\tM - Access the Manual\n\tQ - Quit\n\n>"
.LC119:
	.string	"\nCHECK!"
.LC120:
	.string	"\n\tIt's a DRAW!"
.LC121:
	.string	"\n\tCHECKMATE! Black Wins!"
.LC122:
	.string	"\tCHECKMATE! White Wins!"
	.align 8
.LC123:
	.string	"\nPress Q to go back to the Menu!\nThis game will be deleted once you quit and a new game will be started.\n\t>"
	.text
	.globl	main
	.type	main, @function
main:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L413
.L438:
	mov	DWORD PTR -16[rbp], 0
	mov	BYTE PTR -22[rbp], 65
	jmp	.L414
.L416:
	call	printlogo
	lea	rdi, .LC118[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -22[rbp]
	mov	rsi, rax
	lea	rdi, .LC43[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
.L414:
	movzx	eax, BYTE PTR -22[rbp]
	cmp	al, 78
	je	.L415
	movzx	eax, BYTE PTR -22[rbp]
	cmp	al, 67
	je	.L415
	movzx	eax, BYTE PTR -22[rbp]
	cmp	al, 83
	je	.L415
	movzx	eax, BYTE PTR -22[rbp]
	cmp	al, 76
	je	.L415
	movzx	eax, BYTE PTR -22[rbp]
	cmp	al, 68
	je	.L415
	movzx	eax, BYTE PTR -22[rbp]
	cmp	al, 77
	je	.L415
	movzx	eax, BYTE PTR -22[rbp]
	cmp	al, 81
	jne	.L416
.L415:
	movzx	eax, BYTE PTR -22[rbp]
	movsx	eax, al
	sub	eax, 67
	cmp	eax, 16
	ja	.L427
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L419[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L419[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L419:
	.long	.L427-.L419
	.long	.L424-.L419
	.long	.L427-.L419
	.long	.L427-.L419
	.long	.L427-.L419
	.long	.L427-.L419
	.long	.L427-.L419
	.long	.L427-.L419
	.long	.L427-.L419
	.long	.L423-.L419
	.long	.L422-.L419
	.long	.L421-.L419
	.long	.L427-.L419
	.long	.L427-.L419
	.long	.L420-.L419
	.long	.L427-.L419
	.long	.L418-.L419
	.text
.L421:
	call	initializeBoard
	mov	DWORD PTR turn[rip], 0
	jmp	.L417
.L418:
	call	saveGame
	mov	DWORD PTR -16[rbp], 1
	jmp	.L417
.L423:
	call	loadGame
	cmp	eax, 1
	jne	.L441
	mov	DWORD PTR -16[rbp], 1
	jmp	.L441
.L424:
	call	clearMemory
	mov	DWORD PTR -16[rbp], 1
.L422:
	call	openManual
	mov	DWORD PTR -16[rbp], 1
	jmp	.L417
.L420:
	mov	DWORD PTR -20[rbp], 1
	mov	DWORD PTR -16[rbp], 1
	jmp	.L417
.L441:
	nop
.L417:
	jmp	.L427
.L437:
	call	printboard
	call	checkMateWhite
	cmp	eax, 1
	je	.L428
	call	checkMateBlack
	cmp	eax, 1
	jne	.L429
.L428:
	lea	rdi, .LC119[rip]
	call	puts@PLT
.L429:
	mov	eax, DWORD PTR turn[rip]
	mov	edi, eax
	call	makemove
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 3
	jne	.L430
	mov	DWORD PTR -16[rbp], 1
	jmp	.L413
.L430:
	cmp	DWORD PTR -12[rbp], 5
	jne	.L432
	call	printboard
	lea	rdi, .LC120[rip]
	call	puts@PLT
	mov	DWORD PTR -16[rbp], 1
.L432:
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR turn[rip], eax
	call	checkMateWhite
	cmp	eax, 2
	jne	.L433
	call	printboard
	lea	rdi, .LC121[rip]
	call	puts@PLT
	mov	DWORD PTR -16[rbp], 1
.L433:
	call	checkMateBlack
	cmp	eax, 2
	jne	.L434
	call	printboard
	lea	rdi, .LC122[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -16[rbp], 1
.L434:
	cmp	DWORD PTR -16[rbp], 1
	jne	.L427
	lea	rdi, .LC123[rip]
	mov	eax, 0
	call	printf@PLT
.L436:
	mov	BYTE PTR -21[rbp], 66
	lea	rax, -21[rbp]
	mov	rsi, rax
	lea	rdi, .LC43[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	eax, BYTE PTR -21[rbp]
	cmp	al, 81
	jne	.L436
	call	initializeBoard
.L427:
	cmp	DWORD PTR -16[rbp], 1
	jne	.L437
.L413:
	cmp	DWORD PTR -20[rbp], 1
	jne	.L438
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L440
	call	__stack_chk_fail@PLT
.L440:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"914057.c"
	.text
	.align	2
	.global	checkifinarray
	.syntax unified
	.arm
	.fpu softvfp
	.type	checkifinarray, %function
checkifinarray:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	mov	r3, r0
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	strb	r3, [fp, #-13]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L5:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L3
	ldr	r3, [fp, #-8]
	b	.L4
.L3:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L5
	mvn	r3, #0
.L4:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	checkifinarray, .-checkifinarray
	.align	2
	.global	max
	.syntax unified
	.arm
	.fpu softvfp
	.type	max, %function
max:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	max, .-max
	.align	2
	.global	min
	.syntax unified
	.arm
	.fpu softvfp
	.type	min, %function
min:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	movlt	r3, r2
	movge	r3, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	min, .-min
	.align	2
	.global	sgn
	.syntax unified
	.arm
	.fpu softvfp
	.type	sgn, %function
sgn:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L11
	mov	r3, #1
	b	.L13
.L11:
	mvn	r3, #0
.L13:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	sgn, .-sgn
	.align	2
	.global	abv
	.syntax unified
	.arm
	.fpu softvfp
	.type	abv, %function
abv:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	rsblt	r3, r3, #0
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	abv, .-abv
	.align	2
	.global	clrscr
	.syntax unified
	.arm
	.fpu softvfp
	.type	clrscr, %function
clrscr:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L17
.L18:
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L17:
	ldr	r3, [fp, #-8]
	cmp	r3, #39
	ble	.L18
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	clrscr, .-clrscr
	.global	board
	.data
	.align	2
	.type	board, %object
	.size	board, 64
board:
	.ascii	"rnbqkbnr"
	.ascii	"pppppppp"
	.ascii	"        "
	.ascii	"        "
	.ascii	"        "
	.ascii	"        "
	.ascii	"PPPPPPPP"
	.ascii	"RNBQKBNR"
	.section	.rodata
	.align	2
.LC7:
	.ascii	"\012==============================================="
	.ascii	"==================================================="
	.ascii	"===========\000"
	.align	2
.LC8:
	.ascii	"||        _______   ______   ____     __    __   _ "
	.ascii	"  _     _     __     _                             "
	.ascii	"     ||\000"
	.align	2
.LC9:
	.ascii	"||       |__   __| | _____| |  _ \\   |  \\  /  | ["
	.ascii	"_] | \\   | |   /  \\   | |             ___/\\     "
	.ascii	"          ||\000"
	.align	2
.LC10:
	.ascii	"||          | |    | |___   | |_/ /  |   \\/   | | "
	.ascii	"| |   \\ | |  / /\\ \\  | |            /   ^/\\    "
	.ascii	"          ||\000"
	.align	2
.LC11:
	.ascii	"||          | |    |  ___|  |    /   | |\\  /| | | "
	.ascii	"| | |\\ \\| | | |__| | | |           /     /|\\    "
	.ascii	"         ||\000"
	.align	2
.LC12:
	.ascii	"||          | |    | |____  | |\\ \\   | | \\/ | | "
	.ascii	"| | | | \\   | |  __  | | |___       /  o    /|\\  "
	.ascii	"          ||\000"
	.align	2
.LC13:
	.ascii	"||          |_|    |______| |_| \\_\\  |_|    |_| |"
	.ascii	"_| |_|   \\_| |_|  |_| |_____|     /         /|\\  "
	.ascii	"         ||\000"
	.align	2
.LC14:
	.ascii	"||                                                 "
	.ascii	"                               /    __/    /|\\    "
	.ascii	"      ||\000"
	.align	2
.LC15:
	.ascii	"||        _________    _____    _____  ____________"
	.ascii	"       _____         _____    |    /\\       /|    "
	.ascii	"      ||\000"
	.align	2
.LC16:
	.ascii	"||       /         \\   \\   /    \\   /  \\       "
	.ascii	"   /      /     \\       /     \\    \\_//  \\     "
	.ascii	"   \\         ||\000"
	.align	2
.LC17:
	.ascii	"||      /   ______  |  |   |    |   |  |  _______/ "
	.ascii	"     /   /\\__\\     /   /\\__\\         /        |"
	.ascii	"         ||\000"
	.align	2
.LC18:
	.ascii	"||     /   /      \\_|  |   |    |   |  |  |       "
	.ascii	"     /   /         /   /            _/         \\  "
	.ascii	"       ||\000"
	.align	2
.LC19:
	.ascii	"||     |   |           |   |____|   |  |  |______  "
	.ascii	"    \\   \\____     \\   \\____       /            "
	.ascii	"\\        ||\000"
	.align	2
.LC20:
	.ascii	"||     |   |           |            |  |        /  "
	.ascii	"     \\____   \\     \\____   \\     /             "
	.ascii	" \\       ||\000"
	.align	2
.LC21:
	.ascii	"||     |   |           |   ______   |  |  _____/   "
	.ascii	"          \\   \\         \\   \\    \\_____    ___"
	.ascii	"__/       ||\000"
	.align	2
.LC22:
	.ascii	"||     |   |       _   |   |    |   |  |  |        "
	.ascii	"   ____   /   /  ____   /   /         /    \\      "
	.ascii	"      ||\000"
	.align	2
.LC23:
	.ascii	"||     \\   \\______/ |  |   |    |   |  |  |______"
	.ascii	"_    |   \\_/   /   |   \\_/   /          \\    /  "
	.ascii	"          ||\000"
	.align	2
.LC24:
	.ascii	"||      \\           |  |   |    |   |  |          "
	.ascii	"\\    \\       /     \\       /        __//    \\\\"
	.ascii	"__         ||\000"
	.align	2
.LC25:
	.ascii	"||       \\_________/   /___\\    /___\\  /________"
	.ascii	"___\\    \\____ /       \\____ /        /          "
	.ascii	"  \\        ||\000"
	.align	2
.LC26:
	.ascii	"||                                                 "
	.ascii	"                                 [==__________==]  "
	.ascii	"     ||\000"
	.align	2
.LC27:
	.ascii	"||                                                 "
	.ascii	"                                                   "
	.ascii	"     ||\000"
	.align	2
.LC28:
	.ascii	"||                                                 "
	.ascii	"                                @ Tobiasz Fic 2021 "
	.ascii	"     ||\000"
	.align	2
.LC29:
	.ascii	"==================================================="
	.ascii	"==================================================="
	.ascii	"=======\012\000"
	.text
	.align	2
	.global	printlogo
	.syntax unified
	.arm
	.fpu softvfp
	.type	printlogo, %function
printlogo:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	clrscr
	ldr	r0, .L22
	bl	puts
	ldr	r0, .L22+4
	bl	puts
	ldr	r0, .L22+8
	bl	puts
	ldr	r0, .L22+12
	bl	puts
	ldr	r0, .L22+16
	bl	puts
	ldr	r0, .L22+20
	bl	puts
	ldr	r0, .L22+24
	bl	puts
	ldr	r0, .L22+28
	bl	puts
	ldr	r0, .L22+32
	bl	puts
	ldr	r0, .L22+36
	bl	puts
	ldr	r0, .L22+40
	bl	puts
	ldr	r0, .L22+44
	bl	puts
	ldr	r0, .L22+48
	bl	puts
	ldr	r0, .L22+52
	bl	puts
	ldr	r0, .L22+56
	bl	puts
	ldr	r0, .L22+60
	bl	puts
	ldr	r0, .L22+64
	bl	puts
	ldr	r0, .L22+68
	bl	puts
	ldr	r0, .L22+72
	bl	puts
	ldr	r0, .L22+76
	bl	puts
	ldr	r0, .L22+80
	bl	puts
	ldr	r0, .L22+84
	bl	puts
	ldr	r0, .L22+88
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L20
.L21:
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L20:
	ldr	r3, [fp, #-8]
	cmp	r3, #4
	ble	.L21
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.size	printlogo, .-printlogo
	.section	.rodata
	.align	2
.LC30:
	.ascii	"\012\011___________________________________________"
	.ascii	"_______________________________________\000"
	.align	2
.LC31:
	.ascii	"\011|   |                                          "
	.ascii	"                              |   |\000"
	.align	2
.LC32:
	.ascii	"\011|   ||   A   ||   B   ||   C   ||   D   ||   E "
	.ascii	"  ||   F   ||   G   ||   H   ||   |\000"
	.align	2
.LC33:
	.ascii	"\011|___|__________________________________________"
	.ascii	"______________________________|___|\000"
	.align	2
.LC34:
	.ascii	"\011|   |         XXXXXXXXX         XXXXXXXXX      "
	.ascii	"   XXXXXXXXX         XXXXXXXXX|   |\000"
	.align	2
.LC35:
	.ascii	"\011|   |         X       X         X       X      "
	.ascii	"   X       X         X       X|   |\000"
	.align	2
.LC36:
	.ascii	"\011| 8 |    %c    X   %c   X    %c    X   %c   X  "
	.ascii	"  %c    X   %c   X    %c    X   %c   X| 8 |\012\000"
	.align	2
.LC37:
	.ascii	"\011|___|         XXXXXXXXX         XXXXXXXXX      "
	.ascii	"   XXXXXXXXX         XXXXXXXXX|___|\000"
	.align	2
.LC38:
	.ascii	"\011|   |XXXXXXXXX         XXXXXXXXX         XXXXXX"
	.ascii	"XXX         XXXXXXXXX         |   |\000"
	.align	2
.LC39:
	.ascii	"\011|   |X       X         X       X         X     "
	.ascii	"  X         X       X         |   |\000"
	.align	2
.LC40:
	.ascii	"\011| 7 |X   %c   X    %c    X   %c   X    %c    X "
	.ascii	"  %c   X    %c    X   %c   X    %c    | 7 |\012\000"
	.align	2
.LC41:
	.ascii	"\011|___|XXXXXXXXX         XXXXXXXXX         XXXXXX"
	.ascii	"XXX         XXXXXXXXX         |___|\000"
	.align	2
.LC42:
	.ascii	"\011| 6 |    %c    X   %c   X    %c    X   %c   X  "
	.ascii	"  %c    X   %c   X    %c    X   %c   X| 6 |\012\000"
	.align	2
.LC43:
	.ascii	"\011| 5 |X   %c   X    %c    X   %c   X    %c    X "
	.ascii	"  %c   X    %c    X   %c   X    %c    | 5 |\012\000"
	.align	2
.LC44:
	.ascii	"\011| 4 |    %c    X   %c   X    %c    X   %c   X  "
	.ascii	"  %c    X   %c   X    %c    X   %c   X| 4 |\012\000"
	.align	2
.LC45:
	.ascii	"\011| 3 |X   %c   X    %c    X   %c   X    %c    X "
	.ascii	"  %c   X    %c    X   %c   X    %c    | 3 |\012\000"
	.align	2
.LC46:
	.ascii	"\011| 2 |    %c    X   %c   X    %c    X   %c   X  "
	.ascii	"  %c    X   %c   X    %c    X   %c   X| 2 |\012\000"
	.align	2
.LC47:
	.ascii	"\011| 1 |X   %c   X    %c    X   %c   X    %c    X "
	.ascii	"  %c   X    %c    X   %c   X    %c    | 1 |\012\000"
	.align	2
.LC48:
	.ascii	"\011|___|XXXXXXXXX_________XXXXXXXXX_________XXXXXX"
	.ascii	"XXX_________XXXXXXXXX_________|___|\000"
	.text
	.align	2
	.global	printboard
	.syntax unified
	.arm
	.fpu softvfp
	.type	printboard, %function
printboard:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	bl	clrscr
	ldr	r0, .L25
	bl	puts
	ldr	r0, .L25+4
	bl	puts
	ldr	r0, .L25+8
	bl	puts
	ldr	r0, .L25+12
	bl	puts
	ldr	r0, .L25+16
	bl	puts
	ldr	r0, .L25+20
	bl	puts
	ldr	r3, .L25+24
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	lr, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mov	r4, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mov	r5, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #4]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #5]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #6]	@ zero_extendqisi2
	mov	ip, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #7]	@ zero_extendqisi2
	str	r3, [sp, #16]
	str	ip, [sp, #12]
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	str	r2, [sp]
	mov	r3, r5
	mov	r2, r4
	mov	r1, lr
	ldr	r0, .L25+28
	bl	printf
	ldr	r0, .L25+20
	bl	puts
	ldr	r0, .L25+32
	bl	puts
	ldr	r0, .L25+36
	bl	puts
	ldr	r0, .L25+40
	bl	puts
	ldr	r3, .L25+24
	ldrb	r3, [r3, #8]	@ zero_extendqisi2
	mov	lr, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #9]	@ zero_extendqisi2
	mov	r4, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #10]	@ zero_extendqisi2
	mov	r5, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #11]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #13]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #14]	@ zero_extendqisi2
	mov	ip, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #15]	@ zero_extendqisi2
	str	r3, [sp, #16]
	str	ip, [sp, #12]
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	str	r2, [sp]
	mov	r3, r5
	mov	r2, r4
	mov	r1, lr
	ldr	r0, .L25+44
	bl	printf
	ldr	r0, .L25+40
	bl	puts
	ldr	r0, .L25+48
	bl	puts
	ldr	r0, .L25+16
	bl	puts
	ldr	r0, .L25+20
	bl	puts
	ldr	r3, .L25+24
	ldrb	r3, [r3, #16]	@ zero_extendqisi2
	mov	lr, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #17]	@ zero_extendqisi2
	mov	r4, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #18]	@ zero_extendqisi2
	mov	r5, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #19]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #20]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #21]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #22]	@ zero_extendqisi2
	mov	ip, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #23]	@ zero_extendqisi2
	str	r3, [sp, #16]
	str	ip, [sp, #12]
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	str	r2, [sp]
	mov	r3, r5
	mov	r2, r4
	mov	r1, lr
	ldr	r0, .L25+52
	bl	printf
	ldr	r0, .L25+20
	bl	puts
	ldr	r0, .L25+32
	bl	puts
	ldr	r0, .L25+36
	bl	puts
	ldr	r0, .L25+40
	bl	puts
	ldr	r3, .L25+24
	ldrb	r3, [r3, #24]	@ zero_extendqisi2
	mov	lr, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #25]	@ zero_extendqisi2
	mov	r4, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #26]	@ zero_extendqisi2
	mov	r5, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #27]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #28]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #29]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #30]	@ zero_extendqisi2
	mov	ip, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #31]	@ zero_extendqisi2
	str	r3, [sp, #16]
	str	ip, [sp, #12]
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	str	r2, [sp]
	mov	r3, r5
	mov	r2, r4
	mov	r1, lr
	ldr	r0, .L25+56
	bl	printf
	ldr	r0, .L25+40
	bl	puts
	ldr	r0, .L25+48
	bl	puts
	ldr	r0, .L25+16
	bl	puts
	ldr	r0, .L25+20
	bl	puts
	ldr	r3, .L25+24
	ldrb	r3, [r3, #32]	@ zero_extendqisi2
	mov	lr, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #33]	@ zero_extendqisi2
	mov	r4, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #34]	@ zero_extendqisi2
	mov	r5, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #35]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #36]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #37]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #38]	@ zero_extendqisi2
	mov	ip, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #39]	@ zero_extendqisi2
	str	r3, [sp, #16]
	str	ip, [sp, #12]
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	str	r2, [sp]
	mov	r3, r5
	mov	r2, r4
	mov	r1, lr
	ldr	r0, .L25+60
	bl	printf
	ldr	r0, .L25+20
	bl	puts
	ldr	r0, .L25+32
	bl	puts
	ldr	r0, .L25+36
	bl	puts
	ldr	r0, .L25+40
	bl	puts
	ldr	r3, .L25+24
	ldrb	r3, [r3, #40]	@ zero_extendqisi2
	mov	lr, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #41]	@ zero_extendqisi2
	mov	r4, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #42]	@ zero_extendqisi2
	mov	r5, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #43]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #44]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #45]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #46]	@ zero_extendqisi2
	mov	ip, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #47]	@ zero_extendqisi2
	str	r3, [sp, #16]
	str	ip, [sp, #12]
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	str	r2, [sp]
	mov	r3, r5
	mov	r2, r4
	mov	r1, lr
	ldr	r0, .L25+64
	bl	printf
	ldr	r0, .L25+40
	bl	puts
	ldr	r0, .L25+48
	bl	puts
	ldr	r0, .L25+16
	bl	puts
	ldr	r0, .L25+20
	bl	puts
	ldr	r3, .L25+24
	ldrb	r3, [r3, #48]	@ zero_extendqisi2
	mov	lr, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #49]	@ zero_extendqisi2
	mov	r4, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #50]	@ zero_extendqisi2
	mov	r5, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #51]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #52]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #53]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #54]	@ zero_extendqisi2
	mov	ip, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #55]	@ zero_extendqisi2
	str	r3, [sp, #16]
	str	ip, [sp, #12]
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	str	r2, [sp]
	mov	r3, r5
	mov	r2, r4
	mov	r1, lr
	ldr	r0, .L25+68
	bl	printf
	ldr	r0, .L25+20
	bl	puts
	ldr	r0, .L25+32
	bl	puts
	ldr	r0, .L25+36
	bl	puts
	ldr	r0, .L25+40
	bl	puts
	ldr	r3, .L25+24
	ldrb	r3, [r3, #56]	@ zero_extendqisi2
	mov	lr, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #57]	@ zero_extendqisi2
	mov	r4, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #58]	@ zero_extendqisi2
	mov	r5, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #59]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #60]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #61]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #62]	@ zero_extendqisi2
	mov	ip, r3
	ldr	r3, .L25+24
	ldrb	r3, [r3, #63]	@ zero_extendqisi2
	str	r3, [sp, #16]
	str	ip, [sp, #12]
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	str	r2, [sp]
	mov	r3, r5
	mov	r2, r4
	mov	r1, lr
	ldr	r0, .L25+72
	bl	printf
	ldr	r0, .L25+40
	bl	puts
	ldr	r0, .L25+76
	bl	puts
	ldr	r0, .L25+4
	bl	puts
	ldr	r0, .L25+8
	bl	puts
	ldr	r0, .L25+12
	bl	puts
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	board
	.word	.LC36
	.word	.LC37
	.word	.LC38
	.word	.LC39
	.word	.LC40
	.word	.LC41
	.word	.LC42
	.word	.LC43
	.word	.LC44
	.word	.LC45
	.word	.LC46
	.word	.LC47
	.word	.LC48
	.size	printboard, .-printboard
	.section	.rodata
	.align	2
.LC0:
	.ascii	"rnbqkbnr"
	.ascii	"pppppppp"
	.ascii	"        "
	.ascii	"        "
	.ascii	"        "
	.ascii	"        "
	.ascii	"PPPPPPPP"
	.ascii	"RNBQKBNR"
	.align	2
.LC49:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	initializeBoard
	.syntax unified
	.arm
	.fpu softvfp
	.type	initializeBoard, %function
initializeBoard:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L33+4
	sub	ip, fp, #72
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	mov	r3, #0
	str	r3, [fp, #-80]
	b	.L28
.L31:
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L29
.L30:
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r2, r2, r3
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	sub	r3, r3, #68
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldr	r2, .L33+8
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L29:
	ldr	r3, [fp, #-76]
	cmp	r3, #7
	ble	.L30
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
.L28:
	ldr	r3, [fp, #-80]
	cmp	r3, #7
	ble	.L31
	nop
	ldr	r3, .L33
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L32
	bl	__stack_chk_fail
.L32:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC49
	.word	.LC0
	.word	board
	.size	initializeBoard, .-initializeBoard
	.global	whitepieces
	.data
	.align	2
	.type	whitepieces, %object
	.size	whitepieces, 6
whitepieces:
	.ascii	"PRNBKQ"
	.global	blackpieces
	.align	2
	.type	blackpieces, %object
	.size	blackpieces, 6
blackpieces:
	.ascii	"prnbkq"
	.global	whiteKingLocation
	.align	2
	.type	whiteKingLocation, %object
	.size	whiteKingLocation, 8
whiteKingLocation:
	.word	7
	.word	4
	.global	blackKingLocation
	.align	2
	.type	blackKingLocation, %object
	.size	blackKingLocation, 8
blackKingLocation:
	.word	0
	.word	4
	.global	canShortCastleWhite
	.align	2
	.type	canShortCastleWhite, %object
	.size	canShortCastleWhite, 4
canShortCastleWhite:
	.word	1
	.global	canLongCastleWhite
	.align	2
	.type	canLongCastleWhite, %object
	.size	canLongCastleWhite, 4
canLongCastleWhite:
	.word	1
	.global	canShortCastleBlack
	.align	2
	.type	canShortCastleBlack, %object
	.size	canShortCastleBlack, 4
canShortCastleBlack:
	.word	1
	.global	canLongCastleBlack
	.align	2
	.type	canLongCastleBlack, %object
	.size	canLongCastleBlack, 4
canLongCastleBlack:
	.word	1
	.comm	attackingPieceWhite,8,4
	.comm	attackingPieceBlack,8,4
	.global	turn
	.bss
	.align	2
	.type	turn, %object
	.size	turn, 4
turn:
	.space	4
	.section	.rodata
	.align	2
.LC50:
	.ascii	"\012 save current game? \012 (Y/N)\012\011>\000"
	.align	2
.LC51:
	.ascii	"%c\000"
	.align	2
.LC52:
	.ascii	"a\000"
	.align	2
.LC53:
	.ascii	"ChessData.txt\000"
	.align	2
.LC54:
	.ascii	"r+\000"
	.align	2
.LC55:
	.ascii	"Unable to open file.\000"
	.align	2
.LC56:
	.ascii	"Saved games:\000"
	.align	2
.LC57:
	.ascii	"\012\011You have no saved games yet!\000"
	.align	2
.LC58:
	.ascii	"\011%d. \000"
	.align	2
.LC59:
	.ascii	"\012 Pick a name for the current save (less than 32"
	.ascii	" characters): \012\011>\000"
	.align	2
.LC60:
	.ascii	"%s\000"
	.align	2
.LC61:
	.ascii	"%.32s\012\000"
	.align	2
.LC62:
	.ascii	"%d %d %d %d %d %d %d %d %d\012\000"
	.align	2
.LC63:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	saveGame
	.syntax unified
	.arm
	.fpu softvfp
	.type	saveGame, %function
saveGame:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #172
	ldr	r3, .L61
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r0, .L61+4
	bl	printf
.L37:
	sub	r3, fp, #150
	mov	r1, r3
	ldr	r0, .L61+8
	bl	__isoc99_scanf
	ldrb	r3, [fp, #-150]	@ zero_extendqisi2
	cmp	r3, #89
	beq	.L36
	ldrb	r3, [fp, #-150]	@ zero_extendqisi2
	cmp	r3, #78
	beq	.L36
	b	.L37
.L36:
	ldrb	r3, [fp, #-150]	@ zero_extendqisi2
	cmp	r3, #78
	bne	.L38
	mov	r3, #0
	b	.L58
.L38:
	ldr	r1, .L61+12
	ldr	r0, .L61+16
	bl	fopen
	str	r0, [fp, #-124]
	ldr	r0, [fp, #-124]
	bl	fclose
	ldr	r1, .L61+20
	ldr	r0, .L61+16
	bl	fopen
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-124]
	cmp	r3, #0
	bne	.L40
	ldr	r0, .L61+24
	bl	printf
	b	.L41
.L40:
	ldr	r0, .L61+28
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-148]
	sub	r3, fp, #56
	ldr	r2, [fp, #-124]
	mov	r1, #32
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L42
	ldr	r0, .L61+32
	bl	puts
.L42:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-124]
	bl	fseek
	b	.L43
.L48:
	ldr	r1, [fp, #-148]
	ldr	r0, .L61+36
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L44
.L47:
	sub	r2, fp, #56
	ldr	r3, [fp, #-144]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-149]
	ldrb	r3, [fp, #-149]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L60
	ldrb	r3, [fp, #-149]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L44:
	ldr	r3, [fp, #-144]
	cmp	r3, #31
	ble	.L47
	b	.L46
.L60:
	nop
.L46:
	mov	r2, #1
	mov	r1, #84
	ldr	r0, [fp, #-124]
	bl	fseek
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-148]
	add	r3, r3, #1
	str	r3, [fp, #-148]
.L43:
	sub	r3, fp, #56
	ldr	r2, [fp, #-124]
	mov	r1, #32
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L48
.L41:
	ldr	r0, .L61+40
	bl	printf
	sub	r3, fp, #120
	mov	r1, r3
	ldr	r0, .L61+44
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-140]
	b	.L49
.L52:
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L50
.L51:
	ldr	r3, [fp, #-140]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-136]
	add	r3, r2, r3
	ldr	r1, .L61+48
	ldr	r2, [fp, #-140]
	lsl	r2, r2, #3
	add	r1, r1, r2
	ldr	r2, [fp, #-136]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	sub	r1, fp, #20
	add	r3, r1, r3
	strb	r2, [r3, #-68]
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L50:
	ldr	r3, [fp, #-136]
	cmp	r3, #7
	ble	.L51
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L49:
	ldr	r3, [fp, #-140]
	cmp	r3, #3
	ble	.L52
	mov	r3, #4
	str	r3, [fp, #-132]
	b	.L53
.L56:
	mov	r3, #0
	str	r3, [fp, #-128]
	b	.L54
.L55:
	ldr	r3, [fp, #-132]
	sub	r3, r3, #4
	lsl	r2, r3, #3
	ldr	r3, [fp, #-128]
	add	r3, r2, r3
	ldr	r1, .L61+48
	ldr	r2, [fp, #-132]
	lsl	r2, r2, #3
	add	r1, r1, r2
	ldr	r2, [fp, #-128]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	sub	r1, fp, #20
	add	r3, r1, r3
	strb	r2, [r3, #-36]
	ldr	r3, [fp, #-128]
	add	r3, r3, #1
	str	r3, [fp, #-128]
.L54:
	ldr	r3, [fp, #-128]
	cmp	r3, #7
	ble	.L55
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L53:
	ldr	r3, [fp, #-132]
	cmp	r3, #7
	ble	.L56
	ldr	r3, [fp, #-124]
	cmp	r3, #0
	beq	.L57
	sub	r3, fp, #120
	mov	r2, r3
	ldr	r1, .L61+52
	ldr	r0, [fp, #-124]
	bl	fprintf
	sub	r3, fp, #88
	mov	r2, r3
	ldr	r1, .L61+52
	ldr	r0, [fp, #-124]
	bl	fprintf
	sub	r3, fp, #56
	mov	r2, r3
	ldr	r1, .L61+52
	ldr	r0, [fp, #-124]
	bl	fprintf
	ldr	r3, .L61+56
	ldr	r5, [r3]
	ldr	r3, .L61+56
	ldr	r6, [r3, #4]
	ldr	r3, .L61+60
	ldr	r3, [r3]
	ldr	r2, .L61+60
	ldr	r2, [r2, #4]
	ldr	r1, .L61+64
	ldr	r1, [r1]
	ldr	r0, .L61+68
	ldr	r0, [r0]
	ldr	ip, .L61+72
	ldr	ip, [ip]
	ldr	lr, .L61+76
	ldr	lr, [lr]
	ldr	r4, .L61+80
	ldr	r4, [r4]
	str	r4, [sp, #24]
	str	lr, [sp, #20]
	str	ip, [sp, #16]
	str	r0, [sp, #12]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	ldr	r1, .L61+84
	ldr	r0, [fp, #-124]
	bl	fprintf
.L57:
	ldr	r0, [fp, #-124]
	bl	fclose
	mov	r3, #1
.L58:
	ldr	r2, .L61
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L59
	bl	__stack_chk_fail
.L59:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L62:
	.align	2
.L61:
	.word	.LC63
	.word	.LC50
	.word	.LC51
	.word	.LC52
	.word	.LC53
	.word	.LC54
	.word	.LC55
	.word	.LC56
	.word	.LC57
	.word	.LC58
	.word	.LC59
	.word	.LC60
	.word	board
	.word	.LC61
	.word	whiteKingLocation
	.word	blackKingLocation
	.word	canShortCastleWhite
	.word	canLongCastleWhite
	.word	canShortCastleBlack
	.word	canLongCastleBlack
	.word	turn
	.word	.LC62
	.size	saveGame, .-saveGame
	.section	.rodata
	.align	2
.LC64:
	.ascii	"\012\012You have no saved games yet! Press Q to qui"
	.ascii	"t:\000"
	.align	2
.LC65:
	.ascii	"\012\011>\000"
	.align	2
.LC66:
	.ascii	" %c\000"
	.align	2
.LC67:
	.ascii	"\012 Pick a game to load (press 0 to go back to the"
	.ascii	" menu): \012\011>\000"
	.align	2
.LC68:
	.ascii	"%d\000"
	.align	2
.LC69:
	.ascii	"\012\011%d \011%d \012\011%d \011%d \012\011%d \011"
	.ascii	"%d \012\011%d \011%d \012\011%d\012\000"
	.align	2
.LC70:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	loadGame
	.syntax unified
	.arm
	.fpu softvfp
	.type	loadGame, %function
loadGame:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #188
	ldr	r3, .L103
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-160]
	ldr	r1, .L103+4
	ldr	r0, .L103+8
	bl	fopen
	str	r0, [fp, #-124]
	ldr	r0, [fp, #-124]
	bl	fclose
	ldr	r1, .L103+12
	ldr	r0, .L103+8
	bl	fopen
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-124]
	cmp	r3, #0
	bne	.L64
	ldr	r0, .L103+16
	bl	printf
	b	.L65
.L64:
	ldr	r0, .L103+20
	bl	puts
	sub	r3, fp, #56
	ldr	r2, [fp, #-124]
	mov	r1, #32
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L66
	ldr	r0, .L103+24
	bl	puts
	mov	r3, #66
	strb	r3, [fp, #-164]
.L69:
	ldr	r0, .L103+28
	bl	printf
	sub	r3, fp, #164
	mov	r1, r3
	ldr	r0, .L103+32
	bl	__isoc99_scanf
	ldrb	r3, [fp, #-164]	@ zero_extendqisi2
	cmp	r3, #81
	bne	.L69
	mov	r3, #1
	b	.L98
.L66:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-124]
	bl	fseek
	b	.L70
.L75:
	ldr	r1, [fp, #-160]
	ldr	r0, .L103+36
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L71
.L74:
	sub	r2, fp, #56
	ldr	r3, [fp, #-156]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-167]
	ldrb	r3, [fp, #-167]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L100
	ldrb	r3, [fp, #-167]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L71:
	ldr	r3, [fp, #-156]
	cmp	r3, #31
	ble	.L74
	b	.L73
.L100:
	nop
.L73:
	mov	r2, #1
	mov	r1, #84
	ldr	r0, [fp, #-124]
	bl	fseek
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-160]
	add	r3, r3, #1
	str	r3, [fp, #-160]
.L70:
	sub	r3, fp, #56
	ldr	r2, [fp, #-124]
	mov	r1, #32
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L75
.L65:
	mvn	r3, #1
	str	r3, [fp, #-164]
	b	.L76
.L77:
	ldr	r0, .L103+40
	bl	printf
	sub	r3, fp, #164
	mov	r1, r3
	ldr	r0, .L103+44
	bl	__isoc99_scanf
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	bne	.L76
	mov	r3, #1
	b	.L98
.L76:
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	blt	.L77
	ldr	r3, [fp, #-164]
	ldr	r2, [fp, #-160]
	cmp	r2, r3
	ble	.L77
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-124]
	bl	fseek
	mov	r3, #1
	str	r3, [fp, #-152]
	b	.L78
.L83:
	sub	r3, fp, #120
	ldr	r2, [fp, #-124]
	mov	r1, #32
	mov	r0, r3
	bl	fgets
	mov	r3, #0
	str	r3, [fp, #-148]
	b	.L79
.L82:
	sub	r2, fp, #120
	ldr	r3, [fp, #-148]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-165]
	ldrb	r3, [fp, #-165]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L101
	ldr	r3, [fp, #-148]
	add	r3, r3, #1
	str	r3, [fp, #-148]
.L79:
	ldr	r3, [fp, #-148]
	cmp	r3, #31
	ble	.L82
	b	.L81
.L101:
	nop
.L81:
	mov	r2, #1
	mov	r1, #84
	ldr	r0, [fp, #-124]
	bl	fseek
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L78:
	ldr	r3, [fp, #-164]
	ldr	r2, [fp, #-152]
	cmp	r2, r3
	blt	.L83
	sub	r3, fp, #120
	ldr	r2, [fp, #-124]
	mov	r1, #32
	mov	r0, r3
	bl	fgets
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L84
.L87:
	sub	r2, fp, #120
	ldr	r3, [fp, #-144]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-166]
	ldrb	r3, [fp, #-166]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L102
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L84:
	ldr	r3, [fp, #-144]
	cmp	r3, #31
	ble	.L87
	b	.L86
.L102:
	nop
.L86:
	sub	r3, fp, #88
	ldr	r2, [fp, #-124]
	mov	r1, #33
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	beq	.L88
	mov	r3, #0
	str	r3, [fp, #-140]
	b	.L89
.L92:
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L90
.L91:
	ldr	r3, [fp, #-140]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-136]
	add	r3, r2, r3
	sub	r2, fp, #20
	add	r3, r2, r3
	ldrb	r1, [r3, #-68]	@ zero_extendqisi2
	ldr	r2, .L103+48
	ldr	r3, [fp, #-140]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-136]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L90:
	ldr	r3, [fp, #-136]
	cmp	r3, #7
	ble	.L91
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L89:
	ldr	r3, [fp, #-140]
	cmp	r3, #3
	ble	.L92
.L88:
	mov	r2, #1
	mov	r1, #1
	ldr	r0, [fp, #-124]
	bl	fseek
	sub	r3, fp, #56
	ldr	r2, [fp, #-124]
	mov	r1, #33
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	beq	.L93
	mov	r3, #0
	str	r3, [fp, #-132]
	b	.L94
.L97:
	mov	r3, #0
	str	r3, [fp, #-128]
	b	.L95
.L96:
	ldr	r3, [fp, #-132]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-128]
	add	r2, r2, r3
	ldr	r3, [fp, #-132]
	add	r3, r3, #4
	sub	r1, fp, #20
	add	r2, r1, r2
	ldrb	r1, [r2, #-36]	@ zero_extendqisi2
	ldr	r2, .L103+48
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-128]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-128]
	add	r3, r3, #1
	str	r3, [fp, #-128]
.L95:
	ldr	r3, [fp, #-128]
	cmp	r3, #7
	ble	.L96
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L94:
	ldr	r3, [fp, #-132]
	cmp	r3, #3
	ble	.L97
.L93:
	ldr	r3, .L103+52
	str	r3, [sp, #24]
	ldr	r3, .L103+56
	str	r3, [sp, #20]
	ldr	r3, .L103+60
	str	r3, [sp, #16]
	ldr	r3, .L103+64
	str	r3, [sp, #12]
	ldr	r3, .L103+68
	str	r3, [sp, #8]
	ldr	r3, .L103+72
	str	r3, [sp, #4]
	ldr	r3, .L103+76
	str	r3, [sp]
	ldr	r3, .L103+80
	ldr	r2, .L103+84
	ldr	r1, .L103+88
	ldr	r0, [fp, #-124]
	bl	__isoc99_fscanf
	ldr	r0, [fp, #-124]
	bl	fclose
	ldr	r3, .L103+84
	ldr	r4, [r3]
	ldr	r3, .L103+84
	ldr	r5, [r3, #4]
	ldr	r3, .L103+76
	ldr	r6, [r3]
	ldr	r3, .L103+76
	ldr	r3, [r3, #4]
	ldr	r2, .L103+68
	ldr	r2, [r2]
	ldr	r1, .L103+64
	ldr	r1, [r1]
	ldr	r0, .L103+60
	ldr	r0, [r0]
	ldr	ip, .L103+56
	ldr	ip, [ip]
	ldr	lr, .L103+52
	ldr	lr, [lr]
	str	lr, [sp, #20]
	str	ip, [sp, #16]
	str	r0, [sp, #12]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	mov	r1, r4
	ldr	r0, .L103+92
	bl	printf
	mov	r3, #0
.L98:
	ldr	r2, .L103
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L99
	bl	__stack_chk_fail
.L99:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L104:
	.align	2
.L103:
	.word	.LC70
	.word	.LC52
	.word	.LC53
	.word	.LC54
	.word	.LC55
	.word	.LC56
	.word	.LC64
	.word	.LC65
	.word	.LC66
	.word	.LC58
	.word	.LC67
	.word	.LC68
	.word	board
	.word	turn
	.word	canLongCastleBlack
	.word	canShortCastleBlack
	.word	canLongCastleWhite
	.word	canShortCastleWhite
	.word	blackKingLocation+4
	.word	blackKingLocation
	.word	whiteKingLocation+4
	.word	whiteKingLocation
	.word	.LC62
	.word	.LC69
	.size	loadGame, .-loadGame
	.section	.rodata
	.align	2
.LC71:
	.ascii	"r\000"
	.align	2
.LC72:
	.ascii	"\012\011You have no saved games yet!\012Press Q to "
	.ascii	"quit:\012\012\011>\000"
	.align	2
.LC73:
	.ascii	"\012 Are you sure you want to delete all saved game"
	.ascii	"s?(this cannot be undone) \012 (Y/N)\012\011>\000"
	.align	2
.LC74:
	.ascii	"w+\000"
	.align	2
.LC75:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	clearMemory
	.syntax unified
	.arm
	.fpu softvfp
	.type	clearMemory, %function
clearMemory:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L120
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L120+4
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-52]
	ldr	r1, .L120+8
	ldr	r0, .L120+12
	bl	fopen
	str	r0, [fp, #-44]
	sub	r3, fp, #40
	ldr	r2, [fp, #-44]
	mov	r1, #32
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L106
	ldr	r0, .L120+16
	bl	printf
.L106:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-44]
	bl	fseek
	b	.L107
.L112:
	ldr	r1, [fp, #-52]
	ldr	r0, .L120+20
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L108
.L111:
	sub	r2, fp, #40
	ldr	r3, [fp, #-48]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-53]
	ldrb	r3, [fp, #-53]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L119
	ldrb	r3, [fp, #-53]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L108:
	ldr	r3, [fp, #-48]
	cmp	r3, #31
	ble	.L111
	b	.L110
.L119:
	nop
.L110:
	mov	r2, #1
	mov	r1, #84
	ldr	r0, [fp, #-44]
	bl	fseek
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L107:
	sub	r3, fp, #40
	ldr	r2, [fp, #-44]
	mov	r1, #32
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L112
	ldr	r0, [fp, #-44]
	bl	fclose
	ldr	r0, .L120+24
	bl	printf
.L114:
	sub	r3, fp, #54
	mov	r1, r3
	ldr	r0, .L120+28
	bl	__isoc99_scanf
	ldrb	r3, [fp, #-54]	@ zero_extendqisi2
	cmp	r3, #89
	beq	.L113
	ldrb	r3, [fp, #-54]	@ zero_extendqisi2
	cmp	r3, #78
	beq	.L113
	b	.L114
.L113:
	ldrb	r3, [fp, #-54]	@ zero_extendqisi2
	cmp	r3, #78
	bne	.L115
	mov	r3, #1
	b	.L117
.L115:
	ldr	r1, .L120+32
	ldr	r0, .L120+12
	bl	fopen
	str	r0, [fp, #-44]
	ldr	r0, [fp, #-44]
	bl	fclose
	mov	r3, #0
.L117:
	ldr	r2, .L120
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L118
	bl	__stack_chk_fail
.L118:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L121:
	.align	2
.L120:
	.word	.LC75
	.word	.LC56
	.word	.LC71
	.word	.LC53
	.word	.LC72
	.word	.LC58
	.word	.LC73
	.word	.LC51
	.word	.LC74
	.size	clearMemory, .-clearMemory
	.section	.rodata
	.align	2
.LC76:
	.ascii	"==================================================="
	.ascii	"=====================================\000"
	.align	2
.LC77:
	.ascii	"\011\011MANUAL:\012\000"
	.align	2
.LC78:
	.ascii	"\011PIECE SIGNIFICANCE\000"
	.align	2
.LC79:
	.ascii	" Black pieces are lowercase letters, white pieces a"
	.ascii	"re uppercase letters, as follows:\012\000"
	.align	2
.LC80:
	.ascii	"\011 p/P - pawn\000"
	.align	2
.LC81:
	.ascii	"\011 n/N - knight\000"
	.align	2
.LC82:
	.ascii	"\011 b/B - bishop\000"
	.align	2
.LC83:
	.ascii	"\011 r/R - rook\000"
	.align	2
.LC84:
	.ascii	"\011 q/Q - queen\000"
	.align	2
.LC85:
	.ascii	"\011 k/K - king\000"
	.align	2
.LC86:
	.ascii	" The author makes a supposition that the player kno"
	.ascii	"ws the rules of chess.\012\012 \000"
	.align	2
.LC87:
	.ascii	"\011 MAKING A MOVE\000"
	.align	2
.LC88:
	.ascii	" In order to move, the player has to specify the co"
	.ascii	"ordinates of the starting point\000"
	.align	2
.LC89:
	.ascii	"and then the coordinates of the ending point. it is"
	.ascii	" worth noting that all coordinates\000"
	.align	2
.LC90:
	.ascii	"must be upper-case letters A through H followed by "
	.ascii	"an integer from 1 to 8. Type in 'QT'\000"
	.align	2
.LC91:
	.ascii	"to pause and exit to min menu (progress will not be"
	.ascii	" lost until the user begins a new \000"
	.align	2
.LC92:
	.ascii	"game or exits the program. Type in 'DR' to offer yo"
	.ascii	"ur opponent a draw.\012\000"
	.align	2
.LC93:
	.ascii	"\011CASTLING\000"
	.align	2
.LC94:
	.ascii	" In order to castle the player needs to specify the"
	.ascii	" destination of the King as if \000"
	.align	2
.LC95:
	.ascii	"castling were a normal move. Castling, as is in che"
	.ascii	"ss, cannot be done if the spaces \000"
	.align	2
.LC96:
	.ascii	"between the king and his destination are occupied o"
	.ascii	"r attacked.\012\000"
	.align	2
.LC97:
	.ascii	"\011EN PASSANT\000"
	.align	2
.LC98:
	.ascii	" En Passant is only enabled when the space between "
	.ascii	"the parn's starting position and \000"
	.align	2
.LC99:
	.ascii	"destination is attacked by the opposite player. An "
	.ascii	"'x' or 'X' will appear which is to \000"
	.align	2
.LC100:
	.ascii	"be treated like a regular figure. once the X is tak"
	.ascii	"en off the board, its corresponding \000"
	.align	2
.LC101:
	.ascii	"pawn will be taken off as well.\012\000"
	.align	2
.LC102:
	.ascii	"\011SAVING A GAME\000"
	.align	2
.LC103:
	.ascii	" The user can easily save and store the game played"
	.ascii	" through the menu. The user will then \000"
	.align	2
.LC104:
	.ascii	"be asked to give a name to the game in question and"
	.ascii	" can subsequently access it on demand \000"
	.align	2
.LC105:
	.ascii	"even after exiting the game and opening it back up."
	.ascii	" \000"
	.align	2
.LC106:
	.ascii	"\011LOADING A GAME\000"
	.align	2
.LC107:
	.ascii	" Loading a game works analogously to saving one, ex"
	.ascii	"cept now the computer will ask for an \000"
	.align	2
.LC108:
	.ascii	"index number of the game in question. There is no u"
	.ascii	"pper bound as to how many games can be\000"
	.align	2
.LC109:
	.ascii	"(within reason of course)\012\000"
	.align	2
.LC110:
	.ascii	"\011CLEARING THE MEMORY\000"
	.align	2
.LC111:
	.ascii	" Game memory can be cleared through the menu, howev"
	.ascii	"er keep in mind that this action CANNOT \000"
	.align	2
.LC112:
	.ascii	"be undone. \000"
	.align	2
.LC113:
	.ascii	"\012Press Q to go back to the Menu\012\011>\000"
	.align	2
.LC114:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	openManual
	.syntax unified
	.arm
	.fpu softvfp
	.type	openManual, %function
openManual:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L128
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	clrscr
	ldr	r0, .L128+4
	bl	puts
	ldr	r0, .L128+8
	bl	puts
	ldr	r0, .L128+12
	bl	puts
	ldr	r0, .L128+16
	bl	puts
	ldr	r0, .L128+20
	bl	puts
	ldr	r0, .L128+24
	bl	puts
	ldr	r0, .L128+28
	bl	puts
	ldr	r0, .L128+32
	bl	puts
	ldr	r0, .L128+36
	bl	puts
	ldr	r0, .L128+40
	bl	puts
	ldr	r0, .L128+44
	bl	printf
	ldr	r0, .L128+48
	bl	puts
	ldr	r0, .L128+52
	bl	puts
	ldr	r0, .L128+56
	bl	puts
	ldr	r0, .L128+60
	bl	puts
	ldr	r0, .L128+64
	bl	puts
	ldr	r0, .L128+68
	bl	puts
	ldr	r0, .L128+72
	bl	puts
	ldr	r0, .L128+76
	bl	puts
	ldr	r0, .L128+80
	bl	puts
	ldr	r0, .L128+84
	bl	puts
	ldr	r0, .L128+88
	bl	puts
	ldr	r0, .L128+92
	bl	puts
	ldr	r0, .L128+96
	bl	puts
	ldr	r0, .L128+100
	bl	puts
	ldr	r0, .L128+104
	bl	puts
	ldr	r0, .L128+108
	bl	puts
	ldr	r0, .L128+112
	bl	puts
	ldr	r0, .L128+116
	bl	puts
	ldr	r0, .L128+120
	bl	puts
	ldr	r0, .L128+124
	bl	puts
	ldr	r0, .L128+128
	bl	puts
	ldr	r0, .L128+132
	bl	puts
	ldr	r0, .L128+136
	bl	puts
	ldr	r0, .L128+140
	bl	puts
	ldr	r0, .L128+144
	bl	puts
	ldr	r0, .L128+148
	bl	puts
	ldr	r0, .L128+4
	bl	puts
	ldr	r0, .L128+152
	bl	printf
.L125:
	mov	r3, #66
	strb	r3, [fp, #-9]
	sub	r3, fp, #9
	mov	r1, r3
	ldr	r0, .L128+156
	bl	__isoc99_scanf
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #81
	bne	.L125
	mov	r3, #0
	ldr	r2, .L128
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L126
	bl	__stack_chk_fail
.L126:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L129:
	.align	2
.L128:
	.word	.LC114
	.word	.LC76
	.word	.LC77
	.word	.LC78
	.word	.LC79
	.word	.LC80
	.word	.LC81
	.word	.LC82
	.word	.LC83
	.word	.LC84
	.word	.LC85
	.word	.LC86
	.word	.LC87
	.word	.LC88
	.word	.LC89
	.word	.LC90
	.word	.LC91
	.word	.LC92
	.word	.LC93
	.word	.LC94
	.word	.LC95
	.word	.LC96
	.word	.LC97
	.word	.LC98
	.word	.LC99
	.word	.LC100
	.word	.LC101
	.word	.LC102
	.word	.LC103
	.word	.LC104
	.word	.LC105
	.word	.LC106
	.word	.LC107
	.word	.LC108
	.word	.LC109
	.word	.LC110
	.word	.LC111
	.word	.LC112
	.word	.LC113
	.word	.LC51
	.size	openManual, .-openManual
	.section	.rodata
	.align	2
.LC1:
	.word	-1
	.word	0
	.word	1
	.word	0
	.word	-1
	.align	2
.LC2:
	.word	-1
	.word	-1
	.word	1
	.word	1
	.word	-1
	.word	1
	.word	-1
	.word	1
	.align	2
.LC3:
	.word	1
	.word	2
	.word	2
	.word	1
	.word	-1
	.word	-2
	.word	-2
	.word	-1
	.word	1
	.word	2
	.word	2
	.word	1
	.word	-1
	.word	-2
	.align	2
.LC4:
	.word	-1
	.word	1
	.align	2
.LC5:
	.word	-1
	.word	-1
	.word	-1
	.word	0
	.word	1
	.word	1
	.word	1
	.word	0
	.word	-1
	.word	-1
	.align	2
.LC115:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	isAttackedBlack
	.syntax unified
	.arm
	.fpu softvfp
	.type	isAttackedBlack, %function
isAttackedBlack:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L160
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-108]
	b	.L131
.L139:
	ldr	r3, [fp, #-112]
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-116]
	rsb	r3, r3, #7
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-112]
	rsb	r3, r3, #7
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-116]
	str	r3, [fp, #-68]
	ldr	r3, .L160+4
	sub	ip, fp, #64
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	mov	r3, #1
	str	r3, [fp, #-104]
	b	.L132
.L138:
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-104]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-60]
	ldr	r1, [fp, #-104]
	mul	r1, r3, r1
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L160+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #81
	beq	.L133
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-104]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-60]
	ldr	r1, [fp, #-104]
	mul	r1, r3, r1
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L160+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #82
	bne	.L134
.L133:
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-104]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	ldr	r2, .L160+12
	str	r3, [r2]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-104]
	mul	r2, r3, r2
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	ldr	r2, .L160+12
	str	r3, [r2, #4]
	mov	r3, #1
	b	.L135
.L134:
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-104]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-60]
	ldr	r1, [fp, #-104]
	mul	r1, r3, r1
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L160+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L158
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L132:
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-76]
	ldr	r2, [fp, #-104]
	cmp	r2, r3
	ble	.L138
	b	.L137
.L158:
	nop
.L137:
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L131:
	ldr	r3, [fp, #-108]
	cmp	r3, #4
	ble	.L139
	mov	r3, #1
	str	r3, [fp, #-100]
	b	.L140
.L147:
	ldr	r1, [fp, #-112]
	ldr	r0, [fp, #-116]
	bl	min
	mov	r3, r0
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-116]
	rsb	r3, r3, #7
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	min
	mov	r3, r0
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-116]
	rsb	r2, r3, #7
	ldr	r3, [fp, #-112]
	rsb	r3, r3, #7
	mov	r1, r3
	mov	r0, r2
	bl	min
	mov	r3, r0
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-112]
	rsb	r3, r3, #7
	ldr	r1, [fp, #-116]
	mov	r0, r3
	bl	min
	mov	r3, r0
	str	r3, [fp, #-68]
	ldr	r3, .L160+16
	sub	ip, fp, #64
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	mov	r3, #1
	str	r3, [fp, #-96]
	b	.L141
.L146:
	ldr	r3, [fp, #-100]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-96]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-100]
	add	r3, r3, #3
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-60]
	ldr	r1, [fp, #-96]
	mul	r1, r3, r1
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L160+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #81
	beq	.L142
	ldr	r3, [fp, #-100]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-96]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-100]
	add	r3, r3, #3
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-60]
	ldr	r1, [fp, #-96]
	mul	r1, r3, r1
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L160+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #66
	bne	.L143
.L142:
	ldr	r3, [fp, #-100]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-96]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	ldr	r2, .L160+12
	str	r3, [r2]
	ldr	r3, [fp, #-100]
	add	r3, r3, #3
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-96]
	mul	r2, r3, r2
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	ldr	r2, .L160+12
	str	r3, [r2, #4]
	mov	r3, #1
	b	.L135
.L143:
	ldr	r3, [fp, #-100]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-96]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-100]
	add	r3, r3, #3
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-60]
	ldr	r1, [fp, #-96]
	mul	r1, r3, r1
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L160+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L159
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L141:
	ldr	r3, [fp, #-100]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-76]
	ldr	r2, [fp, #-96]
	cmp	r2, r3
	ble	.L146
	b	.L145
.L159:
	nop
.L145:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L140:
	ldr	r3, [fp, #-100]
	cmp	r3, #4
	ble	.L147
	mov	r3, #1
	str	r3, [fp, #-92]
	b	.L148
.L150:
	ldr	r3, .L160+20
	sub	ip, fp, #64
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L149
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L149
	ldr	r3, [fp, #-92]
	add	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L149
	ldr	r3, [fp, #-92]
	add	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L149
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-92]
	add	r3, r3, #5
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L160+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #78
	bne	.L149
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	ldr	r2, .L160+12
	str	r3, [r2]
	ldr	r3, [fp, #-92]
	add	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	ldr	r2, .L160+12
	str	r3, [r2, #4]
	mov	r3, #1
	b	.L135
.L149:
	ldr	r3, [fp, #-92]
	add	r3, r3, #1
	str	r3, [fp, #-92]
.L148:
	ldr	r3, [fp, #-92]
	cmp	r3, #8
	ble	.L150
	mov	r3, #1
	str	r3, [fp, #-88]
	b	.L151
.L153:
	ldr	r2, .L160+24
	sub	r3, fp, #64
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	ble	.L152
	ldr	r3, [fp, #-112]
	cmp	r3, #8
	bgt	.L152
	ldr	r3, [fp, #-88]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L152
	ldr	r3, [fp, #-88]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L152
	ldr	r3, [fp, #-112]
	add	r2, r3, #1
	ldr	r3, [fp, #-88]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L160+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #80
	bne	.L152
	ldr	r3, [fp, #-112]
	sub	r3, r3, #1
	ldr	r2, .L160+12
	str	r3, [r2]
	ldr	r3, [fp, #-88]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	ldr	r2, .L160+12
	str	r3, [r2, #4]
	mov	r3, #1
	b	.L135
.L152:
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
.L151:
	ldr	r3, [fp, #-88]
	cmp	r3, #2
	ble	.L153
	mov	r3, #1
	str	r3, [fp, #-84]
	b	.L154
.L156:
	ldr	r3, .L160+28
	sub	ip, fp, #64
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	ldr	r3, [fp, #-84]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L155
	ldr	r3, [fp, #-84]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L155
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L155
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L155
	ldr	r3, [fp, #-84]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L160+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #75
	bne	.L155
	ldr	r3, [fp, #-84]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	ldr	r2, .L160+12
	str	r3, [r2]
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	ldr	r2, .L160+12
	str	r3, [r2, #4]
	mov	r3, #2
	b	.L135
.L155:
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	str	r3, [fp, #-84]
.L154:
	ldr	r3, [fp, #-84]
	cmp	r3, #8
	ble	.L156
	mov	r3, #0
.L135:
	ldr	r2, .L160
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L157
	bl	__stack_chk_fail
.L157:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L161:
	.align	2
.L160:
	.word	.LC115
	.word	.LC1
	.word	board
	.word	attackingPieceBlack
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	isAttackedBlack, .-isAttackedBlack
	.section	.rodata
	.align	2
.LC116:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	isAttackedWhite
	.syntax unified
	.arm
	.fpu softvfp
	.type	isAttackedWhite, %function
isAttackedWhite:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L192
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-108]
	b	.L163
.L171:
	ldr	r3, [fp, #-112]
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-116]
	rsb	r3, r3, #7
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-112]
	rsb	r3, r3, #7
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-116]
	str	r3, [fp, #-68]
	ldr	r3, .L192+4
	sub	ip, fp, #64
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	mov	r3, #1
	str	r3, [fp, #-104]
	b	.L164
.L170:
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-104]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-60]
	ldr	r1, [fp, #-104]
	mul	r1, r3, r1
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L192+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #113
	beq	.L165
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-104]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-60]
	ldr	r1, [fp, #-104]
	mul	r1, r3, r1
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L192+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #114
	bne	.L166
.L165:
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-104]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	ldr	r2, .L192+12
	str	r3, [r2]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-104]
	mul	r2, r3, r2
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	ldr	r2, .L192+12
	str	r3, [r2, #4]
	mov	r3, #1
	b	.L167
.L166:
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-104]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-60]
	ldr	r1, [fp, #-104]
	mul	r1, r3, r1
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L192+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L190
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L164:
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-76]
	ldr	r2, [fp, #-104]
	cmp	r2, r3
	ble	.L170
	b	.L169
.L190:
	nop
.L169:
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L163:
	ldr	r3, [fp, #-108]
	cmp	r3, #4
	ble	.L171
	mov	r3, #1
	str	r3, [fp, #-100]
	b	.L172
.L179:
	ldr	r1, [fp, #-112]
	ldr	r0, [fp, #-116]
	bl	min
	mov	r3, r0
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-116]
	rsb	r3, r3, #7
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	min
	mov	r3, r0
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-116]
	rsb	r2, r3, #7
	ldr	r3, [fp, #-112]
	rsb	r3, r3, #7
	mov	r1, r3
	mov	r0, r2
	bl	min
	mov	r3, r0
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-112]
	rsb	r3, r3, #7
	ldr	r1, [fp, #-116]
	mov	r0, r3
	bl	min
	mov	r3, r0
	str	r3, [fp, #-68]
	ldr	r3, .L192+16
	sub	ip, fp, #64
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	mov	r3, #1
	str	r3, [fp, #-96]
	b	.L173
.L178:
	ldr	r3, [fp, #-100]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-96]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-100]
	add	r3, r3, #3
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-60]
	ldr	r1, [fp, #-96]
	mul	r1, r3, r1
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L192+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #113
	beq	.L174
	ldr	r3, [fp, #-100]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-96]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-100]
	add	r3, r3, #3
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-60]
	ldr	r1, [fp, #-96]
	mul	r1, r3, r1
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L192+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #98
	bne	.L175
.L174:
	ldr	r3, [fp, #-100]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-96]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	ldr	r2, .L192+12
	str	r3, [r2]
	ldr	r3, [fp, #-100]
	add	r3, r3, #3
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-96]
	mul	r2, r3, r2
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	ldr	r2, .L192+12
	str	r3, [r2, #4]
	mov	r3, #1
	b	.L167
.L175:
	ldr	r3, [fp, #-100]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	ldr	r2, [fp, #-96]
	mul	r2, r3, r2
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-100]
	add	r3, r3, #3
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-60]
	ldr	r1, [fp, #-96]
	mul	r1, r3, r1
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L192+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L191
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L173:
	ldr	r3, [fp, #-100]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-76]
	ldr	r2, [fp, #-96]
	cmp	r2, r3
	ble	.L178
	b	.L177
.L191:
	nop
.L177:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L172:
	ldr	r3, [fp, #-100]
	cmp	r3, #4
	ble	.L179
	mov	r3, #1
	str	r3, [fp, #-92]
	b	.L180
.L182:
	ldr	r3, .L192+20
	sub	ip, fp, #64
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L181
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L181
	ldr	r3, [fp, #-92]
	add	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L181
	ldr	r3, [fp, #-92]
	add	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L181
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-92]
	add	r3, r3, #5
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L192+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #110
	bne	.L181
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	ldr	r2, .L192+12
	str	r3, [r2]
	ldr	r3, [fp, #-92]
	add	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	ldr	r2, .L192+12
	str	r3, [r2, #4]
	mov	r3, #1
	b	.L167
.L181:
	ldr	r3, [fp, #-92]
	add	r3, r3, #1
	str	r3, [fp, #-92]
.L180:
	ldr	r3, [fp, #-92]
	cmp	r3, #8
	ble	.L182
	mov	r3, #1
	str	r3, [fp, #-88]
	b	.L183
.L185:
	ldr	r2, .L192+24
	sub	r3, fp, #64
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	ble	.L184
	ldr	r3, [fp, #-112]
	cmp	r3, #8
	bgt	.L184
	ldr	r3, [fp, #-88]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L184
	ldr	r3, [fp, #-88]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L184
	ldr	r3, [fp, #-112]
	sub	r2, r3, #1
	ldr	r3, [fp, #-88]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L192+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #112
	bne	.L184
	ldr	r3, [fp, #-112]
	sub	r3, r3, #1
	ldr	r2, .L192+12
	str	r3, [r2]
	ldr	r3, [fp, #-88]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	ldr	r2, .L192+12
	str	r3, [r2, #4]
	mov	r3, #1
	b	.L167
.L184:
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
.L183:
	ldr	r3, [fp, #-88]
	cmp	r3, #2
	ble	.L185
	mov	r3, #1
	str	r3, [fp, #-84]
	b	.L186
.L188:
	ldr	r3, .L192+28
	sub	ip, fp, #64
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	ldr	r3, [fp, #-84]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L187
	ldr	r3, [fp, #-84]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L187
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L187
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L187
	ldr	r3, [fp, #-84]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r1, r3
	ldr	r1, .L192+8
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #107
	bne	.L187
	ldr	r3, [fp, #-84]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r3, r2, r3
	ldr	r2, .L192+12
	str	r3, [r2]
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	ldr	r2, .L192+12
	str	r3, [r2, #4]
	mov	r3, #2
	b	.L167
.L187:
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	str	r3, [fp, #-84]
.L186:
	ldr	r3, [fp, #-84]
	cmp	r3, #8
	ble	.L188
	mov	r3, #0
.L167:
	ldr	r2, .L192
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L189
	bl	__stack_chk_fail
.L189:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L193:
	.align	2
.L192:
	.word	.LC116
	.word	.LC1
	.word	board
	.word	attackingPieceWhite
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	isAttackedWhite, .-isAttackedWhite
	.section	.rodata
	.align	2
.LC117:
	.ascii	"\012In order to castle all spaces between the King "
	.ascii	"and the Rook must be free and must not be attacked!"
	.ascii	"\012 %d\011%d\011%d\000"
	.align	2
.LC118:
	.ascii	"\012In order to castle all spaces between the King "
	.ascii	"and the Rook must be free and must not be attacked!"
	.ascii	"\000"
	.align	2
.LC119:
	.ascii	"\012You cannot move a blank space!\000"
	.text
	.align	2
	.global	checkIfLegalWhite
	.syntax unified
	.arm
	.fpu softvfp
	.type	checkIfLegalWhite, %function
checkIfLegalWhite:
	@ args = 4, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #84
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	str	r2, [fp, #-88]
	str	r3, [fp, #-92]
	ldrb	r3, [fp, #4]	@ zero_extendqisi2
	sub	r3, r3, #32
	cmp	r3, #50
	ldrls	pc, [pc, r3, asl #2]
	b	.L195
.L197:
	.word	.L203
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L202
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L195
	.word	.L201
	.word	.L195
	.word	.L195
	.word	.L200
	.word	.L195
	.word	.L199
	.word	.L198
	.word	.L196
.L199:
	ldr	r2, .L258
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L204
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	bne	.L205
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	cmp	r3, #1
	beq	.L206
.L205:
	ldr	r3, [fp, #-84]
	cmp	r3, #6
	bne	.L204
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	cmp	r3, #2
	bne	.L204
.L206:
	ldr	r3, [fp, #-84]
	cmp	r3, #6
	bne	.L255
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	cmp	r3, #2
	bne	.L255
	ldr	r3, [fp, #-92]
	add	r3, r3, #1
	ldr	r1, [fp, #-80]
	mov	r0, r3
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #0
	beq	.L255
	ldr	r3, [fp, #-92]
	add	r3, r3, #1
	ldr	r2, .L258
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	mov	r2, #88
	strb	r2, [r3]
	b	.L255
.L204:
	ldr	r2, .L258
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #6
	ldr	r1, .L258+4
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	beq	.L209
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r3, r0
	cmp	r3, #1
	bne	.L209
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	cmp	r3, #1
	beq	.L256
.L209:
	mov	r3, #0
	b	.L210
.L200:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	ldr	r1, [fp, #-80]
	ldr	r2, [fp, #-88]
	sub	r2, r1, r2
	mul	r2, r3, r2
	ldr	r1, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r1, r3
	ldr	r0, [fp, #-84]
	ldr	r1, [fp, #-92]
	sub	r1, r0, r1
	mul	r3, r1, r3
	add	r3, r2, r3
	cmp	r3, #5
	bne	.L211
	ldr	r2, .L258
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #6
	ldr	r1, .L258+8
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	beq	.L257
.L211:
	mov	r3, #0
	b	.L210
.L202:
	ldr	r2, .L258
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #6
	ldr	r1, .L258+4
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	bne	.L212
	ldr	r2, .L258
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L213
.L212:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r4, r0
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r3, r0
	cmp	r4, r3
	bne	.L213
	mov	r3, #1
	str	r3, [fp, #-76]
	b	.L214
.L216:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-76]
	mul	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-76]
	mul	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	ldr	r1, [fp, #-88]
	ldr	r3, [fp, #-20]
	add	r3, r1, r3
	ldr	r1, .L258
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L215
	mov	r3, #0
	b	.L210
.L215:
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L214:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-76]
	cmp	r3, r2
	blt	.L216
	b	.L208
.L213:
	mov	r3, #0
	b	.L210
.L196:
	ldr	r3, .L258+12
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L217
	ldr	r3, [fp, #-84]
	cmp	r3, #7
	bne	.L217
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	bne	.L217
	ldr	r3, .L258+12
	mov	r2, #0
	str	r2, [r3]
.L217:
	ldr	r3, .L258+16
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L218
	ldr	r3, [fp, #-84]
	cmp	r3, #7
	bne	.L218
	ldr	r3, [fp, #-80]
	cmp	r3, #7
	bne	.L218
	ldr	r3, .L258+16
	mov	r2, #0
	str	r2, [r3]
.L218:
	ldr	r2, .L258
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #6
	ldr	r1, .L258+4
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	bne	.L219
	ldr	r2, .L258
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L220
.L219:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	beq	.L221
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	bne	.L220
.L221:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	bne	.L222
	mov	r3, #1
	str	r3, [fp, #-72]
	b	.L223
.L225:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-72]
	mul	r3, r2, r3
	str	r3, [fp, #-40]
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-40]
	sub	r3, r2, r3
	ldr	r1, .L258
	ldr	r2, [fp, #-84]
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L224
	mov	r3, #0
	b	.L210
.L224:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L223:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-72]
	cmp	r3, r2
	blt	.L225
	b	.L208
.L222:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	bne	.L220
	mov	r3, #1
	str	r3, [fp, #-68]
	b	.L226
.L228:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-68]
	mul	r3, r2, r3
	str	r3, [fp, #-44]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-44]
	sub	r3, r2, r3
	ldr	r2, .L258
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L227
	mov	r3, #0
	b	.L210
.L227:
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L226:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-68]
	cmp	r3, r2
	blt	.L228
	b	.L208
.L220:
	mov	r3, #0
	b	.L210
.L198:
	ldr	r2, .L258
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #6
	ldr	r1, .L258+4
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	bne	.L229
	ldr	r2, .L258
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L230
.L229:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	beq	.L231
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	beq	.L231
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r4, r0
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r3, r0
	cmp	r4, r3
	bne	.L230
.L231:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	bne	.L232
	mov	r3, #1
	str	r3, [fp, #-64]
	b	.L233
.L235:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-64]
	mul	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	ldr	r1, .L258
	ldr	r2, [fp, #-84]
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L234
	mov	r3, #0
	b	.L210
.L234:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L233:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-64]
	cmp	r3, r2
	blt	.L235
	b	.L208
.L232:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	bne	.L236
	mov	r3, #1
	str	r3, [fp, #-60]
	b	.L237
.L239:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-60]
	mul	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	ldr	r2, .L258
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L238
	mov	r3, #0
	b	.L210
.L238:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L237:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-60]
	cmp	r3, r2
	blt	.L239
	b	.L208
.L236:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r4, r0
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r3, r0
	cmp	r4, r3
	bne	.L230
	mov	r3, #1
	str	r3, [fp, #-56]
	b	.L240
.L242:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-56]
	mul	r3, r2, r3
	str	r3, [fp, #-36]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-56]
	mul	r3, r2, r3
	str	r3, [fp, #-32]
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r1, [fp, #-88]
	ldr	r3, [fp, #-36]
	add	r3, r1, r3
	ldr	r1, .L258
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L241
	mov	r3, #0
	b	.L210
.L241:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L240:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-56]
	cmp	r3, r2
	blt	.L242
	b	.L208
.L230:
	mov	r3, #0
	b	.L210
.L201:
	ldr	r3, [fp, #-88]
	cmp	r3, #6
	bne	.L243
	ldr	r3, [fp, #-92]
	cmp	r3, #7
	bne	.L243
	ldr	r3, .L258+16
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L243
	ldr	r3, .L258
	ldrb	r3, [r3, #63]	@ zero_extendqisi2
	cmp	r3, #82
	bne	.L243
	mov	r3, #1
	str	r3, [fp, #-52]
	b	.L244
.L247:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r2, .L258
	add	r3, r2, r3
	ldrb	r3, [r3, #56]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L245
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, #7
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #1
	bne	.L246
.L245:
	ldr	r3, .L258+20
	ldr	r1, [r3]
	ldr	r3, .L258+20
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-52]
	ldr	r0, .L258+24
	bl	printf
	mov	r3, #0
	b	.L210
.L246:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L244:
	ldr	r3, [fp, #-52]
	cmp	r3, #2
	ble	.L247
	ldr	r3, .L258+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L258+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L258
	mov	r2, #32
	strb	r2, [r3, #63]
	ldr	r3, .L258
	mov	r2, #82
	strb	r2, [r3, #61]
	ldr	r2, .L258+28
	ldr	r3, [fp, #-92]
	str	r3, [r2]
	ldr	r2, .L258+28
	ldr	r3, [fp, #-88]
	str	r3, [r2, #4]
	b	.L208
.L243:
	ldr	r3, [fp, #-88]
	cmp	r3, #1
	bne	.L248
	ldr	r3, [fp, #-92]
	cmp	r3, #7
	bne	.L248
	ldr	r3, .L258+12
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L248
	ldr	r3, .L258
	ldrb	r3, [r3, #56]	@ zero_extendqisi2
	cmp	r3, #82
	bne	.L248
	mov	r3, #1
	str	r3, [fp, #-48]
	b	.L249
.L252:
	ldr	r3, [fp, #-48]
	rsb	r3, r3, #4
	ldr	r2, .L258
	add	r3, r2, r3
	ldrb	r3, [r3, #56]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L250
	ldr	r3, [fp, #-48]
	rsb	r3, r3, #4
	mov	r1, r3
	mov	r0, #7
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #1
	bne	.L251
.L250:
	ldr	r0, .L258+32
	bl	puts
	mov	r3, #0
	b	.L210
.L251:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L249:
	ldr	r3, [fp, #-48]
	cmp	r3, #3
	ble	.L252
	ldr	r3, .L258+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L258+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L258
	mov	r2, #32
	strb	r2, [r3, #56]
	ldr	r3, .L258
	mov	r2, #82
	strb	r2, [r3, #58]
	ldr	r2, .L258+28
	ldr	r3, [fp, #-92]
	str	r3, [r2]
	ldr	r2, .L258+28
	ldr	r3, [fp, #-88]
	str	r3, [r2, #4]
	b	.L208
.L248:
	ldr	r2, .L258
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #6
	ldr	r1, .L258+4
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	bne	.L253
	ldr	r2, .L258
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L254
.L253:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	ldr	r1, [fp, #-80]
	ldr	r2, [fp, #-88]
	sub	r2, r1, r2
	mul	r2, r3, r2
	ldr	r1, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r1, r3
	ldr	r0, [fp, #-84]
	ldr	r1, [fp, #-92]
	sub	r1, r0, r1
	mul	r3, r1, r3
	add	r3, r2, r3
	cmp	r3, #2
	bgt	.L254
	ldr	r1, [fp, #-88]
	ldr	r0, [fp, #-92]
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #0
	bne	.L254
	ldr	r3, .L258+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L258+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r2, .L258+28
	ldr	r3, [fp, #-92]
	str	r3, [r2]
	ldr	r2, .L258+28
	ldr	r3, [fp, #-88]
	str	r3, [r2, #4]
	b	.L208
.L254:
	mov	r3, #0
	b	.L210
.L203:
	ldr	r0, .L258+36
	bl	puts
	mov	r3, #0
	b	.L210
.L195:
	mov	r3, #0
	b	.L210
.L255:
	nop
	b	.L208
.L256:
	nop
	b	.L208
.L257:
	nop
.L208:
	mov	r3, #1
.L210:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L259:
	.align	2
.L258:
	.word	board
	.word	blackpieces
	.word	whitepieces
	.word	canLongCastleWhite
	.word	canShortCastleWhite
	.word	attackingPieceWhite
	.word	.LC117
	.word	whiteKingLocation
	.word	.LC118
	.word	.LC119
	.size	checkIfLegalWhite, .-checkIfLegalWhite
	.align	2
	.global	checkIfLegalBlack
	.syntax unified
	.arm
	.fpu softvfp
	.type	checkIfLegalBlack, %function
checkIfLegalBlack:
	@ args = 4, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #84
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	str	r2, [fp, #-88]
	str	r3, [fp, #-92]
	ldrb	r3, [fp, #4]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L261
	cmp	r3, #32
	blt	.L262
	cmp	r3, #114
	bgt	.L262
	cmp	r3, #98
	blt	.L262
	sub	r3, r3, #98
	cmp	r3, #16
	ldrls	pc, [pc, r3, asl #2]
	b	.L262
.L264:
	.word	.L269
	.word	.L262
	.word	.L262
	.word	.L262
	.word	.L262
	.word	.L262
	.word	.L262
	.word	.L262
	.word	.L262
	.word	.L268
	.word	.L262
	.word	.L262
	.word	.L267
	.word	.L262
	.word	.L266
	.word	.L265
	.word	.L263
.L266:
	ldr	r2, .L324
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L270
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	bne	.L271
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	cmn	r3, #1
	beq	.L272
.L271:
	ldr	r3, [fp, #-84]
	cmp	r3, #1
	bne	.L270
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	cmn	r3, #2
	bne	.L270
.L272:
	ldr	r3, [fp, #-84]
	cmp	r3, #1
	bne	.L321
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	cmn	r3, #2
	bne	.L321
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	ldr	r1, [fp, #-80]
	mov	r0, r3
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #0
	beq	.L321
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	ldr	r2, .L324
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	mov	r2, #120
	strb	r2, [r3]
	b	.L321
.L270:
	ldr	r2, .L324
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #6
	ldr	r1, .L324+4
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	beq	.L275
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r3, r0
	cmp	r3, #1
	bne	.L275
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	cmn	r3, #1
	beq	.L322
.L275:
	mov	r3, #0
	b	.L276
.L267:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	ldr	r1, [fp, #-80]
	ldr	r2, [fp, #-88]
	sub	r2, r1, r2
	mul	r2, r3, r2
	ldr	r1, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r1, r3
	ldr	r0, [fp, #-84]
	ldr	r1, [fp, #-92]
	sub	r1, r0, r1
	mul	r3, r1, r3
	add	r3, r2, r3
	cmp	r3, #5
	bne	.L277
	ldr	r2, .L324
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #6
	ldr	r1, .L324+8
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	beq	.L323
.L277:
	mov	r3, #0
	b	.L276
.L269:
	ldr	r2, .L324
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #6
	ldr	r1, .L324+4
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	bne	.L278
	ldr	r2, .L324
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L279
.L278:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r4, r0
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r3, r0
	cmp	r4, r3
	bne	.L279
	mov	r3, #1
	str	r3, [fp, #-76]
	b	.L280
.L282:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-76]
	mul	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-76]
	mul	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	ldr	r1, [fp, #-88]
	ldr	r3, [fp, #-20]
	add	r3, r1, r3
	ldr	r1, .L324
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L281
	mov	r3, #0
	b	.L276
.L281:
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L280:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-76]
	cmp	r3, r2
	blt	.L282
	b	.L274
.L279:
	mov	r3, #0
	b	.L276
.L263:
	ldr	r3, .L324+12
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L283
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L283
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	bne	.L283
	ldr	r3, .L324+12
	mov	r2, #0
	str	r2, [r3]
.L283:
	ldr	r3, .L324+16
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L284
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L284
	ldr	r3, [fp, #-80]
	cmp	r3, #7
	bne	.L284
	ldr	r3, .L324+16
	mov	r2, #0
	str	r2, [r3]
.L284:
	ldr	r2, .L324
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #6
	ldr	r1, .L324+4
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	bne	.L285
	ldr	r2, .L324
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L286
.L285:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	beq	.L287
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	bne	.L286
.L287:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	bne	.L288
	mov	r3, #1
	str	r3, [fp, #-72]
	b	.L289
.L291:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-72]
	mul	r3, r2, r3
	str	r3, [fp, #-40]
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-40]
	sub	r3, r2, r3
	ldr	r1, .L324
	ldr	r2, [fp, #-84]
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L290
	mov	r3, #0
	b	.L276
.L290:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L289:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-72]
	cmp	r3, r2
	blt	.L291
	b	.L274
.L288:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	bne	.L286
	mov	r3, #1
	str	r3, [fp, #-68]
	b	.L292
.L294:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-68]
	mul	r3, r2, r3
	str	r3, [fp, #-44]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-44]
	sub	r3, r2, r3
	ldr	r2, .L324
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L293
	mov	r3, #0
	b	.L276
.L293:
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L292:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-68]
	cmp	r3, r2
	blt	.L294
	b	.L274
.L286:
	mov	r3, #0
	b	.L276
.L265:
	ldr	r2, .L324
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #6
	ldr	r1, .L324+4
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	bne	.L295
	ldr	r2, .L324
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L296
.L295:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	beq	.L297
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	beq	.L297
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r4, r0
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r3, r0
	cmp	r4, r3
	bne	.L296
.L297:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	bne	.L298
	mov	r3, #1
	str	r3, [fp, #-64]
	b	.L299
.L301:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-64]
	mul	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	ldr	r1, .L324
	ldr	r2, [fp, #-84]
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L300
	mov	r3, #0
	b	.L276
.L300:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L299:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-64]
	cmp	r3, r2
	blt	.L301
	b	.L274
.L298:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	bne	.L302
	mov	r3, #1
	str	r3, [fp, #-60]
	b	.L303
.L305:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-60]
	mul	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	ldr	r2, .L324
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L304
	mov	r3, #0
	b	.L276
.L304:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L303:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-60]
	cmp	r3, r2
	blt	.L305
	b	.L274
.L302:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r4, r0
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r3, r0
	cmp	r4, r3
	bne	.L296
	mov	r3, #1
	str	r3, [fp, #-56]
	b	.L306
.L308:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-56]
	mul	r3, r2, r3
	str	r3, [fp, #-36]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-56]
	mul	r3, r2, r3
	str	r3, [fp, #-32]
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r1, [fp, #-88]
	ldr	r3, [fp, #-36]
	add	r3, r1, r3
	ldr	r1, .L324
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L307
	mov	r3, #0
	b	.L276
.L307:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L306:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-56]
	cmp	r3, r2
	blt	.L308
	b	.L274
.L296:
	mov	r3, #0
	b	.L276
.L268:
	ldr	r3, [fp, #-88]
	cmp	r3, #6
	bne	.L309
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	bne	.L309
	ldr	r3, .L324+20
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L309
	ldr	r3, .L324
	ldrb	r3, [r3, #7]	@ zero_extendqisi2
	cmp	r3, #114
	bne	.L309
	mov	r3, #1
	str	r3, [fp, #-52]
	b	.L310
.L313:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r2, .L324
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L311
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, #0
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #0
	beq	.L312
.L311:
	ldr	r0, .L324+24
	bl	puts
	mov	r3, #0
	b	.L276
.L312:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L310:
	ldr	r3, [fp, #-52]
	cmp	r3, #2
	ble	.L313
	ldr	r3, .L324+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L324+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L324
	mov	r2, #32
	strb	r2, [r3, #7]
	ldr	r3, .L324
	mov	r2, #114
	strb	r2, [r3, #5]
	ldr	r2, .L324+28
	ldr	r3, [fp, #-92]
	str	r3, [r2]
	ldr	r2, .L324+28
	ldr	r3, [fp, #-88]
	str	r3, [r2, #4]
	b	.L274
.L309:
	ldr	r3, [fp, #-88]
	cmp	r3, #1
	bne	.L314
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	bne	.L314
	ldr	r3, .L324+12
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L314
	ldr	r3, .L324
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #114
	bne	.L314
	mov	r3, #1
	str	r3, [fp, #-48]
	b	.L315
.L318:
	ldr	r3, [fp, #-48]
	rsb	r3, r3, #4
	ldr	r2, .L324
	add	r3, r2, r3
	ldrb	r3, [r3, #56]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L316
	ldr	r3, [fp, #-48]
	rsb	r3, r3, #4
	mov	r1, r3
	mov	r0, #0
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #0
	beq	.L317
.L316:
	ldr	r0, .L324+24
	bl	puts
	mov	r3, #0
	b	.L276
.L317:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L315:
	ldr	r3, [fp, #-48]
	cmp	r3, #3
	ble	.L318
	ldr	r3, .L324+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L324+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L324
	mov	r2, #32
	strb	r2, [r3]
	ldr	r3, .L324
	mov	r2, #114
	strb	r2, [r3, #2]
	ldr	r2, .L324+28
	ldr	r3, [fp, #-92]
	str	r3, [r2]
	ldr	r2, .L324+28
	ldr	r3, [fp, #-88]
	str	r3, [r2, #4]
	b	.L274
.L314:
	ldr	r2, .L324
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, #6
	ldr	r1, .L324+4
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	bne	.L319
	ldr	r2, .L324
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L320
.L319:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	ldr	r1, [fp, #-80]
	ldr	r2, [fp, #-88]
	sub	r2, r1, r2
	mul	r2, r3, r2
	ldr	r1, [fp, #-84]
	ldr	r3, [fp, #-92]
	sub	r3, r1, r3
	ldr	r0, [fp, #-84]
	ldr	r1, [fp, #-92]
	sub	r1, r0, r1
	mul	r3, r1, r3
	add	r3, r2, r3
	cmp	r3, #2
	bgt	.L320
	ldr	r1, [fp, #-88]
	ldr	r0, [fp, #-92]
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #0
	bne	.L320
	ldr	r3, .L324+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L324+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r2, .L324+28
	ldr	r3, [fp, #-92]
	str	r3, [r2]
	ldr	r2, .L324+28
	ldr	r3, [fp, #-88]
	str	r3, [r2, #4]
	b	.L274
.L320:
	mov	r3, #0
	b	.L276
.L261:
	ldr	r0, .L324+32
	bl	puts
	mov	r3, #0
	b	.L276
.L262:
	mov	r3, #0
	b	.L276
.L321:
	nop
	b	.L274
.L322:
	nop
	b	.L274
.L323:
	nop
.L274:
	mov	r3, #1
.L276:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L325:
	.align	2
.L324:
	.word	board
	.word	whitepieces
	.word	blackpieces
	.word	canLongCastleBlack
	.word	canShortCastleBlack
	.word	canShortCastleWhite
	.word	.LC118
	.word	blackKingLocation
	.word	.LC119
	.size	checkIfLegalBlack, .-checkIfLegalBlack
	.section	.rodata
	.align	2
.LC120:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	checkMateWhite
	.syntax unified
	.arm
	.fpu softvfp
	.type	checkMateWhite, %function
checkMateWhite:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #132
	ldr	r3, .L361
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L361+4
	ldr	r3, [r3, #4]
	str	r3, [fp, #-104]
	ldr	r3, .L361+4
	ldr	r3, [r3]
	str	r3, [fp, #-100]
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-100]
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #1
	bne	.L327
	ldr	r3, .L361+8
	ldr	r3, [r3, #4]
	str	r3, [fp, #-96]
	ldr	r3, .L361+8
	ldr	r3, [r3]
	str	r3, [fp, #-92]
	ldr	r2, .L361+12
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-96]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-133]
	ldr	r2, .L361+12
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	mov	r2, #32
	strb	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-132]
	b	.L328
.L357:
	ldr	r2, .L361+12
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	mov	r2, #32
	strb	r2, [r3]
	ldr	r3, .L361+16
	sub	ip, fp, #56
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	ldr	r3, [fp, #-132]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-100]
	add	r2, r2, r3
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	ldr	r1, [r3, #-44]
	ldr	r3, [fp, #-104]
	add	r3, r1, r3
	ldr	r1, .L361+12
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L329
	ldr	r3, [fp, #-132]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-100]
	add	r0, r2, r3
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	mov	r1, r3
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #0
	bne	.L329
	ldr	r3, [fp, #-132]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-100]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L329
	ldr	r3, [fp, #-132]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-100]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L329
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L329
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L329
	ldr	r2, .L361+12
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	mov	r2, #75
	strb	r2, [r3]
	mov	r3, #1
	b	.L356
.L329:
	ldr	r2, .L361+12
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	mov	r2, #75
	strb	r2, [r3]
	ldrb	r3, [fp, #-133]	@ zero_extendqisi2
	cmp	r3, #114
	beq	.L331
	cmp	r3, #114
	bgt	.L332
	cmp	r3, #98
	beq	.L333
	cmp	r3, #113
	beq	.L334
	b	.L332
.L333:
	mov	r3, #1
	str	r3, [fp, #-128]
	b	.L335
.L337:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-128]
	mul	r3, r2, r3
	str	r3, [fp, #-64]
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-128]
	mul	r3, r2, r3
	str	r3, [fp, #-60]
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-60]
	add	r0, r2, r3
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-64]
	add	r3, r2, r3
	mov	r1, r3
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #1
	bne	.L336
	mov	r3, #1
	b	.L356
.L336:
	ldr	r3, [fp, #-128]
	add	r3, r3, #1
	str	r3, [fp, #-128]
.L335:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-128]
	cmp	r3, r2
	blt	.L337
	b	.L332
.L331:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	bne	.L338
	mov	r3, #1
	str	r3, [fp, #-124]
	b	.L339
.L341:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-124]
	mul	r3, r2, r3
	str	r3, [fp, #-84]
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-84]
	sub	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #1
	bne	.L340
	mov	r3, #1
	b	.L356
.L340:
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	str	r3, [fp, #-124]
.L339:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-124]
	cmp	r3, r2
	blt	.L341
	b	.L332
.L338:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	cmp	r2, r3
	bne	.L334
	mov	r3, #1
	str	r3, [fp, #-120]
	b	.L342
.L344:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-120]
	mul	r3, r2, r3
	str	r3, [fp, #-88]
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	ldr	r1, [fp, #-104]
	mov	r0, r3
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #1
	bne	.L343
	mov	r3, #1
	b	.L356
.L343:
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L342:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-120]
	cmp	r3, r2
	blt	.L344
	b	.L332
.L334:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	bne	.L345
	mov	r3, #1
	str	r3, [fp, #-116]
	b	.L346
.L348:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-116]
	mul	r3, r2, r3
	str	r3, [fp, #-68]
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-68]
	sub	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #1
	bne	.L347
	mov	r3, #1
	b	.L356
.L347:
	ldr	r3, [fp, #-116]
	add	r3, r3, #1
	str	r3, [fp, #-116]
.L346:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-116]
	cmp	r3, r2
	blt	.L348
	b	.L332
.L345:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	cmp	r2, r3
	bne	.L349
	mov	r3, #1
	str	r3, [fp, #-112]
	b	.L350
.L352:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-112]
	mul	r3, r2, r3
	str	r3, [fp, #-72]
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-72]
	sub	r3, r2, r3
	ldr	r1, [fp, #-104]
	mov	r0, r3
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #1
	bne	.L351
	mov	r3, #1
	b	.L356
.L351:
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L350:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-112]
	cmp	r3, r2
	blt	.L352
	b	.L332
.L349:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r4, r0
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r3, r0
	cmp	r4, r3
	bne	.L332
	mov	r3, #1
	str	r3, [fp, #-108]
	b	.L353
.L355:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-108]
	mul	r3, r2, r3
	str	r3, [fp, #-80]
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-108]
	mul	r3, r2, r3
	str	r3, [fp, #-76]
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-76]
	add	r0, r2, r3
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	mov	r1, r3
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #1
	bne	.L354
	mov	r3, #1
	b	.L356
.L354:
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L353:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-108]
	cmp	r3, r2
	blt	.L355
	nop
.L332:
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L328:
	ldr	r3, [fp, #-132]
	cmp	r3, #8
	ble	.L357
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-92]
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #2
	bne	.L358
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-92]
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #0
	bne	.L358
	mov	r3, #1
	b	.L356
.L358:
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-92]
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #0
	beq	.L359
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-92]
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #2
	bne	.L327
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-92]
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #0
	beq	.L327
.L359:
	mov	r3, #2
	b	.L356
.L327:
	mov	r3, #0
.L356:
	ldr	r2, .L361
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L360
	bl	__stack_chk_fail
.L360:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L362:
	.align	2
.L361:
	.word	.LC120
	.word	whiteKingLocation
	.word	attackingPieceWhite
	.word	board
	.word	.LC5
	.size	checkMateWhite, .-checkMateWhite
	.section	.rodata
	.align	2
.LC121:
	.ascii	"\0124\000"
	.align	2
.LC122:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	checkMateBlack
	.syntax unified
	.arm
	.fpu softvfp
	.type	checkMateBlack, %function
checkMateBlack:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #132
	ldr	r3, .L398
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L398+4
	ldr	r3, [r3, #4]
	str	r3, [fp, #-104]
	ldr	r3, .L398+4
	ldr	r3, [r3]
	str	r3, [fp, #-100]
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-100]
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #1
	bne	.L364
	ldr	r3, .L398+8
	ldr	r3, [r3, #4]
	str	r3, [fp, #-96]
	ldr	r3, .L398+8
	ldr	r3, [r3]
	str	r3, [fp, #-92]
	ldr	r2, .L398+12
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-96]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-133]
	mov	r3, #1
	str	r3, [fp, #-132]
	b	.L365
.L394:
	ldr	r2, .L398+12
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	mov	r2, #32
	strb	r2, [r3]
	ldr	r3, .L398+16
	sub	ip, fp, #56
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	ldr	r3, [fp, #-132]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-100]
	add	r2, r2, r3
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	ldr	r1, [r3, #-44]
	ldr	r3, [fp, #-104]
	add	r3, r1, r3
	ldr	r1, .L398+12
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L366
	ldr	r3, [fp, #-132]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-100]
	add	r0, r2, r3
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	mov	r1, r3
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #0
	bne	.L366
	ldr	r3, [fp, #-132]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-100]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L366
	ldr	r3, [fp, #-132]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-100]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L366
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L366
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-44]
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	cmp	r3, #7
	bgt	.L366
	ldr	r2, .L398+12
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	mov	r2, #107
	strb	r2, [r3]
	mov	r3, #1
	b	.L393
.L366:
	ldr	r2, .L398+12
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r2, r2, r3
	ldr	r3, [fp, #-104]
	add	r3, r2, r3
	mov	r2, #107
	strb	r2, [r3]
	ldrb	r3, [fp, #-133]	@ zero_extendqisi2
	cmp	r3, #82
	beq	.L368
	cmp	r3, #82
	bgt	.L369
	cmp	r3, #66
	beq	.L370
	cmp	r3, #81
	beq	.L371
	b	.L369
.L370:
	mov	r3, #1
	str	r3, [fp, #-128]
	b	.L372
.L374:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-128]
	mul	r3, r2, r3
	str	r3, [fp, #-64]
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-128]
	mul	r3, r2, r3
	str	r3, [fp, #-60]
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-60]
	add	r0, r2, r3
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-64]
	add	r3, r2, r3
	mov	r1, r3
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #1
	bne	.L373
	mov	r3, #1
	b	.L393
.L373:
	ldr	r3, [fp, #-128]
	add	r3, r3, #1
	str	r3, [fp, #-128]
.L372:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-128]
	cmp	r3, r2
	blt	.L374
	b	.L369
.L368:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	bne	.L375
	mov	r3, #1
	str	r3, [fp, #-124]
	b	.L376
.L378:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-124]
	mul	r3, r2, r3
	str	r3, [fp, #-84]
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-84]
	sub	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #1
	bne	.L377
	mov	r3, #1
	b	.L393
.L377:
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	str	r3, [fp, #-124]
.L376:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-124]
	cmp	r3, r2
	blt	.L378
	b	.L369
.L375:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	cmp	r2, r3
	bne	.L371
	mov	r3, #1
	str	r3, [fp, #-120]
	b	.L379
.L381:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-120]
	mul	r3, r2, r3
	str	r3, [fp, #-88]
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	ldr	r1, [fp, #-104]
	mov	r0, r3
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #1
	bne	.L380
	mov	r3, #1
	b	.L393
.L380:
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L379:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-120]
	cmp	r3, r2
	blt	.L381
	b	.L369
.L371:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	bne	.L382
	mov	r3, #1
	str	r3, [fp, #-116]
	b	.L383
.L385:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-116]
	mul	r3, r2, r3
	str	r3, [fp, #-68]
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-68]
	sub	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #1
	bne	.L384
	mov	r3, #1
	b	.L393
.L384:
	ldr	r3, [fp, #-116]
	add	r3, r3, #1
	str	r3, [fp, #-116]
.L383:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-116]
	cmp	r3, r2
	blt	.L385
	b	.L369
.L382:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	cmp	r2, r3
	bne	.L386
	mov	r3, #1
	str	r3, [fp, #-112]
	b	.L387
.L389:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-112]
	mul	r3, r2, r3
	str	r3, [fp, #-72]
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-72]
	sub	r3, r2, r3
	ldr	r1, [fp, #-104]
	mov	r0, r3
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #1
	bne	.L388
	mov	r3, #1
	b	.L393
.L388:
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L387:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-112]
	cmp	r3, r2
	blt	.L389
	b	.L369
.L386:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r4, r0
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r3, r0
	cmp	r4, r3
	bne	.L369
	mov	r3, #1
	str	r3, [fp, #-108]
	b	.L390
.L392:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-108]
	mul	r3, r2, r3
	str	r3, [fp, #-80]
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	sgn
	mov	r2, r0
	ldr	r3, [fp, #-108]
	mul	r3, r2, r3
	str	r3, [fp, #-76]
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-76]
	add	r0, r2, r3
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	mov	r1, r3
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #1
	bne	.L391
	mov	r3, #1
	b	.L393
.L391:
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L390:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	mov	r0, r3
	bl	abv
	mov	r2, r0
	ldr	r3, [fp, #-108]
	cmp	r3, r2
	blt	.L392
	nop
.L369:
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L365:
	ldr	r3, [fp, #-132]
	cmp	r3, #8
	ble	.L394
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-92]
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #2
	bne	.L395
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-92]
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #0
	bne	.L395
	ldr	r0, .L398+20
	bl	puts
	mov	r3, #1
	b	.L393
.L395:
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-92]
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #0
	beq	.L396
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-92]
	bl	isAttackedWhite
	mov	r3, r0
	cmp	r3, #2
	bne	.L364
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-92]
	bl	isAttackedBlack
	mov	r3, r0
	cmp	r3, #0
	beq	.L364
.L396:
	mov	r3, #2
	b	.L393
.L364:
	mov	r3, #0
.L393:
	ldr	r2, .L398
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L397
	bl	__stack_chk_fail
.L397:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L399:
	.align	2
.L398:
	.word	.LC122
	.word	blackKingLocation
	.word	attackingPieceBlack
	.word	board
	.word	.LC5
	.word	.LC121
	.size	checkMateBlack, .-checkMateBlack
	.section	.rodata
	.align	2
.LC125:
	.ascii	"\012WHITE to move:\000"
	.align	2
.LC126:
	.ascii	"\012BLACK to move:\000"
	.align	2
.LC127:
	.ascii	"\012 Coordinates of piece to be moved: \012 \011 >\000"
	.align	2
.LC128:
	.ascii	" %c %c\000"
	.align	2
.LC129:
	.ascii	"Are you sure you want to draw?(Y/N)\012\011>\000"
	.align	2
.LC130:
	.ascii	"Does BLACK accept the draw?(Y/N)\012\011>\000"
	.align	2
.LC131:
	.ascii	"Does WHITE accept the draw?(Y/N)\012\011>\000"
	.align	2
.LC132:
	.ascii	"\012Piece cannot be moved here: Invalid coordinates"
	.ascii	"\000"
	.align	2
.LC133:
	.ascii	"\012 Coordinates of destination: \012 \011 >\000"
	.align	2
.LC134:
	.ascii	"\012Your king is in check! You can and must move in"
	.ascii	" a way which will change that.\000"
	.align	2
.LC135:
	.ascii	"\012Piece cannot be moved here: Illegal move\000"
	.align	2
.LC123:
	.ascii	"ABCDEFGH"
	.align	2
.LC124:
	.ascii	"12345678"
	.align	2
.LC6:
	.word	9
	.word	9
	.word	9
	.word	9
	.align	2
.LC136:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	makemove
	.syntax unified
	.arm
	.fpu softvfp
	.type	makemove, %function
makemove:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-64]
	ldr	r3, .L438
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L438+4
	sub	r3, fp, #24
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r2, .L438+8
	sub	r3, fp, #16
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L401
.L435:
	ldr	r3, .L438+12
	str	r3, [fp, #-28]
	ldr	r3, .L438+16
	sub	ip, fp, #44
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L402
	ldr	r0, .L438+20
	bl	puts
	b	.L403
.L402:
	ldr	r0, .L438+24
	bl	puts
.L403:
	ldr	r0, .L438+28
	bl	printf
	sub	r3, fp, #28
	add	r2, r3, #1
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L438+32
	bl	__isoc99_scanf
	ldrb	r3, [fp, #-28]	@ zero_extendqisi2
	cmp	r3, #81
	bne	.L404
	ldrb	r3, [fp, #-27]	@ zero_extendqisi2
	cmp	r3, #84
	bne	.L404
	mov	r3, #3
	b	.L436
.L404:
	ldrb	r3, [fp, #-28]	@ zero_extendqisi2
	cmp	r3, #68
	bne	.L406
	ldrb	r3, [fp, #-27]	@ zero_extendqisi2
	cmp	r3, #82
	bne	.L406
	mov	r3, #66
	strb	r3, [fp, #-60]
	ldr	r0, .L438+36
	bl	printf
.L408:
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, .L438+40
	bl	__isoc99_scanf
	ldrb	r3, [fp, #-60]	@ zero_extendqisi2
	cmp	r3, #89
	beq	.L407
	ldrb	r3, [fp, #-60]	@ zero_extendqisi2
	cmp	r3, #78
	beq	.L407
	b	.L408
.L407:
	ldrb	r3, [fp, #-60]	@ zero_extendqisi2
	cmp	r3, #89
	bne	.L406
	mov	r3, #66
	strb	r3, [fp, #-59]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L410
	ldr	r0, .L438+44
	bl	printf
.L410:
	ldr	r3, [fp, #-64]
	cmp	r3, #1
	bne	.L413
	ldr	r0, .L438+48
	bl	printf
.L413:
	sub	r3, fp, #59
	mov	r1, r3
	ldr	r0, .L438+40
	bl	__isoc99_scanf
	ldrb	r3, [fp, #-59]	@ zero_extendqisi2
	cmp	r3, #89
	beq	.L412
	ldrb	r3, [fp, #-59]	@ zero_extendqisi2
	cmp	r3, #78
	beq	.L412
	b	.L413
.L412:
	ldrb	r3, [fp, #-59]	@ zero_extendqisi2
	cmp	r3, #89
	bne	.L406
	mov	r3, #5
	b	.L436
.L406:
	ldrb	r3, [fp, #-28]	@ zero_extendqisi2
	sub	r1, fp, #24
	mov	r2, #8
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	beq	.L415
	ldrb	r3, [fp, #-27]	@ zero_extendqisi2
	sub	r1, fp, #16
	mov	r2, #8
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	bne	.L416
.L415:
	ldr	r0, .L438+52
	bl	puts
	b	.L401
.L416:
	ldrb	r3, [fp, #-27]	@ zero_extendqisi2
	sub	r1, fp, #16
	mov	r2, #8
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	rsb	r3, r3, #7
	str	r3, [fp, #-44]
	ldrb	r3, [fp, #-28]	@ zero_extendqisi2
	sub	r1, fp, #24
	mov	r2, #8
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r0, .L438+56
	bl	printf
	sub	r3, fp, #28
	add	r2, r3, #3
	sub	r3, fp, #28
	add	r3, r3, #2
	mov	r1, r3
	ldr	r0, .L438+32
	bl	__isoc99_scanf
	ldrb	r3, [fp, #-26]	@ zero_extendqisi2
	sub	r1, fp, #24
	mov	r2, #8
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	beq	.L418
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	sub	r1, fp, #16
	mov	r2, #8
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	cmn	r3, #1
	bne	.L419
.L418:
	ldr	r0, .L438+52
	bl	puts
	b	.L401
.L419:
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	sub	r1, fp, #16
	mov	r2, #8
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	rsb	r3, r3, #7
	str	r3, [fp, #-36]
	ldrb	r3, [fp, #-26]	@ zero_extendqisi2
	sub	r1, fp, #24
	mov	r2, #8
	mov	r0, r3
	bl	checkifinarray
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-58]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-57]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L420
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L421
.L423:
	ldr	r2, .L438+60
	ldr	r3, [fp, #-56]
	add	r3, r2, r3
	add	r3, r3, #40
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #88
	bne	.L422
	ldr	r2, .L438+60
	ldr	r3, [fp, #-56]
	add	r3, r2, r3
	add	r3, r3, #40
	mov	r2, #32
	strb	r2, [r3]
.L422:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L421:
	ldr	r3, [fp, #-56]
	cmp	r3, #7
	ble	.L423
	ldr	r0, [fp, #-40]
	ldr	r1, [fp, #-44]
	ldr	r2, [fp, #-32]
	ldr	ip, [fp, #-36]
	ldrb	r3, [fp, #-58]	@ zero_extendqisi2
	str	r3, [sp]
	mov	r3, ip
	bl	checkIfLegalWhite
	mov	r3, r0
	cmp	r3, #1
	bne	.L424
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	mov	r2, #32
	strb	r2, [r3]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r2, [fp, #-58]
	strb	r2, [r3]
	bl	checkMateWhite
	mov	r3, r0
	cmp	r3, #0
	bne	.L425
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	mov	r2, #32
	strb	r2, [r3]
	ldrb	r3, [fp, #-57]	@ zero_extendqisi2
	cmp	r3, #120
	bne	.L426
	ldr	r3, [fp, #-36]
	add	r2, r3, #1
	ldr	r3, [fp, #-32]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	mov	r2, #32
	strb	r2, [r3]
.L426:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r2, [fp, #-58]
	strb	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-48]
	mov	r3, #1
	b	.L436
.L425:
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r2, [fp, #-58]
	strb	r2, [r3]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r2, [fp, #-57]
	strb	r2, [r3]
	ldr	r0, .L438+64
	bl	puts
	b	.L401
.L424:
	ldr	r0, .L438+68
	bl	puts
	b	.L401
.L420:
	ldr	r3, [fp, #-64]
	cmp	r3, #1
	bne	.L427
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L428
.L430:
	ldr	r2, .L438+60
	ldr	r3, [fp, #-52]
	add	r3, r2, r3
	add	r3, r3, #16
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #120
	bne	.L429
	ldr	r2, .L438+60
	ldr	r3, [fp, #-52]
	add	r3, r2, r3
	add	r3, r3, #16
	mov	r2, #32
	strb	r2, [r3]
.L429:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L428:
	ldr	r3, [fp, #-52]
	cmp	r3, #7
	ble	.L430
	ldr	r0, [fp, #-40]
	ldr	r1, [fp, #-44]
	ldr	r2, [fp, #-32]
	ldr	ip, [fp, #-36]
	ldrb	r3, [fp, #-58]	@ zero_extendqisi2
	str	r3, [sp]
	mov	r3, ip
	bl	checkIfLegalBlack
	mov	r3, r0
	cmp	r3, #1
	bne	.L431
	bl	checkMateBlack
	mov	r3, r0
	cmp	r3, #0
	bne	.L431
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	mov	r2, #32
	strb	r2, [r3]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r2, [fp, #-58]
	strb	r2, [r3]
	bl	checkMateBlack
	mov	r3, r0
	cmp	r3, #0
	bne	.L432
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	mov	r2, #32
	strb	r2, [r3]
	ldrb	r3, [fp, #-57]	@ zero_extendqisi2
	cmp	r3, #88
	bne	.L433
	ldr	r3, [fp, #-36]
	sub	r2, r3, #1
	ldr	r3, [fp, #-32]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	mov	r2, #32
	strb	r2, [r3]
.L433:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r2, [fp, #-58]
	strb	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-48]
	mov	r3, #0
	b	.L436
.L432:
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r2, [fp, #-58]
	strb	r2, [r3]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	ldr	r1, .L438+60
	lsl	r2, r2, #3
	add	r2, r1, r2
	add	r3, r2, r3
	ldrb	r2, [fp, #-57]
	strb	r2, [r3]
	ldr	r0, .L438+64
	bl	puts
	b	.L427
.L431:
	ldr	r0, .L438+68
	bl	puts
.L427:
	mov	r3, #1
	b	.L436
.L401:
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	bne	.L435
	mov	r3, #3
.L436:
	ldr	r2, .L438
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L437
	bl	__stack_chk_fail
.L437:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L439:
	.align	2
.L438:
	.word	.LC136
	.word	.LC123
	.word	.LC124
	.word	808464432
	.word	.LC6
	.word	.LC125
	.word	.LC126
	.word	.LC127
	.word	.LC128
	.word	.LC129
	.word	.LC51
	.word	.LC130
	.word	.LC131
	.word	.LC132
	.word	.LC133
	.word	board
	.word	.LC134
	.word	.LC135
	.size	makemove, .-makemove
	.section	.rodata
	.align	2
.LC137:
	.ascii	"\012\012\012 Press one of the following:\012\011N -"
	.ascii	" New game\012\011C - Continue\012\011S - Save game\012"
	.ascii	"\011L - Load game\012\011D - Clear Memory\012\011M "
	.ascii	"- Access the Manual\012\011Q - Quit\012\012>\000"
	.align	2
.LC138:
	.ascii	"\012CHECK!\000"
	.align	2
.LC139:
	.ascii	"\012\011It's a DRAW!\000"
	.align	2
.LC140:
	.ascii	"\012\011CHECKMATE! Black Wins!\000"
	.align	2
.LC141:
	.ascii	"\011CHECKMATE! White Wins!\000"
	.align	2
.LC142:
	.ascii	"\012Press Q to go back to the Menu!\012This game wi"
	.ascii	"ll be deleted once you quit and a new game will be "
	.ascii	"started.\012\011>\000"
	.align	2
.LC143:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L470
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L441
.L466:
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #65
	strb	r3, [fp, #-22]
	b	.L442
.L444:
	bl	printlogo
	ldr	r0, .L470+4
	bl	printf
	sub	r3, fp, #22
	mov	r1, r3
	ldr	r0, .L470+8
	bl	__isoc99_scanf
.L442:
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	cmp	r3, #78
	beq	.L443
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	cmp	r3, #67
	beq	.L443
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	cmp	r3, #83
	beq	.L443
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	cmp	r3, #76
	beq	.L443
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	cmp	r3, #68
	beq	.L443
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	cmp	r3, #77
	beq	.L443
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	cmp	r3, #81
	bne	.L444
.L443:
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	sub	r3, r3, #67
	cmp	r3, #16
	ldrls	pc, [pc, r3, asl #2]
	b	.L455
.L447:
	.word	.L455
	.word	.L452
	.word	.L455
	.word	.L455
	.word	.L455
	.word	.L455
	.word	.L455
	.word	.L455
	.word	.L455
	.word	.L451
	.word	.L450
	.word	.L449
	.word	.L455
	.word	.L455
	.word	.L448
	.word	.L455
	.word	.L446
.L449:
	bl	initializeBoard
	ldr	r3, .L470+12
	mov	r2, #0
	str	r2, [r3]
	b	.L445
.L446:
	bl	saveGame
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L445
.L451:
	bl	loadGame
	mov	r3, r0
	cmp	r3, #1
	bne	.L469
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L469
.L452:
	bl	clearMemory
	mov	r3, #1
	str	r3, [fp, #-16]
.L450:
	bl	openManual
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L445
.L448:
	mov	r3, #1
	str	r3, [fp, #-20]
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L445
.L469:
	nop
.L445:
	b	.L455
.L465:
	bl	printboard
	bl	checkMateWhite
	mov	r3, r0
	cmp	r3, #1
	beq	.L456
	bl	checkMateBlack
	mov	r3, r0
	cmp	r3, #1
	bne	.L457
.L456:
	ldr	r0, .L470+16
	bl	puts
.L457:
	ldr	r3, .L470+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	makemove
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	bne	.L458
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L441
.L458:
	ldr	r3, [fp, #-12]
	cmp	r3, #5
	bne	.L460
	bl	printboard
	ldr	r0, .L470+20
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-16]
.L460:
	ldr	r2, .L470+12
	ldr	r3, [fp, #-12]
	str	r3, [r2]
	bl	checkMateWhite
	mov	r3, r0
	cmp	r3, #2
	bne	.L461
	bl	printboard
	ldr	r0, .L470+24
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-16]
.L461:
	bl	checkMateBlack
	mov	r3, r0
	cmp	r3, #2
	bne	.L462
	bl	printboard
	ldr	r0, .L470+28
	bl	printf
	mov	r3, #1
	str	r3, [fp, #-16]
.L462:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L455
	ldr	r0, .L470+32
	bl	printf
.L464:
	mov	r3, #66
	strb	r3, [fp, #-21]
	sub	r3, fp, #21
	mov	r1, r3
	ldr	r0, .L470+8
	bl	__isoc99_scanf
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r3, #81
	bne	.L464
	bl	initializeBoard
.L455:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L465
.L441:
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L466
	mov	r3, #0
	ldr	r2, .L470
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L468
	bl	__stack_chk_fail
.L468:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L471:
	.align	2
.L470:
	.word	.LC143
	.word	.LC137
	.word	.LC51
	.word	turn
	.word	.LC138
	.word	.LC139
	.word	.LC140
	.word	.LC141
	.word	.LC142
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
