	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxcpld_i2c_xfer
_mlxcpld_i2c_xfer:                      ## @mlxcpld_i2c_xfer
	.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
	movl	%edx, %r15d
	movq	%rsi, %r12
	callq	_i2c_get_adapdata
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_mlxcpld_i2c_check_msg_params
	testl	%eax, %eax
	je	LBB0_1
## %bb.18:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	%ebx, %r15d
	jmp	LBB0_17
LBB0_1:
	testl	%r15d, %r15d
	jle	LBB0_2
## %bb.3:
	movl	%r15d, %eax
	cmpl	$4, %r15d
	jae	LBB0_5
## %bb.4:
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_2:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_5:
	movl	%eax, %ecx
	andl	$-4, %ecx
	leaq	-4(%rcx), %rsi
	movq	%rsi, %rdx
	shrq	$2, %rdx
	incq	%rdx
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.7:
	movq	%rdx, %rdi
	andq	$-2, %rdi
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%r12,%rsi,8), %xmm2
	movdqu	16(%r12,%rsi,8), %xmm3
	movdqu	32(%r12,%rsi,8), %xmm4
	movdqu	48(%r12,%rsi,8), %xmm5
	pshufd	$232, %xmm2, %xmm2              ## xmm2 = xmm2[0,2,2,3]
	paddd	%xmm0, %xmm2
	pshufd	$232, %xmm3, %xmm3              ## xmm3 = xmm3[0,2,2,3]
	paddd	%xmm1, %xmm3
	pshufd	$232, %xmm4, %xmm0              ## xmm0 = xmm4[0,2,2,3]
	paddd	%xmm2, %xmm0
	pshufd	$232, %xmm5, %xmm1              ## xmm1 = xmm5[0,2,2,3]
	paddd	%xmm3, %xmm1
	addq	$8, %rsi
	addq	$-2, %rdi
	jne	LBB0_8
## %bb.9:
	testb	$1, %dl
	je	LBB0_11
LBB0_10:
	movdqu	(%r12,%rsi,8), %xmm2
	movdqu	16(%r12,%rsi,8), %xmm3
	pshufd	$232, %xmm2, %xmm2              ## xmm2 = xmm2[0,2,2,3]
	paddd	%xmm2, %xmm0
	pshufd	$232, %xmm3, %xmm2              ## xmm2 = xmm3[0,2,2,3]
	paddd	%xmm2, %xmm1
LBB0_11:
	paddd	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	cmpq	%rax, %rcx
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	addl	(%r12,%rcx,8), %ebx
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_12
LBB0_13:
	movq	%r14, %rdi
	callq	_mlxcpld_i2c_wait_for_free
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	%r14, %rdi
	callq	_mlxcpld_i2c_reset
	movq	%r14, %rdi
	callq	_mlxcpld_i2c_check_busy
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_17
LBB0_16:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	callq	_mlxcpld_i2c_set_transf_data
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_mlxcpld_i2c_xfer_msg
	movq	%r14, %rdi
	callq	_mlxcpld_i2c_wait_for_tc
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	cmovsl	%ebx, %r15d
LBB0_17:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	pxor	%xmm1, %xmm1
	testb	$1, %dl
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Incorrect message\n"

L_.str.1:                               ## @.str.1
	.asciz	"LPCI2C bridge is busy\n"

L_.str.2:                               ## @.str.2
	.asciz	"LPCI2C bridge is busy after reset\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_mlxcpld_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxcpld_i2c_xfer
_mlxcpld_i2c_xfer:                      ; @mlxcpld_i2c_xfer
	.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, x2
	mov	x21, x1
	bl	_i2c_get_adapdata
	mov	x20, x0
	mov	x1, x21
	mov	x2, x19
	bl	_mlxcpld_i2c_check_msg_params
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
	ldr	w0, [x20, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_15
LBB0_2:
	cmp	w19, #1
	b.lt	LBB0_5
; %bb.3:
	mov	w8, w19
	cmp	w19, #8
	b.hs	LBB0_6
; %bb.4:
	mov	x9, #0
	mov	w22, #0
	b	LBB0_9
LBB0_5:
	mov	w22, #0
	b	LBB0_11
LBB0_6:
	and	x9, x8, #0xfffffff8
	movi.2d	v0, #0000000000000000
	add	x10, x21, #32
	mov	x11, x9
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x10, #-32]
	ldp	q6, q7, [x10], #64
	xtn.2s	v4, v4
	xtn.2s	v5, v5
	xtn.2s	v6, v6
	xtn.2s	v7, v7
	add.2s	v0, v0, v4
	add.2s	v1, v1, v5
	add.2s	v2, v2, v6
	add.2s	v3, v3, v7
	subs	x11, x11, #8
	b.ne	LBB0_7
; %bb.8:
	add.2s	v0, v1, v0
	add.2s	v0, v2, v0
	add.2s	v0, v3, v0
	addp.2s	v0, v0, v0
	fmov	w22, s0
	cmp	x9, x8
	b.eq	LBB0_11
LBB0_9:
	add	x10, x21, x9, lsl #3
	sub	x8, x8, x9
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x10], #8
	add	w22, w22, w9
	subs	x8, x8, #1
	b.ne	LBB0_10
LBB0_11:
	mov	x0, x20
	bl	_mlxcpld_i2c_wait_for_free
	cbz	x0, LBB0_14
; %bb.12:
	ldr	w0, [x20, #4]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, x20
	bl	_mlxcpld_i2c_reset
	mov	x0, x20
	bl	_mlxcpld_i2c_check_busy
	cbz	x0, LBB0_14
; %bb.13:
	ldr	w0, [x20, #4]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_15
LBB0_14:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	mov	x3, x22
	bl	_mlxcpld_i2c_set_transf_data
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x20
	bl	_mlxcpld_i2c_xfer_msg
	mov	x0, x20
	bl	_mlxcpld_i2c_wait_for_tc
	mov	x21, x0
	mov	x0, x20
	bl	_mutex_unlock
	cmp	w21, #0
	csel	w22, w21, w19, lt
LBB0_15:
	mov	x0, x22
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Incorrect message\n"

l_.str.1:                               ; @.str.1
	.asciz	"LPCI2C bridge is busy\n"

l_.str.2:                               ; @.str.2
	.asciz	"LPCI2C bridge is busy after reset\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_mlxcpld_i2c_xfer
.subsections_via_symbols
