	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ci_enable_power_containment
_ci_enable_power_containment:           ## @ci_enable_power_containment
	.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
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.1:
	movl	$0, (%r12)
	cmpq	$0, 8(%r12)
	je	LBB0_2
## %bb.3:
	xorl	%r14d, %r14d
	cmpq	$0, 32(%r12)
	je	LBB0_7
## %bb.4:
	movq	_PPSMC_MSG_EnableDTE@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_5
## %bb.6:
	movq	_POWERCONTAINMENT_FEATURE_BAPM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
LBB0_7:
	cmpq	$0, 24(%r12)
	jne	LBB0_8
	jmp	LBB0_11
LBB0_15:
	xorl	%r14d, %r14d
	cmpq	$0, 8(%r12)
	je	LBB0_24
## %bb.16:
	movl	(%r12), %eax
	testl	%eax, %eax
	je	LBB0_24
## %bb.17:
	movq	_POWERCONTAINMENT_FEATURE_TDCLimit@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_19
## %bb.18:
	movq	_PPSMC_MSG_TDCLimitDisable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ci_send_msg_to_smc
	movl	(%r12), %eax
LBB0_19:
	movq	_POWERCONTAINMENT_FEATURE_BAPM@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_21
## %bb.20:
	movq	_PPSMC_MSG_DisableDTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ci_send_msg_to_smc
	movl	(%r12), %eax
LBB0_21:
	movq	_POWERCONTAINMENT_FEATURE_PkgPwrLimit@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_23
## %bb.22:
	movq	_PPSMC_MSG_PkgPwrLimitDisable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ci_send_msg_to_smc
LBB0_23:
	movl	$0, (%r12)
	jmp	LBB0_24
LBB0_2:
	xorl	%r14d, %r14d
	jmp	LBB0_24
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	cmpq	$0, 24(%r12)
	je	LBB0_11
LBB0_8:
	movq	_PPSMC_MSG_TDCLimitEnable@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_9
## %bb.10:
	movq	_POWERCONTAINMENT_FEATURE_TDCLimit@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
LBB0_11:
	cmpq	$0, 16(%r12)
	jne	LBB0_12
	jmp	LBB0_24
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	cmpq	$0, 16(%r12)
	je	LBB0_24
LBB0_12:
	movq	_PPSMC_MSG_PkgPwrLimitEnable@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_13
## %bb.14:
	movq	(%r15), %rax
	movl	(%rax), %esi
	shll	$8, %esi
	movq	_POWERCONTAINMENT_FEATURE_PkgPwrLimit@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	movq	%r15, %rdi
	callq	_ci_set_power_limit
	jmp	LBB0_24
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_24:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPSMC_MSG_EnableDTE,4,2        ## @PPSMC_MSG_EnableDTE
	.comm	_PPSMC_Result_OK,8,3            ## @PPSMC_Result_OK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_POWERCONTAINMENT_FEATURE_BAPM,4,2 ## @POWERCONTAINMENT_FEATURE_BAPM
	.comm	_PPSMC_MSG_TDCLimitEnable,4,2   ## @PPSMC_MSG_TDCLimitEnable
	.comm	_POWERCONTAINMENT_FEATURE_TDCLimit,4,2 ## @POWERCONTAINMENT_FEATURE_TDCLimit
	.comm	_PPSMC_MSG_PkgPwrLimitEnable,4,2 ## @PPSMC_MSG_PkgPwrLimitEnable
	.comm	_POWERCONTAINMENT_FEATURE_PkgPwrLimit,4,2 ## @POWERCONTAINMENT_FEATURE_PkgPwrLimit
	.comm	_PPSMC_MSG_TDCLimitDisable,4,2  ## @PPSMC_MSG_TDCLimitDisable
	.comm	_PPSMC_MSG_DisableDTE,4,2       ## @PPSMC_MSG_DisableDTE
	.comm	_PPSMC_MSG_PkgPwrLimitDisable,4,2 ## @PPSMC_MSG_PkgPwrLimitDisable
	.no_dead_strip	_ci_enable_power_containment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ci_enable_power_containment
_ci_enable_power_containment:           ; @ci_enable_power_containment
	.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
	cbz	w21, LBB0_5
; %bb.1:
	str	wzr, [x20]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_14
; %bb.2:
	ldr	x8, [x20, #32]
Lloh0:
	adrp	x22, _PPSMC_Result_OK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PPSMC_Result_OK@GOTPAGEOFF]
	cbz	x8, LBB0_15
; %bb.3:
Lloh2:
	adrp	x8, _PPSMC_MSG_EnableDTE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PPSMC_MSG_EnableDTE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ci_send_msg_to_smc
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.4:
	mov	w21, #0
Lloh5:
	adrp	x8, _POWERCONTAINMENT_FEATURE_BAPM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _POWERCONTAINMENT_FEATURE_BAPM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_17
	b	LBB0_19
LBB0_5:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_14
; %bb.6:
	ldr	w8, [x20]
	cbz	w8, LBB0_14
; %bb.7:
Lloh8:
	adrp	x9, _POWERCONTAINMENT_FEATURE_TDCLimit@GOTPAGE
Lloh9:
	ldr	x9, [x9, _POWERCONTAINMENT_FEATURE_TDCLimit@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh11:
	adrp	x8, _PPSMC_MSG_TDCLimitDisable@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PPSMC_MSG_TDCLimitDisable@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ci_send_msg_to_smc
	ldr	w8, [x20]
LBB0_9:
Lloh14:
	adrp	x9, _POWERCONTAINMENT_FEATURE_BAPM@GOTPAGE
Lloh15:
	ldr	x9, [x9, _POWERCONTAINMENT_FEATURE_BAPM@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
Lloh17:
	adrp	x8, _PPSMC_MSG_DisableDTE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PPSMC_MSG_DisableDTE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ci_send_msg_to_smc
	ldr	w8, [x20]
LBB0_11:
Lloh20:
	adrp	x9, _POWERCONTAINMENT_FEATURE_PkgPwrLimit@GOTPAGE
Lloh21:
	ldr	x9, [x9, _POWERCONTAINMENT_FEATURE_PkgPwrLimit@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
Lloh23:
	adrp	x8, _PPSMC_MSG_PkgPwrLimitDisable@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PPSMC_MSG_PkgPwrLimitDisable@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ci_send_msg_to_smc
LBB0_13:
	mov	w21, #0
	str	wzr, [x20]
	b	LBB0_24
LBB0_14:
	mov	w21, #0
	b	LBB0_24
LBB0_15:
	mov	w21, #0
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_17
	b	LBB0_19
LBB0_16:
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w21, w8
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_19
LBB0_17:
Lloh29:
	adrp	x8, _PPSMC_MSG_TDCLimitEnable@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PPSMC_MSG_TDCLimitEnable@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ci_send_msg_to_smc
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_20
; %bb.18:
Lloh32:
	adrp	x8, _POWERCONTAINMENT_FEATURE_TDCLimit@GOTPAGE
Lloh33:
	ldr	x8, [x8, _POWERCONTAINMENT_FEATURE_TDCLimit@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_19:
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_21
	b	LBB0_24
LBB0_20:
Lloh35:
	adrp	x8, _EINVAL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w21, w8
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_24
LBB0_21:
Lloh38:
	adrp	x8, _PPSMC_MSG_PkgPwrLimitEnable@GOTPAGE
Lloh39:
	ldr	x8, [x8, _PPSMC_MSG_PkgPwrLimitEnable@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ci_send_msg_to_smc
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_23
; %bb.22:
	ldr	x8, [x19]
	ldr	w8, [x8]
	lsl	w1, w8, #8
Lloh41:
	adrp	x8, _POWERCONTAINMENT_FEATURE_PkgPwrLimit@GOTPAGE
Lloh42:
	ldr	x8, [x8, _POWERCONTAINMENT_FEATURE_PkgPwrLimit@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	mov	x0, x19
	bl	_ci_set_power_limit
	b	LBB0_24
LBB0_23:
Lloh44:
	adrp	x8, _EINVAL@GOTPAGE
Lloh45:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_24:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_PPSMC_MSG_EnableDTE,4,2        ; @PPSMC_MSG_EnableDTE
	.comm	_PPSMC_Result_OK,8,3            ; @PPSMC_Result_OK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_POWERCONTAINMENT_FEATURE_BAPM,4,2 ; @POWERCONTAINMENT_FEATURE_BAPM
	.comm	_PPSMC_MSG_TDCLimitEnable,4,2   ; @PPSMC_MSG_TDCLimitEnable
	.comm	_POWERCONTAINMENT_FEATURE_TDCLimit,4,2 ; @POWERCONTAINMENT_FEATURE_TDCLimit
	.comm	_PPSMC_MSG_PkgPwrLimitEnable,4,2 ; @PPSMC_MSG_PkgPwrLimitEnable
	.comm	_POWERCONTAINMENT_FEATURE_PkgPwrLimit,4,2 ; @POWERCONTAINMENT_FEATURE_PkgPwrLimit
	.comm	_PPSMC_MSG_TDCLimitDisable,4,2  ; @PPSMC_MSG_TDCLimitDisable
	.comm	_PPSMC_MSG_DisableDTE,4,2       ; @PPSMC_MSG_DisableDTE
	.comm	_PPSMC_MSG_PkgPwrLimitDisable,4,2 ; @PPSMC_MSG_PkgPwrLimitDisable
	.no_dead_strip	_ci_enable_power_containment
.subsections_via_symbols
