	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_start_dma
_mtk_start_dma:                         ## @mtk_start_dma
	.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	_NET_IP_ALIGN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	$2, (%rax)
	movq	_MTK_RX_2B_OFFSET@GOTPCREL(%rip), %r12
	jne	LBB0_2
## %bb.1:
	movl	(%r12), %ebx
LBB0_2:
	movq	%r15, %rdi
	callq	_mtk_dma_init
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_mtk_dma_free
	jmp	LBB0_8
LBB0_4:
	movq	(%r15), %rax
	movl	(%rax), %edi
	movq	_MTK_QDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MTK_HAS_CAPS
	movq	_MTK_TX_WB_DDONE@GOTPCREL(%rip), %rcx
	movq	_MTK_TX_DMA_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_MTK_DMA_SIZE_16DWORDS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_MTK_NDP_CO_PRO@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_MTK_RX_DMA_EN@GOTPCREL(%rip), %r13
	orl	(%r13), %esi
	orl	(%r12), %esi
	movq	_MTK_RX_BT_32DWORDS@GOTPCREL(%rip), %r12
	orl	(%r12), %esi
	movq	_MTK_QDMA_GLO_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_mtk_w32
	orl	(%r13), %ebx
	orl	(%r12), %ebx
	movq	_MTK_MULTI_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_MTK_PDMA_GLO_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	jmp	LBB0_7
LBB0_6:
	movq	_MTK_RX_DMA_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_MTK_MULTI_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_MTK_PDMA_SIZE_8DWORDS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_MTK_PDMA_GLO_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
LBB0_7:
	callq	_mtk_w32
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NET_IP_ALIGN,4,2               ## @NET_IP_ALIGN
	.comm	_MTK_RX_2B_OFFSET,4,2           ## @MTK_RX_2B_OFFSET
	.comm	_MTK_QDMA,4,2                   ## @MTK_QDMA
	.comm	_MTK_TX_WB_DDONE,4,2            ## @MTK_TX_WB_DDONE
	.comm	_MTK_TX_DMA_EN,4,2              ## @MTK_TX_DMA_EN
	.comm	_MTK_DMA_SIZE_16DWORDS,4,2      ## @MTK_DMA_SIZE_16DWORDS
	.comm	_MTK_NDP_CO_PRO,4,2             ## @MTK_NDP_CO_PRO
	.comm	_MTK_RX_DMA_EN,4,2              ## @MTK_RX_DMA_EN
	.comm	_MTK_RX_BT_32DWORDS,4,2         ## @MTK_RX_BT_32DWORDS
	.comm	_MTK_QDMA_GLO_CFG,4,2           ## @MTK_QDMA_GLO_CFG
	.comm	_MTK_MULTI_EN,4,2               ## @MTK_MULTI_EN
	.comm	_MTK_PDMA_GLO_CFG,4,2           ## @MTK_PDMA_GLO_CFG
	.comm	_MTK_PDMA_SIZE_8DWORDS,4,2      ## @MTK_PDMA_SIZE_8DWORDS
	.no_dead_strip	_mtk_start_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_start_dma
_mtk_start_dma:                         ; @mtk_start_dma
	.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
Lloh0:
	adrp	x8, _NET_IP_ALIGN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NET_IP_ALIGN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x22, _MTK_RX_2B_OFFSET@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MTK_RX_2B_OFFSET@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w8, #2
	csel	w21, w9, wzr, eq
	bl	_mtk_dma_init
	mov	x19, x0
	cbz	w0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_mtk_dma_free
	b	LBB0_6
LBB0_2:
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _MTK_QDMA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MTK_QDMA@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_MTK_HAS_CAPS
Lloh8:
	adrp	x8, _MTK_TX_WB_DDONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MTK_TX_WB_DDONE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _MTK_TX_DMA_EN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MTK_TX_DMA_EN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cbz	x0, LBB0_4
; %bb.3:
Lloh14:
	adrp	x9, _MTK_DMA_SIZE_16DWORDS@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MTK_DMA_SIZE_16DWORDS@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _MTK_NDP_CO_PRO@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MTK_NDP_CO_PRO@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x23, _MTK_RX_DMA_EN@GOTPAGE
Lloh21:
	ldr	x23, [x23, _MTK_RX_DMA_EN@GOTPAGEOFF]
	orr	w8, w8, w9
	ldr	w9, [x23]
	orr	w8, w8, w9
	ldr	w9, [x22]
Lloh22:
	adrp	x22, _MTK_RX_BT_32DWORDS@GOTPAGE
Lloh23:
	ldr	x22, [x22, _MTK_RX_BT_32DWORDS@GOTPAGEOFF]
	orr	w8, w8, w9
	ldr	w9, [x22]
	orr	w1, w8, w9
Lloh24:
	adrp	x8, _MTK_QDMA_GLO_CFG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MTK_QDMA_GLO_CFG@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_mtk_w32
	ldr	w8, [x23]
	orr	w8, w8, w21
	ldr	w9, [x22]
Lloh27:
	adrp	x10, _MTK_MULTI_EN@GOTPAGE
Lloh28:
	ldr	x10, [x10, _MTK_MULTI_EN@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh29:
	adrp	x9, _MTK_RX_DMA_EN@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MTK_RX_DMA_EN@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh32:
	adrp	x9, _MTK_MULTI_EN@GOTPAGE
Lloh33:
	ldr	x9, [x9, _MTK_MULTI_EN@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
Lloh35:
	adrp	x10, _MTK_PDMA_SIZE_8DWORDS@GOTPAGE
Lloh36:
	ldr	x10, [x10, _MTK_PDMA_SIZE_8DWORDS@GOTPAGEOFF]
LBB0_5:
	orr	w8, w8, w9
	ldr	w9, [x10]
	orr	w1, w8, w9
Lloh37:
	adrp	x8, _MTK_PDMA_GLO_CFG@GOTPAGE
Lloh38:
	ldr	x8, [x8, _MTK_PDMA_GLO_CFG@GOTPAGEOFF]
Lloh39:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_mtk_w32
LBB0_6:
	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
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_NET_IP_ALIGN,4,2               ; @NET_IP_ALIGN
	.comm	_MTK_RX_2B_OFFSET,4,2           ; @MTK_RX_2B_OFFSET
	.comm	_MTK_QDMA,4,2                   ; @MTK_QDMA
	.comm	_MTK_TX_WB_DDONE,4,2            ; @MTK_TX_WB_DDONE
	.comm	_MTK_TX_DMA_EN,4,2              ; @MTK_TX_DMA_EN
	.comm	_MTK_DMA_SIZE_16DWORDS,4,2      ; @MTK_DMA_SIZE_16DWORDS
	.comm	_MTK_NDP_CO_PRO,4,2             ; @MTK_NDP_CO_PRO
	.comm	_MTK_RX_DMA_EN,4,2              ; @MTK_RX_DMA_EN
	.comm	_MTK_RX_BT_32DWORDS,4,2         ; @MTK_RX_BT_32DWORDS
	.comm	_MTK_QDMA_GLO_CFG,4,2           ; @MTK_QDMA_GLO_CFG
	.comm	_MTK_MULTI_EN,4,2               ; @MTK_MULTI_EN
	.comm	_MTK_PDMA_GLO_CFG,4,2           ; @MTK_PDMA_GLO_CFG
	.comm	_MTK_PDMA_SIZE_8DWORDS,4,2      ; @MTK_PDMA_SIZE_8DWORDS
	.no_dead_strip	_mtk_start_dma
.subsections_via_symbols
