	.file	"479539.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"w"
.LC1:
	.string	"problem_10_input.txt"
.LC2:
	.string	"Could not open samedata.txt!"
	.align 8
.LC3:
	.string	"5 96 87 78 93 21 4 92 82 85 87 6 72 69 85 75 81 73"
.LC4:
	.string	"r"
.LC5:
	.string	"Could not open homework.txt!"
.LC6:
	.string	"%d"
.LC7:
	.string	"average[%d] : %.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, 480
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -476[rbp], 0
	mov	DWORD PTR -452[rbp], 0
	mov	DWORD PTR -472[rbp], 0
	mov	DWORD PTR -468[rbp], 0
	lea	rdx, -416[rbp]
	mov	eax, 0
	mov	ecx, 50
	mov	rdi, rdx
	rep stosq
	mov	QWORD PTR -428[rbp], 0
	mov	DWORD PTR -420[rbp], 0
	mov	QWORD PTR -448[rbp], 0
	mov	QWORD PTR -440[rbp], 0
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -448[rbp], rax
	cmp	QWORD PTR -448[rbp], 0
	jne	.L2
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -448[rbp]
	mov	rcx, rax
	mov	edx, 50
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -448[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rsi, .LC4[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -440[rbp], rax
	cmp	QWORD PTR -440[rbp], 0
	jne	.L4
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	edx, DWORD PTR -476[rbp]
	mov	eax, DWORD PTR -472[rbp]
	cdqe
	mov	DWORD PTR -416[rbp+rax*4], edx
	add	DWORD PTR -472[rbp], 1
.L4:
	lea	rdx, -476[rbp]
	mov	rax, QWORD PTR -440[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, -1
	jne	.L5
	mov	DWORD PTR -464[rbp], 0
	jmp	.L6
.L11:
	mov	DWORD PTR -460[rbp], 1
	jmp	.L7
.L10:
	mov	eax, DWORD PTR -468[rbp]
	cdqe
	movss	xmm1, DWORD PTR -428[rbp+rax*4]
	mov	edx, DWORD PTR -464[rbp]
	mov	eax, DWORD PTR -460[rbp]
	add	eax, edx
	cdqe
	mov	eax, DWORD PTR -416[rbp+rax*4]
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	addss	xmm0, xmm1
	mov	eax, DWORD PTR -468[rbp]
	cdqe
	movss	DWORD PTR -428[rbp+rax*4], xmm0
	mov	eax, DWORD PTR -464[rbp]
	cdqe
	mov	eax, DWORD PTR -416[rbp+rax*4]
	cmp	DWORD PTR -460[rbp], eax
	jne	.L8
	mov	eax, DWORD PTR -468[rbp]
	cdqe
	movss	xmm0, DWORD PTR -428[rbp+rax*4]
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, DWORD PTR -460[rbp]
	divss	xmm0, xmm1
	mov	eax, DWORD PTR -468[rbp]
	cdqe
	movss	DWORD PTR -428[rbp+rax*4], xmm0
	add	DWORD PTR -468[rbp], 1
	mov	eax, DWORD PTR -464[rbp]
	cdqe
	mov	eax, DWORD PTR -416[rbp+rax*4]
	add	DWORD PTR -464[rbp], eax
	jmp	.L9
.L8:
	add	DWORD PTR -460[rbp], 1
.L7:
	mov	eax, DWORD PTR -464[rbp]
	cdqe
	mov	eax, DWORD PTR -416[rbp+rax*4]
	cmp	DWORD PTR -460[rbp], eax
	jle	.L10
.L9:
	add	DWORD PTR -464[rbp], 1
.L6:
	mov	eax, DWORD PTR -464[rbp]
	cmp	eax, DWORD PTR -472[rbp]
	jl	.L11
	mov	DWORD PTR -456[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -456[rbp]
	cdqe
	movss	xmm0, DWORD PTR -428[rbp+rax*4]
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, xmm0
	movq	rdx, xmm2
	mov	eax, DWORD PTR -456[rbp]
	movq	xmm0, rdx
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 1
	call	printf@PLT
	add	DWORD PTR -456[rbp], 1
.L12:
	mov	eax, DWORD PTR -456[rbp]
	cmp	eax, DWORD PTR -468[rbp]
	jl	.L13
	mov	rax, QWORD PTR -440[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	"479539.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"w\000"
	.align	2
.LC1:
	.ascii	"problem_10_input.txt\000"
	.align	2
.LC2:
	.ascii	"Could not open samedata.txt!\000"
	.align	2
.LC3:
	.ascii	"5 96 87 78 93 21 4 92 82 85 87 6 72 69 85 75 81 73\000"
	.align	2
.LC4:
	.ascii	"r\000"
	.align	2
.LC5:
	.ascii	"Could not open homework.txt!\000"
	.align	2
.LC6:
	.ascii	"%d\000"
	.global	__aeabi_i2f
	.global	__aeabi_fadd
	.global	__aeabi_fdiv
	.global	__aeabi_f2d
	.align	2
.LC7:
	.ascii	"average[%d] : %.2f\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 = 456
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #460
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-464]
	mov	r3, #0
	str	r3, [fp, #-440]
	mov	r3, #0
	str	r3, [fp, #-460]
	mov	r3, #0
	str	r3, [fp, #-456]
	sub	r3, fp, #416
	mov	r2, #400
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #428
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	mov	r3, #0
	str	r3, [fp, #-436]
	mov	r3, #0
	str	r3, [fp, #-432]
	ldr	r1, .L16+4
	ldr	r0, .L16+8
	bl	fopen
	str	r0, [fp, #-436]
	ldr	r3, [fp, #-436]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L16+12
	bl	puts
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-436]
	mov	r2, #50
	mov	r1, #1
	ldr	r0, .L16+16
	bl	fwrite
	ldr	r0, [fp, #-436]
	bl	fclose
	ldr	r1, .L16+20
	ldr	r0, .L16+8
	bl	fopen
	str	r0, [fp, #-432]
	ldr	r3, [fp, #-432]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L16+24
	bl	puts
	mov	r0, #1
	bl	exit
.L5:
	ldr	r2, [fp, #-464]
	ldr	r3, [fp, #-460]
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-404]
	ldr	r3, [fp, #-460]
	add	r3, r3, #1
	str	r3, [fp, #-460]
.L4:
	sub	r3, fp, #464
	mov	r2, r3
	ldr	r1, .L16+28
	ldr	r0, [fp, #-432]
	bl	__isoc99_fscanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L5
	mov	r3, #0
	str	r3, [fp, #-452]
	b	.L6
.L11:
	mov	r3, #1
	str	r3, [fp, #-448]
	b	.L7
.L10:
	ldr	r3, [fp, #-456]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r4, [r3, #-416]	@ float
	ldr	r2, [fp, #-452]
	ldr	r3, [fp, #-448]
	add	r3, r2, r3
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-404]
	mov	r0, r3
	bl	__aeabi_i2f
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	__aeabi_fadd
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-456]
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-416]	@ float
	ldr	r3, [fp, #-452]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-404]
	ldr	r2, [fp, #-448]
	cmp	r2, r3
	bne	.L8
	ldr	r3, [fp, #-456]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r4, [r3, #-416]	@ float
	ldr	r0, [fp, #-448]
	bl	__aeabi_i2f
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	__aeabi_fdiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-456]
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-416]	@ float
	ldr	r3, [fp, #-456]
	add	r3, r3, #1
	str	r3, [fp, #-456]
	ldr	r3, [fp, #-452]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-404]
	ldr	r2, [fp, #-452]
	add	r3, r2, r3
	str	r3, [fp, #-452]
	b	.L9
.L8:
	ldr	r3, [fp, #-448]
	add	r3, r3, #1
	str	r3, [fp, #-448]
.L7:
	ldr	r3, [fp, #-452]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-404]
	ldr	r2, [fp, #-448]
	cmp	r2, r3
	ble	.L10
.L9:
	ldr	r3, [fp, #-452]
	add	r3, r3, #1
	str	r3, [fp, #-452]
.L6:
	ldr	r2, [fp, #-452]
	ldr	r3, [fp, #-460]
	cmp	r2, r3
	blt	.L11
	mov	r3, #0
	str	r3, [fp, #-444]
	b	.L12
.L13:
	ldr	r3, [fp, #-444]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-416]	@ float
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-444]
	ldr	r0, .L16+32
	bl	printf
	ldr	r3, [fp, #-444]
	add	r3, r3, #1
	str	r3, [fp, #-444]
.L12:
	ldr	r2, [fp, #-444]
	ldr	r3, [fp, #-456]
	cmp	r2, r3
	blt	.L13
	ldr	r0, [fp, #-432]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
