	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kv_dpm_powergate_acp
_kv_dpm_powergate_acp:                  ## @kv_dpm_powergate_acp
	.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)
	je	LBB0_9
## %bb.1:
	movq	%rax, %r15
	movq	(%r14), %rax
	movq	_CHIP_KABINI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.2:
	movq	_CHIP_MULLINS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.3:
	movl	%ebx, (%r15)
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_kv_update_acp_dpm
	cmpq	$0, 8(%r15)
	je	LBB0_9
## %bb.5:
	movq	_PPSMC_MSG_ACPPowerOFF@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_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpq	$0, 8(%r15)
	je	LBB0_8
## %bb.7:
	movq	_PPSMC_MSG_ACPPowerON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_kv_notify_message_to_smu
LBB0_8:
	movq	%r14, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kv_update_acp_dpm              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_KABINI,8,3                ## @CHIP_KABINI
	.comm	_CHIP_MULLINS,8,3               ## @CHIP_MULLINS
	.comm	_PPSMC_MSG_ACPPowerOFF,4,2      ## @PPSMC_MSG_ACPPowerOFF
	.comm	_PPSMC_MSG_ACPPowerON,4,2       ## @PPSMC_MSG_ACPPowerON
	.no_dead_strip	_kv_dpm_powergate_acp
.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_acp
_kv_dpm_powergate_acp:                  ; @kv_dpm_powergate_acp
	.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.eq	LBB0_2
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _CHIP_KABINI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_KABINI@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _CHIP_MULLINS@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CHIP_MULLINS@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_3
LBB0_2:
	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_3:
	mov	x20, x0
	str	w21, [x0]
	cbz	w21, LBB0_6
; %bb.4:
	mov	x0, x19
	mov	w1, #1
	bl	_kv_update_acp_dpm
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_2
; %bb.5:
Lloh6:
	adrp	x8, _PPSMC_MSG_ACPPowerOFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PPSMC_MSG_ACPPowerOFF@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	_kv_notify_message_to_smu
LBB0_6:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_8
; %bb.7:
Lloh9:
	adrp	x8, _PPSMC_MSG_ACPPowerON@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PPSMC_MSG_ACPPowerON@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kv_notify_message_to_smu
LBB0_8:
	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_acp_dpm
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_KABINI,8,3                ; @CHIP_KABINI
	.comm	_CHIP_MULLINS,8,3               ; @CHIP_MULLINS
	.comm	_PPSMC_MSG_ACPPowerOFF,4,2      ; @PPSMC_MSG_ACPPowerOFF
	.comm	_PPSMC_MSG_ACPPowerON,4,2       ; @PPSMC_MSG_ACPPowerON
	.no_dead_strip	_kv_dpm_powergate_acp
.subsections_via_symbols
