	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_uvd_note_usage          ## -- Begin function radeon_uvd_note_usage
	.p2align	4, 0x90
_radeon_uvd_note_usage:                 ## @radeon_uvd_note_usage
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	24(%rdi), %r15
	movq	%r15, %rdi
	callq	_cancel_delayed_work_sync
	xorl	%ebx, %ebx
	testl	%eax, %eax
	sete	%bl
	movq	_UVD_IDLE_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_schedule_delayed_work
	movl	%eax, %r12d
	andl	%ebx, %r12d
	movq	(%r14), %rax
	movq	_PM_METHOD_DPM@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_6
## %bb.1:
	cmpq	$0, 8(%r14)
	je	LBB0_6
## %bb.2:
	movl	$0, -36(%rbp)
	movl	$0, -40(%rbp)
	leaq	-40(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_radeon_uvd_count_handles
	movl	-40(%rbp), %eax
	cmpl	%eax, 16(%r14)
	jne	LBB0_3
## %bb.4:
	movl	-36(%rbp), %ecx
	cmpl	%ecx, 20(%r14)
	jne	LBB0_5
	jmp	LBB0_6
LBB0_3:
	movl	-36(%rbp), %ecx
LBB0_5:
	movl	%eax, 16(%r14)
	movl	%ecx, 20(%r14)
LBB0_6:
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.7:
	movq	(%r14), %rax
	cmpq	(%r15), %rax
	jne	LBB0_10
## %bb.8:
	cmpq	$0, 8(%r14)
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_radeon_dpm_enable_uvd
	jmp	LBB0_11
LBB0_10:
	movq	%r14, %rdi
	movl	$53300, %esi                    ## imm = 0xD034
	movl	$40000, %edx                    ## imm = 0x9C40
	callq	_radeon_set_uvd_clocks
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UVD_IDLE_TIMEOUT_MS,4,2        ## @UVD_IDLE_TIMEOUT_MS
	.comm	_PM_METHOD_DPM,8,3              ## @PM_METHOD_DPM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_uvd_note_usage          ; -- Begin function radeon_uvd_note_usage
	.p2align	2
_radeon_uvd_note_usage:                 ; @radeon_uvd_note_usage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	add	x20, x0, #24
	mov	x0, x20
	bl	_cancel_delayed_work_sync
	cmp	w0, #0
	cset	w21, eq
Lloh0:
	adrp	x8, _UVD_IDLE_TIMEOUT_MS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UVD_IDLE_TIMEOUT_MS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x20
	bl	_schedule_delayed_work
	and	w21, w0, w21
	ldr	x8, [x19]
Lloh3:
	adrp	x20, _PM_METHOD_DPM@GOTPAGE
Lloh4:
	ldr	x20, [x20, _PM_METHOD_DPM@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.2:
	str	xzr, [sp, #8]
	add	x1, sp, #8
	add	x2, sp, #12
	mov	x0, x19
	bl	_radeon_uvd_count_handles
	ldr	w9, [x19, #16]
	ldr	w8, [sp, #8]
	cmp	w9, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	w10, [x19, #20]
	ldr	w9, [sp, #12]
	cmp	w10, w9
	b.ne	LBB0_5
	b	LBB0_6
LBB0_4:
	ldr	w9, [sp, #12]
LBB0_5:
	stp	w8, w9, [x19, #16]
LBB0_6:
	cbz	w21, LBB0_11
; %bb.7:
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	w1, #1
	bl	_radeon_dpm_enable_uvd
	b	LBB0_11
LBB0_10:
	mov	x0, x19
	mov	w1, #53300
	mov	w2, #40000
	bl	_radeon_set_uvd_clocks
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_UVD_IDLE_TIMEOUT_MS,4,2        ; @UVD_IDLE_TIMEOUT_MS
	.comm	_PM_METHOD_DPM,8,3              ; @PM_METHOD_DPM
.subsections_via_symbols
