	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_uvd_fini                ## -- Begin function radeon_uvd_fini
	.p2align	4, 0x90
_radeon_uvd_fini:                       ## @radeon_uvd_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	%rdi, %rbx
	movq	16(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	leaq	16(%rbx), %r14
	xorl	%esi, %esi
	callq	_radeon_bo_reserve
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	(%r14), %rdi
	callq	_radeon_bo_kunmap
	movq	(%r14), %rdi
	callq	_radeon_bo_unpin
	movq	(%r14), %rdi
	callq	_radeon_bo_unreserve
LBB0_3:
	movq	%r14, %rdi
	callq	_radeon_bo_unref
	movq	_R600_RING_TYPE_UVD_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	8(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_radeon_ring_fini
	movl	(%rbx), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_release_firmware               ## TAILCALL
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R600_RING_TYPE_UVD_INDEX,8,3   ## @R600_RING_TYPE_UVD_INDEX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_uvd_fini                ; -- Begin function radeon_uvd_fini
	.p2align	2
_radeon_uvd_fini:                       ; @radeon_uvd_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, x0
	mov	x20, x0
	ldr	x0, [x20, #16]!
	cbz	x0, LBB0_4
; %bb.1:
	mov	w1, #0
	bl	_radeon_bo_reserve
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	x0, [x20]
	bl	_radeon_bo_kunmap
	ldr	x0, [x20]
	bl	_radeon_bo_unpin
	ldr	x0, [x20]
	bl	_radeon_bo_unreserve
LBB0_3:
	mov	x0, x20
	bl	_radeon_bo_unref
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _R600_RING_TYPE_UVD_INDEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _R600_RING_TYPE_UVD_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	bl	_radeon_ring_fini
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_release_firmware
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_R600_RING_TYPE_UVD_INDEX,8,3   ; @R600_RING_TYPE_UVD_INDEX
.subsections_via_symbols
