	.file	"100139984.c"
	.intel_syntax noprefix
	.text
	.globl	RuleX
	.section	.rodata
	.align 32
	.type	RuleX, @object
	.size	RuleX, 32
RuleX:
	.long	1
	.long	2
	.long	-1
	.long	-2
	.long	-2
	.long	-1
	.long	1
	.long	2
	.globl	RuleY
	.align 32
	.type	RuleY, @object
	.size	RuleY, 32
RuleY:
	.long	2
	.long	1
	.long	2
	.long	1
	.long	-1
	.long	-2
	.long	-2
	.long	-1
	.text
	.globl	AddPos
	.type	AddPos, @function
AddPos:
.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, 64
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	DWORD PTR -36[rbp], ecx
	mov	QWORD PTR -48[rbp], r8
	mov	QWORD PTR -56[rbp], r9
	mov	rdx, QWORD PTR -56[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	ChkPos@PLT
	test	eax, eax
	je	.L2
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	esi, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	ChkPassed@PLT
	test	eax, eax
	jne	.L2
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	esi, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	SetPassedFlag@PLT
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR -36[rbp]
	lea	ecx, 1[rax]
	mov	rdi, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	esi, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	r8, rdi
	mov	edi, eax
	call	DepSearchHalmitonHorse
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 1
	jne	.L3
	mov	eax, 1
	jmp	.L4
.L3:
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	esi, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	UnsetPassedFlag@PLT
.L2:
	mov	eax, 0
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	AddPos, .-AddPos
	.globl	DepSearchHalmitonHorse
	.type	DepSearchHalmitonHorse, @function
DepSearchHalmitonHorse:
.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, 160
	mov	DWORD PTR -132[rbp], edi
	mov	DWORD PTR -136[rbp], esi
	mov	QWORD PTR -144[rbp], rdx
	mov	DWORD PTR -148[rbp], ecx
	mov	QWORD PTR -160[rbp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -132[rbp]
	imul	eax, DWORD PTR -136[rbp]
	cmp	DWORD PTR -148[rbp], eax
	jne	.L6
	mov	eax, 1
	jmp	.L25
.L6:
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -104[rbp], rax
	mov	DWORD PTR -112[rbp], 0
	mov	DWORD PTR -120[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	edx, DWORD PTR -120[rbp]
	mov	DWORD PTR -80[rbp+rax*4], edx
	add	DWORD PTR -120[rbp], 1
.L8:
	cmp	DWORD PTR -120[rbp], 7
	jle	.L9
	mov	DWORD PTR -120[rbp], 0
	jmp	.L10
.L16:
	mov	ecx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, RuleX[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	eax, ecx
	mov	DWORD PTR -96[rbp], eax
	mov	ecx, DWORD PTR -100[rbp]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, RuleY[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	eax, ecx
	mov	DWORD PTR -92[rbp], eax
	mov	rdx, QWORD PTR -96[rbp]
	mov	ecx, DWORD PTR -136[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	ChkPos@PLT
	test	eax, eax
	je	.L11
	mov	rcx, QWORD PTR -160[rbp]
	mov	rdx, QWORD PTR -96[rbp]
	mov	esi, DWORD PTR -136[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	edi, eax
	call	ChkPassed@PLT
	test	eax, eax
	jne	.L11
	mov	DWORD PTR -112[rbp], 0
	mov	DWORD PTR -116[rbp], 0
	jmp	.L12
.L14:
	mov	ecx, DWORD PTR -96[rbp]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, RuleX[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	eax, ecx
	mov	DWORD PTR -88[rbp], eax
	mov	ecx, DWORD PTR -92[rbp]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, RuleY[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	eax, ecx
	mov	DWORD PTR -84[rbp], eax
	mov	rdx, QWORD PTR -88[rbp]
	mov	ecx, DWORD PTR -136[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	ChkPos@PLT
	test	eax, eax
	je	.L13
	mov	rcx, QWORD PTR -160[rbp]
	mov	rdx, QWORD PTR -88[rbp]
	mov	esi, DWORD PTR -136[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	edi, eax
	call	ChkPassed@PLT
	test	eax, eax
	jne	.L13
	add	DWORD PTR -112[rbp], 1
.L13:
	add	DWORD PTR -116[rbp], 1
.L12:
	cmp	DWORD PTR -116[rbp], 7
	jle	.L14
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	edx, DWORD PTR -112[rbp]
	mov	DWORD PTR -48[rbp+rax*4], edx
	jmp	.L15
.L11:
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -48[rbp+rax*4], 9
.L15:
	add	DWORD PTR -120[rbp], 1
.L10:
	cmp	DWORD PTR -120[rbp], 7
	jle	.L16
	mov	DWORD PTR -120[rbp], 0
	jmp	.L17
.L21:
	mov	eax, DWORD PTR -120[rbp]
	add	eax, 1
	mov	DWORD PTR -116[rbp], eax
	jmp	.L18
.L20:
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	edx, DWORD PTR -48[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	eax, DWORD PTR -48[rbp+rax*4]
	cmp	edx, eax
	jle	.L19
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, -48[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, -48[rbp]
	add	rax, rcx
	mov	rsi, rdx
	mov	rdi, rax
	call	swap@PLT
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, -80[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, -80[rbp]
	add	rax, rcx
	mov	rsi, rdx
	mov	rdi, rax
	call	swap@PLT
.L19:
	add	DWORD PTR -116[rbp], 1
.L18:
	cmp	DWORD PTR -116[rbp], 7
	jle	.L20
	add	DWORD PTR -120[rbp], 1
.L17:
	cmp	DWORD PTR -120[rbp], 7
	jle	.L21
	mov	DWORD PTR -120[rbp], 0
	jmp	.L22
.L24:
	mov	ecx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, RuleX[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	eax, ecx
	mov	DWORD PTR -96[rbp], eax
	mov	ecx, DWORD PTR -100[rbp]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, RuleY[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	eax, ecx
	mov	DWORD PTR -92[rbp], eax
	mov	r8, QWORD PTR -96[rbp]
	mov	rdi, QWORD PTR -160[rbp]
	mov	ecx, DWORD PTR -148[rbp]
	mov	rdx, QWORD PTR -144[rbp]
	mov	esi, DWORD PTR -136[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	edi, eax
	call	AddPos
	mov	DWORD PTR -108[rbp], eax
	cmp	DWORD PTR -108[rbp], 1
	jne	.L23
	mov	eax, 1
	jmp	.L25
.L23:
	add	DWORD PTR -120[rbp], 1
.L22:
	cmp	DWORD PTR -120[rbp], 7
	jle	.L24
	mov	eax, 0
.L25:
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	DepSearchHalmitonHorse, .-DepSearchHalmitonHorse
	.section	.rodata
.LC0:
	.string	"(%2d,%2d) "
	.text
	.globl	dispSeq
	.type	dispSeq, @function
dispSeq:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	DWORD PTR -4[rbp], 0
	jmp	.L28
.L30:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	cdq
	idiv	DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	cmp	edx, eax
	jne	.L29
	mov	edi, 10
	call	putchar@PLT
.L29:
	add	DWORD PTR -4[rbp], 1
.L28:
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, DWORD PTR -24[rbp]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L30
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	dispSeq, .-dispSeq
	.section	.rodata
.LC1:
	.string	"%2d "
	.text
	.globl	dispOrder
	.type	dispOrder, @function
dispOrder:
.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	QWORD PTR -40[rbp], rcx
	mov	DWORD PTR -8[rbp], 0
	jmp	.L32
.L33:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	imul	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR 4[rax]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -8[rbp]
	add	edx, 1
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -8[rbp], 1
.L32:
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, DWORD PTR -24[rbp]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L33
	mov	DWORD PTR -8[rbp], 0
	jmp	.L34
.L37:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L35
.L36:
	mov	eax, DWORD PTR -8[rbp]
	imul	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L35:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L36
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L34:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L37
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	dispOrder, .-dispOrder
	.section	.rodata
.LC2:
	.string	"could not find!"
	.text
	.globl	HalmitionHorse
	.type	HalmitionHorse, @function
HalmitionHorse:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, edx
	mov	edi, eax
	call	ChkSize@PLT
	test	eax, eax
	jne	.L39
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L44
.L39:
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	imul	rax, rdx
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	imul	rax, rdx
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -32[rbp], 0
	jmp	.L41
.L42:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -32[rbp], 1
.L41:
	mov	eax, DWORD PTR -36[rbp]
	imul	eax, DWORD PTR -40[rbp]
	cmp	DWORD PTR -32[rbp], eax
	jl	.L42
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	mov	rcx, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	esi, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	SetPassedFlag@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rcx, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	esi, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	r8, rcx
	mov	ecx, 1
	mov	edi, eax
	call	DepSearchHalmitonHorse
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 1
	je	.L43
	lea	rdi, .LC2[rip]
	call	puts@PLT
.L43:
	mov	rdx, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	dispSeq
	mov	rcx, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	esi, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	dispOrder
	mov	eax, 0
.L44:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	HalmitionHorse, .-HalmitionHorse
	.section	.rodata
.LC3:
	.string	"%d%d"
	.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -12[rbp]
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, edx
	mov	edi, eax
	call	HalmitionHorse
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L47
	call	__stack_chk_fail@PLT
.L47:
	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	"100139984.c"
	.text
	.global	RuleX
	.section	.rodata
	.align	2
	.type	RuleX, %object
	.size	RuleX, 32
RuleX:
	.word	1
	.word	2
	.word	-1
	.word	-2
	.word	-2
	.word	-1
	.word	1
	.word	2
	.global	RuleY
	.align	2
	.type	RuleY, %object
	.size	RuleY, 32
RuleY:
	.word	2
	.word	1
	.word	2
	.word	1
	.word	-1
	.word	-2
	.word	-2
	.word	-1
	.text
	.align	2
	.global	AddPos
	.syntax unified
	.arm
	.fpu softvfp
	.type	AddPos, %function
AddPos:
	@ args = 12, 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	add	r3, fp, #8
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	ChkPos
	mov	r3, r0
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #4]
	str	r3, [sp]
	add	r3, fp, #8
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	ChkPassed
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	ldr	r3, [fp, #4]
	str	r3, [sp]
	add	r3, fp, #8
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	SetPassedFlag
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, r3
	add	r3, fp, #8
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	ldr	r3, [fp, #4]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	DepSearchHalmitonHorse
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bne	.L3
	mov	r3, #1
	b	.L4
.L3:
	ldr	r3, [fp, #4]
	str	r3, [sp]
	add	r3, fp, #8
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	UnsetPassedFlag
.L2:
	mov	r3, #0
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	AddPos, .-AddPos
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	DepSearchHalmitonHorse
	.syntax unified
	.arm
	.fpu softvfp
	.type	DepSearchHalmitonHorse, %function
DepSearchHalmitonHorse:
	@ args = 4, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #152
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	str	r2, [fp, #-128]
	str	r3, [fp, #-132]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-136]
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-124]
	mul	r3, r2, r3
	ldr	r2, [fp, #-132]
	cmp	r2, r3
	bne	.L6
	mov	r3, #1
	b	.L25
.L6:
	ldr	r3, [fp, #-132]
	sub	r3, r3, #-536870911
	lsl	r3, r3, #3
	ldr	r2, [fp, #-128]
	add	r2, r2, r3
	sub	r3, fp, #96
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	mov	r3, #0
	str	r3, [fp, #-104]
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L8
.L9:
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-112]
	str	r2, [r3, #-68]
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L8:
	ldr	r3, [fp, #-112]
	cmp	r3, #7
	ble	.L9
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L10
.L16:
	ldr	r2, [fp, #-96]
	ldr	r1, .L27+4
	ldr	r3, [fp, #-112]
	ldr	r3, [r1, r3, lsl #2]
	add	r3, r2, r3
	str	r3, [fp, #-88]
	ldr	r2, [fp, #-92]
	ldr	r1, .L27+8
	ldr	r3, [fp, #-112]
	ldr	r3, [r1, r3, lsl #2]
	add	r3, r2, r3
	str	r3, [fp, #-84]
	sub	r3, fp, #88
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-124]
	ldr	r0, [fp, #-120]
	bl	ChkPos
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-136]
	str	r3, [sp]
	sub	r3, fp, #88
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-124]
	ldr	r0, [fp, #-120]
	bl	ChkPassed
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	mov	r3, #0
	str	r3, [fp, #-104]
	mov	r3, #0
	str	r3, [fp, #-108]
	b	.L12
.L14:
	ldr	r2, [fp, #-88]
	ldr	r1, .L27+4
	ldr	r3, [fp, #-112]
	ldr	r3, [r1, r3, lsl #2]
	add	r3, r2, r3
	str	r3, [fp, #-80]
	ldr	r2, [fp, #-84]
	ldr	r1, .L27+8
	ldr	r3, [fp, #-112]
	ldr	r3, [r1, r3, lsl #2]
	add	r3, r2, r3
	str	r3, [fp, #-76]
	sub	r3, fp, #80
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-124]
	ldr	r0, [fp, #-120]
	bl	ChkPos
	mov	r3, r0
	cmp	r3, #0
	beq	.L13
	ldr	r3, [fp, #-136]
	str	r3, [sp]
	sub	r3, fp, #80
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-124]
	ldr	r0, [fp, #-120]
	bl	ChkPassed
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L13:
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L12:
	ldr	r3, [fp, #-108]
	cmp	r3, #7
	ble	.L14
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-104]
	str	r2, [r3, #-36]
	b	.L15
.L11:
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #9
	str	r2, [r3, #-36]
.L15:
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L10:
	ldr	r3, [fp, #-112]
	cmp	r3, #7
	ble	.L16
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L17
.L21:
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-108]
	b	.L18
.L20:
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-36]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-36]
	cmp	r2, r3
	ble	.L19
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	sub	r2, fp, #40
	add	r0, r2, r3
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r2, fp, #40
	add	r3, r2, r3
	mov	r1, r3
	bl	swap
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	sub	r2, fp, #72
	add	r0, r2, r3
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r2, fp, #72
	add	r3, r2, r3
	mov	r1, r3
	bl	swap
.L19:
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L18:
	ldr	r3, [fp, #-108]
	cmp	r3, #7
	ble	.L20
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L17:
	ldr	r3, [fp, #-112]
	cmp	r3, #7
	ble	.L21
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L22
.L24:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-68]
	ldr	r1, .L27+4
	ldr	r3, [r1, r3, lsl #2]
	add	r3, r2, r3
	str	r3, [fp, #-88]
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-68]
	ldr	r1, .L27+8
	ldr	r3, [r1, r3, lsl #2]
	add	r3, r2, r3
	str	r3, [fp, #-84]
	add	r2, sp, #4
	sub	r3, fp, #88
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r3, [fp, #-136]
	str	r3, [sp]
	ldr	r3, [fp, #-132]
	ldr	r2, [fp, #-128]
	ldr	r1, [fp, #-124]
	ldr	r0, [fp, #-120]
	bl	AddPos
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmp	r3, #1
	bne	.L23
	mov	r3, #1
	b	.L25
.L23:
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L22:
	ldr	r3, [fp, #-112]
	cmp	r3, #7
	ble	.L24
	mov	r3, #0
.L25:
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC0
	.word	RuleX
	.word	RuleY
	.size	DepSearchHalmitonHorse, .-DepSearchHalmitonHorse
	.section	.rodata
	.align	2
.LC1:
	.ascii	"(%2d,%2d) \000"
	.global	__aeabi_idivmod
	.text
	.align	2
	.global	dispSeq
	.syntax unified
	.arm
	.fpu softvfp
	.type	dispSeq, %function
dispSeq:
	@ args = 0, 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L30
.L32:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r0, .L33
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	cmp	r2, r3
	bne	.L31
	mov	r0, #10
	bl	putchar
.L31:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L30:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	mul	r3, r2, r3
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L32
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC1
	.size	dispSeq, .-dispSeq
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%2d \000"
	.text
	.align	2
	.global	dispOrder
	.syntax unified
	.arm
	.fpu softvfp
	.type	dispOrder, %function
dispOrder:
	@ args = 0, 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L36
.L37:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	mul	r2, r3, r2
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #3
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L36:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	mul	r3, r2, r3
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L37
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L38
.L41:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L39
.L40:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	mul	r2, r3, r2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L42
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L39:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L40
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L38:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L41
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC2
	.size	dispOrder, .-dispOrder
	.section	.rodata
	.align	2
.LC3:
	.ascii	"could not find!\000"
	.text
	.align	2
	.global	HalmitionHorse
	.syntax unified
	.arm
	.fpu softvfp
	.type	HalmitionHorse, %function
HalmitionHorse:
	@ 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	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	ChkSize
	mov	r3, r0
	cmp	r3, #0
	bne	.L45
	ldr	r0, .L51
	bl	puts
	mov	r3, #0
	b	.L50
.L45:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-36]
	mul	r3, r2, r3
	lsl	r3, r3, #3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-36]
	mul	r3, r2, r3
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L47
.L48:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L47:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-36]
	mul	r3, r2, r3
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L48
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	sub	r3, fp, #12
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	SetPassedFlag
	ldr	r3, [fp, #-24]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	mov	r3, #1
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	DepSearchHalmitonHorse
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	beq	.L49
	ldr	r0, .L51
	bl	puts
.L49:
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	dispSeq
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	dispOrder
	mov	r3, #0
.L50:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L52:
	.align	2
.L51:
	.word	.LC3
	.size	HalmitionHorse, .-HalmitionHorse
	.section	.rodata
	.align	2
.LC4:
	.ascii	"%d%d\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L56
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r2, fp, #12
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L56+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	mov	r1, r2
	mov	r0, r3
	bl	HalmitionHorse
	mov	r3, #0
	ldr	r2, .L56
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L55
	bl	__stack_chk_fail
.L55:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L57:
	.align	2
.L56:
	.word	.LC5
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
