	.file	"extr_vega10_hwmgr.c_vega10_get_performance_level.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vega10_get_performance_level, @function
vega10_get_performance_level:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	sete	dl
	test	rsi, rsi
	sete	al
	or	dl, al
	jne	.L8
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, r8
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	test	r8, r8
	je	.L1
	mov	rdi, rsi
	mov	ebx, ecx
	call	cast_const_phw_vega10_power_state@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	cmp	edx, ebx
	lea	ecx, -1[rdx]
	cmovle	ebx, ecx
	movsx	rbx, ebx
	lea	rax, [rax+rbx*8]
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 4[rbp], edx
	mov	DWORD PTR 0[rbp], eax
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore 3
	.cfi_restore 6
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	vega10_get_performance_level, .-vega10_get_performance_level
	.comm	EINVAL,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_vega10_hwmgr.c_vega10_get_performance_level.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vega10_get_performance_level, %function
vega10_get_performance_level:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	clz	r2, r1
	push	{r4, r5, r6, lr}
	ldr	r5, [sp, #16]
	cmp	r0, #0
	lsr	r2, r2, #5
	moveq	r2, #1
	cmp	r5, #0
	moveq	r2, #1
	cmp	r2, #0
	beq	.L2
	ldr	r3, .L7
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r1
	mov	r4, r3
	bl	cast_const_phw_vega10_power_state
	mov	r3, r0
	ldr	r2, [r0]
	ldr	r3, [r3, #4]
	cmp	r2, r4
	suble	r4, r2, #1
	add	r2, r3, r4, lsl #3
	ldr	r2, [r2, #4]
	ldr	r3, [r3, r4, lsl #3]
	mov	r0, #0
	str	r2, [r5, #4]
	str	r3, [r5]
	pop	{r4, r5, r6, pc}
.L8:
	.align	2
.L7:
	.word	EINVAL
	.size	vega10_get_performance_level, .-vega10_get_performance_level
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
