	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uvd_v5_0_get_clockgating_state
_uvd_v5_0_get_clockgating_state:        ## @uvd_v5_0_get_clockgating_state
	.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, %r14
	movq	%rdi, %rbx
	callq	_mutex_lock
	movq	_ixCURRENT_PG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32_SMC
	movq	_CURRENT_PG_STATUS__UVD_PG_STATUS_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_INFO
	jmp	LBB0_4
LBB0_2:
	movq	_mmUVD_CGC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movq	_UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	_AMD_CG_SUPPORT_UVD_MGCG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_4:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ixCURRENT_PG_STATUS,4,2        ## @ixCURRENT_PG_STATUS
	.comm	_CURRENT_PG_STATUS__UVD_PG_STATUS_MASK,4,2 ## @CURRENT_PG_STATUS__UVD_PG_STATUS_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot get clockgating state when UVD is powergated.\n"

	.comm	_mmUVD_CGC_CTRL,4,2             ## @mmUVD_CGC_CTRL
	.comm	_UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK,4,2 ## @UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK
	.comm	_AMD_CG_SUPPORT_UVD_MGCG,4,2    ## @AMD_CG_SUPPORT_UVD_MGCG
	.no_dead_strip	_uvd_v5_0_get_clockgating_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uvd_v5_0_get_clockgating_state
_uvd_v5_0_get_clockgating_state:        ; @uvd_v5_0_get_clockgating_state
	.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	x20, x1
	mov	x19, x0
	bl	_mutex_lock
Lloh0:
	adrp	x8, _ixCURRENT_PG_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ixCURRENT_PG_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RREG32_SMC
Lloh3:
	adrp	x8, _CURRENT_PG_STATUS__UVD_PG_STATUS_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CURRENT_PG_STATUS__UVD_PG_STATUS_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_INFO
	b	LBB0_4
LBB0_2:
Lloh8:
	adrp	x8, _mmUVD_CGC_CTRL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mmUVD_CGC_CTRL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_RREG32
Lloh11:
	adrp	x8, _UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _AMD_CG_SUPPORT_UVD_MGCG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AMD_CG_SUPPORT_UVD_MGCG@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ixCURRENT_PG_STATUS,4,2        ; @ixCURRENT_PG_STATUS
	.comm	_CURRENT_PG_STATUS__UVD_PG_STATUS_MASK,4,2 ; @CURRENT_PG_STATUS__UVD_PG_STATUS_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot get clockgating state when UVD is powergated.\n"

	.comm	_mmUVD_CGC_CTRL,4,2             ; @mmUVD_CGC_CTRL
	.comm	_UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK,4,2 ; @UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK
	.comm	_AMD_CG_SUPPORT_UVD_MGCG,4,2    ; @AMD_CG_SUPPORT_UVD_MGCG
	.no_dead_strip	_uvd_v5_0_get_clockgating_state
.subsections_via_symbols
