	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r12
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r14
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtol
	movl	%eax, %r12d
	leaq	8(%r13), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_VIA686A_REG_FANDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_via686a_read_value
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_DIV_TO_REG
	movq	(%r13), %rcx
	movl	%eax, (%rcx,%r14,4)
	andl	$15, %ebx
	movl	(%rcx), %edx
	movl	4(%rcx), %eax
	shll	$6, %eax
	orl	%ebx, %eax
	shll	$4, %edx
	orl	%eax, %edx
	movq	_VIA686A_REG_FANDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_via686a_write_value
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIA686A_REG_FANDIV,4,2         ## @VIA686A_REG_FANDIV
	.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:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	bl	_dev_get_drvdata
	mov	x22, x0
	mov	x0, x21
	bl	_to_sensor_dev_attr
	ldrsw	x24, [x0]
	mov	x0, x20
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtol
	mov	x20, x0
	add	x21, x22, #8
	mov	x0, x21
	bl	_mutex_lock
Lloh0:
	adrp	x25, _VIA686A_REG_FANDIV@GOTPAGE
Lloh1:
	ldr	x25, [x25, _VIA686A_REG_FANDIV@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x22
	bl	_via686a_read_value
	mov	x23, x0
	mov	x0, x20
	bl	_DIV_TO_REG
	ldr	x8, [x22]
	str	w0, [x8, x24, lsl #2]
	and	w9, w23, #0xf
	ldp	w8, w10, [x8]
	bfi	w9, w10, #6, #26
	orr	w2, w9, w8, lsl #4
	ldr	w1, [x25]
	mov	x0, x22
	bl	_via686a_write_value
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_VIA686A_REG_FANDIV,4,2         ; @VIA686A_REG_FANDIV
	.no_dead_strip	_set_fan_div
.subsections_via_symbols
