	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega12_read_sensor
_vega12_read_sensor:                    ## @vega12_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rcx, %r14
                                        ## kill: def $esi killed $esi def $rsi
	leal	-128(%rsi), %ecx
	cmpl	$10, %ecx
	ja	LBB0_3
## %bb.1:
	movq	%rdx, %rbx
	movq	(%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	%rbx, %rdx
	callq	_vega12_get_current_activity_percent
	testl	%eax, %eax
	jne	LBB0_17
	jmp	LBB0_15
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_4:
	xorl	%ecx, %ecx
	cmpl	$0, (%rax)
	jmp	LBB0_6
LBB0_5:
	xorl	%ecx, %ecx
	cmpl	$0, 4(%rax)
LBB0_6:
	sete	%cl
	movl	%ecx, (%rbx)
	jmp	LBB0_15
LBB0_7:
	leaq	-24(%rbp), %rsi
	callq	_vega12_get_metrics_table
	testl	%eax, %eax
	jne	LBB0_17
## %bb.8:
	movq	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	-20(%rbp), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_15
LBB0_9:
	leaq	-24(%rbp), %rsi
	callq	_vega12_get_metrics_table
	testl	%eax, %eax
	jne	LBB0_17
## %bb.10:
	movq	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	-24(%rbp), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_15
LBB0_11:
	callq	_vega12_thermal_get_temperature
	movl	%eax, (%rbx)
	jmp	LBB0_15
LBB0_12:
	movq	%rbx, %rsi
	callq	_vega12_get_gpu_power
	testl	%eax, %eax
	jne	LBB0_17
	jmp	LBB0_15
LBB0_13:
	movq	%rbx, %rsi
	callq	_vega12_get_current_gfx_clk_freq
	testl	%eax, %eax
	jne	LBB0_17
	jmp	LBB0_15
LBB0_14:
	movq	%rbx, %rsi
	callq	_vega12_get_current_mclk_freq
	testl	%eax, %eax
	jne	LBB0_17
LBB0_15:
	movl	$4, (%r14)
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_18:
	movq	%rbx, %rsi
	callq	_vega12_get_enabled_smc_features
	testl	%eax, %eax
	jne	LBB0_17
## %bb.19:
	movl	$8, (%r14)
	jmp	LBB0_16
	.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_7, LBB0_7-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_9, LBB0_9-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_14, LBB0_14-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_7
	.long	L0_0_set_2
	.long	L0_0_set_9
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_2
	.long	L0_0_set_13
	.long	L0_0_set_14
	.long	L0_0_set_18
	.end_data_region
                                        ## -- End function
	.comm	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES,4,2 ## @PP_TEMPERATURE_UNITS_PER_CENTIGRADES
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vega12_read_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega12_read_sensor
_vega12_read_sensor:                    ; @vega12_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, #10
	b.hi	LBB0_3
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	ldr	x8, [x0]
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	_vega12_get_current_activity_percent
	cbnz	w0, LBB0_18
	b	LBB0_16
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_4:
	mov	w0, #0
	ldr	w8, [x8]
	b	LBB0_6
LBB0_5:
	mov	w0, #0
	ldr	w8, [x8, #4]
LBB0_6:
	cmp	w8, #0
	cset	w8, eq
	str	w8, [x20]
	b	LBB0_16
LBB0_7:
	add	x1, sp, #8
	bl	_vega12_get_metrics_table
	cbnz	w0, LBB0_18
; %bb.8:
Lloh5:
	adrp	x8, _PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGEOFF]
	ldr	w9, [sp, #12]
	b	LBB0_11
LBB0_9:
	add	x1, sp, #8
	bl	_vega12_get_metrics_table
	cbnz	w0, LBB0_18
; %bb.10:
Lloh7:
	adrp	x8, _PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGEOFF]
	ldr	w9, [sp, #8]
LBB0_11:
	ldr	w8, [x8]
	mul	w8, w8, w9
	str	w8, [x20]
	b	LBB0_16
LBB0_12:
	bl	_vega12_thermal_get_temperature
	mov	x8, x0
	mov	w0, #0
	str	w8, [x20]
	b	LBB0_16
LBB0_13:
	mov	x1, x20
	bl	_vega12_get_gpu_power
	cbnz	w0, LBB0_18
	b	LBB0_16
LBB0_14:
	mov	x1, x20
	bl	_vega12_get_current_gfx_clk_freq
	cbnz	w0, LBB0_18
	b	LBB0_16
LBB0_15:
	mov	x1, x20
	bl	_vega12_get_current_mclk_freq
	cbnz	w0, LBB0_18
LBB0_16:
	mov	w8, #4
LBB0_17:
	str	w8, [x19]
LBB0_18:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_19:
	mov	x1, x20
	bl	_vega12_get_enabled_smc_features
	cbnz	w0, LBB0_18
; %bb.20:
	mov	w8, #8
	b	LBB0_17
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_15-LBB0_2)>>2
	.byte	(LBB0_19-LBB0_2)>>2
                                        ; -- End function
	.comm	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES,4,2 ; @PP_TEMPERATURE_UNITS_PER_CENTIGRADES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vega12_read_sensor
.subsections_via_symbols
