	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function temp_auto_point_temp_store
_temp_auto_point_temp_store:            ## @temp_auto_point_temp_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_amc6821_update_device
	movq	%rax, %r14
	movq	40(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr_2
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr_2
	movl	4(%rax), %ebx
	leaq	-72(%rbp), %rdx
	movq	%r15, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testl	%eax, %eax
	jne	LBB0_16
## %bb.1:
	movl	%r13d, %r15d
	movq	%r14, %r13
	cmpl	$2, %ebx
	je	LBB0_5
## %bb.2:
	cmpl	$1, %ebx
	jne	LBB0_4
## %bb.3:
	movq	_AMC6821_REG_LTEMP_FAN_CTRL@GOTPCREL(%rip), %rcx
	movq	%r13, %rax
	jmp	LBB0_6
LBB0_5:
	leaq	8(%r14), %rax
	movq	_AMC6821_REG_RTEMP_FAN_CTRL@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rcx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	(%rax), %rbx
	addq	$24, %r14
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	$0, 32(%r13)
	cmpl	$2, %r15d
	je	LBB0_12
## %bb.7:
	cmpl	$1, %r15d
	je	LBB0_11
## %bb.8:
	testl	%r15d, %r15d
	jne	LBB0_17
## %bb.9:
	movabsq	$2361183241434822607, %rax      ## imm = 0x20C49BA5E353F7CF
	imulq	-72(%rbp)
	movq	%rdx, %rdi
	shrq	$63, %rdi
	sarq	$7, %rdx
	addq	%rdx, %rdi
	movq	(%r13), %rax
	movl	4(%rax), %edx
	xorl	%esi, %esi
	callq	_clamp_val
	movl	%eax, (%rbx)
	movslq	%eax, %rdi
	movq	8(%r13), %rax
	movl	4(%rax), %edx
	xorl	%esi, %esi
	callq	_clamp_val
	movl	%eax, (%rbx)
	movslq	%eax, %rdi
	xorl	%esi, %esi
	movl	$63, %edx
	callq	_clamp_val
	movl	%eax, (%rbx)
	movq	_AMC6821_REG_PSV_TEMP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_15
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	jmp	LBB0_14
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_16
LBB0_12:
	movabsq	$2361183241434822607, %rax      ## imm = 0x20C49BA5E353F7CF
	imulq	-72(%rbp)
	movq	%rdx, %rdi
	shrq	$63, %rdi
	sarq	$7, %rdx
	addq	%rdx, %rdi
	movl	4(%rbx), %esi
	incl	%esi
	jmp	LBB0_13
LBB0_11:
	movabsq	$2361183241434822607, %rax      ## imm = 0x20C49BA5E353F7CF
	imulq	-72(%rbp)
	movq	%rdx, %rdi
	shrq	$63, %rdi
	sarq	$7, %rdx
	addq	%rdx, %rdi
	movl	(%rbx), %esi
	andl	$124, %esi
	addl	$4, %esi
	movl	$124, %edx
	callq	_clamp_val
                                        ## kill: def $eax killed $eax def $rax
	andl	$124, %eax
	movl	%eax, 4(%rbx)
	movslq	8(%rbx), %rdi
	leal	1(%rax), %esi
LBB0_13:
	movl	$255, %edx
	callq	_clamp_val
	movl	%eax, 8(%rbx)
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	16(%r13), %rax
	movl	8(%rax), %edx
	subl	4(%rax), %edx
	movq	%rbx, %rcx
	callq	_set_slope_register
	testq	%rax, %rax
	je	LBB0_15
LBB0_14:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subq	(%rax), %r12
	jmp	LBB0_15
LBB0_17:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_15:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%r12d, %eax
LBB0_16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMC6821_REG_LTEMP_FAN_CTRL,4,2 ## @AMC6821_REG_LTEMP_FAN_CTRL
	.comm	_AMC6821_REG_RTEMP_FAN_CTRL,4,2 ## @AMC6821_REG_RTEMP_FAN_CTRL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown attr->nr (%d).\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AMC6821_REG_PSV_TEMP,4,2       ## @AMC6821_REG_PSV_TEMP
L_.str.1:                               ## @.str.1
	.asciz	"Register write error, aborting.\n"

	.comm	_EIO,8,3                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"Unknown attr->index (%d).\n"

	.no_dead_strip	_temp_auto_point_temp_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function temp_auto_point_temp_store
_temp_auto_point_temp_store:            ; @temp_auto_point_temp_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x3
	mov	x23, x2
	mov	x21, x1
	mov	x24, x0
	bl	_amc6821_update_device
	mov	x22, x0
	ldr	x20, [x0, #40]
	mov	x0, x21
	bl	_to_sensor_dev_attr_2
	ldr	w25, [x0]
	mov	x0, x21
	bl	_to_sensor_dev_attr_2
	ldr	w21, [x0, #4]
	add	x2, sp, #8
	mov	x0, x23
	mov	w1, #10
	bl	_kstrtol
	cbnz	w0, LBB0_17
; %bb.1:
	cmp	w21, #2
	b.eq	LBB0_4
; %bb.2:
	cmp	w21, #1
	b.ne	LBB0_10
; %bb.3:
Lloh0:
	adrp	x8, _AMC6821_REG_LTEMP_FAN_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMC6821_REG_LTEMP_FAN_CTRL@GOTPAGEOFF]
	mov	x9, x22
	b	LBB0_5
LBB0_4:
	add	x9, x22, #8
Lloh2:
	adrp	x8, _AMC6821_REG_RTEMP_FAN_CTRL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AMC6821_REG_RTEMP_FAN_CTRL@GOTPAGEOFF]
LBB0_5:
	ldr	w26, [x8]
	ldr	x23, [x9]
	add	x21, x22, #24
	mov	x0, x21
	bl	_mutex_lock
	str	xzr, [x22, #32]
	cmp	w25, #2
	b.eq	LBB0_11
; %bb.6:
	cmp	w25, #1
	b.eq	LBB0_12
; %bb.7:
	cbnz	w25, LBB0_15
; %bb.8:
	ldr	x8, [sp, #8]
	mov	x9, #63439
	movk	x9, #58195, lsl #16
	movk	x9, #39845, lsl #32
	movk	x9, #8388, lsl #48
	smulh	x8, x8, x9
	asr	x9, x8, #7
	add	x0, x9, x8, lsr #63
	ldr	x8, [x22]
	ldr	w2, [x8, #4]
	mov	w1, #0
	bl	_clamp_val
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [x23]
	sxtw	x0, w0
	ldr	x8, [x22, #8]
	ldr	w2, [x8, #4]
	mov	w1, #0
	bl	_clamp_val
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [x23]
	sxtw	x0, w0
	mov	w1, #0
	mov	w2, #63
	bl	_clamp_val
	mov	x2, x0
	str	w0, [x23]
Lloh4:
	adrp	x8, _AMC6821_REG_PSV_TEMP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AMC6821_REG_PSV_TEMP@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	cbz	w0, LBB0_16
; %bb.9:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_14
LBB0_10:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	mov	x2, x21
	bl	_dev_dbg
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_11:
	ldr	x8, [sp, #8]
	mov	x9, #63439
	movk	x9, #58195, lsl #16
	movk	x9, #39845, lsl #32
	movk	x9, #8388, lsl #48
	smulh	x8, x8, x9
	asr	x9, x8, #7
	add	x0, x9, x8, lsr #63
	ldr	w8, [x23, #4]
	add	w1, w8, #1
	b	LBB0_13
LBB0_12:
	ldr	x8, [sp, #8]
	mov	x9, #63439
	movk	x9, #58195, lsl #16
	movk	x9, #39845, lsl #32
	movk	x9, #8388, lsl #48
	smulh	x8, x8, x9
	asr	x9, x8, #7
	add	x0, x9, x8, lsr #63
	ldr	w8, [x23]
	and	w8, w8, #0x7c
	add	w1, w8, #4
	mov	w2, #124
	bl	_clamp_val
	and	w8, w0, #0x7c
	str	w8, [x23, #4]
	ldrsw	x0, [x23, #8]
	orr	w1, w8, #0x1
LBB0_13:
	mov	w2, #255
	bl	_clamp_val
	str	w0, [x23, #8]
	ldr	x8, [x22, #16]
	ldp	w8, w9, [x8, #4]
	sub	w2, w9, w8
	mov	x0, x20
	mov	x1, x26
	mov	x3, x23
	bl	_set_slope_register
	cbz	x0, LBB0_16
LBB0_14:
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_16
LBB0_15:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x24
	mov	x2, x25
	bl	_dev_dbg
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_16:
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
LBB0_17:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_AMC6821_REG_LTEMP_FAN_CTRL,4,2 ; @AMC6821_REG_LTEMP_FAN_CTRL
	.comm	_AMC6821_REG_RTEMP_FAN_CTRL,4,2 ; @AMC6821_REG_RTEMP_FAN_CTRL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown attr->nr (%d).\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AMC6821_REG_PSV_TEMP,4,2       ; @AMC6821_REG_PSV_TEMP
l_.str.1:                               ; @.str.1
	.asciz	"Register write error, aborting.\n"

	.comm	_EIO,8,3                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"Unknown attr->index (%d).\n"

	.no_dead_strip	_temp_auto_point_temp_store
.subsections_via_symbols
