	.file	"125852.c"
	.intel_syntax noprefix
	.text
	.globl	ARR_LEN
	.section	.rodata
	.align 4
	.type	ARR_LEN, @object
	.size	ARR_LEN, 4
ARR_LEN:
	.long	1000
	.globl	arr
	.bss
	.align 32
	.type	arr, @object
	.size	arr, 4000
arr:
	.zero	4000
	.text
	.globl	myFun
	.type	myFun, @function
myFun:
.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	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -24[rbp], 0
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -20[rbp], eax
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, arr[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	DWORD PTR -24[rbp], eax
	add	DWORD PTR -20[rbp], 1
.L2:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L3
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	myFun, .-myFun
	.section	.rodata
	.align 8
.LC0:
	.string	"sum1 = %d, sum2 = %d, sum = %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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -52[rbp], 0
	jmp	.L6
.L7:
	call	rand@PLT
	mov	ecx, eax
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, arr[rip]
	mov	DWORD PTR [rcx+rax], edx
	add	DWORD PTR -52[rbp], 1
.L6:
	mov	eax, 1000
	cmp	DWORD PTR -52[rbp], eax
	jl	.L7
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], 500
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 500
	mov	DWORD PTR -16[rbp], 1000
	mov	DWORD PTR -12[rbp], 0
	lea	rdx, -32[rbp]
	lea	rax, -48[rbp]
	mov	rcx, rdx
	lea	rdx, myFun[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rdx, -20[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	lea	rdx, myFun[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -12[rbp]
	lea	ecx, [rdx+rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	"125852.c"
	.text
	.global	ARR_LEN
	.section	.rodata
	.align	2
	.type	ARR_LEN, %object
	.size	ARR_LEN, 4
ARR_LEN:
	.word	1000
	.comm	arr,4000,4
	.text
	.align	2
	.global	myFun
	.syntax unified
	.arm
	.fpu softvfp
	.type	myFun, %function
myFun:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #36
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-20]
	b	.L2
.L3:
	ldr	r2, .L5
	ldr	r3, [fp, #-20]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L2:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L3
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #8]
	mov	r3, #0
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L6:
	.align	2
.L5:
	.word	arr
	.size	myFun, .-myFun
	.section	.rodata
	.align	2
.LC1:
	.ascii	"sum1 = %d, sum2 = %d, sum = %d\012\000"
	.align	2
.LC0:
	.word	500
	.word	1000
	.word	0
	.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 = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L8
.L9:
	bl	rand
	mov	r1, r0
	ldr	r3, .L12+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	ldr	r1, .L12+8
	ldr	r3, [fp, #-36]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L8:
	mov	r2, #1000
	ldr	r3, [fp, #-36]
	cmp	r3, r2
	blt	.L9
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #500
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r2, .L12+12
	sub	r3, fp, #20
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	sub	r3, fp, #32
	sub	r0, fp, #44
	ldr	r2, .L12+16
	mov	r1, #0
	bl	pthread_create
	sub	r3, fp, #20
	sub	r0, fp, #40
	ldr	r2, .L12+16
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-44]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-40]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-12]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, r0
	ldr	r0, .L12+20
	bl	printf
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC2
	.word	1717986919
	.word	arr
	.word	.LC0
	.word	myFun
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
