	.file	"extr_vega20_hwmgr.c_vega20_read_sensor.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vega20_read_sensor, @function
vega20_read_sensor:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rcx
	sub	rsp, 40
	.cfi_def_cfa_offset 64
	mov	rcx, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	lea	eax, -128[rsi]
	cmp	eax, 11
	ja	.L2
	mov	r12, rdx
	lea	rdx, .L4[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L14-.L4
	.long	.L13-.L4
	.long	.L12-.L4
	.long	.L11-.L4
	.long	.L8-.L4
	.long	.L10-.L4
	.long	.L9-.L4
	.long	.L8-.L4
	.long	.L7-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdx, r12
	call	vega20_get_current_activity_percent@PLT
	test	eax, eax
	jne	.L1
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L10:
	call	vega20_thermal_get_temperature@PLT
	mov	DWORD PTR [r12], eax
	xor	eax, eax
	mov	DWORD PTR [rbx], 4
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rbx, QWORD PTR 24[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L22
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	DWORD PTR [rbx], 16
	mov	rsi, r12
	call	vega20_get_gpu_power@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	lea	rsi, 12[rsp]
	call	vega20_get_metrics_table@PLT
	test	eax, eax
	jne	.L1
	imul	edx, DWORD PTR 12[rsp], 100
	mov	DWORD PTR [r12], edx
	mov	DWORD PTR [rbx], 4
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, DWORD PTR PPCLK_UCLK[rip]
	mov	rdx, r12
	call	vega20_get_current_clk_freq@PLT
	test	eax, eax
	jne	.L1
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rsi, r12
	call	vega20_get_enabled_smc_features@PLT
	test	eax, eax
	jne	.L1
	mov	DWORD PTR [rbx], 8
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	lea	rsi, 12[rsp]
	call	vega20_get_metrics_table@PLT
	test	eax, eax
	jne	.L1
	mov	edx, DWORD PTR 16[rsp]
	imul	edx, DWORD PTR PP_TEMPERATURE_UNITS_PER_CENTIGRADES[rip]
	mov	DWORD PTR [r12], edx
.L19:
	mov	DWORD PTR [rbx], 4
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edx, DWORD PTR mmSMUSVI0_TEL_PLANE0[rip]
	mov	edi, DWORD PTR SMUIO[rip]
	xor	esi, esi
	call	RREG32_SOC15@PLT
	mov	ecx, DWORD PTR SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR__SHIFT[rip]
	and	eax, DWORD PTR SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR_MASK[rip]
	sar	eax, cl
	mov	edi, eax
	call	convert_to_vddc@PLT
	mov	DWORD PTR [r12], eax
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	eax, DWORD PTR [rcx]
	test	eax, eax
.L20:
	sete	al
	movzx	eax, al
	mov	DWORD PTR [r12], eax
	xor	eax, eax
	mov	DWORD PTR [rbx], 4
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edx, DWORD PTR 4[rcx]
	test	edx, edx
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L11:
	lea	rsi, 12[rsp]
	call	vega20_get_metrics_table@PLT
	test	eax, eax
	jne	.L1
	mov	edx, DWORD PTR 20[rsp]
	imul	edx, DWORD PTR PP_TEMPERATURE_UNITS_PER_CENTIGRADES[rip]
	mov	DWORD PTR [r12], edx
	mov	DWORD PTR [rbx], 4
	jmp	.L1
.L2:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vega20_read_sensor, .-vega20_read_sensor
	.comm	mmSMUSVI0_TEL_PLANE0,4,4
	.comm	SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR__SHIFT,4,4
	.comm	SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR_MASK,4,4
	.comm	SMUIO,4,4
	.comm	PP_TEMPERATURE_UNITS_PER_CENTIGRADES,4,4
	.comm	PPCLK_UCLK,4,4
	.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_vega20_hwmgr.c_vega20_read_sensor.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vega20_read_sensor, %function
vega20_read_sensor:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	mov	r4, r3
	ldr	r3, .L22
	sub	sp, sp, #20
	sub	ip, r1, #128
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r5, r2
	ldr	r3, [r0, #4]
	cmp	ip, #11
	ldrls	pc, [pc, ip, asl #2]
	b	.L2
.L4:
	.word	.L14
	.word	.L13
	.word	.L12
	.word	.L11
	.word	.L8
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L8:
	bl	vega20_get_current_activity_percent
	cmp	r0, #0
	bne	.L1
.L18:
	mov	r3, #4
	str	r3, [r4]
	b	.L1
.L10:
	bl	vega20_thermal_get_temperature
	mov	r3, #4
	str	r0, [r5]
	mov	r0, #0
	str	r3, [r4]
.L1:
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, pc}
.L9:
	mov	r3, #16
	mov	r1, r2
	str	r3, [r4]
	bl	vega20_get_gpu_power
	b	.L1
.L7:
	mov	r1, sp
	bl	vega20_get_metrics_table
	cmp	r0, #0
	bne	.L1
	mov	r2, #4
	ldr	r3, [sp]
	add	r3, r3, r3, lsl #2
	add	r3, r3, r3, lsl #2
	lsl	r3, r3, #2
	str	r3, [r5]
	str	r2, [r4]
	b	.L1
.L6:
	ldr	r3, .L22+4
	ldr	r1, [r3]
	bl	vega20_get_current_clk_freq
	cmp	r0, #0
	bne	.L1
	b	.L18
.L5:
	mov	r1, r2
	bl	vega20_get_enabled_smc_features
	cmp	r0, #0
	moveq	r3, #8
	streq	r3, [r4]
	b	.L1
.L3:
	mov	r1, sp
	bl	vega20_get_metrics_table
	cmp	r0, #0
	bne	.L1
	mov	r2, #4
	ldr	r1, .L22+8
	ldr	r3, [sp, #4]
	ldr	r1, [r1]
	mul	r3, r1, r3
	str	r3, [r5]
	str	r2, [r4]
	b	.L1
.L14:
	ldr	r3, .L22+12
	ldr	r2, .L22+16
	mov	r1, #0
	ldr	r2, [r2]
	ldr	r0, [r3]
	bl	RREG32_SOC15
	ldr	r2, .L22+20
	ldr	r3, .L22+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	and	r0, r0, r2
	asr	r0, r0, r3
	bl	convert_to_vddc
	mov	r3, r0
	mov	r0, #0
	str	r3, [r5]
	b	.L1
.L13:
	ldr	r3, [r3]
.L19:
	clz	r3, r3
	mov	r2, #4
	lsr	r3, r3, #5
	str	r3, [r5]
	mov	r0, #0
	str	r2, [r4]
	b	.L1
.L12:
	ldr	r3, [r3, #4]
	b	.L19
.L11:
	mov	r1, sp
	bl	vega20_get_metrics_table
	cmp	r0, #0
	bne	.L1
	mov	r2, #4
	ldr	r1, .L22+8
	ldr	r3, [sp, #8]
	ldr	r1, [r1]
	mul	r3, r1, r3
	str	r3, [r5]
	str	r2, [r4]
	b	.L1
.L21:
	bl	__stack_chk_fail
.L2:
	ldr	r3, .L22+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L23:
	.align	2
.L22:
	.word	.LC0
	.word	PPCLK_UCLK
	.word	PP_TEMPERATURE_UNITS_PER_CENTIGRADES
	.word	SMUIO
	.word	mmSMUSVI0_TEL_PLANE0
	.word	SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR_MASK
	.word	SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR__SHIFT
	.word	EINVAL
	.size	vega20_read_sensor, .-vega20_read_sensor
	.comm	mmSMUSVI0_TEL_PLANE0,4,4
	.comm	SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR__SHIFT,4,4
	.comm	SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR_MASK,4,4
	.comm	SMUIO,4,4
	.comm	PP_TEMPERATURE_UNITS_PER_CENTIGRADES,4,4
	.comm	PPCLK_UCLK,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
