	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv64xxx_i2c_offload_xfer
_mv64xxx_i2c_offload_xfer:              ## @mv64xxx_i2c_offload_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	24(%rdi), %r12
	movl	(%rdi), %r13d
	leaq	12(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r12), %rbx
	movq	_MV64XXX_I2C_BRIDGE_CONTROL_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rbx
	movq	_MV64XXX_I2C_BRIDGE_CONTROL_ENABLE@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movl	8(%r12), %eax
	movq	_I2C_M_TEN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	_MV64XXX_I2C_BRIDGE_CONTROL_ADDR_EXT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	jmp	LBB0_3
LBB0_1:
	xorl	%ecx, %ecx
LBB0_3:
	orq	%rcx, %rbx
	cmpl	$2, %r13d
	je	LBB0_8
## %bb.4:
	cmpl	$1, %r13d
	jne	LBB0_10
## %bb.5:
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movslq	12(%r12), %rdx
	decq	%rdx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.7:
	movq	_MV64XXX_I2C_BRIDGE_CONTROL_RX_SIZE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rdx
	movq	_MV64XXX_I2C_BRIDGE_CONTROL_RD@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	orq	%rdx, %rbx
	jmp	LBB0_10
LBB0_8:
	movslq	12(%r12), %rax
	decq	%rax
	movslq	28(%r12), %rdx
	decq	%rdx
	movq	_MV64XXX_I2C_BRIDGE_CONTROL_TX_SIZE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	movq	_MV64XXX_I2C_BRIDGE_CONTROL_RD@GOTPCREL(%rip), %rsi
	movq	_MV64XXX_I2C_BRIDGE_CONTROL_WR@GOTPCREL(%rip), %rdi
	movq	_MV64XXX_I2C_BRIDGE_CONTROL_RX_SIZE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rdx
	orq	%rax, %rdx
	orq	(%rsi), %rbx
	orq	(%rdi), %rbx
	movq	_MV64XXX_I2C_BRIDGE_CONTROL_REPEATED_START@GOTPCREL(%rip), %rax
	orq	%rdx, %rbx
	orq	(%rax), %rbx
	jmp	LBB0_9
LBB0_6:
	movq	_MV64XXX_I2C_BRIDGE_CONTROL_TX_SIZE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rdx
	movq	_MV64XXX_I2C_BRIDGE_CONTROL_WR@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	orq	%rdx, %rbx
LBB0_9:
	movq	%r15, %rdi
	callq	_mv64xxx_i2c_prepare_tx
LBB0_10:
	movl	$1, 4(%r15)
	movq	_MV64XXX_I2C_REG_BRIDGE_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	movq	%rbx, %rdi
	callq	_writel
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rdi
	callq	_mv64xxx_i2c_wait_for_completion
	movl	8(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_ENABLE,8,3 ## @MV64XXX_I2C_BRIDGE_CONTROL_ENABLE
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_ADDR_SHIFT,8,3 ## @MV64XXX_I2C_BRIDGE_CONTROL_ADDR_SHIFT
	.comm	_I2C_M_TEN,4,2                  ## @I2C_M_TEN
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_ADDR_EXT,8,3 ## @MV64XXX_I2C_BRIDGE_CONTROL_ADDR_EXT
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_WR,8,3 ## @MV64XXX_I2C_BRIDGE_CONTROL_WR
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_TX_SIZE_SHIFT,8,3 ## @MV64XXX_I2C_BRIDGE_CONTROL_TX_SIZE_SHIFT
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_RD,8,3 ## @MV64XXX_I2C_BRIDGE_CONTROL_RD
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_RX_SIZE_SHIFT,8,3 ## @MV64XXX_I2C_BRIDGE_CONTROL_RX_SIZE_SHIFT
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_REPEATED_START,8,3 ## @MV64XXX_I2C_BRIDGE_CONTROL_REPEATED_START
	.comm	_MV64XXX_I2C_REG_BRIDGE_CONTROL,8,3 ## @MV64XXX_I2C_REG_BRIDGE_CONTROL
	.no_dead_strip	_mv64xxx_i2c_offload_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv64xxx_i2c_offload_xfer
_mv64xxx_i2c_offload_xfer:              ; @mv64xxx_i2c_offload_xfer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x22, [x0, #24]
	ldr	w23, [x0]
	add	x20, x0, #12
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _MV64XXX_I2C_BRIDGE_CONTROL_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MV64XXX_I2C_BRIDGE_CONTROL_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x22]
Lloh3:
	adrp	x10, _MV64XXX_I2C_BRIDGE_CONTROL_ADDR_SHIFT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MV64XXX_I2C_BRIDGE_CONTROL_ADDR_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	lsl	x9, x9, x10
	orr	x9, x9, x8
	ldr	w8, [x22, #8]
Lloh6:
	adrp	x10, _I2C_M_TEN@GOTPAGE
Lloh7:
	ldr	x10, [x10, _I2C_M_TEN@GOTPAGEOFF]
Lloh8:
	adrp	x11, _MV64XXX_I2C_BRIDGE_CONTROL_ADDR_EXT@GOTPAGE
Lloh9:
	ldr	x11, [x11, _MV64XXX_I2C_BRIDGE_CONTROL_ADDR_EXT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	ldr	x11, [x11]
	tst	w10, w8
	csel	x10, xzr, x11, eq
	orr	x21, x9, x10
	cmp	w23, #2
	b.eq	LBB0_4
; %bb.1:
	cmp	w23, #1
	b.ne	LBB0_7
; %bb.2:
Lloh12:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh13:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x9]
	ldrsw	x9, [x22, #12]
	sub	x9, x9, #1
	and	w8, w10, w8
	cbz	w8, LBB0_5
; %bb.3:
Lloh15:
	adrp	x8, _MV64XXX_I2C_BRIDGE_CONTROL_RD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MV64XXX_I2C_BRIDGE_CONTROL_RD@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
Lloh18:
	adrp	x10, _MV64XXX_I2C_BRIDGE_CONTROL_RX_SIZE_SHIFT@GOTPAGE
Lloh19:
	ldr	x10, [x10, _MV64XXX_I2C_BRIDGE_CONTROL_RX_SIZE_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	lsl	x9, x9, x10
	orr	x8, x8, x21
	orr	x21, x8, x9
	b	LBB0_7
LBB0_4:
	ldrsw	x8, [x22, #12]
	sub	x8, x8, #1
	ldrsw	x9, [x22, #28]
	sub	x9, x9, #1
Lloh21:
	adrp	x10, _MV64XXX_I2C_BRIDGE_CONTROL_RD@GOTPAGE
Lloh22:
	ldr	x10, [x10, _MV64XXX_I2C_BRIDGE_CONTROL_RD@GOTPAGEOFF]
Lloh23:
	adrp	x11, _MV64XXX_I2C_BRIDGE_CONTROL_WR@GOTPAGE
Lloh24:
	ldr	x11, [x11, _MV64XXX_I2C_BRIDGE_CONTROL_WR@GOTPAGEOFF]
Lloh25:
	ldr	x10, [x10]
Lloh26:
	ldr	x11, [x11]
Lloh27:
	adrp	x12, _MV64XXX_I2C_BRIDGE_CONTROL_TX_SIZE_SHIFT@GOTPAGE
Lloh28:
	ldr	x12, [x12, _MV64XXX_I2C_BRIDGE_CONTROL_TX_SIZE_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	x12, [x12]
	lsl	x8, x8, x12
Lloh30:
	adrp	x12, _MV64XXX_I2C_BRIDGE_CONTROL_RX_SIZE_SHIFT@GOTPAGE
Lloh31:
	ldr	x12, [x12, _MV64XXX_I2C_BRIDGE_CONTROL_RX_SIZE_SHIFT@GOTPAGEOFF]
Lloh32:
	ldr	x12, [x12]
	lsl	x9, x9, x12
Lloh33:
	adrp	x12, _MV64XXX_I2C_BRIDGE_CONTROL_REPEATED_START@GOTPAGE
Lloh34:
	ldr	x12, [x12, _MV64XXX_I2C_BRIDGE_CONTROL_REPEATED_START@GOTPAGEOFF]
Lloh35:
	ldr	x12, [x12]
	orr	x10, x10, x21
	orr	x10, x10, x11
	orr	x8, x10, x8
	orr	x8, x8, x9
	orr	x21, x8, x12
	b	LBB0_6
LBB0_5:
Lloh36:
	adrp	x8, _MV64XXX_I2C_BRIDGE_CONTROL_WR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MV64XXX_I2C_BRIDGE_CONTROL_WR@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
Lloh39:
	adrp	x10, _MV64XXX_I2C_BRIDGE_CONTROL_TX_SIZE_SHIFT@GOTPAGE
Lloh40:
	ldr	x10, [x10, _MV64XXX_I2C_BRIDGE_CONTROL_TX_SIZE_SHIFT@GOTPAGEOFF]
Lloh41:
	ldr	x10, [x10]
	lsl	x9, x9, x10
	orr	x8, x8, x21
	orr	x21, x8, x9
LBB0_6:
	mov	x0, x19
	bl	_mv64xxx_i2c_prepare_tx
LBB0_7:
	mov	w8, #1
	str	w8, [x19, #4]
	ldr	x8, [x19, #16]
Lloh42:
	adrp	x9, _MV64XXX_I2C_REG_BRIDGE_CONTROL@GOTPAGE
Lloh43:
	ldr	x9, [x9, _MV64XXX_I2C_REG_BRIDGE_CONTROL@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_mv64xxx_i2c_wait_for_completion
	ldr	w0, [x19, #8]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_ENABLE,8,3 ; @MV64XXX_I2C_BRIDGE_CONTROL_ENABLE
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_ADDR_SHIFT,8,3 ; @MV64XXX_I2C_BRIDGE_CONTROL_ADDR_SHIFT
	.comm	_I2C_M_TEN,4,2                  ; @I2C_M_TEN
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_ADDR_EXT,8,3 ; @MV64XXX_I2C_BRIDGE_CONTROL_ADDR_EXT
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_WR,8,3 ; @MV64XXX_I2C_BRIDGE_CONTROL_WR
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_TX_SIZE_SHIFT,8,3 ; @MV64XXX_I2C_BRIDGE_CONTROL_TX_SIZE_SHIFT
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_RD,8,3 ; @MV64XXX_I2C_BRIDGE_CONTROL_RD
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_RX_SIZE_SHIFT,8,3 ; @MV64XXX_I2C_BRIDGE_CONTROL_RX_SIZE_SHIFT
	.comm	_MV64XXX_I2C_BRIDGE_CONTROL_REPEATED_START,8,3 ; @MV64XXX_I2C_BRIDGE_CONTROL_REPEATED_START
	.comm	_MV64XXX_I2C_REG_BRIDGE_CONTROL,8,3 ; @MV64XXX_I2C_REG_BRIDGE_CONTROL
	.no_dead_strip	_mv64xxx_i2c_offload_xfer
.subsections_via_symbols
