	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sprd_i2c_isr
_sprd_i2c_isr:                          ## @sprd_i2c_isr
	.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	%rsi, %rbx
	movq	16(%rsi), %r14
	movq	_I2C_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rsi), %rdi
	callq	_readl
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rbx), %edx
	movq	_I2C_FIFO_FULL_THLD@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	cmpl	(%rsi), %edx
	setge	%dil
	xorl	%esi, %esi
	testl	%edx, %edx
	setne	%sil
	testl	%ecx, (%r14)
	cmovnel	%edi, %esi
	cmpb	$1, %sil
	jne	LBB0_2
## %bb.1:
	movq	_I2C_RX_ACK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	je	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_sprd_i2c_clear_start
	movq	%rbx, %rdi
	callq	_sprd_i2c_clear_irq
LBB0_3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sprd_i2c_set_fifo_empty_int
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sprd_i2c_set_fifo_full_int
	movq	_IRQ_WAKE_THREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_STATUS,8,3                 ## @I2C_STATUS
	.comm	_I2C_RX_ACK,4,2                 ## @I2C_RX_ACK
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_I2C_FIFO_FULL_THLD,4,2         ## @I2C_FIFO_FULL_THLD
	.comm	_IRQ_WAKE_THREAD,4,2            ## @IRQ_WAKE_THREAD
	.no_dead_strip	_sprd_i2c_isr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sprd_i2c_isr
_sprd_i2c_isr:                          ; @sprd_i2c_isr
	.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, x1
	ldp	x8, x20, [x1, #8]
Lloh0:
	adrp	x9, _I2C_STATUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh3:
	adrp	x8, _I2C_RX_ACK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_RX_ACK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
	ldr	w9, [x20]
Lloh6:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh7:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	ldr	w11, [x19]
Lloh9:
	adrp	x12, _I2C_FIFO_FULL_THLD@GOTPAGE
Lloh10:
	ldr	x12, [x12, _I2C_FIFO_FULL_THLD@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	cmp	w11, w12
	cset	w12, ge
	cmp	w11, #0
	cset	w11, ne
	tst	w10, w9
	csel	w9, w11, w12, eq
	cmp	w9, #1
	ccmp	w8, #0, #0, eq
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_sprd_i2c_clear_start
	mov	x0, x19
	bl	_sprd_i2c_clear_irq
LBB0_2:
	mov	x0, x19
	mov	w1, #0
	bl	_sprd_i2c_set_fifo_empty_int
	mov	x0, x19
	mov	w1, #0
	bl	_sprd_i2c_set_fifo_full_int
Lloh12:
	adrp	x8, _IRQ_WAKE_THREAD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQ_WAKE_THREAD@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_STATUS,8,3                 ; @I2C_STATUS
	.comm	_I2C_RX_ACK,4,2                 ; @I2C_RX_ACK
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_I2C_FIFO_FULL_THLD,4,2         ; @I2C_FIFO_FULL_THLD
	.comm	_IRQ_WAKE_THREAD,4,2            ; @IRQ_WAKE_THREAD
	.no_dead_strip	_sprd_i2c_isr
.subsections_via_symbols
