	.file	"150144477.c"
	.intel_syntax noprefix
	.text
	.globl	swap
	.type	swap, @function
swap:
.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR [rax], edx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	swap, .-swap
	.globl	bubbleSort
	.type	bubbleSort, @function
bubbleSort:
.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	rax, rdi
	mov	rcx, rsi
	mov	rdx, rcx
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	DWORD PTR -8[rbp], 0
	jmp	.L3
.L7:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L4
.L6:
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, 1
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jle	.L5
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, 1
	sal	rax, 2
	add	rdx, rax
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	rsi, rdx
	mov	rdi, rax
	call	swap
.L5:
	add	DWORD PTR -4[rbp], 1
.L4:
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, DWORD PTR -8[rbp]
	sub	eax, 1
	cmp	DWORD PTR -4[rbp], eax
	jl	.L6
	add	DWORD PTR -8[rbp], 1
.L3:
	mov	eax, DWORD PTR -24[rbp]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	bubbleSort, .-bubbleSort
	.globl	part1
	.type	part1, @function
part1:
.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, 32
	mov	rax, rdi
	mov	rcx, rsi
	mov	rdx, rcx
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rdx
	mov	rsi, rax
	call	bubbleSort
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	ecx, eax
	shr	ecx, 31
	add	eax, ecx
	sar	eax
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L9
.L10:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 4[rax]
	mov	QWORD PTR -32[rbp], rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, edx
	cdq
	xor	eax, edx
	sub	eax, edx
	add	DWORD PTR -8[rbp], eax
.L9:
	mov	eax, DWORD PTR -24[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -24[rbp], edx
	test	eax, eax
	jne	.L10
	mov	eax, DWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	part1, .-part1
	.globl	getDistanceCost
	.type	getDistanceCost, @function
getDistanceCost:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, DWORD PTR -24[rbp]
	cdq
	xor	eax, edx
	mov	DWORD PTR -4[rbp], eax
	sub	DWORD PTR -4[rbp], edx
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	imul	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	getDistanceCost, .-getDistanceCost
	.globl	getAverage
	.type	getAverage, @function
getAverage:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, rdi
	mov	rcx, rsi
	mov	rdx, rcx
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L15
.L16:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 4[rax]
	mov	QWORD PTR -32[rbp], rdx
	mov	eax, DWORD PTR [rax]
	add	DWORD PTR -8[rbp], eax
.L15:
	mov	eax, DWORD PTR -24[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -24[rbp], edx
	test	eax, eax
	jne	.L16
	mov	eax, DWORD PTR -8[rbp]
	cdq
	idiv	DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	getAverage, .-getAverage
	.globl	part2
	.type	part2, @function
part2:
.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	rax, rdi
	mov	rcx, rsi
	mov	rdx, rcx
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rdx
	mov	rsi, rax
	call	getAverage
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L19
.L20:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 4[rax]
	mov	QWORD PTR -32[rbp], rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	getDistanceCost
	add	DWORD PTR -8[rbp], eax
.L19:
	mov	eax, DWORD PTR -24[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -24[rbp], edx
	test	eax, eax
	jne	.L20
	mov	eax, DWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	part2, .-part2
	.globl	solve
	.type	solve, @function
solve:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 16
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	rax, rdi
	mov	rcx, rsi
	mov	rdx, rcx
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rdx
	mov	rsi, rax
	call	part1
	mov	r12d, eax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rdx
	mov	rsi, rax
	call	part2
	mov	edx, eax
	mov	ecx, r12d
	movabs	rax, -4294967296
	and	rax, rbx
	or	rax, rcx
	mov	rbx, rax
	mov	eax, edx
	sal	rax, 32
	mov	edx, ebx
	or	rax, rdx
	mov	rbx, rax
	mov	rax, rbx
	add	rsp, 16
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	solve, .-solve
	.globl	addToInput
	.type	addToInput, @function
addToInput:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	cmp	edx, eax
	jne	.L25
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	lea	edx, 10[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
.L25:
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	ecx, 1[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rdx], ecx
	cdqe
	sal	rax, 2
	lea	rdx, [rsi+rax]
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rdx], eax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	addToInput, .-addToInput
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"Error reading input file!\n"
.LC2:
	.string	","
	.text
	.globl	getInput
	.type	getInput, @function
getInput:
.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, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	jne	.L27
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L27:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	rewind@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	edi, 40
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 10
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -64[rbp], rax
	jmp	.L28
.L29:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	edx, eax
	lea	rax, -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	addToInput
	lea	rsi, .LC2[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -64[rbp], rax
.L28:
	cmp	QWORD PTR -64[rbp], 0
	jne	.L29
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	getInput, .-getInput
	.globl	freeInput
	.type	freeInput, @function
freeInput:
.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, 16
	mov	rax, rdi
	mov	rcx, rsi
	mov	rdx, rcx
	mov	QWORD PTR -16[rbp], rax
	mov	QWORD PTR -8[rbp], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	freeInput, .-freeInput
	.section	.rodata
	.align 8
.LC3:
	.string	"Please, add input file path as parameter"
.LC4:
	.string	"P1: %d\n"
.LC5:
	.string	"P2: %d\n\n"
.LC7:
	.string	"Time: %.7f\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -84[rbp], 2
	je	.L34
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L34:
	lea	rax, -64[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	getInput
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rdx
	mov	rsi, rax
	call	solve
	mov	QWORD PTR -72[rbp], rax
	lea	rax, -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rdx
	mov	rsi, rax
	call	freeInput
	mov	eax, DWORD PTR -72[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -68[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -64[rbp]
	sub	rax, rdx
	imul	rdx, rax, 1000000
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -56[rbp]
	sub	rax, rdx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	movsd	xmm1, QWORD PTR .LC6[rip]
	divsd	xmm0, xmm1
	movq	rax, xmm0
	movq	xmm0, rax
	lea	rdi, .LC7[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC6:
	.long	0
	.long	1093567616
	.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	"150144477.c"
	.text
	.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, #-8]
	ldr	r3, [fp, #-20]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	swap, .-swap
	.align	2
	.global	bubbleSort
	.syntax unified
	.arm
	.fpu softvfp
	.type	bubbleSort, %function
bubbleSort:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	sub	r3, fp, #24
	stm	r3, {r0, r1, r2}
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L3
.L7:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L4
.L6:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r1, [fp, #-24]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L5
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r0, r2, r3
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	bl	swap
.L5:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L4:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	sub	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L6
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L3:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L7
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	bubbleSort, .-bubbleSort
	.align	2
	.global	part1
	.syntax unified
	.arm
	.fpu softvfp
	.type	part1, %function
part1:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	sub	r3, fp, #24
	stm	r3, {r0, r1, r2}
	sub	r3, fp, #24
	ldm	r3, {r0, r1, r2}
	bl	bubbleSort
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L9
.L10:
	ldr	r3, [fp, #-24]
	add	r2, r3, #4
	str	r2, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	sub	r3, r2, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
.L9:
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	str	r2, [fp, #-20]
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	part1, .-part1
	.align	2
	.global	getDistanceCost
	.syntax unified
	.arm
	.fpu softvfp
	.type	getDistanceCost, %function
getDistanceCost:
	@ 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	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r2, [fp, #-8]
	mul	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	getDistanceCost, .-getDistanceCost
	.global	__aeabi_idiv
	.align	2
	.global	getAverage
	.syntax unified
	.arm
	.fpu softvfp
	.type	getAverage, %function
getAverage:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	sub	r3, fp, #24
	stm	r3, {r0, r1, r2}
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L15
.L16:
	ldr	r3, [fp, #-24]
	add	r2, r3, #4
	str	r2, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
.L15:
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	str	r2, [fp, #-20]
	cmp	r3, #0
	bne	.L16
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	getAverage, .-getAverage
	.align	2
	.global	part2
	.syntax unified
	.arm
	.fpu softvfp
	.type	part2, %function
part2:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	sub	r3, fp, #24
	stm	r3, {r0, r1, r2}
	sub	r3, fp, #24
	ldm	r3, {r0, r1, r2}
	bl	getAverage
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L19
.L20:
	ldr	r3, [fp, #-24]
	add	r2, r3, #4
	str	r2, [fp, #-24]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	getDistanceCost
	mov	r2, r0
	ldr	r3, [fp, #-12]
	add	r3, r3, r2
	str	r3, [fp, #-12]
.L19:
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	str	r2, [fp, #-20]
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	part2, .-part2
	.align	2
	.global	solve
	.syntax unified
	.arm
	.fpu softvfp
	.type	solve, %function
solve:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	sub	r0, fp, #36
	stm	r0, {r1, r2, r3}
	sub	r3, fp, #36
	ldm	r3, {r0, r1, r2}
	bl	part1
	mov	r4, r0
	sub	r3, fp, #36
	ldm	r3, {r0, r1, r2}
	bl	part2
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r4, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r0, [fp, #-24]
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	solve, .-solve
	.align	2
	.global	addToInput
	.syntax unified
	.arm
	.fpu softvfp
	.type	addToInput, %function
addToInput:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	cmp	r2, r3
	bne	.L25
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	add	r2, r3, #10
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	lsl	r3, r3, #2
	mov	r1, r3
	mov	r0, r2
	bl	realloc
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3]
.L25:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	add	r0, r3, #1
	ldr	r1, [fp, #-8]
	str	r0, [r1, #4]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	addToInput, .-addToInput
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"Error reading input file!\012\000"
	.align	2
.LC2:
	.ascii	",\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	getInput
	.syntax unified
	.arm
	.fpu softvfp
	.type	getInput, %function
getInput:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L32+4
	ldr	r0, [fp, #-44]
	bl	fopen
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L27
	ldr	r0, .L32+8
	bl	perror
	mov	r0, #1
	bl	exit
.L27:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-32]
	bl	fseek
	ldr	r0, [fp, #-32]
	bl	ftell
	str	r0, [fp, #-28]
	ldr	r0, [fp, #-32]
	bl	rewind
	ldr	r3, [fp, #-28]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-32]
	mov	r1, #1
	ldr	r0, [fp, #-24]
	bl	fread
	ldr	r0, [fp, #-32]
	bl	fclose
	mov	r0, #40
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #10
	str	r3, [fp, #-12]
	ldr	r1, .L32+12
	ldr	r0, [fp, #-24]
	bl	strtok
	str	r0, [fp, #-36]
	b	.L28
.L29:
	ldr	r0, [fp, #-36]
	bl	atoi
	mov	r2, r0
	sub	r3, fp, #20
	mov	r1, r2
	mov	r0, r3
	bl	addToInput
	ldr	r1, .L32+12
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-36]
.L28:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L29
	ldr	r0, [fp, #-24]
	bl	free
	ldr	r3, [fp, #-40]
	mov	ip, r3
	sub	r3, fp, #20
	ldm	r3, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, .L32
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L31
	bl	__stack_chk_fail
.L31:
	ldr	r0, [fp, #-40]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	getInput, .-getInput
	.align	2
	.global	freeInput
	.syntax unified
	.arm
	.fpu softvfp
	.type	freeInput, %function
freeInput:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	sub	r3, fp, #16
	stm	r3, {r0, r1, r2}
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	freeInput, .-freeInput
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Please, add input file path as parameter\000"
	.align	2
.LC5:
	.ascii	"P1: %d\012\000"
	.align	2
.LC6:
	.ascii	"P2: %d\012\012\000"
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.align	2
.LC7:
	.ascii	"Time: %.7f\012\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 = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L39
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	beq	.L36
	ldr	r0, .L39+4
	bl	perror
	mov	r0, #1
	bl	exit
.L36:
	sub	r3, fp, #44
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #20
	mov	r1, r2
	mov	r0, r3
	bl	getInput
	sub	r0, fp, #28
	sub	r3, fp, #20
	ldm	r3, {r1, r2, r3}
	bl	solve
	sub	r3, fp, #36
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	sub	r3, fp, #20
	ldm	r3, {r0, r1, r2}
	bl	freeInput
	ldr	r3, [fp, #-28]
	mov	r1, r3
	ldr	r0, .L39+8
	bl	printf
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L39+12
	bl	printf
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-44]
	sub	r1, r2, r3
	mov	r2, r1
	lsl	r2, r2, #5
	sub	r2, r2, r1
	lsl	r3, r2, #6
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #6
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-40]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L39+16
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L39+20
	bl	printf
	mov	r3, #0
	ldr	r2, .L39
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L38
	bl	__stack_chk_fail
.L38:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC8
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	1093567616
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
