	.file	"23574297.c"
	.intel_syntax noprefix
	.text
	.globl	color
	.bss
	.align 32
	.type	color, @object
	.size	color, 4000
color:
	.zero	4000
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.text
	.globl	Enqueue
	.type	Enqueue, @function
Enqueue:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -12[rbp]
	mov	DWORD PTR 8[rax+rdx*4], ecx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 999
	jne	.L2
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], 0
	jmp	.L4
.L2:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], edx
.L4:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Enqueue, .-Enqueue
	.globl	Dequeue
	.type	Dequeue, @function
Dequeue:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 999
	jne	.L6
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4004[rax]
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR 8[rax+rdx*4]
.L7:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Dequeue, .-Dequeue
	.globl	isBipartite
	.type	isBipartite, @function
isBipartite:
.LFB8:
	.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	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -20[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, color[rip]
	mov	DWORD PTR [rdx+rax], -1
	add	DWORD PTR -20[rbp], 1
.L9:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L10
	mov	edi, 4008
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	DWORD PTR -12[rbp], 0
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, color[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	Enqueue
	jmp	.L11
.L17:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	Dequeue
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L12
.L16:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	imul	rdx, rax, 4000
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	cmp	eax, 1
	jne	.L13
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, color[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	eax, -1
	jne	.L13
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, color[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	sete	al
	movzx	eax, al
	mov	edx, DWORD PTR -16[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, color[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	Enqueue
	jmp	.L14
.L13:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	imul	rdx, rax, 4000
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	cmp	eax, 1
	jne	.L14
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, color[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, color[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jne	.L14
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR a[rip], eax
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR b[rip], eax
	mov	eax, 0
	jmp	.L15
.L14:
	add	DWORD PTR -16[rbp], 1
.L12:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L16
.L11:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	edx, eax
	jne	.L17
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 1
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	isBipartite, .-isBipartite
	.globl	isReachable
	.type	isReachable, @function
isReachable:
.LFB9:
	.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -40[rbp], ecx
	mov	DWORD PTR -44[rbp], r8d
	mov	DWORD PTR -48[rbp], r9d
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jne	.L19
	mov	edx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	Enqueue
	mov	eax, 1
	jmp	.L18
.L19:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L21
.L23:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	imul	rdx, rax, 4000
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	cmp	eax, 1
	jne	.L22
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	je	.L22
	mov	r8d, DWORD PTR -40[rbp]
	mov	edi, DWORD PTR -44[rbp]
	mov	ecx, DWORD PTR -4[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r9d, r8d
	mov	r8d, edi
	mov	rdi, rax
	call	isReachable
	test	al, al
	je	.L22
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	Enqueue
	mov	eax, 1
	jmp	.L18
.L22:
	add	DWORD PTR -4[rbp], 1
.L21:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L23
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	isReachable, .-isReachable
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d "
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	r11, -3997696[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 2368
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -4000060[rbp]
	lea	rax, -4000056[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -4000044[rbp], 0
	jmp	.L25
.L28:
	mov	DWORD PTR -4000040[rbp], 0
	jmp	.L26
.L27:
	mov	eax, DWORD PTR -4000040[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -4000044[rbp]
	cdqe
	imul	rax, rax, 1000
	add	rax, rdx
	mov	DWORD PTR -4000016[rbp+rax*4], 0
	add	DWORD PTR -4000040[rbp], 1
.L26:
	mov	eax, DWORD PTR -4000056[rbp]
	cmp	DWORD PTR -4000040[rbp], eax
	jl	.L27
	add	DWORD PTR -4000044[rbp], 1
.L25:
	mov	eax, DWORD PTR -4000056[rbp]
	cmp	DWORD PTR -4000044[rbp], eax
	jl	.L28
	mov	DWORD PTR -4000036[rbp], 0
	jmp	.L29
.L30:
	lea	rdx, -4000048[rbp]
	lea	rax, -4000052[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -4000048[rbp]
	mov	edx, DWORD PTR -4000052[rbp]
	movsx	rsi, edx
	movsx	rcx, eax
	imul	rcx, rcx, 1000
	add	rcx, rsi
	mov	DWORD PTR -4000016[rbp+rcx*4], 1
	mov	ecx, DWORD PTR -4000052[rbp]
	mov	esi, DWORD PTR -4000048[rbp]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 1000
	add	rax, rdx
	mov	eax, DWORD PTR -4000016[rbp+rax*4]
	movsx	rsi, esi
	movsx	rdx, ecx
	imul	rdx, rdx, 1000
	add	rdx, rsi
	mov	DWORD PTR -4000016[rbp+rdx*4], eax
	add	DWORD PTR -4000036[rbp], 1
.L29:
	mov	eax, DWORD PTR -4000060[rbp]
	cmp	DWORD PTR -4000036[rbp], eax
	jl	.L30
	mov	edx, DWORD PTR -4000056[rbp]
	lea	rax, -4000016[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	isBipartite
	test	al, al
	je	.L31
	mov	DWORD PTR -4000032[rbp], 0
	jmp	.L32
.L34:
	mov	eax, DWORD PTR -4000032[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, color[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L33
	mov	eax, DWORD PTR -4000032[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L33:
	add	DWORD PTR -4000032[rbp], 1
.L32:
	mov	eax, DWORD PTR -4000056[rbp]
	cmp	DWORD PTR -4000032[rbp], eax
	jl	.L34
	mov	edi, 10
	call	putchar@PLT
	mov	DWORD PTR -4000028[rbp], 0
	jmp	.L35
.L37:
	mov	eax, DWORD PTR -4000028[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, color[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	eax, 1
	jne	.L36
	mov	eax, DWORD PTR -4000028[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L36:
	add	DWORD PTR -4000028[rbp], 1
.L35:
	mov	eax, DWORD PTR -4000056[rbp]
	cmp	DWORD PTR -4000028[rbp], eax
	jl	.L37
	jmp	.L43
.L31:
	mov	edi, 4008
	call	malloc@PLT
	mov	QWORD PTR -4000024[rbp], rax
	mov	rax, QWORD PTR -4000024[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -4000024[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -4000024[rbp]
	mov	DWORD PTR [rax], edx
	mov	r8d, DWORD PTR b[rip]
	mov	edi, DWORD PTR b[rip]
	mov	ecx, DWORD PTR a[rip]
	mov	edx, DWORD PTR -4000056[rbp]
	lea	rsi, -4000016[rbp]
	mov	rax, QWORD PTR -4000024[rbp]
	mov	r9d, r8d
	mov	r8d, edi
	mov	rdi, rax
	call	isReachable
	test	al, al
	je	.L39
	jmp	.L40
.L41:
	mov	rax, QWORD PTR -4000024[rbp]
	mov	rdi, rax
	call	Dequeue
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L40:
	mov	rax, QWORD PTR -4000024[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -4000024[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	edx, eax
	jne	.L41
.L39:
	mov	rax, QWORD PTR -4000024[rbp]
	mov	rdi, rax
	call	free@PLT
.L43:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"23574297.c"
	.text
	.comm	color,4000,4
	.comm	a,4,4
	.comm	b,4,4
	.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
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	add	r2, r2, #2
	ldr	r1, [fp, #-12]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, .L5
	cmp	r3, r2
	bne	.L2
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	b	.L4
.L2:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
.L4:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L6:
	.align	2
.L5:
	.word	999
	.size	Enqueue, .-Enqueue
	.align	2
	.global	Dequeue
	.syntax unified
	.arm
	.fpu softvfp
	.type	Dequeue, %function
Dequeue:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, .L10
	cmp	r3, r2
	bne	.L8
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4004]
	b	.L9
.L8:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-8]
	add	r2, r2, #2
	ldr	r3, [r3, r2, lsl #2]
.L9:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L11:
	.align	2
.L10:
	.word	999
	.size	Dequeue, .-Dequeue
	.align	2
	.global	isBipartite
	.syntax unified
	.arm
	.fpu softvfp
	.type	isBipartite, %function
isBipartite:
	@ 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]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L13
.L14:
	ldr	r2, .L22
	ldr	r3, [fp, #-20]
	mvn	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L13:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L14
	ldr	r0, .L22+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r2, .L22
	ldr	r3, [fp, #-8]
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	Enqueue
	b	.L15
.L21:
	ldr	r0, [fp, #-12]
	bl	Dequeue
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L16
.L20:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #5
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #1
	bne	.L17
	ldr	r2, .L22
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	cmn	r3, #1
	bne	.L17
	ldr	r2, .L22
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r1, r3
	ldr	r2, .L22
	ldr	r3, [fp, #-16]
	str	r1, [r2, r3, lsl #2]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	Enqueue
	b	.L18
.L17:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #5
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #1
	bne	.L18
	ldr	r2, .L22
	ldr	r3, [fp, #-16]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L22
	ldr	r3, [fp, #-8]
	ldr	r3, [r1, r3, lsl #2]
	cmp	r2, r3
	bne	.L18
	ldr	r2, .L22+8
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r2, .L22+12
	ldr	r3, [fp, #-16]
	str	r3, [r2]
	mov	r3, #0
	b	.L19
.L18:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L16:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L20
.L15:
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L21
	ldr	r0, [fp, #-12]
	bl	free
	mov	r3, #1
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	color
	.word	4008
	.word	a
	.word	b
	.size	isBipartite, .-isBipartite
	.align	2
	.global	isReachable
	.syntax unified
	.arm
	.fpu softvfp
	.type	isReachable, %function
isReachable:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	bne	.L25
	ldr	r1, [fp, #4]
	ldr	r0, [fp, #-16]
	bl	Enqueue
	mov	r3, #1
	b	.L24
.L25:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L27
.L29:
	ldr	r2, [fp, #-28]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #5
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #1
	bne	.L28
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #8]
	cmp	r2, r3
	beq	.L28
	ldr	r3, [fp, #-28]
	str	r3, [sp, #4]
	ldr	r3, [fp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	isReachable
	mov	r3, r0
	cmp	r3, #0
	beq	.L28
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-16]
	bl	Enqueue
	mov	r3, #1
	b	.L24
.L28:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L27:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L29
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	isReachable, .-isReachable
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d %d\000"
	.align	2
.LC1:
	.ascii	"%d \000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4000048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #3997696
	sub	sp, sp, #2352
	sub	sp, sp, #12
	ldr	r3, .L50
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r2, .L50+4
	sub	r3, fp, #12
	add	r2, r3, r2
	ldr	r3, .L50+8
	sub	r1, fp, #12
	add	r3, r1, r3
	mov	r1, r3
	ldr	r0, .L50+12
	bl	__isoc99_scanf
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2332]
	b	.L31
.L34:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2328]
	b	.L32
.L33:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r2, [r3, #-2332]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	ldr	r2, [r2, #-2328]
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r2, #0
	str	r2, [r3, #-2308]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2328]
	add	r3, r3, #1
	str	r3, [r2, #-2328]
.L32:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2344]
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	ldr	r2, [r2, #-2328]
	cmp	r2, r3
	blt	.L33
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2332]
	add	r3, r3, #1
	str	r3, [r2, #-2332]
.L31:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2344]
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	ldr	r2, [r2, #-2332]
	cmp	r2, r3
	blt	.L34
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2324]
	b	.L35
.L36:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	sub	r3, r3, #2336
	ldr	r1, .L50+16
	sub	r2, fp, #12
	add	r1, r2, r1
	mov	r2, r3
	ldr	r0, .L50+12
	bl	__isoc99_scanf
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r2, [r3, #-2336]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r0, [r3, #-2340]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r1, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r0
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r1, #1
	str	r1, [r3, #-2308]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r1, [r3, #-2340]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	ip, [r3, #-2336]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	lr, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r0
	lsl	r3, r3, #2
	add	r3, lr, r3
	ldr	r2, [r3, #-2308]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, r1
	lsl	r3, r3, #5
	sub	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #3
	add	r3, r3, ip
	lsl	r3, r3, #2
	add	r3, r0, r3
	str	r2, [r3, #-2308]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2324]
	add	r3, r3, #1
	str	r3, [r2, #-2324]
.L35:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2348]
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	ldr	r2, [r2, #-2324]
	cmp	r2, r3
	blt	.L36
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r2, [r3, #-2344]
	ldr	r3, .L50+20
	sub	r1, fp, #12
	add	r3, r1, r3
	mov	r1, r2
	mov	r0, r3
	bl	isBipartite
	mov	r3, r0
	cmp	r3, #0
	beq	.L37
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2320]
	b	.L38
.L40:
	ldr	r2, .L50+24
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2320]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L39
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r1, [r3, #-2320]
	ldr	r0, .L50+28
	bl	printf
.L39:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2320]
	add	r3, r3, #1
	str	r3, [r2, #-2320]
.L38:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2344]
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	ldr	r2, [r2, #-2320]
	cmp	r2, r3
	blt	.L40
	mov	r0, #10
	bl	putchar
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-2316]
	b	.L41
.L43:
	ldr	r2, .L50+24
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2316]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #1
	bne	.L42
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r1, [r3, #-2316]
	ldr	r0, .L50+28
	bl	printf
.L42:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2316]
	add	r3, r3, #1
	str	r3, [r2, #-2316]
.L41:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2344]
	sub	r2, fp, #3997696
	sub	r2, r2, #12
	ldr	r2, [r2, #-2316]
	cmp	r2, r3
	blt	.L43
	b	.L49
.L37:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r0, .L50+32
	bl	malloc
	mov	r3, r0
	str	r3, [r4, #-2312]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2312]
	mov	r2, #0
	str	r2, [r3, #4]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2312]
	ldr	r2, [r3, #4]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2312]
	str	r2, [r3]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r0, [r3, #-2344]
	ldr	r3, .L50+36
	ldr	ip, [r3]
	ldr	r3, .L50+40
	ldr	r3, [r3]
	ldr	r2, .L50+40
	ldr	r2, [r2]
	ldr	r1, .L50+20
	sub	lr, fp, #12
	add	r1, lr, r1
	sub	lr, fp, #3997696
	sub	lr, lr, #12
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r0, [lr, #-2312]
	bl	isReachable
	mov	r3, r0
	cmp	r3, #0
	beq	.L45
	b	.L46
.L47:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r0, [r3, #-2312]
	bl	Dequeue
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L50+28
	bl	printf
.L46:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2312]
	ldr	r2, [r3]
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r3, [r3, #-2312]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L47
.L45:
	sub	r3, fp, #3997696
	sub	r3, r3, #12
	ldr	r0, [r3, #-2312]
	bl	free
.L49:
	nop
	ldr	r3, .L50
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L48
	bl	__stack_chk_fail
.L48:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L51:
	.align	2
.L50:
	.word	.LC2
	.word	-4000044
	.word	-4000040
	.word	.LC0
	.word	-4000036
	.word	-4000004
	.word	color
	.word	.LC1
	.word	4008
	.word	a
	.word	b
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
