	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_i2c_irq
_mtk_i2c_irq:                           ## @mtk_i2c_irq
	.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
	movq	%rsi, %r14
	xorl	%r15d, %r15d
	cmpq	$0, 16(%rsi)
	je	LBB0_2
## %bb.1:
	movq	_I2C_RS_TRANSFER@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_2:
	movq	_OFFSET_INTR_STAT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_mtk_i2c_readw
	movl	%eax, %ebx
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mtk_i2c_writew
	orl	(%r14), %ebx
	movl	%ebx, (%r14)
	cmpl	$0, 4(%r14)
	je	LBB0_5
## %bb.3:
	movl	%ebx, %eax
	andl	%r15d, %eax
	je	LBB0_5
## %bb.4:
	movq	$0, (%r14)
	movq	_I2C_RS_MUL_CNFG@GOTPCREL(%rip), %rax
	movq	_I2C_RS_MUL_TRIG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_I2C_TRANSAC_START@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_OFFSET_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mtk_i2c_writew
	jmp	LBB0_7
LBB0_5:
	movq	_I2C_TRANSAC_COMP@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	testl	%ebx, %r15d
	je	LBB0_7
## %bb.6:
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_complete
LBB0_7:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_RS_TRANSFER,4,2            ## @I2C_RS_TRANSFER
	.comm	_OFFSET_INTR_STAT,4,2           ## @OFFSET_INTR_STAT
	.comm	_I2C_RS_MUL_CNFG,4,2            ## @I2C_RS_MUL_CNFG
	.comm	_I2C_RS_MUL_TRIG,4,2            ## @I2C_RS_MUL_TRIG
	.comm	_I2C_TRANSAC_START,4,2          ## @I2C_TRANSAC_START
	.comm	_OFFSET_START,4,2               ## @OFFSET_START
	.comm	_I2C_TRANSAC_COMP,4,2           ## @I2C_TRANSAC_COMP
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_mtk_i2c_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_i2c_irq
_mtk_i2c_irq:                           ; @mtk_i2c_irq
	.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, x1
	ldr	x8, [x1, #16]
Lloh0:
	adrp	x9, _I2C_RS_TRANSFER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_RS_TRANSFER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w21, wzr, w9, eq
Lloh3:
	adrp	x22, _OFFSET_INTR_STAT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _OFFSET_INTR_STAT@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mtk_i2c_readw
	mov	x20, x0
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_mtk_i2c_writew
	ldp	w8, w9, [x19]
	orr	w8, w8, w20
	str	w8, [x19]
	cbz	w9, LBB0_3
; %bb.1:
	and	w9, w8, w21
	cbz	w9, LBB0_3
; %bb.2:
	str	xzr, [x19]
Lloh5:
	adrp	x8, _I2C_RS_MUL_CNFG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I2C_RS_MUL_CNFG@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _I2C_RS_MUL_TRIG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _I2C_RS_MUL_TRIG@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _I2C_TRANSAC_START@GOTPAGE
Lloh12:
	ldr	x10, [x10, _I2C_TRANSAC_START@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh13:
	ldr	w9, [x10]
	orr	w1, w8, w9
Lloh14:
	adrp	x8, _OFFSET_START@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OFFSET_START@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mtk_i2c_writew
	b	LBB0_5
LBB0_3:
Lloh17:
	adrp	x9, _I2C_TRANSAC_COMP@GOTPAGE
Lloh18:
	ldr	x9, [x9, _I2C_TRANSAC_COMP@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w9, w9, w21
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	add	x0, x19, #8
	bl	_complete
LBB0_5:
Lloh20:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_RS_TRANSFER,4,2            ; @I2C_RS_TRANSFER
	.comm	_OFFSET_INTR_STAT,4,2           ; @OFFSET_INTR_STAT
	.comm	_I2C_RS_MUL_CNFG,4,2            ; @I2C_RS_MUL_CNFG
	.comm	_I2C_RS_MUL_TRIG,4,2            ; @I2C_RS_MUL_TRIG
	.comm	_I2C_TRANSAC_START,4,2          ; @I2C_TRANSAC_START
	.comm	_OFFSET_START,4,2               ; @OFFSET_START
	.comm	_I2C_TRANSAC_COMP,4,2           ; @I2C_TRANSAC_COMP
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_mtk_i2c_irq
.subsections_via_symbols
