	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_fan_div
_set_fan_div:                           ## @set_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, %r12
	movq	%rdx, %r15
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r14
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_i2c_client
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %r13
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtol
	movl	%eax, %edi
	callq	_DIV_TO_REG
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r15d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	(%r13), %rax
	movl	(%rax,%r14,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r15d, %edi
	callq	_DIV_FROM_REG
	movq	(%r13), %rcx
	movl	%eax, (%rcx,%r14,4)
	leal	(%r14,%r14), %r12d
	cmpl	$3, %r14d
	jg	LBB0_4
## %bb.3:
	movq	_ADM1026_REG_FAN_DIV_0_3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_DIV_TO_REG
	movl	%r12d, %esi
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
	jmp	LBB0_8
LBB0_4:
	leal	-8(%r12), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_ADM1026_REG_FAN_DIV_4_7@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_DIV_TO_REG
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	addl	%r12d, %r12d
	addl	$-16, %r12d
LBB0_5:
	movl	$3, %edx
	movl	%r12d, %ecx
	shll	%cl, %edx
	notl	%edx
	andl	%eax, %edx
	movl	%esi, %ecx
	shll	%cl, %r15d
	orl	%edx, %r15d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r15d, %edx
	callq	_adm1026_write_value
	movq	(%r13), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax,%r14,4)
	je	LBB0_7
## %bb.6:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_fixup_fan_min
LBB0_7:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	-72(%rbp), %rax                 ## 8-byte Reload
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_ADM1026_REG_FAN_DIV_0_3,4,2    ## @ADM1026_REG_FAN_DIV_0_3
	.comm	_ADM1026_REG_FAN_DIV_4_7,4,2    ## @ADM1026_REG_FAN_DIV_4_7
	.no_dead_strip	_set_fan_div
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_fan_div
_set_fan_div:                           ; @set_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
	mov	x19, x3
	mov	x24, x2
	mov	x20, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr
	ldrsw	x21, [x0]
	mov	x0, x20
	bl	_to_i2c_client
	mov	x22, x0
	bl	_i2c_get_clientdata
	mov	x23, x0
	mov	x0, x24
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtol
	bl	_DIV_TO_REG
	cbz	w0, LBB0_3
; %bb.1:
	mov	x26, x0
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	add	x24, x23, #8
	mov	x0, x24
	bl	_mutex_lock
	ldr	x8, [x23]
	lsl	x19, x21, #2
	ldr	w25, [x8, x19]
	mov	x0, x26
	bl	_DIV_FROM_REG
	ldr	x8, [x23]
	str	w0, [x8, x19]
	lsl	w28, w21, #1
	cmp	w21, #3
	b.gt	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _ADM1026_REG_FAN_DIV_0_3@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADM1026_REG_FAN_DIV_0_3@GOTPAGEOFF]
Lloh2:
	ldr	w27, [x8]
	mov	x0, x25
	bl	_DIV_TO_REG
	mov	x19, x28
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	neg	x0, x8
	b	LBB0_8
LBB0_4:
	sub	w19, w28, #8
Lloh6:
	adrp	x8, _ADM1026_REG_FAN_DIV_4_7@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADM1026_REG_FAN_DIV_4_7@GOTPAGEOFF]
Lloh8:
	ldr	w27, [x8]
	mov	x0, x25
	bl	_DIV_TO_REG
	lsl	w28, w19, #1
LBB0_5:
	mov	w8, #3
	lsl	w8, w8, w28
	bic	w8, w0, w8
	lsl	w9, w26, w19
	orr	w2, w8, w9
	mov	x0, x22
	mov	x1, x27
	bl	_adm1026_write_value
	ldr	x8, [x23]
	ldr	w8, [x8, x21, lsl #2]
	cmp	w8, w25
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x25
	bl	_fixup_fan_min
LBB0_7:
	mov	x0, x24
	bl	_mutex_unlock
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
LBB0_8:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_ADM1026_REG_FAN_DIV_0_3,4,2    ; @ADM1026_REG_FAN_DIV_0_3
	.comm	_ADM1026_REG_FAN_DIV_4_7,4,2    ; @ADM1026_REG_FAN_DIV_4_7
	.no_dead_strip	_set_fan_div
.subsections_via_symbols
