	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega10_read_sensor
_vega10_read_sensor:                    ## @vega10_read_sensor
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	addl	$-128, %esi
	cmpl	$10, %esi
	ja	LBB0_16
## %bb.1:
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_2:
	movq	_SMUIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmSMUSVI0_PLANE0_CURRENTVID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	_SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movl	%eax, %edi
	callq	_convert_to_vddc
	movl	%eax, (%r15)
	jmp	LBB0_20
LBB0_3:
	xorl	%eax, %eax
	cmpl	$0, (%r12)
	jmp	LBB0_5
LBB0_4:
	xorl	%eax, %eax
	cmpl	$0, 4(%r12)
LBB0_5:
	sete	%al
	jmp	LBB0_15
LBB0_6:
	movq	_PPSMC_MSG_GetTemperatureHBM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_PPSMC_MSG_GetTemperatureHotspot@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smum_send_msg_to_smc
	movq	%rbx, %rdi
	callq	_smum_get_argument
	movq	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	jmp	LBB0_15
LBB0_9:
	movq	%rbx, %rdi
	callq	_vega10_thermal_get_temperature
	jmp	LBB0_15
LBB0_10:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vega10_get_gpu_power           ## TAILCALL
LBB0_11:
	movq	_PPSMC_MSG_GetAverageGfxActivity@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_smum_send_msg_to_smc_with_parameter
	movq	%rbx, %rdi
	callq	_smum_get_argument
	cmpl	$100, %eax
	movl	$100, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, (%r15)
	movl	$4, (%r14)
	jmp	LBB0_20
LBB0_12:
	movq	_PPSMC_MSG_GetAverageGfxclkActualFrequency@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smum_send_msg_to_smc
	movq	%rbx, %rdi
	callq	_smum_get_argument
	imull	$100, %eax, %eax
	movl	%eax, (%r15)
	jmp	LBB0_19
LBB0_13:
	movq	_PPSMC_MSG_GetCurrentUclkIndex@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smum_send_msg_to_smc
	movq	%rbx, %rdi
	callq	_smum_get_argument
	cmpl	8(%r12), %eax
	jge	LBB0_16
## %bb.14:
	movq	16(%r12), %rcx
	cltq
	movl	(%rcx,%rax,4), %eax
LBB0_15:
	movl	%eax, (%r15)
	movl	$4, (%r14)
LBB0_19:
	xorl	%r12d, %r12d
LBB0_20:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_20
LBB0_17:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_vega10_get_enabled_smc_features
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.18:
	movl	$8, (%r14)
	jmp	LBB0_19
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_PPSMC_MSG_GetAverageGfxclkActualFrequency,4,2 ## @PPSMC_MSG_GetAverageGfxclkActualFrequency
	.comm	_PPSMC_MSG_GetCurrentUclkIndex,4,2 ## @PPSMC_MSG_GetCurrentUclkIndex
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PPSMC_MSG_GetAverageGfxActivity,4,2 ## @PPSMC_MSG_GetAverageGfxActivity
	.comm	_PPSMC_MSG_GetTemperatureHotspot,4,2 ## @PPSMC_MSG_GetTemperatureHotspot
	.comm	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES,4,2 ## @PP_TEMPERATURE_UNITS_PER_CENTIGRADES
	.comm	_PPSMC_MSG_GetTemperatureHBM,4,2 ## @PPSMC_MSG_GetTemperatureHBM
	.comm	_SMUIO,4,2                      ## @SMUIO
	.comm	_mmSMUSVI0_PLANE0_CURRENTVID,4,2 ## @mmSMUSVI0_PLANE0_CURRENTVID
	.comm	_SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID_MASK,4,2 ## @SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID_MASK
	.comm	_SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID__SHIFT,4,2 ## @SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID__SHIFT
	.no_dead_strip	_vega10_read_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega10_read_sensor
_vega10_read_sensor:                    ; @vega10_read_sensor
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	sub	w8, w1, #128
	cmp	w8, #10
	b.hi	LBB0_18
; %bb.1:
	mov	x20, x3
	mov	x19, x2
	mov	x21, x0
	ldr	x22, [x0]
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x8, _SMUIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SMUIO@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _mmSMUSVI0_PLANE0_CURRENTVID@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mmSMUSVI0_PLANE0_CURRENTVID@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_RREG32_SOC15
Lloh8:
	adrp	x8, _SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh11:
	adrp	x9, _SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID__SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID__SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	asr	w0, w8, w9
	bl	_convert_to_vddc
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_17
LBB0_3:
	mov	w0, #0
	ldr	w8, [x22]
	b	LBB0_5
LBB0_4:
	mov	w0, #0
	ldr	w8, [x22, #4]
LBB0_5:
	cmp	w8, #0
	cset	w8, eq
	b	LBB0_15
LBB0_6:
Lloh14:
	adrp	x8, _PPSMC_MSG_GetTemperatureHBM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PPSMC_MSG_GetTemperatureHBM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh16:
	adrp	x8, _PPSMC_MSG_GetTemperatureHotspot@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PPSMC_MSG_GetTemperatureHotspot@GOTPAGEOFF]
LBB0_8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_smum_send_msg_to_smc
	mov	x0, x21
	bl	_smum_get_argument
	mov	x8, x0
	mov	w0, #0
Lloh18:
	adrp	x9, _PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	mul	w8, w9, w8
	b	LBB0_15
LBB0_9:
	mov	x0, x21
	bl	_vega10_thermal_get_temperature
	mov	x8, x0
	mov	w0, #0
	b	LBB0_15
LBB0_10:
	mov	x0, x21
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_vega10_get_gpu_power
LBB0_11:
Lloh21:
	adrp	x8, _PPSMC_MSG_GetAverageGfxActivity@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PPSMC_MSG_GetAverageGfxActivity@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_smum_send_msg_to_smc_with_parameter
	mov	x0, x21
	bl	_smum_get_argument
	mov	x8, x0
	mov	w0, #0
	mov	w9, #100
	cmp	w8, #100
	csel	w8, w8, w9, lt
	b	LBB0_15
LBB0_12:
Lloh24:
	adrp	x8, _PPSMC_MSG_GetAverageGfxclkActualFrequency@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PPSMC_MSG_GetAverageGfxclkActualFrequency@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_smum_send_msg_to_smc
	mov	x0, x21
	bl	_smum_get_argument
	mov	x8, x0
	mov	w0, #0
	mov	w9, #100
	mul	w8, w8, w9
	str	w8, [x19]
	b	LBB0_17
LBB0_13:
Lloh27:
	adrp	x8, _PPSMC_MSG_GetCurrentUclkIndex@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PPSMC_MSG_GetCurrentUclkIndex@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_smum_send_msg_to_smc
	mov	x0, x21
	bl	_smum_get_argument
	ldr	w9, [x22, #8]
	cmp	w0, w9
	b.ge	LBB0_18
; %bb.14:
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x22, #16]
	ldr	w8, [x9, w8, sxtw #2]
LBB0_15:
	str	w8, [x19]
	mov	w8, #4
LBB0_16:
	str	w8, [x20]
LBB0_17:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_18:
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_19:
	mov	x0, x21
	mov	x1, x19
	bl	_vega10_get_enabled_smc_features
	cbnz	w0, LBB0_17
; %bb.20:
	mov	w8, #8
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
	.byte	(LBB0_19-LBB0_2)>>2
                                        ; -- End function
	.comm	_PPSMC_MSG_GetAverageGfxclkActualFrequency,4,2 ; @PPSMC_MSG_GetAverageGfxclkActualFrequency
	.comm	_PPSMC_MSG_GetCurrentUclkIndex,4,2 ; @PPSMC_MSG_GetCurrentUclkIndex
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PPSMC_MSG_GetAverageGfxActivity,4,2 ; @PPSMC_MSG_GetAverageGfxActivity
	.comm	_PPSMC_MSG_GetTemperatureHotspot,4,2 ; @PPSMC_MSG_GetTemperatureHotspot
	.comm	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES,4,2 ; @PP_TEMPERATURE_UNITS_PER_CENTIGRADES
	.comm	_PPSMC_MSG_GetTemperatureHBM,4,2 ; @PPSMC_MSG_GetTemperatureHBM
	.comm	_SMUIO,4,2                      ; @SMUIO
	.comm	_mmSMUSVI0_PLANE0_CURRENTVID,4,2 ; @mmSMUSVI0_PLANE0_CURRENTVID
	.comm	_SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID_MASK,4,2 ; @SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID_MASK
	.comm	_SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID__SHIFT,4,2 ; @SMUSVI0_PLANE0_CURRENTVID__CURRENT_SVI0_PLANE0_VID__SHIFT
	.no_dead_strip	_vega10_read_sensor
.subsections_via_symbols
