	.file	"410086.c"
	.intel_syntax noprefix
	.text
	.local	count
	.comm	count,8,8
	.globl	mutex
	.bss
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.section	.rodata
	.align 8
.LC0:
	.string	"hello I'm thread %d with pthread_id %lu\n"
.LC1:
	.string	"goodbye I'm thread %d\n"
	.text
	.globl	thread_count
	.type	thread_count, @function
thread_count:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	call	pthread_self@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L2
.L3:
	add	DWORD PTR -8[rbp], 1
	add	DWORD PTR -12[rbp], 1
.L2:
	cmp	DWORD PTR -12[rbp], 99999
	jle	.L3
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR count[rip]
	add	rax, rdx
	mov	QWORD PTR count[rip], rax
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	thread_count, .-thread_count
	.section	.rodata
.LC2:
	.string	"count = %llu\n"
.LC4:
	.string	"count time is %g\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
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -104[rbp], 0
	lea	rax, -96[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	DWORD PTR -104[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	mov	edx, DWORD PTR -104[rbp]
	mov	DWORD PTR -64[rbp+rax*4], edx
	lea	rdx, -64[rbp]
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, thread_count[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	pthread_mutex_init@PLT
	add	DWORD PTR -104[rbp], 1
.L6:
	cmp	DWORD PTR -104[rbp], 3
	jle	.L7
	mov	DWORD PTR -104[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	mov	rax, QWORD PTR -48[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_destroy@PLT
	add	DWORD PTR -104[rbp], 1
.L8:
	cmp	DWORD PTR -104[rbp], 3
	jle	.L9
	mov	rax, QWORD PTR count[rip]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -80[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, QWORD PTR -96[rbp]
	sub	rax, rdx
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR -88[rbp]
	sub	rax, rdx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	movsd	xmm2, QWORD PTR .LC3[rip]
	divsd	xmm0, xmm2
	addsd	xmm0, xmm1
	cvtsd2ss	xmm0, xmm0
	movss	DWORD PTR -100[rbp], xmm0
	pxor	xmm3, xmm3
	cvtss2sd	xmm3, DWORD PTR -100[rbp]
	movq	rax, xmm3
	movq	xmm0, rax
	lea	rdi, .LC4[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1093567616
	.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	"410086.c"
	.text
	.local	count
	.comm	count,8,8
	.comm	mutex,24,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"hello I'm thread %d with pthread_id %lu\012\000"
	.align	2
.LC1:
	.ascii	"goodbye I'm thread %d\012\000"
	.text
	.align	2
	.global	thread_count
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_count, %function
thread_count:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	bl	pthread_self
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, .L5
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L2
.L3:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L2:
	ldr	r3, [fp, #-24]
	ldr	r2, .L5+4
	cmp	r3, r2
	blt	.L3
	ldr	r0, .L5+8
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-20]
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L5+12
	ldmia	r3, {r2-r3}
	adds	r4, r0, r2
	adc	r5, r1, r3
	ldr	r3, .L5+12
	stm	r3, {r4-r5}
	ldr	r0, .L5+8
	bl	pthread_mutex_unlock
	ldr	r1, [fp, #-16]
	ldr	r0, .L5+16
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	100000
	.word	mutex
	.word	count
	.word	.LC1
	.size	thread_count, .-thread_count
	.section	.rodata
	.align	2
.LC2:
	.ascii	"count = %llu\012\000"
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_dadd
	.global	__aeabi_d2f
	.global	__aeabi_f2d
	.align	2
.LC3:
	.ascii	"count time is %g\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, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #72
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-72]
	sub	r3, fp, #64
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L8
.L9:
	ldr	r3, [fp, #-72]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [fp, #-72]
	str	r2, [r3, #-20]
	sub	r2, fp, #48
	ldr	r3, [fp, #-72]
	lsl	r3, r3, #2
	add	r0, r2, r3
	sub	r2, fp, #32
	ldr	r3, [fp, #-72]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, .L14+4
	mov	r1, #0
	bl	pthread_create
	mov	r1, #0
	ldr	r0, .L14+8
	bl	pthread_mutex_init
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L8:
	ldr	r3, [fp, #-72]
	cmp	r3, #3
	ble	.L9
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L10
.L11:
	ldr	r3, [fp, #-72]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-36]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r0, .L14+8
	bl	pthread_mutex_destroy
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L10:
	ldr	r3, [fp, #-72]
	cmp	r3, #3
	ble	.L11
	ldr	r3, .L14+12
	ldmia	r3, {r2-r3}
	ldr	r0, .L14+16
	bl	printf
	sub	r3, fp, #56
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-64]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-60]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L14+20
	bl	__aeabi_ddiv
	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_d2f
	mov	r3, r0
	str	r3, [fp, #-68]	@ float
	ldr	r0, [fp, #-68]	@ float
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L14+24
	bl	printf
	mov	r3, #0
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC4
	.word	thread_count
	.word	mutex
	.word	count
	.word	.LC2
	.word	1093567616
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
