	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vadc_check_revision
_vadc_check_revision:                   ## @vadc_check_revision
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_VADC_PERPH_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	callq	_vadc_read
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	-16(%rbp), %rdx
	movq	_VADC_PERPH_TYPE_ADC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jge	LBB0_3
## %bb.2:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
LBB0_9:
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_3:
	movq	_VADC_PERPH_SUBTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_vadc_read
	testl	%eax, %eax
	je	LBB0_4
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	movq	-16(%rbp), %rdx
	movq	_VADC_PERPH_SUBTYPE_VADC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jge	LBB0_6
## %bb.5:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_6:
	movq	_VADC_REVISION2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_vadc_read
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movq	-16(%rbp), %rdx
	movq	_VADC_REVISION2_SUPPORTED_VADC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	(%rcx), %rdx
	jge	LBB0_10
## %bb.8:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_VADC_PERPH_TYPE,4,2            ## @VADC_PERPH_TYPE
	.comm	_VADC_PERPH_TYPE_ADC,8,3        ## @VADC_PERPH_TYPE_ADC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d is not ADC\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_VADC_PERPH_SUBTYPE,4,2         ## @VADC_PERPH_SUBTYPE
	.comm	_VADC_PERPH_SUBTYPE_VADC,8,3    ## @VADC_PERPH_SUBTYPE_VADC
L_.str.1:                               ## @.str.1
	.asciz	"%d is not VADC\n"

	.comm	_VADC_REVISION2,4,2             ## @VADC_REVISION2
	.comm	_VADC_REVISION2_SUPPORTED_VADC,8,3 ## @VADC_REVISION2_SUPPORTED_VADC
L_.str.2:                               ## @.str.2
	.asciz	"revision %d not supported\n"

	.no_dead_strip	_vadc_check_revision
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vadc_check_revision
_vadc_check_revision:                   ; @vadc_check_revision
	.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	x19, x0
Lloh0:
	adrp	x8, _VADC_PERPH_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VADC_PERPH_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_vadc_read
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	x2, [sp, #8]
Lloh3:
	adrp	x8, _VADC_PERPH_TYPE_ADC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VADC_PERPH_TYPE_ADC@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_4
; %bb.2:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	bl	_dev_err
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _VADC_PERPH_SUBTYPE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VADC_PERPH_SUBTYPE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_vadc_read
	cbz	w0, LBB0_6
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
	ldr	x2, [sp, #8]
Lloh14:
	adrp	x8, _VADC_PERPH_SUBTYPE_VADC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VADC_PERPH_SUBTYPE_VADC@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_8
; %bb.7:
	ldr	w0, [x19]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_8:
Lloh19:
	adrp	x8, _VADC_REVISION2@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VADC_REVISION2@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_vadc_read
	cbnz	w0, LBB0_5
; %bb.9:
	ldr	x2, [sp, #8]
Lloh22:
	adrp	x8, _VADC_REVISION2_SUPPORTED_VADC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _VADC_REVISION2_SUPPORTED_VADC@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_11
; %bb.10:
	ldr	w0, [x19]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_11:
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_VADC_PERPH_TYPE,4,2            ; @VADC_PERPH_TYPE
	.comm	_VADC_PERPH_TYPE_ADC,8,3        ; @VADC_PERPH_TYPE_ADC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d is not ADC\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_VADC_PERPH_SUBTYPE,4,2         ; @VADC_PERPH_SUBTYPE
	.comm	_VADC_PERPH_SUBTYPE_VADC,8,3    ; @VADC_PERPH_SUBTYPE_VADC
l_.str.1:                               ; @.str.1
	.asciz	"%d is not VADC\n"

	.comm	_VADC_REVISION2,4,2             ; @VADC_REVISION2
	.comm	_VADC_REVISION2_SUPPORTED_VADC,8,3 ; @VADC_REVISION2_SUPPORTED_VADC
l_.str.2:                               ; @.str.2
	.asciz	"revision %d not supported\n"

	.no_dead_strip	_vadc_check_revision
.subsections_via_symbols
