	.file	"678328.c"
	.intel_syntax noprefix
	.text
	.globl	row_sums
	.type	row_sums, @function
row_sums:
.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 -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	QWORD PTR -24[rbp], 0
	jmp	.L2
.L5:
	pxor	xmm0, xmm0
	movsd	QWORD PTR -8[rbp], xmm0
	mov	QWORD PTR -16[rbp], 0
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	sal	rax, 3
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	movsd	xmm1, QWORD PTR -8[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	add	QWORD PTR -16[rbp], 1
.L3:
	mov	rax, QWORD PTR -16[rbp]
	cmp	rax, QWORD PTR -64[rbp]
	jb	.L4
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	add	QWORD PTR -24[rbp], 1
.L2:
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -56[rbp]
	jb	.L5
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	row_sums, .-row_sums
	.globl	col_sums
	.type	col_sums, @function
col_sums:
.LFB7:
	.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 -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	QWORD PTR -16[rbp], 0
	jmp	.L7
.L10:
	pxor	xmm0, xmm0
	movsd	QWORD PTR -8[rbp], xmm0
	mov	QWORD PTR -24[rbp], 0
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	sal	rax, 3
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	movsd	xmm1, QWORD PTR -8[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	add	QWORD PTR -24[rbp], 1
.L8:
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -56[rbp]
	jb	.L9
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	add	QWORD PTR -16[rbp], 1
.L7:
	mov	rax, QWORD PTR -16[rbp]
	cmp	rax, QWORD PTR -64[rbp]
	jb	.L10
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	col_sums, .-col_sums
	.section	.rodata
.LC3:
	.string	"Time to sum rows: %g s\n"
.LC4:
	.string	"Time to sum cols: %g s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 8000
	call	malloc@PLT
	mov	QWORD PTR -88[rbp], rax
	mov	edi, 8000000
	call	malloc@PLT
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	jmp	.L12
.L15:
	mov	rax, QWORD PTR -96[rbp]
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -112[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -80[rbp]
	add	rdx, rcx
	mov	QWORD PTR [rax], rdx
	mov	QWORD PTR -104[rbp], 0
	jmp	.L13
.L14:
	mov	rax, QWORD PTR -112[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -104[rbp]
	sal	rax, 3
	add	rax, rdx
	movsd	xmm0, QWORD PTR .LC1[rip]
	movsd	QWORD PTR [rax], xmm0
	add	QWORD PTR -104[rbp], 1
.L13:
	cmp	QWORD PTR -104[rbp], 999
	jbe	.L14
	add	QWORD PTR -112[rbp], 1
	add	QWORD PTR -96[rbp], 1000
.L12:
	cmp	QWORD PTR -112[rbp], 999
	jbe	.L15
	mov	edi, 8000
	call	malloc@PLT
	mov	QWORD PTR -72[rbp], rax
	lea	rax, -48[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	timespec_get@PLT
	mov	rsi, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	ecx, 1000
	mov	edx, 1000
	mov	rdi, rax
	call	row_sums
	lea	rax, -32[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	timespec_get@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	sub	rax, rdx
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	sub	rax, rdx
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, rax
	movsd	xmm0, QWORD PTR .LC2[rip]
	mulsd	xmm0, xmm2
	addsd	xmm0, xmm1
	movsd	QWORD PTR -64[rbp], xmm0
	mov	edi, 8000
	call	malloc@PLT
	mov	QWORD PTR -72[rbp], rax
	lea	rax, -48[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	timespec_get@PLT
	mov	rsi, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	ecx, 1000
	mov	edx, 1000
	mov	rdi, rax
	call	col_sums
	lea	rax, -32[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	timespec_get@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	sub	rax, rdx
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	sub	rax, rdx
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, rax
	movsd	xmm0, QWORD PTR .LC2[rip]
	mulsd	xmm0, xmm2
	addsd	xmm0, xmm1
	movsd	QWORD PTR -56[rbp], xmm0
	mov	rax, QWORD PTR -64[rbp]
	movq	xmm0, rax
	lea	rdi, .LC3[rip]
	mov	eax, 1
	call	printf@PLT
	mov	rax, QWORD PTR -56[rbp]
	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 -88[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC2:
	.long	-400107883
	.long	1041313291
	.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	"678328.c"
	.text
	.global	__aeabi_dadd
	.align	2
	.global	row_sums
	.syntax unified
	.arm
	.fpu softvfp
	.type	row_sums, %function
row_sums:
	@ 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]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L2
.L5:
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L3
.L4:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	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]
.L3:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bcc	.L4
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-24]
	add	r1, r2, r3
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L2:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bcc	.L5
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	row_sums, .-row_sums
	.align	2
	.global	col_sums
	.syntax unified
	.arm
	.fpu softvfp
	.type	col_sums, %function
col_sums:
	@ 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]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L7
.L10:
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L8
.L9:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	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, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L8:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bcc	.L9
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-24]
	add	r1, r2, r3
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L7:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bcc	.L10
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	col_sums, .-col_sums
	.global	__aeabi_i2d
	.global	__aeabi_dmul
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Time to sum rows: %g s\012\000"
	.align	2
.LC1:
	.ascii	"Time to sum cols: %g s\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #64
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r0, #4000
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-64]
	ldr	r0, .L18+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-76]
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L12
.L15:
	ldr	r3, [fp, #-68]
	lsl	r2, r3, #3
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-64]
	add	r3, r1, r3
	ldr	r1, [fp, #-60]
	add	r2, r1, r2
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L13
.L14:
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-72]
	lsl	r3, r3, #3
	add	r1, r2, r3
	mov	r2, #0
	ldr	r3, .L18+8
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L13:
	ldr	r3, [fp, #-72]
	cmp	r3, #1000
	bcc	.L14
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-68]
	add	r3, r3, #1000
	str	r3, [fp, #-68]
.L12:
	ldr	r3, [fp, #-76]
	cmp	r3, #1000
	bcc	.L15
	mov	r0, #8000
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-56]
	sub	r3, fp, #32
	mov	r1, #1
	mov	r0, r3
	bl	timespec_get
	mov	r3, #1000
	mov	r2, #1000
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	row_sums
	sub	r3, fp, #24
	mov	r1, #1
	mov	r0, r3
	bl	timespec_get
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L18+12
	ldr	r3, .L18+16
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	mov	r0, #8000
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-56]
	sub	r3, fp, #32
	mov	r1, #1
	mov	r0, r3
	bl	timespec_get
	mov	r3, #1000
	mov	r2, #1000
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	col_sums
	sub	r3, fp, #24
	mov	r1, #1
	mov	r0, r3
	bl	timespec_get
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L18+12
	ldr	r3, .L18+16
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	ldr	r0, .L18+20
	bl	printf
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	ldr	r0, .L18+24
	bl	printf
	ldr	r0, [fp, #-60]
	bl	free
	ldr	r0, [fp, #-64]
	bl	free
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC2
	.word	8000000
	.word	1072693248
	.word	-400107883
	.word	1041313291
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
