	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btc_populate_ulv_state
_btc_populate_ulv_state:                ## @btc_populate_ulv_state
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	callq	_evergreen_get_pi
	movq	(%rax), %rsi
	cmpq	$0, (%rsi)
	je	LBB0_3
## %bb.1:
	movq	8(%r14), %rdx
	movq	_PPSMC_DISPLAY_WATERMARK_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_cypress_convert_power_level_to_smc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_MC_CG_ARB_FREQ_F0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r14), %rcx
	movl	%eax, 4(%rcx)
	movl	$1, (%rcx)
	movq	(%rcx), %rax
	movq	%rax, 8(%rcx)
	movq	8(%r14), %rax
	movq	(%rax), %rcx
	movq	%rcx, 16(%rax)
	movq	_PPSMC_SWSTATE_FLAG_DC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	movq	_CG_ULV_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BTC_CGULVCONTROL_DFLT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WREG32
	movq	_CG_ULV_PARAMETER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BTC_CGULVPARAMETER_DFLT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WREG32
	xorl	%ebx, %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PPSMC_DISPLAY_WATERMARK_LOW,4,2 ## @PPSMC_DISPLAY_WATERMARK_LOW
	.comm	_MC_CG_ARB_FREQ_F0,4,2          ## @MC_CG_ARB_FREQ_F0
	.comm	_PPSMC_SWSTATE_FLAG_DC,4,2      ## @PPSMC_SWSTATE_FLAG_DC
	.comm	_CG_ULV_CONTROL,4,2             ## @CG_ULV_CONTROL
	.comm	_BTC_CGULVCONTROL_DFLT,4,2      ## @BTC_CGULVCONTROL_DFLT
	.comm	_CG_ULV_PARAMETER,4,2           ## @CG_ULV_PARAMETER
	.comm	_BTC_CGULVPARAMETER_DFLT,4,2    ## @BTC_CGULVPARAMETER_DFLT
	.no_dead_strip	_btc_populate_ulv_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btc_populate_ulv_state
_btc_populate_ulv_state:                ; @btc_populate_ulv_state
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_evergreen_get_pi
	ldr	x1, [x0]
	ldr	x8, [x1]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x2, [x19, #8]
Lloh3:
	adrp	x8, _PPSMC_DISPLAY_WATERMARK_LOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PPSMC_DISPLAY_WATERMARK_LOW@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_cypress_convert_power_level_to_smc
	cbnz	w0, LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _MC_CG_ARB_FREQ_F0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MC_CG_ARB_FREQ_F0@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	mov	w10, #1
	stp	w10, w8, [x9]
	ldr	x8, [x9]
	str	x8, [x9, #8]
	ldr	x8, [x19, #8]
	ldr	x9, [x8]
	str	x9, [x8, #16]
Lloh9:
	adrp	x8, _PPSMC_SWSTATE_FLAG_DC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PPSMC_SWSTATE_FLAG_DC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
Lloh12:
	adrp	x8, _CG_ULV_CONTROL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CG_ULV_CONTROL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _BTC_CGULVCONTROL_DFLT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BTC_CGULVCONTROL_DFLT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_WREG32
Lloh18:
	adrp	x8, _CG_ULV_PARAMETER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CG_ULV_PARAMETER@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x8, _BTC_CGULVPARAMETER_DFLT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BTC_CGULVPARAMETER_DFLT@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_WREG32
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	neg	w0, w21
LBB0_4:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PPSMC_DISPLAY_WATERMARK_LOW,4,2 ; @PPSMC_DISPLAY_WATERMARK_LOW
	.comm	_MC_CG_ARB_FREQ_F0,4,2          ; @MC_CG_ARB_FREQ_F0
	.comm	_PPSMC_SWSTATE_FLAG_DC,4,2      ; @PPSMC_SWSTATE_FLAG_DC
	.comm	_CG_ULV_CONTROL,4,2             ; @CG_ULV_CONTROL
	.comm	_BTC_CGULVCONTROL_DFLT,4,2      ; @BTC_CGULVCONTROL_DFLT
	.comm	_CG_ULV_PARAMETER,4,2           ; @CG_ULV_PARAMETER
	.comm	_BTC_CGULVPARAMETER_DFLT,4,2    ; @BTC_CGULVPARAMETER_DFLT
	.no_dead_strip	_btc_populate_ulv_state
.subsections_via_symbols
