	.file	"extr_init.c_mt7601u_mac_start.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mt7601u_mac_start
	.type	mt7601u_mac_start, @function
mt7601u_mac_start:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edx, DWORD PTR MT_MAC_SYS_CTRL_ENABLE_TX[rip]
	mov	esi, DWORD PTR MT_MAC_SYS_CTRL[rip]
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	call	mt7601u_wr@PLT
	mov	esi, DWORD PTR MT_WPDMA_GLO_CFG[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	mov	edx, DWORD PTR MT_WPDMA_GLO_CFG_TX_DMA_BUSY[rip]
	mov	r8d, 200000
	or	edx, DWORD PTR MT_WPDMA_GLO_CFG_RX_DMA_BUSY[rip]
	call	mt76_poll@PLT
	test	eax, eax
	jne	.L2
.L6:
	mov	eax, DWORD PTR ETIMEDOUT[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edx, DWORD PTR MT_RX_FILTR_CFG_CRC_ERR[rip]
	or	edx, DWORD PTR MT_RX_FILTR_CFG_PHY_ERR[rip]
	mov	rdi, rbp
	or	edx, DWORD PTR MT_RX_FILTR_CFG_PROMISC[rip]
	or	edx, DWORD PTR MT_RX_FILTR_CFG_VER_ERR[rip]
	or	edx, DWORD PTR MT_RX_FILTR_CFG_DUP[rip]
	or	edx, DWORD PTR MT_RX_FILTR_CFG_CFACK[rip]
	or	edx, DWORD PTR MT_RX_FILTR_CFG_CFEND[rip]
	or	edx, DWORD PTR MT_RX_FILTR_CFG_ACK[rip]
	or	edx, DWORD PTR MT_RX_FILTR_CFG_CTS[rip]
	or	edx, DWORD PTR MT_RX_FILTR_CFG_RTS[rip]
	or	edx, DWORD PTR MT_RX_FILTR_CFG_PSPOLL[rip]
	or	edx, DWORD PTR MT_RX_FILTR_CFG_BA[rip]
	or	edx, DWORD PTR MT_RX_FILTR_CFG_CTRL_RSV[rip]
	mov	DWORD PTR 0[rbp], edx
	mov	esi, DWORD PTR MT_RX_FILTR_CFG[rip]
	call	mt7601u_wr@PLT
	mov	esi, DWORD PTR MT_MAC_SYS_CTRL[rip]
	mov	edx, DWORD PTR MT_MAC_SYS_CTRL_ENABLE_TX[rip]
	mov	rdi, rbp
	or	edx, DWORD PTR MT_MAC_SYS_CTRL_ENABLE_RX[rip]
	call	mt7601u_wr@PLT
	mov	esi, DWORD PTR MT_WPDMA_GLO_CFG[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	mov	edx, DWORD PTR MT_WPDMA_GLO_CFG_TX_DMA_BUSY[rip]
	mov	r8d, 50
	or	edx, DWORD PTR MT_WPDMA_GLO_CFG_RX_DMA_BUSY[rip]
	call	mt76_poll@PLT
	mov	r8d, eax
	xor	eax, eax
	test	r8d, r8d
	je	.L6
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mt7601u_mac_start, .-mt7601u_mac_start
	.comm	MT_WPDMA_GLO_CFG_TX_DMA_BUSY,4,4
	.comm	MT_WPDMA_GLO_CFG_RX_DMA_BUSY,4,4
	.comm	MT_WPDMA_GLO_CFG,4,4
	.comm	MT_RX_FILTR_CFG_VER_ERR,4,4
	.comm	MT_RX_FILTR_CFG_RTS,4,4
	.comm	MT_RX_FILTR_CFG_PSPOLL,4,4
	.comm	MT_RX_FILTR_CFG_PROMISC,4,4
	.comm	MT_RX_FILTR_CFG_PHY_ERR,4,4
	.comm	MT_RX_FILTR_CFG_DUP,4,4
	.comm	MT_RX_FILTR_CFG_CTS,4,4
	.comm	MT_RX_FILTR_CFG_CTRL_RSV,4,4
	.comm	MT_RX_FILTR_CFG_CRC_ERR,4,4
	.comm	MT_RX_FILTR_CFG_CFEND,4,4
	.comm	MT_RX_FILTR_CFG_CFACK,4,4
	.comm	MT_RX_FILTR_CFG_BA,4,4
	.comm	MT_RX_FILTR_CFG_ACK,4,4
	.comm	MT_RX_FILTR_CFG,4,4
	.comm	MT_MAC_SYS_CTRL_ENABLE_TX,4,4
	.comm	MT_MAC_SYS_CTRL_ENABLE_RX,4,4
	.comm	MT_MAC_SYS_CTRL,4,4
	.comm	ETIMEDOUT,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_init.c_mt7601u_mac_start.c"
	.text
	.align	2
	.global	mt7601u_mac_start
	.syntax unified
	.arm
	.fpu softvfp
	.type	mt7601u_mac_start, %function
mt7601u_mac_start:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r0
	ldr	r9, .L9
	ldr	r8, .L9+4
	ldr	r7, .L9+8
	ldr	r6, .L9+12
	sub	sp, sp, #12
	ldr	r2, [r9]
	ldr	r1, [r8]
	bl	mt7601u_wr
	ldr	r5, .L9+16
	ldr	r1, [r7]
	ldr	r2, [r6]
	ldr	r3, .L9+20
	orr	r2, r1, r2
	str	r3, [sp]
	mov	r0, r4
	mov	r3, #0
	ldr	r1, [r5]
	bl	mt76_poll
	cmp	r0, #0
	bne	.L2
.L6:
	ldr	r3, .L9+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	ldr	r3, .L9+28
	ldr	r2, .L9+32
	ldr	r1, .L9+36
	ldr	r0, [r3]
	ldr	r2, [r2]
	ldr	r3, .L9+40
	ldr	r1, [r1]
	ldr	r3, [r3]
	orr	r2, r2, r0
	ldr	r0, .L9+44
	orr	r2, r2, r1
	ldr	r1, .L9+48
	ldr	r0, [r0]
	orr	r2, r2, r3
	ldr	r3, .L9+52
	ldr	r1, [r1]
	ldr	r3, [r3]
	orr	r2, r2, r0
	ldr	r0, .L9+56
	orr	r2, r2, r1
	ldr	r1, .L9+60
	ldr	r0, [r0]
	orr	r2, r2, r3
	ldr	r3, .L9+64
	ldr	r1, [r1]
	ldr	r3, [r3]
	orr	r2, r2, r0
	ldr	r0, .L9+68
	orr	r2, r2, r1
	ldr	r1, .L9+72
	ldr	r0, [r0]
	orr	r2, r2, r3
	ldr	r3, .L9+76
	ldr	r1, [r1]
	ldr	r3, [r3]
	orr	r2, r2, r0
	orr	r2, r2, r1
	orr	r2, r2, r3
	ldr	r3, .L9+80
	str	r2, [r4]
	ldr	r1, [r3]
	mov	r0, r4
	bl	mt7601u_wr
	ldr	r3, .L9+84
	ldr	r2, [r9]
	ldr	r3, [r3]
	ldr	r1, [r8]
	orr	r2, r2, r3
	mov	r0, r4
	bl	mt7601u_wr
	mov	r3, #50
	ldr	r0, [r7]
	ldr	r2, [r6]
	str	r3, [sp]
	orr	r2, r0, r2
	mov	r3, #0
	mov	r0, r4
	ldr	r1, [r5]
	bl	mt76_poll
	cmp	r0, #0
	movne	r0, #0
	beq	.L6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L10:
	.align	2
.L9:
	.word	MT_MAC_SYS_CTRL_ENABLE_TX
	.word	MT_MAC_SYS_CTRL
	.word	MT_WPDMA_GLO_CFG_TX_DMA_BUSY
	.word	MT_WPDMA_GLO_CFG_RX_DMA_BUSY
	.word	MT_WPDMA_GLO_CFG
	.word	200000
	.word	ETIMEDOUT
	.word	MT_RX_FILTR_CFG_PHY_ERR
	.word	MT_RX_FILTR_CFG_CRC_ERR
	.word	MT_RX_FILTR_CFG_PROMISC
	.word	MT_RX_FILTR_CFG_VER_ERR
	.word	MT_RX_FILTR_CFG_DUP
	.word	MT_RX_FILTR_CFG_CFACK
	.word	MT_RX_FILTR_CFG_CFEND
	.word	MT_RX_FILTR_CFG_ACK
	.word	MT_RX_FILTR_CFG_CTS
	.word	MT_RX_FILTR_CFG_RTS
	.word	MT_RX_FILTR_CFG_PSPOLL
	.word	MT_RX_FILTR_CFG_BA
	.word	MT_RX_FILTR_CFG_CTRL_RSV
	.word	MT_RX_FILTR_CFG
	.word	MT_MAC_SYS_CTRL_ENABLE_RX
	.size	mt7601u_mac_start, .-mt7601u_mac_start
	.comm	MT_WPDMA_GLO_CFG_TX_DMA_BUSY,4,4
	.comm	MT_WPDMA_GLO_CFG_RX_DMA_BUSY,4,4
	.comm	MT_WPDMA_GLO_CFG,4,4
	.comm	MT_RX_FILTR_CFG_VER_ERR,4,4
	.comm	MT_RX_FILTR_CFG_RTS,4,4
	.comm	MT_RX_FILTR_CFG_PSPOLL,4,4
	.comm	MT_RX_FILTR_CFG_PROMISC,4,4
	.comm	MT_RX_FILTR_CFG_PHY_ERR,4,4
	.comm	MT_RX_FILTR_CFG_DUP,4,4
	.comm	MT_RX_FILTR_CFG_CTS,4,4
	.comm	MT_RX_FILTR_CFG_CTRL_RSV,4,4
	.comm	MT_RX_FILTR_CFG_CRC_ERR,4,4
	.comm	MT_RX_FILTR_CFG_CFEND,4,4
	.comm	MT_RX_FILTR_CFG_CFACK,4,4
	.comm	MT_RX_FILTR_CFG_BA,4,4
	.comm	MT_RX_FILTR_CFG_ACK,4,4
	.comm	MT_RX_FILTR_CFG,4,4
	.comm	MT_MAC_SYS_CTRL_ENABLE_TX,4,4
	.comm	MT_MAC_SYS_CTRL_ENABLE_RX,4,4
	.comm	MT_MAC_SYS_CTRL,4,4
	.comm	ETIMEDOUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
