	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iadc_version_check
_iadc_version_check:                    ## @iadc_version_check
	.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	_IADC_PERPH_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	callq	_iadc_read
	testl	%eax, %eax
	js	LBB0_10
## %bb.1:
	movq	-16(%rbp), %rdx
	movq	_IADC_PERPH_TYPE_ADC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jge	LBB0_3
## %bb.2:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_9
LBB0_3:
	movq	_IADC_PERPH_SUBTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_iadc_read
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:
	movq	-16(%rbp), %rdx
	movq	_IADC_PERPH_SUBTYPE_IADC@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	_IADC_REVISION2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_iadc_read
	testl	%eax, %eax
	js	LBB0_10
## %bb.7:
	movq	-16(%rbp), %rdx
	movq	_IADC_REVISION2_SUPPORTED_IADC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	(%rcx), %rdx
	jge	LBB0_10
## %bb.8:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_9:
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IADC_PERPH_TYPE,4,2            ## @IADC_PERPH_TYPE
	.comm	_IADC_PERPH_TYPE_ADC,8,3        ## @IADC_PERPH_TYPE_ADC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d is not ADC\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IADC_PERPH_SUBTYPE,4,2         ## @IADC_PERPH_SUBTYPE
	.comm	_IADC_PERPH_SUBTYPE_IADC,8,3    ## @IADC_PERPH_SUBTYPE_IADC
L_.str.1:                               ## @.str.1
	.asciz	"%d is not IADC\n"

	.comm	_IADC_REVISION2,4,2             ## @IADC_REVISION2
	.comm	_IADC_REVISION2_SUPPORTED_IADC,8,3 ## @IADC_REVISION2_SUPPORTED_IADC
L_.str.2:                               ## @.str.2
	.asciz	"revision %d not supported\n"

	.no_dead_strip	_iadc_version_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iadc_version_check
_iadc_version_check:                    ; @iadc_version_check
	.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, _IADC_PERPH_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IADC_PERPH_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_iadc_read
	tbnz	w0, #31, LBB0_10
; %bb.1:
	ldr	x2, [sp, #8]
Lloh3:
	adrp	x8, _IADC_PERPH_TYPE_ADC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IADC_PERPH_TYPE_ADC@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_3
; %bb.2:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_3:
Lloh8:
	adrp	x8, _IADC_PERPH_SUBTYPE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IADC_PERPH_SUBTYPE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_iadc_read
	tbnz	w0, #31, LBB0_10
; %bb.4:
	ldr	x2, [sp, #8]
Lloh11:
	adrp	x8, _IADC_PERPH_SUBTYPE_IADC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IADC_PERPH_SUBTYPE_IADC@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_6
; %bb.5:
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_6:
Lloh16:
	adrp	x8, _IADC_REVISION2@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IADC_REVISION2@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_iadc_read
	tbnz	w0, #31, LBB0_10
; %bb.7:
	ldr	x2, [sp, #8]
Lloh19:
	adrp	x8, _IADC_REVISION2_SUPPORTED_IADC@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IADC_REVISION2_SUPPORTED_IADC@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_11
; %bb.8:
	ldr	w0, [x19]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	bl	_dev_err
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_11:
	mov	w0, #0
	b	LBB0_10
	.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 AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_IADC_PERPH_TYPE,4,2            ; @IADC_PERPH_TYPE
	.comm	_IADC_PERPH_TYPE_ADC,8,3        ; @IADC_PERPH_TYPE_ADC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d is not ADC\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IADC_PERPH_SUBTYPE,4,2         ; @IADC_PERPH_SUBTYPE
	.comm	_IADC_PERPH_SUBTYPE_IADC,8,3    ; @IADC_PERPH_SUBTYPE_IADC
l_.str.1:                               ; @.str.1
	.asciz	"%d is not IADC\n"

	.comm	_IADC_REVISION2,4,2             ; @IADC_REVISION2
	.comm	_IADC_REVISION2_SUPPORTED_IADC,8,3 ; @IADC_REVISION2_SUPPORTED_IADC
l_.str.2:                               ; @.str.2
	.asciz	"revision %d not supported\n"

	.no_dead_strip	_iadc_version_check
.subsections_via_symbols
