	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ih_ring_fini            ## -- Begin function amdgpu_ih_ring_fini
	.p2align	4, 0x90
_amdgpu_ih_ring_fini:                   ## @amdgpu_ih_ring_fini
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	cmpq	$0, 40(%rsi)
	je	LBB0_4
## %bb.1:
	movq	16(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.2:
	movl	(%r14), %edi
	movq	32(%rbx), %rsi
	addq	$8, %rsi
	movl	(%rbx), %ecx
	callq	_dma_free_coherent
	movq	$0, 16(%rbx)
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	leaq	24(%rbx), %rdi
	leaq	16(%rbx), %rdx
	movq	%rbx, %rsi
	callq	_amdgpu_bo_free_kernel
	movl	4(%rbx), %eax
	subl	(%rbx), %eax
	leal	3(%rax), %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$2, %esi
	movq	%r14, %rdi
	callq	_amdgpu_device_wb_free
	movl	8(%rbx), %eax
	subl	(%rbx), %eax
	leal	3(%rax), %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$2, %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_amdgpu_device_wb_free          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ih_ring_fini            ; -- Begin function amdgpu_ih_ring_fini
	.p2align	2
_amdgpu_ih_ring_fini:                   ; @amdgpu_ih_ring_fini
	.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, x1
	mov	x20, x0
	ldr	x8, [x1, #40]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x2, [x19, #16]
	cbz	x2, LBB0_3
; %bb.2:
	ldr	w0, [x20]
	ldr	x8, [x19, #32]
	add	x1, x8, #8
	ldr	w3, [x19]
	bl	_dma_free_coherent
	str	xzr, [x19, #16]
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	add	x0, x19, #24
	add	x2, x19, #16
	mov	x1, x19
	bl	_amdgpu_bo_free_kernel
	ldp	w9, w8, [x19]
	sub	w8, w8, w9
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w1, w8, #2
	mov	x0, x20
	bl	_amdgpu_device_wb_free
	ldr	w8, [x19, #8]
	ldr	w9, [x19]
	sub	w8, w8, w9
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w1, w8, #2
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_amdgpu_device_wb_free
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
