	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_stop_dma
_mtk_stop_dma:                          ## @mtk_stop_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_spin_lock_bh
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_r32
	movq	_MTK_TX_WB_DDONE@GOTPCREL(%rip), %rcx
	movq	_MTK_RX_DMA_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movq	_MTK_TX_DMA_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_mtk_w32
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_r32
	movq	_MTK_TX_DMA_BUSY@GOTPCREL(%rip), %r15
	movq	_MTK_RX_DMA_BUSY@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	orl	(%r15), %ecx
	testl	%eax, %ecx
	je	LBB0_10
## %bb.1:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_r32
	movl	(%r12), %ecx
	orl	(%r15), %ecx
	testl	%eax, %ecx
	je	LBB0_10
## %bb.2:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_r32
	movl	(%r12), %ecx
	orl	(%r15), %ecx
	testl	%eax, %ecx
	je	LBB0_10
## %bb.3:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_r32
	movl	(%r12), %ecx
	orl	(%r15), %ecx
	testl	%eax, %ecx
	je	LBB0_10
## %bb.4:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_r32
	movl	(%r12), %ecx
	orl	(%r15), %ecx
	testl	%eax, %ecx
	je	LBB0_10
## %bb.5:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_r32
	movl	(%r12), %ecx
	orl	(%r15), %ecx
	testl	%eax, %ecx
	je	LBB0_10
## %bb.6:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_r32
	movl	(%r12), %ecx
	orl	(%r15), %ecx
	testl	%eax, %ecx
	je	LBB0_10
## %bb.7:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_r32
	movl	(%r12), %ecx
	orl	(%r15), %ecx
	testl	%eax, %ecx
	je	LBB0_10
## %bb.8:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_r32
	movl	(%r12), %ecx
	orl	(%r15), %ecx
	testl	%eax, %ecx
	je	LBB0_10
## %bb.9:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_r32
	movl	(%r12), %ecx
	orl	(%r15), %ecx
	testl	%eax, %ecx
	je	LBB0_10
## %bb.11:
	movl	$20, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msleep                         ## TAILCALL
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_TX_WB_DDONE,4,2            ## @MTK_TX_WB_DDONE
	.comm	_MTK_RX_DMA_EN,4,2              ## @MTK_RX_DMA_EN
	.comm	_MTK_TX_DMA_EN,4,2              ## @MTK_TX_DMA_EN
	.comm	_MTK_TX_DMA_BUSY,4,2            ## @MTK_TX_DMA_BUSY
	.comm	_MTK_RX_DMA_BUSY,4,2            ## @MTK_RX_DMA_BUSY
	.no_dead_strip	_mtk_stop_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_stop_dma
_mtk_stop_dma:                          ; @mtk_stop_dma
	.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
	mov	x20, x0
	bl	_spin_lock_bh
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_r32
Lloh0:
	adrp	x8, _MTK_TX_WB_DDONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTK_TX_WB_DDONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MTK_RX_DMA_EN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MTK_RX_DMA_EN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _MTK_TX_DMA_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MTK_TX_DMA_EN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w1, w0, w8
	mov	x0, x20
	mov	x2, x19
	bl	_mtk_w32
	mov	x0, x20
	bl	_spin_unlock_bh
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_r32
Lloh9:
	adrp	x21, _MTK_TX_DMA_BUSY@GOTPAGE
Lloh10:
	ldr	x21, [x21, _MTK_TX_DMA_BUSY@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh11:
	adrp	x22, _MTK_RX_DMA_BUSY@GOTPAGE
Lloh12:
	ldr	x22, [x22, _MTK_RX_DMA_BUSY@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_11
; %bb.1:
	mov	w0, #20
	bl	_msleep
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_r32
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_11
; %bb.2:
	mov	w0, #20
	bl	_msleep
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_r32
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_11
; %bb.3:
	mov	w0, #20
	bl	_msleep
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_r32
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_11
; %bb.4:
	mov	w0, #20
	bl	_msleep
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_r32
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_11
; %bb.5:
	mov	w0, #20
	bl	_msleep
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_r32
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_11
; %bb.6:
	mov	w0, #20
	bl	_msleep
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_r32
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_11
; %bb.7:
	mov	w0, #20
	bl	_msleep
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_r32
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_11
; %bb.8:
	mov	w0, #20
	bl	_msleep
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_r32
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_11
; %bb.9:
	mov	w0, #20
	bl	_msleep
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_r32
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_11
; %bb.10:
	mov	w0, #20
	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
	b	_msleep
LBB0_11:
	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	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_TX_WB_DDONE,4,2            ; @MTK_TX_WB_DDONE
	.comm	_MTK_RX_DMA_EN,4,2              ; @MTK_RX_DMA_EN
	.comm	_MTK_TX_DMA_EN,4,2              ; @MTK_TX_DMA_EN
	.comm	_MTK_TX_DMA_BUSY,4,2            ; @MTK_TX_DMA_BUSY
	.comm	_MTK_RX_DMA_BUSY,4,2            ; @MTK_RX_DMA_BUSY
	.no_dead_strip	_mtk_stop_dma
.subsections_via_symbols
