	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nct7904_read_fan
_nct7904_read_fan:                      ## @nct7904_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r12d
	movl	%esi, %ebx
	callq	_dev_get_drvdata
	movq	%rax, %r15
	cmpl	$128, %ebx
	je	LBB0_7
## %bb.1:
	cmpl	$130, %ebx
	je	LBB0_11
## %bb.2:
	cmpl	$129, %ebx
	jne	LBB0_14
## %bb.3:
	movq	_BANK_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FANIN1_HV_REG@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_7:
	movq	_BANK_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FANIN1_HV_HL_REG@GOTPCREL(%rip), %rax
LBB0_4:
	addl	%r12d, %r12d
	addl	(%rax), %r12d
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_nct7904_read_reg16
	movl	%eax, %esi
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	movl	%esi, %eax
	shrl	$3, %eax
	andl	$8160, %eax                     ## imm = 0x1FE0
	andl	$31, %esi
	orl	%eax, %esi
	xorl	%ecx, %ecx
	cmpl	$8191, %esi                     ## imm = 0x1FFF
	jne	LBB0_9
## %bb.6:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_11:
	movq	_BANK_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SMI_STS5_REG@GOTPCREL(%rip), %rax
	movl	%r12d, %ebx
	sarl	$3, %ebx
	movl	(%rax), %edx
	addl	%ebx, %edx
	movq	%r15, %rdi
	callq	_nct7904_read_reg
	movl	%eax, %ecx
	testl	%eax, %eax
	js	LBB0_15
## %bb.12:
	movq	(%r15), %rax
	movslq	%ebx, %rdx
	movl	(%rax,%rdx,4), %edi
	movzbl	%cl, %esi
	orq	%rdi, %rsi
	andl	$7, %r12d
	movq	%rsi, %rdi
	movl	%r12d, %ecx
	shrq	%cl, %rdi
	movl	%esi, (%rax,%rdx,4)
	xorl	%ecx, %ecx
	andq	$1, %rdi
	movq	%rdi, (%r14)
	je	LBB0_15
## %bb.13:
	btcl	%r12d, %esi
	movl	%esi, (%rax,%rdx,4)
	jmp	LBB0_15
LBB0_14:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	jmp	LBB0_15
LBB0_8:
	movl	%esi, %ecx
	jmp	LBB0_15
LBB0_9:
	movl	$1350000, %eax                  ## imm = 0x149970
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_10:
	movq	%rax, (%r14)
LBB0_15:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BANK_0,4,2                     ## @BANK_0
	.comm	_FANIN1_HV_REG,4,2              ## @FANIN1_HV_REG
	.comm	_BANK_1,4,2                     ## @BANK_1
	.comm	_FANIN1_HV_HL_REG,4,2           ## @FANIN1_HV_HL_REG
	.comm	_SMI_STS5_REG,4,2               ## @SMI_STS5_REG
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_nct7904_read_fan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nct7904_read_fan
_nct7904_read_fan:                      ; @nct7904_read_fan
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	bl	_dev_get_drvdata
	mov	x21, x0
	cmp	w22, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w22, #130
	b.eq	LBB0_8
; %bb.2:
	cmp	w22, #129
	b.ne	LBB0_11
; %bb.3:
Lloh0:
	adrp	x8, _BANK_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BANK_0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _FANIN1_HV_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FANIN1_HV_REG@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _BANK_1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BANK_1@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _FANIN1_HV_HL_REG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FANIN1_HV_HL_REG@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	add	w2, w8, w20, lsl #1
	mov	x0, x21
	bl	_nct7904_read_reg16
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_14
; %bb.6:
	lsr	w8, w0, #3
	and	w8, w8, #0x1fe0
	bfxil	w8, w0, #0, #5
	mov	w9, #8191
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.7:
	mov	x8, #0
	b	LBB0_13
LBB0_8:
Lloh10:
	adrp	x8, _BANK_0@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BANK_0@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _SMI_STS5_REG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SMI_STS5_REG@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	asr	w22, w20, #3
	add	w2, w8, w22
	mov	x0, x21
	bl	_nct7904_read_reg
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_14
; %bb.9:
	ldr	x8, [x21]
	sbfiz	x10, x22, #2, #32
	ldr	w9, [x8, x10]
	and	x11, x0, #0xff
	orr	x9, x9, x11
	str	w9, [x8, x10]
	and	x10, x20, #0x7
	lsr	x11, x9, x10
	and	x11, x11, #0x1
	str	x11, [x19]
	mov	w0, #0
	cbz	w11, LBB0_14
; %bb.10:
	sxtw	x11, w22
	mov	w12, #1
	lsl	w10, w12, w10
	eor	w9, w9, w10
	str	w9, [x8, x11, lsl #2]
	b	LBB0_14
LBB0_11:
Lloh16:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_12:
	mov	w9, #39280
	movk	w9, #20, lsl #16
	udiv	w8, w9, w8
LBB0_13:
	mov	w0, #0
	str	x8, [x19]
LBB0_14:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_BANK_0,4,2                     ; @BANK_0
	.comm	_FANIN1_HV_REG,4,2              ; @FANIN1_HV_REG
	.comm	_BANK_1,4,2                     ; @BANK_1
	.comm	_FANIN1_HV_HL_REG,4,2           ; @FANIN1_HV_HL_REG
	.comm	_SMI_STS5_REG,4,2               ; @SMI_STS5_REG
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_nct7904_read_fan
.subsections_via_symbols
