	.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, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr
	movslq	(%rax), %r15
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %rbx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtoul
	movq	%rax, %r14
	leaq	16(%rbx), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_IT87_REG_FAN_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_it87_read_value
	movl	%eax, %r13d
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movq	(%rax,%r15,8), %r12
	movl	(%rcx,%r15,4), %edi
	callq	_DIV_FROM_REG
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_FAN_FROM_REG
	movl	%eax, %r12d
	cmpq	$2, %r15
	jae	LBB0_1
## %bb.4:
	movq	%r14, %rdi
	callq	_DIV_TO_REG
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx,%r15,4)
	jmp	LBB0_3
LBB0_1:
	cmpl	$2, %r15d
	jne	LBB0_2
## %bb.5:
	movq	8(%rbx), %rcx
	cmpq	$7, %r14
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	_IT87_REG_FAN_DIV@GOTPCREL(%rip), %rdi
	ja	LBB0_7
## %bb.6:
	movl	$1, (%rcx,%r15,4)
	jmp	LBB0_8
LBB0_2:
	movq	8(%rbx), %rcx
LBB0_3:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	_IT87_REG_FAN_DIV@GOTPCREL(%rip), %rdi
LBB0_8:
	andl	$128, %r13d
	movl	(%rcx), %eax
	movl	4(%rcx), %edx
	andl	$7, %eax
	orq	%r13, %rax
	andl	$7, %edx
	leaq	(%rax,%rdx,8), %rsi
	cmpl	$3, 8(%rcx)
	leaq	64(%rax,%rdx,8), %rdx
	cmovneq	%rsi, %rdx
	movl	(%rdi), %esi
	movq	%rbx, %rdi
	callq	_it87_write_value
	movq	8(%rbx), %rax
	movl	(%rax,%r15,4), %edi
	callq	_DIV_FROM_REG
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_FAN_TO_REG
	movq	(%rbx), %rcx
	movq	%rax, (%rcx,%r15,8)
	movq	_IT87_REG_FAN_MIN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r15,4), %esi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	callq	_it87_write_value
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	$3, (%rcx,%r15,4)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_IT87_REG_FAN_DIV,4,2           ## @IT87_REG_FAN_DIV
	.comm	_IT87_REG_FAN_MIN,8,3           ## @IT87_REG_FAN_MIN
	.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	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	x21, x2
	mov	x20, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr
	ldr	w27, [x0]
	mov	x0, x20
	bl	_dev_get_drvdata
	mov	x20, x0
	mov	x0, x21
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtoul
	mov	x24, x0
	add	x21, x20, #16
	mov	x0, x21
	bl	_mutex_lock
Lloh0:
	adrp	x26, _IT87_REG_FAN_DIV@GOTPAGE
Lloh1:
	ldr	x26, [x26, _IT87_REG_FAN_DIV@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x20
	bl	_it87_read_value
	mov	x23, x0
	sxtw	x25, w27
	ldp	x8, x9, [x20]
	ldr	x22, [x8, w27, sxtw #3]
	ldr	w0, [x9, w27, sxtw #2]
	bl	_DIV_FROM_REG
	mov	x1, x0
	mov	x0, x22
	bl	_FAN_FROM_REG
	mov	x22, x0
	cmp	w27, #2
	b.hs	LBB0_2
; %bb.1:
	mov	x0, x24
	bl	_DIV_TO_REG
	ldr	x8, [x20, #8]
	str	w0, [x8, x25, lsl #2]
	b	LBB0_8
LBB0_2:
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x20, #8]
	cmp	x24, #7
	b.hi	LBB0_6
; %bb.4:
	mov	w9, #1
	b	LBB0_7
LBB0_5:
	ldr	x8, [x20, #8]
	b	LBB0_8
LBB0_6:
	mov	w9, #3
LBB0_7:
	str	w9, [x8, x25, lsl #2]
LBB0_8:
	and	x9, x23, #0x80
	ldp	w10, w11, [x8]
	bfxil	x9, x10, #0, #3
	lsl	w10, w11, #3
	and	x10, x10, #0x38
	orr	x9, x9, x10
	ldr	w8, [x8, #8]
	orr	x10, x9, #0x40
	cmp	w8, #3
	csel	x2, x10, x9, eq
	ldr	w1, [x26]
	mov	x0, x20
	bl	_it87_write_value
	ldr	x8, [x20, #8]
	lsl	x23, x25, #2
	ldr	w0, [x8, x23]
	bl	_DIV_FROM_REG
	mov	x1, x0
	mov	x0, x22
	bl	_FAN_TO_REG
	mov	x2, x0
	ldr	x8, [x20]
	str	x0, [x8, x25, lsl #3]
Lloh2:
	adrp	x8, _IT87_REG_FAN_MIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IT87_REG_FAN_MIN@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	w1, [x8, x23]
	mov	x0, x20
	bl	_it87_write_value
	mov	x0, x21
	bl	_mutex_unlock
	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	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IT87_REG_FAN_DIV,4,2           ; @IT87_REG_FAN_DIV
	.comm	_IT87_REG_FAN_MIN,8,3           ; @IT87_REG_FAN_MIN
	.no_dead_strip	_set_fan_div
.subsections_via_symbols
