	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ci_populate_pm_fuses
_ci_populate_pm_fuses:                  ## @ci_populate_pm_fuses
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movl	(%rdi), %edi
	movq	_PHM_PlatformCaps_PowerContainment@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_phm_cap_enabled
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_SMU7_FIRMWARE_HEADER_LOCATION@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_SMU7_Firmware_Header@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PmFuseTable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	addq	%rax, %rbx
	movq	_SMC_RAM_END@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ci_read_smc_sram_dword
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	%r15, %rdi
	callq	_ci_populate_bapm_vddc_vid_sidd
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_ci_populate_vddc_vid
	movl	%eax, %r13d
	orl	%r12d, %r13d
	movq	%r15, %rdi
	callq	_ci_populate_svi_load_line
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_ci_populate_tdc_limit
	movl	%eax, %ebx
	orl	%r12d, %ebx
	orl	%r13d, %ebx
	movl	-44(%rbp), %esi
	movq	%r15, %rdi
	callq	_ci_populate_dw8
	movl	%eax, %r12d
	orl	%ebx, %r12d
	movl	-44(%rbp), %esi
	movq	%r15, %rdi
	callq	_ci_populate_fuzzy_fan
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_ci_min_max_v_gnbl_pm_lid_from_bapm_vddc
	movl	%eax, %ebx
	orl	%r13d, %ebx
	orl	%r12d, %ebx
	movq	%r15, %rdi
	callq	_ci_populate_bapm_vddc_base_leakage_sidd
	orl	%ebx, %eax
	jne	LBB0_6
## %bb.5:
	movl	-44(%rbp), %esi
	movq	_SMC_RAM_END@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movq	%r14, %rdx
	movl	$4, %ecx
	callq	_ci_copy_bytes_to_smc
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHM_PlatformCaps_PowerContainment,4,2 ## @PHM_PlatformCaps_PowerContainment
	.comm	_SMU7_FIRMWARE_HEADER_LOCATION,8,3 ## @SMU7_FIRMWARE_HEADER_LOCATION
	.comm	_SMU7_Firmware_Header,4,2       ## @SMU7_Firmware_Header
	.comm	_PmFuseTable,4,2                ## @PmFuseTable
	.comm	_SMC_RAM_END,4,2                ## @SMC_RAM_END
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempt to get pm_fuse_table_offset Failed!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ci_populate_pm_fuses
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ci_populate_pm_fuses
_ci_populate_pm_fuses:                  ; @ci_populate_pm_fuses
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	ldr	x19, [x0, #8]
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _PHM_PlatformCaps_PowerContainment@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHM_PlatformCaps_PowerContainment@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_phm_cap_enabled
	cbz	x0, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _SMU7_FIRMWARE_HEADER_LOCATION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMU7_FIRMWARE_HEADER_LOCATION@GOTPAGEOFF]
Lloh5:
	ldr	x21, [x8]
Lloh6:
	adrp	x8, _SMU7_Firmware_Header@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SMU7_Firmware_Header@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _PmFuseTable@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PmFuseTable@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_offsetof
	add	x1, x0, x21
Lloh12:
	adrp	x22, _SMC_RAM_END@GOTPAGE
Lloh13:
	ldr	x22, [x22, _SMC_RAM_END@GOTPAGEOFF]
	ldr	w3, [x22]
	add	x2, sp, #12
	mov	x0, x20
	bl	_ci_read_smc_sram_dword
	cbz	x0, LBB0_3
; %bb.2:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	bl	_ci_populate_bapm_vddc_vid_sidd
	mov	x21, x0
	mov	x0, x20
	bl	_ci_populate_vddc_vid
	orr	w21, w0, w21
	mov	x0, x20
	bl	_ci_populate_svi_load_line
	orr	w21, w21, w0
	mov	x0, x20
	bl	_ci_populate_tdc_limit
	orr	w21, w21, w0
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_ci_populate_dw8
	orr	w21, w21, w0
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_ci_populate_fuzzy_fan
	orr	w21, w21, w0
	mov	x0, x20
	bl	_ci_min_max_v_gnbl_pm_lid_from_bapm_vddc
	orr	w21, w21, w0
	mov	x0, x20
	bl	_ci_populate_bapm_vddc_base_leakage_sidd
	orr	w0, w21, w0
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	w1, [sp, #12]
	ldr	w4, [x22]
	mov	x0, x20
	mov	x2, x19
	mov	w3, #4
	bl	_ci_copy_bytes_to_smc
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PHM_PlatformCaps_PowerContainment,4,2 ; @PHM_PlatformCaps_PowerContainment
	.comm	_SMU7_FIRMWARE_HEADER_LOCATION,8,3 ; @SMU7_FIRMWARE_HEADER_LOCATION
	.comm	_SMU7_Firmware_Header,4,2       ; @SMU7_Firmware_Header
	.comm	_PmFuseTable,4,2                ; @PmFuseTable
	.comm	_SMC_RAM_END,4,2                ; @SMC_RAM_END
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempt to get pm_fuse_table_offset Failed!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ci_populate_pm_fuses
.subsections_via_symbols
