	.file	"extr_waitq.c_waitq_clear_prepost_locked.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"invalidate prepost 0x%llx (refcnt:%d)"
	.text
	.p2align 4
	.globl	waitq_clear_prepost_locked
	.type	waitq_clear_prepost_locked, @function
waitq_clear_prepost_locked:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	waitq_irq_safe@PLT
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	assert@PLT
	mov	rdi, QWORD PTR [rbx]
	test	rdi, rdi
	jne	.L2
.L4:
	xor	r12d, r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	call	wq_prepost_get@PLT
	mov	QWORD PTR [rbx], 0
	mov	rbp, rax
	test	rax, rax
	je	.L4
	mov	rdi, rax
	mov	r13, QWORD PTR [rax]
	xor	r12d, r12d
	call	wqp_refcnt@PLT
	mov	rsi, QWORD PTR 0[rbp]
	lea	rdi, .LC0[rip]
	mov	rdx, rax
	call	wqdbg_v@PLT
	mov	rdi, rbp
	call	wq_prepost_invalidate@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	xor	eax, eax
	mov	r12d, 1
	call	disable_preemption@PLT
	mov	rdi, rbx
	call	waitq_unlock@PLT
	mov	edi, 1
	call	delay@PLT
	mov	rdi, rbx
	call	waitq_lock@PLT
	xor	eax, eax
	call	enable_preemption@PLT
.L5:
	mov	rdi, rbp
	call	wqp_refcnt@PLT
	cmp	rax, 1
	jg	.L6
	mov	rdi, rbp
	call	wqp_refcnt@PLT
	test	rax, rax
	jle	.L1
	cmp	QWORD PTR 0[rbp], r13
	jne	.L1
	mov	rdi, rbp
	call	wq_prepost_put@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	waitq_clear_prepost_locked, .-waitq_clear_prepost_locked
	.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_waitq.c_waitq_clear_prepost_locked.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"invalidate prepost 0x%llx (refcnt:%d)\000"
	.text
	.align	2
	.global	waitq_clear_prepost_locked
	.syntax unified
	.arm
	.fpu softvfp
	.type	waitq_clear_prepost_locked, %function
waitq_clear_prepost_locked:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	bl	waitq_irq_safe
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r0, [r4]
	cmp	r0, #0
	bne	.L2
.L4:
	mov	r5, #0
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	bl	wq_prepost_get
	mov	r5, #0
	subs	r6, r0, #0
	str	r5, [r4]
	beq	.L4
	ldr	r7, [r6]
	bl	wqp_refcnt
	mov	r1, r7
	mov	r2, r0
	ldr	r0, .L12
	bl	wqdbg_v
	mov	r0, r6
	bl	wq_prepost_invalidate
	b	.L5
.L6:
	bl	disable_preemption
	mov	r0, r4
	bl	waitq_unlock
	mov	r0, #1
	bl	delay
	mov	r0, r4
	bl	waitq_lock
	mov	r5, #1
	bl	enable_preemption
.L5:
	mov	r0, r6
	bl	wqp_refcnt
	cmp	r0, #1
	bgt	.L6
	mov	r0, r6
	bl	wqp_refcnt
	cmp	r0, #0
	ble	.L1
	ldr	r3, [r6]
	cmp	r3, r7
	bne	.L1
	mov	r0, r6
	bl	wq_prepost_put
	b	.L1
.L13:
	.align	2
.L12:
	.word	.LC0
	.size	waitq_clear_prepost_locked, .-waitq_clear_prepost_locked
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
