	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ni_populate_smc_initial_state
_ni_populate_smc_initial_state:         ## @ni_populate_smc_initial_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_ni_get_ps
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_rv770_get_pi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_evergreen_get_pi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_ni_get_pi
	movq	%rax, %r12
	movl	(%rax), %edi
	callq	_cpu_to_be32
	leaq	8(%r13), %r14
	movq	8(%r13), %rcx
	movq	%rax, 232(%rcx)
	movl	4(%r12), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 224(%rcx)
	movl	8(%r12), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 216(%rcx)
	movl	12(%r12), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 208(%rcx)
	movl	16(%r12), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 200(%rcx)
	movl	20(%r12), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 192(%rcx)
	movl	24(%r12), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 184(%rcx)
	movl	28(%r12), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 176(%rcx)
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 168(%rcx)
	movl	32(%r12), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 160(%rcx)
	movl	36(%r12), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 152(%rcx)
	movl	40(%r12), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 144(%rcx)
	movl	44(%r12), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 136(%rcx)
	movl	48(%r12), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 128(%rcx)
	movl	52(%r12), %edi
	movq	%rbx, %r12
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 120(%rcx)
	movq	(%r12), %rax
	movl	4(%rax), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 112(%rcx)
	movq	_NISLANDS_INITIAL_STATE_ARB_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 104(%rcx)
	movq	$0, 96(%rcx)
	movq	%rbx, %rsi
	addq	$16, %rsi
	movq	(%r12), %rax
	movl	12(%rax), %edx
	addq	$92, %rcx
	movq	%r15, %rdi
	callq	_ni_populate_voltage_value
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	(%r14), %rsi
	addq	$92, %rsi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_ni_get_std_voltage_value
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movl	-44(%rbp), %esi
	movq	(%r14), %rcx
	movl	92(%rcx), %edx
	addq	$88, %rcx
	movq	%r15, %rdi
	callq	_ni_populate_std_voltage_value
LBB0_3:
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.4:
	movq	(%r12), %rax
	movl	8(%rax), %edx
	movq	(%r14), %rcx
	addq	$84, %rcx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ni_populate_voltage_value
LBB0_5:
	movq	(%r14), %rsi
	addq	$80, %rsi
	movq	%r15, %rdi
	callq	_ni_populate_initial_mvdd_value
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_CG_R
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_CG_L
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	(%r14), %rcx
	movq	%rax, 72(%rcx)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	callq	_cpu_to_be32
	movq	(%r14), %rcx
	movq	%rax, 64(%rcx)
	xorl	%eax, %eax
	cmpq	$0, 24(%rbx)
	setne	%al
	movl	%eax, (%rcx)
	cmpq	$0, 16(%rbx)
	je	LBB0_6
## %bb.7:
	movq	(%r12), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_cypress_get_strobe_mode_settings
	movq	(%r14), %rcx
	movl	%eax, 56(%rcx)
	movq	(%r12), %rax
	movslq	(%rax), %rax
	cmpq	%rax, 8(%rbx)
	jge	LBB0_9
## %bb.8:
	movq	_NISLANDS_SMC_MC_EDC_RD_FLAG@GOTPCREL(%rip), %rax
	movq	_NISLANDS_SMC_MC_EDC_WR_FLAG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	movl	%edx, 4(%rcx)
	jmp	LBB0_10
LBB0_6:
	movq	(%r14), %rcx
	jmp	LBB0_10
LBB0_9:
	movl	$0, 4(%rcx)
LBB0_10:
	movl	$1, (%r13)
	movq	_PPSMC_SWSTATE_FLAG_DC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r13)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rcx)
	movups	%xmm0, 24(%rcx)
	movq	_MIN_POWER_MASK@GOTPCREL(%rip), %rax
	movq	_MAX_POWER_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 16(%rcx)
	movq	_MAX_POWER_DELTA_MASK@GOTPCREL(%rip), %rax
	movq	_STI_SIZE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_LTI_RATIO_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_cpu_to_be32
	movq	8(%r13), %rcx
	movq	%rax, 8(%rcx)
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NISLANDS_INITIAL_STATE_ARB_INDEX,4,2 ## @NISLANDS_INITIAL_STATE_ARB_INDEX
	.comm	_NISLANDS_SMC_MC_EDC_RD_FLAG,4,2 ## @NISLANDS_SMC_MC_EDC_RD_FLAG
	.comm	_NISLANDS_SMC_MC_EDC_WR_FLAG,4,2 ## @NISLANDS_SMC_MC_EDC_WR_FLAG
	.comm	_PPSMC_SWSTATE_FLAG_DC,4,2      ## @PPSMC_SWSTATE_FLAG_DC
	.comm	_MIN_POWER_MASK,4,2             ## @MIN_POWER_MASK
	.comm	_MAX_POWER_MASK,4,2             ## @MAX_POWER_MASK
	.comm	_MAX_POWER_DELTA_MASK,4,2       ## @MAX_POWER_DELTA_MASK
	.comm	_STI_SIZE_MASK,4,2              ## @STI_SIZE_MASK
	.comm	_LTI_RATIO_MASK,4,2             ## @LTI_RATIO_MASK
	.no_dead_strip	_ni_populate_smc_initial_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ni_populate_smc_initial_state
_ni_populate_smc_initial_state:         ; @ni_populate_smc_initial_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x22, x0
	mov	x0, x1
	bl	_ni_get_ps
	mov	x20, x0
	mov	x0, x22
	bl	_rv770_get_pi
	mov	x21, x0
	mov	x0, x22
	bl	_evergreen_get_pi
	mov	x23, x0
	mov	x0, x22
	bl	_ni_get_pi
	mov	x24, x0
	ldr	w0, [x0]
	bl	_cpu_to_be32
	mov	x25, x19
	ldr	x8, [x25, #8]!
	str	x0, [x8, #232]
	ldr	w0, [x24, #4]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #224]
	ldr	w0, [x24, #8]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #216]
	ldr	w0, [x24, #12]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #208]
	ldr	w0, [x24, #16]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #200]
	ldr	w0, [x24, #20]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #192]
	ldr	w0, [x24, #24]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #184]
	ldr	w0, [x24, #28]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #176]
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #168]
	ldr	w0, [x24, #32]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #160]
	ldr	w0, [x24, #36]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #152]
	ldr	w0, [x24, #40]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #144]
	ldr	w0, [x24, #44]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #136]
	ldr	w0, [x24, #48]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #128]
	ldr	w0, [x24, #52]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #120]
	ldr	x8, [x20]
	ldr	w0, [x8, #4]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #112]
Lloh0:
	adrp	x9, _NISLANDS_INITIAL_STATE_ARB_INDEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NISLANDS_INITIAL_STATE_ARB_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x8, #104]
	str	xzr, [x8, #96]
	add	x1, x23, #16
	ldr	x9, [x20]
	ldr	w2, [x9, #12]
	add	x3, x8, #92
	mov	x0, x22
	bl	_ni_populate_voltage_value
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	x8, [x25]
	add	x1, x8, #92
	add	x2, sp, #12
	mov	x0, x22
	bl	_ni_get_std_voltage_value
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	w1, [sp, #12]
	ldr	x8, [x25]
	ldr	w2, [x8, #92]
	add	x3, x8, #88
	mov	x0, x22
	bl	_ni_populate_std_voltage_value
LBB0_3:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x20]
	ldr	w2, [x8, #8]
	ldr	x8, [x25]
	add	x3, x8, #84
	mov	x0, x22
	mov	x1, x23
	bl	_ni_populate_voltage_value
LBB0_5:
	ldr	x8, [x25]
	add	x1, x8, #80
	mov	x0, x22
	bl	_ni_populate_initial_mvdd_value
	mov	w0, #65535
	bl	_CG_R
	mov	x23, x0
	mov	w0, #0
	bl	_CG_L
	orr	w0, w0, w23
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #72]
	ldr	w0, [x21]
	bl	_cpu_to_be32
	ldr	x8, [x25]
	str	x0, [x8, #64]
	ldr	x9, [x21, #24]
	cmp	x9, #0
	cset	w9, ne
	str	w9, [x8]
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	x8, [x20]
	ldr	w1, [x8]
	mov	x0, x22
	bl	_cypress_get_strobe_mode_settings
	ldr	x8, [x25]
	str	w0, [x8, #56]
	ldr	x9, [x20]
	ldrsw	x9, [x9]
	ldr	x10, [x21, #8]
	cmp	x10, x9
	b.ge	LBB0_9
; %bb.7:
Lloh3:
	adrp	x9, _NISLANDS_SMC_MC_EDC_RD_FLAG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NISLANDS_SMC_MC_EDC_RD_FLAG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _NISLANDS_SMC_MC_EDC_WR_FLAG@GOTPAGE
Lloh7:
	ldr	x10, [x10, _NISLANDS_SMC_MC_EDC_WR_FLAG@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x8, #4]
	b	LBB0_10
LBB0_8:
	ldr	x8, [x25]
	b	LBB0_10
LBB0_9:
	str	wzr, [x8, #4]
LBB0_10:
	mov	w9, #1
	str	w9, [x19]
Lloh9:
	adrp	x9, _PPSMC_SWSTATE_FLAG_DC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PPSMC_SWSTATE_FLAG_DC@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	ldr	w10, [x19, #16]
	orr	w9, w10, w9
	str	w9, [x19, #16]
	movi.2d	v0, #0000000000000000
	stur	q0, [x8, #40]
Lloh12:
	adrp	x9, _MIN_POWER_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MIN_POWER_MASK@GOTPAGEOFF]
	stur	q0, [x8, #24]
Lloh14:
	ldr	w8, [x9]
Lloh15:
	adrp	x9, _MAX_POWER_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MAX_POWER_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_cpu_to_be32
	ldr	x8, [x19, #8]
	str	x0, [x8, #16]
Lloh18:
	adrp	x8, _MAX_POWER_DELTA_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MAX_POWER_DELTA_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _STI_SIZE_MASK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _STI_SIZE_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh24:
	adrp	x9, _LTI_RATIO_MASK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _LTI_RATIO_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_cpu_to_be32
	ldr	x8, [x19, #8]
	str	x0, [x8, #8]
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_NISLANDS_INITIAL_STATE_ARB_INDEX,4,2 ; @NISLANDS_INITIAL_STATE_ARB_INDEX
	.comm	_NISLANDS_SMC_MC_EDC_RD_FLAG,4,2 ; @NISLANDS_SMC_MC_EDC_RD_FLAG
	.comm	_NISLANDS_SMC_MC_EDC_WR_FLAG,4,2 ; @NISLANDS_SMC_MC_EDC_WR_FLAG
	.comm	_PPSMC_SWSTATE_FLAG_DC,4,2      ; @PPSMC_SWSTATE_FLAG_DC
	.comm	_MIN_POWER_MASK,4,2             ; @MIN_POWER_MASK
	.comm	_MAX_POWER_MASK,4,2             ; @MAX_POWER_MASK
	.comm	_MAX_POWER_DELTA_MASK,4,2       ; @MAX_POWER_DELTA_MASK
	.comm	_STI_SIZE_MASK,4,2              ; @STI_SIZE_MASK
	.comm	_LTI_RATIO_MASK,4,2             ; @LTI_RATIO_MASK
	.no_dead_strip	_ni_populate_smc_initial_state
.subsections_via_symbols
