	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7603_mac_watchdog_reset
_mt7603_mac_watchdog_reset:             ## @mt7603_mac_watchdog_reset
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	leaq	8(%rdi), %r15
	movl	8(%rdi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	12(%rdi), %edi
	movl	52(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	callq	_ieee80211_stop_queues
	movq	_MT76_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	40(%r13), %rsi
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	callq	_set_bit
	movq	%r15, %rdi
	callq	_mt76_txq_schedule_all
	leaq	32(%r13), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_tasklet_disable
	leaq	24(%r13), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_tasklet_disable
	movq	16(%r13), %rdi
	callq	_napi_disable
	movq	16(%r13), %rdi
	addq	$4, %rdi
	callq	_napi_disable
	leaq	28(%r13), %r14
	movq	%r14, %rdi
	callq	_napi_disable
	leaq	36(%r13), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	movl	$-1, %esi
	xorl	%edx, %edx
	callq	_mt7603_beacon_set_timer
	movq	56(%r13), %rax
	movq	_RESET_CAUSE_RESET_FAILED@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_1
LBB0_4:
	movq	%r13, %rdi
	callq	_mt7603_pse_reset
	movq	56(%r13), %rax
	movq	(%rbx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	jne	LBB0_12
	jmp	LBB0_5
LBB0_1:
	movq	(%r13), %rax
	movq	_RESET_CAUSE_RX_PSE_BUSY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movq	_RESET_CAUSE_BEACON_STUCK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	_RESET_CAUSE_TX_HANG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
LBB0_5:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_mt7603_mac_stop
	movq	_MT_WPDMA_GLO_CFG@GOTPCREL(%rip), %rbx
	movq	_MT_WPDMA_GLO_CFG_RX_DMA_EN@GOTPCREL(%rip), %rax
	movq	_MT_WPDMA_GLO_CFG_TX_DMA_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	(%rbx), %esi
	movq	_MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r13, %rdi
	callq	_mt76_clear
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_mt7603_irq_disable
	movl	(%rbx), %esi
	movq	_MT_WPDMA_GLO_CFG_FORCE_TX_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_mt76_set
	movq	%r13, %rdi
	callq	_mt7603_pse_client_reset
	movl	48(%r13), %edi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_8
## %bb.6:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	$1, %edx
	callq	_mt76_queue_tx_cleanup
	incl	%r15d
	movl	48(%r13), %edi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r15d
	jl	LBB0_7
LBB0_8:
	movl	44(%r13), %edi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_11
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_mt76_queue_rx_reset
	incl	%ebx
	movl	44(%r13), %edi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jl	LBB0_10
LBB0_11:
	movq	%r13, %rdi
	callq	_mt7603_dma_sched_reset
	movq	%r13, %rdi
	callq	_mt7603_mac_dma_start
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_mt7603_irq_enable
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_12:
	movq	_MT76_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_clear_bit
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_tasklet_enable
	movq	%r14, %rdi
	callq	_napi_enable
	movq	%r14, %rdi
	callq	_napi_schedule
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_tasklet_enable
	movq	%r13, %rdi
	movl	$-1, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_mt7603_beacon_set_timer
	movq	16(%r13), %rdi
	callq	_napi_enable
	movq	16(%r13), %rdi
	callq	_napi_schedule
	movq	16(%r13), %rdi
	addq	$4, %rdi
	callq	_napi_enable
	movq	16(%r13), %rdi
	addq	$4, %rdi
	callq	_napi_schedule
	movl	12(%r13), %edi
	callq	_ieee80211_wake_queues
	movq	%r15, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt76_txq_schedule_all          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT76_RESET,4,2                 ## @MT76_RESET
	.comm	_RESET_CAUSE_RESET_FAILED,8,3   ## @RESET_CAUSE_RESET_FAILED
	.comm	_RESET_CAUSE_RX_PSE_BUSY,8,3    ## @RESET_CAUSE_RX_PSE_BUSY
	.comm	_RESET_CAUSE_BEACON_STUCK,8,3   ## @RESET_CAUSE_BEACON_STUCK
	.comm	_RESET_CAUSE_TX_HANG,8,3        ## @RESET_CAUSE_TX_HANG
	.comm	_MT_WPDMA_GLO_CFG,4,2           ## @MT_WPDMA_GLO_CFG
	.comm	_MT_WPDMA_GLO_CFG_RX_DMA_EN,4,2 ## @MT_WPDMA_GLO_CFG_RX_DMA_EN
	.comm	_MT_WPDMA_GLO_CFG_TX_DMA_EN,4,2 ## @MT_WPDMA_GLO_CFG_TX_DMA_EN
	.comm	_MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE,4,2 ## @MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE
	.comm	_MT_WPDMA_GLO_CFG_FORCE_TX_EOF,4,2 ## @MT_WPDMA_GLO_CFG_FORCE_TX_EOF
	.no_dead_strip	_mt7603_mac_watchdog_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7603_mac_watchdog_reset
_mt7603_mac_watchdog_reset:             ; @mt7603_mac_watchdog_reset
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	mov	x19, x0
	ldr	w21, [x19, #8]!
	ldr	w23, [x0, #52]
	ldr	w0, [x0, #12]
	bl	_ieee80211_stop_queues
Lloh0:
	adrp	x8, _MT76_RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT76_RESET@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x24, x20, #40
	mov	x1, x24
	bl	_set_bit
	mov	x0, x19
	bl	_mt76_txq_schedule_all
	add	x25, x20, #32
	mov	x0, x25
	bl	_tasklet_disable
	add	x22, x20, #24
	mov	x0, x22
	bl	_tasklet_disable
	ldr	x0, [x20, #16]
	bl	_napi_disable
	ldr	x8, [x20, #16]
	add	x0, x8, #4
	bl	_napi_disable
	add	x26, x20, #28
	mov	x0, x26
	bl	_napi_disable
	add	x27, x20, #36
	mov	x0, x27
	bl	_mutex_lock
	mov	x0, x20
	mov	w1, #-1
	mov	w2, #0
	bl	_mt7603_beacon_set_timer
	ldr	x8, [x20, #56]
Lloh3:
	adrp	x28, _RESET_CAUSE_RESET_FAILED@GOTPAGE
Lloh4:
	ldr	x28, [x28, _RESET_CAUSE_RESET_FAILED@GOTPAGEOFF]
	ldr	x9, [x28]
	ldr	x8, [x8, x9, lsl #3]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _RESET_CAUSE_RX_PSE_BUSY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _RESET_CAUSE_RX_PSE_BUSY@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _RESET_CAUSE_BEACON_STUCK@GOTPAGE
Lloh9:
	ldr	x10, [x10, _RESET_CAUSE_BEACON_STUCK@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
Lloh11:
	adrp	x11, _RESET_CAUSE_TX_HANG@GOTPAGE
Lloh12:
	ldr	x11, [x11, _RESET_CAUSE_TX_HANG@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_mt7603_pse_reset
	ldr	x8, [x20, #56]
	ldr	x9, [x28]
	ldr	x8, [x8, x9, lsl #3]
	cbnz	x8, LBB0_10
LBB0_3:
	mov	x0, x20
	bl	_mt7603_mac_stop
Lloh14:
	adrp	x28, _MT_WPDMA_GLO_CFG@GOTPAGE
Lloh15:
	ldr	x28, [x28, _MT_WPDMA_GLO_CFG@GOTPAGEOFF]
	ldr	w1, [x28]
Lloh16:
	adrp	x8, _MT_WPDMA_GLO_CFG_RX_DMA_EN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MT_WPDMA_GLO_CFG_RX_DMA_EN@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _MT_WPDMA_GLO_CFG_TX_DMA_EN@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MT_WPDMA_GLO_CFG_TX_DMA_EN@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh22:
	adrp	x9, _MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x20
	bl	_mt76_clear
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	mov	x0, x20
	mov	x1, x23
	bl	_mt7603_irq_disable
	ldr	w1, [x28]
Lloh25:
	adrp	x8, _MT_WPDMA_GLO_CFG_FORCE_TX_EOF@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MT_WPDMA_GLO_CFG_FORCE_TX_EOF@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_mt76_set
	mov	x0, x20
	bl	_mt7603_pse_client_reset
	ldr	w0, [x20, #48]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w28, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x28
	mov	w2, #1
	bl	_mt76_queue_tx_cleanup
	add	w28, w28, #1
	ldr	w0, [x20, #48]
	bl	_ARRAY_SIZE
	cmp	w28, w0
	b.lt	LBB0_5
LBB0_6:
	ldr	w0, [x20, #44]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.7:
	mov	w28, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x28
	bl	_mt76_queue_rx_reset
	add	w28, w28, #1
	ldr	w0, [x20, #44]
	bl	_ARRAY_SIZE
	cmp	w28, w0
	b.lt	LBB0_8
LBB0_9:
	mov	x0, x20
	bl	_mt7603_dma_sched_reset
	mov	x0, x20
	bl	_mt7603_mac_dma_start
	mov	x0, x20
	mov	x1, x23
	bl	_mt7603_irq_enable
LBB0_10:
Lloh28:
	adrp	x8, _MT76_RESET@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MT76_RESET@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	mov	x1, x24
	bl	_clear_bit
	mov	x0, x27
	bl	_mutex_unlock
	mov	x0, x25
	bl	_tasklet_enable
	mov	x0, x26
	bl	_napi_enable
	mov	x0, x26
	bl	_napi_schedule
	mov	x0, x22
	bl	_tasklet_enable
	mov	x0, x20
	mov	w1, #-1
	mov	x2, x21
	bl	_mt7603_beacon_set_timer
	ldr	x0, [x20, #16]
	bl	_napi_enable
	ldr	x0, [x20, #16]
	bl	_napi_schedule
	ldr	x8, [x20, #16]
	add	x0, x8, #4
	bl	_napi_enable
	ldr	x8, [x20, #16]
	add	x0, x8, #4
	bl	_napi_schedule
	ldr	w0, [x20, #12]
	bl	_ieee80211_wake_queues
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_mt76_txq_schedule_all
	.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 AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_MT76_RESET,4,2                 ; @MT76_RESET
	.comm	_RESET_CAUSE_RESET_FAILED,8,3   ; @RESET_CAUSE_RESET_FAILED
	.comm	_RESET_CAUSE_RX_PSE_BUSY,8,3    ; @RESET_CAUSE_RX_PSE_BUSY
	.comm	_RESET_CAUSE_BEACON_STUCK,8,3   ; @RESET_CAUSE_BEACON_STUCK
	.comm	_RESET_CAUSE_TX_HANG,8,3        ; @RESET_CAUSE_TX_HANG
	.comm	_MT_WPDMA_GLO_CFG,4,2           ; @MT_WPDMA_GLO_CFG
	.comm	_MT_WPDMA_GLO_CFG_RX_DMA_EN,4,2 ; @MT_WPDMA_GLO_CFG_RX_DMA_EN
	.comm	_MT_WPDMA_GLO_CFG_TX_DMA_EN,4,2 ; @MT_WPDMA_GLO_CFG_TX_DMA_EN
	.comm	_MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE,4,2 ; @MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE
	.comm	_MT_WPDMA_GLO_CFG_FORCE_TX_EOF,4,2 ; @MT_WPDMA_GLO_CFG_FORCE_TX_EOF
	.no_dead_strip	_mt7603_mac_watchdog_reset
.subsections_via_symbols
