	.file	"221983.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"input.txt"
.LC2:
	.string	"w"
.LC3:
	.string	"output.txt"
.LC4:
	.string	"%d%n"
.LC5:
	.string	"%d%*c%d%*c%d"
.LC6:
	.string	"no path\n"
.LC7:
	.string	"%d "
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 1320
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -1272[rbp], rax
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	call	fopen@PLT
	mov	QWORD PTR -1264[rbp], rax
	mov	rdx, QWORD PTR -1272[rbp]
	lea	rax, -432[rbp]
	mov	esi, 401
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -432[rbp]
	mov	QWORD PTR -1288[rbp], rax
	mov	DWORD PTR -1292[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -1316[rbp]
	mov	edx, DWORD PTR -1292[rbp]
	mov	esi, edx
	mov	edi, eax
	call	make_node
	mov	edx, DWORD PTR -1292[rbp]
	movsx	rdx, edx
	mov	QWORD PTR -1232[rbp+rdx*8], rax
	add	DWORD PTR -1292[rbp], 1
	mov	eax, DWORD PTR -1320[rbp]
	cdqe
	add	QWORD PTR -1288[rbp], rax
.L2:
	lea	rcx, -1320[rbp]
	lea	rdx, -1316[rbp]
	mov	rax, QWORD PTR -1288[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 1
	je	.L3
	mov	eax, DWORD PTR -1292[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -1256[rbp], rax
	mov	DWORD PTR -1300[rbp], 0
	jmp	.L4
.L7:
	mov	eax, DWORD PTR -1292[rbp]
	cdqe
	sal	rax, 2
	mov	edx, DWORD PTR -1300[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -1256[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	DWORD PTR -1296[rbp], 0
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -1300[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1256[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -1296[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 2147483647
	add	DWORD PTR -1296[rbp], 1
.L5:
	mov	eax, DWORD PTR -1296[rbp]
	cmp	eax, DWORD PTR -1292[rbp]
	jl	.L6
	add	DWORD PTR -1300[rbp], 1
.L4:
	mov	eax, DWORD PTR -1300[rbp]
	cmp	eax, DWORD PTR -1292[rbp]
	jl	.L7
	jmp	.L8
.L9:
	mov	edx, DWORD PTR -1312[rbp]
	mov	ecx, DWORD PTR -1292[rbp]
	lea	rax, -1232[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	find_idx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1256[rbp]
	add	rax, rdx
	mov	rbx, QWORD PTR [rax]
	mov	edx, DWORD PTR -1308[rbp]
	mov	ecx, DWORD PTR -1292[rbp]
	lea	rax, -1232[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	find_idx
	cdqe
	sal	rax, 2
	lea	rdx, [rbx+rax]
	mov	eax, DWORD PTR -1304[rbp]
	mov	DWORD PTR [rdx], eax
.L8:
	lea	rsi, -1304[rbp]
	lea	rcx, -1308[rbp]
	lea	rdx, -1312[rbp]
	mov	rax, QWORD PTR -1272[rbp]
	mov	r8, rsi
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, 3
	je	.L9
	mov	ecx, DWORD PTR -1312[rbp]
	mov	edx, DWORD PTR -1292[rbp]
	lea	rsi, -1232[rbp]
	mov	rax, QWORD PTR -1256[rbp]
	mov	rdi, rax
	call	dijkstra
	mov	QWORD PTR -1248[rbp], rax
	mov	edx, DWORD PTR -1308[rbp]
	mov	ecx, DWORD PTR -1292[rbp]
	lea	rax, -1232[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	find_idx
	cdqe
	mov	rax, QWORD PTR -1232[rbp+rax*8]
	mov	QWORD PTR -1280[rbp], rax
	mov	eax, DWORD PTR -1292[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -1240[rbp], rax
	mov	DWORD PTR -1300[rbp], 0
	jmp	.L10
.L13:
	mov	eax, DWORD PTR -1300[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -1240[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -1280[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -1280[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1248[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -1280[rbp], rax
	cmp	QWORD PTR -1280[rbp], 0
	je	.L22
	add	DWORD PTR -1300[rbp], 1
.L10:
	mov	eax, DWORD PTR -1300[rbp]
	cmp	eax, DWORD PTR -1292[rbp]
	jl	.L13
	jmp	.L12
.L22:
	nop
.L12:
	mov	eax, DWORD PTR -1300[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -1240[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -1312[rbp]
	cmp	edx, eax
	je	.L16
	mov	rax, QWORD PTR -1264[rbp]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	jmp	.L15
.L17:
	mov	eax, DWORD PTR -1300[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -1240[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -1264[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	sub	DWORD PTR -1300[rbp], 1
.L16:
	cmp	DWORD PTR -1300[rbp], 0
	jns	.L17
.L15:
	mov	rax, QWORD PTR -1248[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -1240[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	DWORD PTR -1300[rbp], 0
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -1300[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1256[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -1300[rbp]
	cdqe
	mov	rax, QWORD PTR -1232[rbp+rax*8]
	mov	rdi, rax
	call	free_node
	add	DWORD PTR -1300[rbp], 1
.L18:
	mov	eax, DWORD PTR -1300[rbp]
	cmp	eax, DWORD PTR -1292[rbp]
	jl	.L19
	mov	rax, QWORD PTR -1256[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -1264[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -1272[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	swap
	.type	swap, @function
swap:
.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 12[rax]
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 12[rdx]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR 12[rax], edx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	swap, .-swap
	.globl	find_idx
	.type	find_idx, @function
find_idx:
.LFB8:
	.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 -32[rbp], edx
	mov	DWORD PTR -4[rbp], 0
	jmp	.L25
.L28:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -32[rbp], eax
	jne	.L26
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L27
.L26:
	add	DWORD PTR -4[rbp], 1
.L25:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L28
	mov	eax, -1
.L27:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	find_idx, .-find_idx
	.globl	make_node
	.type	make_node, @function
make_node:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], 2147483647
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 12[rax], -1
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	make_node, .-make_node
	.globl	free_node
	.type	free_node, @function
free_node:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	free_node, .-free_node
	.globl	perc_up
	.type	perc_up, @function
perc_up:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L33
.L35:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	mov	ecx, eax
	shr	ecx, 31
	add	eax, ecx
	sar	eax
	cdqe
	sal	rax, 3
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR [rcx]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -12[rbp], eax
.L33:
	mov	eax, DWORD PTR -12[rbp]
	add	eax, 1
	cmp	eax, 2
	jbe	.L34
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	shr	esi, 31
	add	eax, esi
	sar	eax
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	rcx
	test	eax, eax
	je	.L35
.L34:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR 12[rax], edx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	perc_up, .-perc_up
	.globl	perc_down
	.type	perc_down, @function
perc_down:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -20[rbp], eax
	jmp	.L37
.L41:
	mov	eax, DWORD PTR -20[rbp]
	add	eax, eax
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	je	.L38
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	add	rax, 1
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	add	rax, rsi
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	rcx
	test	eax, eax
	jne	.L38
	add	DWORD PTR -16[rbp], 1
.L38:
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	rcx
	test	eax, eax
	jne	.L42
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR [rcx]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -20[rbp], eax
.L37:
	mov	eax, DWORD PTR -20[rbp]
	add	eax, eax
	cmp	DWORD PTR -12[rbp], eax
	jge	.L41
	jmp	.L40
.L42:
	nop
.L40:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 12[rax], edx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	perc_down, .-perc_down
	.globl	is_empty
	.type	is_empty, @function
is_empty:
.LFB13:
	.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 4[rax]
	test	eax, eax
	setle	al
	movzx	eax, al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	is_empty, .-is_empty
	.globl	delete
	.type	delete, @function
delete:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	is_empty
	test	eax, eax
	jne	.L48
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	ecx, -1[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rdx], ecx
	cdqe
	sal	rax, 3
	lea	rdx, [rsi+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	add	rax, 8
	mov	rsi, rdx
	mov	rdi, rax
	call	swap
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	perc_down
	jmp	.L45
.L48:
	nop
.L45:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	delete, .-delete
	.globl	build_heap
	.type	build_heap, @function
build_heap:
.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, 80
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	QWORD PTR -72[rbp], rdx
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -60[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -60[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	eax, DWORD PTR -60[rbp]
	add	eax, 1
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	DWORD PTR -44[rbp], 0
	jmp	.L50
.L51:
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	add	rax, 1
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR [rcx]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	add	rax, 1
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -44[rbp]
	add	edx, 1
	mov	DWORD PTR 12[rax], edx
	add	DWORD PTR -44[rbp], 1
.L50:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L51
	mov	eax, DWORD PTR -60[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -44[rbp], eax
	jmp	.L52
.L53:
	mov	edx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	perc_down
	sub	DWORD PTR -44[rbp], 1
.L52:
	cmp	DWORD PTR -44[rbp], 0
	jg	.L53
	mov	rax, QWORD PTR -40[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	build_heap, .-build_heap
	.globl	min
	.type	min, @function
min:
.LFB16:
	.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	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	edx, eax
	setle	al
	movzx	eax, al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	min, .-min
	.globl	front
	.type	front, @function
front:
.LFB17:
	.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	rax, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 8[rax]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	front, .-front
	.globl	delete_heap
	.type	delete_heap, @function
delete_heap:
.LFB18:
	.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
	cmp	QWORD PTR -8[rbp], 0
	je	.L62
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L59
.L62:
	nop
.L59:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	delete_heap, .-delete_heap
	.globl	dijkstra
	.type	dijkstra, @function
dijkstra:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -52[rbp], edx
	mov	DWORD PTR -56[rbp], ecx
	mov	edx, DWORD PTR -56[rbp]
	mov	ecx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	find_idx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 8[rax], 0
	mov	ecx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, min[rip]
	mov	esi, ecx
	mov	rdi, rax
	call	build_heap
	mov	QWORD PTR -24[rbp], rax
	jmp	.L64
.L70:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	front
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	delete
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	eax, 2147483647
	je	.L74
	mov	DWORD PTR -28[rbp], 0
	jmp	.L67
.L69:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 2147483647
	je	.L68
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rsi
	mov	rsi, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rsi
	mov	eax, DWORD PTR [rax]
	add	eax, ecx
	cmp	edx, eax
	jle	.L68
	mov	rax, QWORD PTR -16[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rsi
	mov	rax, QWORD PTR [rax]
	add	edx, ecx
	mov	DWORD PTR 8[rax], edx
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	perc_up
.L68:
	add	DWORD PTR -28[rbp], 1
.L67:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jl	.L69
.L64:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	is_empty
	test	eax, eax
	je	.L70
	jmp	.L66
.L74:
	nop
.L66:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -28[rbp], 0
	jmp	.L71
.L72:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR [rdx], rax
	add	DWORD PTR -28[rbp], 1
.L71:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jl	.L72
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	delete_heap
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	dijkstra, .-dijkstra
	.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	"221983.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"input.txt\000"
	.align	2
.LC2:
	.ascii	"w\000"
	.align	2
.LC3:
	.ascii	"output.txt\000"
	.align	2
.LC4:
	.ascii	"%d%n\000"
	.align	2
.LC5:
	.ascii	"%d%*c%d%*c%d\000"
	.align	2
.LC6:
	.ascii	"no path\012\000"
	.align	2
.LC7:
	.ascii	"%d \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 = 872
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #884
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L23+4
	ldr	r0, .L23+8
	bl	fopen
	str	r0, [fp, #-840]
	ldr	r1, .L23+12
	ldr	r0, .L23+16
	bl	fopen
	str	r0, [fp, #-836]
	sub	r3, fp, #420
	ldr	r2, [fp, #-840]
	ldr	r1, .L23+20
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #420
	str	r3, [fp, #-852]
	mov	r3, #0
	str	r3, [fp, #-848]
	b	.L2
.L3:
	ldr	r3, [fp, #-876]
	ldr	r1, [fp, #-848]
	mov	r0, r3
	bl	make_node
	mov	r2, r0
	ldr	r3, [fp, #-848]
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-808]
	ldr	r3, [fp, #-848]
	add	r3, r3, #1
	str	r3, [fp, #-848]
	ldr	r3, [fp, #-880]
	mov	r2, r3
	ldr	r3, [fp, #-852]
	add	r3, r3, r2
	str	r3, [fp, #-852]
.L2:
	sub	r3, fp, #880
	sub	r2, fp, #876
	ldr	r1, .L23+24
	ldr	r0, [fp, #-852]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #1
	beq	.L3
	ldr	r3, [fp, #-848]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-832]
	mov	r3, #0
	str	r3, [fp, #-860]
	b	.L4
.L7:
	ldr	r3, [fp, #-848]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-860]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-832]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	mov	r3, #0
	str	r3, [fp, #-856]
	b	.L5
.L6:
	ldr	r3, [fp, #-860]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-832]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-856]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mvn	r2, #-2147483648
	str	r2, [r3]
	ldr	r3, [fp, #-856]
	add	r3, r3, #1
	str	r3, [fp, #-856]
.L5:
	ldr	r2, [fp, #-856]
	ldr	r3, [fp, #-848]
	cmp	r2, r3
	blt	.L6
	ldr	r3, [fp, #-860]
	add	r3, r3, #1
	str	r3, [fp, #-860]
.L4:
	ldr	r2, [fp, #-860]
	ldr	r3, [fp, #-848]
	cmp	r2, r3
	blt	.L7
	b	.L8
.L9:
	ldr	r2, [fp, #-872]
	sub	r3, fp, #820
	ldr	r1, [fp, #-848]
	mov	r0, r3
	bl	find_idx
	mov	r3, r0
	lsl	r3, r3, #2
	ldr	r2, [fp, #-832]
	add	r3, r2, r3
	ldr	r4, [r3]
	ldr	r2, [fp, #-868]
	sub	r3, fp, #820
	ldr	r1, [fp, #-848]
	mov	r0, r3
	bl	find_idx
	mov	r3, r0
	lsl	r3, r3, #2
	add	r3, r4, r3
	ldr	r2, [fp, #-864]
	str	r2, [r3]
.L8:
	sub	r1, fp, #868
	sub	r2, fp, #872
	sub	r3, fp, #864
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L23+28
	ldr	r0, [fp, #-840]
	bl	__isoc99_fscanf
	mov	r3, r0
	cmp	r3, #3
	beq	.L9
	ldr	r3, [fp, #-872]
	sub	r1, fp, #820
	ldr	r2, [fp, #-848]
	ldr	r0, [fp, #-832]
	bl	dijkstra
	str	r0, [fp, #-828]
	ldr	r2, [fp, #-868]
	sub	r3, fp, #820
	ldr	r1, [fp, #-848]
	mov	r0, r3
	bl	find_idx
	mov	r3, r0
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-808]
	str	r3, [fp, #-844]
	ldr	r3, [fp, #-848]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-824]
	mov	r3, #0
	str	r3, [fp, #-860]
	b	.L10
.L13:
	ldr	r3, [fp, #-860]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-824]
	add	r3, r2, r3
	ldr	r2, [fp, #-844]
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-844]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-828]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-844]
	ldr	r3, [fp, #-844]
	cmp	r3, #0
	beq	.L22
	ldr	r3, [fp, #-860]
	add	r3, r3, #1
	str	r3, [fp, #-860]
.L10:
	ldr	r2, [fp, #-860]
	ldr	r3, [fp, #-848]
	cmp	r2, r3
	blt	.L13
	b	.L12
.L22:
	nop
.L12:
	ldr	r3, [fp, #-860]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-824]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-872]
	cmp	r2, r3
	beq	.L16
	ldr	r3, [fp, #-836]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L23+32
	bl	fwrite
	b	.L15
.L17:
	ldr	r3, [fp, #-860]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-824]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L23+36
	ldr	r0, [fp, #-836]
	bl	fprintf
	ldr	r3, [fp, #-860]
	sub	r3, r3, #1
	str	r3, [fp, #-860]
.L16:
	ldr	r3, [fp, #-860]
	cmp	r3, #0
	bge	.L17
.L15:
	ldr	r0, [fp, #-828]
	bl	free
	ldr	r0, [fp, #-824]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-860]
	b	.L18
.L19:
	ldr	r3, [fp, #-860]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-832]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-860]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-808]
	mov	r0, r3
	bl	free_node
	ldr	r3, [fp, #-860]
	add	r3, r3, #1
	str	r3, [fp, #-860]
.L18:
	ldr	r2, [fp, #-860]
	ldr	r3, [fp, #-848]
	cmp	r2, r3
	blt	.L19
	ldr	r0, [fp, #-832]
	bl	free
	ldr	r0, [fp, #-836]
	bl	fclose
	ldr	r0, [fp, #-840]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	401
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.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]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [r2, #12]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	swap, .-swap
	.align	2
	.global	find_idx
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_idx, %function
find_idx:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L27
.L30:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bne	.L28
	ldr	r3, [fp, #-8]
	b	.L29
.L28:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L27:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L30
	mvn	r3, #0
.L29:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	find_idx, .-find_idx
	.align	2
	.global	make_node
	.syntax unified
	.arm
	.fpu softvfp
	.type	make_node, %function
make_node:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r0, #20
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	mvn	r2, #-2147483648
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mvn	r2, #0
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	make_node, .-make_node
	.align	2
	.global	free_node
	.syntax unified
	.arm
	.fpu softvfp
	.type	free_node, %function
free_node:
	@ 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	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	free_node, .-free_node
	.align	2
	.global	perc_up
	.syntax unified
	.arm
	.fpu softvfp
	.type	perc_up, %function
perc_up:
	@ 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	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-12]
	b	.L35
.L37:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-12]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-12]
.L35:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	cmp	r3, #2
	bls	.L36
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-12]
	lsr	r0, r3, #31
	add	r3, r0, r3
	asr	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	blx	r2
	mov	r3, r0
	cmp	r3, #0
	beq	.L37
.L36:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #12]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	perc_up, .-perc_up
	.align	2
	.global	perc_down
	.syntax unified
	.arm
	.fpu softvfp
	.type	perc_down, %function
perc_down:
	@ 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]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-20]
	b	.L39
.L43:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	beq	.L40
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-24]
	ldr	r1, [r2, #8]
	ldr	r2, [fp, #-16]
	lsl	r2, r2, #2
	add	r2, r1, r2
	ldr	r0, [r2]
	ldr	r2, [fp, #-24]
	ldr	r1, [r2, #8]
	ldr	r2, [fp, #-16]
	add	r2, r2, #1
	lsl	r2, r2, #2
	add	r2, r1, r2
	ldr	r2, [r2]
	mov	r1, r2
	blx	r3
	mov	r3, r0
	cmp	r3, #0
	bne	.L40
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L40:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-24]
	ldr	r1, [r2, #8]
	ldr	r2, [fp, #-16]
	lsl	r2, r2, #2
	add	r2, r1, r2
	ldr	r2, [r2]
	mov	r1, r2
	ldr	r0, [fp, #-8]
	blx	r3
	mov	r3, r0
	cmp	r3, #0
	bne	.L44
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-20]
.L39:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L43
	b	.L42
.L44:
	nop
.L42:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #12]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	perc_down, .-perc_down
	.align	2
	.global	is_empty
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_empty, %function
is_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]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	movle	r3, #1
	movgt	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_empty, .-is_empty
	.align	2
	.global	delete
	.syntax unified
	.arm
	.fpu softvfp
	.type	delete, %function
delete:
	@ 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	r0, [fp, #-8]
	bl	is_empty
	mov	r3, r0
	cmp	r3, #0
	bne	.L50
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	add	ip, r3, #4
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	sub	r0, r3, #1
	ldr	r1, [fp, #-8]
	str	r0, [r1, #4]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	mov	r0, ip
	bl	swap
	mov	r1, #1
	ldr	r0, [fp, #-8]
	bl	perc_down
	b	.L47
.L50:
	nop
.L47:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	delete, .-delete
	.align	2
	.global	build_heap
	.syntax unified
	.arm
	.fpu softvfp
	.type	build_heap, %function
build_heap:
	@ 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, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-44]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-44]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-48]
	str	r2, [r3, #12]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L52
.L53:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L52:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L53
	ldr	r3, [fp, #-44]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L54
.L55:
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-28]
	bl	perc_down
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	str	r3, [fp, #-32]
.L54:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bgt	.L55
	ldr	r3, [fp, #-28]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	build_heap, .-build_heap
	.align	2
	.global	min
	.syntax unified
	.arm
	.fpu softvfp
	.type	min, %function
min:
	@ 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, #8]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	cmp	r2, r3
	movle	r3, #1
	movgt	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	min, .-min
	.align	2
	.global	front
	.syntax unified
	.arm
	.fpu softvfp
	.type	front, %function
front:
	@ 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, #8]
	ldr	r3, [r3, #4]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	front, .-front
	.align	2
	.global	delete_heap
	.syntax unified
	.arm
	.fpu softvfp
	.type	delete_heap, %function
delete_heap:
	@ 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
	beq	.L64
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-8]
	bl	free
	b	.L61
.L64:
	nop
.L61:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	delete_heap, .-delete_heap
	.align	2
	.global	dijkstra
	.syntax unified
	.arm
	.fpu softvfp
	.type	dijkstra, %function
dijkstra:
	@ 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, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r2, [fp, #-36]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-28]
	bl	find_idx
	mov	r3, r0
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r2, .L77
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-28]
	bl	build_heap
	str	r0, [fp, #-16]
	b	.L66
.L72:
	ldr	r0, [fp, #-16]
	bl	front
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	delete
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	cmn	r3, #-2147483647
	beq	.L76
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L69
.L71:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmn	r3, #-2147483647
	beq	.L70
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-24]
	add	r3, r0, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r3, [r3]
	add	r3, r1, r3
	cmp	r2, r3
	ble	.L70
	ldr	r3, [fp, #-12]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-28]
	add	r3, r0, r3
	ldr	r3, [r3]
	add	r2, r1, r2
	str	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3, #12]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	perc_up
.L70:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L69:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L71
.L66:
	ldr	r0, [fp, #-16]
	bl	is_empty
	mov	r3, r0
	cmp	r3, #0
	beq	.L72
	b	.L68
.L76:
	nop
.L68:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L73
.L74:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	ldr	r2, [r2, #16]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L73:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L74
	ldr	r0, [fp, #-16]
	bl	delete_heap
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L78:
	.align	2
.L77:
	.word	min
	.size	dijkstra, .-dijkstra
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
