	.file	"44192.c"
	.intel_syntax noprefix
	.text
	.globl	init_queue
	.type	init_queue, @function
init_queue:
.LFB0:
	.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	DWORD PTR 8000[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8004[rax], 999
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8008[rax], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	init_queue, .-init_queue
	.globl	enqueue
	.type	enqueue, @function
enqueue:
.LFB1:
	.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	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8004[rax]
	lea	edx, 1[rax]
	movsx	rax, edx
	imul	rax, rax, 274877907
	shr	rax, 32
	sar	eax, 6
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 1000
	mov	eax, edx
	sub	eax, ecx
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 8004[rdx], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8004[rax]
	mov	rax, QWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	rcx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax+rdx*8], rcx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8008[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8008[rax], edx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	enqueue, .-enqueue
	.globl	dequeue
	.type	dequeue, @function
dequeue:
.LFB2:
	.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 -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8000[rax]
	mov	rax, QWORD PTR -24[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8000[rax]
	lea	edx, 1[rax]
	movsx	rax, edx
	imul	rax, rax, 274877907
	shr	rax, 32
	sar	eax, 6
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 1000
	mov	eax, edx
	sub	eax, ecx
	mov	rdx, QWORD PTR -24[rbp]
	mov	DWORD PTR 8000[rdx], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8008[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 8008[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	dequeue, .-dequeue
	.globl	empty
	.type	empty, @function
empty:
.LFB3:
	.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 8008[rax]
	test	eax, eax
	jg	.L6
	mov	eax, 1
	jmp	.L7
.L6:
	mov	eax, 0
.L7:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	empty, .-empty
	.globl	see_back
	.type	see_back, @function
see_back:
.LFB4:
	.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 -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8004[rax]
	mov	rax, QWORD PTR -24[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	see_back, .-see_back
	.globl	see_front
	.type	see_front, @function
see_front:
.LFB5:
	.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 -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8000[rax]
	mov	rax, QWORD PTR -24[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	see_front, .-see_front
	.globl	turn_queue
	.type	turn_queue, @function
turn_queue:
.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	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8000[rax]
	lea	edx, 999[rax]
	movsx	rax, edx
	imul	rax, rax, 274877907
	shr	rax, 32
	sar	eax, 6
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 1000
	mov	eax, edx
	sub	eax, ecx
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 8000[rdx], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, DWORD PTR 8004[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8000[rax]
	mov	rax, QWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	rcx, QWORD PTR -8[rbp]
	movsx	rsi, esi
	mov	rcx, QWORD PTR [rcx+rsi*8]
	mov	QWORD PTR [rax+rdx*8], rcx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8004[rax]
	lea	edx, 999[rax]
	movsx	rax, edx
	imul	rax, rax, 274877907
	shr	rax, 32
	sar	eax, 6
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 1000
	mov	eax, edx
	sub	eax, ecx
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 8004[rdx], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	turn_queue, .-turn_queue
	.section	.rodata
.LC0:
	.string	"%d %d\n"
	.text
	.globl	print_queue
	.type	print_queue, @function
print_queue:
.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	QWORD PTR -24[rbp], rdi
	jmp	.L14
.L15:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dequeue
	mov	QWORD PTR -8[rbp], rax
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L14:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	empty
	test	al, al
	je	.L15
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	print_queue, .-print_queue
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %d"
	.text
	.globl	read_graph
	.type	read_graph, @function
read_graph:
.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	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16[rbp], 1
	jmp	.L17
.L20:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -16[rbp]
	movsx	rdx, edx
	add	rdx, 2600
	mov	DWORD PTR 4[rax+rdx*4], 0
	mov	DWORD PTR -12[rbp], 1
	jmp	.L18
.L19:
	mov	rdx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	mov	rcx, rax
	sal	rcx, 4
	add	rax, rcx
	add	rax, rsi
	mov	DWORD PTR [rdx+rax*4], 0
	add	DWORD PTR -12[rbp], 1
.L18:
	cmp	DWORD PTR -12[rbp], 50
	jle	.L19
	add	DWORD PTR -16[rbp], 1
.L17:
	cmp	DWORD PTR -16[rbp], 50
	jle	.L20
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 10608
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdx, -20[rbp]
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -24[rbp]
	mov	ecx, DWORD PTR -20[rbp]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	r8, ecx
	movsx	rdi, edx
	mov	rax, rdi
	add	rax, rax
	add	rax, rdi
	mov	rdi, rax
	sal	rdi, 4
	add	rax, rdi
	add	rax, r8
	mov	eax, DWORD PTR [rsi+rax*4]
	lea	edi, 1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	rcx, ecx
	movsx	rdx, edx
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	mov	DWORD PTR [rsi+rax*4], edi
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	r8, ecx
	movsx	rdi, edx
	mov	rax, rdi
	add	rax, rax
	add	rax, rdi
	mov	rdi, rax
	sal	rdi, 4
	add	rax, rdi
	add	rax, r8
	mov	eax, DWORD PTR [rsi+rax*4]
	lea	edi, 1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	rcx, ecx
	movsx	rdx, edx
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	mov	DWORD PTR [rsi+rax*4], edi
	mov	eax, DWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	movsx	rcx, eax
	add	rcx, 2600
	mov	edx, DWORD PTR 4[rdx+rcx*4]
	lea	ecx, 1[rdx]
	mov	rdx, QWORD PTR -40[rbp]
	cdqe
	add	rax, 2600
	mov	DWORD PTR 4[rdx+rax*4], ecx
	mov	eax, DWORD PTR -20[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	movsx	rcx, eax
	add	rcx, 2600
	mov	edx, DWORD PTR 4[rdx+rcx*4]
	lea	ecx, 1[rdx]
	mov	rdx, QWORD PTR -40[rbp]
	cdqe
	add	rax, 2600
	mov	DWORD PTR 4[rdx+rax*4], ecx
	mov	edx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	DWORD PTR -16[rbp], 1
	jmp	.L21
.L22:
	lea	rdx, -20[rbp]
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -24[rbp]
	mov	ecx, DWORD PTR -20[rbp]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	r8, ecx
	movsx	rdi, edx
	mov	rax, rdi
	add	rax, rax
	add	rax, rdi
	mov	rdi, rax
	sal	rdi, 4
	add	rax, rdi
	add	rax, r8
	mov	eax, DWORD PTR [rsi+rax*4]
	lea	edi, 1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	rcx, ecx
	movsx	rdx, edx
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	mov	DWORD PTR [rsi+rax*4], edi
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	r8, ecx
	movsx	rdi, edx
	mov	rax, rdi
	add	rax, rax
	add	rax, rdi
	mov	rdi, rax
	sal	rdi, 4
	add	rax, rdi
	add	rax, r8
	mov	eax, DWORD PTR [rsi+rax*4]
	lea	edi, 1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	rcx, ecx
	movsx	rdx, edx
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	mov	DWORD PTR [rsi+rax*4], edi
	mov	eax, DWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	movsx	rcx, eax
	add	rcx, 2600
	mov	edx, DWORD PTR 4[rdx+rcx*4]
	lea	ecx, 1[rdx]
	mov	rdx, QWORD PTR -40[rbp]
	cdqe
	add	rax, 2600
	mov	DWORD PTR 4[rdx+rax*4], ecx
	mov	eax, DWORD PTR -20[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	movsx	rcx, eax
	add	rcx, 2600
	mov	edx, DWORD PTR 4[rdx+rcx*4]
	lea	ecx, 1[rdx]
	mov	rdx, QWORD PTR -40[rbp]
	cdqe
	add	rax, 2600
	mov	DWORD PTR 4[rdx+rax*4], ecx
	add	DWORD PTR -16[rbp], 1
.L21:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 10608[rax]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L22
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	read_graph, .-read_graph
	.globl	check_parity
	.type	check_parity, @function
check_parity:
.LFB9:
	.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 -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 1
	jmp	.L25
.L28:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	add	rdx, 2600
	mov	eax, DWORD PTR 4[rax+rdx*4]
	and	eax, 1
	test	eax, eax
	je	.L26
	mov	eax, 0
	jmp	.L27
.L26:
	add	DWORD PTR -4[rbp], 1
.L25:
	cmp	DWORD PTR -4[rbp], 50
	jle	.L28
	mov	eax, 1
.L27:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	check_parity, .-check_parity
	.globl	search_edge
	.type	search_edge, @function
search_edge:
.LFB10:
	.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 -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 1
	jmp	.L30
.L33:
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	mov	rcx, rax
	sal	rcx, 4
	add	rax, rcx
	add	rax, rsi
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	je	.L31
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L32
.L31:
	add	DWORD PTR -4[rbp], 1
.L30:
	cmp	DWORD PTR -4[rbp], 50
	jle	.L33
	mov	eax, -1
.L32:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	search_edge, .-search_edge
	.globl	discovered
	.bss
	.align 32
	.type	discovered, @object
	.size	discovered, 51
discovered:
	.zero	51
	.text
	.globl	euler_cycle
	.type	euler_cycle, @function
euler_cycle:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 56
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	DWORD PTR -24[rbp], 1
	jmp	.L35
.L36:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, discovered[rip]
	mov	BYTE PTR [rax+rdx], 0
	add	DWORD PTR -24[rbp], 1
.L35:
	cmp	DWORD PTR -24[rbp], 50
	jle	.L36
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	init_queue
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR [rdx]
	mov	rdi, rax
	call	enqueue
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, discovered[rip]
	mov	BYTE PTR [rax+rdx], 1
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	lea	rdx, discovered[rip]
	mov	BYTE PTR [rax+rdx], 1
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	r8, ecx
	movsx	rdi, edx
	mov	rax, rdi
	add	rax, rax
	add	rax, rdi
	mov	rdi, rax
	sal	rdi, 4
	add	rax, rdi
	add	rax, r8
	mov	eax, DWORD PTR [rsi+rax*4]
	lea	edi, -1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	rcx, ecx
	movsx	rdx, edx
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	mov	DWORD PTR [rsi+rax*4], edi
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	r8, ecx
	movsx	rdi, edx
	mov	rax, rdi
	add	rax, rax
	add	rax, rdi
	mov	rdi, rax
	sal	rdi, 4
	add	rax, rdi
	add	rax, r8
	mov	eax, DWORD PTR [rsi+rax*4]
	lea	edi, -1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	rcx, ecx
	movsx	rdx, edx
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	mov	DWORD PTR [rsi+rax*4], edi
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rdx, QWORD PTR -40[rbp]
	movsx	rcx, eax
	add	rcx, 2600
	mov	edx, DWORD PTR 4[rdx+rcx*4]
	lea	ecx, -1[rdx]
	mov	rdx, QWORD PTR -40[rbp]
	cdqe
	add	rax, 2600
	mov	DWORD PTR 4[rdx+rax*4], ecx
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	rdx, QWORD PTR -40[rbp]
	movsx	rcx, eax
	add	rcx, 2600
	mov	edx, DWORD PTR 4[rdx+rcx*4]
	lea	ecx, -1[rdx]
	mov	rdx, QWORD PTR -40[rbp]
	cdqe
	add	rax, 2600
	mov	DWORD PTR 4[rdx+rax*4], ecx
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 10608[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 10608[rax], edx
	jmp	.L37
.L46:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	see_back
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	search_edge
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, -1
	jne	.L38
	mov	eax, 0
	jmp	.L48
.L38:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	enqueue
	mov	edx, DWORD PTR -16[rbp]
	mov	ecx, DWORD PTR -12[rbp]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	r8, ecx
	movsx	rdi, edx
	mov	rax, rdi
	add	rax, rax
	add	rax, rdi
	mov	rdi, rax
	sal	rdi, 4
	add	rax, rdi
	add	rax, r8
	mov	eax, DWORD PTR [rsi+rax*4]
	lea	edi, -1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	rcx, ecx
	movsx	rdx, edx
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	mov	DWORD PTR [rsi+rax*4], edi
	mov	edx, DWORD PTR -12[rbp]
	mov	ecx, DWORD PTR -16[rbp]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	r8, ecx
	movsx	rdi, edx
	mov	rax, rdi
	add	rax, rax
	add	rax, rdi
	mov	rdi, rax
	sal	rdi, 4
	add	rax, rdi
	add	rax, r8
	mov	eax, DWORD PTR [rsi+rax*4]
	lea	edi, -1[rax]
	mov	rsi, QWORD PTR -40[rbp]
	movsx	rcx, ecx
	movsx	rdx, edx
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rax, rdx
	add	rax, rcx
	mov	DWORD PTR [rsi+rax*4], edi
	mov	eax, DWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	movsx	rcx, eax
	add	rcx, 2600
	mov	edx, DWORD PTR 4[rdx+rcx*4]
	lea	ecx, -1[rdx]
	mov	rdx, QWORD PTR -40[rbp]
	cdqe
	add	rax, 2600
	mov	DWORD PTR 4[rdx+rax*4], ecx
	mov	eax, DWORD PTR -12[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	movsx	rcx, eax
	add	rcx, 2600
	mov	edx, DWORD PTR 4[rdx+rcx*4]
	lea	ecx, -1[rdx]
	mov	rdx, QWORD PTR -40[rbp]
	cdqe
	add	rax, 2600
	mov	DWORD PTR 4[rdx+rax*4], ecx
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 10608[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 10608[rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 10608[rax]
	test	eax, eax
	je	.L49
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, discovered[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	test	al, al
	je	.L42
	mov	DWORD PTR -20[rbp], 0
	jmp	.L43
.L45:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8008[rax]
	sub	eax, 1
	cmp	DWORD PTR -20[rbp], eax
	jne	.L44
	mov	eax, 0
	jmp	.L48
.L44:
	add	DWORD PTR -20[rbp], 1
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	turn_queue
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	see_back
	mov	QWORD PTR -16[rbp], rax
.L43:
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -40[rbp]
	movsx	rdx, edx
	add	rdx, 2600
	mov	eax, DWORD PTR 4[rax+rdx*4]
	test	eax, eax
	je	.L45
	jmp	.L37
.L42:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, discovered[rip]
	mov	BYTE PTR [rax+rdx], 1
.L37:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 10608[rax]
	test	eax, eax
	jne	.L46
	jmp	.L41
.L49:
	nop
.L41:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	see_front
	mov	QWORD PTR -8[rbp], rax
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	cmp	edx, eax
	je	.L47
	mov	eax, 0
	jmp	.L48
.L47:
	mov	eax, 1
.L48:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	euler_cycle, .-euler_cycle
	.section	.rodata
.LC3:
	.string	"Case #%d\n"
.LC4:
	.string	"some beads may be lost"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	r11, -16384[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 2288
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -18656[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -18652[rbp], 1
	jmp	.L51
.L56:
	lea	rdx, -18648[rbp]
	lea	rax, -10624[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	read_graph
	lea	rax, -10624[rbp]
	mov	rdi, rax
	call	check_parity
	mov	BYTE PTR -18657[rbp], al
	cmp	BYTE PTR -18657[rbp], 0
	je	.L52
	lea	rdx, -18640[rbp]
	lea	rcx, -18648[rbp]
	lea	rax, -10624[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	euler_cycle
	mov	BYTE PTR -18657[rbp], al
.L52:
	mov	eax, DWORD PTR -18652[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	BYTE PTR -18657[rbp], 0
	jne	.L53
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L54
.L53:
	lea	rax, -18640[rbp]
	mov	rdi, rax
	call	print_queue
.L54:
	mov	eax, DWORD PTR -18656[rbp]
	cmp	DWORD PTR -18652[rbp], eax
	jge	.L55
	mov	edi, 10
	call	putchar@PLT
.L55:
	add	DWORD PTR -18652[rbp], 1
.L51:
	mov	eax, DWORD PTR -18656[rbp]
	cmp	DWORD PTR -18652[rbp], eax
	jle	.L56
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L58
	call	__stack_chk_fail@PLT
.L58:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	"44192.c"
	.text
	.align	2
	.global	init_queue
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_queue, %function
init_queue:
	@ 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]
	add	r3, r3, #4096
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #3904]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4096
	mov	r2, r3
	ldr	r3, .L2
	str	r3, [r2, #3908]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4096
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #3912]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L3:
	.align	2
.L2:
	.word	999
	.size	init_queue, .-init_queue
	.align	2
	.global	enqueue
	.syntax unified
	.arm
	.fpu softvfp
	.type	enqueue, %function
enqueue:
	@ 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, #-8]
	sub	r3, fp, #16
	stm	r3, {r1, r2}
	ldr	r3, [fp, #-8]
	add	r3, r3, #4096
	ldr	r3, [r3, #3908]
	add	r1, r3, #1
	ldr	r3, .L5
	smull	r2, r3, r1, r3
	asr	r2, r3, #6
	asr	r3, r1, #31
	sub	r2, r2, r3
	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, r1, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, #4096
	str	r2, [r3, #3908]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4096
	ldr	r3, [r3, #3908]
	ldr	r2, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r2, fp, #16
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r3, [fp, #-8]
	add	r3, r3, #4096
	ldr	r3, [r3, #3912]
	add	r3, r3, #1
	ldr	r2, [fp, #-8]
	add	r2, r2, #4096
	str	r3, [r2, #3912]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L6:
	.align	2
.L5:
	.word	274877907
	.size	enqueue, .-enqueue
	.align	2
	.global	dequeue
	.syntax unified
	.arm
	.fpu softvfp
	.type	dequeue, %function
dequeue:
	@ 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]
	ldr	r3, [fp, #-20]
	add	r3, r3, #4096
	ldr	r3, [r3, #3904]
	ldr	r1, [fp, #-20]
	sub	r2, fp, #12
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r3, [fp, #-20]
	add	r3, r3, #4096
	ldr	r3, [r3, #3904]
	add	r1, r3, #1
	ldr	r3, .L9
	smull	r2, r3, r1, r3
	asr	r2, r3, #6
	asr	r3, r1, #31
	sub	r2, r2, r3
	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, r1, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, #4096
	str	r2, [r3, #3904]
	ldr	r3, [fp, #-20]
	add	r3, r3, #4096
	ldr	r3, [r3, #3912]
	sub	r3, r3, #1
	ldr	r2, [fp, #-20]
	add	r2, r2, #4096
	str	r3, [r2, #3912]
	ldr	r3, [fp, #-16]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r0, [fp, #-16]
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L10:
	.align	2
.L9:
	.word	274877907
	.size	dequeue, .-dequeue
	.align	2
	.global	empty
	.syntax unified
	.arm
	.fpu softvfp
	.type	empty, %function
empty:
	@ 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]
	add	r3, r3, #4096
	ldr	r3, [r3, #3912]
	cmp	r3, #0
	bgt	.L12
	mov	r3, #1
	b	.L13
.L12:
	mov	r3, #0
.L13:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	empty, .-empty
	.align	2
	.global	see_back
	.syntax unified
	.arm
	.fpu softvfp
	.type	see_back, %function
see_back:
	@ 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]
	ldr	r3, [fp, #-20]
	add	r3, r3, #4096
	ldr	r3, [r3, #3908]
	ldr	r1, [fp, #-20]
	sub	r2, fp, #12
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r3, [fp, #-16]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r0, [fp, #-16]
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	see_back, .-see_back
	.align	2
	.global	see_front
	.syntax unified
	.arm
	.fpu softvfp
	.type	see_front, %function
see_front:
	@ 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]
	ldr	r3, [fp, #-20]
	add	r3, r3, #4096
	ldr	r3, [r3, #3904]
	ldr	r1, [fp, #-20]
	sub	r2, fp, #12
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r3, [fp, #-16]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r0, [fp, #-16]
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	see_front, .-see_front
	.align	2
	.global	turn_queue
	.syntax unified
	.arm
	.fpu softvfp
	.type	turn_queue, %function
turn_queue:
	@ 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]
	add	r3, r3, #4096
	ldr	r3, [r3, #3904]
	add	r2, r3, #996
	add	r2, r2, #3
	ldr	r3, .L19
	smull	r1, r3, r2, r3
	asr	r1, r3, #6
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #5
	sub	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #3
	sub	r1, r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, #4096
	str	r1, [r3, #3904]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4096
	ldr	r2, [r3, #3908]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4096
	ldr	r3, [r3, #3904]
	ldr	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r0, r3
	lsl	r2, r2, #3
	add	r2, r1, r2
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r3, [fp, #-8]
	add	r3, r3, #4096
	ldr	r3, [r3, #3908]
	add	r2, r3, #996
	add	r2, r2, #3
	ldr	r3, .L19
	smull	r1, r3, r2, r3
	asr	r1, r3, #6
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #5
	sub	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #3
	sub	r1, r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, #4096
	str	r1, [r3, #3908]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L20:
	.align	2
.L19:
	.word	274877907
	.size	turn_queue, .-turn_queue
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d %d\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	print_queue
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_queue, %function
print_queue:
	@ 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]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L22
.L23:
	sub	r3, fp, #16
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	dequeue
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L25+4
	bl	printf
.L22:
	ldr	r0, [fp, #-24]
	bl	empty
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	nop
	ldr	r3, .L25
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC1
	.word	.LC0
	.size	print_queue, .-print_queue
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"%d %d\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_graph
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_graph, %function
read_graph:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L35
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L28
.L31:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-16]
	add	r3, r3, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #4]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L29
.L30:
	ldr	r1, [fp, #-32]
	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
	mov	r2, #0
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L29:
	ldr	r3, [fp, #-12]
	cmp	r3, #50
	ble	.L30
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L28:
	ldr	r3, [fp, #-16]
	cmp	r3, #50
	ble	.L31
	ldr	r3, [fp, #-32]
	add	r3, r3, #10560
	add	r3, r3, #48
	mov	r1, r3
	ldr	r0, .L35+4
	bl	__isoc99_scanf
	sub	r2, fp, #20
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L35+8
	bl	__isoc99_scanf
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	ip, r3, #4
	add	r3, r3, ip
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	add	ip, r3, #1
	ldr	r0, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	add	r3, r3, r1
	str	ip, [r0, r3, lsl #2]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	ip, r3, #4
	add	r3, r3, ip
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	add	ip, r3, #1
	ldr	r0, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	add	r3, r3, r1
	str	ip, [r0, r3, lsl #2]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-32]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	add	r1, r3, #1
	ldr	r0, [fp, #-32]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r0, r3
	str	r1, [r3, #4]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-32]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	add	r1, r3, #1
	ldr	r0, [fp, #-32]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r0, r3
	str	r1, [r3, #4]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-36]
	str	r2, [r3]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-36]
	str	r2, [r3, #4]
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L32
.L33:
	sub	r2, fp, #20
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L35+8
	bl	__isoc99_scanf
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	ip, r3, #4
	add	r3, r3, ip
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	add	ip, r3, #1
	ldr	r0, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	add	r3, r3, r1
	str	ip, [r0, r3, lsl #2]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	ip, r3, #4
	add	r3, r3, ip
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	add	ip, r3, #1
	ldr	r0, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	add	r3, r3, r1
	str	ip, [r0, r3, lsl #2]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-32]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	add	r1, r3, #1
	ldr	r0, [fp, #-32]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r0, r3
	str	r1, [r3, #4]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-32]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	add	r1, r3, #1
	ldr	r0, [fp, #-32]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r0, r3
	str	r1, [r3, #4]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L32:
	ldr	r3, [fp, #-32]
	add	r3, r3, #8192
	ldr	r3, [r3, #2416]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L33
	nop
	ldr	r3, .L35
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L34
	bl	__stack_chk_fail
.L34:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC4
	.word	.LC2
	.word	.LC3
	.size	read_graph, .-read_graph
	.align	2
	.global	check_parity
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_parity, %function
check_parity:
	@ 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]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L38
.L41:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r3, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L39
	mov	r3, #0
	b	.L40
.L39:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L38:
	ldr	r3, [fp, #-8]
	cmp	r3, #50
	ble	.L41
	mov	r3, #1
.L40:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	check_parity, .-check_parity
	.align	2
	.global	search_edge
	.syntax unified
	.arm
	.fpu softvfp
	.type	search_edge, %function
search_edge:
	@ 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	.L43
.L46:
	ldr	r1, [fp, #-16]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	beq	.L44
	ldr	r3, [fp, #-8]
	b	.L45
.L44:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L43:
	ldr	r3, [fp, #-8]
	cmp	r3, #50
	ble	.L46
	mvn	r3, #0
.L45:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	search_edge, .-search_edge
	.comm	discovered,51,4
	.section	.rodata
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	euler_cycle
	.syntax unified
	.arm
	.fpu softvfp
	.type	euler_cycle, %function
euler_cycle:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	ldr	r3, .L64
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L48
.L49:
	ldr	r2, .L64+4
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L48:
	ldr	r3, [fp, #-32]
	cmp	r3, #50
	ble	.L49
	ldr	r0, [fp, #-48]
	bl	init_queue
	ldr	r3, [fp, #-44]
	ldm	r3, {r1, r2}
	ldr	r0, [fp, #-48]
	bl	enqueue
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	ldr	r2, .L64+4
	mov	r1, #1
	strb	r1, [r2, r3]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #4]
	ldr	r2, .L64+4
	mov	r1, #1
	strb	r1, [r2, r3]
	ldr	r3, [fp, #-44]
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	ldr	r1, [r3, #4]
	ldr	r0, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	ip, r3, #4
	add	r3, r3, ip
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	sub	ip, r3, #1
	ldr	r0, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	add	r3, r3, r1
	str	ip, [r0, r3, lsl #2]
	ldr	r3, [fp, #-44]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-44]
	ldr	r1, [r3]
	ldr	r0, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	ip, r3, #4
	add	r3, r3, ip
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	sub	ip, r3, #1
	ldr	r0, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	add	r3, r3, r1
	str	ip, [r0, r3, lsl #2]
	ldr	r3, [fp, #-44]
	ldr	r2, [r3]
	ldr	r1, [fp, #-40]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	sub	r1, r3, #1
	ldr	r0, [fp, #-40]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r0, r3
	str	r1, [r3, #4]
	ldr	r3, [fp, #-44]
	ldr	r2, [r3, #4]
	ldr	r1, [fp, #-40]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	sub	r1, r3, #1
	ldr	r0, [fp, #-40]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r0, r3
	str	r1, [r3, #4]
	ldr	r3, [fp, #-40]
	add	r3, r3, #8192
	ldr	r3, [r3, #2416]
	sub	r3, r3, #1
	ldr	r2, [fp, #-40]
	add	r2, r2, #8192
	str	r3, [r2, #2416]
	b	.L50
.L59:
	sub	r3, fp, #24
	ldr	r1, [fp, #-48]
	mov	r0, r3
	bl	see_back
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	search_edge
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L51
	mov	r3, #0
	b	.L61
.L51:
	sub	r3, fp, #24
	ldm	r3, {r1, r2}
	ldr	r0, [fp, #-48]
	bl	enqueue
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	ip, r3, #4
	add	r3, r3, ip
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	sub	ip, r3, #1
	ldr	r0, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	add	r3, r3, r1
	str	ip, [r0, r3, lsl #2]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	ip, r3, #4
	add	r3, r3, ip
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	sub	ip, r3, #1
	ldr	r0, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	add	r3, r3, r1
	str	ip, [r0, r3, lsl #2]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-40]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	sub	r1, r3, #1
	ldr	r0, [fp, #-40]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r0, r3
	str	r1, [r3, #4]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-40]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	sub	r1, r3, #1
	ldr	r0, [fp, #-40]
	add	r3, r2, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r0, r3
	str	r1, [r3, #4]
	ldr	r3, [fp, #-40]
	add	r3, r3, #8192
	ldr	r3, [r3, #2416]
	sub	r3, r3, #1
	ldr	r2, [fp, #-40]
	add	r2, r2, #8192
	str	r3, [r2, #2416]
	ldr	r3, [fp, #-40]
	add	r3, r3, #8192
	ldr	r3, [r3, #2416]
	cmp	r3, #0
	beq	.L63
	ldr	r3, [fp, #-20]
	ldr	r2, .L64+4
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L55
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L56
.L58:
	ldr	r3, [fp, #-48]
	add	r3, r3, #4096
	ldr	r3, [r3, #3912]
	sub	r3, r3, #1
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L57
	mov	r3, #0
	b	.L61
.L57:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r0, [fp, #-48]
	bl	turn_queue
	sub	r3, fp, #60
	ldr	r1, [fp, #-48]
	mov	r0, r3
	bl	see_back
	sub	r3, fp, #24
	sub	r2, fp, #60
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
.L56:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-40]
	add	r3, r3, #2592
	add	r3, r3, #8
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L58
	b	.L50
.L55:
	ldr	r3, [fp, #-20]
	ldr	r2, .L64+4
	mov	r1, #1
	strb	r1, [r2, r3]
.L50:
	ldr	r3, [fp, #-40]
	add	r3, r3, #8192
	ldr	r3, [r3, #2416]
	cmp	r3, #0
	bne	.L59
	b	.L54
.L63:
	nop
.L54:
	sub	r3, fp, #16
	ldr	r1, [fp, #-48]
	mov	r0, r3
	bl	see_front
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	beq	.L60
	mov	r3, #0
	b	.L61
.L60:
	mov	r3, #1
.L61:
	ldr	r2, .L64
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L62
	bl	__stack_chk_fail
.L62:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L65:
	.align	2
.L64:
	.word	.LC5
	.word	discovered
	.size	euler_cycle, .-euler_cycle
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Case #%d\012\000"
	.align	2
.LC7:
	.ascii	"some beads may be lost\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 18648
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #18432
	sub	sp, sp, #220
	ldr	r3, .L75
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #18432
	sub	r3, r3, #12
	sub	r3, r3, #212
	mov	r1, r3
	ldr	r0, .L75+4
	bl	__isoc99_scanf
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-2256]
	b	.L67
.L72:
	sub	r2, fp, #18432
	sub	r2, r2, #12
	sub	r2, r2, #204
	sub	r3, fp, #10560
	sub	r3, r3, #12
	sub	r3, r3, #56
	mov	r1, r2
	mov	r0, r3
	bl	read_graph
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #10560
	sub	r3, r3, #12
	sub	r3, r3, #56
	mov	r0, r3
	bl	check_parity
	mov	r3, r0
	strb	r3, [r4, #-2261]
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldrb	r3, [r3, #-2261]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L68
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r4, r3
	sub	r2, fp, #18432
	sub	r2, r2, #12
	sub	r2, r2, #196
	sub	r1, fp, #18432
	sub	r1, r1, #12
	sub	r1, r1, #204
	sub	r3, fp, #10560
	sub	r3, r3, #12
	sub	r3, r3, #56
	mov	r0, r3
	bl	euler_cycle
	mov	r3, r0
	strb	r3, [r4, #-2261]
.L68:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r1, [r3, #-2256]
	ldr	r0, .L75+8
	bl	printf
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldrb	r3, [r3, #-2261]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L69
	ldr	r0, .L75+12
	bl	puts
	b	.L70
.L69:
	sub	r3, fp, #18432
	sub	r3, r3, #12
	sub	r3, r3, #196
	mov	r0, r3
	bl	print_queue
.L70:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-2260]
	sub	r2, fp, #16384
	sub	r2, r2, #12
	ldr	r2, [r2, #-2256]
	cmp	r2, r3
	bge	.L71
	mov	r0, #10
	bl	putchar
.L71:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-2256]
	add	r3, r3, #1
	str	r3, [r2, #-2256]
.L67:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-2260]
	sub	r2, fp, #16384
	sub	r2, r2, #12
	ldr	r2, [r2, #-2256]
	cmp	r2, r3
	ble	.L72
	mov	r3, #0
	ldr	r2, .L75
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L74
	bl	__stack_chk_fail
.L74:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L76:
	.align	2
.L75:
	.word	.LC8
	.word	.LC2
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
