	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fan_div_store
_fan_div_store:                         ## @fan_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
	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, %r15
	movq	%rdx, %r13
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r14
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r12
	movq	24(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	-80(%rbp), %rdx
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %r15
	addq	$16, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_f_min@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movq	8(%r12), %rdx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax,%r14,4), %ebx
	movl	(%rdx,%r14,4), %edi
	callq	_DIV_FROM_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_FAN_FROM_REG
	movq	-80(%rbp), %rdx
	leaq	-1(%rdx), %rsi
	cmpq	$8, %rsi
	jae	LBB0_3
## %bb.4:
	movl	$139, %ecx
	btl	%esi, %ecx
	jb	LBB0_5
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %r13d
	jmp	LBB0_8
LBB0_5:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	l_switch.table.fan_div_store(%rip), %rax
	movl	-4(%rax,%rdx,4), %eax
	movq	8(%r12), %rcx
	movl	%eax, (%rcx,%r14,4)
	movq	_LM80_REG_FANDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_lm80_read_value
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	leal	1(%r14), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	leal	(%r14,%r14), %ecx
	addl	$2, %ecx
	movl	$3, %eax
	shll	%cl, %eax
	movq	8(%r12), %rdx
	movl	(%rdx,%r14,4), %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	notl	%eax
	andl	%eax, %r13d
	orl	%r13d, %edx
	movq	_LM80_REG_FANDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_lm80_write_value
	movq	8(%r12), %rax
	movl	(%rax,%r14,4), %edi
	callq	_DIV_FROM_REG
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_FAN_TO_REG
	movq	(%r12), %rcx
	movq	_f_min@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movl	%eax, (%rcx,%r14,4)
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_LM80_REG_FAN_MIN
	movq	(%r12), %rcx
	movq	(%r13), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movl	(%rcx,%r14,4), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_lm80_write_value
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r13d
	jmp	LBB0_8
LBB0_6:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_8:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_f_min,8,3                      ## @f_min
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fan_div value %ld not supported. Choose one of 1, 2, 4 or 8!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LM80_REG_FANDIV,4,2            ## @LM80_REG_FANDIV
	.no_dead_strip	_fan_div_store
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.fan_div_store
l_switch.table.fan_div_store:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	2                               ## 0x2
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	3                               ## 0x3

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fan_div_store
_fan_div_store:                         ; @fan_div_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x20, x2
	mov	x23, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr
	ldrsw	x28, [x0]
	mov	x0, x23
	bl	_dev_get_drvdata
	mov	x22, x0
	ldr	x21, [x0, #24]
	add	x2, sp, #8
	mov	x0, x20
	mov	w1, #10
	bl	_kstrtoul
	tbnz	w0, #31, LBB0_4
; %bb.1:
	add	x20, x22, #16
	mov	x0, x20
	bl	_mutex_lock
Lloh0:
	adrp	x26, _f_min@GOTPAGE
Lloh1:
	ldr	x26, [x26, _f_min@GOTPAGEOFF]
	ldr	x8, [x26]
	ldp	x9, x10, [x22]
	ldr	x8, [x9, x8, lsl #3]
	lsl	x27, x28, #2
	ldr	w24, [x8, x27]
	ldr	w0, [x10, x27]
	bl	_DIV_FROM_REG
	mov	x1, x0
	mov	x0, x24
	bl	_FAN_FROM_REG
	ldr	x2, [sp, #8]
	sub	x8, x2, #1
	cmp	x8, #8
	b.hs	LBB0_3
; %bb.2:
	mov	w9, #139
	lsr	w9, w9, w8
	tbnz	w9, #0, LBB0_5
LBB0_3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_dev_err
	mov	x0, x20
	bl	_mutex_unlock
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_8
LBB0_4:
	mov	x25, x0
	b	LBB0_8
LBB0_5:
	mov	x24, x0
Lloh7:
	adrp	x9, l_switch.table.fan_div_store@PAGE
Lloh8:
	add	x9, x9, l_switch.table.fan_div_store@PAGEOFF
	ldr	w8, [x9, x8, lsl #2]
	ldr	x9, [x22, #8]
	str	w8, [x9, x28, lsl #2]
Lloh9:
	adrp	x23, _LM80_REG_FANDIV@GOTPAGE
Lloh10:
	ldr	x23, [x23, _LM80_REG_FANDIV@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x21
	bl	_lm80_read_value
	mov	x25, x0
	tbnz	w0, #31, LBB0_7
; %bb.6:
	mov	x11, x23
	add	w23, w28, #1
	lsl	w8, w23, #1
	mov	w9, #3
	lsl	w9, w9, w8
	bic	w9, w25, w9
	ldr	x10, [x22, #8]
	ldr	w10, [x10, x27]
	lsl	w8, w10, w8
	orr	w2, w8, w9
	ldr	w1, [x11]
	mov	x0, x21
	bl	_lm80_write_value
	ldr	x8, [x22, #8]
	ldr	w0, [x8, x27]
	bl	_DIV_FROM_REG
	mov	x1, x0
	mov	x0, x24
	bl	_FAN_TO_REG
	ldr	x8, [x22]
	ldr	x9, [x26]
	ldr	x8, [x8, x9, lsl #3]
	str	w0, [x8, x27]
	mov	x0, x23
	bl	_LM80_REG_FAN_MIN
	mov	x1, x0
	ldr	x8, [x22]
	ldr	x9, [x26]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w2, [x8, x27]
	mov	x0, x21
	bl	_lm80_write_value
	mov	x0, x20
	bl	_mutex_unlock
	mov	x25, x19
	b	LBB0_8
LBB0_7:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_8:
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_f_min,8,3                      ; @f_min
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fan_div value %ld not supported. Choose one of 1, 2, 4 or 8!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LM80_REG_FANDIV,4,2            ; @LM80_REG_FANDIV
	.no_dead_strip	_fan_div_store
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.fan_div_store
l_switch.table.fan_div_store:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	2                               ; 0x2
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	3                               ; 0x3

.subsections_via_symbols
