	.file	"469060.c"
	.intel_syntax noprefix
	.text
	.globl	mutex
	.bss
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.globl	sum
	.align 8
	.type	sum, @object
	.size	sum, 8
sum:
	.zero	8
	.section	.rodata
	.align 8
.LC0:
	.string	"Add from %d to %d results in %d\n"
	.text
	.globl	cul
	.type	cul, @function
cul:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -12[rbp], eax
	mov	QWORD PTR -8[rbp], 0
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -20[rbp], eax
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	QWORD PTR -8[rbp], rax
	add	DWORD PTR -20[rbp], 1
.L2:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jle	.L3
	mov	rcx, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rdx, QWORD PTR sum[rip]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	QWORD PTR sum[rip], rax
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE6:
	.size	cul, .-cul
	.section	.rodata
.LC1:
	.string	"input error"
.LC2:
	.string	"The sum is : %d\n"
.LC3:
	.string	"Calculate th exit in %fs\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
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 184
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -148[rbp], edi
	mov	QWORD PTR -160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	cmp	DWORD PTR -148[rbp], 2
	jg	.L5
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L6
.L5:
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	pthread_mutex_init@PLT
	call	clock@PLT
	mov	QWORD PTR -120[rbp], rax
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -144[rbp], eax
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -132[rbp], eax
	mov	edx, DWORD PTR -144[rbp]
	movsx	rax, edx
	sub	rax, 1
	mov	QWORD PTR -112[rbp], rax
	movsx	rax, edx
	mov	QWORD PTR -176[rbp], rax
	mov	QWORD PTR -168[rbp], 0
	movsx	rax, edx
	mov	QWORD PTR -192[rbp], rax
	mov	QWORD PTR -184[rbp], 0
	movsx	rax, edx
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L7:
	cmp	rsp, rdx
	je	.L8
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L7
.L8:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L9
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L9:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -104[rbp], rax
	mov	eax, DWORD PTR -144[rbp]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -96[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -208[rbp], rdx
	mov	QWORD PTR -200[rbp], 0
	movsx	rdx, eax
	mov	QWORD PTR -224[rbp], rdx
	mov	QWORD PTR -216[rbp], 0
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L10:
	cmp	rsp, rdx
	je	.L11
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L10
.L11:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L12
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L12:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -88[rbp], rax
	mov	eax, DWORD PTR -132[rbp]
	cdq
	idiv	DWORD PTR -144[rbp]
	add	eax, 1
	mov	DWORD PTR -128[rbp], eax
	mov	eax, DWORD PTR -144[rbp]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -80[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L13:
	cmp	rsp, rdx
	je	.L14
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L13
.L14:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L15
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L15:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -72[rbp], rax
	mov	DWORD PTR -124[rbp], 0
	mov	DWORD PTR -136[rbp], 0
	jmp	.L16
.L17:
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR -136[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -136[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	eax, DWORD PTR -136[rbp]
	imul	eax, DWORD PTR -128[rbp]
	mov	edx, 1
	test	eax, eax
	mov	ecx, edx
	cmovg	ecx, eax
	mov	rax, QWORD PTR -88[rbp]
	mov	edx, DWORD PTR -136[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*8], ecx
	mov	eax, DWORD PTR -136[rbp]
	add	eax, 1
	imul	eax, DWORD PTR -128[rbp]
	sub	eax, 1
	cmp	DWORD PTR -132[rbp], eax
	cmovle	eax, DWORD PTR -132[rbp]
	mov	ecx, eax
	mov	rax, QWORD PTR -88[rbp]
	mov	edx, DWORD PTR -136[rbp]
	movsx	rdx, edx
	mov	DWORD PTR 4[rax+rdx*8], ecx
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -88[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, cul[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -124[rbp], eax
	add	DWORD PTR -136[rbp], 1
.L16:
	mov	eax, DWORD PTR -136[rbp]
	cmp	eax, DWORD PTR -144[rbp]
	jl	.L17
	mov	DWORD PTR -140[rbp], 0
	jmp	.L18
.L19:
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR -140[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -140[rbp], 1
.L18:
	mov	eax, DWORD PTR -140[rbp]
	cmp	eax, DWORD PTR -144[rbp]
	jl	.L19
	call	clock@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR sum[rip]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -64[rbp]
	sub	rax, QWORD PTR -120[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	movq	rax, xmm1
	movq	xmm0, rax
	lea	rdi, .LC3[rip]
	mov	eax, 1
	call	printf@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_destroy@PLT
	mov	eax, 0
.L6:
	mov	rsp, rbx
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.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	"469060.c"
	.text
	.comm	mutex,24,4
	.global	sum
	.bss
	.align	3
	.type	sum, %object
	.size	sum, 8
sum:
	.space	8
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Add from %d to %d results in %d\012\000"
	.text
	.align	2
	.global	cul
	.syntax unified
	.arm
	.fpu softvfp
	.type	cul, %function
cul:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #40
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-32]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-40]
	b	.L2
.L3:
	ldr	r3, [fp, #-40]
	mov	r2, r3
	asr	r3, r2, #31
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	adds	r6, r0, r2
	adc	r7, r1, r3
	str	r6, [fp, #-28]
	str	r7, [fp, #-24]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L2:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	ble	.L3
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-36]
	ldr	r0, .L4
	bl	printf
	ldr	r0, .L4+4
	bl	pthread_mutex_lock
	ldr	r3, .L4+8
	ldmia	r3, {r0-r1}
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	adds	r4, r0, r2
	adc	r5, r1, r3
	ldr	r3, .L4+8
	stm	r3, {r4-r5}
	ldr	r0, .L4+4
	bl	pthread_mutex_unlock
	mov	r0, #0
	bl	pthread_exit
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	mutex
	.word	sum
	.size	cul, .-cul
	.section	.rodata
	.align	2
.LC1:
	.ascii	"input error\000"
	.global	__aeabi_idiv
	.align	2
.LC2:
	.ascii	"The sum is : %d\012\000"
	.global	__aeabi_i2d
	.align	2
.LC3:
	.ascii	"Calculate th exit in %fs\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #76
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, [fp, #-80]
	cmp	r3, #2
	bgt	.L7
	ldr	r0, .L15+4
	bl	puts
	mov	r3, #0
	b	.L8
.L7:
	mov	r1, #0
	ldr	r0, .L15+8
	bl	pthread_mutex_init
	bl	clock
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-84]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-84]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-56]
	ldr	ip, [fp, #-72]
	sub	r3, ip, #1
	str	r3, [fp, #-52]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-48]
	ldr	ip, [fp, #-72]
	sub	r3, ip, #1
	str	r3, [fp, #-44]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	mov	r3, ip
	lsl	r3, r3, #3
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-40]
	ldr	r1, [fp, #-72]
	ldr	r0, [fp, #-56]
	bl	__aeabi_idiv
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	ip, [fp, #-72]
	sub	r3, ip, #1
	str	r3, [fp, #-32]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L9
.L10:
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-60]
	ldr	r1, [fp, #-60]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-36]
	mul	r3, r2, r3
	cmp	r3, #1
	movge	r1, r3
	movlt	r1, #1
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-60]
	str	r1, [r3, r2, lsl #3]
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	ldr	r2, [fp, #-36]
	mul	r3, r2, r3
	sub	r2, r3, #1
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	movlt	r2, r2
	movge	r2, r3
	ldr	r1, [fp, #-40]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #3
	add	r3, r1, r3
	str	r2, [r3, #4]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r0, r2, r3
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, .L15+12
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L9:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-72]
	cmp	r2, r3
	blt	.L10
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L11
.L12:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-64]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L11:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-72]
	cmp	r2, r3
	blt	.L12
	bl	clock
	str	r0, [fp, #-20]
	ldr	r3, .L15+16
	ldmia	r3, {r2-r3}
	ldr	r0, .L15+20
	bl	printf
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-68]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L15+24
	bl	printf
	ldr	r0, .L15+8
	bl	pthread_mutex_destroy
	mov	r3, #0
.L8:
	mov	sp, r4
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC4
	.word	.LC1
	.word	mutex
	.word	cul
	.word	sum
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
