	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_dpm_enable_uvd          ## -- Begin function amdgpu_dpm_enable_uvd
	.p2align	4, 0x90
_amdgpu_dpm_enable_uvd:                 ## @amdgpu_dpm_enable_uvd
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_is_support_sw_smu
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	36(%rbx), %rdi
	movq	_AMD_IP_BLOCK_TYPE_UVD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_smu_dpm_set_power_gate
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	testl	%r14d, %r14d
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rcx, %rsi
	leaq	L_.str(%rip), %rdi
	movl	%eax, %edx
	callq	_DRM_ERROR
	jmp	LBB0_5
LBB0_3:
	movq	16(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	leaq	32(%rbx), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_AMD_IP_BLOCK_TYPE_UVD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	testl	%r14d, %r14d
	sete	%dl
	movq	%rbx, %rdi
	callq	_amdgpu_dpm_set_powergating_by_smu
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_5:
	movq	(%rbx), %rax
	movq	_CHIP_STONEY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.6:
	movq	24(%rbx), %rax
	movq	_WIDTH_4K@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_10
## %bb.7:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.8:
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	xorl	%esi, %esi
	testl	%r14d, %r14d
	sete	%sil
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_IP_BLOCK_TYPE_UVD,4,2      ## @AMD_IP_BLOCK_TYPE_UVD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[SW SMU]: dpm enable uvd failed, state = %s, ret = %d. \n"

L_.str.1:                               ## @.str.1
	.asciz	"true"

L_.str.2:                               ## @.str.2
	.asciz	"false"

	.comm	_CHIP_STONEY,8,3                ## @CHIP_STONEY
	.comm	_WIDTH_4K,8,3                   ## @WIDTH_4K
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_dpm_enable_uvd          ; -- Begin function amdgpu_dpm_enable_uvd
	.p2align	2
_amdgpu_dpm_enable_uvd:                 ; @amdgpu_dpm_enable_uvd
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x20, x0
	bl	_is_support_sw_smu
	cbz	x0, LBB0_3
; %bb.1:
	add	x0, x20, #36
Lloh0:
	adrp	x8, _AMD_IP_BLOCK_TYPE_UVD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMD_IP_BLOCK_TYPE_UVD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_smu_dpm_set_power_gate
	cbz	w0, LBB0_5
; %bb.2:
	mov	x2, x0
Lloh3:
	adrp	x8, l_.str.1@PAGE
Lloh4:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh5:
	adrp	x9, l_.str.2@PAGE
Lloh6:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x1, x9, x8, eq
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_5
LBB0_3:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	add	x21, x20, #32
	mov	x0, x21
	bl	_mutex_lock
Lloh9:
	adrp	x8, _AMD_IP_BLOCK_TYPE_UVD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AMD_IP_BLOCK_TYPE_UVD@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	cmp	w19, #0
	cset	w2, eq
	mov	x0, x20
	bl	_amdgpu_dpm_set_powergating_by_smu
	mov	x0, x21
	bl	_mutex_unlock
LBB0_5:
	ldr	x8, [x20]
Lloh12:
	adrp	x9, _CHIP_STONEY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CHIP_STONEY@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.6:
	ldr	x8, [x20, #24]
Lloh15:
	adrp	x9, _WIDTH_4K@GOTPAGE
Lloh16:
	ldr	x9, [x9, _WIDTH_4K@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_11
; %bb.7:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_11
; %bb.8:
	ldr	x8, [x0]
	cbz	x8, LBB0_11
; %bb.9:
	ldr	x3, [x8]
	cbz	x3, LBB0_11
; %bb.10:
	cmp	w19, #0
	cset	w1, eq
	mov	w2, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	br	x3
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_IP_BLOCK_TYPE_UVD,4,2      ; @AMD_IP_BLOCK_TYPE_UVD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[SW SMU]: dpm enable uvd failed, state = %s, ret = %d. \n"

l_.str.1:                               ; @.str.1
	.asciz	"true"

l_.str.2:                               ; @.str.2
	.asciz	"false"

	.comm	_CHIP_STONEY,8,3                ; @CHIP_STONEY
	.comm	_WIDTH_4K,8,3                   ; @WIDTH_4K
.subsections_via_symbols
