	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_uart_apdma_start_rx
_mtk_uart_apdma_start_rx:               ## @mtk_uart_apdma_start_rx
	.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, %rbx
	movq	(%rdi), %rdi
	callq	_to_mtk_uart_apdma_dev
	movq	%rax, %r14
	movq	16(%rbx), %r13
	movl	8(%rbx), %r15d
	movq	_VFF_LEN@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_mtk_uart_apdma_read
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	_VFF_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_mtk_uart_apdma_write
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_mtk_uart_apdma_write
	movq	_VFF_THRE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r15d, %edi
	callq	_VFF_RX_THRE
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_mtk_uart_apdma_write
	movq	_VFF_RPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mtk_uart_apdma_write
	movq	_VFF_INT_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VFF_RX_INT_CLR_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_mtk_uart_apdma_write
	cmpq	$0, (%r14)
	je	LBB0_3
## %bb.2:
	movq	_VFF_4G_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VFF_4G_EN_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_mtk_uart_apdma_write
LBB0_3:
	movq	_VFF_INT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VFF_RX_INT_EN_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_mtk_uart_apdma_write
	movq	_VFF_EN@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_VFF_EN_B@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_mtk_uart_apdma_write
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_mtk_uart_apdma_read
	cmpl	(%r15), %eax
	jne	LBB0_5
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VFF_LEN,4,2                    ## @VFF_LEN
	.comm	_VFF_ADDR,4,2                   ## @VFF_ADDR
	.comm	_VFF_THRE,4,2                   ## @VFF_THRE
	.comm	_VFF_RPT,4,2                    ## @VFF_RPT
	.comm	_VFF_INT_FLAG,4,2               ## @VFF_INT_FLAG
	.comm	_VFF_RX_INT_CLR_B,4,2           ## @VFF_RX_INT_CLR_B
	.comm	_VFF_4G_SUPPORT,4,2             ## @VFF_4G_SUPPORT
	.comm	_VFF_4G_EN_B,4,2                ## @VFF_4G_EN_B
	.comm	_VFF_INT_EN,4,2                 ## @VFF_INT_EN
	.comm	_VFF_RX_INT_EN_B,4,2            ## @VFF_RX_INT_EN_B
	.comm	_VFF_EN,4,2                     ## @VFF_EN
	.comm	_VFF_EN_B,4,2                   ## @VFF_EN_B
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enable RX fail\n"

	.no_dead_strip	_mtk_uart_apdma_start_rx
.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_start_rx
_mtk_uart_apdma_start_rx:               ; @mtk_uart_apdma_start_rx
	.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	x0, [x0]
	bl	_to_mtk_uart_apdma_dev
	mov	x20, x0
	ldr	x23, [x19, #16]
	ldr	w21, [x19, #8]
Lloh0:
	adrp	x22, _VFF_LEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _VFF_LEN@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mtk_uart_apdma_read
	cbnz	w0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _VFF_ADDR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VFF_ADDR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_mtk_uart_apdma_write
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_mtk_uart_apdma_write
Lloh5:
	adrp	x8, _VFF_THRE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VFF_THRE@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_VFF_RX_THRE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_mtk_uart_apdma_write
Lloh8:
	adrp	x8, _VFF_RPT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VFF_RPT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mtk_uart_apdma_write
Lloh11:
	adrp	x8, _VFF_INT_FLAG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VFF_INT_FLAG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _VFF_RX_INT_CLR_B@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VFF_RX_INT_CLR_B@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mtk_uart_apdma_write
	ldr	x8, [x20]
	cbz	x8, LBB0_3
; %bb.2:
Lloh17:
	adrp	x8, _VFF_4G_SUPPORT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VFF_4G_SUPPORT@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _VFF_4G_EN_B@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VFF_4G_EN_B@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mtk_uart_apdma_write
LBB0_3:
Lloh23:
	adrp	x8, _VFF_INT_EN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _VFF_INT_EN@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _VFF_RX_INT_EN_B@GOTPAGE
Lloh27:
	ldr	x8, [x8, _VFF_RX_INT_EN_B@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mtk_uart_apdma_write
Lloh29:
	adrp	x20, _VFF_EN@GOTPAGE
Lloh30:
	ldr	x20, [x20, _VFF_EN@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh31:
	adrp	x21, _VFF_EN_B@GOTPAGE
Lloh32:
	ldr	x21, [x21, _VFF_EN_B@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_mtk_uart_apdma_write
	ldr	w1, [x20]
	mov	x0, x19
	bl	_mtk_uart_apdma_read
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.4:
	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
LBB0_5:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	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	_dev_err
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_VFF_LEN,4,2                    ; @VFF_LEN
	.comm	_VFF_ADDR,4,2                   ; @VFF_ADDR
	.comm	_VFF_THRE,4,2                   ; @VFF_THRE
	.comm	_VFF_RPT,4,2                    ; @VFF_RPT
	.comm	_VFF_INT_FLAG,4,2               ; @VFF_INT_FLAG
	.comm	_VFF_RX_INT_CLR_B,4,2           ; @VFF_RX_INT_CLR_B
	.comm	_VFF_4G_SUPPORT,4,2             ; @VFF_4G_SUPPORT
	.comm	_VFF_4G_EN_B,4,2                ; @VFF_4G_EN_B
	.comm	_VFF_INT_EN,4,2                 ; @VFF_INT_EN
	.comm	_VFF_RX_INT_EN_B,4,2            ; @VFF_RX_INT_EN_B
	.comm	_VFF_EN,4,2                     ; @VFF_EN
	.comm	_VFF_EN_B,4,2                   ; @VFF_EN_B
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enable RX fail\n"

	.no_dead_strip	_mtk_uart_apdma_start_rx
.subsections_via_symbols
