	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nct7904_write_in
_nct7904_write_in:                      ## @nct7904_write_in
	.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, %r15
	movl	%edx, %ebx
	movl	%esi, %r13d
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	_nct7904_chan_to_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movl	(%rax,%rcx,4), %r12d
	xorl	%eax, %eax
	cmpl	$14, %r12d
	setge	%al
	leaq	2(,%rax,4), %rcx
	movq	%r15, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%r15, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_3
LBB0_1:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$2047, %edx                     ## imm = 0x7FF
	callq	_clamp_val
	movq	%rax, %r15
	cmpl	$129, %r13d
	je	LBB0_10
## %bb.4:
	cmpl	$128, %r13d
	jne	LBB0_13
## %bb.5:
	movq	_BANK_1@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_VSEN1_LV_LL_REG@GOTPCREL(%rip), %rbx
	shll	$2, %r12d
	movl	(%rbx), %edx
	addl	%r12d, %edx
	movq	%r14, %rdi
	callq	_nct7904_read_reg
	testl	%eax, %eax
	js	LBB0_14
## %bb.6:
	andl	$-8, %eax
	movl	%r15d, %ecx
	andl	$7, %ecx
	orl	%eax, %ecx
	movl	(%r13), %esi
	movl	(%rbx), %edx
	addl	%r12d, %edx
	movq	%r14, %rdi
	callq	_nct7904_write_reg
	testl	%eax, %eax
	js	LBB0_14
## %bb.7:
	movl	(%r13), %esi
	movq	_VSEN1_HV_LL_REG@GOTPCREL(%rip), %rbx
	jmp	LBB0_8
LBB0_10:
	movq	_BANK_1@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_VSEN1_LV_HL_REG@GOTPCREL(%rip), %rbx
	shll	$2, %r12d
	movl	(%rbx), %edx
	addl	%r12d, %edx
	movq	%r14, %rdi
	callq	_nct7904_read_reg
	testl	%eax, %eax
	js	LBB0_14
## %bb.11:
	andl	$-8, %eax
	movl	%r15d, %ecx
	andl	$7, %ecx
	orl	%eax, %ecx
	movl	(%r13), %esi
	movl	(%rbx), %edx
	addl	%r12d, %edx
	movq	%r14, %rdi
	callq	_nct7904_write_reg
	testl	%eax, %eax
	js	LBB0_14
## %bb.12:
	movl	(%r13), %esi
	movq	_VSEN1_HV_HL_REG@GOTPCREL(%rip), %rbx
LBB0_8:
	movl	(%rbx), %edx
	addl	%r12d, %edx
	movq	%r14, %rdi
	callq	_nct7904_read_reg
	testl	%eax, %eax
	js	LBB0_14
## %bb.9:
	shrl	$3, %r15d
	movzbl	%r15b, %ecx
	movl	(%r13), %esi
	addl	(%rbx), %r12d
	movq	%r14, %rdi
	movl	%r12d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nct7904_write_reg              ## TAILCALL
LBB0_13:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nct7904_chan_to_index,8,3      ## @nct7904_chan_to_index
	.comm	_BANK_1,4,2                     ## @BANK_1
	.comm	_VSEN1_LV_LL_REG,4,2            ## @VSEN1_LV_LL_REG
	.comm	_VSEN1_HV_LL_REG,4,2            ## @VSEN1_HV_LL_REG
	.comm	_VSEN1_LV_HL_REG,4,2            ## @VSEN1_LV_HL_REG
	.comm	_VSEN1_HV_HL_REG,4,2            ## @VSEN1_HV_HL_REG
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_nct7904_write_in
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nct7904_write_in
_nct7904_write_in:                      ; @nct7904_write_in
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	bl	_dev_get_drvdata
	mov	x19, x0
Lloh0:
	adrp	x8, _nct7904_chan_to_index@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nct7904_chan_to_index@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w22, [x8, w22, sxtw #2]
	cmp	w22, #14
	mov	w8, #6
	mov	w9, #2
	csel	x8, x9, x8, lt
	sdiv	x0, x20, x8
	mov	w1, #0
	mov	w2, #2047
	bl	_clamp_val
	mov	x20, x0
	cmp	w21, #129
	b.eq	LBB0_5
; %bb.1:
	cmp	w21, #128
	b.ne	LBB0_10
; %bb.2:
Lloh3:
	adrp	x21, _BANK_1@GOTPAGE
Lloh4:
	ldr	x21, [x21, _BANK_1@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh5:
	adrp	x23, _VSEN1_LV_LL_REG@GOTPAGE
Lloh6:
	ldr	x23, [x23, _VSEN1_LV_LL_REG@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	w22, w22, #2
	add	w2, w8, w22
	mov	x0, x19
	bl	_nct7904_read_reg
	mov	x3, x0
	tbnz	w0, #31, LBB0_12
; %bb.3:
	bfxil	w3, w20, #0, #3
	ldr	w1, [x21]
	ldr	w8, [x23]
	add	w2, w8, w22
	mov	x0, x19
	bl	_nct7904_write_reg
	tbnz	w0, #31, LBB0_11
; %bb.4:
	ldr	w1, [x21]
Lloh7:
	adrp	x23, _VSEN1_HV_LL_REG@GOTPAGE
Lloh8:
	ldr	x23, [x23, _VSEN1_HV_LL_REG@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh9:
	adrp	x21, _BANK_1@GOTPAGE
Lloh10:
	ldr	x21, [x21, _BANK_1@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh11:
	adrp	x23, _VSEN1_LV_HL_REG@GOTPAGE
Lloh12:
	ldr	x23, [x23, _VSEN1_LV_HL_REG@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	w22, w22, #2
	add	w2, w8, w22
	mov	x0, x19
	bl	_nct7904_read_reg
	mov	x3, x0
	tbnz	w0, #31, LBB0_12
; %bb.6:
	bfxil	w3, w20, #0, #3
	ldr	w1, [x21]
	ldr	w8, [x23]
	add	w2, w8, w22
	mov	x0, x19
	bl	_nct7904_write_reg
	tbnz	w0, #31, LBB0_11
; %bb.7:
	ldr	w1, [x21]
Lloh13:
	adrp	x23, _VSEN1_HV_HL_REG@GOTPAGE
Lloh14:
	ldr	x23, [x23, _VSEN1_HV_HL_REG@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x23]
	add	w2, w8, w22
	mov	x0, x19
	bl	_nct7904_read_reg
	tbnz	w0, #31, LBB0_11
; %bb.9:
	ubfx	w3, w20, #3, #8
	ldr	w1, [x21]
	ldr	w8, [x23]
	add	w2, w8, w22
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_nct7904_write_reg
LBB0_10:
Lloh15:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w3, w8
	b	LBB0_12
LBB0_11:
	mov	x3, x0
LBB0_12:
	mov	x0, x3
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_nct7904_chan_to_index,8,3      ; @nct7904_chan_to_index
	.comm	_BANK_1,4,2                     ; @BANK_1
	.comm	_VSEN1_LV_LL_REG,4,2            ; @VSEN1_LV_LL_REG
	.comm	_VSEN1_HV_LL_REG,4,2            ; @VSEN1_HV_LL_REG
	.comm	_VSEN1_LV_HL_REG,4,2            ; @VSEN1_LV_HL_REG
	.comm	_VSEN1_HV_HL_REG,4,2            ; @VSEN1_HV_HL_REG
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_nct7904_write_in
.subsections_via_symbols
