	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kv_dpm_powergate_vce
_kv_dpm_powergate_vce:                  ## @kv_dpm_powergate_vce
	.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, %ebx
	movq	%rdi, %r14
	callq	_kv_get_pi
	movq	%rax, %r15
	movl	%ebx, (%rax)
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.1:
	movq	_AMD_IP_BLOCK_TYPE_VCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AMD_PG_STATE_GATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_amdgpu_device_ip_set_powergating_state
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_kv_enable_vce_dpm
	cmpq	$0, 8(%r15)
	je	LBB0_6
## %bb.2:
	movq	_PPSMC_MSG_VCEPowerOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_amdgpu_kv_notify_message_to_smu ## TAILCALL
LBB0_3:
	cmpq	$0, 8(%r15)
	je	LBB0_5
## %bb.4:
	movq	_PPSMC_MSG_VCEPowerON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_amdgpu_kv_notify_message_to_smu
LBB0_5:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_kv_enable_vce_dpm
	movq	_AMD_IP_BLOCK_TYPE_VCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AMD_PG_STATE_UNGATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_amdgpu_device_ip_set_powergating_state ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_IP_BLOCK_TYPE_VCE,4,2      ## @AMD_IP_BLOCK_TYPE_VCE
	.comm	_AMD_PG_STATE_GATE,4,2          ## @AMD_PG_STATE_GATE
	.comm	_PPSMC_MSG_VCEPowerOFF,4,2      ## @PPSMC_MSG_VCEPowerOFF
	.comm	_PPSMC_MSG_VCEPowerON,4,2       ## @PPSMC_MSG_VCEPowerON
	.comm	_AMD_PG_STATE_UNGATE,4,2        ## @AMD_PG_STATE_UNGATE
	.no_dead_strip	_kv_dpm_powergate_vce
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kv_dpm_powergate_vce
_kv_dpm_powergate_vce:                  ; @kv_dpm_powergate_vce
	.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	x21, x1
	mov	x19, x0
	bl	_kv_get_pi
	mov	x20, x0
	str	w21, [x0]
	cbz	w21, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _AMD_IP_BLOCK_TYPE_VCE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMD_IP_BLOCK_TYPE_VCE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _AMD_PG_STATE_GATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AMD_PG_STATE_GATE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_amdgpu_device_ip_set_powergating_state
	mov	x0, x19
	mov	w1, #0
	bl	_kv_enable_vce_dpm
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
; %bb.2:
Lloh6:
	adrp	x8, _PPSMC_MSG_VCEPowerOFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PPSMC_MSG_VCEPowerOFF@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_amdgpu_kv_notify_message_to_smu
LBB0_3:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.4:
Lloh9:
	adrp	x8, _PPSMC_MSG_VCEPowerON@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PPSMC_MSG_VCEPowerON@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amdgpu_kv_notify_message_to_smu
LBB0_5:
	mov	x0, x19
	mov	w1, #1
	bl	_kv_enable_vce_dpm
Lloh12:
	adrp	x8, _AMD_IP_BLOCK_TYPE_VCE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AMD_IP_BLOCK_TYPE_VCE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _AMD_PG_STATE_UNGATE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AMD_PG_STATE_UNGATE@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	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
	b	_amdgpu_device_ip_set_powergating_state
LBB0_6:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_IP_BLOCK_TYPE_VCE,4,2      ; @AMD_IP_BLOCK_TYPE_VCE
	.comm	_AMD_PG_STATE_GATE,4,2          ; @AMD_PG_STATE_GATE
	.comm	_PPSMC_MSG_VCEPowerOFF,4,2      ; @PPSMC_MSG_VCEPowerOFF
	.comm	_PPSMC_MSG_VCEPowerON,4,2       ; @PPSMC_MSG_VCEPowerON
	.comm	_AMD_PG_STATE_UNGATE,4,2        ; @AMD_PG_STATE_UNGATE
	.no_dead_strip	_kv_dpm_powergate_vce
.subsections_via_symbols
