	.file	"116966.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC1:
	.string	"\nHow many numbers do you want to average? "
.LC2:
	.string	"%d"
.LC3:
	.string	"\nError: invalid value for n"
.LC4:
	.string	"i = %d  x = "
.LC5:
	.string	"%lf"
.LC6:
	.string	"\nThe average is %5.2f\n\n"
.LC7:
	.string	"i = %d  x = %5.2f  d = %5.2f\n"
	.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, 848
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	pxor	xmm0, xmm0
	movsd	QWORD PTR -840[rbp], xmm0
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -848[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -848[rbp]
	cmp	eax, 100
	jg	.L2
	mov	eax, DWORD PTR -848[rbp]
	test	eax, eax
	jg	.L3
.L2:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	DWORD PTR -844[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -844[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -816[rbp]
	mov	eax, DWORD PTR -844[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -844[rbp]
	cdqe
	movsd	xmm0, QWORD PTR -816[rbp+rax*8]
	movsd	xmm1, QWORD PTR -840[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -840[rbp], xmm0
	add	DWORD PTR -844[rbp], 1
.L4:
	mov	eax, DWORD PTR -848[rbp]
	cmp	DWORD PTR -844[rbp], eax
	jl	.L5
	mov	eax, DWORD PTR -848[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	movsd	xmm0, QWORD PTR -840[rbp]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -832[rbp], xmm0
	mov	rax, QWORD PTR -832[rbp]
	movq	xmm0, rax
	lea	rdi, .LC6[rip]
	mov	eax, 1
	call	printf@PLT
	mov	DWORD PTR -844[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -844[rbp]
	cdqe
	movsd	xmm0, QWORD PTR -816[rbp+rax*8]
	subsd	xmm0, QWORD PTR -832[rbp]
	movsd	QWORD PTR -824[rbp], xmm0
	mov	eax, DWORD PTR -844[rbp]
	cdqe
	mov	rax, QWORD PTR -816[rbp+rax*8]
	mov	edx, DWORD PTR -844[rbp]
	add	edx, 1
	movsd	xmm0, QWORD PTR -824[rbp]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	mov	esi, edx
	lea	rdi, .LC7[rip]
	mov	eax, 2
	call	printf@PLT
	add	DWORD PTR -844[rbp], 1
.L6:
	mov	eax, DWORD PTR -848[rbp]
	cmp	DWORD PTR -844[rbp], eax
	jl	.L7
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	"116966.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012How many numbers do you want to average? \000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"\012Error: invalid value for n\000"
	.align	2
.LC3:
	.ascii	"i = %d  x = \000"
	.align	2
.LC4:
	.ascii	"%lf\000"
	.global	__aeabi_dadd
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.align	2
.LC5:
	.ascii	"\012The average is %5.2f\012\012\000"
	.global	__aeabi_dsub
	.align	2
.LC6:
	.ascii	"i = %d  x = %5.2f  d = %5.2f\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 = 840
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #848
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-836]
	str	r3, [fp, #-832]
	ldr	r0, .L10+4
	bl	printf
	sub	r3, fp, #844
	mov	r1, r3
	ldr	r0, .L10+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-844]
	cmp	r3, #100
	bgt	.L2
	ldr	r3, [fp, #-844]
	cmp	r3, #0
	bgt	.L3
.L2:
	ldr	r0, .L10+12
	bl	puts
	mov	r0, #1
	bl	exit
.L3:
	mov	r3, #0
	str	r3, [fp, #-840]
	b	.L4
.L5:
	ldr	r3, [fp, #-840]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L10+16
	bl	printf
	sub	r2, fp, #812
	ldr	r3, [fp, #-840]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L10+20
	bl	__isoc99_scanf
	ldr	r3, [fp, #-840]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #808
	ldmia	r3, {r2-r3}
	sub	r1, fp, #836
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-836]
	str	r3, [fp, #-832]
	ldr	r3, [fp, #-840]
	add	r3, r3, #1
	str	r3, [fp, #-840]
.L4:
	ldr	r3, [fp, #-844]
	ldr	r2, [fp, #-840]
	cmp	r2, r3
	blt	.L5
	ldr	r3, [fp, #-844]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #836
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-828]
	str	r3, [fp, #-824]
	sub	r3, fp, #828
	ldmia	r3, {r2-r3}
	ldr	r0, .L10+24
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-840]
	b	.L6
.L7:
	ldr	r3, [fp, #-840]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #808
	ldmia	r3, {r0-r1}
	sub	r3, fp, #828
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-820]
	str	r3, [fp, #-816]
	ldr	r3, [fp, #-840]
	add	ip, r3, #1
	ldr	r3, [fp, #-840]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #808
	ldmia	r3, {r0-r1}
	sub	r3, fp, #820
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	mov	r2, r0
	mov	r3, r1
	mov	r1, ip
	ldr	r0, .L10+28
	bl	printf
	ldr	r3, [fp, #-840]
	add	r3, r3, #1
	str	r3, [fp, #-840]
.L6:
	ldr	r3, [fp, #-844]
	ldr	r2, [fp, #-840]
	cmp	r2, r3
	blt	.L7
	mov	r3, #0
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC7
	.word	.LC0
	.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
