	.file	"336208.c"
	.intel_syntax noprefix
	.text
	.globl	my_mutex
	.bss
	.align 8
	.type	my_mutex, @object
	.size	my_mutex, 8
my_mutex:
	.zero	8
	.globl	locked
	.data
	.align 4
	.type	locked, @object
	.size	locked, 4
locked:
	.long	1
	.section	.rodata
	.align 8
.LC0:
	.string	"error while locking mutex (1):%s\n"
	.align 8
.LC1:
	.string	"error while locking mutex (2) \n"
	.align 8
.LC2:
	.string	"error while unlocking mutex (2) \n"
	.align 8
.LC3:
	.string	"error while unlocking mutex (1) \n"
	.text
	.globl	test_recursive
	.type	test_recursive, @function
test_recursive:
.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 my_mutex[rip]
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L2
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR my_mutex[rip]
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L3
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	DWORD PTR locked[rip], 0
	mov	rax, QWORD PTR my_mutex[rip]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 33
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rax, QWORD PTR my_mutex[rip]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 33
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE6:
	.size	test_recursive, .-test_recursive
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 40
	call	malloc@PLT
	mov	QWORD PTR my_mutex[rip], rax
	lea	rax, -12[rbp]
	mov	rdi, rax
	call	pthread_mutexattr_init@PLT
	mov	rax, QWORD PTR my_mutex[rip]
	lea	rdx, -12[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_mutex_init@PLT
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, test_recursive[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	edi, 1
	mov	eax, 0
	call	sleep@PLT
	mov	eax, DWORD PTR locked[rip]
	mov	edi, eax
	call	exit@PLT
	.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	"336208.c"
	.text
	.comm	my_mutex,4,4
	.global	locked
	.data
	.align	2
	.type	locked, %object
	.size	locked, 4
locked:
	.word	1
	.section	.rodata
	.align	2
.LC0:
	.ascii	"error while locking mutex (1):%s\012\000"
	.align	2
.LC1:
	.ascii	"error while locking mutex (2) \012\000"
	.align	2
.LC2:
	.ascii	"error while unlocking mutex (2) \012\000"
	.align	2
.LC3:
	.ascii	"error while unlocking mutex (1) \012\000"
	.text
	.align	2
	.global	test_recursive
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_recursive, %function
test_recursive:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	ldr	r3, .L6
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_lock
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L6+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-16]
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L6+8
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, .L6
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_lock
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L6+4
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L6+12
	bl	fwrite
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, .L6+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L6
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_unlock
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L4
	ldr	r3, .L6+4
	ldr	r3, [r3]
	mov	r2, #33
	mov	r1, #1
	ldr	r0, .L6+20
	bl	fwrite
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, .L6
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_mutex_unlock
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L6+4
	ldr	r3, [r3]
	mov	r2, #33
	mov	r1, #1
	ldr	r0, .L6+24
	bl	fwrite
	mov	r0, #1
	bl	exit
.L5:
	mov	r0, #0
	bl	pthread_exit
.L7:
	.align	2
.L6:
	.word	my_mutex
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	locked
	.word	.LC2
	.word	.LC3
	.size	test_recursive, .-test_recursive
	.section	.rodata
	.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 = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #24
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L10+4
	str	r2, [r3]
	sub	r3, fp, #12
	mov	r0, r3
	bl	pthread_mutexattr_init
	ldr	r3, .L10+4
	ldr	r3, [r3]
	sub	r2, fp, #12
	mov	r1, r2
	mov	r0, r3
	bl	pthread_mutex_init
	sub	r0, fp, #20
	mov	r3, #0
	ldr	r2, .L10+8
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-16]
	mov	r0, #1
	bl	sleep
	ldr	r3, .L10+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	exit
.L11:
	.align	2
.L10:
	.word	.LC4
	.word	my_mutex
	.word	test_recursive
	.word	locked
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
