	.file	"648977.c"
	.intel_syntax noprefix
	.text
	.globl	part1
	.type	part1, @function
part1:
.LFB6:
	.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
	pxor	xmm3, xmm3
	cvtsi2sd	xmm3, DWORD PTR -20[rbp]
	movq	rax, xmm3
	movq	xmm0, rax
	call	sqrt@PLT
	movq	rax, xmm0
	movq	xmm0, rax
	call	floor@PLT
	cvttsd2si	eax, xmm0
	add	eax, 1
	mov	DWORD PTR -12[rbp], eax
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, DWORD PTR -20[rbp]
	movsd	QWORD PTR -32[rbp], xmm2
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, 1
	pxor	xmm4, xmm4
	cvtsi2sd	xmm4, eax
	movq	rax, xmm4
	movsd	xmm0, QWORD PTR .LC0[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	movsd	xmm1, QWORD PTR -32[rbp]
	subsd	xmm1, xmm0
	cvttsd2si	eax, xmm1
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L2
	mov	eax, DWORD PTR -12[rbp]
	sub	DWORD PTR -16[rbp], eax
.L2:
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -16[rbp]
	cdq
	xor	eax, edx
	mov	DWORD PTR -4[rbp], eax
	sub	DWORD PTR -4[rbp], edx
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	part1, .-part1
	.globl	addItem
	.type	addItem, @function
addItem:
.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, 64
	mov	QWORD PTR -40[rbp], rdi
	movq	rax, xmm0
	movapd	xmm0, xmm1
	mov	rdx, rax
	movq	rax, xmm0
	movq	xmm1, rdx
	movq	xmm0, rax
	movsd	QWORD PTR -56[rbp], xmm1
	movsd	QWORD PTR -48[rbp], xmm0
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	edx, eax
	jne	.L5
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 12[rax]
	lea	edx, 10[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 12[rax]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rdx], rax
.L5:
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, QWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	ecx, 1[rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	DWORD PTR 8[rdx], ecx
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rsi
	movsd	xmm0, QWORD PTR -56[rbp]
	movsd	QWORD PTR [rax], xmm0
	movsd	xmm0, QWORD PTR -48[rbp]
	movsd	QWORD PTR 8[rax], xmm0
	mov	edx, DWORD PTR -60[rbp]
	mov	DWORD PTR 16[rax], edx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	addItem, .-addItem
	.globl	createGrid
	.type	createGrid, @function
createGrid:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	mov	esi, 24
	mov	edi, 10
	call	calloc@PLT
	mov	r12, rax
	mov	rdx, r13
	movabs	rax, -4294967296
	and	rax, rdx
	mov	r13, rax
	mov	rax, r13
	mov	edx, eax
	movabs	rax, 42949672960
	or	rax, rdx
	mov	r13, rax
	mov	rax, r12
	mov	rdx, r13
	pop	r12
	pop	r13
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	createGrid, .-createGrid
	.globl	getValueForPosition
	.type	getValueForPosition, @function
getValueForPosition:
.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 -40[rbp], rdi
	movq	rax, xmm0
	movapd	xmm0, xmm1
	mov	rdx, rax
	movq	rax, xmm0
	movq	xmm1, rdx
	movq	xmm0, rax
	movsd	QWORD PTR -56[rbp], xmm1
	movsd	QWORD PTR -48[rbp], xmm0
	movsd	xmm0, QWORD PTR -56[rbp]
	movsd	QWORD PTR -16[rbp], xmm0
	movsd	xmm0, QWORD PTR -48[rbp]
	movsd	QWORD PTR -8[rbp], xmm0
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L9
.L12:
	mov	rax, QWORD PTR -24[rbp]
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	movsd	xmm0, QWORD PTR 8[rax]
	ucomisd	xmm1, QWORD PTR -16[rbp]
	setnp	al
	mov	edx, 0
	ucomisd	xmm1, QWORD PTR -16[rbp]
	cmove	edx, eax
	ucomisd	xmm0, QWORD PTR -8[rbp]
	setnp	al
	mov	ecx, 0
	ucomisd	xmm0, QWORD PTR -8[rbp]
	cmovne	eax, ecx
	and	eax, edx
	cmp	al, 1
	jne	.L10
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 16[rax]
	jmp	.L11
.L10:
	add	QWORD PTR -24[rbp], 24
.L9:
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -28[rbp], edx
	test	eax, eax
	jne	.L12
	mov	eax, 0
.L11:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	getValueForPosition, .-getValueForPosition
	.globl	DIRECTIONS
	.section	.rodata
	.align 32
	.type	DIRECTIONS, @object
	.size	DIRECTIONS, 128
DIRECTIONS:
	.long	0
	.long	-1074790400
	.long	0
	.long	-1074790400
	.long	0
	.long	-2147483648
	.long	0
	.long	-1074790400
	.long	0
	.long	1072693248
	.long	0
	.long	-1074790400
	.long	0
	.long	-1074790400
	.long	0
	.long	0
	.long	0
	.long	1072693248
	.long	0
	.long	0
	.long	0
	.long	-1074790400
	.long	0
	.long	1072693248
	.long	0
	.long	0
	.long	0
	.long	1072693248
	.long	0
	.long	1072693248
	.long	0
	.long	1072693248
	.text
	.globl	getSumForNeighbors
	.type	getSumForNeighbors, @function
getSumForNeighbors:
.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, 56
	mov	QWORD PTR -40[rbp], rdi
	movq	rax, xmm0
	movapd	xmm0, xmm1
	mov	rdx, rax
	movq	rax, xmm0
	movq	xmm1, rdx
	movq	xmm0, rax
	movsd	QWORD PTR -56[rbp], xmm1
	movsd	QWORD PTR -48[rbp], xmm0
	movsd	xmm0, QWORD PTR -56[rbp]
	movsd	QWORD PTR -16[rbp], xmm0
	movsd	xmm0, QWORD PTR -48[rbp]
	movsd	QWORD PTR -8[rbp], xmm0
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, DIRECTIONS[rip]
	movsd	xmm1, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, DIRECTIONS[rip]
	movsd	xmm0, QWORD PTR 8[rdx+rax]
	addsd	xmm1, QWORD PTR -16[rbp]
	addsd	xmm0, QWORD PTR -8[rbp]
	movq	rdx, xmm1
	movq	rax, xmm0
	movq	xmm1, rax
	mov	rax, QWORD PTR -40[rbp]
	movq	xmm0, rdx
	mov	rdi, rax
	call	getValueForPosition
	add	DWORD PTR -24[rbp], eax
	add	DWORD PTR -20[rbp], 1
.L14:
	cmp	DWORD PTR -20[rbp], 7
	jle	.L15
	mov	eax, DWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	getSumForNeighbors, .-getSumForNeighbors
	.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
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	call	createGrid
	mov	QWORD PTR -64[rbp], rax
	mov	QWORD PTR -56[rbp], rdx
	pxor	xmm0, xmm0
	movsd	QWORD PTR -40[rbp], xmm0
	pxor	xmm0, xmm0
	movsd	QWORD PTR -32[rbp], xmm0
	movsd	xmm0, QWORD PTR .LC2[rip]
	movsd	QWORD PTR -24[rbp], xmm0
	pxor	xmm0, xmm0
	movsd	QWORD PTR -16[rbp], xmm0
	mov	rdx, QWORD PTR -40[rbp]
	movsd	xmm1, QWORD PTR -32[rbp]
	lea	rax, -64[rbp]
	mov	esi, 1
	movq	xmm0, rdx
	mov	rdi, rax
	call	addItem
	mov	DWORD PTR -112[rbp], 1
	pxor	xmm0, xmm0
	movsd	QWORD PTR -72[rbp], xmm0
	movsd	xmm0, QWORD PTR .LC2[rip]
	movsd	QWORD PTR -80[rbp], xmm0
	pxor	xmm0, xmm0
	movsd	QWORD PTR -88[rbp], xmm0
	pxor	xmm0, xmm0
	movsd	QWORD PTR -96[rbp], xmm0
.L24:
	mov	DWORD PTR -108[rbp], 0
	jmp	.L18
.L23:
	movsd	xmm1, QWORD PTR .LC2[rip]
	movsd	xmm0, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -80[rbp]
	movapd	xmm3, xmm1
	pxor	xmm2, xmm2
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	__muldc3@PLT
	movq	rax, xmm0
	movapd	xmm0, xmm1
	mov	QWORD PTR -24[rbp], rax
	movsd	QWORD PTR -16[rbp], xmm0
	movsd	xmm0, QWORD PTR -24[rbp]
	movsd	QWORD PTR -80[rbp], xmm0
	movsd	xmm0, QWORD PTR -16[rbp]
	movsd	QWORD PTR -72[rbp], xmm0
	mov	DWORD PTR -104[rbp], 0
	jmp	.L19
.L22:
	movsd	xmm0, QWORD PTR -96[rbp]
	movapd	xmm1, xmm0
	addsd	xmm1, QWORD PTR -80[rbp]
	movsd	xmm0, QWORD PTR -88[rbp]
	addsd	xmm0, QWORD PTR -72[rbp]
	movsd	QWORD PTR -40[rbp], xmm1
	movsd	QWORD PTR -32[rbp], xmm0
	movsd	QWORD PTR -96[rbp], xmm1
	movsd	QWORD PTR -88[rbp], xmm0
	mov	rdx, QWORD PTR -40[rbp]
	movsd	xmm1, QWORD PTR -32[rbp]
	lea	rax, -64[rbp]
	movq	xmm0, rdx
	mov	rdi, rax
	call	getSumForNeighbors
	mov	DWORD PTR -100[rbp], eax
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jle	.L20
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -100[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L25
	jmp	.L26
.L20:
	mov	ecx, DWORD PTR -100[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	movsd	xmm1, QWORD PTR -32[rbp]
	lea	rax, -64[rbp]
	mov	esi, ecx
	movq	xmm0, rdx
	mov	rdi, rax
	call	addItem
	add	DWORD PTR -104[rbp], 1
.L19:
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -112[rbp]
	jl	.L22
	add	DWORD PTR -108[rbp], 1
.L18:
	cmp	DWORD PTR -108[rbp], 1
	jle	.L23
	add	DWORD PTR -112[rbp], 1
	jmp	.L24
.L26:
	call	__stack_chk_fail@PLT
.L25:
	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	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	part1
	mov	r12d, eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	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
	.section	.rodata
.LC3:
	.string	"r"
.LC4:
	.string	"Error reading input file!\n"
	.text
	.globl	getInput
	.type	getInput, @function
getInput:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L30
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L30:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	rewind@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -16[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -28[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	getInput, .-getInput
	.globl	freeInput
	.type	freeInput, @function
freeInput:
.LFB14:
	.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
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	freeInput, .-freeInput
	.section	.rodata
	.align 8
.LC5:
	.string	"Please, add input file path as parameter"
.LC6:
	.string	"P1: %d\n"
.LC7:
	.string	"P2: %d\n\n"
.LC9:
	.string	"Time: %.7f\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -68[rbp], 2
	je	.L34
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L34:
	lea	rax, -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	getInput
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	call	solve
	mov	QWORD PTR -56[rbp], rax
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	call	freeInput
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	sub	rax, rdx
	imul	rdx, rax, 1000000
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -40[rbp]
	sub	rax, rdx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	movsd	xmm1, QWORD PTR .LC8[rip]
	divsd	xmm0, xmm1
	movq	rax, xmm0
	movq	xmm0, rax
	lea	rdi, .LC9[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
.LFE15:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1073741824
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.align 8
.LC8:
	.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	"648977.c"
	.text
	.global	__aeabi_i2d
	.global	__aeabi_d2iz
	.global	__aeabi_dsub
	.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	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	str	r0, [fp, #-32]
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	floor
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	mov	r3, #1073741824
	bl	pow
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-24]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L2
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	str	r3, [fp, #-28]
.L2:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	part1, .-part1
	.align	2
	.global	addItem
	.syntax unified
	.arm
	.fpu softvfp
	.type	addItem, %function
addItem:
	@ args = 20, pretend = 8, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #8
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	add	r1, fp, #4
	stm	r1, {r2, r3}
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L5
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	add	r2, r3, #10
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	lsl	r3, r3, #3
	mov	r1, r3
	mov	r0, r2
	bl	realloc
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3]
.L5:
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	add	r0, r3, #1
	ldr	r1, [fp, #-32]
	str	r0, [r1, #4]
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmib	fp, {r0-r1}
	stm	r3, {r0-r1}
	add	r1, fp, #12
	ldmia	r1, {r0-r1}
	str	r0, [r3, #8]
	str	r1, [r3, #12]
	ldr	r2, [fp, #20]
	str	r2, [r3, #16]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #8
	bx	lr
	.size	addItem, .-addItem
	.align	2
	.global	createGrid
	.syntax unified
	.arm
	.fpu softvfp
	.type	createGrid, %function
createGrid:
	@ 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]
	mov	r1, #24
	mov	r0, #10
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	mov	r2, #10
	str	r2, [r3, #8]
	ldr	r0, [fp, #-24]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	createGrid, .-createGrid
	.global	__aeabi_dcmpeq
	.align	2
	.global	getValueForPosition
	.syntax unified
	.arm
	.fpu softvfp
	.type	getValueForPosition, %function
getValueForPosition:
	@ args = 16, pretend = 8, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #8
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #32
	str	r0, [fp, #-48]
	add	r1, fp, #4
	stm	r1, {r2, r3}
	ldmib	fp, {r2-r3}
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	add	r3, fp, #12
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	b	.L9
.L14:
	ldr	r3, [fp, #-40]
	ldmia	r3, {r2-r3}
	ldr	r1, [fp, #-40]
	add	r5, r1, #8
	ldmia	r5, {r4-r5}
	mov	r1, #1
	mov	r6, r1
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpeq
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	mov	r3, #0
	mov	r6, r3
.L10:
	and	r6, r6, #255
	mov	r3, #1
	mov	r7, r3
	mov	r2, r4
	mov	r3, r5
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpeq
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	mov	r3, #0
	mov	r7, r3
.L11:
	and	r3, r7, #255
	and	r3, r3, r6
	and	r3, r3, #255
	cmp	r3, #1
	bne	.L12
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #16]
	b	.L13
.L12:
	ldr	r3, [fp, #-40]
	add	r3, r3, #24
	str	r3, [fp, #-40]
.L9:
	ldr	r3, [fp, #-44]
	sub	r2, r3, #1
	str	r2, [fp, #-44]
	cmp	r3, #0
	bne	.L14
	mov	r3, #0
.L13:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, lr}
	add	sp, sp, #8
	bx	lr
	.size	getValueForPosition, .-getValueForPosition
	.global	DIRECTIONS
	.section	.rodata
	.align	3
	.type	DIRECTIONS, %object
	.size	DIRECTIONS, 128
DIRECTIONS:
	.word	0
	.word	-1074790400
	.word	0
	.word	-1074790400
	.word	0
	.word	-2147483648
	.word	0
	.word	-1074790400
	.word	0
	.word	1072693248
	.word	0
	.word	-1074790400
	.word	0
	.word	-1074790400
	.word	0
	.word	0
	.word	0
	.word	1072693248
	.word	0
	.word	0
	.word	0
	.word	-1074790400
	.word	0
	.word	1072693248
	.word	0
	.word	0
	.word	0
	.word	1072693248
	.word	0
	.word	1072693248
	.word	0
	.word	1072693248
	.global	__aeabi_dadd
	.text
	.align	2
	.global	getSumForNeighbors
	.syntax unified
	.arm
	.fpu softvfp
	.type	getSumForNeighbors, %function
getSumForNeighbors:
	@ args = 16, pretend = 8, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #8
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #40
	str	r0, [fp, #-48]
	add	r1, fp, #4
	stm	r1, {r2, r3}
	ldmib	fp, {r2-r3}
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	add	r3, fp, #12
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L16
.L17:
	ldr	r2, .L19
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r2, .L19
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #4
	add	r3, r2, r3
	add	r5, r3, #8
	ldmia	r5, {r4-r5}
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r6, r2
	mov	r7, r3
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	mov	r4, r2
	mov	r5, r3
	mov	r3, r5
	str	r3, [sp, #4]
	mov	r3, r4
	str	r3, [sp]
	mov	r2, r0
	mov	r3, r1
	ldr	r0, [fp, #-48]
	bl	getValueForPosition
	mov	r2, r0
	ldr	r3, [fp, #-44]
	add	r3, r3, r2
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L16:
	ldr	r3, [fp, #-40]
	cmp	r3, #7
	ble	.L17
	ldr	r3, [fp, #-44]
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, lr}
	add	sp, sp, #8
	bx	lr
.L20:
	.align	2
.L19:
	.word	DIRECTIONS
	.size	getSumForNeighbors, .-getSumForNeighbors
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	part2
	.syntax unified
	.arm
	.fpu softvfp
	.type	part2, %function
part2:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #152
	str	r0, [fp, #-120]
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #64
	mov	r0, r3
	bl	createGrid
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	mov	r2, #0
	ldr	r3, .L31+4
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r1, fp, #64
	mov	r3, #1
	str	r3, [sp, #8]
	ldr	r3, [fp, #-40]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-44]
	str	r3, [sp]
	sub	r3, fp, #52
	ldm	r3, {r2, r3}
	mov	r0, r1
	bl	addItem
	mov	r3, #1
	str	r3, [fp, #-116]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	mov	r2, #0
	ldr	r3, .L31+4
	str	r2, [fp, #-84]
	str	r3, [fp, #-80]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-92]
	str	r3, [fp, #-88]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-100]
	str	r3, [fp, #-96]
.L28:
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L22
.L27:
	sub	r1, fp, #140
	mov	r2, #0
	ldr	r3, .L31+4
	str	r2, [sp, #16]
	str	r3, [sp, #20]
	mov	r2, #0
	mov	r3, #0
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	sub	r3, fp, #76
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	sub	r3, fp, #84
	ldmia	r3, {r2-r3}
	mov	r0, r1
	bl	__muldc3
	sub	r3, fp, #140
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	sub	r3, fp, #132
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-84]
	str	r3, [fp, #-80]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-108]
	b	.L23
.L26:
	sub	r3, fp, #84
	ldmia	r3, {r2-r3}
	sub	r1, fp, #100
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	sub	r3, fp, #76
	ldmia	r3, {r2-r3}
	sub	r1, fp, #92
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r4, [fp, #-52]
	str	r5, [fp, #-48]
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	str	r4, [fp, #-100]
	str	r5, [fp, #-96]
	str	r2, [fp, #-92]
	str	r3, [fp, #-88]
	sub	r1, fp, #64
	ldr	r3, [fp, #-40]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-44]
	str	r3, [sp]
	sub	r3, fp, #52
	ldm	r3, {r2, r3}
	mov	r0, r1
	bl	getSumForNeighbors
	str	r0, [fp, #-104]
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-120]
	cmp	r2, r3
	ble	.L24
	ldr	r3, [fp, #-64]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-104]
	ldr	r2, .L31
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L29
	b	.L30
.L24:
	sub	r1, fp, #64
	ldr	r3, [fp, #-104]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-40]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-44]
	str	r3, [sp]
	sub	r3, fp, #52
	ldm	r3, {r2, r3}
	mov	r0, r1
	bl	addItem
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L23:
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-116]
	cmp	r2, r3
	blt	.L26
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L22:
	ldr	r3, [fp, #-112]
	cmp	r3, #1
	ble	.L27
	ldr	r3, [fp, #-116]
	add	r3, r3, #1
	str	r3, [fp, #-116]
	b	.L28
.L30:
	bl	__stack_chk_fail
.L29:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC0
	.word	1072693248
	.size	part2, .-part2
	.align	2
	.global	solve
	.syntax unified
	.arm
	.fpu softvfp
	.type	solve, %function
solve:
	@ 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
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r0, [fp, #-28]
	bl	part1
	mov	r4, r0
	ldr	r0, [fp, #-28]
	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
	.section	.rodata
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"Error reading input file!\012\000"
	.text
	.align	2
	.global	getInput
	.syntax unified
	.arm
	.fpu softvfp
	.type	getInput, %function
getInput:
	@ 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	r1, .L38
	ldr	r0, [fp, #-24]
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L36
	ldr	r0, .L38+4
	bl	perror
	mov	r0, #1
	bl	exit
.L36:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-20]
	bl	fseek
	ldr	r0, [fp, #-20]
	bl	ftell
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-20]
	bl	rewind
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	mov	r1, #1
	ldr	r0, [fp, #-12]
	bl	fread
	ldr	r0, [fp, #-12]
	bl	atoi
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r0, [fp, #-20]
	bl	fclose
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.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 = 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]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	freeInput, .-freeInput
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Please, add input file path as parameter\000"
	.align	2
.LC4:
	.ascii	"P1: %d\012\000"
	.align	2
.LC5:
	.ascii	"P2: %d\012\012\000"
	.global	__aeabi_ddiv
	.align	2
.LC6:
	.ascii	"Time: %.7f\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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, .L45
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	cmp	r3, #2
	beq	.L42
	ldr	r0, .L45+4
	bl	perror
	mov	r0, #1
	bl	exit
.L42:
	sub	r3, fp, #32
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getInput
	str	r0, [fp, #-36]
	sub	r3, fp, #16
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	solve
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r0, [fp, #-36]
	bl	freeInput
	ldr	r3, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L45+8
	bl	printf
	ldr	r3, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L45+12
	bl	printf
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	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, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L45+16
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L45+20
	bl	printf
	mov	r3, #0
	ldr	r2, .L45
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L44
	bl	__stack_chk_fail
.L44:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	.LC7
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	1093567616
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
