	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ci_enable_vce_dpm
_ci_enable_vce_dpm:                     ## @ci_enable_vce_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_ci_get_pi
	xorl	%ecx, %ecx
	cmpq	$0, 32(%r15)
	setne	%dl
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.1:
	movl	$0, (%rax)
	movl	(%r15), %edi
	testl	%edi, %edi
	jle	LBB0_2
## %bb.3:
	movb	%dl, %cl
	leaq	(%r15,%rcx,8), %rdx
	addq	$16, %rdx
	movq	8(%r15), %r8
	movq	(%rdx), %rsi
	xorl	%edx, %edx
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	%edi, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	-1(%rbx), %edi
	cmpq	%rsi, (%r8,%rdi,8)
	jle	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	leal	1(%rdi), %ecx
	movl	%edi, %ebx
	cmpl	$1, %ecx
	ja	LBB0_5
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	leal	-1(%rbx), %edi
	btsl	%edi, %edx
	movl	%edx, (%rax)
	cmpl	$0, 4(%rax)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$1, %ebx
	ja	LBB0_4
	jmp	LBB0_9
LBB0_2:
	xorl	%edx, %edx
LBB0_9:
	movq	_PPSMC_MSG_VCEDPM_SetEnabledMask@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ci_send_msg_to_smc_with_parameter
LBB0_10:
	testl	%r14d, %r14d
	jne	LBB0_11
## %bb.12:
	movq	_PPSMC_MSG_VCEDPM_Disable@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_PPSMC_MSG_VCEDPM_Enable@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ci_send_msg_to_smc
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %rdx
	movq	_EINVAL@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	subl	(%rsi), %ecx
	cmpq	(%rdx), %rax
	cmovel	%edi, %ecx
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPSMC_MSG_VCEDPM_SetEnabledMask,4,2 ## @PPSMC_MSG_VCEDPM_SetEnabledMask
	.comm	_PPSMC_MSG_VCEDPM_Enable,4,2    ## @PPSMC_MSG_VCEDPM_Enable
	.comm	_PPSMC_MSG_VCEDPM_Disable,4,2   ## @PPSMC_MSG_VCEDPM_Disable
	.comm	_PPSMC_Result_OK,8,3            ## @PPSMC_Result_OK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ci_enable_vce_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_vce_dpm
_ci_enable_vce_dpm:                     ; @ci_enable_vce_dpm
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_ci_get_pi
	ldr	x8, [x19, #32]
	add	x9, x19, #24
	add	x10, x19, #16
	cmp	x8, #0
	csel	x10, x10, x9, eq
	cbz	w20, LBB0_8
; %bb.1:
	str	wzr, [x0]
	ldr	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.2:
	mov	w2, #0
	ldr	x8, [x19, #8]
	ldr	x10, [x10]
	mov	w11, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w12, w9, #1
	ldr	x13, [x8, w12, uxtw #3]
	cmp	x13, x10
	b.le	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w13, w12, #1
	mov	x9, x12
	cmp	w13, #1
	b.hi	LBB0_3
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	lsl	w13, w11, w12
	orr	w2, w2, w13
	str	w2, [x0]
	ldr	w13, [x0, #4]
	cmp	w13, #0
	ccmp	w9, #1, #0, ne
	mov	x9, x12
	b.hi	LBB0_3
	b	LBB0_7
LBB0_6:
	mov	w2, #0
LBB0_7:
Lloh0:
	adrp	x8, _PPSMC_MSG_VCEDPM_SetEnabledMask@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PPSMC_MSG_VCEDPM_SetEnabledMask@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ci_send_msg_to_smc_with_parameter
LBB0_8:
Lloh3:
	adrp	x8, _PPSMC_MSG_VCEDPM_Enable@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PPSMC_MSG_VCEDPM_Enable@GOTPAGEOFF]
Lloh5:
	adrp	x9, _PPSMC_MSG_VCEDPM_Disable@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PPSMC_MSG_VCEDPM_Disable@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ci_send_msg_to_smc
Lloh7:
	adrp	x8, _PPSMC_Result_OK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PPSMC_Result_OK@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _EINVAL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	x0, x8
	csneg	w0, wzr, w9, eq
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PPSMC_MSG_VCEDPM_SetEnabledMask,4,2 ; @PPSMC_MSG_VCEDPM_SetEnabledMask
	.comm	_PPSMC_MSG_VCEDPM_Enable,4,2    ; @PPSMC_MSG_VCEDPM_Enable
	.comm	_PPSMC_MSG_VCEDPM_Disable,4,2   ; @PPSMC_MSG_VCEDPM_Disable
	.comm	_PPSMC_Result_OK,8,3            ; @PPSMC_Result_OK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ci_enable_vce_dpm
.subsections_via_symbols
