	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fan1_div_store
_fan1_div_store:                        ## @fan1_div_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	8(%rax), %r12
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	leaq	4(%r14), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_AMC6821_REG_CONF4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	-48(%rbp), %rax
	cmpq	$4, %rax
	je	LBB0_7
## %bb.4:
	cmpq	$2, %rax
	jne	LBB0_6
## %bb.5:
	movq	_AMC6821_CONF4_PSPR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r13d
	movl	$2, %eax
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movl	%r13d, %r15d
	jmp	LBB0_11
LBB0_7:
	movq	_AMC6821_CONF4_PSPR@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movl	$4, %eax
LBB0_8:
	movl	%eax, (%r14)
	movq	_AMC6821_REG_CONF4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_i2c_smbus_write_byte_data
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%r15d, %r15d
	subq	(%rax), %r15
LBB0_11:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMC6821_REG_CONF4,4,2          ## @AMC6821_REG_CONF4
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error reading configuration register, aborting.\n"

	.comm	_AMC6821_CONF4_PSPR,4,2         ## @AMC6821_CONF4_PSPR
	.comm	_EINVAL,8,3                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Configuration register write error, aborting.\n"

	.comm	_EIO,8,3                        ## @EIO
	.no_dead_strip	_fan1_div_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fan1_div_store
_fan1_div_store:                        ; @fan1_div_store
	.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	x20, x2
	bl	_dev_get_drvdata
	mov	x22, x0
	ldr	x21, [x0, #8]
	add	x2, sp, #8
	mov	x0, x20
	mov	w1, #10
	bl	_kstrtol
	cbnz	w0, LBB0_12
; %bb.1:
	add	x20, x22, #4
	mov	x0, x20
	bl	_mutex_lock
Lloh0:
	adrp	x24, _AMC6821_REG_CONF4@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AMC6821_REG_CONF4@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	mov	x23, x0
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	x8, [sp, #8]
	cmp	x8, #4
	b.eq	LBB0_6
; %bb.3:
	cmp	x8, #2
	b.ne	LBB0_9
; %bb.4:
Lloh2:
	adrp	x8, _AMC6821_CONF4_PSPR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AMC6821_CONF4_PSPR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w2, w23, w8
	mov	w8, #2
	b	LBB0_7
LBB0_5:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	mov	w19, w23
	b	LBB0_11
LBB0_6:
Lloh7:
	adrp	x8, _AMC6821_CONF4_PSPR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AMC6821_CONF4_PSPR@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	orr	w2, w8, w23
	mov	w8, #4
LBB0_7:
	str	w8, [x22]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_i2c_smbus_write_byte_data
	cbz	x0, LBB0_11
; %bb.8:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_11:
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
LBB0_12:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AMC6821_REG_CONF4,4,2          ; @AMC6821_REG_CONF4
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error reading configuration register, aborting.\n"

	.comm	_AMC6821_CONF4_PSPR,4,2         ; @AMC6821_CONF4_PSPR
	.comm	_EINVAL,8,3                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Configuration register write error, aborting.\n"

	.comm	_EIO,8,3                        ; @EIO
	.no_dead_strip	_fan1_div_store
.subsections_via_symbols
