	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76x0e_stop_hw
_mt76x0e_stop_hw:                       ## @mt76x0e_stop_hw
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	addq	$8, %rdi
	callq	_cancel_delayed_work_sync
	leaq	4(%rbx), %rdi
	callq	_cancel_delayed_work_sync
	movq	_MT_WPDMA_GLO_CFG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_MT_WPDMA_GLO_CFG_TX_DMA_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	callq	_mt76_poll
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_2:
	movl	(%r14), %esi
	movq	_MT_WPDMA_GLO_CFG_TX_DMA_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_mt76_clear
	movq	%rbx, %rdi
	callq	_mt76x0_mac_stop
	movl	(%r14), %esi
	movq	_MT_WPDMA_GLO_CFG_RX_DMA_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	callq	_mt76_poll
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_4:
	movl	(%r14), %esi
	movq	_MT_WPDMA_GLO_CFG_RX_DMA_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mt76_clear                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_WPDMA_GLO_CFG,4,2           ## @MT_WPDMA_GLO_CFG
	.comm	_MT_WPDMA_GLO_CFG_TX_DMA_BUSY,4,2 ## @MT_WPDMA_GLO_CFG_TX_DMA_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TX DMA did not stop\n"

	.comm	_MT_WPDMA_GLO_CFG_TX_DMA_EN,4,2 ## @MT_WPDMA_GLO_CFG_TX_DMA_EN
	.comm	_MT_WPDMA_GLO_CFG_RX_DMA_BUSY,4,2 ## @MT_WPDMA_GLO_CFG_RX_DMA_BUSY
	.comm	_MT_WPDMA_GLO_CFG_RX_DMA_EN,4,2 ## @MT_WPDMA_GLO_CFG_RX_DMA_EN
	.no_dead_strip	_mt76x0e_stop_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76x0e_stop_hw
_mt76x0e_stop_hw:                       ; @mt76x0e_stop_hw
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x0, x0, #8
	bl	_cancel_delayed_work_sync
	add	x0, x19, #4
	bl	_cancel_delayed_work_sync
Lloh0:
	adrp	x20, _MT_WPDMA_GLO_CFG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MT_WPDMA_GLO_CFG@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _MT_WPDMA_GLO_CFG_TX_DMA_BUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MT_WPDMA_GLO_CFG_TX_DMA_BUSY@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #1000
	bl	_mt76_poll
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_2:
	ldr	w1, [x20]
Lloh7:
	adrp	x8, _MT_WPDMA_GLO_CFG_TX_DMA_EN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MT_WPDMA_GLO_CFG_TX_DMA_EN@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mt76_clear
	mov	x0, x19
	bl	_mt76x0_mac_stop
	ldr	w1, [x20]
Lloh10:
	adrp	x8, _MT_WPDMA_GLO_CFG_RX_DMA_BUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MT_WPDMA_GLO_CFG_RX_DMA_BUSY@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #1000
	bl	_mt76_poll
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_4:
	ldr	w1, [x20]
Lloh15:
	adrp	x8, _MT_WPDMA_GLO_CFG_RX_DMA_EN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MT_WPDMA_GLO_CFG_RX_DMA_EN@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mt76_clear
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_WPDMA_GLO_CFG,4,2           ; @MT_WPDMA_GLO_CFG
	.comm	_MT_WPDMA_GLO_CFG_TX_DMA_BUSY,4,2 ; @MT_WPDMA_GLO_CFG_TX_DMA_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TX DMA did not stop\n"

	.comm	_MT_WPDMA_GLO_CFG_TX_DMA_EN,4,2 ; @MT_WPDMA_GLO_CFG_TX_DMA_EN
	.comm	_MT_WPDMA_GLO_CFG_RX_DMA_BUSY,4,2 ; @MT_WPDMA_GLO_CFG_RX_DMA_BUSY
	.comm	_MT_WPDMA_GLO_CFG_RX_DMA_EN,4,2 ; @MT_WPDMA_GLO_CFG_RX_DMA_EN
	.no_dead_strip	_mt76x0e_stop_hw
.subsections_via_symbols
