	.file	"28261604.c"
	.intel_syntax noprefix
	.text
	.globl	dot_product
	.type	dot_product, @function
dot_product:
.LFB6:
	.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	pxor	xmm0, xmm0
	movsd	QWORD PTR -8[rbp], xmm0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movsd	xmm1, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm1
	movsd	xmm1, QWORD PTR -8[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	add	DWORD PTR -12[rbp], 1
.L2:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L3
	movsd	xmm0, QWORD PTR -8[rbp]
	movq	rax, xmm0
	movq	xmm0, rax
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dot_product, .-dot_product
	.section	.rodata
.LC1:
	.string	"malloc failed for ar1\n"
.LC2:
	.string	"malloc failed for ar2\n"
	.align 8
.LC4:
	.string	"scalar: %0.3f; elapsed [\302\265s]: %d\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, 112
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 80000000
	call	malloc@PLT
	mov	QWORD PTR -80[rbp], rax
	mov	edi, 80000000
	call	malloc@PLT
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -80[rbp], 0
	jne	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L11
.L6:
	cmp	QWORD PTR -72[rbp], 0
	jne	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L11
.L8:
	mov	edi, 0
	mov	eax, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	DWORD PTR -84[rbp], 0
	jmp	.L9
.L10:
	call	rand@PLT
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	movsd	xmm1, QWORD PTR .LC3[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR [rax], xmm0
	call	rand@PLT
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movsd	xmm1, QWORD PTR .LC3[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR [rax], xmm0
	add	DWORD PTR -84[rbp], 1
.L9:
	cmp	DWORD PTR -84[rbp], 9999999
	jle	.L10
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -32[rbp]
	imul	rdx, rax, 1000000
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -64[rbp], rax
	mov	rcx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, 10000000
	mov	rsi, rcx
	mov	rdi, rax
	call	dot_product
	movq	rax, xmm0
	mov	QWORD PTR -56[rbp], rax
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -32[rbp]
	imul	rdx, rax, 1000000
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	sub	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rdx
	movq	xmm0, rax
	lea	rdi, .LC4[rip]
	mov	eax, 1
	call	printf@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	edi, 0
	call	exit@PLT
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	-4194304
	.long	1105199103
	.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	"28261604.c"
	.text
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.align	2
	.global	dot_product
	.syntax unified
	.arm
	.fpu softvfp
	.type	dot_product, %function
dot_product:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L3:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L3
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	dot_product, .-dot_product
	.section	.rodata
	.align	2
.LC0:
	.ascii	"malloc failed for ar1\012\000"
	.align	2
.LC1:
	.ascii	"malloc failed for ar2\012\000"
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.align	2
.LC2:
	.ascii	"scalar: %0.3f; elapsed [\302\265s]: %d\012\000"
	.align	2
.LC3:
	.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, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #68
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r0, .L13+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r0, .L13+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L13+8
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L13+12
	bl	fwrite
	mov	r3, #1
	b	.L11
.L6:
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L13+8
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L13+16
	bl	fwrite
	mov	r3, #1
	b	.L11
.L8:
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L9
.L10:
	bl	rand
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-56]
	add	r4, r2, r3
	ldr	r2, .L13+20
	ldr	r3, .L13+24
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	bl	rand
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-52]
	add	r4, r2, r3
	ldr	r2, .L13+20
	ldr	r3, .L13+24
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L9:
	ldr	r3, [fp, #-60]
	ldr	r2, .L13+28
	cmp	r3, r2
	ble	.L10
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r1, [fp, #-24]
	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	r3, r2, r3
	str	r3, [fp, #-48]
	ldr	r2, .L13+32
	ldr	r1, [fp, #-52]
	ldr	r0, [fp, #-56]
	bl	dot_product
	str	r0, [fp, #-36]
	str	r1, [fp, #-32]
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r1, [fp, #-24]
	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	r3, r2, r3
	str	r3, [fp, #-44]
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-48]
	sub	r3, r2, r3
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	str	r3, [sp]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	ldr	r0, .L13+36
	bl	printf
	ldr	r0, [fp, #-56]
	bl	free
	ldr	r0, [fp, #-52]
	bl	free
	mov	r0, #0
	bl	exit
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC3
	.word	80000000
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	-4194304
	.word	1105199103
	.word	9999999
	.word	10000000
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
