	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function poll_status
_poll_status:                           ## @poll_status
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_I2C_STATUS_TFNF@GOTPCREL(%rip), %rax
	testq	%rdi, (%rax)
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r14
	movl	$1000, %ebx                     ## imm = 0x3E8
	movq	_I2C_STATUS@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_udelay
	movl	(%r15), %edi
	callq	_readl
	cltq
	testq	%r14, %rax
	jne	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%rbx), %eax
	cmpl	$1, %ebx
	movl	%eax, %ebx
	ja	LBB0_2
	jmp	LBB0_10
LBB0_4:
	movl	$1000, %ebx                     ## imm = 0x3E8
	movq	_I2C_TAR@GOTPCREL(%rip), %r14
	movq	_I2C_TAR_EEPROM@GOTPCREL(%rip), %r15
	movq	_I2C_RXFLR@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_readl
	cmpl	(%r15), %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$20, %edi
	callq	_msleep
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	$10, %edi
	callq	_udelay
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12), %edi
	callq	_readl
	testb	$15, %al
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	leal	-1(%rbx), %eax
	cmpl	$1, %ebx
	movl	%eax, %ebx
	ja	LBB0_5
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	setg	%al
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_STATUS_TFNF,8,3            ## @I2C_STATUS_TFNF
	.comm	_I2C_STATUS,4,2                 ## @I2C_STATUS
	.comm	_I2C_TAR,4,2                    ## @I2C_TAR
	.comm	_I2C_TAR_EEPROM,4,2             ## @I2C_TAR_EEPROM
	.comm	_I2C_RXFLR,4,2                  ## @I2C_RXFLR
	.no_dead_strip	_poll_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function poll_status
_poll_status:                           ; @poll_status
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _I2C_STATUS_TFNF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_STATUS_TFNF@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	tst	x8, x0
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x0
	mov	w20, #1000
Lloh3:
	adrp	x21, _I2C_STATUS@GOTPAGE
Lloh4:
	ldr	x21, [x21, _I2C_STATUS@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w0, [x21]
	bl	_readl
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	tst	x8, x19
	b.ne	LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	w20, w20, #1
	b.hi	LBB0_2
	b	LBB0_10
LBB0_4:
	mov	w20, #1000
Lloh5:
	adrp	x19, _I2C_TAR@GOTPAGE
Lloh6:
	ldr	x19, [x19, _I2C_TAR@GOTPAGEOFF]
Lloh7:
	adrp	x21, _I2C_TAR_EEPROM@GOTPAGE
Lloh8:
	ldr	x21, [x21, _I2C_TAR_EEPROM@GOTPAGEOFF]
Lloh9:
	adrp	x22, _I2C_RXFLR@GOTPAGE
Lloh10:
	ldr	x22, [x22, _I2C_RXFLR@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_readl
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #20
	bl	_msleep
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #10
	bl	_udelay
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x22]
	bl	_readl
	tst	w0, #0xf
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	subs	w20, w20, #1
	b.hi	LBB0_5
LBB0_10:
	mov	w20, #0
LBB0_11:
	cmp	w20, #0
	cset	w0, gt
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_STATUS_TFNF,8,3            ; @I2C_STATUS_TFNF
	.comm	_I2C_STATUS,4,2                 ; @I2C_STATUS
	.comm	_I2C_TAR,4,2                    ; @I2C_TAR
	.comm	_I2C_TAR_EEPROM,4,2             ; @I2C_TAR_EEPROM
	.comm	_I2C_RXFLR,4,2                  ; @I2C_RXFLR
	.no_dead_strip	_poll_status
.subsections_via_symbols
