	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_fan_div
_store_fan_div:                         ## @store_fan_div
	.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, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_to_i2c_client
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %rbx
	movslq	(%r13), %r13
	movq	(%rax), %rax
	movq	8(%rbx), %rcx
	movl	(%rax,%r13,4), %r14d
	movl	(%rcx,%r13,4), %edi
	callq	_DIV_FROM_REG
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_FAN_FROM_REG
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	16(%rbx), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtoul
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_div_to_reg
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx,%r13,4)
	movl	$0, %ebx
	movl	$0, %r15d
	cmpq	$4, %r13
	ja	LBB0_2
## %bb.1:
	leaq	l_switch.table.store_fan_div(%rip), %rax
	movq	(%rax,%r13,8), %r12
	leaq	l_switch.table.store_fan_div.1(%rip), %rax
	movl	(%rax,%r13,4), %ebx
	leaq	l_switch.table.store_fan_div.2(%rip), %rax
	movl	(%rax,%r13,4), %r15d
LBB0_2:
	movq	_W83791D_REG_FAN_DIV@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r12,4), %esi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_w83791d_read
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	8(%rdi), %rcx
	movl	(%rcx,%r13,4), %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	movq	_W83791D_REG_FAN_DIV@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r12,4), %esi
	movq	%rdi, %r12
	xorl	%edx, %eax
	andl	%eax, %ebx
	xorl	%edx, %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_w83791d_write
	cmpl	$2, %r13d
	jg	LBB0_4
## %bb.3:
	leal	5(%r13), %r14d
	movl	$1, %ebx
	movl	%r14d, %ecx
	shll	%cl, %ebx
	movq	_W83791D_REG_VBAT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_w83791d_read
	movq	8(%r12), %rcx
	movl	(%rcx,%r13,4), %edx
	leal	3(%r13), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	btrl	%r14d, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	andl	%ebx, %edx
	orl	%eax, %edx
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_w83791d_write
LBB0_4:
	movq	8(%r12), %rax
	movl	(%rax,%r13,4), %edi
	callq	_DIV_FROM_REG
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_fan_to_reg
	movq	(%r12), %rcx
	movl	%eax, (%rcx,%r13,4)
	movq	_W83791D_REG_FAN_MIN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r13,4), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_w83791d_write
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_W83791D_REG_FAN_DIV,8,3        ## @W83791D_REG_FAN_DIV
	.comm	_W83791D_REG_VBAT,4,2           ## @W83791D_REG_VBAT
	.comm	_W83791D_REG_FAN_MIN,8,3        ## @W83791D_REG_FAN_MIN
	.comm	_EINVAL,8,3                     ## @EINVAL
	.no_dead_strip	_store_fan_div
	.section	__TEXT,__const
	.p2align	3                               ## @switch.table.store_fan_div
l_switch.table.store_fan_div:
	.quad	0                               ## 0x0
	.quad	0                               ## 0x0
	.quad	1                               ## 0x1
	.quad	2                               ## 0x2
	.quad	2                               ## 0x2

	.p2align	2                               ## @switch.table.store_fan_div.1
l_switch.table.store_fan_div.1:
	.long	207                             ## 0xcf
	.long	63                              ## 0x3f
	.long	63                              ## 0x3f
	.long	248                             ## 0xf8
	.long	143                             ## 0x8f

	.p2align	2                               ## @switch.table.store_fan_div.2
l_switch.table.store_fan_div.2:
	.long	4                               ## 0x4
	.long	6                               ## 0x6
	.long	6                               ## 0x6
	.long	0                               ## 0x0
	.long	4                               ## 0x4

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_fan_div
_store_fan_div:                         ; @store_fan_div
	.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
	str	x3, [sp, #8]                    ; 8-byte Folded Spill
	mov	x24, x2
	mov	x20, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr
	mov	x22, x0
	mov	x0, x20
	bl	_to_i2c_client
	mov	x20, x0
	bl	_i2c_get_clientdata
	mov	x21, x0
	ldr	w25, [x22]
	sxtw	x26, w25
	sbfiz	x27, x25, #2, #32
	ldp	x8, x9, [x0]
	ldr	w22, [x8, x27]
	ldr	w0, [x9, x27]
	bl	_DIV_FROM_REG
	mov	x1, x0
	mov	x0, x22
	bl	_FAN_FROM_REG
	mov	x23, x0
	add	x22, x21, #16
	mov	x0, x22
	bl	_mutex_lock
	mov	x0, x24
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtoul
	mov	x1, x0
	mov	x0, x25
	bl	_div_to_reg
	ldr	x8, [x21, #8]
	str	w0, [x8, x27]
	lsl	x24, x26, #2
	cmp	w25, #4
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, l_switch.table.store_fan_div@PAGE
Lloh1:
	add	x8, x8, l_switch.table.store_fan_div@PAGEOFF
	ldr	x8, [x8, x26, lsl #3]
Lloh2:
	adrp	x9, l_switch.table.store_fan_div.1@PAGE
Lloh3:
	add	x9, x9, l_switch.table.store_fan_div.1@PAGEOFF
	ldr	w25, [x9, x24]
Lloh4:
	adrp	x9, l_switch.table.store_fan_div.2@PAGE
Lloh5:
	add	x9, x9, l_switch.table.store_fan_div.2@PAGEOFF
	ldr	w27, [x9, x24]
	b	LBB0_3
LBB0_2:
	mov	x8, #0
	mov	w25, #0
	mov	w27, #0
LBB0_3:
Lloh6:
	adrp	x28, _W83791D_REG_FAN_DIV@GOTPAGE
Lloh7:
	ldr	x28, [x28, _W83791D_REG_FAN_DIV@GOTPAGEOFF]
	ldr	x9, [x28]
	lsl	x19, x8, #2
	ldr	w1, [x9, x19]
	mov	x0, x20
	bl	_w83791d_read
	and	w8, w0, w25
	ldr	x9, [x21, #8]
	ldr	w9, [x9, x26, lsl #2]
	lsl	w9, w9, w27
	bic	w9, w9, w25
	ldr	x10, [x28]
	ldr	w1, [x10, x19]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_w83791d_write
	cmp	w26, #2
	b.gt	LBB0_5
; %bb.4:
	add	w8, w26, #5
	mov	w9, #1
	lsl	w19, w9, w8
Lloh8:
	adrp	x25, _W83791D_REG_VBAT@GOTPAGE
Lloh9:
	ldr	x25, [x25, _W83791D_REG_VBAT@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x20
	bl	_w83791d_read
	ldr	x8, [x21, #8]
	ldr	w8, [x8, x26, lsl #2]
	bic	w9, w0, w19
	add	w10, w26, #3
	lsl	w8, w8, w10
	and	w8, w8, w19
	ldr	w1, [x25]
	orr	w2, w8, w9
	mov	x0, x20
	bl	_w83791d_write
LBB0_5:
	ldr	x8, [x21, #8]
	ldr	w0, [x8, x24]
	bl	_DIV_FROM_REG
	mov	x1, x0
	mov	x0, x23
	bl	_fan_to_reg
	mov	x2, x0
	ldr	x8, [x21]
	str	w0, [x8, x24]
Lloh10:
	adrp	x8, _W83791D_REG_FAN_MIN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _W83791D_REG_FAN_MIN@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	w1, [x8, x24]
	mov	x0, x20
	bl	_w83791d_write
	mov	x0, x22
	bl	_mutex_unlock
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_W83791D_REG_FAN_DIV,8,3        ; @W83791D_REG_FAN_DIV
	.comm	_W83791D_REG_VBAT,4,2           ; @W83791D_REG_VBAT
	.comm	_W83791D_REG_FAN_MIN,8,3        ; @W83791D_REG_FAN_MIN
	.comm	_EINVAL,8,3                     ; @EINVAL
	.no_dead_strip	_store_fan_div
	.section	__TEXT,__const
	.p2align	3                               ; @switch.table.store_fan_div
l_switch.table.store_fan_div:
	.quad	0                               ; 0x0
	.quad	0                               ; 0x0
	.quad	1                               ; 0x1
	.quad	2                               ; 0x2
	.quad	2                               ; 0x2

	.p2align	2                               ; @switch.table.store_fan_div.1
l_switch.table.store_fan_div.1:
	.long	207                             ; 0xcf
	.long	63                              ; 0x3f
	.long	63                              ; 0x3f
	.long	248                             ; 0xf8
	.long	143                             ; 0x8f

	.p2align	2                               ; @switch.table.store_fan_div.2
l_switch.table.store_fan_div.2:
	.long	4                               ; 0x4
	.long	6                               ; 0x6
	.long	6                               ; 0x6
	.long	0                               ; 0x0
	.long	4                               ; 0x4

.subsections_via_symbols
