	.file	"38199.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"Error: unable to open file"
.LC2:
	.string	"%d"
.LC3:
	.string	"Cannot allocate memory. "
.LC4:
	.string	"%s"
	.text
	.globl	readvector
	.type	readvector, @function
readvector:
.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, 1200
	mov	QWORD PTR -1192[rbp], rdi
	mov	QWORD PTR -1200[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -1192[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1168[rbp], rax
	cmp	QWORD PTR -1168[rbp], 0
	jne	.L2
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rdx, QWORD PTR -1168[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	je	.L3
	mov	rdx, QWORD PTR -1200[rbp]
	lea	rax, -1040[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
.L3:
	mov	rax, QWORD PTR -1200[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -1160[rbp], rax
	cmp	QWORD PTR -1160[rbp], 0
	jne	.L4
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	DWORD PTR -1172[rbp], 0
	jmp	.L5
.L7:
	mov	rdx, QWORD PTR -1168[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	je	.L6
	lea	rdx, -1152[rbp]
	lea	rax, -1040[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
.L6:
	lea	rax, -1152[rbp]
	mov	rdi, rax
	call	atof@PLT
	mov	eax, DWORD PTR -1172[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -1160[rbp]
	add	rax, rdx
	cvtsd2ss	xmm0, xmm0
	movss	DWORD PTR [rax], xmm0
	add	DWORD PTR -1172[rbp], 1
.L5:
	mov	rax, QWORD PTR -1200[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -1172[rbp], eax
	jl	.L7
	mov	rax, QWORD PTR -1168[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -1160[rbp]
	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	readvector, .-readvector
	.section	.rodata
.LC5:
	.string	"usage: readvector <filename>"
.LC6:
	.string	"%f \n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -36[rbp], 2
	je	.L11
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L11:
	mov	DWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	readvector
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movss	xmm0, DWORD PTR [rax]
	pxor	xmm1, xmm1
	cvtss2sd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	lea	rdi, .LC6[rip]
	mov	eax, 1
	call	printf@PLT
	add	DWORD PTR -20[rbp], 1
.L12:
	mov	eax, DWORD PTR -24[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L13
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -16[rbp], 0
	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
.LFE7:
	.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	"38199.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"Error: unable to open file\000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"Cannot allocate memory. \000"
	.align	2
.LC4:
	.ascii	"%s\000"
	.global	__aeabi_d2f
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	readvector
	.syntax unified
	.arm
	.fpu softvfp
	.type	readvector, %function
readvector:
	@ args = 0, pretend = 0, frame = 1152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1152
	sub	sp, sp, #4
	str	r0, [fp, #-1160]
	str	r1, [fp, #-1164]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L10+4
	ldr	r0, [fp, #-1160]
	bl	fopen
	str	r0, [fp, #-1148]
	ldr	r3, [fp, #-1148]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L10+8
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-1148]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-1164]
	ldr	r1, .L10+12
	mov	r0, r3
	bl	__isoc99_sscanf
.L3:
	ldr	r3, [fp, #-1164]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-1144]
	ldr	r3, [fp, #-1144]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L10+16
	bl	puts
	mov	r0, #1
	bl	exit
.L4:
	mov	r3, #0
	str	r3, [fp, #-1152]
	b	.L5
.L7:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-1148]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	sub	r2, fp, #1120
	sub	r2, r2, #12
	sub	r2, r2, #8
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L10+20
	mov	r0, r3
	bl	__isoc99_sscanf
.L6:
	sub	r3, fp, #1120
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r0, r3
	bl	atof
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-1152]
	lsl	r1, r1, #2
	ldr	r0, [fp, #-1144]
	add	r4, r0, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2f
	mov	r3, r0
	str	r3, [r4]	@ float
	ldr	r3, [fp, #-1152]
	add	r3, r3, #1
	str	r3, [fp, #-1152]
.L5:
	ldr	r3, [fp, #-1164]
	ldr	r3, [r3]
	ldr	r2, [fp, #-1152]
	cmp	r2, r3
	blt	.L7
	ldr	r0, [fp, #-1148]
	bl	fclose
	ldr	r3, [fp, #-1144]
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	readvector, .-readvector
	.section	.rodata
	.align	2
.LC6:
	.ascii	"usage: readvector <filename>\000"
	.global	__aeabi_f2d
	.align	2
.LC7:
	.ascii	"%f \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 = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	beq	.L13
	ldr	r0, .L18+4
	bl	puts
	mov	r0, #0
	bl	exit
.L13:
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #20
	mov	r1, r2
	mov	r0, r3
	bl	readvector
	str	r0, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L14
.L15:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r3, [r3]	@ float
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L18+8
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L14:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L15
	ldr	r0, [fp, #-12]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC8
	.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
