	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hp206c_wait_dev_rdy
_hp206c_wait_dev_rdy:                   ## @hp206c_wait_dev_rdy
	.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, -48(%rbp)                 ## 8-byte Spill
	callq	_iio_priv
	movq	_HP206C_MAX_DEV_RDY_WAIT_COUNT@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_7
## %bb.1:
	movq	(%rax), %r15
	xorl	%r13d, %r13d
	movq	_HP206C_REG_INT_SRC@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_hp206c_read_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_HP206C_FLAG_DEV_RDY@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_HP206C_DEV_RDY_WAIT_US@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	(%rdi,%rdi,2), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_usleep_range
	incl	%r13d
	cmpl	(%r12), %r13d
	jl	LBB0_2
LBB0_7:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_dev_err
	jmp	LBB0_8
LBB0_5:
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HP206C_MAX_DEV_RDY_WAIT_COUNT,4,2 ## @HP206C_MAX_DEV_RDY_WAIT_COUNT
	.comm	_HP206C_REG_INT_SRC,4,2         ## @HP206C_REG_INT_SRC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed READ_REG INT_SRC: %d\n"

	.comm	_HP206C_FLAG_DEV_RDY,4,2        ## @HP206C_FLAG_DEV_RDY
	.comm	_HP206C_DEV_RDY_WAIT_US,4,2     ## @HP206C_DEV_RDY_WAIT_US
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_hp206c_wait_dev_rdy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hp206c_wait_dev_rdy
_hp206c_wait_dev_rdy:                   ; @hp206c_wait_dev_rdy
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	bl	_iio_priv
Lloh0:
	adrp	x22, _HP206C_MAX_DEV_RDY_WAIT_COUNT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HP206C_MAX_DEV_RDY_WAIT_COUNT@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w23, #0
	ldr	x20, [x0]
Lloh2:
	adrp	x24, _HP206C_REG_INT_SRC@GOTPAGE
Lloh3:
	ldr	x24, [x24, _HP206C_REG_INT_SRC@GOTPAGEOFF]
Lloh4:
	adrp	x25, _HP206C_FLAG_DEV_RDY@GOTPAGE
Lloh5:
	ldr	x25, [x25, _HP206C_FLAG_DEV_RDY@GOTPAGEOFF]
Lloh6:
	adrp	x26, _HP206C_DEV_RDY_WAIT_US@GOTPAGE
Lloh7:
	ldr	x26, [x26, _HP206C_DEV_RDY_WAIT_US@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x20
	bl	_hp206c_read_reg
	mov	x21, x0
	tbnz	w0, #31, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	tst	w8, w21
	b.ne	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x26]
	add	w8, w0, w0, lsl #1
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	bl	_usleep_range
	ldr	w8, [x22]
	add	w23, w23, #1
	cmp	w23, w8
	b.lt	LBB0_2
LBB0_5:
Lloh8:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_6:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	b	LBB0_8
LBB0_7:
	mov	w21, #0
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_HP206C_MAX_DEV_RDY_WAIT_COUNT,4,2 ; @HP206C_MAX_DEV_RDY_WAIT_COUNT
	.comm	_HP206C_REG_INT_SRC,4,2         ; @HP206C_REG_INT_SRC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed READ_REG INT_SRC: %d\n"

	.comm	_HP206C_FLAG_DEV_RDY,4,2        ; @HP206C_FLAG_DEV_RDY
	.comm	_HP206C_DEV_RDY_WAIT_US,4,2     ; @HP206C_DEV_RDY_WAIT_US
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_hp206c_wait_dev_rdy
.subsections_via_symbols
