	.file	"165764975.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Digite o nome do arquivo em binario: "
.LC1:
	.string	"rb"
	.align 8
.LC2:
	.string	"Erro ao tentar abrir o arquivo..."
	.align 8
.LC3:
	.string	"Digite o numero de pontos que estao no arquivo binario: "
.LC4:
	.string	"%d"
.LC5:
	.string	"X%d = %lg\nY%d = %lg \n\n"
.LC7:
	.string	"Centroide:\nXc = %lg\nYc = %lg"
	.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
	sub	rsp, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -69[rbp], 0
	mov	DWORD PTR -64[rbp], 1
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	BYTE PTR [rax], 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -56[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -69[rbp]
	mov	BYTE PTR [rdx], al
	mov	eax, DWORD PTR -64[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	add	DWORD PTR -64[rbp], 1
	mov	eax, DWORD PTR -64[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -56[rbp], rax
.L2:
	call	getchar@PLT
	mov	BYTE PTR -69[rbp], al
	cmp	BYTE PTR -69[rbp], 10
	jne	.L3
	mov	rax, QWORD PTR -56[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jne	.L4
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -68[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	mov	esi, 16
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	DWORD PTR -60[rbp], 0
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	lea	rdi, [rdx+rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 16
	call	fread@PLT
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -60[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	sal	rax, 4
	mov	rcx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	ecx, DWORD PTR -60[rbp]
	add	ecx, 1
	movapd	xmm1, xmm0
	movq	xmm0, rax
	mov	esi, ecx
	lea	rdi, .LC5[rip]
	mov	eax, 2
	call	printf@PLT
	add	DWORD PTR -60[rbp], 1
.L5:
	mov	eax, DWORD PTR -68[rbp]
	cmp	DWORD PTR -60[rbp], eax
	jne	.L6
	pxor	xmm0, xmm0
	movsd	QWORD PTR -32[rbp], xmm0
	pxor	xmm0, xmm0
	movsd	QWORD PTR -24[rbp], xmm0
	mov	DWORD PTR -60[rbp], 0
	jmp	.L7
.L8:
	movsd	xmm1, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -32[rbp], xmm0
	movsd	xmm1, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR 8[rax]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -24[rbp], xmm0
	add	DWORD PTR -60[rbp], 1
.L7:
	mov	eax, DWORD PTR -68[rbp]
	cmp	DWORD PTR -60[rbp], eax
	jl	.L8
	movsd	xmm0, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -68[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	divsd	xmm0, xmm1
	movsd	QWORD PTR -32[rbp], xmm0
	movsd	xmm0, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -68[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	divsd	xmm0, xmm1
	movsd	QWORD PTR -24[rbp], xmm0
	movsd	xmm0, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	lea	rdi, .LC7[rip]
	mov	eax, 2
	call	printf@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"165764975.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Digite o nome do arquivo em binario: \000"
	.align	2
.LC1:
	.ascii	"rb\000"
	.align	2
.LC2:
	.ascii	"Erro ao tentar abrir o arquivo...\000"
	.align	2
.LC3:
	.ascii	"Digite o numero de pontos que estao no arquivo bina"
	.ascii	"rio: \000"
	.align	2
.LC4:
	.ascii	"%d\000"
	.align	2
.LC5:
	.ascii	"X%d = %lg\012Y%d = %lg \012\012\000"
	.global	__aeabi_dadd
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.align	2
.LC6:
	.ascii	"Centroide:\012Xc = %lg\012Yc = %lg\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 = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #72
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	strb	r3, [fp, #-61]
	mov	r3, #1
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	mov	r1, #1
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-56]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r0, .L11+4
	bl	printf
	ldr	r3, .L11+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	b	.L2
.L3:
	ldr	r3, [fp, #-52]
	sub	r3, r3, #1
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldrb	r2, [fp, #-61]
	strb	r2, [r3]
	ldr	r3, [fp, #-52]
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	realloc
	str	r0, [fp, #-56]
.L2:
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-61]
	ldrb	r3, [fp, #-61]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L3
	ldr	r1, .L11+12
	ldr	r0, [fp, #-56]
	bl	fopen
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L11+16
	bl	printf
	mov	r0, #1
	bl	exit
.L4:
	ldr	r0, .L11+20
	bl	printf
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, .L11+24
	bl	__isoc99_scanf
	ldr	r3, [fp, #-60]
	mov	r1, #16
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L5
.L6:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-40]
	add	r0, r2, r3
	ldr	r3, [fp, #-44]
	mov	r2, #1
	mov	r1, #16
	bl	fread
	ldr	r3, [fp, #-48]
	add	lr, r3, #1
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-48]
	add	ip, r3, #1
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	str	ip, [sp]
	mov	r2, r0
	mov	r3, r1
	mov	r1, lr
	ldr	r0, .L11+28
	bl	printf
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L5:
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	bne	.L6
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L7
.L8:
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L7:
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	blt	.L8
	sub	r5, fp, #36
	ldmia	r5, {r4-r5}
	ldr	r3, [fp, #-60]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	sub	r5, fp, #28
	ldmia	r5, {r4-r5}
	ldr	r3, [fp, #-60]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L11+32
	bl	printf
	ldr	r0, [fp, #-44]
	bl	fclose
	ldr	r0, [fp, #-56]
	bl	free
	ldr	r0, [fp, #-40]
	bl	free
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC7
	.word	.LC0
	.word	stdin
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
