	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cypress_construct_voltage_tables ## -- Begin function cypress_construct_voltage_tables
	.p2align	4, 0x90
_cypress_construct_voltage_tables:      ## @cypress_construct_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_evergreen_get_pi
	movq	%rax, %r14
	movq	_SET_VOLTAGE_TYPE_ASIC_VDDC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	16(%r14), %rbx
	movq	%r15, %rdi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_radeon_atom_get_voltage_table
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movq	(%rbx), %rax
	movq	_MAX_NO_VREG_STEPS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jle	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_cypress_trim_voltage_table_to_fit_state_table
LBB0_3:
	cmpq	$0, 8(%r14)
	je	LBB0_7
## %bb.4:
	movq	_SET_VOLTAGE_TYPE_ASIC_VDDCI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	_radeon_atom_get_voltage_table
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movq	(%r14), %rax
	cmpq	(%r12), %rax
	jle	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_cypress_trim_voltage_table_to_fit_state_table
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SET_VOLTAGE_TYPE_ASIC_VDDC,4,2 ## @SET_VOLTAGE_TYPE_ASIC_VDDC
	.comm	_MAX_NO_VREG_STEPS,8,3          ## @MAX_NO_VREG_STEPS
	.comm	_SET_VOLTAGE_TYPE_ASIC_VDDCI,4,2 ## @SET_VOLTAGE_TYPE_ASIC_VDDCI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cypress_construct_voltage_tables ; -- Begin function cypress_construct_voltage_tables
	.p2align	2
_cypress_construct_voltage_tables:      ; @cypress_construct_voltage_tables
	.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, x0
	bl	_evergreen_get_pi
	mov	x20, x0
Lloh0:
	adrp	x8, _SET_VOLTAGE_TYPE_ASIC_VDDC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SET_VOLTAGE_TYPE_ASIC_VDDC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x21, x0, #16
	mov	x0, x19
	mov	w2, #0
	mov	x3, x21
	bl	_radeon_atom_get_voltage_table
	cbnz	w0, LBB0_8
; %bb.1:
	ldr	x8, [x21]
Lloh3:
	adrp	x22, _MAX_NO_VREG_STEPS@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MAX_NO_VREG_STEPS@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.le	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	x1, x21
	bl	_cypress_trim_voltage_table_to_fit_state_table
LBB0_3:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
; %bb.4:
Lloh5:
	adrp	x8, _SET_VOLTAGE_TYPE_ASIC_VDDCI@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SET_VOLTAGE_TYPE_ASIC_VDDCI@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	x3, x20
	bl	_radeon_atom_get_voltage_table
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	x8, [x20]
	ldr	x9, [x22]
	cmp	x8, x9
	b.le	LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x20
	bl	_cypress_trim_voltage_table_to_fit_state_table
LBB0_7:
	mov	w0, #0
LBB0_8:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SET_VOLTAGE_TYPE_ASIC_VDDC,4,2 ; @SET_VOLTAGE_TYPE_ASIC_VDDC
	.comm	_MAX_NO_VREG_STEPS,8,3          ; @MAX_NO_VREG_STEPS
	.comm	_SET_VOLTAGE_TYPE_ASIC_VDDCI,4,2 ; @SET_VOLTAGE_TYPE_ASIC_VDDCI
.subsections_via_symbols
