	.file	"100141767.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
	.type	microseconds, @object
	.size	microseconds, 8
microseconds:
	.quad	2000000
	.align 8
	.type	limit, @object
	.size	limit, 8
limit:
	.quad	10
	.local	mutex
	.comm	mutex,56,32
	.local	resource
	.comm	resource,8,8
.LC0:
	.string	"ID of thread is %ld\n"
.LC1:
	.string	"Failed to lock mutex"
.LC2:
	.string	"%s\n"
.LC3:
	.string	" - errno # %d (%s)\n"
.LC4:
	.string	" - line # %d (file # %s)\n"
.LC5:
	.string	"Failed to unlock mutex"
	.align 8
.LC6:
	.string	"ID of thread is %ld -- finished\n"
	.text
	.type	thread_func, @function
thread_func:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -24[rbp], 0
	call	pthread_self@PLT
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L2
.L5:
	lea	rdi, mutex[rip]
	call	pthread_rwlock_wrlock@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	je	.L3
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC1[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rbx
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, __FUNCTION__.1[rip]
	mov	edx, 35
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR resource[rip]
	add	rax, 1
	mov	QWORD PTR resource[rip], rax
	lea	rdi, mutex[rip]
	call	pthread_rwlock_unlock@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	je	.L4
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC5[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rbx
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, __FUNCTION__.1[rip]
	mov	edx, 40
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	eax, 2000000
	mov	edi, eax
	call	usleep@PLT
.L2:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, 10
	cmp	rax, rdx
	jb	.L5
	call	pthread_self@PLT
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	thread_func, .-thread_func
	.section	.rodata
.LC7:
	.string	"--- main - start"
.LC8:
	.string	"Failed to init mutex"
.LC9:
	.string	"Failed to create pthread"
.LC10:
	.string	"Resource = %ld\n"
.LC11:
	.string	"Failed to join pthread"
.LC12:
	.string	"Failed to destroy mutex"
.LC13:
	.string	"--- main - end"
	.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	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -32[rbp], 0
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	pthread_rwlock_init@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], 0
	je	.L8
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC8[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rbx
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, __FUNCTION__.0[rip]
	mov	edx, 62
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	lea	rax, -40[rbp]
	mov	ecx, 0
	lea	rdx, thread_func[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], 0
	je	.L10
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC9[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rbx
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, __FUNCTION__.0[rip]
	mov	edx, 66
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	lea	rdi, mutex[rip]
	call	pthread_rwlock_rdlock@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], 0
	je	.L11
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC1[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rbx
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, __FUNCTION__.0[rip]
	mov	edx, 71
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	mov	rax, QWORD PTR resource[rip]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, mutex[rip]
	call	pthread_rwlock_unlock@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], 0
	je	.L12
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC5[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rbx
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, __FUNCTION__.0[rip]
	mov	edx, 76
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	eax, 2000000
	mov	edi, eax
	call	usleep@PLT
.L10:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -32[rbp], rdx
	mov	edx, 10
	add	rdx, 5
	cmp	rax, rdx
	jb	.L13
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], 0
	je	.L14
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC11[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rbx
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, __FUNCTION__.0[rip]
	mov	edx, 83
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	lea	rdi, mutex[rip]
	call	pthread_rwlock_destroy@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], 0
	je	.L15
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC12[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rbx
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, __FUNCTION__.0[rip]
	mov	edx, 87
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
	.type	__FUNCTION__.1, @object
	.size	__FUNCTION__.1, 12
__FUNCTION__.1:
	.string	"thread_func"
	.type	__FUNCTION__.0, @object
	.size	__FUNCTION__.0, 5
__FUNCTION__.0:
	.string	"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	"100141767.c"
	.text
	.section	.rodata
	.align	3
	.type	microseconds, %object
	.size	microseconds, 8
microseconds:
	.word	2000000
	.word	0
	.align	3
	.type	limit, %object
	.size	limit, 8
limit:
	.word	10
	.word	0
	.local	mutex
	.comm	mutex,32,4
	.local	resource
	.comm	resource,8,8
	.align	2
.LC0:
	.ascii	"ID of thread is %ld\012\000"
	.align	2
.LC1:
	.ascii	"Failed to lock mutex\000"
	.align	2
.LC2:
	.ascii	"%s\012\000"
	.align	2
.LC3:
	.ascii	" - errno # %d (%s)\012\000"
	.align	2
.LC4:
	.ascii	" - line # %d (file # %s)\012\000"
	.align	2
.LC5:
	.ascii	"Failed to unlock mutex\000"
	.align	2
.LC6:
	.ascii	"ID of thread is %ld -- finished\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_func, %function
thread_func:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #24
	str	r0, [fp, #-40]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L7
	bl	printf
	b	.L2
.L5:
	ldr	r0, .L7+4
	bl	pthread_rwlock_wrlock
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L7+8
	ldr	r3, [r3]
	ldr	r2, .L7+12
	ldr	r1, .L7+16
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L7+8
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L7+20
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L7+8
	ldr	r0, [r3]
	ldr	r3, .L7+24
	mov	r2, #35
	ldr	r1, .L7+28
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, .L7+32
	ldmia	r3, {r2-r3}
	adds	r6, r2, #1
	adc	r7, r3, #0
	ldr	r3, .L7+32
	stm	r3, {r6-r7}
	ldr	r0, .L7+4
	bl	pthread_rwlock_unlock
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L4
	ldr	r3, .L7+8
	ldr	r3, [r3]
	ldr	r2, .L7+36
	ldr	r1, .L7+16
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L7+8
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L7+20
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L7+8
	ldr	r0, [r3]
	ldr	r3, .L7+24
	mov	r2, #40
	ldr	r1, .L7+28
	bl	fprintf
	mov	r0, #1
	bl	exit
.L4:
	ldr	r2, .L7+40
	mov	r3, #0
	mov	r3, r2
	mov	r0, r3
	bl	usleep
.L2:
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	adds	r4, r2, #1
	adc	r5, r3, #0
	str	r4, [fp, #-28]
	str	r5, [fp, #-24]
	mov	r0, #10
	mov	r1, #0
	cmp	r3, r1
	cmpeq	r2, r0
	bcc	.L5
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L7+44
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC0
	.word	mutex
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	__FUNCTION__.6428
	.word	.LC4
	.word	resource
	.word	.LC5
	.word	2000000
	.word	.LC6
	.size	thread_func, .-thread_func
	.section	.rodata
	.align	2
.LC7:
	.ascii	"--- main - start\000"
	.align	2
.LC8:
	.ascii	"Failed to init mutex\000"
	.align	2
.LC9:
	.ascii	"Failed to create pthread\000"
	.align	2
.LC10:
	.ascii	"Resource = %ld\012\000"
	.align	2
.LC11:
	.ascii	"Failed to join pthread\000"
	.align	2
.LC12:
	.ascii	"Failed to destroy mutex\000"
	.align	2
.LC13:
	.ascii	"--- main - end\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #24
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldr	r0, .L20+4
	bl	puts
	mov	r1, #0
	ldr	r0, .L20+8
	bl	pthread_rwlock_init
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L20+12
	ldr	r3, [r3]
	ldr	r2, .L20+16
	ldr	r1, .L20+20
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L20+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L20+24
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L20+12
	ldr	r0, [r3]
	ldr	r3, .L20+28
	mov	r2, #62
	ldr	r1, .L20+32
	bl	fprintf
	mov	r0, #1
	bl	exit
.L10:
	sub	r0, fp, #44
	mov	r3, #0
	ldr	r2, .L20+36
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L12
	ldr	r3, .L20+12
	ldr	r3, [r3]
	ldr	r2, .L20+40
	ldr	r1, .L20+20
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L20+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L20+24
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L20+12
	ldr	r0, [r3]
	ldr	r3, .L20+28
	mov	r2, #66
	ldr	r1, .L20+32
	bl	fprintf
	mov	r0, #1
	bl	exit
.L15:
	ldr	r0, .L20+8
	bl	pthread_rwlock_rdlock
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L13
	ldr	r3, .L20+12
	ldr	r3, [r3]
	ldr	r2, .L20+44
	ldr	r1, .L20+20
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L20+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L20+24
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L20+12
	ldr	r0, [r3]
	ldr	r3, .L20+28
	mov	r2, #71
	ldr	r1, .L20+32
	bl	fprintf
	mov	r0, #1
	bl	exit
.L13:
	ldr	r3, .L20+48
	ldmia	r3, {r2-r3}
	ldr	r0, .L20+52
	bl	printf
	ldr	r0, .L20+8
	bl	pthread_rwlock_unlock
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L14
	ldr	r3, .L20+12
	ldr	r3, [r3]
	ldr	r2, .L20+56
	ldr	r1, .L20+20
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L20+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L20+24
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L20+12
	ldr	r0, [r3]
	ldr	r3, .L20+28
	mov	r2, #76
	ldr	r1, .L20+32
	bl	fprintf
	mov	r0, #1
	bl	exit
.L14:
	ldr	r2, .L20+60
	mov	r3, #0
	mov	r3, r2
	mov	r0, r3
	bl	usleep
.L12:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	adds	r6, r2, #1
	adc	r7, r3, #0
	str	r6, [fp, #-36]
	str	r7, [fp, #-32]
	mov	r0, #10
	mov	r1, #0
	adds	r4, r0, #5
	adc	r5, r1, #0
	cmp	r3, r5
	cmpeq	r2, r4
	bcc	.L15
	ldr	r3, [fp, #-44]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L16
	ldr	r3, .L20+12
	ldr	r3, [r3]
	ldr	r2, .L20+64
	ldr	r1, .L20+20
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L20+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L20+24
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L20+12
	ldr	r0, [r3]
	ldr	r3, .L20+28
	mov	r2, #83
	ldr	r1, .L20+32
	bl	fprintf
	mov	r0, #1
	bl	exit
.L16:
	ldr	r0, .L20+8
	bl	pthread_rwlock_destroy
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L17
	ldr	r3, .L20+12
	ldr	r3, [r3]
	ldr	r2, .L20+68
	ldr	r1, .L20+20
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L20+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L20+24
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L20+12
	ldr	r0, [r3]
	ldr	r3, .L20+28
	mov	r2, #87
	ldr	r1, .L20+32
	bl	fprintf
	mov	r0, #1
	bl	exit
.L17:
	ldr	r0, .L20+72
	bl	puts
	mov	r3, #0
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC14
	.word	.LC7
	.word	mutex
	.word	stderr
	.word	.LC8
	.word	.LC2
	.word	.LC3
	.word	__FUNCTION__.6437
	.word	.LC4
	.word	thread_func
	.word	.LC9
	.word	.LC1
	.word	resource
	.word	.LC10
	.word	.LC5
	.word	2000000
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__FUNCTION__.6428, %object
	.size	__FUNCTION__.6428, 12
__FUNCTION__.6428:
	.ascii	"thread_func\000"
	.align	2
	.type	__FUNCTION__.6437, %object
	.size	__FUNCTION__.6437, 5
__FUNCTION__.6437:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
