	.file	"extr_kv_dpm.c_kv_populate_vce_table.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	kv_populate_vce_table, @function
kv_populate_vce_table:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	kv_get_pi@PLT
	test	rbp, rbp
	je	.L8
	mov	rbx, rax
	xor	eax, eax
	cmp	QWORD PTR 0[rbp], 0
	je	.L1
	lea	rax, 20[rsp]
	mov	QWORD PTR 32[rbx], 0
	xor	r12d, r12d
	mov	QWORD PTR 8[rsp], rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rax, QWORD PTR 16[rbx]
	movsx	rdx, DWORD PTR 20[rsp]
	add	r12, 1
	mov	QWORD PTR [rax+r14*8], rdx
	add	QWORD PTR 32[rbx], 1
	cmp	QWORD PTR 0[rbp], r12
	jbe	.L6
.L5:
	mov	rdx, QWORD PTR 8[rbp]
	mov	r13, r12
	mov	rax, QWORD PTR [rbx]
	sal	r13, 4
	add	rdx, r13
	test	rax, rax
	je	.L3
	cmp	rax, QWORD PTR [rdx]
	jl	.L6
.L3:
	mov	rcx, QWORD PTR 16[rbx]
	lea	r14, [r12+r12*2]
	mov	edi, DWORD PTR 8[rdx]
	lea	r15, 0[0+r14*8]
	add	rcx, r15
	mov	QWORD PTR [rsp], rcx
	call	cpu_to_be32@PLT
	mov	rcx, QWORD PTR [rsp]
	mov	rdx, QWORD PTR 16[rbx]
	mov	DWORD PTR 20[rcx], eax
	mov	rax, QWORD PTR 8[rbp]
	add	rdx, r15
	mov	QWORD PTR [rsp], rdx
	mov	rdi, QWORD PTR [rax+r13]
	call	cpu_to_be16@PLT
	mov	rdx, QWORD PTR [rsp]
	mov	rdi, rbp
	mov	DWORD PTR 16[rdx], eax
	mov	rax, QWORD PTR 8[rbp]
	mov	esi, DWORD PTR 8[rax+r13]
	call	kv_get_clk_bypass@PLT
	mov	rdx, QWORD PTR 16[rbx]
	mov	r8, QWORD PTR 8[rsp]
	xor	ecx, ecx
	cdqe
	mov	esi, DWORD PTR COMPUTE_ENGINE_PLL_PARAM[rip]
	mov	rdi, rbp
	mov	QWORD PTR 8[rdx+r15], rax
	mov	rax, QWORD PTR 8[rbp]
	mov	edx, DWORD PTR 8[rax+r13]
	call	radeon_atom_get_clock_dividers@PLT
	test	eax, eax
	je	.L17
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rsi, QWORD PTR 24[rsp]
	xor	rsi, QWORD PTR fs:40
	jne	.L18
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	esi, DWORD PTR VceLevelCount[rip]
	mov	edi, DWORD PTR SMU7_Fusion_DpmTable[rip]
	mov	r13d, DWORD PTR 12[rbx]
	mov	r12, QWORD PTR 24[rbx]
	call	offsetof@PLT
	lea	rdx, 32[rbx]
	mov	ecx, 8
	mov	rdi, rbp
	lea	rsi, [r12+rax]
	mov	r8d, r13d
	call	kv_copy_bytes_to_smc@PLT
	test	eax, eax
	jne	.L1
	mov	r13d, DWORD PTR 12[rbx]
	mov	r12, QWORD PTR 24[rbx]
	mov	DWORD PTR 8[rbx], 1
	mov	esi, DWORD PTR VCEInterval[rip]
	mov	edi, DWORD PTR SMU7_Fusion_DpmTable[rip]
	call	offsetof@PLT
	lea	rdx, 8[rbx]
	mov	r8d, r13d
	mov	rdi, rbp
	lea	rsi, [r12+rax]
	mov	ecx, 8
	call	kv_copy_bytes_to_smc@PLT
	test	eax, eax
	jne	.L1
	mov	eax, DWORD PTR SMU7_MAX_LEVELS_VCE[rip]
	mov	esi, DWORD PTR VceLevel[rip]
	mov	edi, DWORD PTR SMU7_Fusion_DpmTable[rip]
	mov	r14d, DWORD PTR 12[rbx]
	mov	r12, QWORD PTR 24[rbx]
	lea	r13d, 0[0+rax*4]
	call	offsetof@PLT
	lea	rdx, 16[rbx]
	mov	r8d, r14d
	mov	ecx, r13d
	lea	rsi, [r12+rax]
	mov	rdi, rbp
	call	kv_copy_bytes_to_smc@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	xor	eax, eax
	jmp	.L1
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	kv_populate_vce_table, .-kv_populate_vce_table
	.comm	VceLevelCount,4,4
	.comm	VceLevel,4,4
	.comm	VCEInterval,4,4
	.comm	SMU7_MAX_LEVELS_VCE,4,4
	.comm	SMU7_Fusion_DpmTable,4,4
	.comm	COMPUTE_ENGINE_PLL_PARAM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_kv_dpm.c_kv_populate_vce_table.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	kv_populate_vce_table, %function
kv_populate_vce_table:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	ldr	r3, .L21
	sub	sp, sp, #20
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	kv_get_pi
	cmp	r5, #0
	moveq	r0, r5
	beq	.L1
	mov	r6, r0
	ldr	r0, [r5]
	cmp	r0, #0
	beq	.L1
	mov	r3, #0
	ldr	r9, .L21+4
	mov	r4, r3
	str	r3, [r6, #20]
	add	r8, sp, #8
	b	.L5
.L19:
	ldr	r1, [r6, #12]
	ldr	r0, [sp, #8]
	ldr	r2, [r5]
	ldr	r3, [r6, #20]
	str	r0, [r1, r4, lsl #4]
	add	r4, r4, #1
	add	r3, r3, #1
	cmp	r2, r4
	str	r3, [r6, #20]
	bls	.L6
.L5:
	ldr	r3, [r6]
	ldr	r2, [r5, #4]
	cmp	r3, #0
	add	r1, r2, r4, lsl #3
	lsl	r7, r4, #3
	beq	.L3
	ldr	r2, [r2, r4, lsl #3]
	cmp	r3, r2
	blt	.L6
.L3:
	ldr	r0, [r1, #4]
	ldr	r10, [r6, #12]
	bl	cpu_to_be32
	ldr	r3, [r5, #4]
	add	r10, r10, r4, lsl #4
	ldr	fp, [r6, #12]
	str	r0, [r10, #12]
	ldr	r0, [r3, r7]
	bl	cpu_to_be16
	ldr	r3, [r5, #4]
	lsl	r10, r4, #4
	add	r3, r3, r7
	add	fp, fp, r10
	ldr	r1, [r3, #4]
	str	r0, [fp, #8]
	mov	r0, r5
	bl	kv_get_clk_bypass
	ldr	r2, [r5, #4]
	ldr	r3, [r6, #12]
	add	r7, r2, r7
	add	r3, r3, r10
	ldr	r2, [r7, #4]
	ldr	r1, [r9]
	str	r0, [r3, #4]
	mov	r3, #0
	mov	r0, r5
	str	r8, [sp]
	bl	radeon_atom_get_clock_dividers
	cmp	r0, #0
	beq	.L19
.L1:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	ldr	r3, .L21+8
	ldr	r4, .L21+12
	ldr	r1, [r3]
	ldr	r0, [r4]
	ldr	r7, [r6, #16]
	bl	offsetof
	ldr	r3, [r6, #8]
	add	r1, r7, r0
	str	r3, [sp]
	mov	r0, r5
	mov	r3, #4
	add	r2, r6, #20
	bl	kv_copy_bytes_to_smc
	cmp	r0, #0
	bne	.L1
	mov	r2, #1
	ldr	r3, .L21+16
	str	r2, [r6, #4]
	ldr	r1, [r3]
	ldr	r0, [r4]
	ldr	r7, [r6, #16]
	bl	offsetof
	ldr	r3, [r6, #8]
	add	r1, r7, r0
	str	r3, [sp]
	mov	r3, #4
	mov	r0, r5
	add	r2, r6, r3
	bl	kv_copy_bytes_to_smc
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L21+20
	ldr	r0, [r4]
	ldr	r1, [r3]
	ldr	r4, [r6, #16]
	bl	offsetof
	ldr	r3, .L21+24
	ldr	r2, [r6, #8]
	ldr	r3, [r3]
	add	r1, r4, r0
	str	r2, [sp]
	mov	r0, r5
	lsl	r3, r3, #2
	add	r2, r6, #12
	bl	kv_copy_bytes_to_smc
	b	.L1
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	.LC0
	.word	COMPUTE_ENGINE_PLL_PARAM
	.word	VceLevelCount
	.word	SMU7_Fusion_DpmTable
	.word	VCEInterval
	.word	VceLevel
	.word	SMU7_MAX_LEVELS_VCE
	.size	kv_populate_vce_table, .-kv_populate_vce_table
	.comm	VceLevelCount,4,4
	.comm	VceLevel,4,4
	.comm	VCEInterval,4,4
	.comm	SMU7_MAX_LEVELS_VCE,4,4
	.comm	SMU7_Fusion_DpmTable,4,4
	.comm	COMPUTE_ENGINE_PLL_PARAM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
