	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nct7802_read_fan
_nct7802_read_fan:                      ## @nct7802_read_fan
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_mutex_lock
	movl	4(%r14), %edi
	leaq	-24(%rbp), %rdx
	movl	%ebx, %esi
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movl	4(%r14), %edi
	movq	_REG_FANCOUNT_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:
	movl	-24(%rbp), %eax
	shll	$5, %eax
	movl	-20(%rbp), %esi
	shrl	$3, %esi
	xorl	%ebx, %ebx
	orl	%eax, %esi
	je	LBB0_6
## %bb.3:
	cmpl	$8191, %esi                     ## imm = 0x1FFF
	je	LBB0_6
## %bb.4:
	movl	$1350000, %edi                  ## imm = 0x149970
	callq	_DIV_ROUND_CLOSEST
LBB0_5:
	movl	%eax, %ebx
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_FANCOUNT_LOW,4,2           ## @REG_FANCOUNT_LOW
	.no_dead_strip	_nct7802_read_fan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nct7802_read_fan
_nct7802_read_fan:                      ; @nct7802_read_fan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_mutex_lock
	ldr	w0, [x19, #4]
	add	x2, sp, #12
	mov	x1, x20
	bl	_regmap_read
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x8, _REG_FANCOUNT_LOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_FANCOUNT_LOW@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_regmap_read
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldp	w9, w8, [sp, #8]
	lsr	w9, w9, #3
	orr	w1, w9, w8, lsl #5
	cmp	w1, #0
	mov	w8, #8191
	ccmp	w1, w8, #4, ne
	b.ne	LBB0_4
; %bb.3:
	mov	w20, #0
	b	LBB0_6
LBB0_4:
	mov	w0, #39280
	movk	w0, #20, lsl #16
	bl	_DIV_ROUND_CLOSEST
LBB0_5:
	mov	x20, x0
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_FANCOUNT_LOW,4,2           ; @REG_FANCOUNT_LOW
	.no_dead_strip	_nct7802_read_fan
.subsections_via_symbols
