	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega20_read_sensor
_vega20_read_sensor:                    ## @vega20_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
                                        ## kill: def $esi killed $esi def $rsi
	leal	-128(%rsi), %ecx
	cmpl	$11, %ecx
	ja	LBB0_3
## %bb.1:
	movq	%rdx, %r15
	movq	8(%rdi), %rax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_2:
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r15, %rdx
	callq	_vega20_get_current_activity_percent
	jmp	LBB0_15
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_4:
	movq	_SMUIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmSMUSVI0_TEL_PLANE0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	_SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movl	%eax, %edi
	callq	_convert_to_vddc
	movl	%eax, (%r15)
	jmp	LBB0_23
LBB0_5:
	xorl	%ecx, %ecx
	cmpl	$0, (%rax)
	jmp	LBB0_7
LBB0_6:
	xorl	%ecx, %ecx
	cmpl	$0, 4(%rax)
LBB0_7:
	sete	%cl
	movl	%ecx, (%r15)
	jmp	LBB0_21
LBB0_8:
	leaq	-40(%rbp), %rsi
	callq	_vega20_get_metrics_table
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.9:
	movq	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	-32(%rbp), %eax
	jmp	LBB0_20
LBB0_10:
	callq	_vega20_thermal_get_temperature
	jmp	LBB0_20
LBB0_11:
	movl	$16, (%r14)
	movq	%r15, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vega20_get_gpu_power           ## TAILCALL
LBB0_12:
	leaq	-40(%rbp), %rsi
	callq	_vega20_get_metrics_table
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.13:
	imull	$100, -40(%rbp), %eax
	jmp	LBB0_20
LBB0_14:
	movq	_PPCLK_UCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_vega20_get_current_clk_freq
LBB0_15:
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
	jmp	LBB0_21
LBB0_16:
	movq	%r15, %rsi
	callq	_vega20_get_enabled_smc_features
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.17:
	movl	$8, (%r14)
	jmp	LBB0_22
LBB0_18:
	leaq	-40(%rbp), %rsi
	callq	_vega20_get_metrics_table
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.19:
	movq	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	-36(%rbp), %eax
LBB0_20:
	movl	%eax, (%r15)
LBB0_21:
	movl	$4, (%r14)
LBB0_22:
	xorl	%ebx, %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_2, LBB0_2-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_14, LBB0_14-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_8
	.long	L0_0_set_2
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_2
	.long	L0_0_set_12
	.long	L0_0_set_14
	.long	L0_0_set_16
	.long	L0_0_set_18
	.end_data_region
                                        ## -- End function
	.comm	_PPCLK_UCLK,4,2                 ## @PPCLK_UCLK
	.comm	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES,4,2 ## @PP_TEMPERATURE_UNITS_PER_CENTIGRADES
	.comm	_SMUIO,4,2                      ## @SMUIO
	.comm	_mmSMUSVI0_TEL_PLANE0,4,2       ## @mmSMUSVI0_TEL_PLANE0
	.comm	_SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR_MASK,4,2 ## @SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR_MASK
	.comm	_SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR__SHIFT,4,2 ## @SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR__SHIFT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vega20_read_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega20_read_sensor
_vega20_read_sensor:                    ; @vega20_read_sensor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	sub	w9, w1, #128
	cmp	w9, #11
	b.hi	LBB0_3
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x10, lJTI0_0@PAGE
Lloh1:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
	mov	x2, x20
	bl	_vega20_get_current_activity_percent
	cbnz	w0, LBB0_24
	b	LBB0_22
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_24
LBB0_4:
Lloh5:
	adrp	x8, _SMUIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SMUIO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _mmSMUSVI0_TEL_PLANE0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mmSMUSVI0_TEL_PLANE0@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_RREG32_SOC15
Lloh11:
	adrp	x8, _SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh14:
	adrp	x9, _SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR__SHIFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR__SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	asr	w0, w8, w9
	bl	_convert_to_vddc
	mov	x8, x0
	mov	w0, #0
	str	w8, [x20]
	b	LBB0_24
LBB0_5:
	mov	w0, #0
	ldr	w8, [x8]
	b	LBB0_7
LBB0_6:
	mov	w0, #0
	ldr	w8, [x8, #4]
LBB0_7:
	cmp	w8, #0
	cset	w8, eq
	b	LBB0_21
LBB0_8:
	mov	x1, sp
	bl	_vega20_get_metrics_table
	cbnz	w0, LBB0_24
; %bb.9:
Lloh17:
	adrp	x8, _PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGEOFF]
	ldr	w9, [sp, #8]
	b	LBB0_19
LBB0_10:
	bl	_vega20_thermal_get_temperature
	mov	x8, x0
	mov	w0, #0
	b	LBB0_21
LBB0_11:
	mov	w8, #16
	str	w8, [x19]
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_vega20_get_gpu_power
LBB0_12:
	mov	x1, sp
	bl	_vega20_get_metrics_table
	cbnz	w0, LBB0_24
; %bb.13:
	ldr	w8, [sp]
	mov	w9, #100
	b	LBB0_20
LBB0_14:
Lloh19:
	adrp	x8, _PPCLK_UCLK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PPCLK_UCLK@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_vega20_get_current_clk_freq
	cbnz	w0, LBB0_24
	b	LBB0_22
LBB0_15:
	mov	x1, x20
	bl	_vega20_get_enabled_smc_features
	cbnz	w0, LBB0_24
; %bb.16:
	mov	w8, #8
	b	LBB0_23
LBB0_17:
	mov	x1, sp
	bl	_vega20_get_metrics_table
	cbnz	w0, LBB0_24
; %bb.18:
Lloh22:
	adrp	x8, _PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGEOFF]
	ldr	w9, [sp, #4]
LBB0_19:
	ldr	w8, [x8]
LBB0_20:
	mul	w8, w8, w9
LBB0_21:
	str	w8, [x20]
LBB0_22:
	mov	w8, #4
LBB0_23:
	str	w8, [x19]
LBB0_24:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_15-LBB0_2)>>2
	.byte	(LBB0_17-LBB0_2)>>2
                                        ; -- End function
	.comm	_PPCLK_UCLK,4,2                 ; @PPCLK_UCLK
	.comm	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES,4,2 ; @PP_TEMPERATURE_UNITS_PER_CENTIGRADES
	.comm	_SMUIO,4,2                      ; @SMUIO
	.comm	_mmSMUSVI0_TEL_PLANE0,4,2       ; @mmSMUSVI0_TEL_PLANE0
	.comm	_SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR_MASK,4,2 ; @SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR_MASK
	.comm	_SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR__SHIFT,4,2 ; @SMUSVI0_TEL_PLANE0__SVI0_PLANE0_VDDCOR__SHIFT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vega20_read_sensor
.subsections_via_symbols
