	.file	"extr_sys_ulock.c_ulock_wait_cleanup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ulock_wait_cleanup, @function
ulock_wait_cleanup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rcx
	call	ull_assert_owned@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	r14, QWORD PTR THREAD_NULL[rip]
	sub	rax, 1
	mov	QWORD PTR 0[rbp], rax
	mov	QWORD PTR [rbx], rax
	je	.L8
.L2:
	mov	rdi, rbp
	call	ull_put@PLT
	xor	eax, eax
	call	turnstile_cleanup@PLT
	cmp	QWORD PTR THREAD_NULL[rip], r12
	je	.L3
	mov	rdi, r12
	call	thread_deallocate@PLT
	mov	r12, QWORD PTR THREAD_NULL[rip]
.L3:
	cmp	r13, r12
	je	.L4
	mov	rdi, r13
	call	thread_deallocate@PLT
	mov	r12, QWORD PTR THREAD_NULL[rip]
.L4:
	cmp	r14, r12
	je	.L5
	mov	rdi, r14
	call	thread_deallocate@PLT
.L5:
	mov	rdi, QWORD PTR [rbx]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	not	rdi
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	shr	rdi, 63
	jmp	assert@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rax, QWORD PTR THREAD_NULL[rip]
	mov	r14, QWORD PTR 8[rbp]
	xor	edi, edi
	mov	QWORD PTR 32[rbp], 0
	mov	QWORD PTR 24[rbp], 0
	mov	QWORD PTR 8[rbp], rax
	mov	rax, QWORD PTR 16[rbp]
	sub	rax, 1
	mov	QWORD PTR 16[rbp], rax
	test	rax, rax
	setg	dil
	call	assert@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ulock_wait_cleanup, .-ulock_wait_cleanup
	.comm	THREAD_NULL,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_sys_ulock.c_ulock_wait_cleanup.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ulock_wait_cleanup, %function
ulock_wait_cleanup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	mov	r6, r3
	mov	r5, r1
	mov	r7, r2
	bl	ull_assert_owned
	ldr	r1, [r4]
	ldr	r8, .L9
	sub	r1, r1, #1
	cmp	r1, #0
	ldr	r9, [r8]
	str	r1, [r4]
	str	r1, [r6]
	beq	.L8
.L2:
	mov	r0, r4
	bl	ull_put
	bl	turnstile_cleanup
	ldr	r3, [r8]
	cmp	r3, r5
	beq	.L3
	mov	r0, r5
	bl	thread_deallocate
	ldr	r5, [r8]
.L3:
	cmp	r7, r5
	beq	.L4
	mov	r0, r7
	bl	thread_deallocate
	ldr	r5, [r8]
.L4:
	cmp	r9, r5
	beq	.L5
	mov	r0, r9
	bl	thread_deallocate
.L5:
	ldr	r0, [r6]
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	mvn	r0, r0
	lsr	r0, r0, #31
	b	assert
.L8:
	ldr	r0, [r4, #8]
	ldr	r3, [r8]
	sub	r0, r0, #1
	cmp	r0, #0
	str	r0, [r4, #8]
	ldr	r9, [r4, #4]
	movle	r0, #0
	movgt	r0, #1
	str	r1, [r4, #16]
	str	r1, [r4, #12]
	str	r3, [r4, #4]
	bl	assert
	b	.L2
.L10:
	.align	2
.L9:
	.word	THREAD_NULL
	.size	ulock_wait_cleanup, .-ulock_wait_cleanup
	.comm	THREAD_NULL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
