	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xlp9xx_i2c_check_bus_status
_xlp9xx_i2c_check_bus_status:           ## @xlp9xx_i2c_check_bus_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	_XLP9XX_I2C_BUSY_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r14
	movq	_XLP9XX_I2C_STATUS@GOTPCREL(%rip), %r15
	movq	_XLP9XX_I2C_STATUS_BUSY@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_xlp9xx_read_i2c_reg
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$1100, %esi                     ## imm = 0x44C
	callq	_usleep_range
	decl	%ebx
	jne	LBB0_2
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XLP9XX_I2C_BUSY_TIMEOUT,4,2    ## @XLP9XX_I2C_BUSY_TIMEOUT
	.comm	_XLP9XX_I2C_STATUS,4,2          ## @XLP9XX_I2C_STATUS
	.comm	_XLP9XX_I2C_STATUS_BUSY,4,2     ## @XLP9XX_I2C_STATUS_BUSY
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_xlp9xx_i2c_check_bus_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xlp9xx_i2c_check_bus_status
_xlp9xx_i2c_check_bus_status:           ; @xlp9xx_i2c_check_bus_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, _XLP9XX_I2C_BUSY_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XLP9XX_I2C_BUSY_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	cbz	w20, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x21, _XLP9XX_I2C_STATUS@GOTPAGE
Lloh4:
	ldr	x21, [x21, _XLP9XX_I2C_STATUS@GOTPAGEOFF]
Lloh5:
	adrp	x22, _XLP9XX_I2C_STATUS_BUSY@GOTPAGE
Lloh6:
	ldr	x22, [x22, _XLP9XX_I2C_STATUS_BUSY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_xlp9xx_read_i2c_reg
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w20, w20, #1
	mov	w0, #1000
	mov	w1, #1100
	bl	_usleep_range
	cbnz	w20, LBB0_2
LBB0_4:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	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	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_XLP9XX_I2C_BUSY_TIMEOUT,4,2    ; @XLP9XX_I2C_BUSY_TIMEOUT
	.comm	_XLP9XX_I2C_STATUS,4,2          ; @XLP9XX_I2C_STATUS
	.comm	_XLP9XX_I2C_STATUS_BUSY,4,2     ; @XLP9XX_I2C_STATUS_BUSY
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_xlp9xx_i2c_check_bus_status
.subsections_via_symbols
