	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rv770_populate_smc_vddc_table
_rv770_populate_smc_vddc_table:         ## @rv770_populate_smc_vddc_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_rv770_get_pi
	movq	%rax, %r15
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movl	20(%rax,%rbx), %ecx
	movq	32(%r14), %rdx
	movq	(%rax,%rbx), %rsi
	movl	%ecx, (%rdx,%rsi,4)
	movl	16(%rax,%rbx), %edi
	callq	_cpu_to_be32
	movq	24(%r14), %rcx
	movq	16(%r15), %rdx
	movq	(%rdx,%rbx), %rdx
	movq	%rax, (%rcx,%rdx,8)
	incq	%r12
	movslq	(%r15), %rax
	addq	$24, %rbx
	cmpq	%rax, %r12
	jl	LBB0_2
LBB0_3:
	movq	16(%r14), %rax
	movq	_RV770_SMC_VOLTAGEMASK_VDDC@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	$0, (%rax,%rcx,8)
	movl	24(%r15), %edi
	callq	_cpu_to_be32
	movq	8(%r14), %rcx
	movq	(%rbx), %rdx
	movq	%rax, (%rcx,%rdx,8)
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.5:
	movq	8(%r15), %rsi
	movq	16(%r15), %rax
	leaq	8(%rax), %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%rdi), %rsi
	jle	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rdx
	addq	$24, %rdi
	cmpq	%rdx, %rcx
	jne	LBB0_6
## %bb.8:
	movl	%ecx, %edx
	jmp	LBB0_9
LBB0_4:
	movq	16(%r15), %rax
	xorl	%edx, %edx
LBB0_9:
	movl	%edx, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, (%r14)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RV770_SMC_VOLTAGEMASK_VDDC,8,3 ## @RV770_SMC_VOLTAGEMASK_VDDC
	.no_dead_strip	_rv770_populate_smc_vddc_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_vddc_table
_rv770_populate_smc_vddc_table:         ; @rv770_populate_smc_vddc_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
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
	mov	x22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	add	x8, x8, x21
	ldr	w9, [x8, #20]
	ldr	x10, [x19, #32]
	ldr	x11, [x8]
	str	w9, [x10, x11, lsl #2]
	ldr	w0, [x8, #16]
	bl	_cpu_to_be32
	ldr	x8, [x19, #24]
	ldr	x9, [x20, #16]
	ldr	x9, [x9, x21]
	str	x0, [x8, x9, lsl #3]
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #24
	cmp	x22, x8
	b.lt	LBB0_2
LBB0_3:
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x21, _RV770_SMC_VOLTAGEMASK_VDDC@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RV770_SMC_VOLTAGEMASK_VDDC@GOTPAGEOFF]
	ldr	x9, [x21]
	str	xzr, [x8, x9, lsl #3]
	ldr	w0, [x20, #24]
	bl	_cpu_to_be32
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	str	x0, [x8, x9, lsl #3]
	ldr	w10, [x20]
	cmp	w10, #0
	b.le	LBB0_8
; %bb.4:
	mov	x9, #0
	ldp	x11, x8, [x20, #8]
	mov	w12, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x8, x12]
	cmp	x11, x13
	b.le	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #1
	add	x12, x12, #24
	cmp	x10, x9
	b.ne	LBB0_5
; %bb.7:
	mov	x9, x10
	b	LBB0_9
LBB0_8:
	mov	w9, #0
	ldr	x8, [x20, #16]
LBB0_9:
	mov	w10, #24
	umull	x9, w9, w10
	ldr	x8, [x8, x9]
	str	x8, [x19]
	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	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_RV770_SMC_VOLTAGEMASK_VDDC,8,3 ; @RV770_SMC_VOLTAGEMASK_VDDC
	.no_dead_strip	_rv770_populate_smc_vddc_table
.subsections_via_symbols
