	.file	"extr_smu7_hwmgr.c_smu7_read_sensor.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	smu7_read_sensor, @function
smu7_read_sensor:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	DWORD PTR [rcx], 3
	jle	.L24
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	eax, -128[rsi]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rcx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rcx, QWORD PTR 8[rdi]
	cmp	eax, 8
	ja	.L4
	mov	r12, rdx
	lea	rdx, .L6[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L13-.L6
	.long	.L12-.L6
	.long	.L11-.L6
	.long	.L8-.L6
	.long	.L10-.L6
	.long	.L9-.L6
	.long	.L8-.L6
	.long	.L7-.L6
	.long	.L5-.L6
	.text
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -40
	.cfi_offset 6, -32
	.cfi_offset 12, -24
	.cfi_offset 13, -16
	cmp	esi, 134
	mov	edx, DWORD PTR AverageGraphicsActivity[rip]
	mov	esi, DWORD PTR SMU_SoftRegisters[rip]
	cmovne	edx, DWORD PTR AverageMemoryActivity[rip]
	mov	r13d, DWORD PTR [rcx]
	call	smum_get_offsetof@PLT
	mov	esi, DWORD PTR CGS_IND_REG__SMC[rip]
	mov	edi, DWORD PTR 0[rbp]
	lea	edx, 0[r13+rax]
	call	cgs_read_ind_register@PLT
	sub	eax, -128
	mov	edx, eax
	sar	edx, 8
	cmp	eax, 25855
	mov	eax, 100
	cmovle	eax, edx
	mov	DWORD PTR [r12], eax
	xor	eax, eax
	mov	DWORD PTR [rbx], 4
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	call	smu7_thermal_get_temperature@PLT
	mov	DWORD PTR [r12], eax
	xor	eax, eax
	mov	DWORD PTR [rbx], 4
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, r12
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 8
	jmp	smu7_get_gpu_power@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	esi, DWORD PTR PPSMC_MSG_API_GetSclkFrequency[rip]
.L21:
	mov	rdi, rbp
	call	smum_send_msg_to_smc@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, DWORD PTR mmSMC_MSG_ARG_0[rip]
	call	cgs_read_register@PLT
	mov	DWORD PTR [r12], eax
	xor	eax, eax
	mov	DWORD PTR [rbx], 4
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	esi, DWORD PTR PPSMC_MSG_API_GetMclkFrequency[rip]
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L13:
	cmp	BYTE PTR 4[rcx], 2
	mov	edx, DWORD PTR PWR_SVI2_STATUS[rip]
	mov	esi, DWORD PTR CGS_IND_REG__SMC[rip]
	mov	edi, DWORD PTR [rdi]
	je	.L25
	mov	ecx, DWORD PTR PLANE1_VID[rip]
	call	PHM_READ_INDIRECT_FIELD@PLT
	mov	edi, eax
.L17:
	call	convert_to_vddc@PLT
	mov	DWORD PTR [r12], eax
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	eax, DWORD PTR 8[rcx]
	test	eax, eax
.L22:
	sete	al
	movzx	eax, al
	mov	DWORD PTR [r12], eax
	xor	eax, eax
	mov	DWORD PTR [rbx], 4
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	edx, DWORD PTR 12[rcx]
	test	edx, edx
	jmp	.L22
.L4:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	mov	ecx, DWORD PTR PLANE2_VID[rip]
	call	PHM_READ_INDIRECT_FIELD@PLT
	mov	edi, eax
	jmp	.L17
	.cfi_endproc
.LFE0:
	.size	smu7_read_sensor, .-smu7_read_sensor
	.comm	mmSMC_MSG_ARG_0,4,4
	.comm	SMU_SoftRegisters,4,4
	.comm	PWR_SVI2_STATUS,4,4
	.comm	PPSMC_MSG_API_GetSclkFrequency,4,4
	.comm	PPSMC_MSG_API_GetMclkFrequency,4,4
	.comm	PLANE2_VID,4,4
	.comm	PLANE1_VID,4,4
	.comm	EINVAL,4,4
	.comm	CGS_IND_REG__SMC,4,4
	.comm	AverageMemoryActivity,4,4
	.comm	AverageGraphicsActivity,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_smu7_hwmgr.c_smu7_read_sensor.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	smu7_read_sensor, %function
smu7_read_sensor:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r3
	ldr	r3, [r3]
	cmp	r3, #3
	ble	.L4
	sub	r3, r1, #128
	mov	r6, r2
	mov	r5, r0
	ldr	r2, [r0, #4]
	cmp	r3, #8
	ldrls	pc, [pc, r3, asl #2]
	b	.L4
.L6:
	.word	.L13
	.word	.L12
	.word	.L11
	.word	.L8
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L5
.L4:
	ldr	r3, .L22
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	ldr	r3, .L22+4
	cmp	r1, #134
	ldr	r1, [r3]
	ldreq	r3, .L22+8
	ldrne	r3, .L22+12
	ldr	r7, [r2]
	ldr	r2, [r3]
	bl	smum_get_offsetof
	ldr	r3, .L22+16
	add	r2, r7, r0
	ldr	r1, [r3]
	ldr	r0, [r5]
	bl	cgs_read_ind_register
	add	r0, r0, #128
	asr	r0, r0, #8
	cmp	r0, #100
	movge	r0, #100
	mov	r3, #4
	str	r0, [r6]
	mov	r0, #0
	str	r3, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	bl	smu7_thermal_get_temperature
	mov	r3, #4
	str	r0, [r6]
	mov	r0, #0
	str	r3, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	mov	r1, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	smu7_get_gpu_power
.L7:
	ldr	r3, .L22+20
.L19:
	ldr	r1, [r3]
	mov	r0, r5
	bl	smum_send_msg_to_smc
	ldr	r3, .L22+24
	ldr	r0, [r5]
	ldr	r1, [r3]
	bl	cgs_read_register
	mov	r3, #4
	str	r0, [r6]
	mov	r0, #0
	str	r3, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	ldr	r3, .L22+28
	b	.L19
.L13:
	ldrb	r1, [r2, #4]	@ zero_extendqisi2
	ldr	r3, .L22+32
	ldr	r2, .L22+16
	cmp	r1, #2
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldreq	r3, .L22+36
	ldrne	r3, .L22+40
	ldr	r0, [r0]
	ldr	r3, [r3]
	bl	PHM_READ_INDIRECT_FIELD
	bl	convert_to_vddc
	mov	r3, r0
	mov	r0, #0
	str	r3, [r6]
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r3, [r2, #8]
.L20:
	clz	r3, r3
	mov	r2, #4
	lsr	r3, r3, #5
	str	r3, [r6]
	mov	r0, #0
	str	r2, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r3, [r2, #12]
	b	.L20
.L23:
	.align	2
.L22:
	.word	EINVAL
	.word	SMU_SoftRegisters
	.word	AverageGraphicsActivity
	.word	AverageMemoryActivity
	.word	CGS_IND_REG__SMC
	.word	PPSMC_MSG_API_GetSclkFrequency
	.word	mmSMC_MSG_ARG_0
	.word	PPSMC_MSG_API_GetMclkFrequency
	.word	PWR_SVI2_STATUS
	.word	PLANE2_VID
	.word	PLANE1_VID
	.size	smu7_read_sensor, .-smu7_read_sensor
	.comm	mmSMC_MSG_ARG_0,4,4
	.comm	SMU_SoftRegisters,4,4
	.comm	PWR_SVI2_STATUS,4,4
	.comm	PPSMC_MSG_API_GetSclkFrequency,4,4
	.comm	PPSMC_MSG_API_GetMclkFrequency,4,4
	.comm	PLANE2_VID,4,4
	.comm	PLANE1_VID,4,4
	.comm	EINVAL,4,4
	.comm	CGS_IND_REG__SMC,4,4
	.comm	AverageMemoryActivity,4,4
	.comm	AverageGraphicsActivity,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
