	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tonga_populate_smc_mvdd_table
_tonga_populate_smc_mvdd_table:         ## @tonga_populate_smc_mvdd_table
	.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), %r14
	movq	_SMU7_VOLTAGE_CONTROL_BY_GPIO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%r14), %rax
	jne	LBB0_6
## %bb.1:
	movq	%rsi, %r15
	movq	8(%r14), %rax
	movq	%rax, (%rsi)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	24(%r14), %rax
	movl	$8, %r12d
	xorl	%ebx, %ebx
	movq	_VOLTAGE_SCALE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	imull	(%rax,%rbx,8), %edi
	callq	_PP_HOST_TO_SMC_US
	movq	24(%r15), %rcx
	movl	%eax, (%rcx,%r12)
	movq	%rbx, -8(%rcx,%r12)
	movq	24(%r14), %rax
	movl	4(%rax,%rbx,8), %ecx
	movq	16(%r15), %rdx
	orl	%ecx, (%rdx,%rbx,4)
	incq	%rbx
	movq	(%r15), %rdi
	addq	$16, %r12
	cmpq	%rdi, %rbx
	jb	LBB0_4
	jmp	LBB0_5
LBB0_2:
	xorl	%edi, %edi
LBB0_5:
	movl	16(%r14), %eax
	movl	%eax, 8(%r15)
	callq	_CONVERT_FROM_HOST_TO_SMC_UL
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMU7_VOLTAGE_CONTROL_BY_GPIO,8,3 ## @SMU7_VOLTAGE_CONTROL_BY_GPIO
	.comm	_VOLTAGE_SCALE,4,2              ## @VOLTAGE_SCALE
	.no_dead_strip	_tonga_populate_smc_mvdd_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tonga_populate_smc_mvdd_table
_tonga_populate_smc_mvdd_table:         ; @tonga_populate_smc_mvdd_table
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _SMU7_VOLTAGE_CONTROL_BY_GPIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMU7_VOLTAGE_CONTROL_BY_GPIO@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
	mov	x19, x1
	ldr	x8, [x20, #8]
	str	x8, [x1]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x21, #0
	mov	x22, #0
	ldr	x8, [x20, #24]
	mov	w23, #8
Lloh3:
	adrp	x24, _VOLTAGE_SCALE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _VOLTAGE_SCALE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x25, x21, #2
	ldr	w8, [x8, x25]
	ldr	w9, [x24]
	mul	w0, w9, w8
	bl	_PP_HOST_TO_SMC_US
	ldp	x9, x8, [x19, #16]
	str	w0, [x8, x23]
	str	x22, [x8, x21, lsl #3]
	ldr	x8, [x20, #24]
	add	x10, x8, x25
	ldr	w10, [x10, #4]
	lsl	x11, x22, #2
	ldr	w12, [x9, x11]
	orr	w10, w12, w10
	str	w10, [x9, x11]
	add	x22, x22, #1
	ldr	x0, [x19]
	add	x21, x21, #2
	add	x23, x23, #16
	cmp	x22, x0
	b.lo	LBB0_3
	b	LBB0_5
LBB0_4:
	mov	x0, #0
LBB0_5:
	ldr	w8, [x20, #16]
	str	w8, [x19, #8]
	bl	_CONVERT_FROM_HOST_TO_SMC_UL
LBB0_6:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SMU7_VOLTAGE_CONTROL_BY_GPIO,8,3 ; @SMU7_VOLTAGE_CONTROL_BY_GPIO
	.comm	_VOLTAGE_SCALE,4,2              ; @VOLTAGE_SCALE
	.no_dead_strip	_tonga_populate_smc_mvdd_table
.subsections_via_symbols
