	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nct7802_read_voltage
_nct7802_read_voltage:                  ## @nct7802_read_voltage
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_mutex_lock
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.1:
	movq	_REG_VOLTAGE_LIMIT_MSB_SHIFT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movq	-8(%rax,%rcx,8), %rax
	movslq	%r15d, %r12
	movl	$8, %r15d
	subl	(%rax,%r12,4), %r15d
	movl	4(%r14), %edi
	movq	_REG_VOLTAGE_LIMIT_LSB@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-8(%rax,%rcx,8), %rax
	movl	(%rax,%r12,4), %esi
	leaq	-40(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.2:
	movl	4(%r14), %edi
	movq	_REG_VOLTAGE_LIMIT_MSB@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r12,4), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.3:
	movl	-36(%rbp), %ebx
	movl	%r15d, %ecx
	shll	%cl, %ebx
	andl	$768, %ebx                      ## imm = 0x300
	orl	-40(%rbp), %ebx
	jmp	LBB0_7
LBB0_4:
	movl	4(%r14), %edi
	movq	_REG_VOLTAGE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %r12
	movl	(%rax,%r12,4), %esi
	leaq	-40(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.5:
	movl	4(%r14), %edi
	movq	_REG_VOLTAGE_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.6:
	movl	-40(%rbp), %eax
	shll	$2, %eax
	movl	-36(%rbp), %ebx
	shrl	$6, %ebx
	orl	%eax, %ebx
LBB0_7:
	movq	_nct7802_vmul@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	imull	(%rax,%r12,4), %ebx
	jmp	LBB0_12
LBB0_11:
	movl	%eax, %ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_VOLTAGE,8,3                ## @REG_VOLTAGE
	.comm	_REG_VOLTAGE_LOW,4,2            ## @REG_VOLTAGE_LOW
	.comm	_nct7802_vmul,8,3               ## @nct7802_vmul
	.comm	_REG_VOLTAGE_LIMIT_MSB_SHIFT,8,3 ## @REG_VOLTAGE_LIMIT_MSB_SHIFT
	.comm	_REG_VOLTAGE_LIMIT_LSB,8,3      ## @REG_VOLTAGE_LIMIT_LSB
	.comm	_REG_VOLTAGE_LIMIT_MSB,8,3      ## @REG_VOLTAGE_LIMIT_MSB
	.no_dead_strip	_nct7802_read_voltage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nct7802_read_voltage
_nct7802_read_voltage:                  ; @nct7802_read_voltage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_mutex_lock
	cbz	w21, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _REG_VOLTAGE_LIMIT_MSB_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_VOLTAGE_LIMIT_MSB_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sub	w9, w21, #1
	sbfiz	x9, x9, #3, #32
	ldr	x8, [x8, x9]
	sbfiz	x10, x20, #2, #32
	ldr	w22, [x8, x10]
Lloh3:
	adrp	x8, _REG_VOLTAGE_LIMIT_LSB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_VOLTAGE_LIMIT_LSB@GOTPAGEOFF]
	ldr	w0, [x19, #4]
Lloh5:
	ldr	x8, [x8]
	ldr	x8, [x8, x9]
	ldr	w1, [x8, x10]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_8
; %bb.2:
	sxtw	x20, w20
	ldr	w0, [x19, #4]
Lloh6:
	adrp	x8, _REG_VOLTAGE_LIMIT_MSB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_VOLTAGE_LIMIT_MSB@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w1, [x8, x20, lsl #2]
	add	x2, sp, #8
	bl	_regmap_read
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	w8, #8
	sub	w8, w8, w22
	ldp	w10, w9, [sp, #8]
	lsl	w8, w10, w8
	and	w8, w8, #0x300
	orr	w8, w8, w9
	b	LBB0_7
LBB0_4:
	ldr	w0, [x19, #4]
Lloh9:
	adrp	x8, _REG_VOLTAGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_VOLTAGE@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	w1, [x8, w20, sxtw #2]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_8
; %bb.5:
	ldr	w0, [x19, #4]
Lloh12:
	adrp	x8, _REG_VOLTAGE_LOW@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_VOLTAGE_LOW@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_regmap_read
	tbnz	w0, #31, LBB0_8
; %bb.6:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	sxtw	x20, w20
	ldp	w9, w8, [sp, #8]
	lsr	w9, w9, #6
	orr	w8, w9, w8, lsl #2
LBB0_7:
Lloh15:
	adrp	x9, _nct7802_vmul@GOTPAGE
Lloh16:
	ldr	x9, [x9, _nct7802_vmul@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	ldr	w9, [x9, x20, lsl #2]
	mul	w21, w8, w9
	b	LBB0_9
LBB0_8:
	mov	x21, x0
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_VOLTAGE,8,3                ; @REG_VOLTAGE
	.comm	_REG_VOLTAGE_LOW,4,2            ; @REG_VOLTAGE_LOW
	.comm	_nct7802_vmul,8,3               ; @nct7802_vmul
	.comm	_REG_VOLTAGE_LIMIT_MSB_SHIFT,8,3 ; @REG_VOLTAGE_LIMIT_MSB_SHIFT
	.comm	_REG_VOLTAGE_LIMIT_LSB,8,3      ; @REG_VOLTAGE_LIMIT_LSB
	.comm	_REG_VOLTAGE_LIMIT_MSB,8,3      ; @REG_VOLTAGE_LIMIT_MSB
	.no_dead_strip	_nct7802_read_voltage
.subsections_via_symbols
