	.file	"extr_mac.c_mt76x2_mac_stop.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mt76x2_mac_stop
	.type	mt76x2_mac_stop, @function
mt76x2_mac_stop:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, 300
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edx, DWORD PTR MT_TXOP_ED_CCA_EN[rip]
	mov	esi, DWORD PTR MT_TXOP_CTRL_CFG[rip]
	call	mt76_clear@PLT
	mov	edx, DWORD PTR MT_TXOP_HLDR_TX40M_BLK_EN[rip]
	mov	esi, DWORD PTR MT_TXOP_HLDR_ET[rip]
	mov	rdi, rbp
	call	mt76_clear@PLT
	mov	esi, DWORD PTR MT_MAC_SYS_CTRL[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	mt76_wr@PLT
	mov	esi, DWORD PTR MT_TX_RTS_CFG[rip]
	mov	rdi, rbp
	call	mt76_rr@PLT
	mov	edx, DWORD PTR MT_TX_RTS_CFG_RETRY_LIMIT[rip]
	mov	esi, DWORD PTR MT_TX_RTS_CFG[rip]
	mov	rdi, rbp
	mov	r12d, eax
	not	edx
	and	edx, eax
	call	mt76_wr@PLT
.L3:
	mov	esi, DWORD PTR MT_MAC_STATUS[rip]
	mov	rdi, rbp
	call	mt76_rr@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR MT_MAC_STATUS_RX[rip]
	or	eax, DWORD PTR MT_MAC_STATUS_TX[rip]
	test	eax, r8d
	jne	.L5
	mov	edi, DWORD PTR IBI[rip]
	mov	esi, 12
	call	MT_BBP@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	mt76_rr@PLT
	test	eax, eax
	jne	.L5
.L6:
	mov	esi, DWORD PTR MT_TX_RTS_CFG[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	edx, r12d
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	mt76_wr@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edi, 1
	call	udelay@PLT
	sub	r13d, 1
	jne	.L3
	test	ebx, ebx
	je	.L6
	mov	edi, 1
	call	BIT@PLT
	mov	edi, DWORD PTR CORE[rip]
	mov	esi, 4
	mov	r13d, eax
	call	MT_BBP@PLT
	mov	edx, r13d
	mov	rdi, rbp
	mov	esi, eax
	call	mt76_set@PLT
	mov	edi, 1
	call	BIT@PLT
	mov	edi, DWORD PTR CORE[rip]
	mov	esi, 4
	mov	r13d, eax
	call	MT_BBP@PLT
	mov	edx, r13d
	mov	rdi, rbp
	mov	esi, eax
	call	mt76_clear@PLT
	xor	edi, edi
	call	BIT@PLT
	mov	edi, DWORD PTR CORE[rip]
	mov	esi, 4
	mov	r13d, eax
	call	MT_BBP@PLT
	mov	edx, r13d
	mov	rdi, rbp
	mov	esi, eax
	call	mt76_set@PLT
	xor	edi, edi
	call	BIT@PLT
	mov	edi, DWORD PTR CORE[rip]
	mov	esi, 4
	mov	r13d, eax
	call	MT_BBP@PLT
	mov	edx, r13d
	mov	rdi, rbp
	mov	esi, eax
	call	mt76_clear@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	mt76x2_mac_stop, .-mt76x2_mac_stop
	.comm	MT_TX_RTS_CFG_RETRY_LIMIT,4,4
	.comm	MT_TX_RTS_CFG,4,4
	.comm	MT_TXOP_HLDR_TX40M_BLK_EN,4,4
	.comm	MT_TXOP_HLDR_ET,4,4
	.comm	MT_TXOP_ED_CCA_EN,4,4
	.comm	MT_TXOP_CTRL_CFG,4,4
	.comm	MT_MAC_SYS_CTRL,4,4
	.comm	MT_MAC_STATUS_TX,4,4
	.comm	MT_MAC_STATUS_RX,4,4
	.comm	MT_MAC_STATUS,4,4
	.comm	IBI,4,4
	.comm	CORE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_mac.c_mt76x2_mac_stop.c"
	.text
	.align	2
	.global	mt76x2_mac_stop
	.syntax unified
	.arm
	.fpu softvfp
	.type	mt76x2_mac_stop, %function
mt76x2_mac_stop:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r1
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r2, .L15
	ldr	r1, .L15+4
	sub	sp, sp, #12
	ldr	r2, [r2]
	ldr	r1, [r1]
	str	r3, [sp, #4]
	bl	mt76_clear
	ldr	r3, .L15+8
	ldr	r2, .L15+12
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r0, r4
	bl	mt76_clear
	ldr	r3, .L15+16
	ldr	r7, .L15+20
	ldr	r1, [r3]
	mov	r2, #0
	mov	r0, r4
	bl	mt76_wr
	ldr	r1, [r7]
	mov	r0, r4
	bl	mt76_rr
	mov	r6, r0
	ldr	r3, .L15+24
	mov	r0, r4
	ldr	r2, [r3]
	ldr	r1, [r7]
	bic	r2, r6, r2
	bl	mt76_wr
	mov	r5, #300
	ldr	r10, .L15+28
	ldr	r9, .L15+32
	ldr	r8, .L15+36
	ldr	fp, .L15+40
.L3:
	mov	r0, r4
	ldr	r1, [r10]
	bl	mt76_rr
	ldr	r3, [r9]
	ldr	r2, [r8]
	orr	r3, r3, r2
	tst	r3, r0
	bne	.L5
	mov	r1, #12
	ldr	r0, [fp]
	bl	MT_BBP
	mov	r1, r0
	mov	r0, r4
	bl	mt76_rr
	cmp	r0, #0
	bne	.L5
.L6:
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r7]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	mt76_wr
.L5:
	mov	r0, #1
	bl	udelay
	subs	r5, r5, #1
	bne	.L3
	ldr	r3, [sp, #4]
	cmp	r3, #0
	beq	.L6
	ldr	r8, .L15+44
	mov	r1, #4
	ldr	r0, [r8]
	bl	MT_BBP
	mov	r9, r0
	mov	r0, #1
	bl	BIT
	mov	r1, r9
	mov	r2, r0
	mov	r0, r4
	bl	mt76_set
	mov	r1, #4
	ldr	r0, [r8]
	bl	MT_BBP
	mov	r9, r0
	mov	r0, #1
	bl	BIT
	mov	r1, r9
	mov	r2, r0
	mov	r0, r4
	bl	mt76_clear
	mov	r1, #4
	ldr	r0, [r8]
	bl	MT_BBP
	mov	r9, r0
	mov	r0, r5
	bl	BIT
	mov	r1, r9
	mov	r2, r0
	mov	r0, r4
	bl	mt76_set
	mov	r1, #4
	ldr	r0, [r8]
	bl	MT_BBP
	mov	r1, r0
	mov	r0, r5
	mov	r5, r1
	bl	BIT
	mov	r1, r5
	mov	r2, r0
	mov	r0, r4
	bl	mt76_clear
	b	.L6
.L16:
	.align	2
.L15:
	.word	MT_TXOP_ED_CCA_EN
	.word	MT_TXOP_CTRL_CFG
	.word	MT_TXOP_HLDR_ET
	.word	MT_TXOP_HLDR_TX40M_BLK_EN
	.word	MT_MAC_SYS_CTRL
	.word	MT_TX_RTS_CFG
	.word	MT_TX_RTS_CFG_RETRY_LIMIT
	.word	MT_MAC_STATUS
	.word	MT_MAC_STATUS_RX
	.word	MT_MAC_STATUS_TX
	.word	IBI
	.word	CORE
	.size	mt76x2_mac_stop, .-mt76x2_mac_stop
	.comm	MT_TX_RTS_CFG_RETRY_LIMIT,4,4
	.comm	MT_TX_RTS_CFG,4,4
	.comm	MT_TXOP_HLDR_TX40M_BLK_EN,4,4
	.comm	MT_TXOP_HLDR_ET,4,4
	.comm	MT_TXOP_ED_CCA_EN,4,4
	.comm	MT_TXOP_CTRL_CFG,4,4
	.comm	MT_MAC_SYS_CTRL,4,4
	.comm	MT_MAC_STATUS_TX,4,4
	.comm	MT_MAC_STATUS_RX,4,4
	.comm	MT_MAC_STATUS,4,4
	.comm	IBI,4,4
	.comm	CORE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
