	.file	"666586.c"
	.intel_syntax noprefix
	.text
	.globl	dotstr
	.bss
	.align 32
	.type	dotstr, @object
	.size	dotstr, 32
dotstr:
	.zero	32
	.globl	mutexsum
	.align 32
	.type	mutexsum, @object
	.size	mutexsum, 40
mutexsum:
	.zero	40
	.section	.rodata
	.align 8
.LC1:
	.string	"Thread %ld did %d to %d: sum=%f global sum=%f\n"
	.text
	.globl	dotprod
	.type	dotprod, @function
dotprod:
.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, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR dotstr[rip+24]
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -44[rbp]
	imul	eax, edx
	mov	DWORD PTR -40[rbp], eax
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -44[rbp]
	add	eax, edx
	mov	DWORD PTR -36[rbp], eax
	mov	rax, QWORD PTR dotstr[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR dotstr[rip+8]
	mov	QWORD PTR -8[rbp], rax
	pxor	xmm0, xmm0
	movsd	QWORD PTR -32[rbp], xmm0
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR -48[rbp], eax
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movsd	xmm1, QWORD PTR [rax]
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm1
	movsd	xmm1, QWORD PTR -32[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -32[rbp], xmm0
	add	DWORD PTR -48[rbp], 1
.L2:
	mov	eax, DWORD PTR -48[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L3
	lea	rdi, mutexsum[rip]
	call	pthread_mutex_lock@PLT
	movsd	xmm0, QWORD PTR dotstr[rip+16]
	addsd	xmm0, QWORD PTR -32[rbp]
	movsd	QWORD PTR dotstr[rip+16], xmm0
	movsd	xmm0, QWORD PTR dotstr[rip+16]
	mov	rsi, QWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	movapd	xmm1, xmm0
	movq	xmm0, rsi
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 2
	call	printf@PLT
	lea	rdi, mutexsum[rip]
	call	pthread_mutex_unlock@PLT
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE6:
	.size	dotprod, .-dotprod
	.section	.rodata
.LC3:
	.string	"Sum = %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, 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 3200000
	call	malloc@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	edi, 3200000
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	DWORD PTR -88[rbp], 0
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR .LC2[rip]
	movsd	QWORD PTR [rax], xmm0
	mov	edx, DWORD PTR -88[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -64[rbp]
	add	rdx, rcx
	movsd	xmm0, QWORD PTR [rax]
	movsd	QWORD PTR [rdx], xmm0
	add	DWORD PTR -88[rbp], 1
.L5:
	cmp	DWORD PTR -88[rbp], 399999
	jle	.L6
	mov	DWORD PTR dotstr[rip+24], 100000
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR dotstr[rip], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR dotstr[rip+8], rax
	pxor	xmm0, xmm0
	movsd	QWORD PTR dotstr[rip+16], xmm0
	mov	esi, 0
	lea	rdi, mutexsum[rip]
	call	pthread_mutex_init@PLT
	mov	QWORD PTR -72[rbp], 0
	jmp	.L7
.L8:
	mov	rax, QWORD PTR -72[rbp]
	lea	rcx, -48[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	sal	rdx, 3
	lea	rdi, [rcx+rdx]
	mov	rcx, rax
	lea	rdx, dotprod[rip]
	mov	esi, 0
	call	pthread_create@PLT
	add	QWORD PTR -72[rbp], 1
.L7:
	cmp	QWORD PTR -72[rbp], 3
	jle	.L8
	mov	DWORD PTR -84[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	mov	rax, QWORD PTR -48[rbp+rax*8]
	lea	rdx, -80[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -84[rbp], 1
.L9:
	cmp	DWORD PTR -84[rbp], 3
	jle	.L10
	mov	rax, QWORD PTR dotstr[rip+16]
	movq	xmm0, rax
	lea	rdi, .LC3[rip]
	mov	eax, 1
	call	printf@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
	lea	rdi, mutexsum[rip]
	call	pthread_mutex_destroy@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, 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
.LC2:
	.long	0
	.long	1072693248
	.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	"666586.c"
	.text
	.comm	dotstr,24,8
	.comm	mutexsum,24,4
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Thread %ld did %d to %d: sum=%f global sum=%f\012\000"
	.text
	.align	2
	.global	dotprod
	.syntax unified
	.arm
	.fpu softvfp
	.type	dotprod, %function
dotprod:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-36]
	ldr	r3, .L4
	ldr	r3, [r3, #16]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	mul	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, .L4
	ldr	r3, [r3, #4]
	str	r3, [fp, #-16]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-40]
	b	.L2
.L3:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-16]
	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, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L2:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L3
	ldr	r0, .L4+4
	bl	pthread_mutex_lock
	ldr	r3, .L4
	add	r1, r3, #8
	ldmia	r1, {r0-r1}
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L4
	str	r2, [r1, #8]
	str	r3, [r1, #12]
	ldr	r3, .L4
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-36]
	ldr	r0, .L4+8
	bl	printf
	ldr	r0, .L4+4
	bl	pthread_mutex_unlock
	mov	r0, #0
	bl	pthread_exit
.L5:
	.align	2
.L4:
	.word	dotstr
	.word	mutexsum
	.word	.LC0
	.size	dotprod, .-dotprod
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Sum = %f\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 = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L15+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r0, .L15+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L7
.L8:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	mov	r0, #0
	ldr	r1, .L15+8
	stm	r3, {r0-r1}
	ldr	r2, [fp, #-44]
	lsl	r2, r2, #3
	ldr	r1, [fp, #-32]
	add	r1, r1, r2
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L7:
	ldr	r3, [fp, #-44]
	ldr	r2, .L15+12
	cmp	r3, r2
	blt	.L8
	ldr	r3, .L15+16
	ldr	r2, .L15+20
	str	r2, [r3, #16]
	ldr	r2, .L15+16
	ldr	r3, [fp, #-32]
	str	r3, [r2]
	ldr	r2, .L15+16
	ldr	r3, [fp, #-28]
	str	r3, [r2, #4]
	ldr	r1, .L15+16
	mov	r2, #0
	mov	r3, #0
	str	r2, [r1, #8]
	str	r3, [r1, #12]
	mov	r1, #0
	ldr	r0, .L15+24
	bl	pthread_mutex_init
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L9
.L10:
	sub	r2, fp, #24
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	add	r0, r2, r3
	ldr	r3, [fp, #-40]
	ldr	r2, .L15+28
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L9:
	ldr	r3, [fp, #-40]
	cmp	r3, #3
	ble	.L10
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L11
.L12:
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	sub	r2, fp, #48
	mov	r1, r2
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L11:
	ldr	r3, [fp, #-36]
	cmp	r3, #3
	ble	.L12
	ldr	r3, .L15+16
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	ldr	r0, .L15+32
	bl	printf
	ldr	r0, [fp, #-32]
	bl	free
	ldr	r0, [fp, #-28]
	bl	free
	ldr	r0, .L15+24
	bl	pthread_mutex_destroy
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC2
	.word	3200000
	.word	1072693248
	.word	400000
	.word	dotstr
	.word	100000
	.word	mutexsum
	.word	dotprod
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
