	.file	"extr_trinity_dpm.c_trinity_parse_power_table.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	trinity_parse_power_table, @function
trinity_parse_power_table:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	esi, DWORD PTR PowerPlayInfo[rip]
	mov	edi, DWORD PTR DATA[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	GetIndexIntoMasterTable@PLT
	mov	rdi, QWORD PTR 32[r15]
	xor	edx, edx
	lea	rcx, 64[rsp]
	mov	esi, eax
	lea	r9, 60[rsp]
	lea	r8, 68[rsp]
	call	atom_parse_data_header@PLT
	test	eax, eax
	jne	.L2
.L20:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	mov	rdx, QWORD PTR 72[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L23
	add	rsp, 88
	.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
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR 32[r15]
	mov	ebx, DWORD PTR 60[rsp]
	add	ebx, DWORD PTR [rax]
	movsx	rbp, ebx
	mov	edi, DWORD PTR 8[rbp]
	call	le16_to_cpu@PLT
	mov	edi, DWORD PTR 4[rbp]
	add	ebx, eax
	mov	rax, QWORD PTR 32[r15]
	movsx	r13, ebx
	mov	ebx, DWORD PTR 60[rsp]
	mov	QWORD PTR 40[rsp], r13
	add	ebx, DWORD PTR [rax]
	call	le16_to_cpu@PLT
	mov	edi, DWORD PTR 0[rbp]
	lea	r9d, [rbx+rax]
	mov	rax, QWORD PTR 32[r15]
	mov	ebx, DWORD PTR 60[rsp]
	movsx	r14, r9d
	add	ebx, DWORD PTR [rax]
	call	le16_to_cpu@PLT
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	edi, DWORD PTR 0[r13]
	mov	esi, 4
	add	ebx, eax
	movsx	rax, ebx
	mov	QWORD PTR 24[rsp], rax
	call	kcalloc@PLT
	mov	QWORD PTR 16[r15], rax
	test	rax, rax
	je	.L21
	mov	rax, QWORD PTR 40[rsp]
	mov	rbx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jle	.L5
	mov	QWORD PTR 16[rsp], 0
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR 24[rsp]
	movsx	rdx, DWORD PTR [rbx]
	mov	rax, QWORD PTR 8[rax]
	lea	rax, [rax+rdx*4]
	mov	rdx, QWORD PTR 16[rsp]
	mov	QWORD PTR 32[rsp], rax
	mov	rax, QWORD PTR 24[r15]
	mov	ecx, DWORD PTR [rax+rdx*4]
	test	ecx, ecx
	je	.L20
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 4
	call	kzalloc@PLT
	test	rax, rax
	je	.L24
	mov	rdi, QWORD PTR 16[rsp]
	mov	rsi, QWORD PTR 16[r15]
	mov	rbp, QWORD PTR 8[rbx]
	lea	rdx, 0[0+rdi*8]
	add	rsi, rdx
	mov	QWORD PTR 8[rsp], rdx
	mov	edx, DWORD PTR 4[rbx]
	mov	QWORD PTR [rsi], rax
	test	edx, edx
	jle	.L8
	xor	r12d, r12d
	xor	r13d, r13d
	.p2align 4,,10
	.p2align 3
.L10:
	mov	eax, DWORD PTR 0[rbp+r12*4]
	cmp	DWORD PTR [r14], eax
	jle	.L9
	cmp	DWORD PTR SUMO_MAX_HARDWARE_POWERLEVELS[rip], r13d
	jle	.L8
	imul	eax, DWORD PTR 4[r14]
	mov	rcx, QWORD PTR 8[r14]
	mov	edx, r13d
	mov	rdi, r15
	add	r13d, 1
	cdqe
	lea	rcx, [rcx+rax*4]
	call	trinity_parse_pplib_clock_info@PLT
	mov	rsi, QWORD PTR 8[rsp]
	add	rsi, QWORD PTR 16[r15]
.L9:
	add	r12, 1
	cmp	DWORD PTR 4[rbx], r12d
	jg	.L10
.L8:
	mov	rax, QWORD PTR 24[rsp]
	mov	rdx, QWORD PTR 32[rsp]
	mov	rdi, r15
	mov	ecx, DWORD PTR [rax]
	call	trinity_parse_pplib_non_clock_info@PLT
	mov	eax, DWORD PTR 4[rbx]
	add	QWORD PTR 16[rsp], 1
	mov	rdi, QWORD PTR 16[rsp]
	add	eax, 2
	cdqe
	lea	rbx, [rbx+rax*4]
	mov	rax, QWORD PTR 40[rsp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, edi
	jg	.L11
.L5:
	mov	DWORD PTR [r15], eax
	mov	eax, DWORD PTR RADEON_MAX_VCE_LEVELS[rip]
	test	eax, eax
	jle	.L14
	mov	rdx, QWORD PTR 8[r15]
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rbx, rbp
	add	rbp, 1
	sal	rbx, 4
	mov	eax, DWORD PTR [rdx+rbx]
	imul	eax, DWORD PTR 4[r14]
	mov	rdx, QWORD PTR 8[r14]
	cdqe
	lea	r12, [rdx+rax*4]
	mov	edi, DWORD PTR 4[r12]
	call	le16_to_cpu@PLT
	mov	rdx, QWORD PTR 8[r15]
	mov	r8d, eax
	mov	eax, DWORD PTR [r12]
	add	rbx, rdx
	sal	eax, 16
	mov	QWORD PTR 8[rbx], 0
	or	eax, r8d
	cmp	DWORD PTR RADEON_MAX_VCE_LEVELS[rip], ebp
	mov	DWORD PTR 4[rbx], eax
	jg	.L13
.L14:
	xor	eax, eax
	jmp	.L1
.L24:
	mov	rdi, QWORD PTR 16[r15]
	call	kfree@PLT
.L21:
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	trinity_parse_power_table, .-trinity_parse_power_table
	.comm	SUMO_MAX_HARDWARE_POWERLEVELS,4,4
	.comm	RADEON_MAX_VCE_LEVELS,4,4
	.comm	PowerPlayInfo,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	DATA,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_trinity_dpm.c_trinity_parse_power_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	trinity_parse_power_table, %function
trinity_parse_power_table:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L26
	ldr	r2, .L26+4
	mov	r7, r0
	ldr	r0, [r3]
	ldr	r3, .L26+8
	sub	sp, sp, #44
	ldr	r1, [r2]
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bl	GetIndexIntoMasterTable
	add	r2, sp, #24
	add	r3, sp, #32
	mov	r1, r0
	ldr	r0, [r7, #16]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r2, #0
	add	r3, sp, #28
	bl	atom_parse_data_header
	cmp	r0, #0
	bne	.L2
.L21:
	ldr	r3, .L26+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L26+8
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, [r7, #16]
	ldr	r9, [sp, #24]
	ldr	r10, [r3]
	add	r6, r10, r9
	ldr	r0, [r6, #8]
	bl	le16_to_cpu
	ldr	r2, [r7, #16]
	ldr	r3, [sp, #24]
	ldr	r5, [r2]
	mov	r4, r0
	ldr	r0, [r6, #4]
	add	r5, r5, r3
	bl	le16_to_cpu
	mov	r2, r0
	ldr	r1, [r7, #16]
	ldr	r3, [sp, #24]
	ldr	r8, [r1]
	ldr	r0, [r10, r9]
	add	r8, r8, r3
	add	r5, r5, r2
	bl	le16_to_cpu
	mov	r3, r0
	ldr	r2, .L26+16
	add	r3, r8, r3
	mov	r1, #4
	ldr	r2, [r2]
	ldr	r0, [r6, r4]
	str	r3, [sp, #12]
	bl	kcalloc
	add	r3, r6, r4
	cmp	r0, #0
	str	r0, [r7, #8]
	str	r3, [sp, #20]
	beq	.L22
	ldr	r2, [r6, r4]
	ldr	r3, [sp, #20]
	cmp	r2, #0
	ldr	r8, [r3, #4]
	ble	.L5
	mov	r3, #0
	ldr	r10, .L26+20
	str	r3, [sp, #8]
.L11:
	ldr	r3, [r7, #12]
	ldr	r0, [sp, #8]
	ldr	r2, [r8]
	ldr	r1, [r3, r0, lsl #2]
	ldr	r3, [sp, #12]
	cmp	r1, #0
	ldr	r3, [r3, #4]
	lsl	r9, r0, #2
	add	r3, r3, r2, lsl #2
	str	r3, [sp, #16]
	beq	.L21
	ldr	r3, .L26+16
	mov	r0, #4
	ldr	r1, [r3]
	bl	kzalloc
	cmp	r0, #0
	beq	.L25
	ldr	ip, [r8, #4]
	ldr	r1, [r7, #8]
	cmp	ip, #0
	str	r0, [r1, r9]
	ldr	r6, [r8, #8]
	add	r1, r1, r9
	ble	.L8
	mov	fp, #0
	mov	r4, fp
	sub	r6, r6, #4
.L10:
	ldr	r0, [r6, #4]!
	ldr	r3, [r5]
	cmp	r3, r0
	ble	.L9
	ldr	r3, [r10]
	cmp	r3, fp
	ble	.L8
	ldmib	r5, {r2, r3}
	mul	r0, r2, r0
	mov	r2, fp
	add	r3, r3, r0, lsl #2
	mov	r0, r7
	bl	trinity_parse_pplib_clock_info
	ldr	r1, [r7, #8]
	ldr	ip, [r8, #4]
	add	fp, fp, #1
	add	r1, r1, r9
.L9:
	add	r4, r4, #1
	cmp	ip, r4
	bgt	.L10
.L8:
	ldr	r3, [sp, #12]
	ldr	r2, [sp, #16]
	ldr	r3, [r3]
	mov	r0, r7
	bl	trinity_parse_pplib_non_clock_info
	ldr	r2, [sp, #20]
	ldr	r1, [sp, #8]
	ldr	r3, [r8, #4]
	ldr	r2, [r2]
	add	r1, r1, #1
	add	r3, r3, #2
	cmp	r2, r1
	str	r1, [sp, #8]
	add	r8, r8, r3, lsl #2
	bgt	.L11
.L5:
	ldr	r9, .L26+24
	str	r2, [r7]
	ldr	r3, [r9]
	cmp	r3, #0
	ble	.L14
	mov	r4, #0
	mov	r8, r4
	ldr	r2, [r7, #4]
.L13:
	add	r3, r4, r4, lsl #1
	ldr	r6, [r2, r3, lsl #2]
	ldmib	r5, {r2, r10}
	mul	r6, r2, r6
	add	r2, r10, r6, lsl #2
	ldr	r0, [r2, #4]
	lsl	fp, r3, #2
	bl	le16_to_cpu
	ldr	r1, [r10, r6, lsl #2]
	ldr	r3, [r9]
	ldr	r2, [r7, #4]
	add	r4, r4, #1
	orr	r0, r0, r1, lsl #16
	cmp	r3, r4
	add	r3, r2, fp
	stmib	r3, {r0, r8}
	bgt	.L13
.L14:
	mov	r0, #0
	b	.L1
.L25:
	ldr	r0, [r7, #8]
	bl	kfree
.L22:
	ldr	r3, .L26+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L24:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	DATA
	.word	PowerPlayInfo
	.word	.LC0
	.word	EINVAL
	.word	GFP_KERNEL
	.word	SUMO_MAX_HARDWARE_POWERLEVELS
	.word	RADEON_MAX_VCE_LEVELS
	.word	ENOMEM
	.size	trinity_parse_power_table, .-trinity_parse_power_table
	.comm	SUMO_MAX_HARDWARE_POWERLEVELS,4,4
	.comm	RADEON_MAX_VCE_LEVELS,4,4
	.comm	PowerPlayInfo,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	DATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
