	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_uart_apdma_rx_handler
_mtk_uart_apdma_rx_handler:             ## @mtk_uart_apdma_rx_handler
	.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	16(%rdi), %r14
	movq	_VFF_INT_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VFF_RX_INT_CLR_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_mtk_uart_apdma_write
	movq	_VFF_VALID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mtk_uart_apdma_read
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_VFF_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VFF_EN_CLR_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_mtk_uart_apdma_write
	movq	_VFF_INT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VFF_INT_EN_CLR_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_mtk_uart_apdma_write
	movl	8(%r15), %r13d
	movq	_VFF_RPT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_mtk_uart_apdma_read
	movl	%eax, %ebx
	movq	_VFF_WPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mtk_uart_apdma_read
	movq	_VFF_RING_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	andl	%eax, %edx
	andl	%ebx, %ecx
	subl	%ecx, %edx
	xorl	%eax, %ebx
	movq	_VFF_RING_WRAP@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	cmovnel	%r13d, %ebx
	addl	%edx, %ebx
	movq	8(%r14), %rcx
	movslq	%ebx, %rdx
	subq	%rdx, %rcx
	movq	%rcx, (%r15)
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_mtk_uart_apdma_write
	movq	%r14, %rdi
	callq	_list_del
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vchan_cookie_complete          ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VFF_INT_FLAG,4,2               ## @VFF_INT_FLAG
	.comm	_VFF_RX_INT_CLR_B,4,2           ## @VFF_RX_INT_CLR_B
	.comm	_VFF_VALID_SIZE,4,2             ## @VFF_VALID_SIZE
	.comm	_VFF_EN,4,2                     ## @VFF_EN
	.comm	_VFF_EN_CLR_B,4,2               ## @VFF_EN_CLR_B
	.comm	_VFF_INT_EN,4,2                 ## @VFF_INT_EN
	.comm	_VFF_INT_EN_CLR_B,4,2           ## @VFF_INT_EN_CLR_B
	.comm	_VFF_RPT,4,2                    ## @VFF_RPT
	.comm	_VFF_WPT,4,2                    ## @VFF_WPT
	.comm	_VFF_RING_SIZE,4,2              ## @VFF_RING_SIZE
	.comm	_VFF_RING_WRAP,4,2              ## @VFF_RING_WRAP
	.no_dead_strip	_mtk_uart_apdma_rx_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_uart_apdma_rx_handler
_mtk_uart_apdma_rx_handler:             ; @mtk_uart_apdma_rx_handler
	.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	x20, x0
	ldr	x19, [x0, #16]
Lloh0:
	adrp	x8, _VFF_INT_FLAG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VFF_INT_FLAG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _VFF_RX_INT_CLR_B@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VFF_RX_INT_CLR_B@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_mtk_uart_apdma_write
Lloh6:
	adrp	x8, _VFF_VALID_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VFF_VALID_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mtk_uart_apdma_read
	cbz	w0, LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _VFF_EN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VFF_EN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _VFF_EN_CLR_B@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VFF_EN_CLR_B@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_mtk_uart_apdma_write
Lloh15:
	adrp	x8, _VFF_INT_EN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VFF_INT_EN@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _VFF_INT_EN_CLR_B@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VFF_INT_EN_CLR_B@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_mtk_uart_apdma_write
	ldr	w22, [x20, #8]
Lloh21:
	adrp	x23, _VFF_RPT@GOTPAGE
Lloh22:
	ldr	x23, [x23, _VFF_RPT@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_mtk_uart_apdma_read
	mov	x21, x0
Lloh23:
	adrp	x8, _VFF_WPT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _VFF_WPT@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mtk_uart_apdma_read
	mov	x2, x0
	eor	w8, w0, w21
Lloh26:
	adrp	x9, _VFF_RING_WRAP@GOTPAGE
Lloh27:
	ldr	x9, [x9, _VFF_RING_WRAP@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w8
Lloh29:
	adrp	x8, _VFF_RING_SIZE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _VFF_RING_SIZE@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	and	w9, w8, w0
	and	w8, w8, w21
	csel	w10, wzr, w22, eq
	sub	w8, w9, w8
	add	w8, w8, w10
	ldr	x9, [x19, #8]
	sub	x8, x9, w8, sxtw
	str	x8, [x20]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_mtk_uart_apdma_write
	mov	x0, x19
	bl	_list_del
	mov	x0, x19
	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
	b	_vchan_cookie_complete
LBB0_2:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_VFF_INT_FLAG,4,2               ; @VFF_INT_FLAG
	.comm	_VFF_RX_INT_CLR_B,4,2           ; @VFF_RX_INT_CLR_B
	.comm	_VFF_VALID_SIZE,4,2             ; @VFF_VALID_SIZE
	.comm	_VFF_EN,4,2                     ; @VFF_EN
	.comm	_VFF_EN_CLR_B,4,2               ; @VFF_EN_CLR_B
	.comm	_VFF_INT_EN,4,2                 ; @VFF_INT_EN
	.comm	_VFF_INT_EN_CLR_B,4,2           ; @VFF_INT_EN_CLR_B
	.comm	_VFF_RPT,4,2                    ; @VFF_RPT
	.comm	_VFF_WPT,4,2                    ; @VFF_WPT
	.comm	_VFF_RING_SIZE,4,2              ; @VFF_RING_SIZE
	.comm	_VFF_RING_WRAP,4,2              ; @VFF_RING_WRAP
	.no_dead_strip	_mtk_uart_apdma_rx_handler
.subsections_via_symbols
