	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iadc_poll_wait_eoc
_iadc_poll_wait_eoc:                    ## @iadc_poll_wait_eoc
	.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	%rdi, %r12
	movq	_IADC_CONV_TIME_MIN_US@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%esi, %ecx
	ja	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ecx
	cmpl	$2, %eax
	movl	$1, %r13d
	cmovael	%eax, %r13d
	leaq	-44(%rbp), %r14
	movq	_IADC_STATUS1_EOC@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_IADC_STATUS1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_iadc_read
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %eax
	movq	_IADC_STATUS1_REQ_STS_EOC_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, -44(%rbp)
	cmpl	(%r15), %eax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_IADC_CONV_TIME_MIN_US@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IADC_CONV_TIME_MAX_US@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usleep_range
	incl	%ebx
	cmpl	%r13d, %ebx
	jne	LBB0_2
LBB0_6:
	movq	%r12, %rdi
	callq	_iadc_status_show
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_4:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IADC_CONV_TIME_MIN_US,4,2      ## @IADC_CONV_TIME_MIN_US
	.comm	_IADC_STATUS1,4,2               ## @IADC_STATUS1
	.comm	_IADC_STATUS1_REQ_STS_EOC_MASK,4,2 ## @IADC_STATUS1_REQ_STS_EOC_MASK
	.comm	_IADC_STATUS1_EOC,4,2           ## @IADC_STATUS1_EOC
	.comm	_IADC_CONV_TIME_MAX_US,4,2      ## @IADC_CONV_TIME_MAX_US
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_iadc_poll_wait_eoc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iadc_poll_wait_eoc
_iadc_poll_wait_eoc:                    ; @iadc_poll_wait_eoc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x20, _IADC_CONV_TIME_MIN_US@GOTPAGE
Lloh1:
	ldr	x20, [x20, _IADC_CONV_TIME_MIN_US@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, w1
	b.hi	LBB0_5
; %bb.1:
	mov	w21, #0
	udiv	w8, w1, w8
	cmp	w8, #1
	csinc	w22, w8, wzr, hi
Lloh2:
	adrp	x23, _IADC_STATUS1@GOTPAGE
Lloh3:
	ldr	x23, [x23, _IADC_STATUS1@GOTPAGEOFF]
Lloh4:
	adrp	x24, _IADC_STATUS1_REQ_STS_EOC_MASK@GOTPAGE
Lloh5:
	ldr	x24, [x24, _IADC_STATUS1_REQ_STS_EOC_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x25, _IADC_STATUS1_EOC@GOTPAGE
Lloh7:
	ldr	x25, [x25, _IADC_STATUS1_EOC@GOTPAGEOFF]
Lloh8:
	adrp	x26, _IADC_CONV_TIME_MAX_US@GOTPAGE
Lloh9:
	ldr	x26, [x26, _IADC_CONV_TIME_MAX_US@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x19
	bl	_iadc_read
	tbnz	w0, #31, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x24]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
	ldr	w9, [x25]
	cmp	w8, w9
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x20]
	ldr	w1, [x26]
	bl	_usleep_range
	add	w21, w21, #1
	cmp	w21, w22
	b.ne	LBB0_2
LBB0_5:
	mov	x0, x19
	bl	_iadc_status_show
Lloh10:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_IADC_CONV_TIME_MIN_US,4,2      ; @IADC_CONV_TIME_MIN_US
	.comm	_IADC_STATUS1,4,2               ; @IADC_STATUS1
	.comm	_IADC_STATUS1_REQ_STS_EOC_MASK,4,2 ; @IADC_STATUS1_REQ_STS_EOC_MASK
	.comm	_IADC_STATUS1_EOC,4,2           ; @IADC_STATUS1_EOC
	.comm	_IADC_CONV_TIME_MAX_US,4,2      ; @IADC_CONV_TIME_MAX_US
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_iadc_poll_wait_eoc
.subsections_via_symbols
