	.file	"998942.c"
	.intel_syntax noprefix
	.text
	.globl	myglobal
	.bss
	.align 4
	.type	myglobal, @object
	.size	myglobal, 4
myglobal:
	.zero	4
	.globl	mutex1
	.align 32
	.type	mutex1, @object
	.size	mutex1, 40
mutex1:
	.zero	40
	.globl	mutex2
	.align 32
	.type	mutex2, @object
	.size	mutex2, 40
mutex2:
	.zero	40
	.text
	.globl	t_fun
	.type	t_fun, @function
t_fun:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	lea	rdi, mutex1[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR myglobal[rip]
	add	eax, 1
	mov	DWORD PTR myglobal[rip], eax
	lea	rdi, mutex1[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	t_fun, .-t_fun
	.section	.rodata
.LC0:
	.string	"Locking failed!"
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -20[rbp], 3
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, t_fun[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rdi, mutex1[rip]
	call	pthread_mutex_lock@PLT
	test	eax, eax
	je	.L4
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR myglobal[rip]
	add	eax, 1
	mov	DWORD PTR myglobal[rip], eax
	jmp	.L5
.L4:
	lea	rdi, mutex1[rip]
	call	pthread_mutex_unlock@PLT
.L5:
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"998942.c"
	.text
	.comm	myglobal,4,4
	.global	mutex1
	.bss
	.align	2
	.type	mutex1, %object
	.size	mutex1, 24
mutex1:
	.space	24
	.global	mutex2
	.align	2
	.type	mutex2, %object
	.size	mutex2, 24
mutex2:
	.space	24
	.text
	.align	2
	.global	t_fun
	.syntax unified
	.arm
	.fpu softvfp
	.type	t_fun, %function
t_fun:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, .L3
	bl	pthread_mutex_lock
	ldr	r3, .L3+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L3+4
	str	r3, [r2]
	ldr	r0, .L3
	bl	pthread_mutex_unlock
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	mutex1
	.word	myglobal
	.size	t_fun, .-t_fun
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Locking failed!\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, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #3
	str	r3, [fp, #-12]
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L10+4
	mov	r1, #0
	bl	pthread_create
	ldr	r0, .L10+8
	bl	pthread_mutex_lock
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	ldr	r0, .L10+12
	bl	printf
	ldr	r3, .L10+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L10+16
	str	r3, [r2]
	b	.L7
.L6:
	ldr	r0, .L10+8
	bl	pthread_mutex_unlock
.L7:
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, #0
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC1
	.word	t_fun
	.word	mutex1
	.word	.LC0
	.word	myglobal
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
