	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vadc_measure_ref_points
_vadc_measure_ref_points:               ## @vadc_measure_ref_points
	.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
	movq	%rdi, %r14
	movq	_VADC_RATIOMETRIC_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rdi), %rcx
	movq	_VADC_CALIB_RATIOMETRIC@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movl	%eax, 16(%rcx,%rdx,8)
	movq	_VADC_ABSOLUTE_RANGE_UV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_VADC_CALIB_ABSOLUTE@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movl	%eax, 16(%rcx,%rdx,8)
	movq	_VADC_REF_1250MV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_vadc_get_channel
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_vadc_do_conversion
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_VADC_SPARE1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vadc_get_channel
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	_VADC_REF_625MV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vadc_get_channel
LBB0_3:
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_vadc_do_conversion
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
LBB0_4:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	-48(%rbp), %rax
	subq	-40(%rbp), %rax
	jne	LBB0_9
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_13
## %bb.8:
	negl	%ebx
	jmp	LBB0_4
LBB0_9:
	movq	8(%r14), %rcx
	movq	(%r12), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movq	%rax, 8(%rcx,%rdx,8)
	movq	-40(%rbp), %rax
	movq	(%r12), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	_VADC_VDD_VADC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vadc_get_channel
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_vadc_do_conversion
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.10:
	movq	_VADC_GND_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vadc_get_channel
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_vadc_do_conversion
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.11:
	movq	-48(%rbp), %rax
	subq	-40(%rbp), %rax
	je	LBB0_7
## %bb.12:
	movq	8(%r14), %rcx
	movq	(%r15), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movq	%rax, 8(%rcx,%rdx,8)
	movq	-40(%rbp), %rax
	movq	(%r15), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movq	%rax, (%rcx,%rdx,8)
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_VADC_RATIOMETRIC_RANGE,4,2     ## @VADC_RATIOMETRIC_RANGE
	.comm	_VADC_CALIB_RATIOMETRIC,8,3     ## @VADC_CALIB_RATIOMETRIC
	.comm	_VADC_ABSOLUTE_RANGE_UV,4,2     ## @VADC_ABSOLUTE_RANGE_UV
	.comm	_VADC_CALIB_ABSOLUTE,8,3        ## @VADC_CALIB_ABSOLUTE
	.comm	_VADC_REF_1250MV,4,2            ## @VADC_REF_1250MV
	.comm	_VADC_SPARE1,4,2                ## @VADC_SPARE1
	.comm	_VADC_REF_625MV,4,2             ## @VADC_REF_625MV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VADC_VDD_VADC,4,2              ## @VADC_VDD_VADC
	.comm	_VADC_GND_REF,4,2               ## @VADC_GND_REF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"measure reference points failed\n"

	.no_dead_strip	_vadc_measure_ref_points
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vadc_measure_ref_points
_vadc_measure_ref_points:               ; @vadc_measure_ref_points
	.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	x19, x0
Lloh0:
	adrp	x8, _VADC_RATIOMETRIC_RANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VADC_RATIOMETRIC_RANGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x0, #8]
Lloh3:
	adrp	x21, _VADC_CALIB_RATIOMETRIC@GOTPAGE
Lloh4:
	ldr	x21, [x21, _VADC_CALIB_RATIOMETRIC@GOTPAGEOFF]
	ldr	x10, [x21]
	mov	w11, #24
	madd	x10, x10, x11, x9
	str	w8, [x10, #16]
Lloh5:
	adrp	x8, _VADC_ABSOLUTE_RANGE_UV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VADC_ABSOLUTE_RANGE_UV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x22, _VADC_CALIB_ABSOLUTE@GOTPAGE
Lloh9:
	ldr	x22, [x22, _VADC_CALIB_ABSOLUTE@GOTPAGEOFF]
	ldr	x10, [x22]
	madd	x9, x10, x11, x9
	str	w8, [x9, #16]
Lloh10:
	adrp	x8, _VADC_REF_1250MV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VADC_REF_1250MV@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_vadc_get_channel
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x19
	bl	_vadc_do_conversion
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.1:
Lloh13:
	adrp	x8, _VADC_SPARE1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VADC_SPARE1@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vadc_get_channel
	mov	x1, x0
	cbnz	x0, LBB0_3
; %bb.2:
Lloh16:
	adrp	x8, _VADC_REF_625MV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VADC_REF_625MV@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vadc_get_channel
	mov	x1, x0
LBB0_3:
	mov	x2, sp
	mov	x0, x19
	bl	_vadc_do_conversion
	mov	x20, x0
	cbz	w0, LBB0_6
LBB0_4:
	ldr	w0, [x19]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_5:
	mov	x0, x20
	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
LBB0_6:
	ldp	x9, x8, [sp]
	subs	x8, x8, x9
	b.ne	LBB0_9
LBB0_7:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cbz	w8, LBB0_13
; %bb.8:
	neg	w20, w8
	b	LBB0_4
LBB0_9:
	ldr	x9, [x19, #8]
	ldr	x10, [x22]
	mov	w11, #24
	madd	x10, x10, x11, x9
	str	x8, [x10, #8]
	ldr	x8, [sp]
	ldr	x10, [x22]
	mul	x10, x10, x11
	str	x8, [x9, x10]
Lloh24:
	adrp	x8, _VADC_VDD_VADC@GOTPAGE
Lloh25:
	ldr	x8, [x8, _VADC_VDD_VADC@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vadc_get_channel
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x19
	bl	_vadc_do_conversion
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.10:
Lloh27:
	adrp	x8, _VADC_GND_REF@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VADC_GND_REF@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vadc_get_channel
	mov	x1, x0
	mov	x2, sp
	mov	x0, x19
	bl	_vadc_do_conversion
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.11:
	ldp	x9, x8, [sp]
	subs	x8, x8, x9
	b.eq	LBB0_7
; %bb.12:
	mov	w20, #0
	ldr	x9, [x19, #8]
	ldr	x10, [x21]
	mov	w11, #24
	madd	x10, x10, x11, x9
	str	x8, [x10, #8]
	ldr	x8, [sp]
	ldr	x10, [x21]
	mul	x10, x10, x11
	str	x8, [x9, x10]
	b	LBB0_5
LBB0_13:
	mov	w20, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_VADC_RATIOMETRIC_RANGE,4,2     ; @VADC_RATIOMETRIC_RANGE
	.comm	_VADC_CALIB_RATIOMETRIC,8,3     ; @VADC_CALIB_RATIOMETRIC
	.comm	_VADC_ABSOLUTE_RANGE_UV,4,2     ; @VADC_ABSOLUTE_RANGE_UV
	.comm	_VADC_CALIB_ABSOLUTE,8,3        ; @VADC_CALIB_ABSOLUTE
	.comm	_VADC_REF_1250MV,4,2            ; @VADC_REF_1250MV
	.comm	_VADC_SPARE1,4,2                ; @VADC_SPARE1
	.comm	_VADC_REF_625MV,4,2             ; @VADC_REF_625MV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VADC_VDD_VADC,4,2              ; @VADC_VDD_VADC
	.comm	_VADC_GND_REF,4,2               ; @VADC_GND_REF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"measure reference points failed\n"

	.no_dead_strip	_vadc_measure_ref_points
.subsections_via_symbols
