	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kv_dpm_powergate_samu
_kv_dpm_powergate_samu:                 ## @kv_dpm_powergate_samu
	.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
	cmpl	%ebx, (%rax)
	jne	LBB0_1
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %r15
	movl	%ebx, (%rax)
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_kv_update_samu_dpm
	cmpq	$0, 8(%r15)
	je	LBB0_7
## %bb.3:
	movq	_PPSMC_MSG_SAMPowerOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kv_notify_message_to_smu       ## TAILCALL
LBB0_4:
	cmpq	$0, 8(%r15)
	je	LBB0_6
## %bb.5:
	movq	_PPSMC_MSG_SAMPowerON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_kv_notify_message_to_smu
LBB0_6:
	movq	%r14, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kv_update_samu_dpm             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PPSMC_MSG_SAMPowerOFF,4,2      ## @PPSMC_MSG_SAMPowerOFF
	.comm	_PPSMC_MSG_SAMPowerON,4,2       ## @PPSMC_MSG_SAMPowerON
	.no_dead_strip	_kv_dpm_powergate_samu
.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_samu
_kv_dpm_powergate_samu:                 ; @kv_dpm_powergate_samu
	.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
	ldr	w8, [x0]
	cmp	w8, w21
	b.ne	LBB0_2
LBB0_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
	ret
LBB0_2:
	mov	x20, x0
	str	w21, [x0]
	cbz	w21, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	w1, #1
	bl	_kv_update_samu_dpm
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_1
; %bb.4:
Lloh0:
	adrp	x8, _PPSMC_MSG_SAMPowerOFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PPSMC_MSG_SAMPowerOFF@GOTPAGEOFF]
Lloh2:
	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	_kv_notify_message_to_smu
LBB0_5:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
; %bb.6:
Lloh3:
	adrp	x8, _PPSMC_MSG_SAMPowerON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PPSMC_MSG_SAMPowerON@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kv_notify_message_to_smu
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	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	_kv_update_samu_dpm
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PPSMC_MSG_SAMPowerOFF,4,2      ; @PPSMC_MSG_SAMPowerOFF
	.comm	_PPSMC_MSG_SAMPowerON,4,2       ; @PPSMC_MSG_SAMPowerON
	.no_dead_strip	_kv_dpm_powergate_samu
.subsections_via_symbols
