	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_auto_temp
_set_auto_temp:                         ## @set_auto_temp
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr_2
	movslq	(%rax), %rbx
	movslq	4(%rax), %r14
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testq	%rax, %rax
	js	LBB0_3
## %bb.1:
	movq	-48(%rbp), %rax
	cmpq	$-128000, %rax                  ## imm = 0xFFFE0C00
	jl	LBB0_3
## %bb.2:
	cmpq	$127001, %rax                   ## imm = 0x1F019
	jge	LBB0_3
## %bb.4:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	callq	_has_newer_autopwm
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	testl	%r14d, %r14d
	jne	LBB0_7
## %bb.6:
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movq	%rbx, %r14
	movl	4(%rax), %ebx
	movq	-48(%rbp), %rdi
	callq	_TEMP_TO_REG
	subl	%eax, %ebx
	movl	%ebx, %edi
	movq	%r14, %rbx
	xorl	%esi, %esi
	movl	$31, %edx
	callq	_clamp_val
	movq	(%r13), %rcx
	movq	(%rcx,%r14,8), %rcx
	movl	$224, %r15d
	andl	(%rcx), %r15d
	orl	%eax, %r15d
	movl	%r15d, (%rcx)
	movl	$5, %r14d
	jmp	LBB0_8
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
	jmp	LBB0_9
LBB0_7:
	movq	-48(%rbp), %rdi
	callq	_TEMP_TO_REG
	movl	%eax, %r15d
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movl	%r15d, (%rax,%r14,4)
	movq	%r13, %rdi
	callq	_has_newer_autopwm
	cmpq	$1, %rax
	adcl	$-1, %r14d
LBB0_8:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_IT87_REG_AUTO_TEMP
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_it87_write_value
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.no_dead_strip	_set_auto_temp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_auto_temp
_set_auto_temp:                         ; @set_auto_temp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x21, x1
	bl	_dev_get_drvdata
	mov	x20, x0
	mov	x0, x21
	bl	_to_sensor_dev_attr_2
	ldpsw	x21, x24, [x0]
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtol
	tbnz	x0, #63, LBB0_5
; %bb.1:
	ldr	x8, [sp, #8]
	mov	x9, #-62464
	movk	x9, #65534, lsl #16
	cmp	x8, x9
	mov	w9, #61465
	movk	w9, #1, lsl #16
	ccmp	x8, x9, #0, ge
	b.ge	LBB0_5
; %bb.2:
	add	x22, x20, #8
	mov	x0, x22
	bl	_mutex_lock
	mov	x0, x20
	bl	_has_newer_autopwm
	cbz	x0, LBB0_6
; %bb.3:
	cbnz	w24, LBB0_6
; %bb.4:
	ldr	x8, [x20]
	lsl	x23, x21, #3
	ldr	x8, [x8, x23]
	ldr	w24, [x8, #4]
	ldr	x0, [sp, #8]
	bl	_TEMP_TO_REG
	sub	w0, w24, w0
	mov	w1, #0
	mov	w2, #31
	bl	_clamp_val
	ldr	x8, [x20]
	ldr	x8, [x8, x23]
	ldr	w9, [x8]
	and	w9, w9, #0xe0
	orr	w23, w9, w0
	str	w23, [x8]
	mov	w1, #5
	b	LBB0_7
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_8
LBB0_6:
	ldr	x0, [sp, #8]
	bl	_TEMP_TO_REG
	mov	x23, x0
	ldr	x8, [x20]
	ldr	x8, [x8, x21, lsl #3]
	str	w0, [x8, x24, lsl #2]
	mov	x0, x20
	bl	_has_newer_autopwm
	cmp	x0, #0
	cset	w8, ne
	sub	w1, w24, w8
LBB0_7:
	mov	x0, x21
	bl	_IT87_REG_AUTO_TEMP
	mov	x1, x0
	mov	x0, x20
	mov	x2, x23
	bl	_it87_write_value
	mov	x0, x22
	bl	_mutex_unlock
LBB0_8:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.no_dead_strip	_set_auto_temp
.subsections_via_symbols
