	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kv_populate_uvd_table
_kv_populate_uvd_table:                 ## @kv_populate_uvd_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_kv_get_pi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_11
## %bb.2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	32(%rax), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	$0, 32(%rax)
	leaq	16(%rax), %r14
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	8(%rbx), %rax
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	(%rax,%r12), %rcx
	jl	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	12(%rax,%r12), %edi
	callq	_cpu_to_be32
	movq	(%r14), %rcx
	movq	%rax, 48(%rcx,%r13)
	movq	8(%rbx), %rax
	movl	8(%rax,%r12), %edi
	callq	_cpu_to_be32
	movq	(%r14), %rcx
	movq	%rax, 40(%rcx,%r13)
	movq	8(%rbx), %rax
	movq	(%rax,%r12), %rdi
	callq	_cpu_to_be16
	movq	(%r14), %rcx
	movl	%eax, 32(%rcx,%r13)
	movq	8(%rbx), %rax
	movl	12(%rax,%r12), %esi
	movq	%rbx, %rdi
	callq	_kv_get_clk_bypass
	cltq
	movq	(%r14), %rcx
	movq	%rax, 24(%rcx,%r13)
	movq	8(%rbx), %rax
	movl	8(%rax,%r12), %esi
	movq	%rbx, %rdi
	callq	_kv_get_clk_bypass
	cltq
	movq	(%r14), %rcx
	movq	%rax, 16(%rcx,%r13)
	movq	_COMPUTE_ENGINE_PLL_PARAM@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	8(%rbx), %rax
	movl	12(%rax,%r12), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	movq	%rbx, %r15
	leaq	-56(%rbp), %rbx
	movq	%rbx, %r8
	callq	_amdgpu_atombios_get_clock_dividers
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	-56(%rbp), %rax
	movq	(%r14), %rcx
	movq	%rax, 8(%rcx,%r13)
	movq	_COMPUTE_ENGINE_PLL_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r15), %rax
	movl	8(%rax,%r12), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	callq	_amdgpu_atombios_get_clock_dividers
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	-56(%rbp), %rax
	movq	(%r14), %rcx
	movq	%rax, (%rcx,%r13)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incq	(%rax)
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	incq	%rdx
	addq	$56, %r13
	addq	$16, %r12
	cmpq	(%r15), %rdx
	movq	%r15, %rbx
	jb	LBB0_3
LBB0_8:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	24(%r15), %r13
	movq	_SMU7_Fusion_DpmTable@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_UvdLevelCount@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	addq	%rax, %r13
	movl	12(%r15), %r8d
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	$8, %ecx
	callq	_amdgpu_kv_copy_bytes_to_smc
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %r15
	addq	$8, %r15
	movl	$1, 8(%r12)
	movq	24(%r12), %r13
	movq	_SMU7_Fusion_DpmTable@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_UVDInterval@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	addq	%rax, %r13
	movl	12(%r12), %r8d
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movl	$8, %ecx
	callq	_amdgpu_kv_copy_bytes_to_smc
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	24(%r15), %r12
	movq	_SMU7_Fusion_DpmTable@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_UvdLevel@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	addq	%rax, %r12
	movq	_SMU7_MAX_LEVELS_UVD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	shll	$2, %ecx
	movl	12(%r15), %r8d
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_amdgpu_kv_copy_bytes_to_smc
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMPUTE_ENGINE_PLL_PARAM,4,2   ## @COMPUTE_ENGINE_PLL_PARAM
	.comm	_SMU7_Fusion_DpmTable,4,2       ## @SMU7_Fusion_DpmTable
	.comm	_UvdLevelCount,4,2              ## @UvdLevelCount
	.comm	_UVDInterval,4,2                ## @UVDInterval
	.comm	_UvdLevel,4,2                   ## @UvdLevel
	.comm	_SMU7_MAX_LEVELS_UVD,4,2        ## @SMU7_MAX_LEVELS_UVD
	.no_dead_strip	_kv_populate_uvd_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kv_populate_uvd_table
_kv_populate_uvd_table:                 ; @kv_populate_uvd_table
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_kv_get_pi
	cbz	x19, LBB0_11
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_11
; %bb.2:
	mov	x20, x0
	mov	x23, #0
	mov	x24, #0
	mov	x22, x0
	str	xzr, [x22, #32]!
	sub	x21, x22, #16
	mov	w25, #8
Lloh0:
	adrp	x26, _COMPUTE_ENGINE_PLL_PARAM@GOTPAGE
Lloh1:
	ldr	x26, [x26, _COMPUTE_ENGINE_PLL_PARAM@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20]
	ldr	x8, [x19, #8]
	cbz	x9, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x8, x25
	ldur	x10, [x10, #-8]
	cmp	x9, x10
	b.lt	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, x25
	ldr	w0, [x8, #4]
	bl	_cpu_to_be32
	ldr	x8, [x21]
	add	x8, x8, x23
	str	x0, [x8, #48]
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x25]
	bl	_cpu_to_be32
	ldr	x8, [x21]
	add	x8, x8, x23
	str	x0, [x8, #40]
	ldr	x8, [x19, #8]
	add	x8, x8, x25
	ldur	x0, [x8, #-8]
	bl	_cpu_to_be16
	ldr	x8, [x21]
	add	x8, x8, x23
	str	w0, [x8, #32]
	ldr	x8, [x19, #8]
	add	x8, x8, x25
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_kv_get_clk_bypass
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	ldr	x9, [x21]
	add	x9, x9, x23
	str	x8, [x9, #24]
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x25]
	mov	x0, x19
	bl	_kv_get_clk_bypass
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	ldr	x9, [x21]
	add	x9, x9, x23
	str	x8, [x9, #16]
	ldr	w1, [x26]
	ldr	x8, [x19, #8]
	add	x8, x8, x25
	ldr	w2, [x8, #4]
	add	x4, sp, #8
	mov	x0, x19
	mov	w3, #0
	bl	_amdgpu_atombios_get_clock_dividers
	cbnz	w0, LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x8, [sp, #8]
	ldr	x9, [x21]
	add	x9, x9, x23
	str	x8, [x9, #8]
	ldr	w1, [x26]
	ldr	x8, [x19, #8]
	ldr	w2, [x8, x25]
	add	x4, sp, #8
	mov	x0, x19
	mov	w3, #0
	bl	_amdgpu_atombios_get_clock_dividers
	cbnz	w0, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x8, [sp, #8]
	ldr	x9, [x21]
	str	x8, [x9, x23]
	ldr	x8, [x22]
	add	x8, x8, #1
	str	x8, [x22]
	add	x24, x24, #1
	ldr	x8, [x19]
	add	x23, x23, #56
	add	x25, x25, #16
	cmp	x24, x8
	b.lo	LBB0_3
LBB0_8:
	ldr	x24, [x20, #24]
Lloh2:
	adrp	x23, _SMU7_Fusion_DpmTable@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SMU7_Fusion_DpmTable@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh4:
	adrp	x8, _UvdLevelCount@GOTPAGE
Lloh5:
	ldr	x8, [x8, _UvdLevelCount@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_offsetof
	add	x1, x0, x24
	ldr	w4, [x20, #12]
	mov	x0, x19
	mov	x2, x22
	mov	w3, #8
	bl	_amdgpu_kv_copy_bytes_to_smc
	cbnz	w0, LBB0_12
; %bb.9:
	mov	w8, #1
	mov	x22, x20
	str	w8, [x22, #8]!
	ldr	x24, [x22, #16]
	ldr	w0, [x23]
Lloh7:
	adrp	x8, _UVDInterval@GOTPAGE
Lloh8:
	ldr	x8, [x8, _UVDInterval@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_offsetof
	add	x1, x0, x24
	ldr	w4, [x22, #4]
	mov	x0, x19
	mov	x2, x22
	mov	w3, #8
	bl	_amdgpu_kv_copy_bytes_to_smc
	cbnz	w0, LBB0_12
; %bb.10:
	ldr	x22, [x20, #24]
	ldr	w0, [x23]
Lloh10:
	adrp	x8, _UvdLevel@GOTPAGE
Lloh11:
	ldr	x8, [x8, _UvdLevel@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_offsetof
	add	x1, x0, x22
Lloh13:
	adrp	x8, _SMU7_MAX_LEVELS_UVD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SMU7_MAX_LEVELS_UVD@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	lsl	w3, w8, #2
	ldr	w4, [x20, #12]
	mov	x0, x19
	mov	x2, x21
	bl	_amdgpu_kv_copy_bytes_to_smc
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_COMPUTE_ENGINE_PLL_PARAM,4,2   ; @COMPUTE_ENGINE_PLL_PARAM
	.comm	_SMU7_Fusion_DpmTable,4,2       ; @SMU7_Fusion_DpmTable
	.comm	_UvdLevelCount,4,2              ; @UvdLevelCount
	.comm	_UVDInterval,4,2                ; @UVDInterval
	.comm	_UvdLevel,4,2                   ; @UvdLevel
	.comm	_SMU7_MAX_LEVELS_UVD,4,2        ; @SMU7_MAX_LEVELS_UVD
	.no_dead_strip	_kv_populate_uvd_table
.subsections_via_symbols
