	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv64xxx_i2c_intr_offload
_mv64xxx_i2c_intr_offload:              ## @mv64xxx_i2c_intr_offload
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_MV64XXX_I2C_REG_BRIDGE_INTR_CAUSE@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	16(%rbx), %rdi
	callq	_readl
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_MV64XXX_I2C_REG_BRIDGE_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%rbx), %rdi
	callq	_readl
	movq	_MV64XXX_I2C_BRIDGE_STATUS_ERROR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, 32(%rbx)
LBB0_11:
	movq	_MV64XXX_I2C_REG_BRIDGE_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	(%r14), %rsi
	addq	16(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	$0, 8(%rbx)
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_wake_up
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movl	$0, 32(%rbx)
	movl	(%rbx), %eax
	cmpl	$2, %eax
	je	LBB0_8
## %bb.5:
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.6:
	movq	24(%rbx), %rsi
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	je	LBB0_11
## %bb.7:
	movq	%rbx, %rdi
	callq	_mv64xxx_i2c_read_offload_rx_data
	addq	$4, 24(%rbx)
	decl	(%rbx)
	jmp	LBB0_11
LBB0_8:
	movq	24(%rbx), %rsi
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	jne	LBB0_11
## %bb.9:
	testl	%eax, 4(%rsi)
	je	LBB0_11
## %bb.10:
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_mv64xxx_i2c_read_offload_rx_data
	addq	$8, 24(%rbx)
	addl	$-2, (%rbx)
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_MV64XXX_I2C_REG_BRIDGE_INTR_CAUSE,8,3 ## @MV64XXX_I2C_REG_BRIDGE_INTR_CAUSE
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_MV64XXX_I2C_REG_BRIDGE_STATUS,8,3 ## @MV64XXX_I2C_REG_BRIDGE_STATUS
	.comm	_MV64XXX_I2C_BRIDGE_STATUS_ERROR,4,2 ## @MV64XXX_I2C_BRIDGE_STATUS_ERROR
	.comm	_EIO,4,2                        ## @EIO
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_MV64XXX_I2C_REG_BRIDGE_CONTROL,8,3 ## @MV64XXX_I2C_REG_BRIDGE_CONTROL
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_mv64xxx_i2c_intr_offload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv64xxx_i2c_intr_offload
_mv64xxx_i2c_intr_offload:              ; @mv64xxx_i2c_intr_offload
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x20, _MV64XXX_I2C_REG_BRIDGE_INTR_CAUSE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MV64XXX_I2C_REG_BRIDGE_INTR_CAUSE@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
	cbz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x19, #16]
Lloh2:
	adrp	x9, _MV64XXX_I2C_REG_BRIDGE_STATUS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MV64XXX_I2C_REG_BRIDGE_STATUS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh5:
	adrp	x8, _MV64XXX_I2C_BRIDGE_STATUS_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MV64XXX_I2C_BRIDGE_STATUS_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.2:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x19, #32]
LBB0_3:
	ldr	x8, [x19, #16]
Lloh11:
	adrp	x9, _MV64XXX_I2C_REG_BRIDGE_CONTROL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MV64XXX_I2C_REG_BRIDGE_CONTROL@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	str	xzr, [x19, #8]
	add	x0, x19, #4
	bl	_wake_up
Lloh14:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh16:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	str	wzr, [x19, #32]
	ldr	w8, [x19]
	cmp	w8, #2
	b.eq	LBB0_10
; %bb.7:
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.8:
	ldr	x1, [x19, #24]
	ldr	w8, [x1]
Lloh18:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh19:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.9:
	mov	x0, x19
	bl	_mv64xxx_i2c_read_offload_rx_data
	ldr	x8, [x19, #24]
	add	x8, x8, #4
	str	x8, [x19, #24]
	ldr	w8, [x19]
	sub	w8, w8, #1
	b	LBB0_13
LBB0_10:
	ldr	x1, [x19, #24]
	ldr	w9, [x1]
Lloh21:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh22:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w9
	b.ne	LBB0_3
; %bb.11:
	ldr	w9, [x1, #4]!
	tst	w9, w8
	b.eq	LBB0_3
; %bb.12:
	mov	x0, x19
	bl	_mv64xxx_i2c_read_offload_rx_data
	ldr	x8, [x19, #24]
	add	x8, x8, #8
	str	x8, [x19, #24]
	ldr	w8, [x19]
	sub	w8, w8, #2
LBB0_13:
	str	w8, [x19]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MV64XXX_I2C_REG_BRIDGE_INTR_CAUSE,8,3 ; @MV64XXX_I2C_REG_BRIDGE_INTR_CAUSE
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_MV64XXX_I2C_REG_BRIDGE_STATUS,8,3 ; @MV64XXX_I2C_REG_BRIDGE_STATUS
	.comm	_MV64XXX_I2C_BRIDGE_STATUS_ERROR,4,2 ; @MV64XXX_I2C_BRIDGE_STATUS_ERROR
	.comm	_EIO,4,2                        ; @EIO
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_MV64XXX_I2C_REG_BRIDGE_CONTROL,8,3 ; @MV64XXX_I2C_REG_BRIDGE_CONTROL
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_mv64xxx_i2c_intr_offload
.subsections_via_symbols
