	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rv770_populate_smc_mvdd_table
_rv770_populate_smc_mvdd_table:         ## @rv770_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_rv770_get_pi
	cmpq	$0, 16(%rax)
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	_MVDD_HIGH_INDEX@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_cpu_to_be32
	movq	16(%r14), %rcx
	movq	(%r15), %rdx
	orl	%eax, (%rcx,%rdx,4)
	movq	8(%rbx), %rax
	movq	_MVDD_LOW_INDEX@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_cpu_to_be32
	movq	16(%r14), %rcx
	movq	(%r15), %rdx
	orl	%eax, (%rcx,%rdx,4)
	movq	8(%r14), %rax
	movq	_RV770_SMC_VOLTAGEMASK_MVDD@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	$0, (%rax,%rcx,8)
	movl	(%rbx), %edi
	callq	_cpu_to_be32
	movq	(%r14), %rcx
	movq	(%r15), %rdx
	movl	%eax, (%rcx,%rdx,4)
LBB0_2:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MVDD_HIGH_INDEX,8,3            ## @MVDD_HIGH_INDEX
	.comm	_MVDD_LOW_INDEX,8,3             ## @MVDD_LOW_INDEX
	.comm	_RV770_SMC_VOLTAGEMASK_MVDD,8,3 ## @RV770_SMC_VOLTAGEMASK_MVDD
	.no_dead_strip	_rv770_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 rv770_populate_smc_mvdd_table
_rv770_populate_smc_mvdd_table:         ; @rv770_populate_smc_mvdd_table
	.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
	bl	_rv770_get_pi
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x21, _MVDD_HIGH_INDEX@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MVDD_HIGH_INDEX@GOTPAGEOFF]
	ldr	x9, [x21]
	ldr	w0, [x8, x9, lsl #2]
	bl	_cpu_to_be32
	ldr	x8, [x19, #16]
	ldr	x9, [x21]
	lsl	x9, x9, #2
	ldr	w10, [x8, x9]
	orr	w10, w10, w0
	str	w10, [x8, x9]
	ldr	x8, [x20, #8]
Lloh2:
	adrp	x21, _MVDD_LOW_INDEX@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MVDD_LOW_INDEX@GOTPAGEOFF]
	ldr	x9, [x21]
	ldr	w0, [x8, x9, lsl #2]
	bl	_cpu_to_be32
	ldr	x8, [x21]
	lsl	x8, x8, #2
	ldp	x10, x9, [x19, #8]
	ldr	w11, [x9, x8]
	orr	w11, w11, w0
	str	w11, [x9, x8]
Lloh4:
	adrp	x21, _RV770_SMC_VOLTAGEMASK_MVDD@GOTPAGE
Lloh5:
	ldr	x21, [x21, _RV770_SMC_VOLTAGEMASK_MVDD@GOTPAGEOFF]
	ldr	x8, [x21]
	str	xzr, [x10, x8, lsl #3]
	ldr	w0, [x20]
	bl	_cpu_to_be32
	ldr	x8, [x19]
	ldr	x9, [x21]
	str	w0, [x8, x9, lsl #2]
LBB0_2:
	mov	w0, #0
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MVDD_HIGH_INDEX,8,3            ; @MVDD_HIGH_INDEX
	.comm	_MVDD_LOW_INDEX,8,3             ; @MVDD_LOW_INDEX
	.comm	_RV770_SMC_VOLTAGEMASK_MVDD,8,3 ; @RV770_SMC_VOLTAGEMASK_MVDD
	.no_dead_strip	_rv770_populate_smc_mvdd_table
.subsections_via_symbols
