	.file	"179830852.c"
	.intel_syntax noprefix
	.text
	.globl	numberOfVertices
	.bss
	.align 4
	.type	numberOfVertices, @object
	.size	numberOfVertices, 4
numberOfVertices:
	.zero	4
	.globl	head
	.align 8
	.type	head, @object
	.size	head, 8
head:
	.zero	8
	.globl	tail
	.align 8
	.type	tail, @object
	.size	tail, 8
tail:
	.zero	8
	.globl	visitHead
	.align 8
	.type	visitHead, @object
	.size	visitHead, 8
visitHead:
	.zero	8
	.globl	visitTail
	.align 8
	.type	visitTail, @object
	.size	visitTail, 8
visitTail:
	.zero	8
	.text
	.globl	cleanVisit
	.type	cleanVisit, @function
cleanVisit:
.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, 16
	jmp	.L2
.L3:
	mov	rax, QWORD PTR visitHead[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR visitHead[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR visitHead[rip], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
.L2:
	mov	rax, QWORD PTR visitHead[rip]
	test	rax, rax
	jne	.L3
	mov	QWORD PTR visitTail[rip], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cleanVisit, .-cleanVisit
	.globl	visited
	.type	visited, @function
visited:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR visitHead[rip]
	test	rax, rax
	jne	.L5
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR visitHead[rip], rax
	mov	rax, QWORD PTR visitHead[rip]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR visitHead[rip]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR visitHead[rip]
	mov	QWORD PTR visitTail[rip], rax
	jmp	.L7
.L5:
	mov	rbx, QWORD PTR visitTail[rip]
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR visitTail[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR visitTail[rip], rax
	mov	rax, QWORD PTR visitTail[rip]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR visitTail[rip]
	mov	QWORD PTR [rax], 0
.L7:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	visited, .-visited
	.globl	didntVisit
	.type	didntVisit, @function
didntVisit:
.LFB8:
	.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	rax, QWORD PTR visitHead[rip]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L9
.L12:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L10
	mov	eax, 0
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
.L9:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L12
	mov	eax, 1
.L11:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	didntVisit, .-didntVisit
	.globl	enqueue
	.type	enqueue, @function
enqueue:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR head[rip]
	test	rax, rax
	jne	.L14
	mov	rax, QWORD PTR tail[rip]
	test	rax, rax
	jne	.L14
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	didntVisit
	test	eax, eax
	je	.L16
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR head[rip], rax
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR tail[rip], rax
	mov	rax, QWORD PTR tail[rip]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR tail[rip]
	mov	QWORD PTR [rax], 0
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	visited
	jmp	.L16
.L14:
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	didntVisit
	test	eax, eax
	je	.L17
	mov	rbx, QWORD PTR tail[rip]
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR tail[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR tail[rip], rax
	mov	rax, QWORD PTR tail[rip]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR tail[rip]
	mov	QWORD PTR [rax], 0
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	visited
	jmp	.L17
.L16:
.L17:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	enqueue, .-enqueue
	.globl	deque
	.type	deque, @function
deque:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR head[rip]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L19
	mov	rax, QWORD PTR head[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR head[rip], rax
	jmp	.L20
.L19:
	mov	QWORD PTR head[rip], 0
	mov	QWORD PTR tail[rip], 0
.L20:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	deque, .-deque
	.globl	sortedEnqueue
	.type	sortedEnqueue, @function
sortedEnqueue:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	eax, DWORD PTR numberOfVertices[rip]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -40[rbp], rdx
	movsx	rdx, eax
	mov	r10, rdx
	mov	r11d, 0
	movsx	rdx, eax
	mov	r8, rdx
	mov	r9d, 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L23:
	cmp	rsp, rdx
	je	.L24
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L23
.L24:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L25
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L25:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -60[rbp], 0
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -72[rbp], rax
	jmp	.L26
.L27:
	mov	rax, QWORD PTR -72[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -60[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	add	DWORD PTR -60[rbp], 1
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -72[rbp], rax
.L26:
	cmp	QWORD PTR -72[rbp], 0
	jne	.L27
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -48[rbp], eax
	mov	DWORD PTR -60[rbp], 0
	jmp	.L28
.L33:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -60[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR -64[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -56[rbp], eax
	jmp	.L29
.L31:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	cmp	DWORD PTR -64[rbp], eax
	jle	.L30
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR -64[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	mov	DWORD PTR -52[rbp], eax
.L30:
	add	DWORD PTR -56[rbp], 1
.L29:
	mov	eax, DWORD PTR -56[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jl	.L31
	mov	eax, DWORD PTR -64[rbp]
	mov	edi, eax
	call	didntVisit
	test	eax, eax
	je	.L32
	mov	eax, DWORD PTR -64[rbp]
	mov	edi, eax
	call	enqueue
.L32:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -60[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -60[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -64[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -52[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -44[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
	add	DWORD PTR -60[rbp], 1
.L28:
	mov	eax, DWORD PTR -60[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jl	.L33
	mov	rsp, rbx
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	sortedEnqueue, .-sortedEnqueue
	.section	.rodata
.LC0:
	.string	"%d "
	.text
	.globl	BFS
	.type	BFS, @function
BFS:
.LFB12:
	.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	DWORD PTR -28[rbp], esi
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	enqueue
	jmp	.L36
.L37:
	mov	eax, 0
	call	deque
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	sortedEnqueue
.L36:
	mov	rax, QWORD PTR head[rip]
	test	rax, rax
	jne	.L37
	mov	eax, 0
	call	cleanVisit
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	BFS, .-BFS
	.globl	CreateNode
	.type	CreateNode, @function
CreateNode:
.LFB13:
	.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	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	CreateNode, .-CreateNode
	.globl	CreateEdge
	.type	CreateEdge, @function
CreateEdge:
.LFB14:
	.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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	jmp	.L41
.L42:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
.L41:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L42
	mov	eax, DWORD PTR -32[rbp]
	mov	edi, eax
	call	CreateNode
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	jmp	.L43
.L44:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
.L43:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L44
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	CreateNode
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	CreateEdge, .-CreateEdge
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%c"
.LC3:
	.string	" %c"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.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
	lea	rsi, numberOfVertices[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR numberOfVertices[rip]
	cdqe
	sal	rax, 4
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -36[rbp], 0
	jmp	.L46
.L47:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR 8[rdx], eax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	add	DWORD PTR -36[rbp], 1
.L46:
	mov	eax, DWORD PTR numberOfVertices[rip]
	cmp	DWORD PTR -36[rbp], eax
	jl	.L47
	jmp	.L48
.L54:
	movzx	eax, BYTE PTR -46[rbp]
	cmp	al, 78
	jne	.L49
	lea	rax, -44[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L50
.L53:
	mov	edx, DWORD PTR -44[rbp]
	mov	eax, DWORD PTR -40[rbp]
	cmp	edx, eax
	je	.L51
	mov	edx, DWORD PTR -40[rbp]
	mov	ecx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	CreateEdge
.L51:
	movzx	eax, BYTE PTR -45[rbp]
	cmp	al, 10
	je	.L61
.L50:
	lea	rdx, -45[rbp]
	lea	rax, -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	test	eax, eax
	jne	.L53
	jmp	.L48
.L61:
	nop
	jmp	.L48
.L49:
	movzx	eax, BYTE PTR -46[rbp]
	cmp	al, 66
	jne	.L48
	lea	rax, -44[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	BFS
.L48:
	lea	rax, -46[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, -1
	jne	.L54
	mov	DWORD PTR -36[rbp], 0
	jmp	.L55
.L58:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L56
.L57:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
.L56:
	cmp	QWORD PTR -32[rbp], 0
	jne	.L57
	add	DWORD PTR -36[rbp], 1
.L55:
	mov	eax, DWORD PTR numberOfVertices[rip]
	cmp	DWORD PTR -36[rbp], eax
	jl	.L58
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L60
	call	__stack_chk_fail@PLT
.L60:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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	"179830852.c"
	.text
	.comm	numberOfVertices,4,4
	.global	head
	.bss
	.align	2
	.type	head, %object
	.size	head, 4
head:
	.space	4
	.global	tail
	.align	2
	.type	tail, %object
	.size	tail, 4
tail:
	.space	4
	.global	visitHead
	.align	2
	.type	visitHead, %object
	.size	visitHead, 4
visitHead:
	.space	4
	.global	visitTail
	.align	2
	.type	visitTail, %object
	.size	visitTail, 4
visitTail:
	.space	4
	.text
	.align	2
	.global	cleanVisit
	.syntax unified
	.arm
	.fpu softvfp
	.type	cleanVisit, %function
cleanVisit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	b	.L2
.L3:
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, .L4
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, .L4
	str	r3, [r2]
	ldr	r0, [fp, #-8]
	bl	free
.L2:
	ldr	r3, .L4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
	ldr	r3, .L4+4
	mov	r2, #0
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	visitHead
	.word	visitTail
	.size	cleanVisit, .-cleanVisit
	.align	2
	.global	visited
	.syntax unified
	.arm
	.fpu softvfp
	.type	visited, %function
visited:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, .L10
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L7
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L10
	str	r2, [r3]
	ldr	r3, .L10
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L10
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, .L10
	ldr	r3, [r3]
	ldr	r2, .L10+4
	str	r3, [r2]
	b	.L9
.L7:
	ldr	r3, .L10+4
	ldr	r4, [r3]
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, .L10+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, .L10+4
	str	r3, [r2]
	ldr	r3, .L10+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
.L9:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L11:
	.align	2
.L10:
	.word	visitHead
	.word	visitTail
	.size	visited, .-visited
	.align	2
	.global	didntVisit
	.syntax unified
	.arm
	.fpu softvfp
	.type	didntVisit, %function
didntVisit:
	@ 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]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L13
.L16:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L14
	mov	r3, #0
	b	.L15
.L14:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
.L13:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L16
	mov	r3, #1
.L15:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L18:
	.align	2
.L17:
	.word	visitHead
	.size	didntVisit, .-didntVisit
	.align	2
	.global	enqueue
	.syntax unified
	.arm
	.fpu softvfp
	.type	enqueue, %function
enqueue:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, .L24
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L20
	ldr	r3, .L24+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L20
	ldr	r0, [fp, #-16]
	bl	didntVisit
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L24
	str	r2, [r3]
	ldr	r3, .L24
	ldr	r3, [r3]
	ldr	r2, .L24+4
	str	r3, [r2]
	ldr	r3, .L24+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, .L24+4
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, [fp, #-16]
	bl	visited
	b	.L22
.L20:
	ldr	r0, [fp, #-16]
	bl	didntVisit
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	ldr	r3, .L24+4
	ldr	r4, [r3]
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, .L24+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, .L24+4
	str	r3, [r2]
	ldr	r3, .L24+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, .L24+4
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, [fp, #-16]
	bl	visited
	b	.L23
.L22:
.L23:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L25:
	.align	2
.L24:
	.word	head
	.word	tail
	.size	enqueue, .-enqueue
	.align	2
	.global	deque
	.syntax unified
	.arm
	.fpu softvfp
	.type	deque, %function
deque:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, .L30
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L27
	ldr	r3, .L30
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, .L30
	str	r3, [r2]
	b	.L28
.L27:
	ldr	r3, .L30
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L30+4
	mov	r2, #0
	str	r2, [r3]
.L28:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	head
	.word	tail
	.size	deque, .-deque
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sortedEnqueue
	.syntax unified
	.arm
	.fpu softvfp
	.type	sortedEnqueue, %function
sortedEnqueue:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-56]
	ldr	r3, .L42
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, .L42+4
	ldr	ip, [r3]
	sub	r3, ip, #1
	str	r3, [fp, #-32]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-56]
	ldr	r3, [r3]
	str	r3, [fp, #-56]
	b	.L33
.L34:
	ldr	r3, [fp, #-56]
	ldr	r1, [r3, #4]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-44]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-56]
	ldr	r3, [r3]
	str	r3, [fp, #-56]
.L33:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L34
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L35
.L40:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-44]
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-40]
	b	.L36
.L38:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-40]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	ble	.L37
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-40]
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-36]
.L37:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L36:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L38
	ldr	r0, [fp, #-48]
	bl	didntVisit
	mov	r3, r0
	cmp	r3, #0
	beq	.L39
	ldr	r0, [fp, #-48]
	bl	enqueue
.L39:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-44]
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-48]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-36]
	ldr	r1, [fp, #-20]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L35:
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L40
	mov	sp, r4
	nop
	ldr	r3, .L42
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L41
	bl	__stack_chk_fail
.L41:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC0
	.word	numberOfVertices
	.size	sortedEnqueue, .-sortedEnqueue
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%d \000"
	.text
	.align	2
	.global	BFS
	.syntax unified
	.arm
	.fpu softvfp
	.type	BFS, %function
BFS:
	@ 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]
	ldr	r0, [fp, #-20]
	bl	enqueue
	b	.L45
.L46:
	bl	deque
	str	r0, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, .L47
	bl	printf
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	sortedEnqueue
.L45:
	ldr	r3, .L47+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L46
	bl	cleanVisit
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC1
	.word	head
	.size	BFS, .-BFS
	.align	2
	.global	CreateNode
	.syntax unified
	.arm
	.fpu softvfp
	.type	CreateNode, %function
CreateNode:
	@ 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]
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	CreateNode, .-CreateNode
	.align	2
	.global	CreateEdge
	.syntax unified
	.arm
	.fpu softvfp
	.type	CreateEdge, %function
CreateEdge:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	b	.L52
.L53:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
.L52:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L53
	ldr	r0, [fp, #-24]
	bl	CreateNode
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	b	.L54
.L55:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
.L54:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L55
	ldr	r0, [fp, #-20]
	bl	CreateNode
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	CreateEdge, .-CreateEdge
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"%d%c\000"
	.align	2
.LC4:
	.ascii	" %c\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, #32
	ldr	r3, .L73
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L73+4
	ldr	r0, .L73+8
	bl	__isoc99_scanf
	ldr	r3, .L73+4
	ldr	r3, [r3]
	lsl	r3, r3, #3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L57
.L58:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L57:
	ldr	r3, .L73+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L58
	b	.L59
.L65:
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	cmp	r3, #78
	bne	.L60
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L73+8
	bl	__isoc99_scanf
	b	.L61
.L64:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	beq	.L62
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-28]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	CreateEdge
.L62:
	ldrb	r3, [fp, #-33]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L72
.L61:
	sub	r2, fp, #33
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L73+12
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #0
	bne	.L64
	b	.L59
.L72:
	nop
	b	.L59
.L60:
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	cmp	r3, #66
	bne	.L59
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L73+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-32]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	BFS
.L59:
	sub	r3, fp, #34
	mov	r1, r3
	ldr	r0, .L73+16
	bl	__isoc99_scanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L65
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L66
.L69:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	b	.L67
.L68:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-12]
	bl	free
.L67:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L68
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L66:
	ldr	r3, .L73+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L69
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #0
	ldr	r2, .L73
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L71
	bl	__stack_chk_fail
.L71:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L74:
	.align	2
.L73:
	.word	.LC5
	.word	numberOfVertices
	.word	.LC2
	.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
