	.file	"688686.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"   | a | b | c | d | e | f | g | h"
	.align 8
.LC1:
	.string	"---+---+---+---+---+---+---+---+---"
.LC2:
	.string	" %d "
.LC3:
	.string	"| %c "
	.text
	.globl	print_table
	.type	print_table, @function
print_table:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L5:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L3:
	cmp	DWORD PTR -4[rbp], 7
	jle	.L4
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L2:
	cmp	DWORD PTR -8[rbp], 7
	jle	.L5
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_table, .-print_table
	.globl	check_win
	.type	check_win, @function
check_win:
.LFB7:
	.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	QWORD PTR -24[rbp], rdi
	mov	BYTE PTR -6[rbp], 0
	mov	BYTE PTR -5[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L7
.L12:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	tolower@PLT
	cmp	eax, 120
	jne	.L8
	mov	BYTE PTR -6[rbp], 1
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	tolower@PLT
	cmp	eax, 111
	jne	.L9
	mov	BYTE PTR -5[rbp], 1
.L9:
	cmp	BYTE PTR -6[rbp], 0
	je	.L10
	cmp	BYTE PTR -5[rbp], 0
	je	.L10
	mov	eax, 32
	jmp	.L11
.L10:
	add	DWORD PTR -4[rbp], 1
.L7:
	cmp	DWORD PTR -4[rbp], 63
	jle	.L12
	cmp	BYTE PTR -6[rbp], 0
	je	.L13
	mov	eax, 120
	jmp	.L11
.L13:
	mov	eax, 111
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	check_win, .-check_win
	.globl	encode_move
	.type	encode_move, @function
encode_move:
.LFB8:
	.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	DWORD PTR -12[rbp], edx
	mov	DWORD PTR -16[rbp], ecx
	mov	eax, DWORD PTR -16[rbp]
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	encode_move, .-encode_move
	.globl	get_square
	.type	get_square, @function
get_square:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	cmp	DWORD PTR -12[rbp], 0
	js	.L18
	cmp	DWORD PTR -12[rbp], 7
	jg	.L18
	cmp	DWORD PTR -16[rbp], 0
	js	.L18
	cmp	DWORD PTR -16[rbp], 7
	jle	.L19
.L18:
	mov	eax, -1
	jmp	.L20
.L19:
	mov	eax, DWORD PTR -16[rbp]
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
.L20:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	get_square, .-get_square
	.globl	get_opponent
	.type	get_opponent, @function
get_opponent:
.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, 16
	mov	eax, edi
	mov	BYTE PTR -4[rbp], al
	movsx	eax, BYTE PTR -4[rbp]
	mov	edi, eax
	call	tolower@PLT
	cmp	eax, 120
	jne	.L22
	mov	eax, 111
	jmp	.L24
.L22:
	mov	eax, 120
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get_opponent, .-get_opponent
	.globl	check_move
	.type	check_move, @function
check_move:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	eax, esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	mov	DWORD PTR -40[rbp], r8d
	mov	BYTE PTR -28[rbp], al
	mov	eax, DWORD PTR -32[rbp]
	cdq
	shr	edx, 29
	add	eax, edx
	and	eax, 7
	sub	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	lea	edx, 7[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 3
	mov	DWORD PTR -8[rbp], eax
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -40[rbp]
	add	edx, eax
	mov	ecx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -36[rbp]
	add	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	get_square
	movsx	eax, al
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 32
	jne	.L26
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -40[rbp]
	lea	ecx, [rdx+rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -36[rbp]
	add	edx, eax
	mov	esi, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	encode_move
	jmp	.L27
.L26:
	movsx	eax, BYTE PTR -28[rbp]
	mov	edi, eax
	call	get_opponent
	movsx	eax, al
	cmp	DWORD PTR -4[rbp], eax
	je	.L28
	movsx	eax, BYTE PTR -28[rbp]
	mov	edi, eax
	call	get_opponent
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	cmp	DWORD PTR -4[rbp], eax
	jne	.L29
.L28:
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, [rax+rax]
	mov	eax, DWORD PTR -8[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -36[rbp]
	lea	ecx, [rax+rax]
	mov	eax, DWORD PTR -12[rbp]
	add	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	get_square
	cmp	al, 32
	jne	.L29
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, [rax+rax]
	mov	eax, DWORD PTR -8[rbp]
	lea	ecx, [rdx+rax]
	mov	eax, DWORD PTR -36[rbp]
	lea	edx, [rax+rax]
	mov	eax, DWORD PTR -12[rbp]
	add	edx, eax
	mov	esi, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	encode_move
	jmp	.L27
.L29:
	mov	eax, -1
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	check_move, .-check_move
	.globl	available_moves
	.type	available_moves, @function
available_moves:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	eax, esi
	mov	BYTE PTR -44[rbp], al
	mov	edi, 192
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L31
.L39:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	tolower@PLT
	movsx	edx, BYTE PTR -44[rbp]
	cmp	eax, edx
	jne	.L43
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 111
	je	.L34
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 88
	je	.L34
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 79
	jne	.L35
.L34:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	esi, al
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	r8d, -1
	mov	ecx, -1
	mov	rdi, rax
	call	check_move
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	je	.L36
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -20[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rdx], eax
.L36:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	esi, al
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	r8d, -1
	mov	ecx, 1
	mov	rdi, rax
	call	check_move
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	je	.L35
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -20[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rdx], eax
.L35:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 120
	je	.L37
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 88
	je	.L37
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 79
	jne	.L33
.L37:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	esi, al
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	r8d, 1
	mov	ecx, 1
	mov	rdi, rax
	call	check_move
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	je	.L38
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -20[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rdx], eax
.L38:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	esi, al
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	r8d, 1
	mov	ecx, -1
	mov	rdi, rax
	call	check_move
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	je	.L33
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -20[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rdx], eax
	jmp	.L33
.L43:
	nop
.L33:
	add	DWORD PTR -16[rbp], 1
.L31:
	cmp	DWORD PTR -16[rbp], 63
	jle	.L39
	cmp	DWORD PTR -20[rbp], 0
	jne	.L40
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -8[rbp], 0
	jmp	.L41
.L40:
	cmp	DWORD PTR -20[rbp], 47
	jg	.L41
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], -1
.L41:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	available_moves, .-available_moves
	.globl	get_score
	.type	get_score, @function
get_score:
.LFB13:
	.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	eax, esi
	mov	BYTE PTR -44[rbp], al
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L45
.L50:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -44[rbp], al
	jne	.L46
	add	DWORD PTR -24[rbp], 1
	jmp	.L47
.L46:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	ebx, al
	movsx	eax, BYTE PTR -44[rbp]
	mov	edi, eax
	call	toupper@PLT
	cmp	ebx, eax
	jne	.L48
	add	DWORD PTR -24[rbp], 5
	jmp	.L47
.L48:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	ebx, BYTE PTR [rax]
	movsx	eax, BYTE PTR -44[rbp]
	mov	edi, eax
	call	get_opponent
	cmp	bl, al
	jne	.L49
	sub	DWORD PTR -24[rbp], 1
	jmp	.L47
.L49:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	ebx, al
	movsx	eax, BYTE PTR -44[rbp]
	mov	edi, eax
	call	get_opponent
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	cmp	ebx, eax
	jne	.L47
	sub	DWORD PTR -24[rbp], 5
.L47:
	add	DWORD PTR -20[rbp], 1
.L45:
	cmp	DWORD PTR -20[rbp], 63
	jle	.L50
	mov	eax, DWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	get_score, .-get_score
	.globl	copy_table
	.type	copy_table, @function
copy_table:
.LFB14:
	.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	QWORD PTR -24[rbp], rdi
	mov	edi, 64
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L53
.L54:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -12[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -12[rbp], 1
.L53:
	cmp	DWORD PTR -12[rbp], 63
	jle	.L54
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	copy_table, .-copy_table
	.globl	do_move
	.type	do_move, @function
do_move:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	eax, DWORD PTR -28[rbp]
	cdq
	shr	edx, 29
	add	eax, edx
	and	eax, 7
	sub	eax, edx
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 7[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 3
	mov	edx, eax
	mov	eax, edx
	sar	eax, 31
	shr	eax, 29
	mov	ecx, eax
	lea	eax, [rdx+rcx]
	and	eax, 7
	sub	eax, ecx
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	edx, eax
	mov	eax, edx
	sar	eax, 31
	shr	eax, 29
	mov	ecx, eax
	lea	eax, [rdx+rcx]
	and	eax, 7
	sub	eax, ecx
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 511[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 9
	mov	edx, eax
	mov	eax, edx
	sar	eax, 31
	shr	eax, 29
	mov	ecx, eax
	lea	eax, [rdx+rcx]
	and	eax, 7
	sub	eax, ecx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -4[rbp]
	lea	ecx, 0[0+rdx*8]
	mov	edx, DWORD PTR -8[rbp]
	add	edx, ecx
	movsx	rcx, edx
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 32
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 111
	jne	.L57
	cmp	DWORD PTR -4[rbp], 0
	jne	.L57
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 79
	jmp	.L58
.L57:
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 120
	jne	.L58
	cmp	DWORD PTR -4[rbp], 7
	jne	.L58
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 0[0+rax*8]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 88
.L58:
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, DWORD PTR -8[rbp]
	cmp	eax, 2
	je	.L59
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, DWORD PTR -8[rbp]
	cmp	eax, -2
	jne	.L61
.L59:
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	ecx, eax
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	sal	eax, 3
	add	eax, ecx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 32
.L61:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	do_move, .-do_move
	.section	.rodata
.LC4:
	.string	"%c> %c%c %c%c\n"
	.text
	.globl	negamax
	.type	negamax, @function
negamax:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	eax, edx
	mov	BYTE PTR -48[rbp], al
	cmp	DWORD PTR -44[rbp], 3
	je	.L63
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	check_win
	cmp	al, 32
	je	.L64
.L63:
	movsx	edx, BYTE PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	get_score
	jmp	.L65
.L64:
	movsx	edx, BYTE PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	available_moves
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L66
	mov	eax, -1000
	jmp	.L65
.L66:
	mov	DWORD PTR -32[rbp], -1000
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	jmp	.L67
.L71:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	je	.L73
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	copy_table
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	do_move
	movsx	eax, BYTE PTR -48[rbp]
	mov	edi, eax
	call	get_opponent
	movsx	edx, al
	mov	eax, DWORD PTR -44[rbp]
	lea	ecx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	negamax
	neg	eax
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jle	.L70
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -28[rbp], eax
.L70:
	add	DWORD PTR -24[rbp], 1
.L67:
	cmp	DWORD PTR -24[rbp], 47
	jle	.L71
	jmp	.L69
.L73:
	nop
.L69:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	cmp	DWORD PTR -44[rbp], 0
	jne	.L72
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 511[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 9
	mov	edx, eax
	mov	eax, edx
	sar	eax, 31
	shr	eax, 29
	mov	ecx, eax
	lea	eax, [rdx+rcx]
	and	eax, 7
	sub	eax, ecx
	lea	edi, 49[rax]
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	edx, eax
	mov	eax, edx
	sar	eax, 31
	shr	eax, 29
	mov	ecx, eax
	lea	eax, [rdx+rcx]
	and	eax, 7
	sub	eax, ecx
	lea	esi, 97[rax]
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 7[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 3
	mov	edx, eax
	mov	eax, edx
	sar	eax, 31
	shr	eax, 29
	mov	ecx, eax
	lea	eax, [rdx+rcx]
	and	eax, 7
	sub	eax, ecx
	lea	ecx, 49[rax]
	mov	eax, DWORD PTR -28[rbp]
	cdq
	shr	edx, 29
	add	eax, edx
	and	eax, 7
	sub	eax, edx
	lea	edx, 97[rax]
	movsx	eax, BYTE PTR -48[rbp]
	mov	r9d, edi
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	do_move
.L72:
	mov	eax, DWORD PTR -32[rbp]
.L65:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	negamax, .-negamax
	.globl	is_valid_move
	.type	is_valid_move, @function
is_valid_move:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L75
.L79:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	jne	.L76
	mov	eax, 0
	jmp	.L77
.L76:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -28[rbp], eax
	jne	.L78
	mov	eax, 1
	jmp	.L77
.L78:
	add	DWORD PTR -4[rbp], 1
.L75:
	cmp	DWORD PTR -4[rbp], 47
	jle	.L79
	mov	eax, 0
.L77:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	is_valid_move, .-is_valid_move
	.section	.rodata
.LC5:
	.string	"%c> "
	.text
	.globl	get_input
	.type	get_input, @function
get_input:
.LFB18:
	.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	QWORD PTR -72[rbp], rdi
	mov	eax, esi
	mov	BYTE PTR -76[rbp], al
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	movsx	edx, BYTE PTR -76[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	available_moves
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -56[rbp], -1
	jmp	.L81
.L85:
	movsx	eax, BYTE PTR -76[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rcx, -24[rbp]
	lea	rax, -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 6
	je	.L82
	jmp	.L81
.L82:
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 97
	mov	DWORD PTR -48[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 49
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 97
	mov	DWORD PTR -40[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 4
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 49
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -48[rbp], 0
	js	.L81
	cmp	DWORD PTR -48[rbp], 7
	jg	.L81
	cmp	DWORD PTR -44[rbp], 0
	js	.L81
	cmp	DWORD PTR -44[rbp], 7
	jg	.L81
	cmp	DWORD PTR -40[rbp], 0
	js	.L81
	cmp	DWORD PTR -40[rbp], 7
	jg	.L81
	cmp	DWORD PTR -36[rbp], 0
	js	.L81
	cmp	DWORD PTR -36[rbp], 7
	jle	.L84
	jmp	.L81
.L84:
	mov	ecx, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -40[rbp]
	mov	esi, DWORD PTR -44[rbp]
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	call	encode_move
	mov	DWORD PTR -56[rbp], eax
.L81:
	mov	edx, DWORD PTR -56[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	is_valid_move
	test	al, al
	je	.L85
	mov	eax, DWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L87
	call	__stack_chk_fail@PLT
.L87:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	get_input, .-get_input
	.section	.rodata
.LC6:
	.string	"--ai"
	.align 8
.LC7:
	.string	"Invalid AI turn. Should be 'x' or 'o'"
.LC8:
	.string	"Invalid arguments. Options:"
.LC9:
	.string	"\t%s --ai [x|o]\n"
.LC10:
	.string	"%c won!\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 112
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -84[rbp], 0
	jmp	.L89
.L109:
	cmp	DWORD PTR -84[rbp], 7
	jg	.L90
	mov	eax, DWORD PTR -84[rbp]
	cdq
	shr	edx, 31
	add	eax, edx
	and	eax, 1
	sub	eax, edx
	cmp	eax, 1
	jne	.L91
	mov	edx, 120
	jmp	.L92
.L91:
	mov	edx, 32
.L92:
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	mov	BYTE PTR -80[rbp+rax], dl
	jmp	.L93
.L90:
	cmp	DWORD PTR -84[rbp], 15
	jg	.L94
	mov	eax, DWORD PTR -84[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L95
	mov	edx, 120
	jmp	.L96
.L95:
	mov	edx, 32
.L96:
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	mov	BYTE PTR -80[rbp+rax], dl
	jmp	.L93
.L94:
	cmp	DWORD PTR -84[rbp], 23
	jg	.L97
	mov	eax, DWORD PTR -84[rbp]
	cdq
	shr	edx, 31
	add	eax, edx
	and	eax, 1
	sub	eax, edx
	cmp	eax, 1
	jne	.L98
	mov	edx, 120
	jmp	.L99
.L98:
	mov	edx, 32
.L99:
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	mov	BYTE PTR -80[rbp+rax], dl
	jmp	.L93
.L97:
	cmp	DWORD PTR -84[rbp], 55
	jle	.L100
	mov	eax, DWORD PTR -84[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L101
	mov	edx, 111
	jmp	.L102
.L101:
	mov	edx, 32
.L102:
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	mov	BYTE PTR -80[rbp+rax], dl
	jmp	.L93
.L100:
	cmp	DWORD PTR -84[rbp], 47
	jle	.L103
	mov	eax, DWORD PTR -84[rbp]
	cdq
	shr	edx, 31
	add	eax, edx
	and	eax, 1
	sub	eax, edx
	cmp	eax, 1
	jne	.L104
	mov	edx, 111
	jmp	.L105
.L104:
	mov	edx, 32
.L105:
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	mov	BYTE PTR -80[rbp+rax], dl
	jmp	.L93
.L103:
	cmp	DWORD PTR -84[rbp], 39
	jle	.L106
	mov	eax, DWORD PTR -84[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L107
	mov	edx, 111
	jmp	.L108
.L107:
	mov	edx, 32
.L108:
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	mov	BYTE PTR -80[rbp+rax], dl
	jmp	.L93
.L106:
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	mov	BYTE PTR -80[rbp+rax], 32
.L93:
	add	DWORD PTR -84[rbp], 1
.L89:
	cmp	DWORD PTR -84[rbp], 63
	jle	.L109
	mov	BYTE PTR -87[rbp], 120
	mov	BYTE PTR -86[rbp], 32
	cmp	DWORD PTR -100[rbp], 2
	jne	.L110
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L110
	mov	BYTE PTR -86[rbp], 111
	jmp	.L111
.L110:
	cmp	DWORD PTR -100[rbp], 3
	jne	.L112
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L112
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	tolower@PLT
	mov	BYTE PTR -86[rbp], al
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 1
	ja	.L113
	cmp	BYTE PTR -86[rbp], 120
	je	.L121
	cmp	BYTE PTR -86[rbp], 111
	je	.L121
.L113:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L112:
	cmp	DWORD PTR -100[rbp], 1
	je	.L111
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L121:
	nop
.L111:
	mov	BYTE PTR -85[rbp], 32
	jmp	.L115
.L118:
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	print_table
	movzx	eax, BYTE PTR -87[rbp]
	cmp	al, BYTE PTR -86[rbp]
	jne	.L116
	movsx	edx, BYTE PTR -87[rbp]
	lea	rax, -80[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	negamax
	cmp	eax, -1000
	jne	.L117
	movsx	eax, BYTE PTR -87[rbp]
	mov	edi, eax
	call	get_opponent
	mov	BYTE PTR -85[rbp], al
	jmp	.L117
.L116:
	movsx	edx, BYTE PTR -87[rbp]
	lea	rax, -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	get_input
	mov	edx, eax
	lea	rax, -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	do_move
.L117:
	movsx	eax, BYTE PTR -87[rbp]
	mov	edi, eax
	call	get_opponent
	mov	BYTE PTR -87[rbp], al
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	check_win
	mov	BYTE PTR -85[rbp], al
.L115:
	cmp	BYTE PTR -85[rbp], 32
	je	.L118
	movsx	eax, BYTE PTR -85[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L120
	call	__stack_chk_fail@PLT
.L120:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.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	"688686.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"   | a | b | c | d | e | f | g | h\000"
	.align	2
.LC1:
	.ascii	"---+---+---+---+---+---+---+---+---\000"
	.align	2
.LC2:
	.ascii	" %d \000"
	.align	2
.LC3:
	.ascii	"| %c \000"
	.text
	.align	2
	.global	print_table
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_table, %function
print_table:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, .L6
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L5:
	ldr	r0, .L6+4
	bl	puts
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L6+8
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L3
.L4:
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L6+12
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L3:
	ldr	r3, [fp, #-8]
	cmp	r3, #7
	ble	.L4
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #7
	ble	.L5
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	print_table, .-print_table
	.align	2
	.global	check_win
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_win, %function
check_win:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	strb	r3, [fp, #-10]
	mov	r3, #0
	strb	r3, [fp, #-9]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L9
.L14:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	tolower
	mov	r3, r0
	cmp	r3, #120
	bne	.L10
	mov	r3, #1
	strb	r3, [fp, #-10]
	b	.L11
.L10:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	tolower
	mov	r3, r0
	cmp	r3, #111
	bne	.L11
	mov	r3, #1
	strb	r3, [fp, #-9]
.L11:
	ldrb	r3, [fp, #-10]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L12
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L12
	mov	r3, #32
	b	.L13
.L12:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L9:
	ldr	r3, [fp, #-8]
	cmp	r3, #63
	ble	.L14
	ldrb	r3, [fp, #-10]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L15
	mov	r3, #120
	b	.L13
.L15:
	mov	r3, #111
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	check_win, .-check_win
	.align	2
	.global	encode_move
	.syntax unified
	.arm
	.fpu softvfp
	.type	encode_move, %function
encode_move:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	lsl	r2, r3, #3
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	lsl	r2, r3, #3
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	encode_move, .-encode_move
	.align	2
	.global	get_square
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_square, %function
get_square:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L20
	ldr	r3, [fp, #-12]
	cmp	r3, #7
	bgt	.L20
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	blt	.L20
	ldr	r3, [fp, #-16]
	cmp	r3, #7
	ble	.L21
.L20:
	mov	r3, #255
	b	.L22
.L21:
	ldr	r3, [fp, #-16]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
.L22:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	get_square, .-get_square
	.align	2
	.global	get_opponent
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_opponent, %function
get_opponent:
	@ 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, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	tolower
	mov	r3, r0
	cmp	r3, #120
	bne	.L24
	mov	r3, #111
	b	.L25
.L24:
	mov	r3, #120
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	get_opponent, .-get_opponent
	.align	2
	.global	check_move
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_move, %function
check_move:
	@ args = 4, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	mov	r3, r1
	strb	r3, [fp, #-25]
	ldr	r3, [fp, #-32]
	rsbs	r2, r3, #0
	and	r3, r3, #7
	and	r2, r2, #7
	rsbpl	r3, r2, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	add	r2, r3, #7
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #3
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	add	r1, r2, r3
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #4]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r0, [fp, #-24]
	bl	get_square
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #32
	bne	.L28
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	add	r1, r2, r3
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #4]
	add	r3, r2, r3
	mov	r2, r1
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	encode_move
	mov	r3, r0
	b	.L29
.L28:
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	mov	r0, r3
	bl	get_opponent
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	beq	.L30
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	mov	r0, r3
	bl	get_opponent
	mov	r3, r0
	mov	r0, r3
	bl	toupper
	mov	r2, r0
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	bne	.L31
.L30:
	ldr	r3, [fp, #-36]
	lsl	r2, r3, #1
	ldr	r3, [fp, #-16]
	add	r1, r2, r3
	ldr	r3, [fp, #4]
	lsl	r2, r3, #1
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r0, [fp, #-24]
	bl	get_square
	mov	r3, r0
	cmp	r3, #32
	bne	.L31
	ldr	r3, [fp, #-36]
	lsl	r2, r3, #1
	ldr	r3, [fp, #-16]
	add	r1, r2, r3
	ldr	r3, [fp, #4]
	lsl	r2, r3, #1
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, r1
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	encode_move
	mov	r3, r0
	b	.L29
.L31:
	mvn	r3, #0
.L29:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	check_move, .-check_move
	.align	2
	.global	available_moves
	.syntax unified
	.arm
	.fpu softvfp
	.type	available_moves, %function
available_moves:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	mov	r3, r1
	strb	r3, [fp, #-25]
	mov	r0, #192
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L33
.L41:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	tolower
	mov	r2, r0
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L45
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #111
	beq	.L36
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #88
	beq	.L36
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #79
	bne	.L37
.L36:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	mvn	r3, #0
	str	r3, [sp]
	mvn	r3, #0
	ldr	r2, [fp, #-12]
	ldr	r0, [fp, #-24]
	bl	check_move
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L38
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
.L38:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, #1
	ldr	r2, [fp, #-12]
	ldr	r0, [fp, #-24]
	bl	check_move
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L37
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
.L37:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #120
	beq	.L39
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #88
	beq	.L39
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #79
	bne	.L35
.L39:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	mov	r3, #1
	str	r3, [sp]
	mov	r3, #1
	ldr	r2, [fp, #-12]
	ldr	r0, [fp, #-24]
	bl	check_move
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L40
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
.L40:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	mov	r3, #1
	str	r3, [sp]
	mvn	r3, #0
	ldr	r2, [fp, #-12]
	ldr	r0, [fp, #-24]
	bl	check_move
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L35
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	b	.L35
.L45:
	nop
.L35:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L33:
	ldr	r3, [fp, #-12]
	cmp	r3, #63
	ble	.L41
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L42
	ldr	r0, [fp, #-20]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L43
.L42:
	ldr	r3, [fp, #-16]
	cmp	r3, #47
	bgt	.L43
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3]
.L43:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	available_moves, .-available_moves
	.align	2
	.global	get_score
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_score, %function
get_score:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	mov	r3, r1
	strb	r3, [fp, #-25]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L47
.L52:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-25]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L48
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L49
.L48:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r3
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	cmp	r4, r3
	bne	.L50
	ldr	r3, [fp, #-20]
	add	r3, r3, #5
	str	r3, [fp, #-20]
	b	.L49
.L50:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r4, [r3]	@ zero_extendqisi2
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	mov	r0, r3
	bl	get_opponent
	mov	r3, r0
	cmp	r4, r3
	bne	.L51
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L49
.L51:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r3
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	mov	r0, r3
	bl	get_opponent
	mov	r3, r0
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	cmp	r4, r3
	bne	.L49
	ldr	r3, [fp, #-20]
	sub	r3, r3, #5
	str	r3, [fp, #-20]
.L49:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L47:
	ldr	r3, [fp, #-16]
	cmp	r3, #63
	ble	.L52
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	get_score, .-get_score
	.align	2
	.global	copy_table
	.syntax unified
	.arm
	.fpu softvfp
	.type	copy_table, %function
copy_table:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r0, #64
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L55
.L56:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L55:
	ldr	r3, [fp, #-12]
	cmp	r3, #63
	ble	.L56
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	copy_table, .-copy_table
	.align	2
	.global	do_move
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_move, %function
do_move:
	@ 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
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-28]
	rsbs	r2, r3, #0
	and	r3, r3, #7
	and	r2, r2, #7
	rsbpl	r3, r2, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	add	r2, r3, #7
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #3
	rsbs	r2, r3, #0
	and	r3, r3, #7
	and	r2, r2, #7
	rsbpl	r3, r2, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	add	r2, r3, #63
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #6
	rsbs	r2, r3, #0
	and	r3, r3, #7
	and	r2, r2, #7
	rsbpl	r3, r2, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r2, r3, #508
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #9
	rsbs	r2, r3, #0
	and	r3, r3, #7
	and	r2, r2, #7
	rsbpl	r3, r2, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r2, r3, r2
	ldr	r3, [fp, #-8]
	lsl	r1, r3, #3
	ldr	r3, [fp, #-12]
	add	r3, r1, r3
	mov	r1, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r1
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	mov	r2, #32
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #111
	bne	.L59
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L59
	ldr	r3, [fp, #-8]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	mov	r2, #79
	strb	r2, [r3]
	b	.L60
.L59:
	ldr	r3, [fp, #-8]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #120
	bne	.L60
	ldr	r3, [fp, #-8]
	cmp	r3, #7
	bne	.L60
	ldr	r3, [fp, #-8]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	mov	r2, #88
	strb	r2, [r3]
.L60:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	sub	r3, r2, r3
	cmp	r3, #2
	beq	.L61
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	sub	r3, r2, r3
	cmn	r3, #2
	bne	.L63
.L61:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r1, r3
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	mov	r2, #32
	strb	r2, [r3]
.L63:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	do_move, .-do_move
	.section	.rodata
	.align	2
.LC4:
	.ascii	"%c> %c%c %c%c\012\000"
	.text
	.align	2
	.global	negamax
	.syntax unified
	.arm
	.fpu softvfp
	.type	negamax, %function
negamax:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	mov	r3, r2
	strb	r3, [fp, #-45]
	ldr	r3, [fp, #-44]
	cmp	r3, #3
	beq	.L65
	ldr	r0, [fp, #-40]
	bl	check_win
	mov	r3, r0
	cmp	r3, #32
	beq	.L66
.L65:
	ldrb	r3, [fp, #-45]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	get_score
	mov	r3, r0
	b	.L67
.L66:
	ldrb	r3, [fp, #-45]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	available_moves
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L68
	ldr	r3, .L76
	b	.L67
.L68:
	ldr	r3, .L76
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L69
.L73:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L75
	ldr	r0, [fp, #-40]
	bl	copy_table
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	do_move
	ldr	r3, [fp, #-44]
	add	r4, r3, #1
	ldrb	r3, [fp, #-45]	@ zero_extendqisi2
	mov	r0, r3
	bl	get_opponent
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, [fp, #-20]
	bl	negamax
	mov	r3, r0
	rsb	r3, r3, #0
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-20]
	bl	free
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	ble	.L72
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-32]
.L72:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L69:
	ldr	r3, [fp, #-28]
	cmp	r3, #47
	ble	.L73
	b	.L71
.L75:
	nop
.L71:
	ldr	r0, [fp, #-24]
	bl	free
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L74
	ldrb	r0, [fp, #-45]	@ zero_extendqisi2
	ldr	r3, [fp, #-32]
	rsbs	r2, r3, #0
	and	r3, r3, #7
	and	r2, r2, #7
	rsbpl	r3, r2, #0
	add	ip, r3, #97
	ldr	r3, [fp, #-32]
	add	r2, r3, #7
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #3
	rsbs	r2, r3, #0
	and	r3, r3, #7
	and	r2, r2, #7
	rsbpl	r3, r2, #0
	add	lr, r3, #49
	ldr	r3, [fp, #-32]
	add	r2, r3, #63
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #6
	rsbs	r2, r3, #0
	and	r3, r3, #7
	and	r2, r2, #7
	rsbpl	r3, r2, #0
	add	r1, r3, #97
	ldr	r3, [fp, #-32]
	add	r2, r3, #508
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #9
	rsbs	r2, r3, #0
	and	r3, r3, #7
	and	r2, r2, #7
	rsbpl	r3, r2, #0
	add	r3, r3, #49
	str	r3, [sp, #4]
	str	r1, [sp]
	mov	r3, lr
	mov	r2, ip
	mov	r1, r0
	ldr	r0, .L76+4
	bl	printf
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-40]
	bl	do_move
.L74:
	ldr	r3, [fp, #-36]
.L67:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L77:
	.align	2
.L76:
	.word	-1000
	.word	.LC4
	.size	negamax, .-negamax
	.align	2
	.global	is_valid_move
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_valid_move, %function
is_valid_move:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L79
.L83:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L80
	mov	r3, #0
	b	.L81
.L80:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bne	.L82
	mov	r3, #1
	b	.L81
.L82:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L79:
	ldr	r3, [fp, #-8]
	cmp	r3, #47
	ble	.L83
	mov	r3, #0
.L81:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_valid_move, .-is_valid_move
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%c> \000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_input
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_input, %function
get_input:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	mov	r3, r1
	strb	r3, [fp, #-49]
	ldr	r3, .L92
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	ldrb	r3, [fp, #-49]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	available_moves
	str	r0, [fp, #-32]
	mvn	r3, #0
	str	r3, [fp, #-36]
	b	.L85
.L89:
	ldrb	r3, [fp, #-49]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L92+4
	bl	printf
	ldr	r3, .L92+8
	ldr	r2, [r3]
	sub	r1, fp, #40
	sub	r3, fp, #44
	mov	r0, r3
	bl	getline
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #6
	beq	.L86
	b	.L85
.L86:
	ldr	r3, [fp, #-44]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #97
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #49
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-44]
	add	r3, r3, #3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #97
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #49
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	blt	.L85
	ldr	r3, [fp, #-24]
	cmp	r3, #7
	bgt	.L85
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	blt	.L85
	ldr	r3, [fp, #-20]
	cmp	r3, #7
	bgt	.L85
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	blt	.L85
	ldr	r3, [fp, #-16]
	cmp	r3, #7
	bgt	.L85
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L85
	ldr	r3, [fp, #-12]
	cmp	r3, #7
	ble	.L88
	b	.L85
.L88:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	encode_move
	str	r0, [fp, #-36]
.L85:
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	is_valid_move
	mov	r3, r0
	cmp	r3, #0
	beq	.L89
	ldr	r3, [fp, #-36]
	ldr	r2, .L92
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L91
	bl	__stack_chk_fail
.L91:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L93:
	.align	2
.L92:
	.word	.LC6
	.word	.LC5
	.word	stdin
	.size	get_input, .-get_input
	.section	.rodata
	.align	2
.LC7:
	.ascii	"--ai\000"
	.align	2
.LC8:
	.ascii	"Invalid AI turn. Should be 'x' or 'o'\000"
	.align	2
.LC9:
	.ascii	"Invalid arguments. Options:\000"
	.align	2
.LC10:
	.ascii	"\011%s --ai [x|o]\012\000"
	.align	2
.LC11:
	.ascii	"%c won!\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	ldr	r3, .L128
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L95
.L115:
	ldr	r3, [fp, #-76]
	cmp	r3, #7
	bgt	.L96
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	cmp	r3, #1
	bne	.L97
	mov	r1, #120
	b	.L98
.L97:
	mov	r1, #32
.L98:
	sub	r2, fp, #72
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	b	.L99
.L96:
	ldr	r3, [fp, #-76]
	cmp	r3, #15
	bgt	.L100
	ldr	r3, [fp, #-76]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L101
	mov	r1, #120
	b	.L102
.L101:
	mov	r1, #32
.L102:
	sub	r2, fp, #72
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	b	.L99
.L100:
	ldr	r3, [fp, #-76]
	cmp	r3, #23
	bgt	.L103
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	cmp	r3, #1
	bne	.L104
	mov	r1, #120
	b	.L105
.L104:
	mov	r1, #32
.L105:
	sub	r2, fp, #72
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	b	.L99
.L103:
	ldr	r3, [fp, #-76]
	cmp	r3, #55
	ble	.L106
	ldr	r3, [fp, #-76]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L107
	mov	r1, #111
	b	.L108
.L107:
	mov	r1, #32
.L108:
	sub	r2, fp, #72
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	b	.L99
.L106:
	ldr	r3, [fp, #-76]
	cmp	r3, #47
	ble	.L109
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	cmp	r3, #1
	bne	.L110
	mov	r1, #111
	b	.L111
.L110:
	mov	r1, #32
.L111:
	sub	r2, fp, #72
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	b	.L99
.L109:
	ldr	r3, [fp, #-76]
	cmp	r3, #39
	ble	.L112
	ldr	r3, [fp, #-76]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L113
	mov	r1, #111
	b	.L114
.L113:
	mov	r1, #32
.L114:
	sub	r2, fp, #72
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	b	.L99
.L112:
	sub	r2, fp, #72
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, #32
	strb	r2, [r3]
.L99:
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L95:
	ldr	r3, [fp, #-76]
	cmp	r3, #63
	ble	.L115
	mov	r3, #120
	strb	r3, [fp, #-79]
	mov	r3, #32
	strb	r3, [fp, #-78]
	ldr	r3, [fp, #-88]
	cmp	r3, #2
	bne	.L116
	ldr	r3, [fp, #-92]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L128+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L116
	mov	r3, #111
	strb	r3, [fp, #-78]
	b	.L117
.L116:
	ldr	r3, [fp, #-88]
	cmp	r3, #3
	bne	.L118
	ldr	r3, [fp, #-92]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L128+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L118
	ldr	r3, [fp, #-92]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	tolower
	mov	r3, r0
	strb	r3, [fp, #-78]
	ldr	r3, [fp, #-92]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #1
	bhi	.L119
	ldrb	r3, [fp, #-78]	@ zero_extendqisi2
	cmp	r3, #120
	beq	.L127
	ldrb	r3, [fp, #-78]	@ zero_extendqisi2
	cmp	r3, #111
	beq	.L127
.L119:
	ldr	r0, .L128+8
	bl	puts
	mov	r0, #1
	bl	exit
.L118:
	ldr	r3, [fp, #-88]
	cmp	r3, #1
	beq	.L117
	ldr	r0, .L128+12
	bl	puts
	ldr	r3, [fp, #-92]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L128+16
	bl	printf
	mov	r0, #1
	bl	exit
.L127:
	nop
.L117:
	mov	r3, #32
	strb	r3, [fp, #-77]
	b	.L121
.L124:
	sub	r3, fp, #72
	mov	r0, r3
	bl	print_table
	ldrb	r2, [fp, #-79]	@ zero_extendqisi2
	ldrb	r3, [fp, #-78]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L122
	ldrb	r2, [fp, #-79]	@ zero_extendqisi2
	sub	r3, fp, #72
	mov	r1, #0
	mov	r0, r3
	bl	negamax
	mov	r3, r0
	cmn	r3, #1000
	bne	.L123
	ldrb	r3, [fp, #-79]	@ zero_extendqisi2
	mov	r0, r3
	bl	get_opponent
	mov	r3, r0
	strb	r3, [fp, #-77]
	b	.L123
.L122:
	ldrb	r2, [fp, #-79]	@ zero_extendqisi2
	sub	r3, fp, #72
	mov	r1, r2
	mov	r0, r3
	bl	get_input
	mov	r2, r0
	sub	r3, fp, #72
	mov	r1, r2
	mov	r0, r3
	bl	do_move
.L123:
	ldrb	r3, [fp, #-79]	@ zero_extendqisi2
	mov	r0, r3
	bl	get_opponent
	mov	r3, r0
	strb	r3, [fp, #-79]
	sub	r3, fp, #72
	mov	r0, r3
	bl	check_win
	mov	r3, r0
	strb	r3, [fp, #-77]
.L121:
	ldrb	r3, [fp, #-77]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L124
	ldrb	r3, [fp, #-77]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L128+20
	bl	printf
	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	.LC12
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
