	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function poll_busy
_poll_busy:                             ## @poll_busy
	.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, %r14
	movl	$-1000, %ebx                    ## imm = 0xFC18
	movq	_ICSR_BUSY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_ICSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_iic_rd
	movl	%eax, %r12d
	movl	(%r14), %ecx
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_dbg
	movl	(%r15), %r13d
	testl	%r12d, %r13d
	je	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_udelay
	incl	%ebx
	jne	LBB0_1
LBB0_8:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	andl	%r12d, %r13d
	testl	%r13d, %r13d
	cmovel	%r13d, %eax
	jmp	LBB0_9
LBB0_2:
	movl	(%r14), %eax
	orl	%r12d, %eax
	movq	_ICSR_TACK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.3:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_5:
	movq	_ICSR_AL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.6:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ICSR,4,2                       ## @ICSR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"val 0x%02x pd->sr 0x%02x\n"

	.comm	_ICSR_BUSY,4,2                  ## @ICSR_BUSY
	.comm	_ICSR_TACK,4,2                  ## @ICSR_TACK
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ICSR_AL,4,2                    ## @ICSR_AL
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_poll_busy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function poll_busy
_poll_busy:                             ; @poll_busy
	.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
	mov	w22, #-1000
Lloh0:
	adrp	x23, _ICSR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ICSR@GOTPAGEOFF]
Lloh2:
	adrp	x24, _ICSR_BUSY@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ICSR_BUSY@GOTPAGEOFF]
Lloh4:
	adrp	x20, l_.str@PAGE
Lloh5:
	add	x20, x20, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_iic_rd
	mov	x21, x0
	ldp	w3, w0, [x19]
	mov	x1, x20
	mov	x2, x21
	bl	_dev_dbg
	ldr	w8, [x24]
	ands	w25, w8, w21
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #10
	bl	_udelay
	adds	w22, w22, #1
	b.lo	LBB0_1
LBB0_3:
Lloh6:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w25, #0
	csneg	w0, wzr, w8, eq
	b	LBB0_9
LBB0_4:
	ldr	w8, [x19]
	orr	w8, w8, w21
Lloh9:
	adrp	x9, _ICSR_TACK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ICSR_TACK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w8, w9
	b.eq	LBB0_6
; %bb.5:
Lloh12:
	adrp	x8, _ENXIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh14:
	adrp	x9, _ICSR_AL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ICSR_AL@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.7:
Lloh17:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ICSR,4,2                       ; @ICSR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"val 0x%02x pd->sr 0x%02x\n"

	.comm	_ICSR_BUSY,4,2                  ; @ICSR_BUSY
	.comm	_ICSR_TACK,4,2                  ; @ICSR_TACK
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ICSR_AL,4,2                    ; @ICSR_AL
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_poll_busy
.subsections_via_symbols
