	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_tolerance
_store_tolerance:                       ## @store_tolerance
	.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, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_dev_get_platdata
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r14
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	-48(%rbp), %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$15, %edx
	callq	_clamp_val
	movq	%rax, -48(%rbp)
	movq	%r15, %r13
	addq	$8, %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	(%r12), %rax
	movq	_nct6775@GOTPCREL(%rip), %rdx
	movq	_nct6776@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rdx), %rax
	je	LBB0_4
## %bb.3:
	cmpq	%rcx, %rax
	je	LBB0_4
## %bb.8:
	movq	_W83627EHF_REG_TOLERANCE@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	(%rax,%r14,4), %esi
	movq	%r15, %rdi
	callq	_w83627ehf_read_value
	cmpl	$1, %r14d
	jne	LBB0_10
## %bb.9:
	andl	$15, %eax
	movl	-48(%rbp), %edx
	shll	$4, %edx
	orl	%eax, %edx
	jmp	LBB0_11
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_4:
	cmpq	%rcx, %rax
	jne	LBB0_7
## %bb.5:
	cmpq	$8, -48(%rbp)
	jl	LBB0_7
## %bb.6:
	movq	$7, -48(%rbp)
LBB0_7:
	movq	_NCT6775_REG_FAN_MODE@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	(%rax,%r14,4), %esi
	movq	%r15, %rdi
	callq	_w83627ehf_read_value
	movl	%eax, %edx
	andl	$240, %edx
	orl	-48(%rbp), %edx
	jmp	LBB0_11
LBB0_10:
	andl	$240, %eax
	orl	-48(%rbp), %eax
	movl	%eax, %edx
LBB0_11:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	(%r12), %rax
	movl	(%rax,%r14,4), %esi
	movq	%r15, %rdi
	callq	_w83627ehf_write_value
	movq	-48(%rbp), %rax
	movq	(%r15), %rcx
	movq	%rax, (%rcx,%r14,8)
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nct6775,8,3                    ## @nct6775
	.comm	_nct6776,8,3                    ## @nct6776
	.comm	_NCT6775_REG_FAN_MODE,8,3       ## @NCT6775_REG_FAN_MODE
	.comm	_W83627EHF_REG_TOLERANCE,8,3    ## @W83627EHF_REG_TOLERANCE
	.no_dead_strip	_store_tolerance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_tolerance
_store_tolerance:                       ; @store_tolerance
	.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	x21, x2
	mov	x23, x1
	mov	x22, x0
	bl	_dev_get_drvdata
	mov	x20, x0
	mov	x0, x22
	bl	_dev_get_platdata
	mov	x22, x0
	mov	x0, x23
	bl	_to_sensor_dev_attr
	ldrsw	x23, [x0]
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #10
	bl	_kstrtol
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	x0, [sp, #8]
	mov	w1, #1000
	bl	_DIV_ROUND_CLOSEST
	mov	w1, #0
	mov	w2, #15
	bl	_clamp_val
	str	x0, [sp, #8]
	add	x21, x20, #8
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _nct6775@GOTPAGE
Lloh1:
	ldr	x9, [x9, _nct6775@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x9]
Lloh3:
	adrp	x9, _nct6776@GOTPAGE
Lloh4:
	ldr	x9, [x9, _nct6776@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_6
; %bb.2:
	ldr	x10, [sp, #8]
	cmp	x8, x9
	ccmp	x10, #8, #8, eq
	b.lt	LBB0_4
; %bb.3:
	mov	w8, #7
	str	x8, [sp, #8]
LBB0_4:
Lloh6:
	adrp	x22, _NCT6775_REG_FAN_MODE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _NCT6775_REG_FAN_MODE@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	w1, [x8, x23, lsl #2]
	mov	x0, x20
	bl	_w83627ehf_read_value
	and	w8, w0, #0xf0
	ldr	w9, [sp, #8]
	orr	w2, w8, w9
	b	LBB0_10
LBB0_5:
	mov	x19, x0
	b	LBB0_11
LBB0_6:
Lloh8:
	adrp	x8, _W83627EHF_REG_TOLERANCE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _W83627EHF_REG_TOLERANCE@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	w1, [x8, x23, lsl #2]
	mov	x0, x20
	bl	_w83627ehf_read_value
	mov	x2, x0
	cmp	w23, #1
	b.ne	LBB0_8
; %bb.7:
	ldr	w8, [sp, #8]
	bfi	w2, w8, #4, #28
	b	LBB0_9
LBB0_8:
	and	w8, w2, #0xf0
	ldr	w9, [sp, #8]
	orr	w2, w8, w9
LBB0_9:
Lloh11:
	adrp	x22, _W83627EHF_REG_TOLERANCE@GOTPAGE
Lloh12:
	ldr	x22, [x22, _W83627EHF_REG_TOLERANCE@GOTPAGEOFF]
LBB0_10:
	ldr	x8, [x22]
	ldr	w1, [x8, x23, lsl #2]
	mov	x0, x20
	bl	_w83627ehf_write_value
	ldr	x8, [sp, #8]
	ldr	x9, [x20]
	str	x8, [x9, x23, lsl #3]
	mov	x0, x21
	bl	_mutex_unlock
LBB0_11:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_nct6775,8,3                    ; @nct6775
	.comm	_nct6776,8,3                    ; @nct6776
	.comm	_NCT6775_REG_FAN_MODE,8,3       ; @NCT6775_REG_FAN_MODE
	.comm	_W83627EHF_REG_TOLERANCE,8,3    ; @W83627EHF_REG_TOLERANCE
	.no_dead_strip	_store_tolerance
.subsections_via_symbols
