	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxcpld_i2c_wait_for_free
_mlxcpld_i2c_wait_for_free:             ## @mlxcpld_i2c_wait_for_free
	.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	%rdi, %r14
	xorl	%ebx, %ebx
	movq	_MLXCPLD_I2C_POLL_TIME@GOTPCREL(%rip), %r12
	movq	_MLXCPLD_I2C_XFER_TO@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_mlxcpld_i2c_check_busy
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %esi
	movl	%esi, %edi
	shrl	$31, %edi
	addl	%esi, %edi
	sarl	%edi
	callq	_usleep_range
	addl	(%r12), %ebx
	movl	(%r15), %ecx
	cmpl	%ecx, %ebx
	jle	LBB0_1
	jmp	LBB0_4
LBB0_2:
	movl	(%r15), %ecx
LBB0_4:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	xorl	%edx, %edx
	cmpl	%ecx, %ebx
	cmovlel	%edx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXCPLD_I2C_POLL_TIME,4,2      ## @MLXCPLD_I2C_POLL_TIME
	.comm	_MLXCPLD_I2C_XFER_TO,4,2        ## @MLXCPLD_I2C_XFER_TO
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_mlxcpld_i2c_wait_for_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxcpld_i2c_wait_for_free
_mlxcpld_i2c_wait_for_free:             ; @mlxcpld_i2c_wait_for_free
	.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
	mov	x19, x0
	mov	w20, #0
Lloh0:
	adrp	x22, _MLXCPLD_I2C_POLL_TIME@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MLXCPLD_I2C_POLL_TIME@GOTPAGEOFF]
Lloh2:
	adrp	x21, _MLXCPLD_I2C_XFER_TO@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MLXCPLD_I2C_XFER_TO@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_mlxcpld_i2c_check_busy
	cbz	w0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x22]
	cmp	w1, #0
	cinc	w8, w1, lt
	asr	w0, w8, #1
	bl	_usleep_range
	ldr	w9, [x22]
	ldr	w8, [x21]
	add	w20, w9, w20
	cmp	w20, w8
	b.le	LBB0_1
	b	LBB0_4
LBB0_3:
	ldr	w8, [x21]
LBB0_4:
Lloh4:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w20, w8
	csneg	w0, wzr, w9, le
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXCPLD_I2C_POLL_TIME,4,2      ; @MLXCPLD_I2C_POLL_TIME
	.comm	_MLXCPLD_I2C_XFER_TO,4,2        ; @MLXCPLD_I2C_XFER_TO
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_mlxcpld_i2c_wait_for_free
.subsections_via_symbols
