	.file	"92053.c"
	.intel_syntax noprefix
	.text
	.globl	mutex_a
	.bss
	.align 32
	.type	mutex_a, @object
	.size	mutex_a, 40
mutex_a:
	.zero	40
	.globl	mutex_b
	.align 32
	.type	mutex_b, @object
	.size	mutex_b, 40
mutex_b:
	.zero	40
	.section	.rodata
.LC0:
	.string	"%s: %s: error: %s\n"
.LC1:
	.string	"%s: %s: success!\n"
	.text
	.globl	report
	.type	report, @function
report:
.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	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	cmp	DWORD PTR -4[rbp], 0
	je	.L2
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	report, .-report
	.section	.rodata
.LC2:
	.string	"pthread_mutex_lock(&mutex_a)"
.LC3:
	.string	"pthread_mutex_lock(&mutex_b)"
	.align 8
.LC4:
	.string	"lock_forward: zablokowalem mutex_a i mutex_b"
	.align 8
.LC5:
	.string	"pthread_mutex_unlock(&mutex_b)"
	.align 8
.LC6:
	.string	"pthread_mutex_unlock(&mutex_a)"
	.text
	.globl	lock_forward
	.type	lock_forward, @function
lock_forward:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	lea	rdi, mutex_a[rip]
	call	pthread_mutex_lock@PLT
	lea	rdx, .LC2[rip]
	lea	rsi, __func__.2[rip]
	mov	edi, eax
	call	report
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, mutex_b[rip]
	call	pthread_mutex_lock@PLT
	lea	rdx, .LC3[rip]
	lea	rsi, __func__.2[rip]
	mov	edi, eax
	call	report
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, mutex_b[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdx, .LC5[rip]
	lea	rsi, __func__.2[rip]
	mov	edi, eax
	call	report
	lea	rdi, mutex_a[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdx, .LC6[rip]
	lea	rsi, __func__.2[rip]
	mov	edi, eax
	call	report
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	lock_forward, .-lock_forward
	.section	.rodata
	.align 8
.LC7:
	.string	"lock_backward: zablokowalem mutex_b i mutex_a"
	.text
	.globl	lock_backward
	.type	lock_backward, @function
lock_backward:
.LFB8:
	.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, mutex_b[rip]
	call	pthread_mutex_lock@PLT
	lea	rdx, .LC3[rip]
	lea	rsi, __func__.1[rip]
	mov	edi, eax
	call	report
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, mutex_a[rip]
	call	pthread_mutex_lock@PLT
	lea	rdx, .LC2[rip]
	lea	rsi, __func__.1[rip]
	mov	edi, eax
	call	report
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, mutex_a[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdx, .LC6[rip]
	lea	rsi, __func__.1[rip]
	mov	edi, eax
	call	report
	lea	rdi, mutex_b[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdx, .LC5[rip]
	lea	rsi, __func__.1[rip]
	mov	edi, eax
	call	report
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	lock_backward, .-lock_backward
	.section	.rodata
	.align 8
.LC8:
	.string	"pthread_create(&backward,NULL,lock_backward,NULL)"
	.align 8
.LC9:
	.string	"pthread_create(&forward,NULL,lock_forward,NULL)"
.LC10:
	.string	"main: utworzono watki."
	.align 8
.LC11:
	.string	"main: czekam na zakonczenie watkow."
.LC12:
	.string	"pthread_join(backward,NULL)"
.LC13:
	.string	"pthread_join(forward,NULL)"
.LC14:
	.string	"main: koniec programu."
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, lock_backward[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rdx, .LC8[rip]
	lea	rsi, __func__.0[rip]
	mov	edi, eax
	call	report
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, lock_forward[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rdx, .LC9[rip]
	lea	rsi, __func__.0[rip]
	mov	edi, eax
	call	report
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	lea	rdx, .LC12[rip]
	lea	rsi, __func__.0[rip]
	mov	edi, eax
	call	report
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	lea	rdx, .LC13[rip]
	lea	rsi, __func__.0[rip]
	mov	edi, eax
	call	report
	lea	rdi, .LC14[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.section	.rodata
	.align 8
	.type	__func__.2, @object
	.size	__func__.2, 13
__func__.2:
	.string	"lock_forward"
	.align 8
	.type	__func__.1, @object
	.size	__func__.1, 14
__func__.1:
	.string	"lock_backward"
	.type	__func__.0, @object
	.size	__func__.0, 5
__func__.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	"92053.c"
	.text
	.global	mutex_a
	.bss
	.align	2
	.type	mutex_a, %object
	.size	mutex_a, 24
mutex_a:
	.space	24
	.global	mutex_b
	.align	2
	.type	mutex_b, %object
	.size	mutex_b, 24
mutex_b:
	.space	24
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s: %s: error: %s\012\000"
	.align	2
.LC1:
	.ascii	"%s: %s: success!\012\000"
	.text
	.align	2
	.global	report
	.syntax unified
	.arm
	.fpu softvfp
	.type	report, %function
report:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L2
	ldr	r0, [fp, #-8]
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, .L4
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, .L4+4
	bl	printf
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	.LC1
	.size	report, .-report
	.section	.rodata
	.align	2
.LC2:
	.ascii	"pthread_mutex_lock(&mutex_a)\000"
	.align	2
.LC3:
	.ascii	"pthread_mutex_lock(&mutex_b)\000"
	.align	2
.LC4:
	.ascii	"lock_forward: zablokowalem mutex_a i mutex_b\000"
	.align	2
.LC5:
	.ascii	"pthread_mutex_unlock(&mutex_b)\000"
	.align	2
.LC6:
	.ascii	"pthread_mutex_unlock(&mutex_a)\000"
	.text
	.align	2
	.global	lock_forward
	.syntax unified
	.arm
	.fpu softvfp
	.type	lock_forward, %function
lock_forward:
	@ 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, .L8
	bl	pthread_mutex_lock
	mov	r3, r0
	ldr	r2, .L8+4
	ldr	r1, .L8+8
	mov	r0, r3
	bl	report
	mov	r0, #1
	bl	sleep
	ldr	r0, .L8+12
	bl	pthread_mutex_lock
	mov	r3, r0
	ldr	r2, .L8+16
	ldr	r1, .L8+8
	mov	r0, r3
	bl	report
	ldr	r0, .L8+20
	bl	puts
	ldr	r0, .L8+12
	bl	pthread_mutex_unlock
	mov	r3, r0
	ldr	r2, .L8+24
	ldr	r1, .L8+8
	mov	r0, r3
	bl	report
	ldr	r0, .L8
	bl	pthread_mutex_unlock
	mov	r3, r0
	ldr	r2, .L8+28
	ldr	r1, .L8+8
	mov	r0, r3
	bl	report
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	mutex_a
	.word	.LC2
	.word	__func__.6404
	.word	mutex_b
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	lock_forward, .-lock_forward
	.section	.rodata
	.align	2
.LC7:
	.ascii	"lock_backward: zablokowalem mutex_b i mutex_a\000"
	.text
	.align	2
	.global	lock_backward
	.syntax unified
	.arm
	.fpu softvfp
	.type	lock_backward, %function
lock_backward:
	@ 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, .L12
	bl	pthread_mutex_lock
	mov	r3, r0
	ldr	r2, .L12+4
	ldr	r1, .L12+8
	mov	r0, r3
	bl	report
	mov	r0, #1
	bl	sleep
	ldr	r0, .L12+12
	bl	pthread_mutex_lock
	mov	r3, r0
	ldr	r2, .L12+16
	ldr	r1, .L12+8
	mov	r0, r3
	bl	report
	ldr	r0, .L12+20
	bl	puts
	ldr	r0, .L12+12
	bl	pthread_mutex_unlock
	mov	r3, r0
	ldr	r2, .L12+24
	ldr	r1, .L12+8
	mov	r0, r3
	bl	report
	ldr	r0, .L12
	bl	pthread_mutex_unlock
	mov	r3, r0
	ldr	r2, .L12+28
	ldr	r1, .L12+8
	mov	r0, r3
	bl	report
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	mutex_b
	.word	.LC3
	.word	__func__.6408
	.word	mutex_a
	.word	.LC2
	.word	.LC7
	.word	.LC6
	.word	.LC5
	.size	lock_backward, .-lock_backward
	.section	.rodata
	.align	2
.LC8:
	.ascii	"pthread_create(&backward,NULL,lock_backward,NULL)\000"
	.align	2
.LC9:
	.ascii	"pthread_create(&forward,NULL,lock_forward,NULL)\000"
	.align	2
.LC10:
	.ascii	"main: utworzono watki.\000"
	.align	2
.LC11:
	.ascii	"main: czekam na zakonczenie watkow.\000"
	.align	2
.LC12:
	.ascii	"pthread_join(backward,NULL)\000"
	.align	2
.LC13:
	.ascii	"pthread_join(forward,NULL)\000"
	.align	2
.LC14:
	.ascii	"main: koniec programu.\000"
	.align	2
.LC15:
	.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, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r0, fp, #12
	mov	r3, #0
	ldr	r2, .L17+4
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	ldr	r2, .L17+8
	ldr	r1, .L17+12
	mov	r0, r3
	bl	report
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L17+16
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	ldr	r2, .L17+20
	ldr	r1, .L17+12
	mov	r0, r3
	bl	report
	ldr	r0, .L17+24
	bl	puts
	ldr	r0, .L17+28
	bl	puts
	ldr	r3, [fp, #-12]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, r0
	ldr	r2, .L17+32
	ldr	r1, .L17+12
	mov	r0, r3
	bl	report
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, r0
	ldr	r2, .L17+36
	ldr	r1, .L17+12
	mov	r0, r3
	bl	report
	ldr	r0, .L17+40
	bl	puts
	mov	r3, #0
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC15
	.word	lock_backward
	.word	.LC8
	.word	__func__.6415
	.word	lock_forward
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__func__.6404, %object
	.size	__func__.6404, 13
__func__.6404:
	.ascii	"lock_forward\000"
	.align	2
	.type	__func__.6408, %object
	.size	__func__.6408, 14
__func__.6408:
	.ascii	"lock_backward\000"
	.align	2
	.type	__func__.6415, %object
	.size	__func__.6415, 5
__func__.6415:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
