	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nct6775_select_fan_div
_nct6775_select_fan_div:                ## @nct6775_select_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	%rsi, %rbx
	cmpl	$0, 32(%rsi)
	je	LBB0_14
## %bb.1:
	movl	%edx, %r14d
	movq	%rdi, %rsi
	movq	(%rbx), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edi
	testl	%ecx, %ecx
	jne	LBB0_4
## %bb.2:
	cmpl	$6, %edi
	jg	LBB0_4
## %bb.3:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	leal	1(%rdi), %r12d
	jmp	LBB0_6
LBB0_4:
	testl	%ecx, %ecx
	setne	%al
	cmpl	$48, %ecx
	setl	%cl
	andb	%al, %cl
	testl	%edi, %edi
	setg	%al
	andb	%cl, %al
	cmpb	$1, %al
	jne	LBB0_14
## %bb.5:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movzbl	%al, %eax
	movl	%edi, %r12d
	subl	%eax, %r12d
LBB0_6:
	leal	1(%r14), %r13d
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_div_from_reg
	movl	%eax, %r15d
	movl	%r12d, %edi
	callq	_div_from_reg
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %edx
	movl	%r15d, %ecx
	movl	%eax, %r8d
	callq	_dev_dbg
	movl	8(%rbx), %r15d
	movl	%r14d, %edi
	callq	_BIT
	testl	%r15d, %eax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_13
## %bb.7:
	movq	(%rbx), %rcx
	movq	16(%rbx), %rax
	movl	(%rax,%r15,4), %esi
	cmpl	(%rcx,%r15,4), %r12d
	jle	LBB0_9
## %bb.8:
	cmpl	$255, %esi
	setne	%dl
	cmpl	$2, %esi
	setge	%cl
	andb	%dl, %cl
	movl	%esi, %edx
	sarl	%cl, %edx
	jmp	LBB0_11
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	$255, %edx
	cmpl	$255, %esi
	je	LBB0_11
## %bb.10:
	leal	(%rsi,%rsi), %ecx
	cmpl	$254, %ecx
	movl	$254, %edx
	cmovll	%ecx, %edx
LBB0_11:
	cmpl	%esi, %edx
	je	LBB0_13
## %bb.12:
	movl	%edx, (%rax,%r15,4)
	movq	24(%rbx), %rax
	movl	(%rax,%r15,4), %esi
	movq	%rbx, %rdi
	callq	_nct6775_write_value
LBB0_13:
	movq	(%rbx), %rax
	movl	%r12d, (%rax,%r15,4)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nct6775_write_fan_div_common   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Modifying fan%d clock divider from %u to %u\n"

	.no_dead_strip	_nct6775_select_fan_div
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nct6775_select_fan_div
_nct6775_select_fan_div:                ; @nct6775_select_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
	ldr	w8, [x1, #32]
	cbz	w8, LBB0_10
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x8, [x1]
	ldr	w0, [x8, w2, sxtw #2]
	cbnz	w3, LBB0_4
; %bb.2:
	cmp	w0, #6
	b.gt	LBB0_4
; %bb.3:
	add	w21, w0, #1
	b	LBB0_6
LBB0_4:
	cmp	w3, #0
	mov	w8, #48
	ccmp	w3, w8, #0, ne
	ccmp	w0, #0, #4, lt
	cset	w8, gt
	b.le	LBB0_10
; %bb.5:
	sub	w21, w0, w8
LBB0_6:
	sxtw	x25, w19
	add	w23, w19, #1
	bl	_div_from_reg
	mov	x24, x0
	mov	x0, x21
	bl	_div_from_reg
	mov	x4, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x23
	mov	x3, x24
	bl	_dev_dbg
	ldr	w22, [x20, #8]
	mov	x0, x19
	bl	_BIT
	tst	w0, w22
	b.eq	LBB0_9
; %bb.7:
	ldr	x9, [x20, #16]
	lsl	x8, x25, #2
	ldr	w10, [x9, x8]
	ldr	x11, [x20]
	ldr	w11, [x11, x8]
	mov	w12, #255
	lsl	w13, w10, #1
	mov	w14, #254
	cmp	w13, #254
	csel	w13, w13, w14, lt
	cmp	w10, #255
	csel	w12, w12, w13, eq
	ccmp	w10, #1, #4, ne
	cset	w13, gt
	asr	w13, w10, w13
	cmp	w21, w11
	csel	w2, w12, w13, le
	cmp	w2, w10
	b.eq	LBB0_9
; %bb.8:
	str	w2, [x9, x8]
	ldr	x9, [x20, #24]
	ldr	w1, [x9, x8]
	mov	x0, x20
	bl	_nct6775_write_value
LBB0_9:
	ldr	x8, [x20]
	str	w21, [x8, x25, lsl #2]
	mov	x0, x20
	mov	x1, 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
	b	_nct6775_write_fan_div_common
LBB0_10:
	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 AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Modifying fan%d clock divider from %u to %u\n"

	.no_dead_strip	_nct6775_select_fan_div
.subsections_via_symbols
