	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kv_set_thermal_temperature_range
_kv_set_thermal_temperature_range:      ## @kv_set_thermal_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
	movl	%esi, %ebx
	xorl	%r14d, %r14d
	testl	%esi, %esi
	cmovlel	%r14d, %ebx
	cmpl	$255000, %edx                   ## imm = 0x3E418
	movl	$255000, %r12d                  ## imm = 0x3E418
	cmovll	%edx, %r12d
	cmpl	%ebx, %r12d
	jge	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	movq	_CG_THERMAL_INT_CTRL@GOTPCREL(%rip), %rax
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	(%rax), %edi
	callq	_RREG32_SMC
	movq	_DIG_THERM_INTH_MASK@GOTPCREL(%rip), %rcx
	movq	_DIG_THERM_INTL_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r15d
	orl	(%rcx), %r15d
	notl	%r15d
	andl	%eax, %r15d
	movslq	%r12d, %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	sarq	$38, %rcx
	shrq	$63, %rax
	leal	(%rcx,%rax), %edi
	addl	$49, %edi
	callq	_DIG_THERM_INTH
	movl	%eax, %r13d
	movl	%ebx, %eax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	shrq	$38, %rdi
	addl	$49, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_DIG_THERM_INTL
	orl	%eax, %r13d
	orl	%r15d, %r13d
	movq	_CG_THERMAL_INT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	callq	_WREG32_SMC
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	movl	%r12d, 4(%rax)
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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid thermal range: %d - %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CG_THERMAL_INT_CTRL,4,2        ## @CG_THERMAL_INT_CTRL
	.comm	_DIG_THERM_INTH_MASK,4,2        ## @DIG_THERM_INTH_MASK
	.comm	_DIG_THERM_INTL_MASK,4,2        ## @DIG_THERM_INTL_MASK
	.no_dead_strip	_kv_set_thermal_temperature_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kv_set_thermal_temperature_range
_kv_set_thermal_temperature_range:      ; @kv_set_thermal_temperature_range
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cmp	w1, #0
	csel	w19, w1, wzr, gt
	mov	w8, #58392
	movk	w8, #3, lsl #16
	cmp	w2, w8
	csel	w21, w2, w8, lt
	cmp	w21, w19
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x21
	bl	_DRM_ERROR
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	x20, x0
Lloh5:
	adrp	x23, _CG_THERMAL_INT_CTRL@GOTPAGE
Lloh6:
	ldr	x23, [x23, _CG_THERMAL_INT_CTRL@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_RREG32_SMC
Lloh7:
	adrp	x8, _DIG_THERM_INTH_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DIG_THERM_INTH_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _DIG_THERM_INTL_MASK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DIG_THERM_INTL_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w24, w0, w8
	mov	w25, #19923
	movk	w25, #4194, lsl #16
	smull	x8, w21, w25
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	add	w0, w8, #49
	bl	_DIG_THERM_INTH
	mov	x22, x0
	umull	x8, w19, w25
	lsr	x8, x8, #38
	add	w0, w8, #49
	bl	_DIG_THERM_INTL
	orr	w8, w0, w22
	orr	w1, w8, w24
	ldr	w0, [x23]
	bl	_WREG32_SMC
	mov	w0, #0
	stp	w19, w21, [x20]
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid thermal range: %d - %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CG_THERMAL_INT_CTRL,4,2        ; @CG_THERMAL_INT_CTRL
	.comm	_DIG_THERM_INTH_MASK,4,2        ; @DIG_THERM_INTH_MASK
	.comm	_DIG_THERM_INTL_MASK,4,2        ; @DIG_THERM_INTL_MASK
	.no_dead_strip	_kv_set_thermal_temperature_range
.subsections_via_symbols
