	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_cleanup_ring_buffer      ## -- Begin function intel_cleanup_ring_buffer
	.p2align	4, 0x90
_intel_cleanup_ring_buffer:             ## @intel_cleanup_ring_buffer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	cmpq	$0, 8(%rdi)
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	callq	_intel_ring_idle
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	20(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	movl	%eax, %edx
	callq	_DRM_ERROR
LBB0_3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_I915_WRITE_CTL
	movl	16(%rbx), %edi
	callq	_iounmap
	movq	8(%rbx), %rdi
	callq	_i915_gem_object_unpin
	movq	8(%rbx), %rdi
	callq	_drm_gem_object_unreference
	movq	$0, 8(%rbx)
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_5:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_cleanup_status_page            ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to quiesce %s whilst cleaning up: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_cleanup_ring_buffer      ; -- Begin function intel_cleanup_ring_buffer
	.p2align	2
_intel_cleanup_ring_buffer:             ; @intel_cleanup_ring_buffer
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x19, x0
	bl	_intel_ring_idle
	cbz	w0, LBB0_3
; %bb.2:
	mov	x2, x0
	ldr	w1, [x19, #20]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_3:
	mov	x0, x19
	mov	w1, #0
	bl	_I915_WRITE_CTL
	ldr	w0, [x19, #16]
	bl	_iounmap
	ldr	x0, [x19, #8]
	bl	_i915_gem_object_unpin
	ldr	x0, [x19, #8]
	bl	_drm_gem_object_unreference
	str	xzr, [x19, #8]
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	blr	x8
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_cleanup_status_page
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to quiesce %s whilst cleaning up: %d\n"

.subsections_via_symbols
