	.file	"539719.c"
	.intel_syntax noprefix
	.text
	.globl	sum
	.bss
	.align 4
	.type	sum, @object
	.size	sum, 4
sum:
	.zero	4
	.globl	mutex
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.text
	.globl	sumfunc1
	.type	sumfunc1, @function
sumfunc1:
.LFB0:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR sum[rip]
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, eax
	movsd	QWORD PTR -32[rbp], xmm2
	pxor	xmm3, xmm3
	cvtsi2sd	xmm3, DWORD PTR -4[rbp]
	movq	rax, xmm3
	movq	xmm0, rax
	call	sin@PLT
	movsd	QWORD PTR -40[rbp], xmm0
	pxor	xmm4, xmm4
	cvtsi2sd	xmm4, DWORD PTR -4[rbp]
	movq	rax, xmm4
	movq	xmm0, rax
	call	sin@PLT
	movapd	xmm1, xmm0
	mulsd	xmm1, QWORD PTR -40[rbp]
	movsd	QWORD PTR -40[rbp], xmm1
	pxor	xmm6, xmm6
	cvtsi2sd	xmm6, DWORD PTR -4[rbp]
	movq	rax, xmm6
	movq	xmm0, rax
	call	cos@PLT
	movsd	QWORD PTR -48[rbp], xmm0
	pxor	xmm7, xmm7
	cvtsi2sd	xmm7, DWORD PTR -4[rbp]
	movq	rax, xmm7
	movq	xmm0, rax
	call	cos@PLT
	mulsd	xmm0, QWORD PTR -48[rbp]
	addsd	xmm0, QWORD PTR -40[rbp]
	addsd	xmm0, QWORD PTR -32[rbp]
	cvttsd2si	eax, xmm0
	mov	DWORD PTR sum[rip], eax
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	add	DWORD PTR -4[rbp], 1
.L2:
	cmp	DWORD PTR -4[rbp], 4999
	jle	.L3
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	sumfunc1, .-sumfunc1
	.globl	sumfunc2
	.type	sumfunc2, @function
sumfunc2:
.LFB1:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 5000
	cmp	DWORD PTR -4[rbp], 9999
	jg	.L6
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR sum[rip]
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, eax
	movsd	QWORD PTR -32[rbp], xmm2
	pxor	xmm3, xmm3
	cvtsi2sd	xmm3, DWORD PTR -4[rbp]
	movq	rax, xmm3
	movq	xmm0, rax
	call	sin@PLT
	movsd	QWORD PTR -40[rbp], xmm0
	pxor	xmm4, xmm4
	cvtsi2sd	xmm4, DWORD PTR -4[rbp]
	movq	rax, xmm4
	movq	xmm0, rax
	call	sin@PLT
	movapd	xmm1, xmm0
	mulsd	xmm1, QWORD PTR -40[rbp]
	movsd	QWORD PTR -40[rbp], xmm1
	pxor	xmm6, xmm6
	cvtsi2sd	xmm6, DWORD PTR -4[rbp]
	movq	rax, xmm6
	movq	xmm0, rax
	call	cos@PLT
	movsd	QWORD PTR -48[rbp], xmm0
	pxor	xmm7, xmm7
	cvtsi2sd	xmm7, DWORD PTR -4[rbp]
	movq	rax, xmm7
	movq	xmm0, rax
	call	cos@PLT
	mulsd	xmm0, QWORD PTR -48[rbp]
	addsd	xmm0, QWORD PTR -40[rbp]
	addsd	xmm0, QWORD PTR -32[rbp]
	cvttsd2si	eax, xmm0
	mov	DWORD PTR sum[rip], eax
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	jmp	.L5
.L6:
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	sumfunc2, .-sumfunc2
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	pthread_mutex_init@PLT
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, sumfunc1[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, sumfunc2[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	eax, DWORD PTR sum[rip]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"539719.c"
	.text
	.global	sum
	.bss
	.align	2
	.type	sum, %object
	.size	sum, 4
sum:
	.space	4
	.comm	mutex,24,4
	.global	__aeabi_i2d
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.global	__aeabi_d2iz
	.text
	.align	2
	.global	sumfunc1
	.syntax unified
	.arm
	.fpu softvfp
	.type	sumfunc1, %function
sumfunc1:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #16
	str	r0, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L2
.L3:
	ldr	r0, .L5
	bl	pthread_mutex_lock
	ldr	r3, .L5+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sin
	mov	r6, r0
	mov	r7, r1
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sin
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r8, r2
	mov	r9, r3
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	cos
	mov	r6, r0
	mov	r7, r1
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	cos
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r8
	mov	r1, r9
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	ldr	r2, .L5+4
	str	r3, [r2]
	ldr	r0, .L5
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L2:
	ldr	r3, [fp, #-32]
	ldr	r2, .L5+8
	cmp	r3, r2
	ble	.L3
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L6:
	.align	2
.L5:
	.word	mutex
	.word	sum
	.word	4999
	.size	sumfunc1, .-sumfunc1
	.align	2
	.global	sumfunc2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sumfunc2, %function
sumfunc2:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #16
	str	r0, [fp, #-40]
	ldr	r3, .L10
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	ldr	r2, .L10+4
	cmp	r3, r2
	bgt	.L8
	ldr	r0, .L10+8
	bl	pthread_mutex_lock
	ldr	r3, .L10+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sin
	mov	r6, r0
	mov	r7, r1
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sin
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r8, r2
	mov	r9, r3
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	cos
	mov	r6, r0
	mov	r7, r1
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	cos
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r8
	mov	r1, r9
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	ldr	r2, .L10+12
	str	r3, [r2]
	ldr	r0, .L10+8
	bl	pthread_mutex_unlock
	mov	r3, #0
	b	.L7
.L8:
.L7:
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L11:
	.align	2
.L10:
	.word	5000
	.word	9999
	.word	mutex
	.word	sum
	.size	sumfunc2, .-sumfunc2
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #0
	ldr	r0, .L15+4
	bl	pthread_mutex_init
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L15+8
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #12
	mov	r3, #0
	ldr	r2, .L15+12
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-12]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L15+16
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L15+20
	bl	printf
	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	.LC1
	.word	mutex
	.word	sumfunc1
	.word	sumfunc2
	.word	sum
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
