	.file	"7639.c"
	.intel_syntax noprefix
	.text
	.globl	count
	.bss
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.globl	stack
	.align 32
	.type	stack, @object
	.size	stack, 512
stack:
	.zero	512
	.section	.rodata
	.align 8
.LC0:
	.string	"To get from %s to %s takes %d knight moves.\n"
.LC1:
	.string	"%s %s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 288
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L2
.L3:
	lea	rax, -272[rbp]
	mov	edx, 256
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -14[rbp]
	mov	rdi, rax
	call	stoc
	mov	QWORD PTR -288[rbp], rax
	lea	rax, -11[rbp]
	mov	rdi, rax
	call	stoc
	mov	QWORD PTR -280[rbp], rax
	mov	rdx, QWORD PTR -288[rbp]
	lea	rax, -272[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	draw
	mov	eax, DWORD PTR -280[rbp]
	mov	edx, DWORD PTR -276[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	ecx, DWORD PTR -272[rbp+rax*4]
	lea	rdx, -11[rbp]
	lea	rax, -14[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L2:
	lea	rdx, -11[rbp]
	lea	rax, -14[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, 2
	je	.L3
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	stoc
	.type	stoc, @function
stoc:
.LFB1:
	.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	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 49
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 97
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	stoc, .-stoc
	.globl	draw
	.type	draw, @function
draw:
.LFB2:
	.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	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR count[rip], 0
	mov	rdx, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	filln
	mov	DWORD PTR -12[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, stack[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, stack[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -28[rbp], eax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	filln
	add	DWORD PTR -12[rbp], 1
.L9:
	mov	eax, DWORD PTR count[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	draw, .-draw
	.globl	filln
	.type	filln, @function
filln:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	QWORD PTR -104[rbp], rdi
	mov	QWORD PTR -112[rbp], rsi
	mov	QWORD PTR -120[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -80[rbp], -2
	mov	DWORD PTR -76[rbp], -1
	mov	DWORD PTR -72[rbp], 1
	mov	DWORD PTR -68[rbp], 2
	mov	DWORD PTR -64[rbp], 2
	mov	DWORD PTR -60[rbp], 1
	mov	DWORD PTR -56[rbp], -1
	mov	DWORD PTR -52[rbp], -2
	mov	DWORD PTR -48[rbp], 1
	mov	DWORD PTR -44[rbp], 2
	mov	DWORD PTR -40[rbp], 2
	mov	DWORD PTR -36[rbp], 1
	mov	DWORD PTR -32[rbp], -1
	mov	DWORD PTR -28[rbp], -2
	mov	DWORD PTR -24[rbp], -2
	mov	DWORD PTR -20[rbp], -1
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	add	eax, 1
	mov	DWORD PTR -92[rbp], eax
	mov	DWORD PTR -96[rbp], 0
	jmp	.L12
.L15:
	mov	edx, DWORD PTR -112[rbp]
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	add	eax, edx
	mov	DWORD PTR -88[rbp], eax
	mov	edx, DWORD PTR -108[rbp]
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	mov	eax, DWORD PTR -48[rbp+rax*4]
	add	eax, edx
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -88[rbp], 0
	js	.L13
	cmp	DWORD PTR -88[rbp], 7
	jg	.L13
	cmp	DWORD PTR -84[rbp], 0
	js	.L13
	cmp	DWORD PTR -84[rbp], 7
	jg	.L13
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	jne	.L13
	mov	eax, DWORD PTR -120[rbp]
	cmp	DWORD PTR -88[rbp], eax
	jne	.L14
	mov	eax, DWORD PTR -116[rbp]
	cmp	DWORD PTR -84[rbp], eax
	je	.L13
.L14:
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	mov	edx, DWORD PTR -92[rbp]
	mov	DWORD PTR [rcx+rax*4], edx
	mov	eax, DWORD PTR count[rip]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rdx, stack[rip]
	mov	eax, DWORD PTR -88[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR count[rip]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rdx, stack[rip+4]
	mov	eax, DWORD PTR -84[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR count[rip]
	add	eax, 1
	mov	DWORD PTR count[rip], eax
.L13:
	add	DWORD PTR -96[rbp], 1
.L12:
	cmp	DWORD PTR -96[rbp], 7
	jle	.L15
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	filln, .-filln
	.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	"7639.c"
	.text
	.comm	count,4,4
	.comm	stack,512,4
	.section	.rodata
	.align	2
.LC2:
	.ascii	"To get from %s to %s takes %d knight moves.\012\000"
	.align	2
.LC3:
	.ascii	"%s %s\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 288
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #288
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L2
.L3:
	sub	r3, fp, #272
	mov	r2, #256
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #288
	sub	r2, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	stoc
	sub	r3, fp, #280
	sub	r2, fp, #12
	mov	r1, r2
	mov	r0, r3
	bl	stoc
	sub	r0, fp, #272
	sub	r3, fp, #288
	ldm	r3, {r1, r2}
	bl	draw
	ldr	r2, [fp, #-280]
	ldr	r3, [fp, #-276]
	lsl	r2, r2, #3
	add	r3, r2, r3
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-268]
	sub	r2, fp, #12
	sub	r1, fp, #16
	ldr	r0, .L6+4
	bl	printf
.L2:
	sub	r2, fp, #12
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L6+8
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #2
	beq	.L3
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC4
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.align	2
	.global	stoc
	.syntax unified
	.arm
	.fpu softvfp
	.type	stoc, %function
stoc:
	@ 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]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #49
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #97
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r0, [fp, #-16]
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	stoc, .-stoc
	.align	2
	.global	draw
	.syntax unified
	.arm
	.fpu softvfp
	.type	draw, %function
draw:
	@ 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, #-24]
	sub	r3, fp, #32
	stm	r3, {r1, r2}
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-8]
	ldr	r3, .L13
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r3, [sp]
	ldr	r3, [fp, #-12]
	sub	r2, fp, #32
	ldm	r2, {r1, r2}
	ldr	r0, [fp, #-24]
	bl	filln
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L11
.L12:
	ldr	r2, .L13+4
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #3]
	str	r3, [fp, #-32]
	ldr	r2, .L13+4
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-8]
	str	r3, [sp]
	ldr	r3, [fp, #-12]
	sub	r2, fp, #32
	ldm	r2, {r1, r2}
	ldr	r0, [fp, #-24]
	bl	filln
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L11:
	ldr	r3, .L13
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L12
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	count
	.word	stack
	.size	draw, .-draw
	.section	.rodata
	.align	2
.LC0:
	.word	-2
	.word	-1
	.word	1
	.word	2
	.word	2
	.word	1
	.word	-1
	.word	-2
	.align	2
.LC1:
	.word	1
	.word	2
	.word	2
	.word	1
	.word	-1
	.word	-2
	.word	-2
	.word	-1
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	filln
	.syntax unified
	.arm
	.fpu softvfp
	.type	filln, %function
filln:
	@ args = 12, pretend = 8, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #8
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	str	r0, [fp, #-96]
	sub	r0, fp, #104
	stm	r0, {r1, r2}
	str	r3, [fp, #8]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L21+4
	sub	ip, fp, #72
	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}
	ldr	r3, .L21+8
	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}
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldr	r2, [fp, #-100]
	ldr	r3, [r3, r2, lsl #2]
	add	r3, r3, #1
	str	r3, [fp, #-84]
	mov	r3, #0
	str	r3, [fp, #-88]
	b	.L16
.L19:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-68]
	add	r3, r2, r3
	str	r3, [fp, #-80]
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-36]
	add	r3, r2, r3
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	blt	.L17
	ldr	r3, [fp, #-80]
	cmp	r3, #7
	bgt	.L17
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	blt	.L17
	ldr	r3, [fp, #-76]
	cmp	r3, #7
	bgt	.L17
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldr	r2, [fp, #-76]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	bne	.L17
	ldr	r3, [fp, #8]
	ldr	r2, [fp, #-80]
	cmp	r2, r3
	bne	.L18
	ldr	r3, [fp, #12]
	ldr	r2, [fp, #-76]
	cmp	r2, r3
	beq	.L17
.L18:
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldr	r2, [fp, #-76]
	ldr	r1, [fp, #-84]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, .L21+12
	ldr	r3, [r3]
	ldr	r1, .L21+16
	ldr	r2, [fp, #-80]
	str	r2, [r1, r3, lsl #3]
	ldr	r3, .L21+12
	ldr	r3, [r3]
	ldr	r2, .L21+16
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [fp, #-76]
	str	r2, [r3, #4]
	ldr	r3, .L21+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L21+12
	str	r3, [r2]
.L17:
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
.L16:
	ldr	r3, [fp, #-88]
	cmp	r3, #7
	ble	.L19
	nop
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #8
	bx	lr
.L22:
	.align	2
.L21:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	count
	.word	stack
	.size	filln, .-filln
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
