	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu_v11_0_set_thermal_range
_smu_v11_0_set_thermal_range:           ## @smu_v11_0_set_thermal_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	%rsi, %rax
	movq	%rsi, %rbx
	shrq	$32, %rbx
	movq	_SMU_THERMAL_MINIMUM_ALERT_TEMP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_SMU_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPCREL(%rip), %r15
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	(%r15)
	movl	%eax, %esi
	callq	_max
	movl	%eax, %r14d
	movq	_SMU_THERMAL_MAXIMUM_ALERT_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %eax
	cltd
	idivl	(%r15)
	movl	%eax, %esi
	callq	_min
	cmpl	%eax, %r14d
	jle	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_3
LBB0_2:
	movl	%eax, %ebx
	movq	_THM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmTHM_THERMAL_INT_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	_THM_THERMAL_INT_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_MAX_IH_CREDIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$5, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movq	_THERM_IH_HW_ENA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movq	_THERM_INTH_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movq	_THERM_INTL_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movq	_DIG_THERM_INTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movzbl	%bl, %ecx
	movl	%eax, %edi
	callq	_REG_SET_FIELD
	movl	(%r12), %esi
	movq	_DIG_THERM_INTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movzbl	%r14b, %ecx
	movl	%eax, %edi
	callq	_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
	movl	(%r13), %edx
	xorl	%esi, %esi
	callq	_WREG32_SOC15
LBB0_3:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMU_THERMAL_MINIMUM_ALERT_TEMP,4,2 ## @SMU_THERMAL_MINIMUM_ALERT_TEMP
	.comm	_SMU_THERMAL_MAXIMUM_ALERT_TEMP,4,2 ## @SMU_THERMAL_MAXIMUM_ALERT_TEMP
	.comm	_SMU_TEMPERATURE_UNITS_PER_CENTIGRADES,4,2 ## @SMU_TEMPERATURE_UNITS_PER_CENTIGRADES
	.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	_THERM_INTH_MASK,4,2            ## @THERM_INTH_MASK
	.comm	_THERM_INTL_MASK,4,2            ## @THERM_INTL_MASK
	.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	_smu_v11_0_set_thermal_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu_v11_0_set_thermal_range
_smu_v11_0_set_thermal_range:           ; @smu_v11_0_set_thermal_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, _SMU_THERMAL_MINIMUM_ALERT_TEMP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMU_THERMAL_MINIMUM_ALERT_TEMP@GOTPAGEOFF]
	lsr	x20, x1, #32
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x21, _SMU_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGE
Lloh4:
	ldr	x21, [x21, _SMU_TEMPERATURE_UNITS_PER_CENTIGRADES@GOTPAGEOFF]
	ldr	w8, [x21]
	sdiv	w1, w1, w8
	bl	_max
	mov	x19, x0
Lloh5:
	adrp	x8, _SMU_THERMAL_MAXIMUM_ALERT_TEMP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SMU_THERMAL_MAXIMUM_ALERT_TEMP@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w8, [x21]
	sdiv	w1, w20, w8
	bl	_min
	cmp	w19, w0
	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:
	mov	x20, x0
Lloh11:
	adrp	x21, _THM@GOTPAGE
Lloh12:
	ldr	x21, [x21, _THM@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh13:
	adrp	x22, _mmTHM_THERMAL_INT_CTRL@GOTPAGE
Lloh14:
	ldr	x22, [x22, _mmTHM_THERMAL_INT_CTRL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #0
	bl	_RREG32_SOC15
Lloh15:
	adrp	x23, _THM_THERMAL_INT_CTRL@GOTPAGE
Lloh16:
	ldr	x23, [x23, _THM_THERMAL_INT_CTRL@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh17:
	adrp	x8, _MAX_IH_CREDIT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAX_IH_CREDIT@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	w3, #5
	bl	_REG_SET_FIELD
	ldr	w1, [x23]
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	_REG_SET_FIELD
	ldr	w1, [x23]
Lloh23:
	adrp	x8, _THERM_INTH_MASK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _THERM_INTH_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_REG_SET_FIELD
	ldr	w1, [x23]
Lloh26:
	adrp	x8, _THERM_INTL_MASK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _THERM_INTL_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_REG_SET_FIELD
	ldr	w1, [x23]
Lloh29:
	adrp	x8, _DIG_THERM_INTH@GOTPAGE
Lloh30:
	ldr	x8, [x8, _DIG_THERM_INTH@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	and	w3, w20, #0xff
	bl	_REG_SET_FIELD
	ldr	w1, [x23]
Lloh32:
	adrp	x8, _DIG_THERM_INTL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _DIG_THERM_INTL@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	and	w3, w19, #0xff
	bl	_REG_SET_FIELD
Lloh35:
	adrp	x8, _THM_THERMAL_INT_CTRL__THERM_TRIGGER_MASK_MASK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _THM_THERMAL_INT_CTRL__THERM_TRIGGER_MASK_MASK@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	bic	w3, w0, w8
	ldr	w0, [x21]
	ldr	w2, [x22]
	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	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.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	_SMU_THERMAL_MINIMUM_ALERT_TEMP,4,2 ; @SMU_THERMAL_MINIMUM_ALERT_TEMP
	.comm	_SMU_THERMAL_MAXIMUM_ALERT_TEMP,4,2 ; @SMU_THERMAL_MAXIMUM_ALERT_TEMP
	.comm	_SMU_TEMPERATURE_UNITS_PER_CENTIGRADES,4,2 ; @SMU_TEMPERATURE_UNITS_PER_CENTIGRADES
	.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	_THERM_INTH_MASK,4,2            ; @THERM_INTH_MASK
	.comm	_THERM_INTL_MASK,4,2            ; @THERM_INTL_MASK
	.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	_smu_v11_0_set_thermal_range
.subsections_via_symbols
