	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function therm_store
_therm_store:                           ## @therm_store
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r15
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	-40(%rbp), %rdi
	movl	$-64000, %esi                   ## imm = 0xFFFF0600
	movl	$127937, %edx                   ## imm = 0x1F3C1
	callq	_clamp_val
	movq	%rax, -40(%rbp)
	movq	%r15, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	-40(%rbp), %rsi
	movq	_STTS751_REG_TLIM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_stts751_set_temp_reg8
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r12d, %r14d
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_3:
	movq	24(%r15), %rdi
	movq	-40(%rbp), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	-40(%rbp), %rax
	movq	%rax, %rcx
	subq	(%r15), %rcx
	addq	%rcx, 16(%r15)
	movq	%rax, (%r15)
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_5:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_STTS751_REG_TLIM,4,2           ## @STTS751_REG_TLIM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setting therm %ld"

	.no_dead_strip	_therm_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function therm_store
_therm_store:                           ; @therm_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x3
	mov	x21, x2
	bl	_dev_get_drvdata
	mov	x20, x0
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #10
	bl	_kstrtol
	tbnz	x0, #63, LBB0_3
; %bb.1:
	ldr	x0, [sp, #8]
	mov	w1, #-64000
	mov	w2, #62401
	movk	w2, #1, lsl #16
	bl	_clamp_val
	str	x0, [sp, #8]
	add	x21, x20, #8
	mov	x0, x21
	bl	_mutex_lock
	ldr	x1, [sp, #8]
Lloh0:
	adrp	x8, _STTS751_REG_TLIM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STTS751_REG_TLIM@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_stts751_set_temp_reg8
	cbz	w0, LBB0_4
; %bb.2:
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	mov	x19, x22
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_5
LBB0_4:
	ldr	x0, [x20, #24]
	ldr	x2, [sp, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [sp, #8]
	ldr	x9, [x20]
	ldr	x10, [x20, #16]
	sub	x9, x8, x9
	add	x9, x9, x10
	str	x9, [x20, #16]
	str	x8, [x20]
	mov	x0, x21
	bl	_mutex_unlock
LBB0_5:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_STTS751_REG_TLIM,4,2           ; @STTS751_REG_TLIM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setting therm %ld"

	.no_dead_strip	_therm_store
.subsections_via_symbols
