	.file	"154831571.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"left up"
.LC1:
	.string	"left down"
.LC2:
	.string	"right up"
.LC3:
	.string	"right down"
.LC4:
	.string	"up left"
.LC5:
	.string	"up right"
.LC6:
	.string	"down left"
.LC7:
	.string	"down right"
	.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, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC0[rip]
	mov	QWORD PTR -80[rbp], rax
	lea	rax, .LC1[rip]
	mov	QWORD PTR -72[rbp], rax
	lea	rax, .LC2[rip]
	mov	QWORD PTR -64[rbp], rax
	lea	rax, .LC3[rip]
	mov	QWORD PTR -56[rbp], rax
	lea	rax, .LC4[rip]
	mov	QWORD PTR -48[rbp], rax
	lea	rax, .LC5[rip]
	mov	QWORD PTR -40[rbp], rax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -32[rbp], rax
	lea	rax, .LC7[rip]
	mov	QWORD PTR -24[rbp], rax
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	begin_game
	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
	.section	.rodata
.LC8:
	.string	"stop"
	.text
	.globl	begin_game
	.type	begin_game, @function
begin_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, 96
	mov	QWORD PTR -88[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -32[rbp]
	mov	esi, 20
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	remove_new_line
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	DWORD PTR -64[rbp], 1
	mov	DWORD PTR -76[rbp], 0
	mov	DWORD PTR -72[rbp], 0
	jmp	.L5
.L10:
	mov	DWORD PTR -68[rbp], 0
	jmp	.L6
.L9:
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	lea	rax, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	je	.L12
	add	DWORD PTR -68[rbp], 1
.L6:
	cmp	DWORD PTR -68[rbp], 7
	jle	.L9
	jmp	.L8
.L12:
	nop
.L8:
	mov	edi, DWORD PTR -68[rbp]
	lea	rcx, -72[rbp]
	lea	rdx, -76[rbp]
	lea	rsi, -64[rbp]
	lea	rax, -32[rbp]
	mov	r8d, edi
	mov	rdi, rax
	call	move_the_king
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -32[rbp]
	mov	esi, 20
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	remove_new_line
.L5:
	lea	rax, -32[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L10
	lea	rax, -64[rbp]
	mov	esi, 8
	mov	rdi, rax
	call	print_array
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	begin_game, .-begin_game
	.globl	move_the_king
	.type	move_the_king, @function
move_the_king:
.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, 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	DWORD PTR -52[rbp], r8d
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -52[rbp], 7
	ja	.L32
	mov	eax, DWORD PTR -52[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L16[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L16[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L16:
	.long	.L23-.L16
	.long	.L22-.L16
	.long	.L21-.L16
	.long	.L20-.L16
	.long	.L19-.L16
	.long	.L18-.L16
	.long	.L17-.L16
	.long	.L15-.L16
	.text
.L23:
	cmp	DWORD PTR -8[rbp], 0
	jle	.L33
	cmp	DWORD PTR -4[rbp], 5
	jg	.L33
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 2[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rdx]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	esi, eax
	mov	rdi, rdx
	call	convert_nth_position
	jmp	.L33
.L22:
	cmp	DWORD PTR -8[rbp], 6
	jg	.L34
	cmp	DWORD PTR -4[rbp], 5
	jg	.L34
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 2[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rdx]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	esi, eax
	mov	rdi, rdx
	call	convert_nth_position
	jmp	.L34
.L21:
	cmp	DWORD PTR -8[rbp], 0
	jle	.L35
	cmp	DWORD PTR -4[rbp], 1
	jle	.L35
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -2[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rdx]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	esi, eax
	mov	rdi, rdx
	call	convert_nth_position
	jmp	.L35
.L20:
	cmp	DWORD PTR -8[rbp], 6
	jg	.L36
	cmp	DWORD PTR -4[rbp], 1
	jle	.L36
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -2[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rdx]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	esi, eax
	mov	rdi, rdx
	call	convert_nth_position
	jmp	.L36
.L19:
	cmp	DWORD PTR -8[rbp], 1
	jle	.L37
	cmp	DWORD PTR -4[rbp], 6
	jg	.L37
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -2[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rdx]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	esi, eax
	mov	rdi, rdx
	call	convert_nth_position
	jmp	.L37
.L18:
	cmp	DWORD PTR -8[rbp], 1
	jle	.L38
	cmp	DWORD PTR -4[rbp], 0
	jle	.L38
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -2[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rdx]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	esi, eax
	mov	rdi, rdx
	call	convert_nth_position
	jmp	.L38
.L17:
	cmp	DWORD PTR -8[rbp], 5
	jg	.L39
	cmp	DWORD PTR -4[rbp], 6
	jg	.L39
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 2[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rdx]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	esi, eax
	mov	rdi, rdx
	call	convert_nth_position
	jmp	.L39
.L15:
	cmp	DWORD PTR -8[rbp], 5
	jg	.L40
	cmp	DWORD PTR -4[rbp], 0
	jle	.L40
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 2[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rdx]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	esi, eax
	mov	rdi, rdx
	call	convert_nth_position
	jmp	.L40
.L33:
	nop
	jmp	.L32
.L34:
	nop
	jmp	.L32
.L35:
	nop
	jmp	.L32
.L36:
	nop
	jmp	.L32
.L37:
	nop
	jmp	.L32
.L38:
	nop
	jmp	.L32
.L39:
	nop
	jmp	.L32
.L40:
	nop
.L32:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	move_the_king, .-move_the_king
	.section	.rodata
.LC9:
	.string	"%d"
.LC10:
	.string	"[Board is empty]"
	.text
	.globl	print_array
	.type	print_array, @function
print_array:
.LFB9:
	.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
	mov	DWORD PTR -8[rbp], 0
	jmp	.L42
.L45:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jle	.L43
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	mov	rdx, QWORD PTR -32[rbp]
	sub	rdx, 1
	cmp	rax, rdx
	jnb	.L44
	mov	edi, 10
	call	putchar@PLT
	jmp	.L44
.L43:
	add	DWORD PTR -4[rbp], 1
.L44:
	add	DWORD PTR -8[rbp], 1
.L42:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	cmp	QWORD PTR -32[rbp], rax
	ja	.L45
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jne	.L47
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
.L47:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	print_array, .-print_array
	.globl	convert_nth_position
	.type	convert_nth_position, @function
convert_nth_position:
.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	DWORD PTR -12[rbp], esi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, 1
	mov	ecx, eax
	sal	esi, cl
	mov	eax, esi
	xor	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	convert_nth_position, .-convert_nth_position
	.globl	remove_new_line
	.type	remove_new_line, @function
remove_new_line:
.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	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L50
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
.L50:
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
	cdqe
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	remove_new_line, .-remove_new_line
	.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	"154831571.c"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"left up\000"
	.align	2
.LC1:
	.ascii	"left down\000"
	.align	2
.LC2:
	.ascii	"right up\000"
	.align	2
.LC3:
	.ascii	"right down\000"
	.align	2
.LC4:
	.ascii	"up left\000"
	.align	2
.LC5:
	.ascii	"up right\000"
	.align	2
.LC6:
	.ascii	"down left\000"
	.align	2
.LC7:
	.ascii	"down right\000"
	.text
	.section	.rodata
	.align	2
.LC9:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L4+4
	sub	ip, fp, #40
	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}
	sub	r3, fp, #40
	mov	r0, r3
	bl	begin_game
	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	.LC10
	.word	.LC9
	.size	main, .-main
	.section	.rodata
	.align	2
.LC11:
	.ascii	"stop\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	begin_game
	.syntax unified
	.arm
	.fpu softvfp
	.type	begin_game, %function
begin_game:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-80]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L15+4
	ldr	r2, [r3]
	sub	r3, fp, #28
	mov	r1, #20
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #28
	mov	r0, r3
	bl	remove_new_line
	sub	r3, fp, #60
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L7
.L12:
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L8
.L11:
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	ldr	r2, [r3]
	sub	r3, fp, #28
	mov	r1, r2
	mov	r0, r3
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L14
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L8:
	ldr	r3, [fp, #-64]
	cmp	r3, #7
	ble	.L11
	b	.L10
.L14:
	nop
.L10:
	sub	ip, fp, #68
	sub	r2, fp, #72
	sub	r1, fp, #60
	sub	r0, fp, #28
	ldr	r3, [fp, #-64]
	str	r3, [sp]
	mov	r3, ip
	bl	move_the_king
	ldr	r3, .L15+4
	ldr	r2, [r3]
	sub	r3, fp, #28
	mov	r1, #20
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #28
	mov	r0, r3
	bl	remove_new_line
.L7:
	sub	r3, fp, #28
	ldr	r1, .L15+8
	mov	r0, r3
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	sub	r3, fp, #60
	mov	r1, #8
	mov	r0, r3
	bl	print_array
	nop
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC12
	.word	stdin
	.word	.LC11
	.size	begin_game, .-begin_game
	.align	2
	.global	move_the_king
	.syntax unified
	.arm
	.fpu softvfp
	.type	move_the_king, %function
move_the_king:
	@ args = 4, 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]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #4]
	cmp	r3, #7
	ldrls	pc, [pc, r3, asl #2]
	b	.L36
.L20:
	.word	.L27
	.word	.L26
	.word	.L25
	.word	.L24
	.word	.L23
	.word	.L22
	.word	.L21
	.word	.L19
.L27:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L37
	ldr	r3, [fp, #-8]
	cmp	r3, #5
	bgt	.L37
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	add	r2, r3, #2
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	convert_nth_position
	b	.L37
.L26:
	ldr	r3, [fp, #-12]
	cmp	r3, #6
	bgt	.L38
	ldr	r3, [fp, #-8]
	cmp	r3, #5
	bgt	.L38
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	add	r2, r3, #2
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	convert_nth_position
	b	.L38
.L25:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L39
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	ble	.L39
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	sub	r2, r3, #2
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	convert_nth_position
	b	.L39
.L24:
	ldr	r3, [fp, #-12]
	cmp	r3, #6
	bgt	.L40
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	ble	.L40
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	sub	r2, r3, #2
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	convert_nth_position
	b	.L40
.L23:
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	ble	.L41
	ldr	r3, [fp, #-8]
	cmp	r3, #6
	bgt	.L41
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	sub	r2, r3, #2
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	convert_nth_position
	b	.L41
.L22:
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	ble	.L42
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L42
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	sub	r2, r3, #2
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	convert_nth_position
	b	.L42
.L21:
	ldr	r3, [fp, #-12]
	cmp	r3, #5
	bgt	.L43
	ldr	r3, [fp, #-8]
	cmp	r3, #6
	bgt	.L43
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	add	r2, r3, #2
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	convert_nth_position
	b	.L43
.L19:
	ldr	r3, [fp, #-12]
	cmp	r3, #5
	bgt	.L44
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L44
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	add	r2, r3, #2
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	convert_nth_position
	b	.L44
.L37:
	nop
	b	.L36
.L38:
	nop
	b	.L36
.L39:
	nop
	b	.L36
.L40:
	nop
	b	.L36
.L41:
	nop
	b	.L36
.L42:
	nop
	b	.L36
.L43:
	nop
	b	.L36
.L44:
	nop
.L36:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	move_the_king, .-move_the_king
	.section	.rodata
	.align	2
.LC13:
	.ascii	"%d\000"
	.align	2
.LC14:
	.ascii	"[Board is empty]\000"
	.text
	.align	2
	.global	print_array
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_array, %function
print_array:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L46
.L49:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L47
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L52
	bl	printf
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bls	.L48
	mov	r0, #10
	bl	putchar
	b	.L48
.L47:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L48:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L46:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bhi	.L49
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bne	.L51
	ldr	r0, .L52+4
	bl	printf
.L51:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L53:
	.align	2
.L52:
	.word	.LC13
	.word	.LC14
	.size	print_array, .-print_array
	.align	2
	.global	convert_nth_position
	.syntax unified
	.arm
	.fpu softvfp
	.type	convert_nth_position, %function
convert_nth_position:
	@ 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	r3, [fp, #-8]
	ldr	r2, [r3]
	mov	r1, #1
	ldr	r3, [fp, #-12]
	lsl	r3, r1, r3
	eor	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	convert_nth_position, .-convert_nth_position
	.align	2
	.global	remove_new_line
	.syntax unified
	.arm
	.fpu softvfp
	.type	remove_new_line, %function
remove_new_line:
	@ 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, [fp, #-16]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L56
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
.L56:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	remove_new_line, .-remove_new_line
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
