	.file	"462989.c"
	.intel_syntax noprefix
	.text
	.globl	nodes
	.bss
	.align 32
	.type	nodes, @object
	.size	nodes, 1200012
nodes:
	.zero	1200012
	.globl	edges
	.align 32
	.type	edges, @object
	.size	edges, 4800012
edges:
	.zero	4800012
	.globl	heap
	.align 32
	.type	heap, @object
	.size	heap, 80008
heap:
	.zero	80008
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	cnth
	.align 4
	.type	cnth, @object
	.size	cnth, 4
cnth:
	.zero	4
	.text
	.globl	top
	.type	top, @function
top:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR heap[rip+8]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	top, .-top
	.globl	swap
	.type	swap, @function
swap:
.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	QWORD PTR -32[rbp], rax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	swap, .-swap
	.globl	shiftdown
	.type	shiftdown, @function
shiftdown:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, [rax+rax]
	mov	eax, DWORD PTR cnth[rip]
	cmp	edx, eax
	jg	.L10
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, heap[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jge	.L7
	sal	DWORD PTR -4[rbp], 2
.L7:
	mov	eax, DWORD PTR cnth[rip]
	test	eax, eax
	js	.L8
	mov	edx, DWORD PTR heap[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jge	.L8
	mov	DWORD PTR -4[rbp], 0
.L8:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	je	.L11
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	mov	rcx, rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	mov	rsi, rcx
	mov	rdi, rax
	call	swap
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, heap[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	mov	rcx, rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, heap[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	mov	rsi, rcx
	mov	rdi, rax
	call	swap
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	shiftdown
	jmp	.L4
.L10:
	nop
	jmp	.L4
.L11:
	nop
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	shiftdown, .-shiftdown
	.globl	shiftup
	.type	shiftup, @function
shiftup:
.LFB3:
	.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	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], 1
	je	.L15
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, heap[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	sar	eax
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jge	.L12
	mov	eax, DWORD PTR -4[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	mov	rcx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	mov	rsi, rcx
	mov	rdi, rax
	call	swap
	mov	eax, DWORD PTR -4[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, heap[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	mov	rcx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, heap[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	mov	rsi, rcx
	mov	rdi, rax
	call	swap
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edi, eax
	call	shiftup
	jmp	.L12
.L15:
	nop
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	shiftup, .-shiftup
	.globl	pop
	.type	pop, @function
pop:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR cnth[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, heap[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR heap[rip+8], eax
	mov	eax, DWORD PTR cnth[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, heap[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR heap[rip+12], eax
	mov	eax, DWORD PTR cnth[rip]
	sub	eax, 1
	mov	DWORD PTR cnth[rip], eax
	mov	edi, 1
	call	shiftdown
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	pop, .-pop
	.globl	push
	.type	push, @function
push:
.LFB5:
	.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	QWORD PTR -8[rbp], rdi
	mov	eax, DWORD PTR cnth[rip]
	add	eax, 1
	mov	DWORD PTR cnth[rip], eax
	mov	edx, DWORD PTR cnth[rip]
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	lea	rdx, heap[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	edx, DWORD PTR cnth[rip]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	lea	rdx, heap[rip+4]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR cnth[rip]
	mov	edi, eax
	call	shiftup
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	push, .-push
	.globl	read
	.type	read, @function
read:
.LFB6:
	.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], 1
	jmp	.L19
.L21:
	cmp	BYTE PTR -25[rbp], 45
	jne	.L19
	mov	DWORD PTR -20[rbp], -1
.L19:
	call	__ctype_b_loc@PLT
	mov	rbx, QWORD PTR [rax]
	call	getchar@PLT
	mov	BYTE PTR -25[rbp], al
	movsx	rax, BYTE PTR -25[rbp]
	add	rax, rax
	add	rax, rbx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	je	.L21
	movsx	eax, BYTE PTR -25[rbp]
	sub	eax, 48
	mov	DWORD PTR -24[rbp], eax
	jmp	.L22
.L23:
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	DWORD PTR -24[rbp], eax
	movsx	eax, BYTE PTR -25[rbp]
	sub	eax, 48
	add	DWORD PTR -24[rbp], eax
.L22:
	call	__ctype_b_loc@PLT
	mov	rbx, QWORD PTR [rax]
	call	getchar@PLT
	mov	BYTE PTR -25[rbp], al
	movsx	rax, BYTE PTR -25[rbp]
	add	rax, rax
	add	rax, rbx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L23
	mov	eax, DWORD PTR -24[rbp]
	imul	eax, DWORD PTR -20[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read, .-read
	.globl	print
	.type	print, @function
print:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], 0
	jns	.L26
	mov	edi, 45
	call	putchar@PLT
	neg	DWORD PTR -4[rbp]
.L26:
	cmp	DWORD PTR -4[rbp], 9
	jle	.L27
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	edi, eax
	call	print
.L27:
	mov	ecx, DWORD PTR -4[rbp]
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	lea	eax, 48[rdx]
	mov	edi, eax
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	print, .-print
	.globl	addedge
	.type	addedge, @function
addedge:
.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 -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	DWORD PTR -12[rbp], edx
	mov	eax, DWORD PTR cnt[rip]
	add	eax, 1
	mov	DWORD PTR cnt[rip], eax
	mov	eax, DWORD PTR cnt[rip]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rcx, rax
	lea	rdx, edges[rip]
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	ecx, DWORD PTR cnt[rip]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, nodes[rip]
	mov	edx, DWORD PTR [rdx+rax]
	movsx	rcx, ecx
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	mov	rcx, rax
	lea	rax, edges[rip+4]
	mov	DWORD PTR [rcx+rax], edx
	mov	eax, DWORD PTR cnt[rip]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rcx, rax
	lea	rdx, edges[rip+8]
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	edx, DWORD PTR cnt[rip]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	mov	rcx, rax
	lea	rax, nodes[rip]
	mov	DWORD PTR [rcx+rax], edx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	addedge, .-addedge
	.globl	dij
	.type	dij, @function
dij:
.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, 40
	.cfi_offset 3, -24
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -28[rbp], 1
	jmp	.L30
.L31:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	mov	rcx, rax
	lea	rax, nodes[rip+4]
	mov	DWORD PTR [rcx+rax], 1000000007
	add	DWORD PTR -28[rbp], 1
.L30:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -28[rbp], eax
	jle	.L31
	mov	eax, DWORD PTR -36[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	mov	rcx, rax
	lea	rax, nodes[rip+4]
	mov	DWORD PTR [rcx+rax], 0
	mov	eax, DWORD PTR -36[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	mov	rcx, rax
	lea	rax, nodes[rip+4]
	mov	eax, DWORD PTR [rcx+rax]
	mov	ecx, eax
	movabs	rax, -4294967296
	and	rax, rdx
	or	rax, rcx
	mov	rdx, rax
	mov	eax, DWORD PTR -36[rbp]
	sal	rax, 32
	mov	edx, edx
	or	rax, rdx
	mov	rdx, rax
	mov	rdi, rdx
	call	push
	jmp	.L32
.L37:
	mov	eax, 0
	call	top
	sar	rax, 32
	mov	DWORD PTR -20[rbp], eax
	mov	eax, 0
	call	pop
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, nodes[rip+8]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L33
	jmp	.L32
.L33:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rcx, rax
	lea	rdx, nodes[rip+8]
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, nodes[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -24[rbp], eax
	jmp	.L34
.L36:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, nodes[rip+4]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, edges[rip+8]
	mov	eax, DWORD PTR [rdx+rax]
	add	ecx, eax
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, edges[rip]
	mov	eax, DWORD PTR [rdx+rax]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, nodes[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	ecx, eax
	jge	.L35
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, nodes[rip+4]
	mov	esi, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, edges[rip+8]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, edges[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	ecx, esi
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, nodes[rip+4]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, edges[rip]
	mov	eax, DWORD PTR [rdx+rax]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, nodes[rip+8]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L35
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, edges[rip]
	mov	eax, DWORD PTR [rdx+rax]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, nodes[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, eax
	movabs	rax, -4294967296
	and	rax, rbx
	or	rax, rdx
	mov	rbx, rax
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, edges[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	eax, eax
	sal	rax, 32
	mov	edx, ebx
	or	rax, rdx
	mov	rbx, rax
	mov	rdi, rbx
	call	push
.L35:
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, edges[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -24[rbp], eax
.L34:
	cmp	DWORD PTR -24[rbp], 0
	jne	.L36
.L32:
	mov	eax, DWORD PTR cnth[rip]
	test	eax, eax
	jne	.L37
	nop
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	dij, .-dij
	.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
	sub	rsp, 32
	mov	eax, 0
	call	read
	mov	DWORD PTR n[rip], eax
	mov	eax, 0
	call	read
	mov	DWORD PTR m[rip], eax
	mov	eax, 0
	call	read
	mov	DWORD PTR s[rip], eax
	mov	DWORD PTR -20[rbp], 1
	jmp	.L39
.L40:
	mov	eax, 0
	call	read
	mov	DWORD PTR -12[rbp], eax
	mov	eax, 0
	call	read
	mov	DWORD PTR -8[rbp], eax
	mov	eax, 0
	call	read
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -4[rbp]
	mov	ecx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	addedge
	add	DWORD PTR -20[rbp], 1
.L39:
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -20[rbp], eax
	jle	.L40
	mov	eax, DWORD PTR s[rip]
	mov	edi, eax
	call	dij
	mov	DWORD PTR -16[rbp], 1
	jmp	.L41
.L42:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, nodes[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edi, eax
	call	print
	mov	edi, 32
	call	putchar@PLT
	add	DWORD PTR -16[rbp], 1
.L41:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -16[rbp], eax
	jle	.L42
	mov	eax, 0
	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	"462989.c"
	.text
	.comm	nodes,1200012,4
	.comm	edges,4800012,4
	.comm	heap,80008,4
	.comm	n,4,4
	.comm	m,4,4
	.comm	s,4,4
	.comm	cnt,4,4
	.comm	cnth,4,4
	.align	2
	.global	top
	.syntax unified
	.arm
	.fpu softvfp
	.type	top, %function
top:
	@ 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	r2, [fp, #-8]
	ldr	r3, .L3
	add	r3, r3, #8
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r0, [fp, #-8]
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L4:
	.align	2
.L3:
	.word	heap
	.size	top, .-top
	.align	2
	.global	swap
	.syntax unified
	.arm
	.fpu softvfp
	.type	swap, %function
swap:
	@ 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, #-16]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-20]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	swap, .-swap
	.align	2
	.global	shiftdown
	.syntax unified
	.arm
	.fpu softvfp
	.type	shiftdown, %function
shiftdown:
	@ 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]
	ldr	r3, [fp, #-16]
	lsl	r2, r3, #1
	ldr	r3, .L14
	ldr	r3, [r3]
	cmp	r2, r3
	bgt	.L12
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #1
	ldr	r2, .L14+4
	ldr	r2, [r2, r3, lsl #3]
	ldr	r1, .L14+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r1, r3, lsl #3]
	cmp	r2, r3
	bge	.L9
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	str	r3, [fp, #-8]
.L9:
	ldr	r3, .L14
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L10
	ldr	r3, .L14+4
	ldr	r2, [r3]
	ldr	r1, .L14+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r1, r3, lsl #3]
	cmp	r2, r3
	bge	.L10
	mov	r3, #0
	str	r3, [fp, #-8]
.L10:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	beq	.L13
	ldr	r2, .L14+4
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #3]
	mov	r0, r3
	ldr	r2, .L14+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #3]
	mov	r1, r3
	bl	swap
	ldr	r2, .L14+4
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r0, r3
	ldr	r2, .L14+4
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r1, r3
	bl	swap
	ldr	r0, [fp, #-8]
	bl	shiftdown
	b	.L6
.L12:
	nop
	b	.L6
.L13:
	nop
.L6:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	cnth
	.word	heap
	.size	shiftdown, .-shiftdown
	.align	2
	.global	shiftup
	.syntax unified
	.arm
	.fpu softvfp
	.type	shiftup, %function
shiftup:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	beq	.L19
	ldr	r2, .L20
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #3]
	ldr	r3, [fp, #-8]
	asr	r3, r3, #1
	ldr	r1, .L20
	ldr	r3, [r1, r3, lsl #3]
	cmp	r2, r3
	bge	.L16
	ldr	r2, .L20
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #3]
	mov	r0, r3
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #1
	ldr	r2, .L20
	ldr	r3, [r2, r3, lsl #3]
	mov	r1, r3
	bl	swap
	ldr	r2, .L20
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r0, r3
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #1
	ldr	r2, .L20
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r1, r3
	bl	swap
	ldr	r3, [fp, #-8]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r0, r3
	bl	shiftup
	b	.L16
.L19:
	nop
.L16:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	heap
	.size	shiftup, .-shiftup
	.align	2
	.global	pop
	.syntax unified
	.arm
	.fpu softvfp
	.type	pop, %function
pop:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L23
	ldr	r3, [r3]
	ldr	r2, .L23+4
	ldr	r3, [r2, r3, lsl #3]
	ldr	r2, .L23+4
	str	r3, [r2, #8]
	ldr	r3, .L23
	ldr	r3, [r3]
	ldr	r2, .L23+4
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	ldr	r2, .L23+4
	str	r3, [r2, #12]
	ldr	r3, .L23
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L23
	str	r3, [r2]
	mov	r0, #1
	bl	shiftdown
	nop
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	cnth
	.word	heap
	.size	pop, .-pop
	.align	2
	.global	push
	.syntax unified
	.arm
	.fpu softvfp
	.type	push, %function
push:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	sub	r3, fp, #12
	stm	r3, {r0, r1}
	ldr	r3, .L26
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L26
	str	r3, [r2]
	ldr	r3, .L26
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L26+4
	str	r2, [r1, r3, lsl #3]
	ldr	r3, .L26
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L26+4
	lsl	r3, r3, #3
	add	r3, r1, r3
	str	r2, [r3, #4]
	ldr	r3, .L26
	ldr	r3, [r3]
	mov	r0, r3
	bl	shiftup
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	cnth
	.word	heap
	.size	push, .-push
	.align	2
	.global	read
	.syntax unified
	.arm
	.fpu softvfp
	.type	read, %function
read:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L29
.L31:
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L29
	mvn	r3, #0
	str	r3, [fp, #-16]
.L29:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r4, [r3]
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-21]
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r4, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	beq	.L31
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	sub	r3, r3, #48
	str	r3, [fp, #-20]
	b	.L32
.L33:
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	str	r3, [fp, #-20]
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	sub	r3, r3, #48
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-20]
.L32:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r4, [r3]
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-21]
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r4, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L33
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mul	r3, r2, r3
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	read, .-read
	.align	2
	.global	print
	.syntax unified
	.arm
	.fpu softvfp
	.type	print, %function
print:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L36
	mov	r0, #45
	bl	putchar
	ldr	r3, [fp, #-8]
	rsb	r3, r3, #0
	str	r3, [fp, #-8]
.L36:
	ldr	r3, [fp, #-8]
	cmp	r3, #9
	ble	.L37
	ldr	r3, [fp, #-8]
	ldr	r2, .L38
	smull	r1, r2, r3, r2
	asr	r2, r2, #2
	asr	r3, r3, #31
	sub	r3, r2, r3
	mov	r0, r3
	bl	print
.L37:
	ldr	r1, [fp, #-8]
	ldr	r3, .L38
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	add	r3, r2, #48
	mov	r0, r3
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	1717986919
	.size	print, .-print
	.align	2
	.global	addedge
	.syntax unified
	.arm
	.fpu softvfp
	.type	addedge, %function
addedge:
	@ 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]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, .L41
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L41
	str	r3, [r2]
	ldr	r3, .L41
	ldr	r2, [r3]
	ldr	r1, .L41+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, .L41
	ldr	r2, [r3]
	ldr	r0, .L41+8
	ldr	r1, [fp, #-8]
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r1, [r3]
	ldr	r0, .L41+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r3, r3, #4
	str	r1, [r3]
	ldr	r3, .L41
	ldr	r2, [r3]
	ldr	r1, .L41+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, .L41
	ldr	r1, [r3]
	ldr	r0, .L41+8
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	str	r1, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L42:
	.align	2
.L41:
	.word	cnt
	.word	edges
	.word	nodes
	.size	addedge, .-addedge
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dij
	.syntax unified
	.arm
	.fpu softvfp
	.type	dij, %function
dij:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	ldr	r3, .L53
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-44]
	b	.L44
.L45:
	ldr	r1, .L53+4
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r2, .L53+8
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L44:
	ldr	r3, .L53+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	ble	.L45
	ldr	r1, .L53+4
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, .L53+4
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-28]
	sub	r3, fp, #32
	ldm	r3, {r0, r1}
	bl	push
	b	.L46
.L51:
	sub	r3, fp, #16
	mov	r0, r3
	bl	top
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-36]
	bl	pop
	ldr	r1, .L53+4
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L47
	b	.L46
.L47:
	ldr	r1, .L53+4
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	ldr	r2, [fp, #-36]
	str	r2, [r3]
	ldr	r1, .L53+4
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	b	.L48
.L50:
	ldr	r1, .L53+4
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r1, [r3]
	ldr	r0, .L53+16
	ldr	r2, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r3, r3, #8
	ldr	r3, [r3]
	add	r1, r1, r3
	ldr	r0, .L53+16
	ldr	r2, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r2, [r3]
	ldr	r0, .L53+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r1, r3
	bge	.L49
	ldr	r1, .L53+4
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r0, [r3]
	ldr	r1, .L53+16
	ldr	r2, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	ldr	r1, [r3]
	ldr	ip, .L53+16
	ldr	r2, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, ip, r3
	ldr	r2, [r3]
	add	r1, r0, r1
	ldr	r0, .L53+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r3, r3, #4
	str	r1, [r3]
	ldr	r1, .L53+16
	ldr	r2, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r3]
	ldr	r1, .L53+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L49
	ldr	r1, .L53+16
	ldr	r2, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r3]
	ldr	r1, .L53+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r1, .L53+16
	ldr	r2, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	sub	r3, fp, #24
	ldm	r3, {r0, r1}
	bl	push
.L49:
	ldr	r1, .L53+16
	ldr	r2, [fp, #-40]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r3, [r3]
	str	r3, [fp, #-40]
.L48:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L50
.L46:
	ldr	r3, .L53+20
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L51
	nop
	ldr	r3, .L53
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L52
	bl	__stack_chk_fail
.L52:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L54:
	.align	2
.L53:
	.word	.LC0
	.word	nodes
	.word	1000000007
	.word	n
	.word	edges
	.word	cnth
	.size	dij, .-dij
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	bl	read
	mov	r3, r0
	ldr	r2, .L61
	str	r3, [r2]
	bl	read
	mov	r3, r0
	ldr	r2, .L61+4
	str	r3, [r2]
	bl	read
	mov	r3, r0
	ldr	r2, .L61+8
	str	r3, [r2]
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L56
.L57:
	bl	read
	str	r0, [fp, #-16]
	bl	read
	str	r0, [fp, #-12]
	bl	read
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	addedge
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L56:
	ldr	r3, .L61+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	ble	.L57
	ldr	r3, .L61+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	dij
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L58
.L59:
	ldr	r1, .L61+12
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	print
	mov	r0, #32
	bl	putchar
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L58:
	ldr	r3, .L61
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	ble	.L59
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L62:
	.align	2
.L61:
	.word	n
	.word	m
	.word	s
	.word	nodes
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
