	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ci_get_leakage_voltages
_ci_get_leakage_voltages:               ## @ci_get_leakage_voltages
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_ci_get_pi
	movq	%rax, %r13
	movq	$0, 24(%rax)
	movq	$0, (%rax)
	movq	_ATOM_PP_PLATFORM_CAP_EVV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_8
## %bb.1:
	movq	_CISLANDS_MAX_LEAKAGE_COUNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_19
## %bb.2:
	xorl	%r12d, %r12d
	leaq	-48(%rbp), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movq	_CISLANDS_MAX_LEAKAGE_COUNT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r12
	jge	LBB0_19
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_ATOM_VIRTUAL_VOLTAGE_ID0@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	addq	%r12, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_radeon_atom_get_voltage_evv
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rax, %rbx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%r13), %rcx
	movq	40(%r13), %rdx
	movq	%rax, (%rdx,%rcx,8)
	movq	24(%r13), %rax
	movq	32(%r13), %rcx
	movq	%rbx, (%rcx,%rax,8)
	incq	24(%r13)
	jmp	LBB0_7
LBB0_8:
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	callq	_radeon_atom_get_leakage_id_from_vbios
	testq	%rax, %rax
	jne	LBB0_19
## %bb.9:
	movq	_CISLANDS_MAX_LEAKAGE_COUNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_19
## %bb.10:
	xorl	%r15d, %r15d
	leaq	-56(%rbp), %r12
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%r15
	movq	_CISLANDS_MAX_LEAKAGE_COUNT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	jge	LBB0_19
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	_ATOM_VIRTUAL_VOLTAGE_ID0@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	addq	%r15, %rbx
	movq	-64(%rbp), %r8
	movq	%r14, %rdi
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	callq	_radeon_atom_get_leakage_vddc_based_on_leakage_params
	testq	%rax, %rax
	jne	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%rax, %rbx
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	24(%r13), %rcx
	movq	40(%r13), %rdx
	movq	%rax, (%rdx,%rcx,8)
	movq	24(%r13), %rax
	movq	32(%r13), %rcx
	movq	%rbx, (%rcx,%rax,8)
	incq	24(%r13)
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%rax, %rbx
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	(%r13), %rcx
	movq	16(%r13), %rdx
	movq	%rax, (%rdx,%rcx,8)
	movq	(%r13), %rax
	movq	8(%r13), %rcx
	movq	%rbx, (%rcx,%rax,8)
	incq	(%r13)
	jmp	LBB0_18
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATOM_PP_PLATFORM_CAP_EVV,4,2   ## @ATOM_PP_PLATFORM_CAP_EVV
	.comm	_CISLANDS_MAX_LEAKAGE_COUNT,4,2 ## @CISLANDS_MAX_LEAKAGE_COUNT
	.comm	_ATOM_VIRTUAL_VOLTAGE_ID0,8,3   ## @ATOM_VIRTUAL_VOLTAGE_ID0
	.no_dead_strip	_ci_get_leakage_voltages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ci_get_leakage_voltages
_ci_get_leakage_voltages:               ; @ci_get_leakage_voltages
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x0
	bl	_ci_get_pi
	mov	x20, x0
	str	xzr, [x0, #24]
	str	xzr, [x0]
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _ATOM_PP_PLATFORM_CAP_EVV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATOM_PP_PLATFORM_CAP_EVV@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
Lloh3:
	adrp	x22, _CISLANDS_MAX_LEAKAGE_COUNT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _CISLANDS_MAX_LEAKAGE_COUNT@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.2:
	mov	x23, #0
Lloh5:
	adrp	x24, _ATOM_VIRTUAL_VOLTAGE_ID0@GOTPAGE
Lloh6:
	ldr	x24, [x24, _ATOM_VIRTUAL_VOLTAGE_ID0@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x21, x23, x8
	add	x2, sp, #16
	mov	x0, x19
	mov	x1, x21
	bl	_radeon_atom_get_voltage_evv
	ldr	x8, [sp, #16]
	cmp	x0, #0
	ccmp	x8, #0, #4, eq
	ccmp	x21, x8, #4, ne
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x20, #40]
	ldr	x10, [x20, #24]
	str	x8, [x9, x10, lsl #3]
	ldp	x9, x8, [x20, #24]
	str	x21, [x8, x9, lsl #3]
	ldr	x8, [x20, #24]
	add	x8, x8, #1
	str	x8, [x20, #24]
	b	LBB0_3
LBB0_6:
	add	x1, sp, #24
	mov	x0, x19
	bl	_radeon_atom_get_leakage_id_from_vbios
	cbnz	x0, LBB0_16
; %bb.7:
Lloh7:
	adrp	x22, _CISLANDS_MAX_LEAKAGE_COUNT@GOTPAGE
Lloh8:
	ldr	x22, [x22, _CISLANDS_MAX_LEAKAGE_COUNT@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.8:
	mov	x23, #0
Lloh9:
	adrp	x24, _ATOM_VIRTUAL_VOLTAGE_ID0@GOTPAGE
Lloh10:
	ldr	x24, [x24, _ATOM_VIRTUAL_VOLTAGE_ID0@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_16
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x21, x23, x8
	ldr	x4, [sp, #24]
	add	x1, sp, #16
	add	x2, sp, #8
	mov	x0, x19
	mov	x3, x21
	bl	_radeon_atom_get_leakage_vddc_based_on_leakage_params
	cbnz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [sp, #16]
	cmp	x8, #0
	ccmp	x21, x8, #4, ne
	b.eq	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x9, [x20, #40]
	ldr	x10, [x20, #24]
	str	x8, [x9, x10, lsl #3]
	ldp	x9, x8, [x20, #24]
	str	x21, [x8, x9, lsl #3]
	ldr	x8, [x20, #24]
	add	x8, x8, #1
	str	x8, [x20, #24]
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	x21, x8
	b.eq	LBB0_9
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x9, [x20, #16]
	ldr	x10, [x20]
	str	x8, [x9, x10, lsl #3]
	ldp	x9, x8, [x20]
	str	x21, [x8, x9, lsl #3]
	ldr	x8, [x20]
	add	x8, x8, #1
	str	x8, [x20]
	b	LBB0_9
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ATOM_PP_PLATFORM_CAP_EVV,4,2   ; @ATOM_PP_PLATFORM_CAP_EVV
	.comm	_CISLANDS_MAX_LEAKAGE_COUNT,4,2 ; @CISLANDS_MAX_LEAKAGE_COUNT
	.comm	_ATOM_VIRTUAL_VOLTAGE_ID0,8,3   ; @ATOM_VIRTUAL_VOLTAGE_ID0
	.no_dead_strip	_ci_get_leakage_voltages
.subsections_via_symbols
