	.file	"extr_i810_dma.c_i810_dma_cleanup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	i810_dma_cleanup, @function
i810_dma_cleanup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, DWORD PTR DRIVER_HAVE_IRQ[rip]
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbp, QWORD PTR 24[rdi]
	call	drm_core_check_feature@PLT
	test	rax, rax
	je	.L2
	cmp	QWORD PTR 16[r12], 0
	jne	.L20
.L2:
	mov	rbx, QWORD PTR [r12]
	test	rbx, rbx
	je	.L3
	cmp	QWORD PTR 24[rbx], 0
	jne	.L21
	mov	rdx, QWORD PTR 8[rbx]
	test	rdx, rdx
	jne	.L22
.L5:
	mov	rdi, QWORD PTR [r12]
	call	kfree@PLT
	mov	eax, DWORD PTR 0[rbp]
	mov	QWORD PTR [r12], 0
	test	eax, eax
	jle	.L3
	xor	ebx, ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	add	rbx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jle	.L3
.L7:
	mov	rax, QWORD PTR 8[rbp]
	mov	rax, QWORD PTR [rax+rbx*8]
	mov	rdi, QWORD PTR 8[rax]
	cmp	QWORD PTR 8[rdi], 0
	je	.L6
	cmp	QWORD PTR [rax], 0
	je	.L6
	mov	rsi, r12
	add	rbx, 1
	call	drm_core_ioremapfree@PLT
	cmp	DWORD PTR 0[rbp], ebx
	jg	.L7
.L3:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	edi, DWORD PTR 8[r12]
	mov	ecx, DWORD PTR [rbx]
	mov	esi, DWORD PTR PAGE_SIZE[rip]
	call	pci_free_consistent@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	lea	rdi, 16[rbx]
	mov	rsi, r12
	call	drm_core_ioremapfree@PLT
	mov	rdx, QWORD PTR 8[rbx]
	test	rdx, rdx
	je	.L5
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdi, r12
	call	drm_irq_uninstall@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	i810_dma_cleanup, .-i810_dma_cleanup
	.comm	PAGE_SIZE,4,4
	.comm	DRIVER_HAVE_IRQ,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_dma_cleanup.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	i810_dma_cleanup, %function
i810_dma_cleanup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L37
	push	{r4, r5, r6, lr}
	ldr	r1, [r3]
	mov	r5, r0
	ldr	r6, [r0, #12]
	bl	drm_core_check_feature
	cmp	r0, #0
	beq	.L2
	ldr	r3, [r5, #8]
	cmp	r3, #0
	bne	.L33
.L2:
	ldr	r4, [r5]
	cmp	r4, #0
	beq	.L3
	ldr	r3, [r4, #12]
	cmp	r3, #0
	bne	.L34
	ldr	r2, [r4, #4]
	cmp	r2, #0
	bne	.L35
.L5:
	mov	r4, #0
	ldr	r0, [r5]
	bl	kfree
	ldr	r1, [r6]
	str	r4, [r5]
.L31:
	cmp	r1, r4
	ble	.L3
.L36:
	ldr	r3, [r6, #4]
	ldr	r3, [r3, r4, lsl #2]
	add	r4, r4, #1
	ldr	r0, [r3, #4]
	ldr	r2, [r0, #4]
	cmp	r2, #0
	beq	.L31
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L31
	mov	r1, r5
	bl	drm_core_ioremapfree
	ldr	r1, [r6]
	cmp	r1, r4
	bgt	.L36
.L3:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L35:
	ldr	r1, .L37+4
	ldr	r3, [r4]
	ldr	r1, [r1]
	ldr	r0, [r5, #4]
	bl	pci_free_consistent
	b	.L5
.L34:
	mov	r1, r5
	add	r0, r4, #8
	bl	drm_core_ioremapfree
	ldr	r2, [r4, #4]
	cmp	r2, #0
	beq	.L5
	b	.L35
.L33:
	mov	r0, r5
	bl	drm_irq_uninstall
	b	.L2
.L38:
	.align	2
.L37:
	.word	DRIVER_HAVE_IRQ
	.word	PAGE_SIZE
	.size	i810_dma_cleanup, .-i810_dma_cleanup
	.comm	PAGE_SIZE,4,4
	.comm	DRIVER_HAVE_IRQ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
