	.file	"555518.c"
	.intel_syntax noprefix
	.text
	.local	bar
	.comm	bar,32,32
	.local	mtx
	.comm	mtx,40,32
	.local	cnd
	.comm	cnd,48,32
	.local	called
	.comm	called,4,4
	.section	.rodata
	.align 8
.LC0:
	.string	"cancelation cleanup handler called"
.LC1:
	.string	"the_stack_data/555518.c"
	.align 8
.LC2:
	.string	"pthread_mutex_unlock((pthread_mutex_t *)arg) == 0"
	.text
	.type	cleanupmutex, @function
cleanupmutex:
.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, .LC0[rip]
	call	puts@PLT
	cmp	QWORD PTR -8[rbp], 0
	je	.L4
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	test	eax, eax
	je	.L3
	lea	rcx, __PRETTY_FUNCTION__.2[rip]
	mov	edx, 19
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L3:
	mov	eax, DWORD PTR called[rip]
	add	eax, 1
	mov	DWORD PTR called[rip], eax
.L4:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	cleanupmutex, .-cleanupmutex
	.section	.rodata
.LC3:
	.string	"pthread_mutex_lock(&mtx) == 0"
	.align 8
.LC4:
	.string	"thread synchronization (mutex acquired)"
.LC5:
	.string	"(ret == 0) || (ret == -1)"
.LC6:
	.string	"thread waiting cond"
	.align 8
.LC7:
	.string	"pthread_cond_wait(&cnd, &mtx) == 0"
.LC8:
	.string	"thread woken"
	.text
	.type	mythread, @function
mythread:
.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, 160
	mov	QWORD PTR -152[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, mtx[rip]
	call	pthread_mutex_lock@PLT
	test	eax, eax
	je	.L6
	lea	rcx, __PRETTY_FUNCTION__.1[rip]
	mov	edx, 30
	lea	rsi, .LC1[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L6:
	lea	rax, cleanupmutex[rip]
	mov	QWORD PTR -128[rbp], rax
	lea	rax, mtx[rip]
	mov	QWORD PTR -120[rbp], rax
	lea	rax, -112[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	__sigsetjmp@PLT
	endbr64
	mov	DWORD PTR -136[rbp], eax
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	test	rax, rax
	je	.L8
	mov	rax, QWORD PTR -120[rbp]
	mov	rdx, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	rdx
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	__pthread_unwind_next@PLT
.L8:
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	__pthread_register_cancel@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, bar[rip]
	call	pthread_barrier_wait@PLT
	mov	DWORD PTR -132[rbp], eax
	cmp	DWORD PTR -132[rbp], 0
	je	.L11
	cmp	DWORD PTR -132[rbp], -1
	je	.L11
	lea	rcx, __PRETTY_FUNCTION__.1[rip]
	mov	edx, 39
	lea	rsi, .LC1[rip]
	lea	rdi, .LC5[rip]
	call	__assert_fail@PLT
.L11:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rsi, mtx[rip]
	lea	rdi, cnd[rip]
	call	pthread_cond_wait@PLT
	test	eax, eax
	je	.L10
	lea	rcx, __PRETTY_FUNCTION__.1[rip]
	mov	edx, 44
	lea	rsi, .LC1[rip]
	lea	rdi, .LC7[rip]
	call	__assert_fail@PLT
.L10:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	jmp	.L11
	.cfi_endproc
.LFE1:
	.size	mythread, .-mythread
	.section	.rodata
	.align 8
.LC9:
	.string	"pthread_barrier_init(&bar, ((void *)0), 2) == 0"
.LC10:
	.string	"Creating thread"
	.align 8
.LC11:
	.string	"pthread_create(&thr, ((void *)0), mythread, ((void *)0)) == 0"
.LC12:
	.string	"main synchronization"
	.align 8
.LC13:
	.string	"main: thread is now waiting for condvar"
.LC14:
	.string	"pthread_cancel(thr) == 0"
	.align 8
.LC15:
	.string	"pthread_mutex_unlock(&mtx) == 0"
	.align 8
.LC16:
	.string	"pthread_join(thr, &dummy) == 0"
.LC17:
	.string	"Test successful!"
	.align 8
.LC18:
	.string	"Test failed! Cleanup was not called (& lock not released)"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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	edx, 2
	mov	esi, 0
	lea	rdi, bar[rip]
	call	pthread_barrier_init@PLT
	test	eax, eax
	je	.L14
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 60
	lea	rsi, .LC1[rip]
	lea	rdi, .LC9[rip]
	call	__assert_fail@PLT
.L14:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, mythread[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L15
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 65
	lea	rsi, .LC1[rip]
	lea	rdi, .LC11[rip]
	call	__assert_fail@PLT
.L15:
	lea	rdi, .LC12[rip]
	call	puts@PLT
	lea	rdi, bar[rip]
	call	pthread_barrier_wait@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	je	.L16
	cmp	DWORD PTR -28[rbp], -1
	je	.L16
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 69
	lea	rsi, .LC1[rip]
	lea	rdi, .LC5[rip]
	call	__assert_fail@PLT
.L16:
	lea	rdi, mtx[rip]
	call	pthread_mutex_lock@PLT
	test	eax, eax
	je	.L17
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 71
	lea	rsi, .LC1[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L17:
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	pthread_cancel@PLT
	test	eax, eax
	je	.L18
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 75
	lea	rsi, .LC1[rip]
	lea	rdi, .LC14[rip]
	call	__assert_fail@PLT
.L18:
	lea	rdi, mtx[rip]
	call	pthread_mutex_unlock@PLT
	test	eax, eax
	je	.L19
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 78
	lea	rsi, .LC1[rip]
	lea	rdi, .LC15[rip]
	call	__assert_fail@PLT
.L19:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	test	eax, eax
	je	.L20
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 81
	lea	rsi, .LC1[rip]
	lea	rdi, .LC16[rip]
	call	__assert_fail@PLT
.L20:
	mov	eax, DWORD PTR called[rip]
	cmp	eax, 1
	jne	.L21
	lea	rdi, .LC17[rip]
	call	puts@PLT
	jmp	.L22
.L21:
	lea	rdi, .LC18[rip]
	call	puts@PLT
.L22:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.section	.rodata
	.align 8
	.type	__PRETTY_FUNCTION__.2, @object
	.size	__PRETTY_FUNCTION__.2, 13
__PRETTY_FUNCTION__.2:
	.string	"cleanupmutex"
	.align 8
	.type	__PRETTY_FUNCTION__.1, @object
	.size	__PRETTY_FUNCTION__.1, 9
__PRETTY_FUNCTION__.1:
	.string	"mythread"
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"main"
	.weak	__pthread_unwind_next
	.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	"555518.c"
	.text
	.local	bar
	.comm	bar,20,4
	.local	mtx
	.comm	mtx,24,4
	.local	cnd
	.comm	cnd,48,8
	.local	called
	.comm	called,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"cancelation cleanup handler called\000"
	.align	2
.LC1:
	.ascii	"the_stack_data/555518.c\000"
	.align	2
.LC2:
	.ascii	"pthread_mutex_unlock((pthread_mutex_t *)arg) == 0\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cleanupmutex, %function
cleanupmutex:
	@ 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, .L5
	bl	puts
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L4
	ldr	r0, [fp, #-8]
	bl	pthread_mutex_unlock
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L5+4
	mov	r2, #19
	ldr	r1, .L5+8
	ldr	r0, .L5+12
	bl	__assert_fail
.L3:
	ldr	r3, .L5+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L5+16
	str	r3, [r2]
.L4:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	__PRETTY_FUNCTION__.5260
	.word	.LC1
	.word	.LC2
	.word	called
	.size	cleanupmutex, .-cleanupmutex
	.section	.rodata
	.align	2
.LC3:
	.ascii	"pthread_mutex_lock(&mtx) == 0\000"
	.align	2
.LC4:
	.ascii	"thread synchronization (mutex acquired)\000"
	.align	2
.LC5:
	.ascii	"(ret == 0) || (ret == -1)\000"
	.align	2
.LC6:
	.ascii	"thread waiting cond\000"
	.align	2
.LC7:
	.ascii	"pthread_cond_wait(&cnd, &mtx) == 0\000"
	.align	2
.LC8:
	.ascii	"thread woken\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mythread, %function
mythread:
	@ args = 0, pretend = 0, frame = 312
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #312
	str	r0, [fp, #-312]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L15+4
	bl	pthread_mutex_lock
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L15+8
	mov	r2, #30
	ldr	r1, .L15+12
	ldr	r0, .L15+16
	bl	__assert_fail
.L8:
	ldr	r3, .L15+20
	str	r3, [fp, #-308]
	ldr	r3, .L15+4
	str	r3, [fp, #-304]
	sub	r3, fp, #292
	mov	r1, #0
	mov	r0, r3
	bl	__sigsetjmp
	mov	r3, r0
	str	r3, [fp, #-300]
	ldr	r3, [fp, #-300]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-308]
	ldr	r0, [fp, #-304]
	blx	r3
	sub	r3, fp, #292
	mov	r0, r3
	bl	__pthread_unwind_next
.L10:
	sub	r3, fp, #292
	mov	r0, r3
	bl	__pthread_register_cancel
	ldr	r0, .L15+24
	bl	puts
	ldr	r0, .L15+28
	bl	pthread_barrier_wait
	mov	r3, r0
	str	r3, [fp, #-296]
	ldr	r3, [fp, #-296]
	cmp	r3, #0
	beq	.L13
	ldr	r3, [fp, #-296]
	cmn	r3, #1
	beq	.L13
	ldr	r3, .L15+8
	mov	r2, #39
	ldr	r1, .L15+12
	ldr	r0, .L15+32
	bl	__assert_fail
.L13:
	ldr	r0, .L15+36
	bl	puts
	ldr	r1, .L15+4
	ldr	r0, .L15+40
	bl	pthread_cond_wait
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r3, .L15+8
	mov	r2, #44
	ldr	r1, .L15+12
	ldr	r0, .L15+44
	bl	__assert_fail
.L12:
	ldr	r0, .L15+48
	bl	puts
	b	.L13
.L16:
	.align	2
.L15:
	.word	.LC9
	.word	mtx
	.word	__PRETTY_FUNCTION__.5265
	.word	.LC1
	.word	.LC3
	.word	cleanupmutex
	.word	.LC4
	.word	bar
	.word	.LC5
	.word	.LC6
	.word	cnd
	.word	.LC7
	.word	.LC8
	.size	mythread, .-mythread
	.section	.rodata
	.align	2
.LC10:
	.ascii	"pthread_barrier_init(&bar, ((void *)0), 2) == 0\000"
	.align	2
.LC11:
	.ascii	"Creating thread\000"
	.align	2
.LC12:
	.ascii	"pthread_create(&thr, ((void *)0), mythread, ((void "
	.ascii	"*)0)) == 0\000"
	.align	2
.LC13:
	.ascii	"main synchronization\000"
	.align	2
.LC14:
	.ascii	"main: thread is now waiting for condvar\000"
	.align	2
.LC15:
	.ascii	"pthread_cancel(thr) == 0\000"
	.align	2
.LC16:
	.ascii	"pthread_mutex_unlock(&mtx) == 0\000"
	.align	2
.LC17:
	.ascii	"pthread_join(thr, &dummy) == 0\000"
	.align	2
.LC18:
	.ascii	"Test successful!\000"
	.align	2
.LC19:
	.ascii	"Test failed! Cleanup was not called (& lock not rel"
	.ascii	"eased)\000"
	.align	2
.LC20:
	.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, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #2
	mov	r1, #0
	ldr	r0, .L29+4
	bl	pthread_barrier_init
	mov	r3, r0
	cmp	r3, #0
	beq	.L18
	ldr	r3, .L29+8
	mov	r2, #60
	ldr	r1, .L29+12
	ldr	r0, .L29+16
	bl	__assert_fail
.L18:
	ldr	r0, .L29+20
	bl	puts
	sub	r0, fp, #20
	mov	r3, #0
	ldr	r2, .L29+24
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L19
	ldr	r3, .L29+8
	mov	r2, #65
	ldr	r1, .L29+12
	ldr	r0, .L29+28
	bl	__assert_fail
.L19:
	ldr	r0, .L29+32
	bl	puts
	ldr	r0, .L29+4
	bl	pthread_barrier_wait
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	beq	.L20
	ldr	r3, .L29+8
	mov	r2, #69
	ldr	r1, .L29+12
	ldr	r0, .L29+36
	bl	__assert_fail
.L20:
	ldr	r0, .L29+40
	bl	pthread_mutex_lock
	mov	r3, r0
	cmp	r3, #0
	beq	.L21
	ldr	r3, .L29+8
	mov	r2, #71
	ldr	r1, .L29+12
	ldr	r0, .L29+44
	bl	__assert_fail
.L21:
	ldr	r0, .L29+48
	bl	puts
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	pthread_cancel
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	ldr	r3, .L29+8
	mov	r2, #75
	ldr	r1, .L29+12
	ldr	r0, .L29+52
	bl	__assert_fail
.L22:
	ldr	r0, .L29+40
	bl	pthread_mutex_unlock
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	ldr	r3, .L29+8
	mov	r2, #78
	ldr	r1, .L29+12
	ldr	r0, .L29+56
	bl	__assert_fail
.L23:
	ldr	r3, [fp, #-20]
	sub	r2, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	pthread_join
	mov	r3, r0
	cmp	r3, #0
	beq	.L24
	ldr	r3, .L29+8
	mov	r2, #81
	ldr	r1, .L29+12
	ldr	r0, .L29+60
	bl	__assert_fail
.L24:
	ldr	r3, .L29+64
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L25
	ldr	r0, .L29+68
	bl	puts
	b	.L26
.L25:
	ldr	r0, .L29+72
	bl	puts
.L26:
	mov	r3, #0
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC20
	.word	bar
	.word	__PRETTY_FUNCTION__.5279
	.word	.LC1
	.word	.LC10
	.word	.LC11
	.word	mythread
	.word	.LC12
	.word	.LC13
	.word	.LC5
	.word	mtx
	.word	.LC3
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	called
	.word	.LC18
	.word	.LC19
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.5260, %object
	.size	__PRETTY_FUNCTION__.5260, 13
__PRETTY_FUNCTION__.5260:
	.ascii	"cleanupmutex\000"
	.align	2
	.type	__PRETTY_FUNCTION__.5265, %object
	.size	__PRETTY_FUNCTION__.5265, 9
__PRETTY_FUNCTION__.5265:
	.ascii	"mythread\000"
	.align	2
	.type	__PRETTY_FUNCTION__.5279, %object
	.size	__PRETTY_FUNCTION__.5279, 5
__PRETTY_FUNCTION__.5279:
	.ascii	"main\000"
	.weak	__pthread_unwind_next
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
