	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ring_destroy
_ring_destroy:                          ## @ring_destroy
	.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
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	callq	_INTEL_GEN
	xorl	%edi, %edi
	cmpl	$3, %eax
	jl	LBB0_2
## %bb.1:
	movq	_RING_MI_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ENGINE_READ
	movq	_MODE_IDLE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	testl	%eax, (%rcx)
	sete	%dil
LBB0_2:
	callq	_WARN_ON
	movq	%rbx, %rdi
	callq	_intel_engine_cleanup_common
	movl	4(%rbx), %edi
	callq	_intel_ring_unpin
	movl	4(%rbx), %edi
	callq	_intel_ring_put
	movl	(%rbx), %edi
	callq	_intel_timeline_unpin
	movl	(%rbx), %edi
	callq	_intel_timeline_put
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RING_MI_MODE,4,2               ## @RING_MI_MODE
	.comm	_MODE_IDLE,4,2                  ## @MODE_IDLE
	.no_dead_strip	_ring_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ring_destroy
_ring_destroy:                          ; @ring_destroy
	.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
	mov	x19, x0
	ldr	x0, [x0, #8]
	bl	_INTEL_GEN
	cmp	w0, #3
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _RING_MI_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RING_MI_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ENGINE_READ
Lloh3:
	adrp	x8, _MODE_IDLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MODE_IDLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, eq
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_WARN_ON
	mov	x0, x19
	bl	_intel_engine_cleanup_common
	ldr	w0, [x19, #4]
	bl	_intel_ring_unpin
	ldr	w0, [x19, #4]
	bl	_intel_ring_put
	ldr	w0, [x19]
	bl	_intel_timeline_unpin
	ldr	w0, [x19]
	bl	_intel_timeline_put
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_MI_MODE,4,2               ; @RING_MI_MODE
	.comm	_MODE_IDLE,4,2                  ; @MODE_IDLE
	.no_dead_strip	_ring_destroy
.subsections_via_symbols
