	.file	"645812.c"
	.intel_syntax noprefix
	.text
	.globl	answer
	.bss
	.align 32
	.type	answer, @object
	.size	answer, 4004
answer:
	.zero	4004
	.globl	visit
	.align 32
	.type	visit, @object
	.size	visit, 4008004
visit:
	.zero	4008004
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 4008004
map:
	.zero	4008004
	.globl	queue
	.align 32
	.type	queue, @object
	.size	queue, 8008
queue:
	.zero	8008
	.globl	available_buffer
	.align 32
	.type	available_buffer, @object
	.size	available_buffer, 4004
available_buffer:
	.zero	4004
	.globl	available
	.align 32
	.type	available, @object
	.size	available, 4004
available:
	.zero	4004
	.globl	push_queue
	.align 4
	.type	push_queue, @object
	.size	push_queue, 4
push_queue:
	.zero	4
	.globl	queue_index
	.align 4
	.type	queue_index, @object
	.size	queue_index, 4
queue_index:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d\n"
.LC2:
	.string	"%d "
	.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	lea	rax, -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -28[rbp], 0
	jmp	.L2
.L39:
	lea	rdx, M[rip]
	lea	rsi, N[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -36[rbp], 0
	jmp	.L3
.L6:
	mov	DWORD PTR -32[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -32[rbp]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 1001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, map[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -32[rbp]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 1001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, visit[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -32[rbp]
	add	eax, 1
	mov	DWORD PTR -32[rbp], eax
.L4:
	mov	edx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR N[rip]
	cmp	edx, eax
	jle	.L5
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, available[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, answer[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	mov	DWORD PTR -36[rbp], eax
.L3:
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR N[rip]
	cmp	edx, eax
	jle	.L6
	mov	DWORD PTR -24[rbp], 0
	jmp	.L7
.L8:
	lea	rdx, -32[rbp]
	lea	rax, -36[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -32[rbp]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 1001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, map[rip]
	mov	DWORD PTR [rdx+rax], 1
	add	DWORD PTR -24[rbp], 1
.L7:
	mov	eax, DWORD PTR M[rip]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L8
	mov	DWORD PTR push_queue[rip], 0
	mov	DWORD PTR queue_index[rip], 0
	mov	eax, DWORD PTR available[rip+4]
	test	eax, eax
	jne	.L9
	mov	eax, DWORD PTR visit[rip+4004]
	test	eax, eax
	jne	.L10
	mov	ecx, DWORD PTR push_queue[rip]
	mov	eax, DWORD PTR queue_index[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR queue_index[rip], edx
	movsx	rdx, eax
	movsx	rax, ecx
	imul	rax, rax, 1001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, queue[rip]
	mov	DWORD PTR [rdx+rax], 1
.L10:
	mov	eax, DWORD PTR visit[rip+4004]
	add	eax, 1
	mov	DWORD PTR visit[rip+4004], eax
	mov	eax, DWORD PTR visit[rip+4004]
	cdqe
	add	rax, 1001
	lea	rdx, 0[0+rax*4]
	lea	rax, visit[rip]
	mov	DWORD PTR [rdx+rax], 1
.L9:
	mov	DWORD PTR available[rip+4], 1
	mov	DWORD PTR -16[rbp], 0
	mov	eax, DWORD PTR queue_index[rip]
	mov	DWORD PTR -20[rbp], eax
	jmp	.L11
.L26:
	mov	eax, DWORD PTR push_queue[rip]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR push_queue[rip]
	test	eax, eax
	sete	al
	movzx	eax, al
	mov	DWORD PTR push_queue[rip], eax
	mov	DWORD PTR queue_index[rip], 0
	mov	DWORD PTR -32[rbp], 1
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, available_buffer[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -32[rbp]
	add	eax, 1
	mov	DWORD PTR -32[rbp], eax
.L12:
	mov	edx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR N[rip]
	cmp	edx, eax
	jle	.L13
	mov	DWORD PTR -36[rbp], 0
	jmp	.L14
.L22:
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	imul	rax, rax, 1001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, queue[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR N[rip]
	cmp	DWORD PTR -24[rbp], eax
	jne	.L15
	mov	DWORD PTR queue_index[rip], 0
	jmp	.L16
.L15:
	mov	DWORD PTR -32[rbp], 1
	jmp	.L17
.L21:
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	imul	rax, rax, 1001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, map[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	eax, 1
	jne	.L18
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	imul	rax, rax, 1001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, map[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, available[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L19
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	imul	rax, rax, 4004
	lea	rdx, visit[rip]
	mov	eax, DWORD PTR [rax+rdx]
	test	eax, eax
	jne	.L20
	mov	ecx, DWORD PTR push_queue[rip]
	mov	eax, DWORD PTR queue_index[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR queue_index[rip], edx
	mov	edx, DWORD PTR -32[rbp]
	movsx	rsi, eax
	movsx	rax, ecx
	imul	rax, rax, 1001
	add	rax, rsi
	lea	rcx, 0[0+rax*4]
	lea	rax, queue[rip]
	mov	DWORD PTR [rcx+rax], edx
.L20:
	mov	ecx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 4004
	lea	rsi, visit[rip]
	mov	edx, DWORD PTR [rdx+rsi]
	lea	edi, 1[rdx]
	movsx	rdx, eax
	imul	rdx, rdx, 4004
	lea	rsi, visit[rip]
	mov	DWORD PTR [rdx+rsi], edi
	cdqe
	imul	rax, rax, 4004
	lea	rdx, visit[rip]
	mov	eax, DWORD PTR [rax+rdx]
	movsx	rdx, eax
	movsx	rax, ecx
	imul	rax, rax, 1001
	add	rax, rdx
	lea	rcx, 0[0+rax*4]
	lea	rdx, visit[rip]
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR [rcx+rdx], eax
.L19:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, available_buffer[rip]
	mov	DWORD PTR [rdx+rax], 1
.L18:
	mov	eax, DWORD PTR -32[rbp]
	add	eax, 1
	mov	DWORD PTR -32[rbp], eax
.L17:
	mov	edx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR N[rip]
	cmp	edx, eax
	jle	.L21
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	mov	DWORD PTR -36[rbp], eax
.L14:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jg	.L22
.L16:
	mov	DWORD PTR -32[rbp], 1
	jmp	.L23
.L25:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, available_buffer[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	eax, 1
	jne	.L24
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, available[rip]
	mov	DWORD PTR [rdx+rax], 1
.L24:
	mov	eax, DWORD PTR -32[rbp]
	add	eax, 1
	mov	DWORD PTR -32[rbp], eax
.L23:
	mov	edx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR N[rip]
	cmp	edx, eax
	jle	.L25
	mov	eax, DWORD PTR queue_index[rip]
	mov	DWORD PTR -20[rbp], eax
.L11:
	cmp	DWORD PTR -20[rbp], 0
	jg	.L26
	mov	DWORD PTR answer[rip+4], 1
	mov	eax, DWORD PTR N[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, answer[rip]
	mov	DWORD PTR [rdx+rax], 1
	mov	DWORD PTR push_queue[rip], 0
	mov	DWORD PTR queue_index[rip], 0
	mov	DWORD PTR -36[rbp], 1
	jmp	.L27
.L28:
	mov	esi, DWORD PTR N[rip]
	mov	edi, DWORD PTR -36[rbp]
	mov	ecx, DWORD PTR push_queue[rip]
	mov	eax, DWORD PTR queue_index[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR queue_index[rip], edx
	movsx	rdi, edi
	movsx	rdx, esi
	imul	rdx, rdx, 1001
	add	rdx, rdi
	lea	rsi, 0[0+rdx*4]
	lea	rdx, visit[rip]
	mov	edx, DWORD PTR [rsi+rdx]
	movsx	rsi, eax
	movsx	rax, ecx
	imul	rax, rax, 1001
	add	rax, rsi
	lea	rcx, 0[0+rax*4]
	lea	rax, queue[rip]
	mov	DWORD PTR [rcx+rax], edx
	mov	eax, DWORD PTR N[rip]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 1001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, visit[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, answer[rip]
	mov	DWORD PTR [rdx+rax], 1
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	mov	DWORD PTR -36[rbp], eax
.L27:
	mov	eax, DWORD PTR N[rip]
	cdqe
	imul	rax, rax, 4004
	lea	rdx, visit[rip]
	mov	edx, DWORD PTR [rax+rdx]
	mov	eax, DWORD PTR -36[rbp]
	cmp	edx, eax
	jge	.L28
	mov	eax, DWORD PTR queue_index[rip]
	mov	DWORD PTR -20[rbp], eax
	jmp	.L29
.L35:
	mov	eax, DWORD PTR push_queue[rip]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR push_queue[rip]
	test	eax, eax
	sete	al
	movzx	eax, al
	mov	DWORD PTR push_queue[rip], eax
	mov	DWORD PTR queue_index[rip], 0
	mov	DWORD PTR -36[rbp], 0
	jmp	.L30
.L34:
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	imul	rax, rax, 1001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, queue[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -24[rbp], eax
	mov	DWORD PTR -32[rbp], 1
	jmp	.L31
.L33:
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	imul	rax, rax, 1001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, visit[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, answer[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L32
	mov	esi, DWORD PTR -32[rbp]
	mov	ecx, DWORD PTR push_queue[rip]
	mov	eax, DWORD PTR queue_index[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR queue_index[rip], edx
	movsx	rsi, esi
	mov	edx, DWORD PTR -24[rbp]
	movsx	rdx, edx
	imul	rdx, rdx, 1001
	add	rdx, rsi
	lea	rsi, 0[0+rdx*4]
	lea	rdx, visit[rip]
	mov	edx, DWORD PTR [rsi+rdx]
	movsx	rsi, eax
	movsx	rax, ecx
	imul	rax, rax, 1001
	add	rax, rsi
	lea	rcx, 0[0+rax*4]
	lea	rax, queue[rip]
	mov	DWORD PTR [rcx+rax], edx
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	imul	rax, rax, 1001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, visit[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, answer[rip]
	mov	DWORD PTR [rdx+rax], 1
.L32:
	mov	eax, DWORD PTR -32[rbp]
	add	eax, 1
	mov	DWORD PTR -32[rbp], eax
.L31:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	imul	rax, rax, 4004
	lea	rdx, visit[rip]
	mov	edx, DWORD PTR [rax+rdx]
	mov	eax, DWORD PTR -32[rbp]
	cmp	edx, eax
	jge	.L33
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	mov	DWORD PTR -36[rbp], eax
.L30:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jg	.L34
	mov	eax, DWORD PTR queue_index[rip]
	mov	DWORD PTR -20[rbp], eax
.L29:
	cmp	DWORD PTR -20[rbp], 0
	jg	.L35
	mov	DWORD PTR -36[rbp], 1
	jmp	.L36
.L38:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, answer[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	eax, 1
	jne	.L37
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L37:
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	mov	DWORD PTR -36[rbp], eax
.L36:
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR N[rip]
	cmp	edx, eax
	jle	.L38
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -28[rbp], 1
.L2:
	mov	eax, DWORD PTR -40[rbp]
	cmp	DWORD PTR -28[rbp], eax
	jl	.L39
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"645812.c"
	.text
	.comm	answer,4004,4
	.comm	visit,4008004,4
	.comm	map,4008004,4
	.comm	queue,8008,4
	.comm	available_buffer,4004,4
	.comm	available,4004,4
	.comm	push_queue,4,4
	.comm	queue_index,4,4
	.comm	N,4,4
	.comm	M,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"%d %d\012\000"
	.align	2
.LC2:
	.ascii	"%d \000"
	.align	2
.LC3:
	.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, .L42
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L42+4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L42+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L2
.L39:
	ldr	r2, .L42+12
	ldr	r1, .L42+16
	ldr	r0, .L42+20
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L3
.L6:
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L4
.L5:
	ldr	r2, [fp, #-36]
	ldr	r1, [fp, #-32]
	ldr	r0, .L42+24
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	mov	r2, #0
	str	r2, [r0, r3, lsl #2]
	ldr	r2, [fp, #-36]
	ldr	r1, [fp, #-32]
	ldr	r0, .L42+28
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	mov	r2, #0
	str	r2, [r0, r3, lsl #2]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L4:
	ldr	r2, [fp, #-32]
	ldr	r3, .L42+16
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L5
	ldr	r3, [fp, #-36]
	ldr	r2, .L42+32
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-36]
	ldr	r2, .L42+36
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L3:
	ldr	r2, [fp, #-36]
	ldr	r3, .L42+16
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L6
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L7
.L8:
	sub	r2, fp, #32
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L42+20
	bl	__isoc99_scanf
	ldr	r2, [fp, #-36]
	ldr	r1, [fp, #-32]
	ldr	r0, .L42+24
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	mov	r2, #1
	str	r2, [r0, r3, lsl #2]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L7:
	ldr	r3, .L42+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L8
	ldr	r3, .L42+40
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L42+44
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L42+32
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L9
	ldr	r3, .L42+28
	ldr	r3, [r3, #4004]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L42+40
	ldr	r2, [r3]
	ldr	r3, .L42+44
	ldr	r1, [r3]
	add	r3, r1, #1
	ldr	r0, .L42+44
	str	r3, [r0]
	ldr	r0, .L42+48
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	mov	r2, #1
	str	r2, [r0, r3, lsl #2]
.L10:
	ldr	r3, .L42+28
	ldr	r3, [r3, #4004]
	add	r3, r3, #1
	ldr	r2, .L42+28
	str	r3, [r2, #4004]
	ldr	r3, .L42+28
	ldr	r3, [r3, #4004]
	ldr	r2, .L42+28
	add	r3, r3, #1000
	add	r3, r3, #1
	mov	r1, #1
	str	r1, [r2, r3, lsl #2]
.L9:
	ldr	r3, .L42+32
	mov	r2, #1
	str	r2, [r3, #4]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, .L42+44
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	b	.L11
.L26:
	ldr	r3, .L42+40
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, .L42+40
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L42+40
	str	r2, [r3]
	ldr	r3, .L42+44
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L12
.L13:
	ldr	r3, [fp, #-32]
	ldr	r2, .L42+52
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L12:
	ldr	r2, [fp, #-32]
	ldr	r3, .L42+16
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L13
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L14
.L22:
	ldr	r1, [fp, #-36]
	ldr	r0, .L42+48
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	ldr	r3, [r0, r3, lsl #2]
	str	r3, [fp, #-24]
	ldr	r3, .L42+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bne	.L15
	ldr	r3, .L42+44
	mov	r2, #0
	str	r2, [r3]
	b	.L16
.L15:
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L17
.L21:
	ldr	r1, [fp, #-32]
	ldr	r0, .L42+24
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	ldr	r3, [r0, r3, lsl #2]
	cmp	r3, #1
	bne	.L18
	ldr	r1, [fp, #-32]
	ldr	r0, .L42+24
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	mov	r2, #0
	str	r2, [r0, r3, lsl #2]
	ldr	r3, [fp, #-32]
	ldr	r2, .L42+32
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L19
	ldr	r2, [fp, #-32]
	ldr	r1, .L42+28
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, r1, r2
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L20
	ldr	r3, .L42+40
	ldr	r2, [r3]
	ldr	r3, .L42+44
	ldr	r1, [r3]
	add	r3, r1, #1
	ldr	r0, .L42+44
	str	r3, [r0]
	ldr	r0, [fp, #-32]
	ldr	ip, .L42+48
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	str	r0, [ip, r3, lsl #2]
.L20:
	ldr	r0, [fp, #-32]
	ldr	r2, [fp, #-32]
	ldr	ip, .L42+28
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r1, r3, #3
	sub	r1, r1, r3
	lsl	r3, r1, #2
	mov	r1, r3
	add	r3, ip, r1
	ldr	r3, [r3]
	add	ip, r3, #1
	ldr	lr, .L42+28
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r1, r3, #3
	sub	r1, r1, r3
	lsl	r3, r1, #2
	mov	r1, r3
	add	r3, lr, r1
	str	ip, [r3]
	ldr	r1, .L42+28
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, r1, r2
	ldr	r1, [r3]
	ldr	ip, .L42+28
	mov	r3, r0
	lsl	r3, r3, #3
	add	r3, r3, r0
	lsl	r3, r3, #4
	sub	r3, r3, r0
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	ldr	r2, [fp, #-24]
	str	r2, [ip, r3, lsl #2]
.L19:
	ldr	r3, [fp, #-32]
	ldr	r2, .L42+52
	mov	r1, #1
	str	r1, [r2, r3, lsl #2]
.L18:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L17:
	ldr	r2, [fp, #-32]
	ldr	r3, .L42+16
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L21
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L14:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bgt	.L22
.L16:
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L23
.L25:
	ldr	r3, [fp, #-32]
	ldr	r2, .L42+52
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #1
	bne	.L24
	ldr	r3, [fp, #-32]
	ldr	r2, .L42+32
	mov	r1, #1
	str	r1, [r2, r3, lsl #2]
.L24:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L23:
	ldr	r2, [fp, #-32]
	ldr	r3, .L42+16
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L25
	ldr	r3, .L42+44
	ldr	r3, [r3]
	str	r3, [fp, #-20]
.L11:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bgt	.L26
	ldr	r3, .L42+36
	mov	r2, #1
	str	r2, [r3, #4]
	ldr	r3, .L42+16
	ldr	r3, [r3]
	ldr	r2, .L42+36
	mov	r1, #1
	str	r1, [r2, r3, lsl #2]
	ldr	r3, .L42+40
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L42+44
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L27
.L28:
	ldr	r3, .L42+16
	ldr	r2, [r3]
	ldr	ip, [fp, #-36]
	ldr	r3, .L42+40
	ldr	r1, [r3]
	ldr	r3, .L42+44
	ldr	r0, [r3]
	add	r3, r0, #1
	ldr	lr, .L42+44
	str	r3, [lr]
	ldr	lr, .L42+28
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, ip
	ldr	ip, [lr, r3, lsl #2]
	ldr	lr, .L42+48
	mov	r3, r1
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #4
	sub	r3, r3, r1
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r0
	str	ip, [lr, r3, lsl #2]
	ldr	r3, .L42+16
	ldr	r2, [r3]
	ldr	r1, [fp, #-36]
	ldr	r0, .L42+28
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	ldr	r3, [r0, r3, lsl #2]
	ldr	r2, .L42+36
	mov	r1, #1
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L27:
	ldr	r3, .L42+16
	ldr	r2, [r3]
	ldr	r1, .L42+28
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, r1, r2
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bge	.L28
	ldr	r3, .L42+44
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	b	.L29
.L35:
	ldr	r3, .L42+40
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, .L42+40
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L42+40
	str	r2, [r3]
	ldr	r3, .L42+44
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L30
.L34:
	ldr	r1, [fp, #-36]
	ldr	r0, .L42+48
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	ldr	r3, [r0, r3, lsl #2]
	str	r3, [fp, #-24]
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L31
.L33:
	ldr	r1, [fp, #-32]
	ldr	r0, .L42+28
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	ldr	r3, [r0, r3, lsl #2]
	ldr	r2, .L42+36
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L32
	ldr	ip, [fp, #-32]
	ldr	r3, .L42+40
	ldr	r1, [r3]
	ldr	r3, .L42+44
	ldr	r0, [r3]
	add	r3, r0, #1
	ldr	r2, .L42+44
	str	r3, [r2]
	ldr	lr, .L42+28
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, ip
	ldr	ip, [lr, r3, lsl #2]
	ldr	lr, .L42+48
	mov	r3, r1
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #4
	sub	r3, r3, r1
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r0
	str	ip, [lr, r3, lsl #2]
	ldr	r1, [fp, #-32]
	ldr	r0, .L42+28
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	add	r3, r2, r1
	ldr	r3, [r0, r3, lsl #2]
	ldr	r2, .L42+36
	mov	r1, #1
	str	r1, [r2, r3, lsl #2]
.L32:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L31:
	ldr	r1, .L42+28
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, r1, r2
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bge	.L33
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L30:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bgt	.L34
	ldr	r3, .L42+44
	ldr	r3, [r3]
	str	r3, [fp, #-20]
.L29:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bgt	.L35
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L36
.L38:
	ldr	r3, [fp, #-36]
	ldr	r2, .L42+36
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #1
	bne	.L37
	ldr	r3, [fp, #-36]
	mov	r1, r3
	ldr	r0, .L42+56
	bl	printf
.L37:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L36:
	ldr	r2, [fp, #-36]
	ldr	r3, .L42+16
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L38
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L2:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L39
	mov	r3, #0
	ldr	r2, .L42
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L41
	bl	__stack_chk_fail
.L41:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC3
	.word	stdout
	.word	.LC0
	.word	M
	.word	N
	.word	.LC1
	.word	map
	.word	visit
	.word	available
	.word	answer
	.word	push_queue
	.word	queue_index
	.word	queue
	.word	available_buffer
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
