	.file	"334083.c"
	.intel_syntax noprefix
	.text
	.globl	arestas
	.bss
	.align 32
	.type	arestas, @object
	.size	arestas, 100000000
arestas:
	.zero	100000000
	.globl	vertices
	.align 32
	.type	vertices, @object
	.size	vertices, 10000
vertices:
	.zero	10000
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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
	jmp	.L2
.L9:
	mov	DWORD PTR -24[rbp], 0
	jmp	.L3
.L6:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 10000
	add	rdx, rax
	lea	rax, arestas[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	add	DWORD PTR -12[rbp], 1
.L4:
	mov	eax, DWORD PTR -32[rbp]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L5
	mov	eax, DWORD PTR -24[rbp]
	add	eax, 1
	mov	DWORD PTR -24[rbp], eax
.L3:
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -32[rbp]
	cmp	edx, eax
	jl	.L6
	mov	DWORD PTR -24[rbp], 0
	jmp	.L7
.L8:
	lea	rdx, -16[rbp]
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	mov	edx, DWORD PTR -20[rbp]
	sub	edx, 1
	movsx	rsi, edx
	movsx	rcx, eax
	imul	rcx, rcx, 10000
	add	rsi, rcx
	lea	rcx, arestas[rip]
	add	rcx, rsi
	mov	BYTE PTR [rcx], 1
	mov	ecx, DWORD PTR -20[rbp]
	lea	esi, -1[rcx]
	mov	ecx, DWORD PTR -16[rbp]
	sub	ecx, 1
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 10000
	add	rdx, rax
	lea	rax, arestas[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	rcx, ecx
	movsx	rdx, esi
	imul	rdx, rdx, 10000
	add	rcx, rdx
	lea	rdx, arestas[rip]
	add	rdx, rcx
	mov	BYTE PTR [rdx], al
	mov	eax, DWORD PTR -24[rbp]
	add	eax, 1
	mov	DWORD PTR -24[rbp], eax
.L7:
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	cmp	edx, eax
	jl	.L8
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, 10000
	mov	esi, 0
	lea	rdi, vertices[rip]
	call	memset@PLT
	mov	eax, DWORD PTR -32[rbp]
	mov	edx, DWORD PTR -24[rbp]
	sub	edx, 1
	mov	esi, eax
	mov	edi, edx
	call	dfs
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L2:
	lea	rdx, -28[rbp]
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, -1
	jne	.L9
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB7:
	.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	WORD PTR -2[rbp], 1
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, vertices[rip]
	mov	BYTE PTR [rax+rdx], 1
	mov	WORD PTR -4[rbp], 0
	jmp	.L13
.L15:
	movsx	eax, WORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 10000
	add	rdx, rax
	lea	rax, arestas[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L14
	movsx	eax, WORD PTR -4[rbp]
	cdqe
	lea	rdx, vertices[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	test	al, al
	jne	.L14
	movsx	eax, WORD PTR -4[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	esi, edx
	mov	edi, eax
	call	dfs
	mov	edx, eax
	movzx	eax, WORD PTR -2[rbp]
	add	eax, edx
	mov	WORD PTR -2[rbp], ax
.L14:
	movzx	eax, WORD PTR -4[rbp]
	add	eax, 1
	mov	WORD PTR -4[rbp], ax
.L13:
	movsx	eax, WORD PTR -4[rbp]
	cmp	DWORD PTR -24[rbp], eax
	jg	.L15
	movsx	eax, WORD PTR -2[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	dfs, .-dfs
	.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	"334083.c"
	.text
	.comm	arestas,100000000,4
	.comm	vertices,10000,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d %d\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"%d\012\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 = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L2
.L9:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L3
.L6:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L4
.L5:
	ldr	r2, [fp, #-24]
	ldr	r1, .L12+4
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r2, r1, r3
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L4:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L5
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L3:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L6
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L7
.L8:
	sub	r2, fp, #16
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L12+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	sub	r2, r3, #1
	ldr	r3, [fp, #-20]
	sub	r0, r3, #1
	ldr	ip, .L12+4
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r1, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #4
	add	r3, ip, r3
	add	r3, r3, r0
	mov	r1, #1
	strb	r1, [r3]
	ldr	r3, [fp, #-20]
	sub	r1, r3, #1
	ldr	r3, [fp, #-16]
	sub	ip, r3, #1
	ldr	lr, .L12+4
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, lr, r3
	add	r3, r3, r0
	ldrb	lr, [r3]	@ zero_extendqisi2
	ldr	r0, .L12+4
	mov	r3, r1
	lsl	r3, r3, #5
	sub	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r0, r3
	add	r3, r3, ip
	mov	r2, lr
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L7:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L8
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L12+12
	bl	__isoc99_scanf
	ldr	r2, .L12+16
	mov	r1, #0
	ldr	r0, .L12+20
	bl	memset
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	ldr	r2, [fp, #-32]
	mov	r1, r2
	mov	r0, r3
	bl	dfs
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L12+24
	bl	printf
.L2:
	sub	r2, fp, #28
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L12+8
	bl	__isoc99_scanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L9
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC3
	.word	arestas
	.word	.LC0
	.word	.LC1
	.word	10000
	.word	vertices
	.word	.LC2
	.size	main, .-main
	.align	2
	.global	dfs
	.syntax unified
	.arm
	.fpu softvfp
	.type	dfs, %function
dfs:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #1
	strh	r3, [fp, #-6]	@ movhi
	ldr	r2, .L19
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #1
	strb	r2, [r3]
	mov	r3, #0
	strh	r3, [fp, #-8]	@ movhi
	b	.L15
.L17:
	ldrsh	r1, [fp, #-8]
	ldr	r0, .L19+4
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r0, r3
	add	r3, r3, r1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L16
	ldrsh	r3, [fp, #-8]
	ldr	r2, .L19
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L16
	ldrsh	r3, [fp, #-8]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	dfs
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrh	r3, [fp, #-6]
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-6]	@ movhi
.L16:
	ldrsh	r3, [fp, #-8]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-8]	@ movhi
.L15:
	ldrsh	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bgt	.L17
	ldrsh	r3, [fp, #-6]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	vertices
	.word	arestas
	.size	dfs, .-dfs
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
