	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ci_enable_sclk_mclk_dpm
_ci_enable_sclk_mclk_dpm:               ## @ci_enable_sclk_mclk_dpm
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_ci_get_pi
	movq	%rax, %r12
	movl	4(%rax), %eax
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.1:
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_PPSMC_MSG_DPM_Enable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ci_send_msg_to_smc
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_3:
	xorl	%r14d, %r14d
	cmpl	$0, (%r12)
	jne	LBB0_11
## %bb.4:
	movq	_PPSMC_MSG_MCLKDPM_Enable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ci_send_msg_to_smc
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.5:
	movq	_MC_SEQ_CNTL_3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CAC_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, %edx
	notl	%edx
	callq	_WREG32_P
	movq	_LCAC_MC0_CNTL@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	$5, %esi
	callq	_WREG32_SMC
	movq	_LCAC_MC1_CNTL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	$5, %esi
	callq	_WREG32_SMC
	movq	_LCAC_CPL_CNTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	$1048581, %esi                  ## imm = 0x100005
	callq	_WREG32_SMC
	movl	$10, %edi
	callq	_udelay
	movl	(%r15), %edi
	movl	$4194309, %esi                  ## imm = 0x400005
	callq	_WREG32_SMC
	movl	(%r12), %edi
	movl	$4194309, %esi                  ## imm = 0x400005
	callq	_WREG32_SMC
	movl	(%rbx), %edi
	movl	$5242885, %esi                  ## imm = 0x500005
	callq	_WREG32_SMC
	jmp	LBB0_11
LBB0_6:
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	_PPSMC_MSG_DPM_Disable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ci_send_msg_to_smc
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_8:
	xorl	%r14d, %r14d
	cmpl	$0, (%r12)
	jne	LBB0_11
## %bb.9:
	movq	_PPSMC_MSG_MCLKDPM_Disable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ci_send_msg_to_smc
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPSMC_MSG_DPM_Enable,4,2       ## @PPSMC_MSG_DPM_Enable
	.comm	_PPSMC_Result_OK,8,3            ## @PPSMC_Result_OK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PPSMC_MSG_MCLKDPM_Enable,4,2   ## @PPSMC_MSG_MCLKDPM_Enable
	.comm	_MC_SEQ_CNTL_3,4,2              ## @MC_SEQ_CNTL_3
	.comm	_CAC_EN,4,2                     ## @CAC_EN
	.comm	_LCAC_MC0_CNTL,4,2              ## @LCAC_MC0_CNTL
	.comm	_LCAC_MC1_CNTL,4,2              ## @LCAC_MC1_CNTL
	.comm	_LCAC_CPL_CNTL,4,2              ## @LCAC_CPL_CNTL
	.comm	_PPSMC_MSG_DPM_Disable,4,2      ## @PPSMC_MSG_DPM_Disable
	.comm	_PPSMC_MSG_MCLKDPM_Disable,4,2  ## @PPSMC_MSG_MCLKDPM_Disable
	.no_dead_strip	_ci_enable_sclk_mclk_dpm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ci_enable_sclk_mclk_dpm
_ci_enable_sclk_mclk_dpm:               ; @ci_enable_sclk_mclk_dpm
	.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	_ci_get_pi
	mov	x20, x0
	ldr	w8, [x0, #4]
	cbz	w21, LBB0_6
; %bb.1:
	cbnz	w8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _PPSMC_MSG_DPM_Enable@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PPSMC_MSG_DPM_Enable@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ci_send_msg_to_smc
Lloh3:
	adrp	x8, _PPSMC_Result_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PPSMC_Result_OK@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
LBB0_3:
	ldr	w8, [x20]
	cbnz	w8, LBB0_10
; %bb.4:
Lloh6:
	adrp	x8, _PPSMC_MSG_MCLKDPM_Enable@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PPSMC_MSG_MCLKDPM_Enable@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ci_send_msg_to_smc
Lloh9:
	adrp	x8, _PPSMC_Result_OK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PPSMC_Result_OK@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.5:
Lloh12:
	adrp	x8, _MC_SEQ_CNTL_3@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MC_SEQ_CNTL_3@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _CAC_EN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CAC_EN@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mvn	w2, w1
	bl	_WREG32_P
Lloh18:
	adrp	x19, _LCAC_MC0_CNTL@GOTPAGE
Lloh19:
	ldr	x19, [x19, _LCAC_MC0_CNTL@GOTPAGEOFF]
	ldr	w0, [x19]
	mov	w1, #5
	bl	_WREG32_SMC
Lloh20:
	adrp	x20, _LCAC_MC1_CNTL@GOTPAGE
Lloh21:
	ldr	x20, [x20, _LCAC_MC1_CNTL@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	w1, #5
	bl	_WREG32_SMC
Lloh22:
	adrp	x21, _LCAC_CPL_CNTL@GOTPAGE
Lloh23:
	ldr	x21, [x21, _LCAC_CPL_CNTL@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w22, #5
	movk	w22, #64, lsl #16
	sub	w1, w22, #768, lsl #12          ; =3145728
	bl	_WREG32_SMC
	mov	w0, #10
	bl	_udelay
	ldr	w0, [x19]
	mov	w1, #5
	movk	w1, #64, lsl #16
	bl	_WREG32_SMC
	ldr	w0, [x20]
	mov	w1, #5
	movk	w1, #64, lsl #16
	bl	_WREG32_SMC
	ldr	w0, [x21]
	orr	w1, w22, #0x100000
	bl	_WREG32_SMC
	b	LBB0_10
LBB0_6:
	cbnz	w8, LBB0_8
; %bb.7:
Lloh24:
	adrp	x8, _PPSMC_MSG_DPM_Disable@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PPSMC_MSG_DPM_Disable@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ci_send_msg_to_smc
Lloh27:
	adrp	x8, _PPSMC_Result_OK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PPSMC_Result_OK@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
LBB0_8:
	ldr	w8, [x20]
	cbnz	w8, LBB0_10
; %bb.9:
Lloh30:
	adrp	x8, _PPSMC_MSG_MCLKDPM_Disable@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PPSMC_MSG_MCLKDPM_Disable@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ci_send_msg_to_smc
Lloh33:
	adrp	x8, _PPSMC_Result_OK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PPSMC_Result_OK@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
LBB0_10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
Lloh36:
	adrp	x8, _EINVAL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_PPSMC_MSG_DPM_Enable,4,2       ; @PPSMC_MSG_DPM_Enable
	.comm	_PPSMC_Result_OK,8,3            ; @PPSMC_Result_OK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PPSMC_MSG_MCLKDPM_Enable,4,2   ; @PPSMC_MSG_MCLKDPM_Enable
	.comm	_MC_SEQ_CNTL_3,4,2              ; @MC_SEQ_CNTL_3
	.comm	_CAC_EN,4,2                     ; @CAC_EN
	.comm	_LCAC_MC0_CNTL,4,2              ; @LCAC_MC0_CNTL
	.comm	_LCAC_MC1_CNTL,4,2              ; @LCAC_MC1_CNTL
	.comm	_LCAC_CPL_CNTL,4,2              ; @LCAC_CPL_CNTL
	.comm	_PPSMC_MSG_DPM_Disable,4,2      ; @PPSMC_MSG_DPM_Disable
	.comm	_PPSMC_MSG_MCLKDPM_Disable,4,2  ; @PPSMC_MSG_MCLKDPM_Disable
	.no_dead_strip	_ci_enable_sclk_mclk_dpm
.subsections_via_symbols
