	.file	"604805.c"
	.intel_syntax noprefix
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	q
	.align 4
	.type	q, @object
	.size	q, 4
q:
	.zero	4
	.globl	min
	.data
	.align 4
	.type	min, @object
	.size	min, 4
min:
	.long	99999999
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 10404
a:
	.zero	10404
	.globl	book
	.align 32
	.type	book, @object
	.size	book, 10404
book:
	.zero	10404
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	DWORD PTR -72[rbp], esi
	mov	DWORD PTR -76[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -48[rbp], 0
	mov	DWORD PTR -44[rbp], 1
	mov	DWORD PTR -40[rbp], 1
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], -1
	mov	DWORD PTR -24[rbp], -1
	mov	DWORD PTR -20[rbp], 0
	mov	eax, DWORD PTR p[rip]
	cmp	DWORD PTR -68[rbp], eax
	jne	.L2
	mov	eax, DWORD PTR p[rip]
	cmp	DWORD PTR -72[rbp], eax
	jne	.L2
	mov	eax, DWORD PTR min[rip]
	cmp	DWORD PTR -76[rbp], eax
	jge	.L12
	mov	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR min[rip], eax
	jmp	.L12
.L2:
	mov	DWORD PTR -60[rbp], 0
	jmp	.L5
.L9:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	mov	edx, DWORD PTR -48[rbp+rax*8]
	mov	eax, DWORD PTR -68[rbp]
	add	eax, edx
	mov	DWORD PTR -56[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	mov	edx, DWORD PTR -44[rbp+rax*8]
	mov	eax, DWORD PTR -72[rbp]
	add	eax, edx
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -56[rbp], 0
	jle	.L13
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -56[rbp], eax
	jg	.L13
	cmp	DWORD PTR -52[rbp], 0
	jle	.L13
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -52[rbp], eax
	jg	.L13
	mov	eax, DWORD PTR -52[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, a[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L8
	mov	eax, DWORD PTR -52[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, book[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L8
	mov	eax, DWORD PTR -52[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, book[rip]
	mov	DWORD PTR [rdx+rax], 1
	mov	eax, DWORD PTR -76[rbp]
	lea	edx, 1[rax]
	mov	ecx, DWORD PTR -52[rbp]
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	dfs
	mov	eax, DWORD PTR -52[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, book[rip]
	mov	DWORD PTR [rdx+rax], 0
	jmp	.L8
.L13:
	nop
.L8:
	add	DWORD PTR -60[rbp], 1
.L5:
	cmp	DWORD PTR -60[rbp], 3
	jle	.L9
	jmp	.L1
.L12:
	nop
.L1:
	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
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, m[rip]
	lea	rsi, n[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -16[rbp], 1
	jmp	.L15
.L18:
	mov	DWORD PTR -12[rbp], 1
	jmp	.L16
.L17:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, a[rip]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -12[rbp], 1
.L16:
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -12[rbp], eax
	jle	.L17
	add	DWORD PTR -16[rbp], 1
.L15:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -16[rbp], eax
	jle	.L18
	lea	rdx, -20[rbp]
	lea	rax, -24[rbp]
	lea	r8, q[rip]
	lea	rcx, p[rip]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, DWORD PTR -20[rbp]
	movsx	rcx, edx
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, book[rip]
	mov	DWORD PTR [rdx+rax], 1
	mov	ecx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, 0
	mov	esi, ecx
	mov	edi, eax
	call	dfs
	mov	eax, DWORD PTR min[rip]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	call	getchar@PLT
	call	getchar@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"604805.c"
	.text
	.comm	n,4,4
	.comm	m,4,4
	.comm	p,4,4
	.comm	q,4,4
	.global	min
	.data
	.align	2
	.type	min, %object
	.size	min, 4
min:
	.word	99999999
	.comm	a,10404,4
	.comm	book,10404,4
	.section	.rodata
	.align	2
.LC0:
	.word	0
	.word	1
	.word	1
	.word	0
	.word	0
	.word	-1
	.word	-1
	.word	0
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dfs
	.syntax unified
	.arm
	.fpu softvfp
	.type	dfs, %function
dfs:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	str	r2, [fp, #-64]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L14+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}
	ldr	r3, .L14+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-56]
	cmp	r2, r3
	bne	.L2
	ldr	r3, .L14+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-60]
	cmp	r2, r3
	bne	.L2
	ldr	r3, .L14+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-64]
	cmp	r2, r3
	bge	.L12
	ldr	r2, .L14+12
	ldr	r3, [fp, #-64]
	str	r3, [r2]
	b	.L12
.L2:
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L5
.L9:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-36]
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-32]
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	ble	.L13
	ldr	r3, .L14+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	bgt	.L13
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	ble	.L13
	ldr	r3, .L14+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	bgt	.L13
	ldr	r1, .L14+24
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	ldr	r2, [fp, #-44]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	bne	.L8
	ldr	r1, .L14+28
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	ldr	r2, [fp, #-44]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	bne	.L8
	ldr	r1, .L14+28
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	ldr	r2, [fp, #-44]
	add	r3, r3, r2
	mov	r2, #1
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-48]
	bl	dfs
	ldr	r1, .L14+28
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	ldr	r2, [fp, #-44]
	add	r3, r3, r2
	mov	r2, #0
	str	r2, [r1, r3, lsl #2]
	b	.L8
.L13:
	nop
.L8:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L5:
	ldr	r3, [fp, #-52]
	cmp	r3, #3
	ble	.L9
	b	.L1
.L12:
	nop
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC1
	.word	.LC0
	.word	p
	.word	min
	.word	n
	.word	m
	.word	a
	.word	book
	.size	dfs, .-dfs
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%d %d\000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"%d %d %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 = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L23+4
	ldr	r1, .L23+8
	ldr	r0, .L23+12
	bl	__isoc99_scanf
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L17
.L20:
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L18
.L19:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, .L23+16
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L23+20
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L18:
	ldr	r3, .L23+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	ble	.L19
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L17:
	ldr	r3, .L23+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L20
	sub	r2, fp, #20
	sub	r1, fp, #24
	ldr	r3, .L23+24
	str	r3, [sp]
	ldr	r3, .L23+28
	ldr	r0, .L23+32
	bl	__isoc99_scanf
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, .L23+36
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	add	r3, r3, r1
	mov	r2, #1
	str	r2, [r0, r3, lsl #2]
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-20]
	mov	r2, #0
	mov	r0, r3
	bl	dfs
	ldr	r3, .L23+40
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L23+20
	bl	printf
	bl	getchar
	bl	getchar
	mov	r3, #0
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC5
	.word	m
	.word	n
	.word	.LC2
	.word	a
	.word	.LC3
	.word	q
	.word	p
	.word	.LC4
	.word	book
	.word	min
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
