	.file	"extr_busdma_bounce.c_free_bounce_page.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	free_bounce_page, @function
free_bounce_page:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rbx, QWORD PTR 8[rdi]
	mov	eax, DWORD PTR [rdi]
	mov	QWORD PTR 16[rsi], 0
	mov	QWORD PTR 8[rsi], 0
	test	DWORD PTR BUS_DMA_KEEP_PG_OFFSET[rip], eax
	je	.L2
	mov	eax, DWORD PTR PAGE_MASK[rip]
	not	eax
	and	DWORD PTR 4[rsi], eax
	and	DWORD PTR [rsi], eax
.L2:
	lea	rdi, bounce_lock[rip]
	call	mtx_lock@PLT
	mov	edx, DWORD PTR links[rip]
	mov	rsi, rbp
	lea	rdi, 12[rbx]
	call	STAILQ_INSERT_HEAD@PLT
	add	DWORD PTR 8[rbx], 1
	lea	rdi, bounce_map_waitinglist[rip]
	sub	DWORD PTR 4[rbx], 1
	call	STAILQ_FIRST@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L4
	mov	edi, DWORD PTR [rax]
	mov	edx, 1
	mov	rsi, rax
	call	reserve_bounce_pages@PLT
	test	rax, rax
	je	.L11
.L4:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, bounce_lock[rip]
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	mtx_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	esi, DWORD PTR links[rip]
	lea	rdi, bounce_map_waitinglist[rip]
	call	STAILQ_REMOVE_HEAD@PLT
	mov	edx, DWORD PTR links[rip]
	mov	rsi, rbp
	lea	rdi, bounce_map_callbacklist[rip]
	call	STAILQ_INSERT_TAIL@PLT
	mov	edi, DWORD PTR vm_ih[rip]
	xor	esi, esi
	mov	DWORD PTR busdma_swi_pending[rip], 1
	add	DWORD PTR [rbx], 1
	call	swi_sched@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	free_bounce_page, .-free_bounce_page
	.comm	vm_ih,4,4
	.comm	links,4,4
	.comm	busdma_swi_pending,4,4
	.comm	bounce_map_waitinglist,4,4
	.comm	bounce_map_callbacklist,4,4
	.comm	bounce_lock,4,4
	.comm	PAGE_MASK,4,4
	.comm	BUS_DMA_KEEP_PG_OFFSET,4,4
	.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_busdma_bounce.c_free_bounce_page.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	free_bounce_page, %function
free_bounce_page:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r3, #0
	mov	r4, r1
	ldr	r2, .L12
	ldr	r1, [r0]
	ldr	r2, [r2]
	ldr	r5, [r0, #4]
	tst	r1, r2
	str	r3, [r4, #12]
	str	r3, [r4, #8]
	beq	.L2
	ldr	r3, .L12+4
	ldr	r2, [r4, #4]
	ldr	r1, [r3]
	ldr	r3, [r4]
	bic	r2, r2, r1
	bic	r3, r3, r1
	str	r2, [r4, #4]
	str	r3, [r4]
.L2:
	ldr	r6, .L12+8
	ldr	r0, .L12+12
	bl	mtx_lock
	mov	r1, r4
	ldr	r2, [r6]
	add	r0, r5, #12
	bl	STAILQ_INSERT_HEAD
	ldr	r2, [r5, #8]
	ldr	r3, [r5, #4]
	add	r2, r2, #1
	sub	r3, r3, #1
	ldr	r0, .L12+16
	str	r2, [r5, #8]
	str	r3, [r5, #4]
	bl	STAILQ_FIRST
	subs	r4, r0, #0
	beq	.L4
	mov	r2, #1
	mov	r1, r4
	ldr	r0, [r4]
	bl	reserve_bounce_pages
	subs	r7, r0, #0
	beq	.L11
.L4:
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r0, .L12+12
	b	mtx_unlock
.L11:
	ldr	r1, [r6]
	ldr	r0, .L12+16
	bl	STAILQ_REMOVE_HEAD
	mov	r1, r4
	ldr	r2, [r6]
	ldr	r0, .L12+20
	bl	STAILQ_INSERT_TAIL
	mov	ip, #1
	ldr	r3, [r5]
	ldr	r0, .L12+24
	ldr	r2, .L12+28
	add	r3, r3, ip
	str	ip, [r0]
	mov	r1, r7
	ldr	r0, [r2]
	str	r3, [r5]
	bl	swi_sched
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r0, .L12+12
	b	mtx_unlock
.L13:
	.align	2
.L12:
	.word	BUS_DMA_KEEP_PG_OFFSET
	.word	PAGE_MASK
	.word	links
	.word	bounce_lock
	.word	bounce_map_waitinglist
	.word	bounce_map_callbacklist
	.word	busdma_swi_pending
	.word	vm_ih
	.size	free_bounce_page, .-free_bounce_page
	.comm	vm_ih,4,4
	.comm	links,4,4
	.comm	busdma_swi_pending,4,4
	.comm	bounce_map_waitinglist,4,4
	.comm	bounce_map_callbacklist,4,4
	.comm	bounce_lock,4,4
	.comm	PAGE_MASK,4,4
	.comm	BUS_DMA_KEEP_PG_OFFSET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
