	.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	%rdi, %r15
	movq	_ixCG_THERMAL_INT_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_RREG32_SMC
	movq	_CG_THERMAL_INT_CTRL__DIG_THERM_INTH_MASK@GOTPCREL(%rip), %rcx
	movq	_CG_THERMAL_INT_CTRL__DIG_THERM_INTL_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	movslq	%r12d, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rsi
	sarq	$38, %rsi
	shrq	$63, %rcx
	leal	(%rsi,%rcx), %edi
	addl	$49, %edi
	movq	_CG_THERMAL_INT_CTRL__DIG_THERM_INTH__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edi
	movq	_CG_THERMAL_INT_CTRL__DIG_THERM_INTL__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%ebx, %esi
	imulq	$274877907, %rsi, %rsi          ## imm = 0x10624DD3
	shrq	$38, %rsi
	addl	$49, %esi
	shll	%cl, %esi
	andl	%eax, %edx
	orl	%edx, %edi
	orl	%edi, %esi
	movl	(%r13), %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_WREG32_SMC
	movl	%ebx, (%r15)
	movl	%r12d, 4(%r15)
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	_ixCG_THERMAL_INT_CTRL,4,2      ## @ixCG_THERMAL_INT_CTRL
	.comm	_CG_THERMAL_INT_CTRL__DIG_THERM_INTH_MASK,4,2 ## @CG_THERMAL_INT_CTRL__DIG_THERM_INTH_MASK
	.comm	_CG_THERMAL_INT_CTRL__DIG_THERM_INTL_MASK,4,2 ## @CG_THERMAL_INT_CTRL__DIG_THERM_INTL_MASK
	.comm	_CG_THERMAL_INT_CTRL__DIG_THERM_INTH__SHIFT,4,2 ## @CG_THERMAL_INT_CTRL__DIG_THERM_INTH__SHIFT
	.comm	_CG_THERMAL_INT_CTRL__DIG_THERM_INTL__SHIFT,4,2 ## @CG_THERMAL_INT_CTRL__DIG_THERM_INTL__SHIFT
	.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	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	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	x22, _ixCG_THERMAL_INT_CTRL@GOTPAGE
Lloh6:
	ldr	x22, [x22, _ixCG_THERMAL_INT_CTRL@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_RREG32_SMC
Lloh7:
	adrp	x8, _CG_THERMAL_INT_CTRL__DIG_THERM_INTH_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CG_THERMAL_INT_CTRL__DIG_THERM_INTH_MASK@GOTPAGEOFF]
Lloh9:
	adrp	x9, _CG_THERMAL_INT_CTRL__DIG_THERM_INTL_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CG_THERMAL_INT_CTRL__DIG_THERM_INTL_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w0, w8
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x10, w21, w9
	lsr	x11, x10, #63
	asr	x10, x10, #38
	add	w10, w10, w11
	add	w10, w10, #49
Lloh13:
	adrp	x11, _CG_THERMAL_INT_CTRL__DIG_THERM_INTH__SHIFT@GOTPAGE
Lloh14:
	ldr	x11, [x11, _CG_THERMAL_INT_CTRL__DIG_THERM_INTH__SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
	lsl	w10, w10, w11
	umull	x9, w19, w9
	lsr	x9, x9, #38
Lloh16:
	adrp	x11, _CG_THERMAL_INT_CTRL__DIG_THERM_INTL__SHIFT@GOTPAGE
Lloh17:
	ldr	x11, [x11, _CG_THERMAL_INT_CTRL__DIG_THERM_INTL__SHIFT@GOTPAGEOFF]
	add	w9, w9, #49
Lloh18:
	ldr	w11, [x11]
	lsl	w9, w9, w11
	orr	w8, w8, w10
	orr	w1, w8, w9
	ldr	w0, [x22]
	bl	_WREG32_SMC
	mov	w0, #0
	stp	w19, w21, [x20]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.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	_ixCG_THERMAL_INT_CTRL,4,2      ; @ixCG_THERMAL_INT_CTRL
	.comm	_CG_THERMAL_INT_CTRL__DIG_THERM_INTH_MASK,4,2 ; @CG_THERMAL_INT_CTRL__DIG_THERM_INTH_MASK
	.comm	_CG_THERMAL_INT_CTRL__DIG_THERM_INTL_MASK,4,2 ; @CG_THERMAL_INT_CTRL__DIG_THERM_INTL_MASK
	.comm	_CG_THERMAL_INT_CTRL__DIG_THERM_INTH__SHIFT,4,2 ; @CG_THERMAL_INT_CTRL__DIG_THERM_INTH__SHIFT
	.comm	_CG_THERMAL_INT_CTRL__DIG_THERM_INTL__SHIFT,4,2 ; @CG_THERMAL_INT_CTRL__DIG_THERM_INTL__SHIFT
	.no_dead_strip	_kv_set_thermal_temperature_range
.subsections_via_symbols
