	.file	"62638072.c"
	.intel_syntax noprefix
	.text
	.globl	map
	.bss
	.align 32
	.type	map, @object
	.size	map, 40000
map:
	.zero	40000
	.globl	vis
	.align 32
	.type	vis, @object
	.size	vis, 400
vis:
	.zero	400
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.text
	.globl	visited
	.type	visited, @function
visited:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -4[rbp], 1
	jmp	.L2
.L5:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, vis[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L3
	mov	eax, 1
	jmp	.L4
.L3:
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jle	.L5
	mov	eax, 0
.L4:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	visited, .-visited
	.globl	count
	.type	count, @function
count:
.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -8[rbp], 0
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -20[rbp], eax
	jge	.L15
	mov	DWORD PTR -16[rbp], 1
	jmp	.L9
.L14:
	mov	DWORD PTR -12[rbp], 1
	jmp	.L10
.L13:
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	edi, eax
	call	visited
	test	eax, eax
	jne	.L11
	cmp	DWORD PTR -8[rbp], 0
	jne	.L12
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, vis[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, map[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, vis[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -12[rbp]
	movsx	rsi, edx
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, map[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	ecx, eax
	jle	.L11
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, vis[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -4[rbp], eax
.L11:
	add	DWORD PTR -12[rbp], 1
.L10:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -12[rbp], eax
	jle	.L13
	add	DWORD PTR -16[rbp], 1
.L9:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jle	.L14
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, vis[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, map[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR s[rip]
	add	eax, edx
	mov	DWORD PTR s[rip], eax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	mov	edi, eax
	call	count
	jmp	.L6
.L15:
	nop
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	count, .-count
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"input.txt"
.LC2:
	.string	"%d %d %d %d"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdin[rip]
	mov	rdx, rax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	freopen@PLT
	jmp	.L17
.L22:
	mov	edx, 40000
	mov	esi, -1
	lea	rdi, map[rip]
	call	memset@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L18
.L21:
	lea	rsi, -16[rbp]
	lea	rcx, -20[rbp]
	lea	rdx, -24[rbp]
	lea	rax, -28[rbp]
	mov	r8, rsi
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -16[rbp]
	test	eax, eax
	jne	.L19
	mov	esi, DWORD PTR -20[rbp]
	jmp	.L20
.L19:
	mov	esi, 0
.L20:
	mov	edx, DWORD PTR -24[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	movsx	r8, ecx
	movsx	rdi, edx
	mov	rax, rdi
	sal	rax, 2
	add	rax, rdi
	lea	rdi, 0[0+rax*4]
	add	rax, rdi
	sal	rax, 2
	add	rax, r8
	lea	rdi, 0[0+rax*4]
	lea	rax, map[rip]
	mov	DWORD PTR [rdi+rax], esi
	mov	esi, DWORD PTR -28[rbp]
	mov	edi, DWORD PTR -24[rbp]
	movsx	rcx, ecx
	movsx	rdx, edx
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, map[rip]
	mov	edx, DWORD PTR [rdx+rax]
	movsx	rdi, edi
	movsx	rcx, esi
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	add	rax, rcx
	sal	rax, 2
	add	rax, rdi
	lea	rcx, 0[0+rax*4]
	lea	rax, map[rip]
	mov	DWORD PTR [rcx+rax], edx
	add	DWORD PTR -12[rbp], 1
.L18:
	mov	eax, DWORD PTR n[rip]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR n[rip]
	imul	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cmp	DWORD PTR -12[rbp], eax
	jl	.L21
	mov	DWORD PTR vis[rip+4], 1
	mov	DWORD PTR s[rip], 0
	mov	edi, 1
	call	count
	mov	eax, DWORD PTR s[rip]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	lea	rsi, n[rip]
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR n[rip]
	test	eax, eax
	jne	.L22
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"62638072.c"
	.text
	.comm	map,40000,4
	.comm	vis,400,4
	.comm	n,4,4
	.comm	s,4,4
	.align	2
	.global	visited
	.syntax unified
	.arm
	.fpu softvfp
	.type	visited, %function
visited:
	@ 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]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L2
.L5:
	ldr	r2, .L6
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L3
	mov	r3, #1
	b	.L4
.L3:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	ble	.L5
	mov	r3, #0
.L4:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L7:
	.align	2
.L6:
	.word	vis
	.size	visited, .-visited
	.align	2
	.global	count
	.syntax unified
	.arm
	.fpu softvfp
	.type	count, %function
count:
	@ 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, #-24]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, .L18
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bge	.L17
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L11
.L16:
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L12
.L15:
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	visited
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L14
	ldr	r2, .L18+4
	ldr	r3, [fp, #-20]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	b	.L13
.L14:
	ldr	r1, .L18+8
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	ldr	r1, [r1, r3, lsl #2]
	ldr	r2, .L18+4
	ldr	r3, [fp, #-20]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r0, .L18+8
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r3, r2
	ldr	r3, [r0, r3, lsl #2]
	cmp	r1, r3
	ble	.L13
	ldr	r2, .L18+4
	ldr	r3, [fp, #-20]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
.L13:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L12:
	ldr	r3, .L18
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L15
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L11:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	ble	.L16
	ldr	r1, .L18+4
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r1, .L18+8
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	ldr	r2, [r1, r3, lsl #2]
	ldr	r3, .L18+12
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L18+12
	str	r3, [r2]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	mov	r0, r3
	bl	count
	b	.L8
.L17:
	nop
.L8:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	n
	.word	vis
	.word	map
	.word	s
	.size	count, .-count
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"input.txt\000"
	.align	2
.LC2:
	.ascii	"%d %d %d %d\000"
	.align	2
.LC3:
	.ascii	"%d\012\000"
	.align	2
.LC4:
	.ascii	"%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 = 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	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L29+4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L29+8
	ldr	r0, .L29+12
	bl	freopen
	b	.L21
.L26:
	ldr	r2, .L29+16
	mvn	r1, #0
	ldr	r0, .L29+20
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L22
.L25:
	sub	r0, fp, #20
	sub	r2, fp, #24
	sub	r1, fp, #28
	sub	r3, fp, #16
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L29+24
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L23
	ldr	r0, [fp, #-20]
	b	.L24
.L23:
	mov	r0, #0
.L24:
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-28]
	ldr	lr, .L29+20
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	ip, r3, #2
	add	r3, r3, ip
	lsl	r3, r3, #2
	add	r3, r3, r1
	str	r0, [lr, r3, lsl #2]
	ldr	r0, [fp, #-28]
	ldr	ip, [fp, #-24]
	ldr	lr, .L29+20
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r1
	ldr	r2, [lr, r3, lsl #2]
	ldr	lr, .L29+20
	mov	r3, r0
	lsl	r3, r3, #2
	add	r3, r3, r0
	lsl	r1, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r3, ip
	str	r2, [lr, r3, lsl #2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L22:
	ldr	r3, .L29+28
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L29+28
	ldr	r2, [r2]
	mul	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-12]
	cmp	r3, r2
	blt	.L25
	ldr	r3, .L29+32
	mov	r2, #1
	str	r2, [r3, #4]
	ldr	r3, .L29+36
	mov	r2, #0
	str	r2, [r3]
	mov	r0, #1
	bl	count
	ldr	r3, .L29+36
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L29+40
	bl	printf
.L21:
	ldr	r1, .L29+28
	ldr	r0, .L29+44
	bl	__isoc99_scanf
	ldr	r3, .L29+28
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L26
	mov	r3, #0
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC5
	.word	stdin
	.word	.LC0
	.word	.LC1
	.word	40000
	.word	map
	.word	.LC2
	.word	n
	.word	vis
	.word	s
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
