	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega20_thermal_set_temperature_range
_vega20_thermal_set_temperature_range:  ## @vega20_thermal_set_temperature_range
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_VEGA20_THERMAL_MINIMUM_ALERT_TEMP@GOTPCREL(%rip), %rax
	movq	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movl	(%rax), %r15d
	imull	%ebx, %r15d
	movq	_VEGA20_THERMAL_MAXIMUM_ALERT_TEMP@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	movl	(%rsi), %eax
	movl	4(%rsi), %ecx
	cmpl	%eax, %r15d
	cmovlel	%eax, %r15d
	cmpl	%ecx, %ebx
	cmovgel	%ecx, %ebx
	cmpl	%ebx, %r15d
	jle	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	movq	_THM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmTHM_THERMAL_INT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	_THM_THERMAL_INT_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_MAX_IH_CREDIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$5, %ecx
	callq	_CGS_REG_SET_FIELD
	movl	(%r13), %esi
	movq	_THERM_IH_HW_ENA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_CGS_REG_SET_FIELD
	movl	%eax, %edi
	movl	(%r13), %esi
	movq	_DIG_THERM_INTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %eax
	cltd
	idivl	(%r12)
	movl	%ecx, %edx
	movl	%eax, %ecx
	callq	_CGS_REG_SET_FIELD
	movl	%eax, %edi
	movl	(%r13), %esi
	movq	_DIG_THERM_INTL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %eax
	cltd
	idivl	(%r12)
	movl	%ecx, %edx
	movl	%eax, %ecx
	callq	_CGS_REG_SET_FIELD
	movq	_THM_THERMAL_INT_CTRL__THERM_TRIGGER_MASK_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movq	_THM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmTHM_THERMAL_INT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_WREG32_SOC15
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VEGA20_THERMAL_MINIMUM_ALERT_TEMP,4,2 ## @VEGA20_THERMAL_MINIMUM_ALERT_TEMP
	.comm	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES,4,2 ## @PP_TEMPERATURE_UNITS_PER_CENTIGRADES
	.comm	_VEGA20_THERMAL_MAXIMUM_ALERT_TEMP,4,2 ## @VEGA20_THERMAL_MAXIMUM_ALERT_TEMP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_THM,4,2                        ## @THM
	.comm	_mmTHM_THERMAL_INT_CTRL,4,2     ## @mmTHM_THERMAL_INT_CTRL
	.comm	_THM_THERMAL_INT_CTRL,4,2       ## @THM_THERMAL_INT_CTRL
	.comm	_MAX_IH_CREDIT,4,2              ## @MAX_IH_CREDIT
	.comm	_THERM_IH_HW_ENA,4,2            ## @THERM_IH_HW_ENA
	.comm	_DIG_THERM_INTH,4,2             ## @DIG_THERM_INTH
	.comm	_DIG_THERM_INTL,4,2             ## @DIG_THERM_INTL
	.comm	_THM_THERMAL_INT_CTRL__THERM_TRIGGER_MASK_MASK,4,2 ## @THM_THERMAL_INT_CTRL__THERM_TRIGGER_MASK_MASK
	.no_dead_strip	_vega20_thermal_set_temperature_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega20_thermal_set_temperature_range
_vega20_thermal_set_temperature_range:  ; @vega20_thermal_set_temperature_range
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, _VEGA20_THERMAL_MINIMUM_ALERT_TEMP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VEGA20_THERMAL_MINIMUM_ALERT_TEMP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x19, _PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGE
Lloh4:
	ldr	x19, [x19, _PP_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGEOFF]
	ldr	w9, [x19]
	mul	w8, w9, w8
Lloh5:
	adrp	x10, _VEGA20_THERMAL_MAXIMUM_ALERT_TEMP@GOTPAGE
Lloh6:
	ldr	x10, [x10, _VEGA20_THERMAL_MAXIMUM_ALERT_TEMP@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	mul	w9, w10, w9
	ldp	w10, w11, [x1]
	cmp	w8, w10
	csel	w22, w8, w10, gt
	cmp	w9, w11
	csel	w23, w9, w11, lt
	cmp	w22, w23
	b.le	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
Lloh11:
	adrp	x20, _THM@GOTPAGE
Lloh12:
	ldr	x20, [x20, _THM@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh13:
	adrp	x21, _mmTHM_THERMAL_INT_CTRL@GOTPAGE
Lloh14:
	ldr	x21, [x21, _mmTHM_THERMAL_INT_CTRL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #0
	bl	_RREG32_SOC15
Lloh15:
	adrp	x24, _THM_THERMAL_INT_CTRL@GOTPAGE
Lloh16:
	ldr	x24, [x24, _THM_THERMAL_INT_CTRL@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh17:
	adrp	x8, _MAX_IH_CREDIT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAX_IH_CREDIT@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	w3, #5
	bl	_CGS_REG_SET_FIELD
	ldr	w1, [x24]
Lloh20:
	adrp	x8, _THERM_IH_HW_ENA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _THERM_IH_HW_ENA@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_CGS_REG_SET_FIELD
	ldr	w1, [x24]
Lloh23:
	adrp	x8, _DIG_THERM_INTH@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DIG_THERM_INTH@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	ldr	w8, [x19]
	sdiv	w3, w23, w8
	bl	_CGS_REG_SET_FIELD
	ldr	w1, [x24]
Lloh26:
	adrp	x8, _DIG_THERM_INTL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DIG_THERM_INTL@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	ldr	w8, [x19]
	sdiv	w3, w22, w8
	bl	_CGS_REG_SET_FIELD
Lloh29:
	adrp	x8, _THM_THERMAL_INT_CTRL__THERM_TRIGGER_MASK_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _THM_THERMAL_INT_CTRL__THERM_TRIGGER_MASK_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	bic	w3, w0, w8
	ldr	w0, [x20]
	ldr	w2, [x21]
	mov	w1, #0
	bl	_WREG32_SOC15
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_VEGA20_THERMAL_MINIMUM_ALERT_TEMP,4,2 ; @VEGA20_THERMAL_MINIMUM_ALERT_TEMP
	.comm	_PP_TEMPERATURE_UNITS_PER_CENTIGRADES,4,2 ; @PP_TEMPERATURE_UNITS_PER_CENTIGRADES
	.comm	_VEGA20_THERMAL_MAXIMUM_ALERT_TEMP,4,2 ; @VEGA20_THERMAL_MAXIMUM_ALERT_TEMP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_THM,4,2                        ; @THM
	.comm	_mmTHM_THERMAL_INT_CTRL,4,2     ; @mmTHM_THERMAL_INT_CTRL
	.comm	_THM_THERMAL_INT_CTRL,4,2       ; @THM_THERMAL_INT_CTRL
	.comm	_MAX_IH_CREDIT,4,2              ; @MAX_IH_CREDIT
	.comm	_THERM_IH_HW_ENA,4,2            ; @THERM_IH_HW_ENA
	.comm	_DIG_THERM_INTH,4,2             ; @DIG_THERM_INTH
	.comm	_DIG_THERM_INTL,4,2             ; @DIG_THERM_INTL
	.comm	_THM_THERMAL_INT_CTRL__THERM_TRIGGER_MASK_MASK,4,2 ; @THM_THERMAL_INT_CTRL__THERM_TRIGGER_MASK_MASK
	.no_dead_strip	_vega20_thermal_set_temperature_range
.subsections_via_symbols
