	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cypress_populate_smc_voltage_tables ## -- Begin function cypress_populate_smc_voltage_tables
	.p2align	4, 0x90
_cypress_populate_smc_voltage_tables:   ## @cypress_populate_smc_voltage_tables
	.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	%rsi, %r14
	movq	%rdi, %r15
	callq	_rv770_get_pi
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_evergreen_get_pi
	movq	%rax, %rbx
	cmpb	$0, 16(%rax)
	je	LBB0_6
## %bb.1:
	movq	%rbx, %rsi
	addq	$16, %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_cypress_populate_smc_voltage_table
	movq	16(%r14), %rax
	movq	_RV770_SMC_VOLTAGEMASK_VDDC@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movq	$0, (%rax,%rcx,8)
	movl	20(%rbx), %edi
	callq	_cpu_to_be32
	movq	8(%r14), %rcx
	movq	(%r13), %rdx
	movq	%rax, (%rcx,%rdx,8)
	movb	16(%rbx), %al
	testb	%al, %al
	jle	LBB0_6
## %bb.2:
	movq	(%r12), %rdx
	movq	24(%rbx), %rsi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%rsi,%rcx,8), %rdx
	jle	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rcx
	cmpb	%al, %cl
	jb	LBB0_3
LBB0_6:
	cmpb	$0, (%rbx)
	je	LBB0_8
LBB0_7:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_cypress_populate_smc_voltage_table
	movq	16(%r14), %rax
	movq	_RV770_SMC_VOLTAGEMASK_VDDCI@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	$0, (%rax,%rcx,8)
	movl	4(%rbx), %edi
	callq	_cpu_to_be32
	movq	8(%r14), %rcx
	movq	(%r15), %rdx
	movq	%rax, (%rcx,%rdx,8)
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movb	%cl, (%r14)
	cmpb	$0, (%rbx)
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_RV770_SMC_VOLTAGEMASK_VDDC,8,3 ## @RV770_SMC_VOLTAGEMASK_VDDC
	.comm	_RV770_SMC_VOLTAGEMASK_VDDCI,8,3 ## @RV770_SMC_VOLTAGEMASK_VDDCI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cypress_populate_smc_voltage_tables ; -- Begin function cypress_populate_smc_voltage_tables
	.p2align	2
_cypress_populate_smc_voltage_tables:   ; @cypress_populate_smc_voltage_tables
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x21, x0
	bl	_rv770_get_pi
	mov	x22, x0
	mov	x0, x21
	bl	_evergreen_get_pi
	mov	x20, x0
	mov	x1, x0
	ldrb	w8, [x1, #16]!
	cbz	w8, LBB0_5
; %bb.1:
	mov	x0, x21
	mov	x2, x19
	bl	_cypress_populate_smc_voltage_table
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x23, _RV770_SMC_VOLTAGEMASK_VDDC@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RV770_SMC_VOLTAGEMASK_VDDC@GOTPAGEOFF]
	ldr	x9, [x23]
	str	xzr, [x8, x9, lsl #3]
	ldr	w0, [x20, #20]
	bl	_cpu_to_be32
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	str	x0, [x8, x9, lsl #3]
	ldrb	w8, [x20, #16]
	sxtb	w9, w8
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w9, #0
	ldr	x10, [x22]
	ldr	x11, [x20, #24]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	and	x12, x9, #0xff
	ldr	x12, [x11, x12, lsl #3]
	cmp	x10, x12
	b.le	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w9, w9, #1
	cmp	w9, w8
	b.lo	LBB0_3
LBB0_5:
	ldrb	w8, [x20]
	cbz	w8, LBB0_7
LBB0_6:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_cypress_populate_smc_voltage_table
	ldr	x8, [x19, #16]
Lloh2:
	adrp	x21, _RV770_SMC_VOLTAGEMASK_VDDCI@GOTPAGE
Lloh3:
	ldr	x21, [x21, _RV770_SMC_VOLTAGEMASK_VDDCI@GOTPAGEOFF]
	ldr	x9, [x21]
	str	xzr, [x8, x9, lsl #3]
	ldr	w0, [x20, #4]
	bl	_cpu_to_be32
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	str	x0, [x8, x9, lsl #3]
LBB0_7:
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	strb	w9, [x19]
	ldrb	w8, [x20]
	cbnz	w8, LBB0_6
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_RV770_SMC_VOLTAGEMASK_VDDC,8,3 ; @RV770_SMC_VOLTAGEMASK_VDDC
	.comm	_RV770_SMC_VOLTAGEMASK_VDDCI,8,3 ; @RV770_SMC_VOLTAGEMASK_VDDCI
.subsections_via_symbols
