	.file	"extr_i810_dma.c_i810_driver_reclaim_buffers.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"reclaimed from client\n"
	.text
	.p2align 4
	.globl	i810_driver_reclaim_buffers
	.type	i810_driver_reclaim_buffers, @function
i810_driver_reclaim_buffers:
.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
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbp, QWORD PTR 8[rdi]
	test	rbp, rbp
	je	.L1
	mov	edx, DWORD PTR [rdi]
	test	edx, edx
	je	.L1
	cmp	QWORD PTR 8[rbp], 0
	je	.L1
	mov	r12, rsi
	call	i810_flush_queue@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jle	.L1
	xor	ebx, ebx
	lea	r13, .LC0[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	add	rbx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jle	.L1
.L8:
	mov	rax, QWORD PTR 8[rbp]
	mov	rax, QWORD PTR [rax+rbx*8]
	mov	r14, QWORD PTR 8[rax]
	cmp	QWORD PTR [rax], r12
	jne	.L5
	test	r14, r14
	je	.L5
	mov	edi, DWORD PTR 8[r14]
	mov	edx, DWORD PTR I810_BUF_FREE[rip]
	mov	esi, DWORD PTR I810_BUF_CLIENT[rip]
	call	cmpxchg@PLT
	cmp	DWORD PTR I810_BUF_CLIENT[rip], eax
	je	.L18
.L6:
	mov	rax, QWORD PTR I810_BUF_MAPPED[rip]
	cmp	QWORD PTR [r14], rax
	jne	.L5
	mov	rax, QWORD PTR I810_BUF_UNMAPPED[rip]
	add	rbx, 1
	mov	QWORD PTR [r14], rax
	cmp	DWORD PTR 0[rbp], ebx
	jg	.L8
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	rdi, r13
	call	DRM_DEBUG@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	i810_driver_reclaim_buffers, .-i810_driver_reclaim_buffers
	.comm	I810_BUF_UNMAPPED,8,8
	.comm	I810_BUF_MAPPED,8,8
	.comm	I810_BUF_FREE,4,4
	.comm	I810_BUF_CLIENT,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_i810_dma.c_i810_driver_reclaim_buffers.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"reclaimed from client\012\000"
	.text
	.align	2
	.global	i810_driver_reclaim_buffers
	.syntax unified
	.arm
	.fpu softvfp
	.type	i810_driver_reclaim_buffers, %function
i810_driver_reclaim_buffers:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r6, [r0, #4]
	cmp	r6, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r3, [r0]
	cmp	r3, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r3, [r6, #4]
	cmp	r3, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	r7, r1
	bl	i810_flush_queue
	ldr	r1, [r6]
	cmp	r1, #0
	pople	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	r4, #0
	ldr	r9, .L23
	ldr	r8, .L23+4
	ldr	fp, .L23+8
	ldr	r10, .L23+12
	b	.L7
.L4:
	add	r4, r4, #1
	cmp	r1, r4
	pople	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	ldr	r2, [r6, #4]
	ldr	r2, [r2, r4, lsl #2]
	ldm	r2, {r2, r5}
	sub	r2, r2, r7
	clz	r2, r2
	cmp	r5, #0
	lsr	r2, r2, #5
	moveq	r2, #0
	cmp	r2, #0
	beq	.L4
	ldr	r2, [r9]
	ldr	r1, [r8]
	ldr	r0, [r5, #4]
	bl	cmpxchg
	ldr	r2, [r8]
	cmp	r2, r0
	beq	.L22
.L5:
	ldr	r1, [r5]
	ldr	r2, [fp]
	cmp	r1, r2
	ldreq	r2, [r10]
	ldreq	r1, [r6]
	ldrne	r1, [r6]
	streq	r2, [r5]
	b	.L4
.L22:
	ldr	r0, .L23+16
	bl	DRM_DEBUG
	b	.L5
.L24:
	.align	2
.L23:
	.word	I810_BUF_FREE
	.word	I810_BUF_CLIENT
	.word	I810_BUF_MAPPED
	.word	I810_BUF_UNMAPPED
	.word	.LC0
	.size	i810_driver_reclaim_buffers, .-i810_driver_reclaim_buffers
	.comm	I810_BUF_UNMAPPED,4,4
	.comm	I810_BUF_MAPPED,4,4
	.comm	I810_BUF_FREE,4,4
	.comm	I810_BUF_CLIENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
