	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxcpld_i2c_wait_for_tc
_mlxcpld_i2c_wait_for_tc:               ## @mlxcpld_i2c_wait_for_tc
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_MLXCPLD_I2C_POLL_TIME@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r12
	movq	_MLXCPLD_I2C_XFER_TO@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%esi, %edi
	shrl	$31, %edi
	addl	%esi, %edi
	sarl	%edi
	callq	_usleep_range
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mlxcpld_i2c_check_status
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-48(%rbp), %eax
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %esi
	addl	%esi, %ebx
	cmpl	(%r13), %ebx
	jl	LBB0_1
	jmp	LBB0_5
LBB0_4:
	movl	-48(%rbp), %eax
LBB0_5:
	cmpl	$130, %eax
	je	LBB0_9
## %bb.6:
	cmpl	$129, %eax
	je	LBB0_19
## %bb.7:
	cmpl	$128, %eax
	jne	LBB0_20
## %bb.8:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_21
LBB0_9:
	movl	24(%r14), %eax
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.11:
	xorl	%ebx, %ebx
	cmpl	$1, 8(%r14)
	setne	%bl
	movq	16(%r14), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_20
## %bb.12:
	movq	_MLXCPLD_LPCI2C_NUM_ADDR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_mlxcpld_i2c_read_comm
	cmpl	$0, 36(%r14)
	je	LBB0_17
## %bb.13:
	movq	_MLXCPLD_I2C_SMBUS_BLK_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -52(%rbp)
	je	LBB0_17
## %bb.14:
	movq	_MLXCPLD_LPCI2C_NUM_DAT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_mlxcpld_i2c_read_comm
	movq	_I2C_SMBUS_BLOCK_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incl	%eax
	xorl	%edi, %edi
	cmpl	%eax, -44(%rbp)
	setg	%dil
	callq	_unlikely
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:
	movl	32(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_E2BIG@GOTPCREL(%rip), %rcx
	jmp	LBB0_21
LBB0_20:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_21
LBB0_19:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
LBB0_21:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_22:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	4(%r14), %eax
	addl	(%r14), %eax
	jmp	LBB0_22
LBB0_17:
	movl	4(%r14), %ecx
	movl	%ecx, -44(%rbp)
	jmp	LBB0_18
LBB0_15:
	movl	-44(%rbp), %ecx
LBB0_18:
	movq	_MLXCPLD_LPCI2C_DATA_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r14), %rax
	movq	(%rax,%rbx,8), %rdx
	movq	%r14, %rdi
	callq	_mlxcpld_i2c_read_comm
	movl	-44(%rbp), %eax
	jmp	LBB0_22
	.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
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MLXCPLD_LPCI2C_NUM_ADDR_REG,4,2 ## @MLXCPLD_LPCI2C_NUM_ADDR_REG
	.comm	_MLXCPLD_I2C_SMBUS_BLK_BIT,4,2  ## @MLXCPLD_I2C_SMBUS_BLK_BIT
	.comm	_MLXCPLD_LPCI2C_NUM_DAT_REG,4,2 ## @MLXCPLD_LPCI2C_NUM_DAT_REG
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ## @I2C_SMBUS_BLOCK_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Incorrect smbus block read message len\n"

	.comm	_E2BIG,4,2                      ## @E2BIG
	.comm	_MLXCPLD_LPCI2C_DATA_REG,4,2    ## @MLXCPLD_LPCI2C_DATA_REG
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_mlxcpld_i2c_wait_for_tc
.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_tc
_mlxcpld_i2c_wait_for_tc:               ; @mlxcpld_i2c_wait_for_tc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, _MLXCPLD_I2C_POLL_TIME@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MLXCPLD_I2C_POLL_TIME@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _MLXCPLD_I2C_XFER_TO@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MLXCPLD_I2C_XFER_TO@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w1, #0
	cinc	w8, w1, lt
	asr	w0, w8, #1
	bl	_usleep_range
	add	x1, sp, #12
	mov	x0, x19
	bl	_mlxcpld_i2c_check_status
	cbz	w0, LBB0_7
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x21]
	add	w20, w1, w20
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	cmp	w8, #0
	ccmp	w20, w9, #0, eq
	b.lt	LBB0_1
; %bb.3:
	cmp	w8, #130
	b.eq	LBB0_8
LBB0_4:
	cmp	w8, #129
	b.eq	LBB0_15
; %bb.5:
	cmp	w8, #128
	b.ne	LBB0_14
; %bb.6:
Lloh4:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_16
LBB0_7:
	ldr	w8, [sp, #12]
	cmp	w8, #130
	b.ne	LBB0_4
LBB0_8:
	ldr	w8, [x19, #24]
Lloh6:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_18
; %bb.9:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	cset	w20, ne
	ldr	x8, [x19, #16]
	ldr	x8, [x8, w20, uxtw #3]
	cbz	x8, LBB0_14
; %bb.10:
Lloh9:
	adrp	x8, _MLXCPLD_LPCI2C_NUM_ADDR_REG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLXCPLD_LPCI2C_NUM_ADDR_REG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #4
	mov	x0, x19
	mov	w3, #1
	bl	_mlxcpld_i2c_read_comm
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_19
; %bb.11:
	ldr	w8, [sp, #4]
Lloh12:
	adrp	x9, _MLXCPLD_I2C_SMBUS_BLK_BIT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MLXCPLD_I2C_SMBUS_BLK_BIT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.12:
Lloh15:
	adrp	x8, _MLXCPLD_LPCI2C_NUM_DAT_REG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MLXCPLD_LPCI2C_NUM_DAT_REG@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #1
	bl	_mlxcpld_i2c_read_comm
	ldr	w8, [sp, #8]
Lloh18:
	adrp	x9, _I2C_SMBUS_BLOCK_MAX@GOTPAGE
Lloh19:
	ldr	x9, [x9, _I2C_SMBUS_BLOCK_MAX@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	add	w9, w9, #1
	cmp	w8, w9
	cset	w0, gt
	bl	_unlikely
	cbz	w0, LBB0_20
; %bb.13:
	ldr	w0, [x19, #32]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh23:
	adrp	x8, _E2BIG@GOTPAGE
Lloh24:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh27:
	adrp	x8, _ENXIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_18:
	ldp	w8, w9, [x19]
	add	w0, w9, w8
	b	LBB0_17
LBB0_19:
	ldr	w3, [x19, #4]
	str	w3, [sp, #8]
	b	LBB0_21
LBB0_20:
	ldr	w3, [sp, #8]
LBB0_21:
Lloh29:
	adrp	x8, _MLXCPLD_LPCI2C_DATA_REG@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MLXCPLD_LPCI2C_DATA_REG@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	ldr	x2, [x8, x20, lsl #3]
	mov	x0, x19
	bl	_mlxcpld_i2c_read_comm
	ldr	w0, [sp, #8]
	b	LBB0_17
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.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
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MLXCPLD_LPCI2C_NUM_ADDR_REG,4,2 ; @MLXCPLD_LPCI2C_NUM_ADDR_REG
	.comm	_MLXCPLD_I2C_SMBUS_BLK_BIT,4,2  ; @MLXCPLD_I2C_SMBUS_BLK_BIT
	.comm	_MLXCPLD_LPCI2C_NUM_DAT_REG,4,2 ; @MLXCPLD_LPCI2C_NUM_DAT_REG
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ; @I2C_SMBUS_BLOCK_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Incorrect smbus block read message len\n"

	.comm	_E2BIG,4,2                      ; @E2BIG
	.comm	_MLXCPLD_LPCI2C_DATA_REG,4,2    ; @MLXCPLD_LPCI2C_DATA_REG
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_mlxcpld_i2c_wait_for_tc
.subsections_via_symbols
