	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r13
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r12
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtoul
	movq	%rax, %r15
	leaq	16(%r14), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movl	(%rax,%r12,4), %ebx
	movl	(%rcx,%r12,4), %edi
	callq	_DIV_FROM_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_FAN_FROM_REG
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_SIS5595_REG_FANDIV@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_sis5595_read_value
	leaq	-1(%r15), %rcx
	cmpq	$8, %rcx
	jae	LBB0_2
## %bb.1:
	movl	$139, %edx
	btl	%ecx, %edx
	jb	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movq	%r15, %rdx
	callq	_dev_err
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
	jmp	LBB0_9
LBB0_3:
	leaq	l_switch.table.set_fan_div(%rip), %rcx
	movl	-4(%rcx,%r15,4), %ecx
	movq	8(%r14), %rdx
	movl	%ecx, (%rdx,%r12,4)
	cmpl	$1, %r12d
	je	LBB0_6
## %bb.4:
	testl	%r12d, %r12d
	jne	LBB0_8
## %bb.5:
	andl	$207, %eax
	shll	$4, %ecx
	jmp	LBB0_7
LBB0_6:
	andl	$63, %eax
	shll	$6, %ecx
LBB0_7:
	orl	%ecx, %eax
LBB0_8:
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_sis5595_write_value
	movq	8(%r14), %rax
	movl	(%rax,%r12,4), %edi
	callq	_DIV_FROM_REG
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_FAN_TO_REG
	movq	(%r14), %rcx
	movl	%eax, (%rcx,%r12,4)
	movl	%r12d, %edi
	callq	_SIS5595_REG_FAN_MIN
	movq	(%r14), %rcx
	movl	(%rcx,%r12,4), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_sis5595_write_value
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	-64(%rbp), %rax                 ## 8-byte Reload
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIS5595_REG_FANDIV,4,2         ## @SIS5595_REG_FANDIV
	.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,8,3                     ## @EINVAL
	.no_dead_strip	_set_fan_div
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.set_fan_div
l_switch.table.set_fan_div:
	.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 set_fan_div
_set_fan_div:                           ; @set_fan_div
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x1
	mov	x23, x0
	bl	_dev_get_drvdata
	mov	x21, x0
	mov	x0, x22
	bl	_to_sensor_dev_attr
	ldrsw	x22, [x0]
	mov	x0, x20
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtoul
	mov	x25, x0
	add	x20, x21, #16
	mov	x0, x20
	bl	_mutex_lock
	lsl	x26, x22, #2
	ldp	x8, x9, [x21]
	ldr	w24, [x8, x26]
	ldr	w0, [x9, x26]
	bl	_DIV_FROM_REG
	mov	x1, x0
	mov	x0, x24
	bl	_FAN_FROM_REG
	mov	x24, x0
Lloh0:
	adrp	x27, _SIS5595_REG_FANDIV@GOTPAGE
Lloh1:
	ldr	x27, [x27, _SIS5595_REG_FANDIV@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	x0, x21
	bl	_sis5595_read_value
	sub	x8, x25, #1
	cmp	x8, #8
	b.hs	LBB0_2
; %bb.1:
	mov	w9, #139
	lsr	w9, w9, w8
	tbnz	w9, #0, LBB0_3
LBB0_2:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x25
	bl	_dev_err
	mov	x0, x20
	bl	_mutex_unlock
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x9, l_switch.table.set_fan_div@PAGE
Lloh8:
	add	x9, x9, l_switch.table.set_fan_div@PAGEOFF
	ldr	w8, [x9, x8, lsl #2]
	ldr	x9, [x21, #8]
	str	w8, [x9, x22, lsl #2]
	mov	x9, x0
	bfi	w9, w8, #6, #26
	mov	w10, #207
	and	w10, w0, w10
	orr	w8, w10, w8, lsl #4
	cmp	w22, #0
	csel	w8, w0, w8, ne
	cmp	w22, #1
	csel	w2, w9, w8, eq
	ldr	w1, [x27]
	mov	x0, x21
	bl	_sis5595_write_value
	ldr	x8, [x21, #8]
	ldr	w0, [x8, x26]
	bl	_DIV_FROM_REG
	mov	x1, x0
	mov	x0, x24
	bl	_FAN_TO_REG
	ldr	x8, [x21]
	str	w0, [x8, x26]
	mov	x0, x22
	bl	_SIS5595_REG_FAN_MIN
	mov	x1, x0
	ldr	x8, [x21]
	ldr	w2, [x8, x26]
	mov	x0, x21
	bl	_sis5595_write_value
	mov	x0, x20
	bl	_mutex_unlock
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SIS5595_REG_FANDIV,4,2         ; @SIS5595_REG_FANDIV
	.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,8,3                     ; @EINVAL
	.no_dead_strip	_set_fan_div
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.set_fan_div
l_switch.table.set_fan_div:
	.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
