	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si_populate_power_containment_values
_si_populate_power_containment_values:  ## @si_populate_power_containment_values
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_evergreen_get_pi
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_ni_get_pi
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_ni_get_ps
	xorl	%r13d, %r13d
	cmpl	$0, (%r14)
	je	LBB0_19
## %bb.1:
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_18
## %bb.2:
	cmpl	%ecx, (%r12)
	jne	LBB0_18
## %bb.3:
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_si_should_disable_uvd_powertune
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	8(%r12), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movq	$0, 16(%rax)
	cmpl	$2, (%rdi)
	jl	LBB0_19
## %bb.4:
	movl	$1, %esi
	xorl	%ebx, %ebx
	leaq	-68(%rbp), %rcx
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movq	-104(%rbp), %r14                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SISLANDS_DPM2_MAXPS_PERCENT_H@GOTPCREL(%rip), %rdx
	cmpq	$1, %rsi
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_SISLANDS_DPM2_MAXPS_PERCENT_M@GOTPCREL(%rip), %rdx
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rdi), %r10
	movl	-8(%r10,%rsi,8), %edi
	movl	(%r10,%rsi,8), %eax
	cmpl	%eax, %edi
	jg	LBB0_18
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rdx), %r9
	movl	%eax, %edx
	testq	%r9, %r9
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	setne	%r8b
	cmpl	%eax, %edi
	sete	%dl
	orb	%r8b, %dl
	movl	%edi, %edx
	cmovnel	%eax, %edx
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$1, %rsi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	imull	%r9d, %edi
	movslq	%edi, %rdx
	imulq	$1374389535, %rdx, %rdx         ## imm = 0x51EB851F
	movq	%rdx, %rdi
	shrq	$63, %rdi
	sarq	$37, %rdx
	addl	%edi, %edx
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r10), %r12d
	cmpl	%r12d, %edx
	cmovgl	%edx, %r12d
	testl	%r12d, %r12d
	je	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movl	-4(%r10,%rsi,8), %edx
	movq	%r14, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	%rcx, %r15
	callq	_si_populate_voltage_value
	testl	%eax, %eax
	jne	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	leaq	-64(%rbp), %rdx
	callq	_si_get_std_voltage_value
	testl	%eax, %eax
	jne	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rax,%rcx,8), %edx
	movq	%r14, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rcx
	callq	_si_populate_voltage_value
	testl	%eax, %eax
	jne	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	leaq	-60(%rbp), %rdx
	callq	_si_get_std_voltage_value
	testl	%eax, %eax
	jne	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	-64(%rbp), %esi
	movl	-60(%rbp), %edx
	movq	%r14, %rdi
	callq	_si_calculate_power_efficiency_ratio
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, %ecx
	subl	%r12d, %ecx
	movq	_SISLANDS_DPM2_MAX_PULSE_SKIP@GOTPCREL(%rip), %rdx
	imull	(%rdx), %ecx
	movl	%eax, %edi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	cltq
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	8(%r12), %rcx
	movq	%rax, 40(%rcx,%rbx)
	movq	_SISLANDS_DPM2_NEAR_TDP_DEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rcx,%rbx)
	movq	_SISLANDS_DPM2_ABOVE_SAFE_INC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rcx,%rbx)
	movq	_SISLANDS_DPM2_BELOW_SAFE_INC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rcx,%rbx)
	callq	_cpu_to_be16
	movq	8(%r12), %rcx
	movl	%eax, 24(%rcx,%rbx)
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	incq	%rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movslq	(%rdi), %rax
	addq	$24, %rbx
	xorl	%r13d, %r13d
	cmpq	%rax, %rsi
	leaq	-68(%rbp), %rcx
	jl	LBB0_5
	jmp	LBB0_19
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_19:
	movl	%r13d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	%eax, %r13d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SISLANDS_DPM2_MAXPS_PERCENT_M,8,3 ## @SISLANDS_DPM2_MAXPS_PERCENT_M
	.comm	_SISLANDS_DPM2_MAXPS_PERCENT_H,8,3 ## @SISLANDS_DPM2_MAXPS_PERCENT_H
	.comm	_SISLANDS_DPM2_MAX_PULSE_SKIP,4,2 ## @SISLANDS_DPM2_MAX_PULSE_SKIP
	.comm	_SISLANDS_DPM2_NEAR_TDP_DEC,4,2 ## @SISLANDS_DPM2_NEAR_TDP_DEC
	.comm	_SISLANDS_DPM2_ABOVE_SAFE_INC,4,2 ## @SISLANDS_DPM2_ABOVE_SAFE_INC
	.comm	_SISLANDS_DPM2_BELOW_SAFE_INC,4,2 ## @SISLANDS_DPM2_BELOW_SAFE_INC
	.no_dead_strip	_si_populate_power_containment_values
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si_populate_power_containment_values
_si_populate_power_containment_values:  ; @si_populate_power_containment_values
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
	bl	_evergreen_get_pi
	mov	x21, x0
	mov	x0, x20
	bl	_ni_get_pi
	mov	x24, x0
	mov	x0, x23
	bl	_ni_get_ps
	ldr	w8, [x24]
	cbz	w8, LBB0_17
; %bb.1:
	mov	x22, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_18
; %bb.2:
	ldr	w9, [x19]
	cmp	w9, w8
	b.ne	LBB0_18
; %bb.3:
	mov	x0, x20
	mov	x1, x23
	bl	_si_should_disable_uvd_powertune
	ldr	x8, [x19, #8]
	stp	xzr, xzr, [x8, #8]
	str	xzr, [x8]
	ldr	w8, [x22]
	cmp	w8, #2
	b.lt	LBB0_17
; %bb.4:
	mov	x23, x0
	mov	x24, #0
	mov	w25, #1
	mov	w28, #40
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	add	x10, x8, x24
	ldr	w9, [x10]
	ldr	w26, [x10, #8]
	cmp	x28, #40
Lloh0:
	adrp	x10, _SISLANDS_DPM2_MAXPS_PERCENT_M@GOTPAGE
Lloh1:
	ldr	x10, [x10, _SISLANDS_DPM2_MAXPS_PERCENT_M@GOTPAGEOFF]
Lloh2:
	adrp	x11, _SISLANDS_DPM2_MAXPS_PERCENT_H@GOTPAGE
Lloh3:
	ldr	x11, [x11, _SISLANDS_DPM2_MAXPS_PERCENT_H@GOTPAGEOFF]
	csel	x10, x10, x11, eq
	cmp	w9, w26
	b.gt	LBB0_18
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x11, [x10]
	cbz	x11, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w9, w26
	ccmp	w23, #0, #0, ne
	csel	w10, w26, w9, ne
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x28, #40
	b.eq	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mul	w9, w9, w11
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w10, w9, w10
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x10, x26
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x8]
	cmp	w10, w9
	csel	w27, w10, w9, gt
	cbz	w27, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x8, x24
	ldr	w2, [x8, #4]
	add	x3, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	_si_populate_voltage_value
	cbnz	w0, LBB0_19
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x20
	bl	_si_get_std_voltage_value
	cbnz	w0, LBB0_19
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x22, #8]
	add	x8, x8, x24
	ldr	w2, [x8, #12]
	add	x3, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	_si_populate_voltage_value
	cbnz	w0, LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x1, sp, #12
	add	x2, sp, #4
	mov	x0, x20
	bl	_si_get_std_voltage_value
	cbnz	w0, LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	ldp	w2, w1, [sp, #4]
	mov	x0, x20
	bl	_si_calculate_power_efficiency_ratio
Lloh4:
	adrp	x8, _SISLANDS_DPM2_MAX_PULSE_SKIP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SISLANDS_DPM2_MAX_PULSE_SKIP@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	sub	w9, w26, w27
	mul	w8, w8, w9
	sdiv	w8, w8, w26
	sxtw	x8, w8
	ldr	x9, [x19, #8]
	add	x9, x9, x28
	str	x8, [x9]
Lloh7:
	adrp	x8, _SISLANDS_DPM2_NEAR_TDP_DEC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SISLANDS_DPM2_NEAR_TDP_DEC@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	stur	w8, [x9, #-4]
Lloh10:
	adrp	x8, _SISLANDS_DPM2_ABOVE_SAFE_INC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SISLANDS_DPM2_ABOVE_SAFE_INC@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	stur	w8, [x9, #-8]
Lloh13:
	adrp	x8, _SISLANDS_DPM2_BELOW_SAFE_INC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SISLANDS_DPM2_BELOW_SAFE_INC@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	stur	w8, [x9, #-12]
	bl	_cpu_to_be16
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19, #8]
	add	x9, x9, x28
	stur	w8, [x9, #-16]
	add	x25, x25, #1
	ldrsw	x8, [x22]
	add	x28, x28, #24
	add	x24, x24, #8
	cmp	x25, x8
	b.lt	LBB0_5
	b	LBB0_19
LBB0_17:
	mov	w0, #0
	b	LBB0_19
LBB0_18:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SISLANDS_DPM2_MAXPS_PERCENT_M,8,3 ; @SISLANDS_DPM2_MAXPS_PERCENT_M
	.comm	_SISLANDS_DPM2_MAXPS_PERCENT_H,8,3 ; @SISLANDS_DPM2_MAXPS_PERCENT_H
	.comm	_SISLANDS_DPM2_MAX_PULSE_SKIP,4,2 ; @SISLANDS_DPM2_MAX_PULSE_SKIP
	.comm	_SISLANDS_DPM2_NEAR_TDP_DEC,4,2 ; @SISLANDS_DPM2_NEAR_TDP_DEC
	.comm	_SISLANDS_DPM2_ABOVE_SAFE_INC,4,2 ; @SISLANDS_DPM2_ABOVE_SAFE_INC
	.comm	_SISLANDS_DPM2_BELOW_SAFE_INC,4,2 ; @SISLANDS_DPM2_BELOW_SAFE_INC
	.no_dead_strip	_si_populate_power_containment_values
.subsections_via_symbols
