	.file	"105051.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Player 2"
.LC1:
	.string	"Player 1"
	.text
	.globl	main
	.type	main, @function
main:
.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, 144
	mov	DWORD PTR -132[rbp], edi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rcx, -64[rbp]
	lea	rdx, -96[rbp]
	lea	rsi, -17[rbp]
	lea	rax, -128[rbp]
	push	1
	push	1
	lea	rdi, .LC0[rip]
	push	rdi
	lea	rdi, .LC1[rip]
	push	rdi
	mov	r9d, 111
	mov	r8d, 120
	mov	rdi, rax
	call	new_game
	add	rsp, 32
	lea	rax, -128[rbp]
	mov	rdi, rax
	call	play
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	new_game
	.type	new_game, @function
new_game:
.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, 64
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	eax, r8d
	mov	edx, r9d
	mov	BYTE PTR -52[rbp], al
	mov	eax, edx
	mov	BYTE PTR -56[rbp], al
	mov	rax, QWORD PTR -40[rbp]
	movzx	edx, BYTE PTR -52[rbp]
	mov	BYTE PTR 16[rax], dl
	mov	rax, QWORD PTR -48[rbp]
	movzx	edx, BYTE PTR -56[rbp]
	mov	BYTE PTR 16[rax], dl
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 32[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR 40[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR 24[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	DWORD PTR -4[rbp], 0
	jmp	.L5
.L6:
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	clear_space
	add	DWORD PTR -4[rbp], 1
.L5:
	cmp	DWORD PTR -4[rbp], 8
	jle	.L6
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	new_game, .-new_game
	.globl	clear_space
	.type	clear_space, @function
clear_space:
.LFB8:
	.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	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	mov	BYTE PTR [rdx+rax], 45
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	clear_space, .-clear_space
	.globl	is_occupied
	.type	is_occupied, @function
is_occupied:
.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	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 45
	setne	al
	movzx	eax, al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	is_occupied, .-is_occupied
	.globl	is_occupied_by_player
	.type	is_occupied_by_player, @function
is_occupied_by_player:
.LFB10:
	.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	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	movzx	edx, BYTE PTR [rdx+rax]
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR 16[rax]
	cmp	dl, al
	sete	al
	movzx	eax, al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	is_occupied_by_player, .-is_occupied_by_player
	.globl	check_winner
	.type	check_winner, @function
check_winner:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L13
.L16:
	mov	edx, DWORD PTR -4[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	is_occupied_by_player
	test	eax, eax
	je	.L14
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 1[rax]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	is_occupied_by_player
	test	eax, eax
	je	.L14
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 2[rax]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	is_occupied_by_player
	test	eax, eax
	je	.L14
	mov	eax, 1
	jmp	.L15
.L14:
	add	DWORD PTR -4[rbp], 3
.L13:
	cmp	DWORD PTR -4[rbp], 6
	jle	.L16
	mov	DWORD PTR -4[rbp], 0
	jmp	.L17
.L19:
	mov	edx, DWORD PTR -4[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	is_occupied_by_player
	test	eax, eax
	je	.L18
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 3[rax]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	is_occupied_by_player
	test	eax, eax
	je	.L18
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 6[rax]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	is_occupied_by_player
	test	eax, eax
	je	.L18
	mov	eax, 1
	jmp	.L15
.L18:
	add	DWORD PTR -4[rbp], 1
.L17:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L19
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	is_occupied_by_player
	test	eax, eax
	je	.L20
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	rdi, rax
	call	is_occupied_by_player
	test	eax, eax
	je	.L20
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	rdi, rax
	call	is_occupied_by_player
	test	eax, eax
	je	.L20
	mov	eax, 1
	jmp	.L15
.L20:
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	rdi, rax
	call	is_occupied_by_player
	test	eax, eax
	je	.L21
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	rdi, rax
	call	is_occupied_by_player
	test	eax, eax
	je	.L21
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 6
	mov	rsi, rcx
	mov	rdi, rax
	call	is_occupied_by_player
	test	eax, eax
	je	.L21
	mov	eax, 1
	jmp	.L15
.L21:
	mov	eax, 0
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	check_winner, .-check_winner
	.globl	new_copy
	.type	new_copy, @function
new_copy:
.LFB12:
	.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	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L23
.L24:
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	movzx	ecx, BYTE PTR [rdx+rax]
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	BYTE PTR [rdx+rax], cl
	add	DWORD PTR -4[rbp], 1
.L23:
	cmp	DWORD PTR -4[rbp], 8
	jle	.L24
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	new_copy, .-new_copy
	.section	.rodata
.LC2:
	.string	"------------\n"
.LC3:
	.string	"  %c"
.LC4:
	.string	"\n"
.LC5:
	.string	"------------"
	.text
	.globl	print_board
	.type	print_board, @function
print_board:
.LFB13:
	.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, .LC2[rip]
	call	puts@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L26
.L29:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L27
.L28:
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L27:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L28
	lea	rdi, .LC4[rip]
	call	puts@PLT
	add	DWORD PTR -8[rbp], 3
.L26:
	cmp	DWORD PTR -8[rbp], 6
	jle	.L29
	lea	rdi, .LC5[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	print_board, .-print_board
	.globl	minimax
	.type	minimax, @function
minimax:
.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, 80
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	QWORD PTR -72[rbp], rdx
	mov	DWORD PTR -76[rbp], ecx
	mov	DWORD PTR -80[rbp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -17[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	new_copy
	mov	edx, DWORD PTR -76[rbp]
	lea	rcx, -17[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	set_occupied_by
	mov	rdx, QWORD PTR -72[rbp]
	lea	rax, -17[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	check_winner
	test	eax, eax
	je	.L31
	mov	rax, QWORD PTR -72[rbp]
	cmp	rax, QWORD PTR -64[rbp]
	jne	.L32
	mov	eax, 10
	sub	eax, DWORD PTR -80[rbp]
	jmp	.L40
.L32:
	mov	eax, DWORD PTR -80[rbp]
	sub	eax, 10
	jmp	.L40
.L31:
	lea	rax, -17[rbp]
	mov	rdi, rax
	call	is_over
	test	eax, eax
	je	.L34
	mov	eax, 0
	jmp	.L40
.L34:
	mov	DWORD PTR -28[rbp], 1
	mov	DWORD PTR -36[rbp], 0
	jmp	.L35
.L39:
	mov	edx, DWORD PTR -36[rbp]
	lea	rax, -17[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	is_occupied
	test	eax, eax
	jne	.L36
	mov	eax, DWORD PTR -80[rbp]
	lea	edi, 1[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	ecx, DWORD PTR -36[rbp]
	mov	rsi, QWORD PTR -64[rbp]
	lea	rax, -17[rbp]
	mov	r8d, edi
	mov	rdi, rax
	call	minimax
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	jne	.L37
	mov	rax, QWORD PTR -72[rbp]
	cmp	rax, QWORD PTR -64[rbp]
	je	.L38
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L37
.L38:
	mov	rax, QWORD PTR -72[rbp]
	cmp	rax, QWORD PTR -64[rbp]
	jne	.L36
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jle	.L36
.L37:
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -32[rbp], eax
	mov	DWORD PTR -28[rbp], 0
.L36:
	add	DWORD PTR -36[rbp], 1
.L35:
	cmp	DWORD PTR -36[rbp], 8
	jle	.L39
	mov	eax, DWORD PTR -32[rbp]
.L40:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	minimax, .-minimax
	.section	.rodata
.LC6:
	.string	"Enter a valid index to move: "
.LC7:
	.string	"%d"
	.text
	.globl	get_input
	.type	get_input, @function
get_input:
.LFB15:
	.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
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L44
	call	__stack_chk_fail@PLT
.L44:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	get_input, .-get_input
	.globl	is_valid_move
	.type	is_valid_move, @function
is_valid_move:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	cmp	DWORD PTR -4[rbp], 0
	js	.L46
	cmp	DWORD PTR -4[rbp], 8
	jg	.L46
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	is_occupied
	test	eax, eax
	jne	.L46
	mov	eax, 1
	jmp	.L48
.L46:
	mov	eax, 0
.L48:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	is_valid_move, .-is_valid_move
	.globl	get_move
	.type	get_move, @function
get_move:
.LFB17:
	.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	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L50
	mov	DWORD PTR -8[rbp], -1000
	mov	DWORD PTR -12[rbp], 0
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 954437177
	shr	rdx, 32
	sar	edx
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	DWORD PTR -16[rbp], edx
	mov	ecx, DWORD PTR -16[rbp]
	mov	edx, ecx
	sal	edx, 3
	add	edx, ecx
	sub	eax, edx
	mov	DWORD PTR -16[rbp], eax
	jmp	.L51
.L54:
	cmp	DWORD PTR -16[rbp], 9
	jne	.L52
	mov	DWORD PTR -16[rbp], 0
.L52:
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	is_occupied
	test	eax, eax
	jne	.L53
	mov	ecx, DWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rsi, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	r8d, 0
	mov	rdi, rax
	call	minimax
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jle	.L53
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -20[rbp], eax
.L53:
	add	DWORD PTR -12[rbp], 1
	add	DWORD PTR -16[rbp], 1
.L51:
	cmp	DWORD PTR -12[rbp], 8
	jle	.L54
	jmp	.L55
.L50:
	mov	eax, 0
	call	get_input
	mov	DWORD PTR -20[rbp], eax
	mov	rdx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	is_valid_move
	test	eax, eax
	je	.L50
.L55:
	mov	eax, DWORD PTR -20[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	get_move, .-get_move
	.globl	set_occupied_by
	.type	set_occupied_by, @function
set_occupied_by:
.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, 24
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	is_occupied
	test	eax, eax
	jne	.L59
	mov	rax, QWORD PTR -8[rbp]
	movzx	ecx, BYTE PTR 16[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	BYTE PTR [rdx+rax], cl
.L59:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	set_occupied_by, .-set_occupied_by
	.globl	is_over
	.type	is_over, @function
is_over:
.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, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L61
.L64:
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	is_occupied
	test	eax, eax
	jne	.L62
	mov	eax, 0
	jmp	.L63
.L62:
	add	DWORD PTR -4[rbp], 1
.L61:
	cmp	DWORD PTR -4[rbp], 8
	jle	.L64
	mov	eax, 1
.L63:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	is_over, .-is_over
	.section	.rodata
.LC8:
	.string	"%s's turn\n"
.LC9:
	.string	"\n*** Congratulations %s ***\n\n"
.LC10:
	.string	"\n*** There is a tie ***\n"
	.text
	.globl	play
	.type	play, @function
play:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdi, rax
	call	print_board
.L71:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	get_move
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rcx
	mov	rdi, rax
	call	set_occupied_by
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdi, rax
	call	print_board
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	check_winner
	test	eax, eax
	je	.L66
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L67
.L66:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdi, rax
	call	is_over
	test	eax, eax
	je	.L68
	lea	rdi, .LC10[rip]
	call	puts@PLT
	jmp	.L67
.L68:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	cmp	rdx, rax
	jne	.L69
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L71
.L69:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L71
.L67:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	play, .-play
	.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	"105051.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Player 2\000"
	.align	2
.LC1:
	.ascii	"Player 1\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #36
	sub	r2, fp, #52
	sub	r1, fp, #20
	sub	r0, fp, #68
	mov	ip, #1
	str	ip, [sp, #20]
	mov	ip, #1
	str	ip, [sp, #16]
	ldr	ip, .L4+4
	str	ip, [sp, #12]
	ldr	ip, .L4+8
	str	ip, [sp, #8]
	mov	ip, #111
	str	ip, [sp, #4]
	mov	ip, #120
	str	ip, [sp]
	bl	new_game
	sub	r3, fp, #68
	mov	r0, r3
	bl	play
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.align	2
	.global	new_game
	.syntax unified
	.arm
	.fpu softvfp
	.type	new_game, %function
new_game:
	@ args = 24, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-24]
	ldrb	r2, [fp, #4]
	strb	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	ldrb	r2, [fp, #8]
	strb	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #20]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #24]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #12]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L7
.L8:
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-20]
	bl	clear_space
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L7:
	ldr	r3, [fp, #-8]
	cmp	r3, #8
	ble	.L8
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	new_game, .-new_game
	.align	2
	.global	clear_space
	.syntax unified
	.arm
	.fpu softvfp
	.type	clear_space, %function
clear_space:
	@ 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]
	add	r3, r2, r3
	mov	r2, #45
	strb	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	clear_space, .-clear_space
	.align	2
	.global	is_occupied
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_occupied, %function
is_occupied:
	@ 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]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_occupied, .-is_occupied
	.align	2
	.global	is_occupied_by_player
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_occupied_by_player, %function
is_occupied_by_player:
	@ 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	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3, #8]	@ zero_extendqisi2
	cmp	r2, r3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_occupied_by_player, .-is_occupied_by_player
	.align	2
	.global	check_winner
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_winner, %function
check_winner:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L15
.L18:
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	is_occupied_by_player
	mov	r3, r0
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	is_occupied_by_player
	mov	r3, r0
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	is_occupied_by_player
	mov	r3, r0
	cmp	r3, #0
	beq	.L16
	mov	r3, #1
	b	.L17
.L16:
	ldr	r3, [fp, #-8]
	add	r3, r3, #3
	str	r3, [fp, #-8]
.L15:
	ldr	r3, [fp, #-8]
	cmp	r3, #6
	ble	.L18
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L19
.L21:
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	is_occupied_by_player
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-8]
	add	r3, r3, #3
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	is_occupied_by_player
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-8]
	add	r3, r3, #6
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	is_occupied_by_player
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	mov	r3, #1
	b	.L17
.L20:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L19:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L21
	mov	r2, #0
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	is_occupied_by_player
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	mov	r2, #4
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	is_occupied_by_player
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	mov	r2, #8
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	is_occupied_by_player
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	mov	r3, #1
	b	.L17
.L22:
	mov	r2, #2
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	is_occupied_by_player
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	mov	r2, #4
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	is_occupied_by_player
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	mov	r2, #6
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	is_occupied_by_player
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	mov	r3, #1
	b	.L17
.L23:
	mov	r3, #0
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	check_winner, .-check_winner
	.align	2
	.global	new_copy
	.syntax unified
	.arm
	.fpu softvfp
	.type	new_copy, %function
new_copy:
	@ 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	.L25
.L26:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L25:
	ldr	r3, [fp, #-8]
	cmp	r3, #8
	ble	.L26
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	new_copy, .-new_copy
	.section	.rodata
	.align	2
.LC3:
	.ascii	"------------\012\000"
	.align	2
.LC4:
	.ascii	"  %c\000"
	.align	2
.LC5:
	.ascii	"\012\000"
	.align	2
.LC6:
	.ascii	"------------\000"
	.text
	.align	2
	.global	print_board
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_board, %function
print_board:
	@ 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, .L32
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L28
.L31:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L29
.L30:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L32+4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L29:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L30
	ldr	r0, .L32+8
	bl	puts
	ldr	r3, [fp, #-12]
	add	r3, r3, #3
	str	r3, [fp, #-12]
.L28:
	ldr	r3, [fp, #-12]
	cmp	r3, #6
	ble	.L31
	ldr	r0, .L32+12
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	print_board, .-print_board
	.section	.rodata
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	minimax
	.syntax unified
	.arm
	.fpu softvfp
	.type	minimax, %function
minimax:
	@ args = 4, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	str	r3, [fp, #-52]
	ldr	r3, .L46
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	new_copy
	sub	r3, fp, #20
	ldr	r2, [fp, #-52]
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	set_occupied_by
	sub	r3, fp, #20
	ldr	r1, [fp, #-48]
	mov	r0, r3
	bl	check_winner
	mov	r3, r0
	cmp	r3, #0
	beq	.L35
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	bne	.L36
	ldr	r3, [fp, #4]
	rsb	r3, r3, #10
	b	.L44
.L36:
	ldr	r3, [fp, #4]
	sub	r3, r3, #10
	b	.L44
.L35:
	sub	r3, fp, #20
	mov	r0, r3
	bl	is_over
	mov	r3, r0
	cmp	r3, #0
	beq	.L38
	mov	r3, #0
	b	.L44
.L38:
	mov	r3, #1
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L39
.L43:
	sub	r3, fp, #20
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	is_occupied
	mov	r3, r0
	cmp	r3, #0
	bne	.L40
	ldr	r3, [fp, #-48]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #4]
	add	r3, r3, #1
	sub	r0, fp, #20
	str	r3, [sp]
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-44]
	bl	minimax
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L41
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	beq	.L42
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L41
.L42:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	bne	.L40
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	ble	.L40
.L41:
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
.L40:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L39:
	ldr	r3, [fp, #-36]
	cmp	r3, #8
	ble	.L43
	ldr	r3, [fp, #-32]
.L44:
	ldr	r2, .L46
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L45
	bl	__stack_chk_fail
.L45:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L47:
	.align	2
.L46:
	.word	.LC7
	.size	minimax, .-minimax
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Enter a valid index to move: \000"
	.align	2
.LC9:
	.ascii	"%d\000"
	.align	2
.LC10:
	.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 = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L51
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L51+4
	bl	puts
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L51+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	ldr	r2, .L51
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L50
	bl	__stack_chk_fail
.L50:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L52:
	.align	2
.L51:
	.word	.LC10
	.word	.LC8
	.word	.LC9
	.size	get_input, .-get_input
	.align	2
	.global	is_valid_move
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_valid_move, %function
is_valid_move:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L54
	ldr	r3, [fp, #-8]
	cmp	r3, #8
	bgt	.L54
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	is_occupied
	mov	r3, r0
	cmp	r3, #0
	bne	.L54
	mov	r3, #1
	b	.L56
.L54:
	mov	r3, #0
.L56:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	is_valid_move, .-is_valid_move
	.align	2
	.global	get_move
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_move, %function
get_move:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L58
	ldr	r3, .L65
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	bl	rand
	mov	r2, r0
	ldr	r3, .L65+4
	smull	r1, r3, r2, r3
	asr	r1, r3, #1
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #3
	add	r3, r3, r1
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	b	.L59
.L62:
	ldr	r3, [fp, #-20]
	cmp	r3, #9
	bne	.L60
	mov	r3, #0
	str	r3, [fp, #-20]
.L60:
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-32]
	bl	is_occupied
	mov	r3, r0
	cmp	r3, #0
	bne	.L61
	mov	r3, #0
	str	r3, [sp]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-36]
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	minimax
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L61
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-24]
.L61:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L59:
	ldr	r3, [fp, #-16]
	cmp	r3, #8
	ble	.L62
	b	.L63
.L58:
	bl	get_input
	str	r0, [fp, #-24]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-24]
	bl	is_valid_move
	mov	r3, r0
	cmp	r3, #0
	beq	.L58
.L63:
	ldr	r3, [fp, #-24]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L66:
	.align	2
.L65:
	.word	-1000
	.word	954437177
	.size	get_move, .-get_move
	.align	2
	.global	set_occupied_by
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_occupied_by, %function
set_occupied_by:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	is_occupied
	mov	r3, r0
	cmp	r3, #0
	bne	.L69
	ldr	r3, [fp, #-8]
	ldrb	r1, [r3, #8]	@ zero_extendqisi2
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
.L69:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	set_occupied_by, .-set_occupied_by
	.align	2
	.global	is_over
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_over, %function
is_over:
	@ 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
	str	r3, [fp, #-8]
	b	.L71
.L74:
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	is_occupied
	mov	r3, r0
	cmp	r3, #0
	bne	.L72
	mov	r3, #0
	b	.L73
.L72:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L71:
	ldr	r3, [fp, #-8]
	cmp	r3, #8
	ble	.L74
	mov	r3, #1
.L73:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	is_over, .-is_over
	.section	.rodata
	.align	2
.LC11:
	.ascii	"%s's turn\012\000"
	.align	2
.LC12:
	.ascii	"\012*** Congratulations %s ***\012\012\000"
	.align	2
.LC13:
	.ascii	"\012*** There is a tie ***\012\000"
	.text
	.align	2
	.global	play
	.syntax unified
	.arm
	.fpu softvfp
	.type	play, %function
play:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8
	str	r0, [fp, #-16]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	print_board
.L81:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L82
	bl	printf
	ldr	r3, [fp, #-16]
	ldr	r4, [r3]
	ldr	r3, [fp, #-16]
	ldr	r5, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	get_move
	mov	r3, r0
	mov	r2, r3
	mov	r1, r5
	mov	r0, r4
	bl	set_occupied_by
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	print_board
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	check_winner
	mov	r3, r0
	cmp	r3, #0
	beq	.L76
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L82+4
	bl	printf
	b	.L77
.L76:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	is_over
	mov	r3, r0
	cmp	r3, #0
	beq	.L78
	ldr	r0, .L82+8
	bl	puts
	b	.L77
.L78:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	cmp	r2, r3
	bne	.L79
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	b	.L81
.L79:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	b	.L81
.L77:
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L83:
	.align	2
.L82:
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	play, .-play
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
