	.file	"extr_intel_ringbuffer.c_intel_cleanup_ring_buffer.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"failed to quiesce %s whilst cleaning up: %d\n"
	.text
	.p2align 4
	.globl	intel_cleanup_ring_buffer
	.type	intel_cleanup_ring_buffer, @function
intel_cleanup_ring_buffer:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR 8[rdi], 0
	je	.L1
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	call	intel_ring_idle@PLT
	test	eax, eax
	jne	.L15
.L3:
	xor	esi, esi
	mov	rdi, rbp
	call	I915_WRITE_CTL@PLT
	mov	edi, DWORD PTR 16[rbp]
	call	iounmap@PLT
	mov	rdi, QWORD PTR 8[rbp]
	call	i915_gem_object_unpin@PLT
	mov	rdi, QWORD PTR 8[rbp]
	call	drm_gem_object_unreference@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	QWORD PTR 8[rbp], 0
	test	rax, rax
	je	.L4
	mov	rdi, rbp
	call	rax
.L4:
	mov	rdi, rbp
	pop	rbp
	.cfi_remember_state
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	cleanup_status_page@PLT
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	esi, DWORD PTR 20[rbp]
	mov	edx, eax
	lea	rdi, .LC0[rip]
	call	DRM_ERROR@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_def_cfa_offset 8
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE0:
	.size	intel_cleanup_ring_buffer, .-intel_cleanup_ring_buffer
	.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_intel_ringbuffer.c_intel_cleanup_ring_buffer.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to quiesce %s whilst cleaning up: %d\012\000"
	.text
	.align	2
	.global	intel_cleanup_ring_buffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	intel_cleanup_ring_buffer, %function
intel_cleanup_ring_buffer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #4]
	cmp	r3, #0
	bxeq	lr
	push	{r4, lr}
	mov	r4, r0
	bl	intel_ring_idle
	subs	r2, r0, #0
	bne	.L15
.L3:
	mov	r1, #0
	mov	r0, r4
	bl	I915_WRITE_CTL
	ldr	r0, [r4, #8]
	bl	iounmap
	ldr	r0, [r4, #4]
	bl	i915_gem_object_unpin
	ldr	r0, [r4, #4]
	bl	drm_gem_object_unreference
	mov	r2, #0
	ldr	r3, [r4]
	str	r2, [r4, #4]
	cmp	r3, r2
	beq	.L4
	mov	r0, r4
	blx	r3
.L4:
	mov	r0, r4
	pop	{r4, lr}
	b	cleanup_status_page
.L15:
	ldr	r1, [r4, #12]
	ldr	r0, .L16
	bl	DRM_ERROR
	b	.L3
.L17:
	.align	2
.L16:
	.word	.LC0
	.size	intel_cleanup_ring_buffer, .-intel_cleanup_ring_buffer
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
